2014-08-16

Slitaz -- slitaz-rolling-core64 (20140804)


Linux slitaz 3.2.53-slitaz #2 SMP Wed Jul 30 14:21:12 Europe 2014 x86_64 GNU/Linux
echo -e "\n* Building bzImage64 with modules...\n"
make -j 4 ARCH=x86_64 CROSS_COMPILE=uclibc-x86_64- bzImage &&
root@slitaz:/tmp# file -k vmlinuz-3.2.53-slitaz
vmlinuz-3.2.53-slitaz: x86 boot sector12- Linux kernel x86 boot executable bzImage, version 3.2.53-slitaz (root@tank) #2 SMP Wed Jul 30 14:21:12 Europe 201, RO-rootFS, swap_dev 0x2, Normal VGA MS-DOS executable, MZ for MS-DOS
1.
root@slitaz:~$ uname -a
Linux slitaz 3.2.53-slitaz #2 SMP Wed Jul 30 14:21:12 Europe 2014 x86_64 GNU/Linux


2.
root@slitaz:~$ slitaz
SliTaz GNU/Linux
================================================================================
Release : cooking
Architecture : i486
Kernel : 3.2.53-slitaz
Machine type : x86_64
Home path : /home/slitaz
Configs : /etc/slitaz
Main config : /etc/slitaz/slitaz.conf
Log files : /var/log/slitaz
Packages DB : /var/lib/tazpkg
Installed : 260 packages
Mirror : http://mirror.slitaz.org/packages/cooking/
System date : Fri Aug 15 00:17:08 UTC 2014
--------------
Boot options : root=/dev/hda1 screen=text
================================================================================


3.
root@slitaz:~$ dmesg | head 4
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Linux version 3.2.53-slitaz (root@tank) (gcc version 4.2.1) #2 SMP Wed Jul 30 14:21:12 Europe 2014
Command line: root=/dev/hda1 screen=text


4.
root@slitaz:~$ cat /var/log/boot.log
Processing: /etc/init.d/rcS...
Mounting proc filesystem on /proc                                    [ Done ]
Mounting devtmpfs filesystem on: /dev                                [ Done ]
Starting udev daemon...
Udevadm requesting events from the Kernel...
Udevadm waiting for the event queue to finish...
Remounting rootfs read/write...
Mounting filesystems in fstab...
Searching for early boot options...                                  [ Done ]
Cleaning up the system...                                            [ Done ]
Mounting usbfs filesystem on: /proc/bus/usb                          [ Done ]
Starting system log daemon: syslogd...                               [ Done ]
Starting kernel log daemon: klogd...                                 [ Done ]
Loading Kernel modules...
Loading module: PIIX_IDEmodprobe: FATAL: Module PIIX_IDE not found.
[ Failed ]
Triggering udev events: --action=add                                 [ Done ]
Processing: /etc/init.d/bootopts.sh
Checking for SliTaz cmdline options...
Processing: /etc/init.d/system.sh
Unable to configure sound card.
Setting system locale: POSIX                                         [ Done ]
Loading console keymap: us                                           [ Done ]
Starting TazPanel web server on port 82...                           [ Done ]
Processing: /etc/init.d/network.sh
Setting hostname to: slitaz                                          [ Done ]
Configuring loopback...                                              [ Done ]
ifconfig: SIOCGIFFLAGS: No such device
Starting udhcpc client on: eth0...
udhcpc: SIOCGIFINDEX: No such device
Processing: /etc/init.d/local.sh
Starting all daemons...
Setting up kernel security rules...                                  [ Done ]
WARNING: IPtables rules are disabled
httpd is already active.

Welcome to your box

Slitaz -- boot kernel with initramfs

qemu-x86_64 -m 512 -kernel vmlinuz-3.2.53-slitaz
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE="initrd.cpio"

50 cp /usr/share/boot/initrd initrd.cpio

[ -x /bin/udhcpc ] && udhcpc -b -s /init
while true; do
   busybox | sed '/Current/,$!d'
   if [ -x /bin/setsid ]; then
      setsid sh -c "exec sh <$TTY >$TTY 2>&1"
   else
      sh <$TTY >$TTY 2>&1
   fi
done

slitaz-rolling-core64.iso 2014-Aug-04 05:42:53 44.0M

1. extract vmlinuz-3.2.53-slitaz and rootfs.gz from slitaz-rolling-core64.iso
Applications --> Accessories --> ISO Master

2.
root@slitaz:/tmp# ls -l rootfs.gz vmlinuz-3.2.53-slitaz
-rw-r--r-- 1 root root 41239348 Aug 13 10:26 rootfs.gz
-rw-r--r-- 1 root root 3084016 Aug 13 10:26 vmlinuz-3.2.53-slitaz

3.
root@slitaz:/tmp# file -k vmlinuz-3.2.53-slitaz
vmlinuz-3.2.53-slitaz: x86 boot sector12- Linux kernel x86 boot executable bzImage, version 3.2.53-slitaz (root@tank) #2 SMP Wed Jul 30 14:21:12 Europe 201, RO-rootFS, swap_dev 0x2, Normal VGA MS-DOS executable, MZ for MS-DOS

4.
root@slitaz:/tmp# tazpkg -gi qemu-x86_64

root@slitaz:/tmp# qemu-x86_64 -m 512 -kernel vmlinuz-3.2.53-slitaz


  • mkdir: can't create directory 『/dev': File exists
  • udhcpc: ioctl 0x8933 failed: No such device

Slitaz -- rootfs.gz (slitaz-rolling-core64.iso) and debian-kernel-amd64


rootfs.gz (slitaz-rolling-core64.iso) and debian-kernel-amd64
2. config-3.2.0-4-amd64:
extract from Debian linux-image-3.2.0-4-amd64

Ref:

Slitaz -- core64 / amd64
http://alanyih.blogspot.com/2013/12/slitaz-core64-amd64.html

Slitaz -- busybox-boot / initrd / initrd.cpio

busybox-boot / initrd / initrd.cpio

CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE="initrd.cpio"

busybox-boot / initrd
http://cook.slitaz.org/cooker.cgi?receipt=busybox-boot

SHORT_DESC="Many common UNIX utilities for core-5in1/boot flavor."

Ref:

Slitaz -- core64 / initrd.cpio
http://alanyih.blogspot.com/2014/01/slitaz-core64-initrdcpio.html

2014-08-11

slitaz-roll-core64 VS. slitaz-x86_64


slitaz-roll-core64 VS. slitaz-x86_64
Diff slitaz-roll-core64 * slitaz-x86_64 **
Core (kernel,modules) 64bits 64bits
packages 32bits 64bits (32bits TODO)
toolchain uclibc-cross-compiler-x86_64 slitaz-x86_64-toolchain (gcc-4.6.3)
INITRAMFS_SOURCE initrd.cpio ""
.config linux-slitaz.config64 config-3.2.0-4-amd64

Note:
* slitaz-roll-core64
1. Distro: rolling-core64
http://cook.slitaz.org/cookiso.cgi?distro=rolling-core64

Description: 64 bits kernel with a fully featured 32 bits desktop.


2. receipt
http://cook.slitaz.org/cooker.cgi?receipt=linux
[..]
# The Linux receipt handle cross compilation. For x86_64 we actually use
# the uclibc-cross-compiler-x86_64
[..]
# Build bzImage64 with modules
cp -f $stuff/$PACKAGE-slitaz.config64 .config
echo -e "\n* Configure bzImage64 with modules...\n"
yes '' | make ARCH=x86_64 oldconfig

echo -e "\n* Building bzImage64 with modules...\n"
make -j 4 ARCH=x86_64 CROSS_COMPILE=uclibc-x86_64- bzImage &&
make -j 4 ARCH=x86_64 CROSS_COMPILE=uclibc-x86_64- modules &&


3. linux-slitaz.config64
http://cook.slitaz.org/cooker.cgi?stuff=linux/stuff/linux-slitaz.config64

[..]
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE="initrd.cpio"
CONFIG_INITRAMFS_ROOT_UID=0
CONFIG_INITRAMFS_ROOT_GID=0



** slitaz-x86_64

1. slitaz-x86_64
http://alanyih.blogspot.com/2014/05/slitaz-x8664.html
root@slitaz:~# uname -a
Linux slitaz 3.2.53-slitaz #1 SMP Wed Jan 1 18:22:13 UTC 2014 x86_64 GNU/Linux

[ 0.000000] Linux version 3.2.53-slitaz (root@slitaz) (gcc version 4.6.3 (SliTaz) ) #1 SMP Wed Jan 1 18:22:13 UTC 2014

root@slitaz:~# file /lib/libc-2.13.so
/lib/libc-2.13.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, stripped

2. config-3.2.0-4-amd64:
extract from Debian linux-image-3.2.0-4-amd64

Slitaz -- gnumeric / harfbuzz

gnumeric: Office Spreadsheet application.

libharfbuzz.so.0: cannot open shared object file: No such file or directory

tux@slitaz:~$ gnumeric &
tux@slitaz:~$ gnumeric: error while loading shared libraries: libharfbuzz.so.0: cannot open shared object file: No such file or directory

# tazpkg -gi harfbuzz

2014-08-01

Slitaz -- cool-old-term

20140802-cool-old-term.jpg

cool-old-term


Description

cool-old-term is a terminal emulator which tries to mimic the look and feel of the old cathode tube screens. It has been designed to be eye-candy, customizable, and reasonably lightweight.
It now uses the konsole engine which is powerful and mature.
This terminal emulator requires Qt 5.2 or higher to run.


/usr/src/cool-old-term # date
Sat Aug  2 10:33:46 UTC 2014

/usr/src/cool-old-term # uname -a
Linux slitaz 3.2-slitaz #1 SMP Sat May 18 22:32:35 CST 2013 i686 GNU/Linux

/usr/src/cool-old-term # ls -l konsole-qml-plugin/*.so
-rwxr-xr-x    1 root     root        575415 Aug  2 09:07 konsole-qml-plugin/libkdekonsole.so
/usr/src/cool-old-term # 

 

2014-07-29

Slitaz -- screenshot

scrot: A screen capture utility

Take a screenshot of the full screen with scrot when Print are pressed
Take a screenshot of the current window with scrot when Alt+Print are pressed


1.
tux@slitaz:~$ sudo tazpkg -gi scrot


2.
tux@slitaz:~$ scrot --help | grep -A 3 Example
  Example:
          scrot '%Y-%m-%d_$wx$h_scrot.png' -e 'mv $f ~/images/shots/'
          Creates a file called something like 2000-10-30_2560x1024_scrot.png
          and moves it to your images directory.


3.
tux@slitaz:~$ grep -A 3 Print .config/openbox/rc.xml
  <!-- Take a screenshot of the full screen with scrot when Print are pressed -->
  <keybind key="Print">
    <action name="Execute"><command>scrot '%Y%m%d-%s.png'</command></action>
  </keybind>
  <!-- Take a screenshot of the current window with scrot when Alt+Print are pressed -->
  <keybind key="A-Print">
    <action name="Execute"><command>scrot -b -u '%Y%m%d-%s.png'</command></action>
  </keybind>

tux@slitaz:~$

2014-07-28

Slitaz -- wpa / nl80211


nl80211: 'nl80211' generic netlink not found
Failed to initialize driver 'nl80211'                [ Failed ]


1.
root@slitaz:/home/tux# /etc/init.d/wpa_supplicant start
Starting wpa_supplicant deamon: wpa_supplicant... Successfully initialized wpa_supplicant
nl80211: 'nl80211' generic netlink not found
Failed to initialize driver 'nl80211'                [ Failed ]


2.
root@slitaz:/home/tux# modprobe mac80211

root@slitaz:/home/tux# lsmod | head -5
Module                  Size  Used by    Tainted: G 
r8712u                115832  0
mac80211              161375  0
cfg80211              117342  1 mac80211
rfkill                 10155  2 cfg80211


3.
root@slitaz:/home/tux# modinfo mac80211
filename:       /lib/modules/3.2.53-slitaz/kernel/net/mac80211/mac80211.ko.xz
license:        GPL
description:    IEEE 802.11 subsystem
depends:        cfg80211
intree:         Y
vermagic:       3.2.53-slitaz SMP mod_unload 386
parm:           ieee80211_default_rc_algo:Default rate control algorithm for mac80211 to use (charp)
parm:           max_nullfunc_tries:Maximum nullfunc tx tries before disconnecting (reason 4). (int)
parm:           max_probe_tries:Maximum probe tries before disconnecting (reason 4). (int)
parm:           probe_wait_ms:Maximum time(ms) to wait for probe response before disconnecting (reason 4). (int)
root@slitaz:/home/tux#

Slitaz -- wpa / wext


-D = driver name (can be multiple drivers: nl80211,wext)

example:
wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wpa_supplicant.conf


1.
root@slitaz:/home/tux# wpa_supplicant -help | grep -A 3 drivers:
drivers:
nl80211 = Linux nl80211/cfg80211
wext = Linux wireless extensions (generic)
wired = Wired Ethernet driver
--
-D = driver name (can be multiple drivers: nl80211,wext)
-e = entropy file
-g = global ctrl_interface
-G = global ctrl_interface group


2.
Update wpa_supplicant (2.1) And use /etc/wpa
http://hg.slitaz.org/wok/raw-rev/62082fa37457

diff -r f2f0afdddde7 -r 62082fa37457 wpa_supplicant/receipt
--- a/wpa_supplicant/receipt Sat Feb 15 15:38:27 2014 +0100
+++ b/wpa_supplicant/receipt Sat Feb 15 19:55:40 2014 +0100
@@ -1,7 +1,7 @@
# SliTaz package receipt.

PACKAGE="wpa_supplicant"
-VERSION="1.1"
+VERSION="2.1"
CATEGORY="utilities"
SHORT_DESC="WPA Supplicant with support for WPA and WPA2"
MAINTAINER="0dddba11@googlemail.com"
@@ -57,20 +57,22 @@
$src/wpa_supplicant/dbus/dbus-wpa_supplicant.conf \
$fs/etc/dbus-1/system.d/wpa_supplicant.conf

- # Startup script and cleaned up wpa_supplicant.conf
- cp -a stuff/etc $fs
- # dont copy the original
- # cp -a $src/$PACKAGE/wpa_supplicant.conf $fs/etc
+ # Startup script and cleaned up wpa_empty.conf
+ cp -a $stuff/etc $fs
+ cp -a $src/$PACKAGE/wpa_supplicant.conf $fs/etc/wpa
}


3.
root@slitaz:/home/tux# head -15 /etc/init.d/wpa_supplicant
#!/bin/sh
# /etc/init.d/wpa_supplicant: Start, stop and restart wpa_supplicant deamon
# on SliTaz, at boot time or with the command line.
#
# To start daemon at boot time, just put the right name in the $RUN_DAEMONS
# variable of /etc/rcS.conf and configure options with /etc/daemons.conf.
#
. /etc/init.d/rc.functions
. /etc/daemons.conf

NAME=wpa_supplicant
DESC="wpa_supplicant deamon"
DAEMON=/usr/bin/wpa_supplicant
OPTIONS=$WPA_OPTIONS
PIDFILE=/var/run/wpa_supplicant.pid


4.
root@slitaz:/home/tux# tail -2 /etc/daemons.conf
# wpa_supplicant daemon options
WPA_OPTIONS="-B -u -D wext -P /var/run/wpa_supplicant.pid -c /etc/wpa/wpa.conf -i $(. /etc/network.conf ; echo $WIFI_INTERFACE)"


5.
root@slitaz:/home/tux# ps | grep wpa
1675 root 0:00 /usr/bin/wpa_supplicant -B -u -D wext -P /var/run/wpa_supplicant.pid -c /etc/wpa/wpa.conf -i wlan0
1955 root 0:00 grep wpa
root@slitaz:/home/tux#

Slitaz -- wpa


Successfully initialized wpa_supplicant
wlan0: Failed to initialize driver interface


1.
root@slitaz:/home/tux# /etc/init.d/wpa_supplicant start
Starting wpa_supplicant deamon: wpa_supplicant... Successfully initialized wpa_supplicant
wlan0: Failed to initialize driver interface [ Failed ]


2.
root@slitaz:/home/tux# dmesg | tail -15
usbcore: deregistering interface driver r8712u
usb 2-6: reset high-speed USB device number 4 using ehci_hcd
r8712u: Driver unloaded
r8712u: module is from the staging directory, the quality is unknown, you have been warned.
r8712u: DriverVersion: v7_0.20100831
r8712u: register rtl8712_netdev_ops to netdev_ops
r8712u: USB_SPEED_HIGH with 4 endpoints
r8712u: Boot from EFUSE: Autoload OK
r8712u: CustomerID = 0x0010
r8712u: MAC Address from efuse = c8:60:00:xx:xx:xx
r8712u: Loading firmware from "rtlwifi/rtl8712u.bin"
usbcore: registered new interface driver r8712u
r8712u: 1 RCR=0x153f00e
r8712u: 2 RCR=0x553f00e
ADDRCONF(NETDEV_UP): wlan0: link is not ready
root@slitaz:/home/tux#


3.
root@slitaz:/home/tux# lsmod | head -5
Module Size Used by Tainted: G
r8712u 115832 0
mac80211 161375 0
cfg80211 117342 1 mac80211
rfkill 10155 2 cfg80211
root@slitaz:/home/tux#


4.
root@slitaz:/home/tux# wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf &
root@slitaz:/home/tux# Successfully initialized wpa_supplicant


5.
root@slitaz:/home/tux# dmesg | tail
r8712u: Loading firmware from "rtlwifi/rtl8712u.bin"
usbcore: registered new interface driver r8712u
r8712u: 1 RCR=0x153f00e
r8712u: 2 RCR=0x553f00e
ADDRCONF(NETDEV_UP): wlan0: link is not ready
ADDRCONF(NETDEV_UP): wlan0: link is not ready
ADDRCONF(NETDEV_UP): wlan0: link is not ready
ADDRCONF(NETDEV_UP): wlan0: link is not ready
ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
wlan0: no IPv6 routers present


6.
root@slitaz:/home/tux# iwconfig wlan0
wlan0 IEEE 802.11bg ESSID:"slitaz" Nickname:"rtl_wifi"
Mode:Managed Frequency:2.442 GHz Access Point: 30:85:A9:xx:xx:xx
Bit Rate:54 Mb/s Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Encryption key:****-****-****-****-****-****-****-**** Security mode:open
Power Management:off
Link Quality=100/100 Signal level=63/100 Noise level=0/100
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

7.
root@slitaz:/home/tux# ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr C8:60:00:xx:xx:xx
inet addr:192.168.1.32 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::ca60:ff:fexx:xxxx/xx Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:113 errors:0 dropped:81 overruns:0 frame:0
TX packets:12 errors:0 dropped:1 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:14750 (14.4 KiB) TX bytes:1807 (1.7 KiB)

2014-06-27

Slitaz -- strip


1.
tux@slitaz:~$ strip --help
[..]
  -s --strip-all                   Remove all symbol and relocation information
  -g -S -d --strip-debug           Remove all debugging symbols & sections
     --only-keep-debug             Strip everything but the debug information
  -K --keep-symbol=<name>          Do not strip symbol <name>
     --keep-file-symbols           Do not strip file symbol(s)


2.
tux@slitaz:~$ grep -A 15 'strip_package()' /usr/bin/cook
strip_package() {
    case "$ARCH" in
        arm|x86_64) export STRIP=${HOST_SYSTEM}-strip ;;
        *) export STRIP=strip ;;
    esac
    gettext "Executing strip on all files..."
    for dir in $fs/bin $fs/sbin $fs/usr/bin $fs/usr/sbin $fs/usr/games
    do
        if [ -d "$dir" ]; then
            find $dir -type f -exec $STRIP -s '{}' 2>/dev/null \;
        fi
    done
    find $fs -name "*.so*" -exec $STRIP -s '{}' 2>/dev/null \;
    find $fs -name "*.a" -exec $STRIP --strip-debug '{}' 2>/dev/null \;
    status

tux@slitaz:~$


3.
tux@slitaz:~$ grep strip /usr/bin/cross
        find $tools/bin -type f -exec strip -s '{}' 2>/dev/null \;
        find $tools/lib -name cc1* -exec strip -s '{}' 2>/dev/null \;
        find $tools/lib -name lto* -exec strip -s '{}' 2>/dev/null \;
        find $sysroot -name "*.so*" -exec ${TARGET}-strip -s '{}' 2>/dev/null \;
tux@slitaz:~$

2014-06-26

Slitaz -- valgrind - README_PACKAGERS


7. README_PACKAGERS
http://valgrind.org/docs/manual/dist.readme-packagers.html
-- Do not ship your Linux distro with a completely stripped /lib/ld.so. At least leave the debugging symbol names on -- line number info isn't necessary. If you don't want to leave symbols on ld.so, alternatively you can have your distro install ld.so's debuginfo package by default, or make ld.so.debuginfo be a requirement of your Valgrind RPM/DEB/whatever.

Reason for this is that Valgrind's Memcheck tool needs to intercept calls to, and provide replacements for, some symbols in ld.so at startup (most importantly strlen). If it cannot do that, Memcheck shows a large number of false positives due to the highly optimised strlen (etc) routines in ld.so. This has caused some trouble in the  past. As of version 3.3.0, on some targets (ppc32-linux, ppc64-linux), Memcheck will simply stop at startup (and print an error message) if such symbols are not present, because it is infeasible to continue.

It's not like this is going to cost you much space. We only need the symbols for ld.so (a few K at most). Not the debug info and not any debuginfo or extra symbols for any other libraries.
-- Don't strip the debug info off lib/valgrind/$platform/vgpreload*.so in the installation tree.
-- Don't strip symbols from lib/valgrind/* in the installation tree.
-- Please test the final installation works by running it on something huge.

Slitaz -- valgrind -ld.so

ship a non-stripped ld.so (or whatever the dynamic linker .so is called)
 
ld-2.14.1.so - not stripped
http://goo.gl/5XujLi

tux@slitaz:~$ ls -l /lib/ld*
-rwxr-xr-x 1 root root 682804 Jun 25 11:18 /lib/ld-2.14.1.so
-rwxr-xr-x 1 root root 134308 Jun 25 11:17 /lib/ld-2.14.1.so-orig
lrwxrwxrwx 1 root root 12 Jun 25 10:55 /lib/ld-linux.so.2 -> ld-2.14.1.so

tux@slitaz:~$ file /lib/ld-2.14.1.so
/lib/ld-2.14.1.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, not stripped

tux@slitaz:~$ valgrind --leak-check=full ./test.a
==2218== Memcheck, a memory error detector
==2218== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==2218== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==2218== Command: ./test.a
==2218==
==2218==
==2218== HEAP SUMMARY:
==2218== in use at exit: 0 bytes in 0 blocks
==2218== total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==2218==
==2218== All heap blocks were freed -- no leaks are possible
==2218==
==2218== For counts of detected and suppressed errors, rerun with: -v
==2218== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 11 from 6)

2014-06-24

Slitaz -- valgrind

valgrind:  Fatal error at startup: a function redirection
valgrind: Possible fixes: (1, short term): install glibc's debuginfo
valgrind: package on this machine. (2, longer term): ask the packagers
valgrind: for your Linux distribution to please in future ship a non-
valgrind: stripped ld.so (or whatever the dynamic linker .so is called)
valgrind: that exports the above-named function using the standard
valgrind: calling conventions for this platform.
tux@slitaz:~$ file /lib/ld-2.14.1.so
/lib/ld-2.14.1.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped
tux@slitaz:~$

tux@slitaz:~$ gcc -g -o test.a test.c
tux@slitaz:~$ valgrind --leak-check=full ./test.a
==10582== Memcheck, a memory error detector
==10582== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==10582== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==10582== Command: ./test.a
==10582==

valgrind:  Fatal error at startup: a function redirection
valgrind:  which is mandatory for this platform-tool combination
valgrind:  cannot be set up.  Details of the redirection are:
valgrind: 
valgrind:  A must-be-redirected function
valgrind:  whose name matches the pattern:      strlen
valgrind:  in an object with soname matching:   ld-linux.so.2
valgrind:  was not found whilst processing
valgrind:  symbols from the object with soname: ld-linux.so.2
valgrind: 
valgrind:  Possible fixes: (1, short term): install glibc's debuginfo
valgrind:  package on this machine.  (2, longer term): ask the packagers
valgrind:  for your Linux distribution to please in future ship a non-
valgrind:  stripped ld.so (or whatever the dynamic linker .so is called)
valgrind:  that exports the above-named function using the standard
valgrind:  calling conventions for this platform.  The package you need
valgrind:  to install for fix (1) is called
valgrind: 
valgrind:    On Debian, Ubuntu:                 libc6-dbg
valgrind:    On SuSE, openSuSE, Fedora, RHEL:   glibc-debuginfo
valgrind: 
valgrind:  Cannot continue -- exiting now.  Sorry.

2014-06-18

Slitaz on Radxa Rock


Ubuntu 14.04 and Slitaz on Radxa Rock
http://www.cnx-software.com/2014/05/18/ubuntu-14-04-and-slitaz-on-radxa-rock/

First download boot-slitaz-20140517.img (kernel + slitaz ramdisk), and slitaz-armhf-mini-2012-12-14.zip. Extract the rootfs from slitaz-armhf-mini-2012-12-14.img (ext-4 partition). then follow the 「Flashing Ubuntu to Radxa Rock」 section in my getting started guide for Radxa Rock to flash boot.img. It is simply one line:
upgrade_tool di -b /path-to/boot-slitaz-20140517.img
Simply login with root username, and root password to access the command line. It might also be possible to use a more up-to-date rootfs from http://arm.slitaz.org/rpi/, but it is only armel.
[Update: Alanyih has also been given me the build instructions for his Slitaz image:
git clone -b wip/lsk-android-14.04-radxa-rock https://github.com/linux-rockchip/kernel_rockchip.git
make radxa_rock_defconfig
make zImage rk3188-radxa-rock.dtb
cat arch/arm/boot/zImage arch/arm/boot/dts/rk3188-radxa-rock.dtb > zImage-lsk
mkbootimg --kernel zImage-lsk --ramdisk slitaz-ramdisk.gz -o boot-slitaz-20140517.img
]
Both Ubuntu 14.04 and Slitaz should be able to run on any Rockchip RK3188 device thanks to the device tree and multi-platform enabled Linux kernel, as long as you can somehow come up with the right device file for your device, which may not always be an easy task.
boot-slitaz-20140517.img (kernel + slitaz ramdisk)
http://goo.gl/Mc7L4q

2014-06-02

radxa -- Serial console debugging




Serial console debugging / putty


1.
Connect the cable
Board    TTL2USB Cable
RX    ->  Green
TX    ->  White
GND   ->  Black 


2.
root@slitaz:/home/tux# dmesg | tail
usb 2-1: new full-speed USB device number 3 using uhci_hcd
usbcore: registered new interface driver usbserial
USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
USB Serial support registered for pl2303
pl2303 2-1:1.0: pl2303 converter detected
usb 2-1: pl2303 converter now attached to ttyUSB0
usbcore: registered new interface driver pl2303
pl2303: Prolific PL2303 USB to serial adaptor driver


3.
root@slitaz:/home/tux#  cat /proc/tty/drivers
/dev/tty             /dev/tty        5         0 system:/dev/tty
/dev/console         /dev/console    5         1 system:console
/dev/ptmx            /dev/ptmx       5         2 system
/dev/vc/0            /dev/vc/0       4         0 system:vtmaster
usbserial            /dev/ttyUSB   188      0-253 serial
serial               /dev/ttyS       4         64-67 serial
pty_slave            /dev/pts      136         0-1048575 pty:slave
pty_master           /dev/ptm      128         0-1048575 pty:master
unknown              /dev/tty        4         1-63 console


4.
root@slitaz:/home/tux# ls -l /dev/ttyUSB*
crw-rw----    1 root     dialout   188,   0 May  2 21:41 /dev/ttyUSB0


5.
root@slitaz:/home/tux# grep dialout /etc/group
dialout:x:95:tux


6.
root@slitaz:/home/tux# tazpkg -gi putty


7.
DDR Version 1.04 20130517
In
DDR3
300MHz
Bus Width=32 Col=10 Bank=8 Row=15 CS=2 Die Bus-Width=16 Size=2048MB
Memory OK
OUT
BUILD=====2
SdmmcInit=0 0
FwPartOffset=0 , 0
No.1 FLASH ID:2c 64 44 4b a9 0
OK! 248205
unsigned!
SecureBootEn = 0 0
Boot ver: 2013-12-02#2.08
start_linux=====253060
 2571850 Starting kernel...@0x60408000

<hit enter to activate fiq debugger>
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.10.37-slitaz (root@slitaz) (gcc version 4.6.3 (SliTaz) ) #1 SMP PREEMPT Sun May 18 00:04:25 UTC 2014
[    0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=10c53c7d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine: RK30board, model: rockchip,rk3188

2014-06-01

radxa -- device-tree


device-tree

1.
[..]
Starting udhcpc client on: eth0...
udhcpc (v1.20.2) started
Sending discover...
Sending discover...
Sending discover...
No lease, forking to background
Processing: /etc/init.d/local.sh
Starting all daemons...
Generating Dropbear rsa key... [ Done ]
Generating Dropbear dss key... [ Done ]
Starting SSH server: Dropbear... [ Done ]

Welcome to Radxa Rock
SliTaz boot time: 6s


2.
root@slitaz:~# dmesg | grep -B 3 Machine
[ 0.000000] Linux version 3.10.37-slitaz (root@slitaz) (gcc version 4.6.3 (SliTaz) ) #1 SMP PREEMPT Fri May 16 13:57:21 UTC 2014
[ 0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=10c53c7d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine: RK30board, model: rockchip,rk3188


3.
root@slitaz:~# ls /proc/device-tree
#address-cells                 nandc
#size-cells                    pinctrl@20008000
adc@2006c000                   pmu@20004000
aliases                        pwm@20030000
amba                           pwm@20030010
ap0-vcc-domain                 pwm@20050020
ap1-vcc-domain                 pwm@20050030
backlight                      rga@10114000
bootram@10080000               rk_screen
bootrom@10120000               rksdmmc@10214000
cache-controller@10138000      rksdmmc@10218000
chosen                         rksdmmc@1021C000
cif-vcc-domain                 rockchip,sram
clocks                         rockchip-hdmi-i2s
clocks-init                    rockchip-hdmi-spdif
codec-hdmi-i2s                 rockchip-i2s@0x1011a000
codec-hdmi-spdif               rockchip-spdif@0x1011e000
compatible                     rockchip_suspend
cpu_axi_bus                    serial@10124000
cpus                           serial@10126000
dvfs                           serial@20064000
dwc-control-usb@200080ac       serial@20068000
fb                             spi@20070000
fiq-debugger                   spi@20074000
flash-vcc-domain               sram@10080020
hsic@10240000                  timer@20038000
i2c@2002d000                   timer@20038020
i2c@2002f000                   timer@20038040
i2c@20056000                   timer@20038060
i2c@2005a000                   timer@20038080
i2c@2005e000                   timer@200380a0
interrupt-controller@1013d000  twd-wdt@1013c620
interrupt-parent               usb@10180000
ion                            usb@101c0000
lcdc0-vcc-domain               vccio0-vcc-domain
lcdc1-vcc-domain               vccio1-vcc-domain
lcdc@1010c000                  vmac-phy
lcdc@1010e000                  vmac@10204000
memory                         wdt@2004c000
name                           wireless-wlan

4.
root@slitaz:~# cat /proc/device-tree/compatible
rockchip,rk3188root@slitaz:~#

root@slitaz:~# cat /proc/device-tree/chosen/bootargs
clk_ignore_unused console=ttyFIQ0,115200 console=tty0 root=/dev/mmcblk0p2 rw rootfstype=ext4 init=/sbin/init mac_addr=de:ad:de:ad:be:ef initrd=0x62000000,0x003E0000 mtdparts=rk29xxnand:0x00008000@0x00002000(boot),-@0x0000A000(linuxroot) bootver=2013-12-02#2.08 firmware_ver=4.2.2

root@slitaz:~# cat /proc/device-tree/wireless-wlan/compatible
wlan-platdataroot@slitaz:~#

Slitaz -- ghex



GHex is a simple binary editor.

root@slitaz:/tmp# hexdump -C /home/tux/putty-0517-140415.log | head 
00000000  3d 7e 3d 7e 3d 7e 3d 7e  3d 7e 3d 7e 3d 7e 3d 7e  |=~=~=~=~=~=~=~=~|
00000010  3d 7e 3d 7e 3d 7e 3d 20  50 75 54 54 59 20 6c 6f  |=~=~=~= PuTTY lo|
00000020  67 20 32 30 31 34 2e 30  35 2e 31 37 20 31 34 3a  |g 2014.05.17 14:|
00000030  30 34 3a 31 35 20 3d 7e  3d 7e 3d 7e 3d 7e 3d 7e  |04:15 =~=~=~=~=~|
00000040  3d 7e 3d 7e 3d 7e 3d 7e  3d 7e 3d 7e 3d 0d 0a 00  |=~=~=~=~=~=~=...|
00000050  44 44 52 20 56 65 72 73  69 6f 6e 20 31 2e 30 34  |DDR Version 1.04|
00000060  20 32 30 31 33 30 35 31  37 0d 0a 49 6e 0d 0a 44  | 20130517..In..D|
00000070  44 52 33 0d 0a 33 30 30  4d 48 7a 0d 0a 42 75 73  |DR3..300MHz..Bus|
00000080  20 57 69 64 74 68 3d 33  32 20 43 6f 6c 3d 31 30  | Width=32 Col=10|
00000090  20 42 61 6e 6b 3d 38 20  52 6f 77 3d 31 35 20 43  | Bank=8 Row=15 C| 

root@slitaz:/tmp# hexdump -C /home/tux/putty-0517-125735.log | head 
00000000  3d 7e 3d 7e 3d 7e 3d 7e  3d 7e 3d 7e 3d 7e 3d 7e  |=~=~=~=~=~=~=~=~|
00000010  3d 7e 3d 7e 3d 7e 3d 20  50 75 54 54 59 20 6c 6f  |=~=~=~= PuTTY lo|
00000020  67 20 32 30 31 34 2e 30  35 2e 31 37 20 31 32 3a  |g 2014.05.17 12:|
00000030  35 37 3a 33 35 20 3d 7e  3d 7e 3d 7e 3d 7e 3d 7e  |57:35 =~=~=~=~=~|
00000040  3d 7e 3d 7e 3d 7e 3d 7e  3d 7e 3d 7e 3d 0d 0a 44  |=~=~=~=~=~=~=..D|
00000050  44 52 20 56 65 72 73 69  6f 6e 20 31 2e 30 34 20  |DR Version 1.04 |
00000060  32 30 31 33 30 35 31 37  0d 0a 49 6e 0d 0a 44 44  |20130517..In..DD|
00000070  52 33 0d 0a 33 30 30 4d  48 7a 0d 0a 42 75 73 20  |R3..300MHz..Bus |
00000080  57 69 64 74 68 3d 33 32  20 43 6f 6c 3d 31 30 20  |Width=32 Col=10 |
00000090  42 61 6e 6b 3d 38 20 52  6f 77 3d 31 35 20 43 53  |Bank=8 Row=15 CS|


2014-05-29

radxa -- symlink error / unzip

unzip tarball fail on symlink error: File name too long #34

"git archive" seems to be broken wrt zip files
> IOW, the zip file looks right. I wonder if this is actually a bug in
> "unzip".

It is. This only happens if you have more then 16k entries and when one
of the 16k entry infos is reused it happend to be previously used for a
symlink entry.

Here's a patch for unzip60 for reference:
--- process.c
+++ process.c
@@ -1751,6 +1751,12 @@ int process_cdir_file_hdr(__G)    /* ret
= (G.crec.general_purpose_bit_flag & (1 << 11)) == (1 << 11); 
#endif

+#ifdef SYMLINKS     
+    /* Initialize the symlink flag, may be set by the platform-specific     
+       mapattr function.  */     
+    G.pInfo->symlink = 0;
+#endif
+
return PK_COOL;

} /* end function process_cdir_file_hdr() */

radxa -- symlink error / git clone


git clone -b topic/i2c-rk3x-clean-v4 https://github.com/xqms/linux.git

1. git clone -b topic/i2c-rk3x-clean-v4 https://github.com/xqms/linux.git
root@slitaz:/run/media/tux/data-ln/radxa/src# time git clone -b topic/i2c-rk3x-clean-v4 https://github.com/xqms/linux.git
Cloning into 'linux'...
remote: Counting objects: 3545990, done.
remote: Compressing objects: 100% (589980/589980), done.
remote: Total 3545990 (delta 2926520), reused 3545990 (delta 2926520)
Receiving objects: 100% (3545990/3545990), 982.04 MiB | 51 KiB/s, done.
Resolving deltas: 100% (2926520/2926520), done.
Checking out files: 100% (46829/46829), done.
real    45m 35.28s
user    3m 22.76s
sys    0m 27.40s


2. check files
root@slitaz:/run/media/tux/data-ln/radxa/src# ls -l linux/drivers/ata/pata_atp867x.c
-rw-r--r--    1 root     root         14638 May 27 10:43 linux/drivers/ata/pata_atp867x.c
root@slitaz:/run/media/tux/data-ln/radxa/src# ls -l linux/drivers/misc/vmw_vmci/vmci_queue_pair.c
-rw-r--r--    1 root     root         97276 May 27 10:43 linux/drivers/misc/vmw_vmci/vmci_queue_pair.c
root@slitaz:/run/media/tux/data-ln/radxa/src# ls -l linux/include/uapi/linux/pci_regs.h
-rw-r--r--    1 root     root         46587 May 27 10:44 linux/include/uapi/linux/pci_regs.h
root@slitaz:/run/media/tux/data-ln/radxa/src# ls -l linux/kernel/sched/Makefile
-rw-r--r--    1 root     root           905 May 27 10:44 linux/kernel/sched/Makefile
root@slitaz:/run/media/tux/data-ln/radxa/src# ls -l linux/security/selinux/netnode.c
-rw-r--r--    1 root     root          8424 May 27 10:44 linux/security/selinux/netnode.c
root@slitaz:/run/media/tux/data-ln/radxa/src# 


radxa -- symlink error: File name too long


symlink error: File name too long


1. Download xqms/linux as a zip file
https://github.com/xqms/linux/archive/topic/i2c-rk3x-clean-v4.zip


2. unzip i2c-rk3x-clean-v4.zip
symlink error: File name too long

/usr/src/linux-topic-i2c-rk3x-clean-v4/drivers/ata/pata_atp867x.c -> /*^J *...
/usr/src/linux-topic-i2c-rk3x-clean-v4/drivers/misc/vmw_vmci/vmci_queue_pair.c -> /*^J *...
/usr/src/linux-topic-i2c-rk3x-clean-v4/include/uapi/linux/pci_regs.h -> /*^J...
/usr/src/linux-topic-i2c-rk3x-clean-v4/kernel/sched/Makefile -> ifdef CONFIG...
/usr/src/linux-topic-i2c-rk3x-clean-v4/security/selinux/netnode.c -> /*^J *...


3. No such file or directory
root@slitaz:~# ls -l  /usr/src/linux-topic-i2c-rk3x-clean-v4/drivers/ata/pata_atp867x.c
ls: /usr/src/linux-topic-i2c-rk3x-clean-v4/drivers/ata/pata_atp867x.c: No such file or directory

root@slitaz:~# ls -l /usr/src/linux-topic-i2c-rk3x-clean-v4/drivers/misc/vmw_vmci/vmci_queue_pair.c
ls: /usr/src/linux-topic-i2c-rk3x-clean-v4/drivers/misc/vmw_vmci/vmci_queue_pair.c: No such file or directory

root@slitaz:~# ls -l  /usr/src/linux-topic-i2c-rk3x-clean-v4/include/uapi/linux/pci_regs.h
ls: /usr/src/linux-topic-i2c-rk3x-clean-v4/include/uapi/linux/pci_regs.h: No such file or directory

root@slitaz:~# ls -l /usr/src/linux-topic-i2c-rk3x-clean-v4/security/selinux/netnode.c
ls: /usr/src/linux-topic-i2c-rk3x-clean-v4/security/selinux/netnode.c: No such file or directory

root@slitaz:~# ls -l /usr/src/linux-topic-i2c-rk3x-clean-v4/kernel/sched/Makefile
lrwxrwxrwx    1 root     root           905 May 26 16:59 /usr/src/linux-topic-i2c-rk3x-clean-v4/kernel/sched/Makefile -> ifdef CONFIG_FUNCTION_TRACER?CFLAGS_REMOVE_clock.o = -pg?endif??ifneq ($(CONFIG_SCHED_OMIT_FRAME_POINTER),y)?# According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is?# needed for x86 only.  Why this used to be enabled for all architectures is beyond?# me.  I suspect most platforms don't need this, but until we know that for sure?# I turn this off for IA-64 only.  Andreas Schwab says it's also needed on m68k?# to get a correct value for the wait-channel (WCHAN in ps). --davidm?CFLAGS_core.o := $(PROFILING) -fno-omit-frame-pointer?endif??obj-y += core.o proc.o clock.o cputime.o?obj-y += idle_task.o fair.o rt.o deadline.o stop_task.o?obj-y += wait.o completion.o idle.o?obj-$(CONFIG_SMP) += cpupri.o cpudeadline.o?obj-$(CONFIG_SCHED_AUTOGROUP) += auto_group.o?obj-$(CONFIG_SCHEDSTATS) += stats.o?obj-$(CONFIG_SCHED_DEBUG) += debug.o?obj-$(CONFIG_CGROUP_CPUACCT) += cpuacct.o?

2014-05-14

Slitaz -- Radxa Rock



Welcome to Radxa Rock
SliTaz boot time: 5s

1.
root@slitaz:~# uname -a
Linux slitaz 3.10.30-slitaz #1 SMP PREEMPT Tue May 13 19:39:35 UTC 2014 armv7l GNU/Linux

2.
root@slitaz:~# dmesg | grep Machine
[ 0.000000] Machine: RK30board, model: rockchip,rk3188

3.
root@slitaz:~# date
Wed May 14 14:45:01 UTC 2014

4.
root@slitaz:~# nslookup http://www.slitaz.org
Server: 192.168.0.1
Address 1: 192.168.0.1 dir-605

Name: http://www.slitaz.org
Address 1: 46.105.127.17 ks385316.kimsufi.com
Address 2: 212.83.135.187 pangolin.slitaz-fr.org

5.
root@slitaz:~# slitaz

SliTaz GNU/Linux
================================================================================================================================================================
Release : cooking
Architecture : arm
Kernel : 3.10.30-slitaz
Boot options : clk_ignore_unused console=ttyFIQ0,115200 console=tty0 root=/dev/mmcblk0p2 rw rootfstype=ext4 init=/sbin/init mac_addr=de:ad:de:ad:be:ef initrd=0x62000000,0x003E0000 mtdparts=rk29xxnand:0x00008000@0x00002000(boot),-@0x0000A000(linuxroot) bootver=2013-12-02#2.08 firmware_ver=4.2.2
Home path : /home/slitaz
Configs : /etc/slitaz
Log files : /var/log/slitaz
Packages DB : /var/lib/tazpkg
Installed : 18 packages
Mirror : http://arm.balinor.net/slitaz/armhf/packages/
================================================================================================================================================================
Config file: /etc/slitaz/slitaz.conf



2014-05-05

radxa -- parameter

parameter


----
parameter_android_only
----
FIRMWARE_VER:4.2.2
MACHINE_MODEL:radxa_rock
MACHINE_ID:007
MANUFACTURER:RADXA
MAGIC: 0x5041524B
ATAG: 0x60000800
MACHINE: 3066
CHECK_MASK: 0x80
KERNEL_IMG: 0x60408000
#RECOVER_KEY: 1,1,0,20,0
CMDLINE:console=ttyFIQ0 console=tty0 androidboot.console=ttyFIQ0  root=/dev/block/mtd/by-name/linuxroot rw rootfstype=ext4 init=/sbin/init initrd=0x62000000,0x00800000 mtdparts=rk29xxnand:0x00002000@0x00002000(misc),0x00004000@0x00004000(kernel),0x00008000@0x00008000(boot),0x00010000@0x00010000(recovery),0x00020000@0x00020000(backup),0x00040000@0x00040000(cache),0x00200000@0x00080000(userdata),0x00002000@0x00280000(kpanic),0x00100000@0x00282000(system),-@0x00382000(user)

----
parameter_dual_nand
----
FIRMWARE_VER:4.2.2
MACHINE_MODEL:radxa_rock
MACHINE_ID:007
MANUFACTURER:RADXA
MAGIC: 0x5041524B
ATAG: 0x60000800
MACHINE: 3066
CHECK_MASK: 0x80
KERNEL_IMG: 0x60408000
#RECOVER_KEY: 1,1,0,20,0
CMDLINE:console=ttyFIQ0,115200 console=tty0 root=/dev/block/mtd/by-name/linuxroot rw mac_addr=de:ad:de:ad:be:ef rootfstype=ext4 init=/sbin/init initrd=0x62000000,0x00800000 mtdparts=rk29xxnand:0x00002000@0x00002000(misc),0x00008000@0x00004000(kernel),0x00008000@0x00008000(boot),0x00010000@0x00010000(recovery),0x00040000@0x00040000(cache),0x00200000@0x00080000(userdata),0x00002000@0x00280000(kpanic),0x00100000@0x00282000(system),0x00300000@0x00382000(linuxroot),-@0x00682000(user)

----
parameter_dual_sd
----
FIRMWARE_VER:4.2.2
MACHINE_MODEL:radxa_rock
MACHINE_ID:007
MANUFACTURER:RADXA
MAGIC: 0x5041524B
ATAG: 0x60000800
MACHINE: 3066
CHECK_MASK: 0x80
KERNEL_IMG: 0x60408000
#RECOVER_KEY: 1,1,0,20,0
CMDLINE:console=ttyFIQ0,115200 console=tty0 root=/dev/mmcblk0p1 rw mac_addr=de:ad:de:ad:be:ef rootfstype=ext4 init=/sbin/init initrd=0x62000000,0x00800000 mtdparts=rk29xxnand:0x00002000@0x00002000(misc),0x00008000@0x00004000(kernel),0x00008000@0x00008000(boot),0x00010000@0x00010000(recovery),0x00040000@0x00040000(cache),0x00200000@0x00080000(userdata),0x00002000@0x00280000(kpanic),0x00100000@0x00282000(system),0x00300000@0x00382000(linuxroot),-@0x00682000(user)


----
parameter_dual_usb
----
FIRMWARE_VER:4.2.2
MACHINE_MODEL:radxa_rock
MACHINE_ID:007
MANUFACTURER:RADXA
MAGIC: 0x5041524B
ATAG: 0x60000800
MACHINE: 3066
CHECK_MASK: 0x80
KERNEL_IMG: 0x60408000
#RECOVER_KEY: 1,1,0,20,0
CMDLINE:console=ttyFIQ0,115200 console=tty0 root=/dev/sda rw mac_addr=de:ad:de:ad:be:ef rootfstype=ext4 init=/sbin/init initrd=0x62000000,0x00800000 mtdparts=rk29xxnand:0x00002000@0x00002000(misc),0x00008000@0x00004000(kernel),0x00008000@0x00008000(boot),0x00010000@0x00010000(recovery),0x00040000@0x00040000(cache),0x00200000@0x00080000(userdata),0x00002000@0x00280000(kpanic),0x00100000@0x00282000(system),0x00300000@0x00382000(linuxroot),-@0x00682000(user)

----
parameter_linux_only
----
FIRMWARE_VER:4.2.2
MACHINE_MODEL:radxa_rock
MACHINE_ID:007
MANUFACTURER:RADXA
MAGIC: 0x5041524B
ATAG: 0x60000800
MACHINE: 3066
CHECK_MASK: 0x80
KERNEL_IMG: 0x60408000
#RECOVER_KEY: 1,1,0,20,0
CMDLINE:console=ttyFIQ0,115200 console=tty0 root=/dev/block/mtd/by-name/linuxroot rw rootfstype=ext4 init=/sbin/init mac_addr=de:ad:de:ad:be:ef initrd=0x62000000,0x00800000 mtdparts=rk29xxnand:0x00008000@0x00002000(boot),-@0x0000A000(linuxroot)


----
parameter_lsk-android-14.04
----
FIRMWARE_VER:4.4.2
MACHINE_MODEL:radxa_rock
MACHINE_ID:007
MANUFACTURER:RADXA
MAGIC: 0x5041524B
ATAG: 0x60000800
MACHINE: 3066
CHECK_MASK: 0x80
KERNEL_IMG: 0x60408000
#RECOVER_KEY: 1,1,0,20,0
CMDLINE:clk_ignore_unused console=ttyFIQ0 androidboot.console=ttyFIQ0 init=/init initrd=0x62000000,0x001A0000 mtdparts=rk29xxnand:0x00002000@0x00002000(misc),0x00006000@0x00004000(kernel),0x00006000@0x0000a000(boot),0x00010000@0x00010000(recovery),0x00020000@0x00020000(backup),0x00040000@0x00040000(cache),0x001FE000@0x00080000(userdata),0x00002000@0x0027E000(metadata),0x00002000@0x00280000(kpanic),0x00180000@0x00282000(system),-@0x00402000(user)

2014-05-04

radxa -- Msc / Loader mode

SwitchDevice: SD
Switch the Msc mode to Rockusb mode for upgrade.

1. Type "upgrade_tool" without Quotation Marks
if No found rockusb,Rescan press <R> R
or unplug OTG cable and try again

2. Msc mode
SwitchDevice: SD
Switch the Msc mode to Rockusb mode for upgrade.

When the switch is successful, need reselect the device.

3. # upgrade_tool
    List of rockusb connected
    No found rockusb,Rescan press <R>,Quit press <Q>:R
    No found rockusb,Rescan press <R>,Quit press <Q>:R
    List of rockusb connected
    DevNo=1    Vid=0x2207,Pid=0x10,LocationID=10b    Msc  <==
    Found 1 rockusb,Select input DevNo,Rescan press <R>,Quit press <Q>:1
       
    ---------------------Tool Usage ---------------------
    Help:             H
    Quit:             Q
    Version:          V
    Clear Screen:     CS
    ------------------Upgrade Command ------------------
    ChooseDevice:        CD
    SwitchDevice:        SD
    UpgradeFirmware:    UF <Firmware>
    UpgradeLoader:        UL <Loader>
    DownloadImage:        DI <-p|-b|-k|-s|-r|-m image> [parameter file]
    DownloadBoot:        DB <Loader>
    EraseFlash:        EF <Loader|firmware>
    LowerFormat:        LF
    [..]

    Rockusb>SD
    Rockusb>CD
    Rockusb>LF
    Rockusb>RD
    Rockusb>Q
       
   
4. # upgrade_tool
    List of rockusb connected
    DevNo=1    Vid=0x2207,Pid=0x310b,LocationID=105    Loader    <==
    Found 1 rockusb,Select input DevNo,Rescan press <R>,Quit press <Q>:1
       
    ---------------------Tool Usage ---------------------
    Help:             H
    Quit:             Q
    Version:          V
    Clear Screen:     CS
    ------------------Upgrade Command ------------------
    ChooseDevice:        CD
    SwitchDevice:        SD
    UpgradeFirmware:    UF <Firmware>
    UpgradeLoader:        UL <Loader>
    DownloadImage:        DI <-p|-b|-k|-s|-r|-m image> [parameter file]
    DownloadBoot:        DB <Loader>
    EraseFlash:        EF <Loader|firmware>
    LowerFormat:        LF
    ----------------Professional Command -----------------
    TestDevice:    TD
    ResetDevice:    RD
    ReadFlashID:    RID
    ReadFlashInfo:    RFI
    ReadChipInfo:    RCI
    ReadSector:    RS <beginsec> <sectorlen> [-decode] [File]
    WriteSector:    WS <beginsec> <file>
    ReadLBA:    RL <beginsec> <sectorlen> [File]
    WriteLBA:    WL <beginsec> <file>
    EraseBlock:    EB <cs> <beginblock> <blokclen> [--Force]
    -------------------------------------------------------
       
    Rockusb>uf /tmp/radxa_rock_ubuntu_desktop_140318_update.img
    Loading firmware...
    Support Type:RK31    FW Ver:1.0.00    FW Time:2014-03-18 16:22:24
    Loader ver:2.08    Loader Time:2013-12-02 18:58:57
    Upgrade firmware ok.
    Rockusb>rfi
    Flash Info:
        Manufacturer: MICRON,value=04
        Flash Size: 8192MB
        Block Size: 2048KB
        Page Size: 8KB
        ECC Bits: 40
        Access Time: 32
        Flash CS: Flash<0>
    Rockusb>rci
    Chip Info: 42 30 31 33 32 31 30 32 30 33 31 31 30 30 31 56
    Rockusb>rid
    Flash ID:2C 64 44 4B A9
    Rockusb>v
    Upgrade Tool ver 1.15
    Rockusb>q

radxa -- Msc mode


Msc mode
The  Device did not support this operation!

Bus 002 Device 005: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser
Bus 001 Device 010: ID 2207:0010 
root@slitaz:/run/media/tux/data-ln/radxa# upgrade_tool uf radxa_rock_ubuntu_desktop_140318_update.img
The  Device did not support this operation!

1.
root@slitaz:/run/media/tux/data-ln/radxa# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 0b05:1786 ASUSTek Computer, Inc. USB-N10 802.11n Network Adapter [Realtek RTL8188SU]
Bus 002 Device 005: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser
Bus 001 Device 010: ID 2207:0010 

2.
root@slitaz:/run/media/tux/data-ln/radxa# upgrade_tool
List of rockusb connected
DevNo=1    Vid=0x2207,Pid=0x10,LocationID=10a    Msc
Found 1 rockusb,Select input DevNo,Rescan press <R>,Quit press <Q>:1


3.
Store: Erase the data of the internal Flash memory for upgrade. 
Switch: Switch the Msc mode to Rockusb mode for upgrade. 
 
Please follow the below steps to upgrade firmware for the BK6007 ebook reader: 
1.  Connect the reader to computer and enter upgrade or USB mode. 
2.  Select the firmware file. 
3.  Make sure the reader is in Rockusb mode( Maskrom and Loader are both Rockusb mode.). 
4.  Click Upgrade button to upgrade the firmware 

Radxa Rock


Radxa Rock - rk3188

Specifications
Model radxa rock radxa rock lite
System
CPU ARM Cortex-A9 quad core @ 1.6Ghz
Memory 2GB DDR3 @ 800Mhz 1GB DDR3 @ 800Mhz
Storage 8GB Nand Flash, Micro-SD SDXC up to 128GB 4GB Nand Flash, Micro-SD SDXC up to 128GB
Display and Graphics
GPU Mali400-mp4@533Mhz, OpenGL ES 2.0
Digital Video HDMI 1.4 up to 1080p@60hz
Analog Video AV output
Network
LAN 10/100M Ethernet port
WIFI 150Mbps 802.11b/g/n with antenna
Bluetooth Bluetooth 4.0 None
I/O
Audio S/PDIF, headphone jack
USB HOST 2 USB 2.0 standard A type
USB OTG USB OTG micro-USB connector
Serial Serial Console for debugging
IR Support self defined IR remote
Key 1 power key, 1 recovery key, 1 reset key
Other
Led 3 programable leds
RTC Support power off alarm
Extend header 80 pins including GPIO, I2C, SPI, Line in, USB 2.0, PWM, ADC, LCD, etc

2014-05-01

slitaz-x86_64


slitaz-x86_64

root@slitaz:~# uname -a
Linux slitaz 3.2.53-slitaz #1 SMP Wed Jan 1 18:22:13 UTC 2014 x86_64 GNU/Linux

root@slitaz:~# dmesg | head -4
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 3.2.53-slitaz (root@slitaz) (gcc version 4.6.3 (SliTaz) ) #1 SMP Wed Jan 1 18:22:13 UTC 2014
[    0.000000] Command line: BOOT_IMAGE=/boot/bzImage initrd=/boot/rootfs.gz rw root=/dev/null autologin lang=en_US kmap=us

root@slitaz:~# spk info
Spk info ================================================================================
Architecture  : x86_64
Database      : /var/lib/tazpkg/installed
Cache info    : 0 /var/cache/tazpkg
Mirror URL    : http://192.168.1.42/slitaz/x86_64/packages/
Extra mirrors : 0
Installed     : 20
Mirror        : 121
================================================================================

root@slitaz:~# file /lib/libc-2.13.so
/lib/libc-2.13.so: ELF 64-bit LSB  shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, stripped

root@slitaz:~# /lib/libc.so.6
GNU C Library stable release version 2.13, by Roland McGrath et al.
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.6.3.
Compiled on a Linux 3.2.14 system on 2013-12-28.
Available extensions:
    crypt add-on version 2.1 by Michael Glad and others
    GNU Libidn by Simon Josefsson
    Native POSIX Threads Library by Ulrich Drepper et al
    BIND-8.2.3-T5B
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.

root@slitaz:~# cat /var/lib/tazpkg/installed.md5
89d7b86ca37af0c5746026fd937988fc  busybox-1.21.1-x86_64.tazpkg
15b6462db63b8210b004a828f9a50bd3  dialog-1.1-20110707-x86_64.tazpkg
4fd342a79636f9eaed67969a318f900b  dropbear-2013.60-x86_64.tazpkg
a9cde0c95f41ec586126756a7eb776ff  gcc-lib-base-4.6.3-x86_64.tazpkg
d125b9760c812f5ebbacd646f7dcb9e3  gettext-base-0.18.3-x86_64.tazpkg
9604ba1cdf90e7e4d51cbd323cd5196b  glibc-base-2.13-x86_64.tazpkg
0a93f5118332288a38daecb8ec56de1c  nano-2.2.6-x86_64.tazpkg
7bfa71e3c6c504205b00a1e0bd186866  ncurses-5.9-x86_64.tazpkg
ea531de27a5879627d60918c8547bcc1  ncurses-common-5.9-x86_64.tazpkg
4c2262ad1c2967f22fae48c676632881  ncursesw-5.9-x86_64.tazpkg
6a55e8bb0aa9c0c697bf04ecf4105ef5  retawq-0.2.6c-x86_64.tazpkg
d8581b25420a0354bd2ed5f08af162ef  slitaz-base-files-5.4.2-x86_64.tazpkg
e9ccbca78b4263d28ef1f16007c5a830  slitaz-boot-scripts-5.3.3-x86_64.tazpkg
864ba88bf6bff85a08b0f43ae0fca7cb  tazpkg-5.1-x86_64.tazpkg
838a2813c19c2d5e85953cf170f98884  ytree-1.97-x86_64.tazpkg
f1e53b247bb72fcdfd225c89f93a7e71  zlib-1.2.8-x86_64.tazpkg
9afd31e45388e5b36364458d53a682e3  util-linux-uuid-2.21.1-x86_64.tazpkg
2e2cd1a2e890b840e5cbc637e7ddd5a3  util-linux-blkid-2.21.1-x86_64.tazpkg
42a187ac1a9d649cb7e0521396ee9696  libmagic-5.14-x86_64.tazpkg
0cb1f6e932344f44249e3c12f2fb6a89  file-5.14-x86_64.tazpkg
root@slitaz:~#

Slitaz -- radxa-mali

GPU Mali400-mp4@533Mhz, OpenGL ES 2.0

1.
rock@slitaz:~$ lsmod
Module                      Size  Used by
mali_drm                    5196  1
drm                       142897  2 mali_drm
mali                      127376  0
ump                        27356  3 mali
8723au                    849716  0
rk30xxnand_ko             161856  0

2.
rock@slitaz:~$ modinfo mali
filename:           /lib/modules/3.0.36+/kernel/misc/mali.ko
version:            r3p2-01rel2
author:             ARM Ltd.
license:            GPL
srcversion:         2DCA5E55A6EDAA8348F84D8
depends:            ump
vermagic:           3.0.36+ SMP preempt mod_unload ARMv7
parm:               mali_debug_level:Higher number, more dmesg output (int)
parm:               mali_max_job_runtime:Maximum allowed job runtime in msecs.
Jobs will be killed after this no matter what (int)
parm:               mali_l2_max_reads:Maximum reads for Mali L2 cache (int)
parm:               mali_dedicated_mem_start:Physical start address of dedicated Mali GPU memory. (uint)
parm:               mali_dedicated_mem_size:Size of dedicated Mali GPU memory. (uint)
parm:               mali_shared_mem_size:Size of shared Mali GPU memory. (uint)
parm:               mali_boot_profiling:Start profiling as a part of Mali driver initialization (int)
parm:               mali_max_pp_cores_group_1:Limit the number of PP cores to use from first PP group. (int)
parm:               mali_max_pp_cores_group_2:Limit the number of PP cores to use from second PP group (Mali-450 only). (int)

3.
rock@slitaz:~$ es2gears
EGL_VERSION = 1.4 Linux-r3p2-01rel2
vertex shader info:
fragment shader info:
info:
1569 frames in 5.0 seconds = 313.800 FPS
1596 frames in 5.0 seconds = 319.072 FPS
1551 frames in 5.0 seconds = 310.200 FPS
1508 frames in 5.0 seconds = 301.419 FPS


4.
rock@slitaz:~$ glmark2-es2
=======================================================
        glmark2 2012.08
=======================================================
        OpenGL Information
        GL_VENDOR:         ARM
        GL_RENDERER:   Mali-400 MP
        GL_VERSION:        OpenGL ES 2.0
=======================================================
[build] use-vbo=false: FPS: 93 FrameTime: 10.753 ms
[build] use-vbo=true: FPS: 102 FrameTime: 9.804 ms
[texture] texture-filter=nearest: FPS: 108 FrameTime: 9.259 ms
[texture] texture-filter=linear: FPS: 102 FrameTime: 9.804 ms
[texture] texture-filter=mipmap: FPS: 102 FrameTime: 9.804 ms
[shading] shading=gouraud: FPS: 88 FrameTime: 11.364 ms
[shading] shading=blinn-phong-inf: FPS: 88 FrameTime: 11.364 ms
[shading] shading=phong: FPS: 65 FrameTime: 15.385 ms
[bump] bump-render=high-poly: FPS: 55 FrameTime: 18.182 ms
[bump] bump-render=normals: FPS: 109 FrameTime: 9.174 ms
[bump] bump-render=height: FPS: 101 FrameTime: 9.901 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 57 FrameTime: 17.544 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 32 FrameTime: 31.250 ms
[pulsar] light=false:quads=5:texture=false: FPS: 123 FrameTime: 8.130 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 42 FrameTime: 23.810 ms
[desktop] effect=shadow:windows=4: FPS: 82 FrameTime: 12.195 ms
Error: Requested MapBuffer VBO update method but GL_OES_mapbuffer is not supported!
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: Unsupported
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 37 FrameTime: 27.027 ms
Error: Requested MapBuffer VBO update method but GL_OES_mapbuffer is not supported!
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: Unsupported
[ideas] speed=duration: FPS: 74 FrameTime: 13.514 ms
[jellyfish] <default>: FPS: 61 FrameTime: 16.393 ms
Error: SceneTerrain requires Vertex Texture Fetch support, but GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS is 0
[terrain] <default>: Unsupported
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 114 FrameTime: 8.772 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 72 FrameTime: 13.889 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 107 FrameTime: 9.346 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 85 FrameTime: 11.765 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 58 FrameTime: 17.241 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 81 FrameTime: 12.346 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 84 FrameTime: 11.905 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 91 FrameTime: 10.989 ms
=======================================================
                                      glmark2 Score: 81
=======================================================
rock@slitaz:~$


5.
rock@slitaz:~$ es2_info
EGL_VERSION = 1.4 Linux-r3p2-01rel2
EGL_VENDOR = ARM
EGL_EXTENSIONS = EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_reusable_sync EGL_KHR_fence_sync EGL_KHR_lock_surface EGL_KHR_lock_surface2 EGL_EXT_create_context_robustness
EGL_CLIENT_APIS = OpenGL_ES
GL_VERSION: OpenGL ES 2.0
GL_RENDERER: Mali-400 MP

Slitaz -- radxa


Radxa Rock

    SOC Rockchip RK3188
    CPU ARM Cortex-A9 quad core @ 1.6Ghz

1.
rock@slitaz:~$ uname -a
Linux slitaz 3.0.36+ #1 SMP PREEMPT Thu Apr 3 20:41:51 UTC 2014 armv7l armv7l armv7l GNU/Linux

2.
rock@slitaz:~$ dmesg | head -5
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 3.0.36+ (root@slitaz) (gcc version 4.6.3 (SliTaz) ) #1 SMP PREEMPT Thu Apr 3 20:41:51 UTC 2014
[    0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=10c5387d
[    0.000000] CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine: RK30board

3.
rock@slitaz:~$ lscpu
Architecture:          armv7l
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             4

4.
rock@radxa:~$ free -m
             total       used       free     shared    buffers     cached
Mem:          1852        160       1692          0         10         59
-/+ buffers/cache:         89       1763
Swap:            0          0          0

5.
rock@radxa:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/mtdblock1  7.4G  1.8G  5.3G  25% /
udev            924M   68K  924M   1% /dev
none            4.0K     0  4.0K   0% /sys/fs/cgroup
none            186M  212K  186M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            927M     0  927M   0% /run/shm
none            100M   12K  100M   1% /run/user
rock@radxa:~$