2013-03-20

Slitaz armhf -- Floating-Point Exceptions

IEEE 754 - This standard defines five types of floating-point exception that must be signaled when detected:
  • Invalid operation
  • Division by zero
  • Overflow
  • Underflow
  • Inexact calculation
When one of these exceptions occurs in a user process, it is signaled either by setting a flag or taking a trap. By default, the system sets a status flag in the Floating-Point Status and Control registers (FPSCR), indicating the exception has occurred. Once the status flags are set by an exception, they are cleared only when the process clears them explicitly or when the process ends. The operating system provides subroutines to query, set, or clear these flags.

The system can also cause the floating-point exception signal (SIGFPE) to be raised if a floating-point exception occurs. Because this is not the default behavior, the operating system provides subroutines to change the state of the process so the signal is enabled. When a floating-point exception raises the SIGFPE signal, the process terminates and produces a core file if no signal-handler subroutine is present in the process. Otherwise, the process calls the signal-handler subroutine.

Slitaz armhf -- rootfs

root=/dev/mmcblk0p2 rootfstype=ext4

README.1st
[..]
RPi_Easy_SD_Card_Setup
===============================
Manually resizing the SD card partitions (Optional)
http://elinux.org/RPi_Easy_SD_Card_Setup


1. /dev/mmcblk0 : raspiberry pi running..
root@slitaz:~# fdisk -l
Disk /dev/mmcblk0: 16.0 GB, 16005464064 bytes
255 heads, 63 sectors/track, 1945 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/mmcblk0p1 1 3 24066 6 FAT16
/dev/mmcblk0p2 4 122 955867+ 83 Linux
/dev/mmcblk0p3 384 1946 12553216 83 Linux

root@slitaz:~# parted -l
Model: SD SD16G (sd/mmc)
Disk /dev/mmcblk0: 16.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 32.3kB 24.7MB 24.6MB primary fat16
2 24.7MB 1003MB 979MB primary ext4
3 3151MB 16.0GB 12.9GB primary


2. rootfstype=ext4
root@slitaz:~# dmesg | grep mmcblk
[ 0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1680 bcm2708_fb.fbheight=1050 bcm2708.boardrev=0x2 bcm2708.serial=0x7b32f4ce smsc95xx.macaddr=B8:27:EB:32:F4:CE sdhci-bcm2708.emmc_clock_freq=100000000 vc_mem.mem_base=0xc000000 vc_mem.mem_size=0x10000000 dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait devtmpfs.mount=0
[ 1.492961] Waiting for root device /dev/mmcblk0p2...
[ 1.532386] mmcblk0: mmc0:0007 SD16G 14.9 GiB
[ 1.545521] mmcblk0: p1 p2 p3
[ 2.367369] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 4.105091] EXT4-fs (mmcblk0p2): re-mounted. Opts: user_xattr,acl,barrier=1,data=ordered
[ 4.253133] EXT4-fs (mmcblk0p2): re-mounted. Opts: user_xattr,acl,barrier=1,data=ordered


3. kernel command line setting
root@slitaz:~# cat /boot/cmdline.txt
dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait devtmpfs.mount=0


4. gparted : slitaz-4.0/cooking (x86)
Applications --> System Tools --> Gparted Partition Editor
/dev/sdXX
.

2013-03-17

Slitaz -- tazpkg rdepends

tazpkg rdepends: syntax error

-    for (i = 1, n = split(deps[pkg], mydeps, " "); i <= n; i++) {
+    for (i = 1; i <= split(deps[pkg], mydeps, " "); i++) {


Env: slitaz-4.0-firefox hd install.
tux@slitaz:~$ uname -a
Linux slitaz 2.6.37-slitaz #2 SMP Wed Mar 7 10:36:39 CET 2012 i686 GNU/Linux


1.
tux@slitaz:~$ tazpkg rdepends binutils
awk: cmd. line:7:     for (i = 1, n = split(deps[pkg], mydeps, " "); i <= n; i++) {
awk: cmd. line:7:               ^ syntax error
awk: cmd. line:7:     for (i = 1, n = split(deps[pkg], mydeps, " "); i <= n; i++) {
awk: cmd. line:7:                                                               ^ syntax error


2.
tux@slitaz:~$ tazpkg list | grep awk
gawk                    3.1.8             development


3.
tazpkg: gawk do not like rdepend (thanks tkoun)
http://hg.slitaz.org/tazpkg/rev/889e293abdc7
tazpkg changeset 623:889e293abdc7
tazpkg: gawk do not like rdepend (thanks tkoun)
author     Pascal Bellard <pascal.bellard@slitaz.org>
date     Fri Jan 18 14:56:42 2013 +0100 (8 weeks ago ago)
parents     bf40947983cf
children     38be19551677
files     tazpkg
line diff

     1.1 --- a/tazpkg    Mon Jan 07 17:12:03 2013 +0000
     1.2 +++ b/tazpkg    Fri Jan 18 14:56:42 2013 +0100
     1.3 @@ -1008,7 +1008,7 @@
     1.4      DEPENDS=""
     1.5      . $i/receipt
     1.6      echo "$i $(echo $DEPENDS)"
     1.7 -done | awk -v search=$SEARCH '
     1.8 +done | busybox awk -v search=$SEARCH '
     1.9  function show_deps(deps, all_deps, pkg, space)
    1.10  {
    1.11      if (all_deps[pkg] == 1) return


4.
Env:slitaz-4.0-firefox tazpkg-4.9.2
--- tazpkg-orig
+++ tazpkg
@@ -1028,7 +1028,7 @@
     if (all_deps[pkg] == 1) return
     all_deps[pkg] = 1
     if (space != "") printf "%s %s\n",space,pkg
-    for (i = 1, n = split(deps[pkg], mydeps, " "); i <= n; i++) {
+    for (i = 1; i <= split(deps[pkg], mydeps, " "); i++) {
         show_deps(deps, all_deps, mydeps[i],"==" space)
     }
 }

.

2013-03-15

Slitaz armhf -- vcgencmd


vcgencmd

Currently C header files and libraries for many of the Broadcom APIs are located in /opt/vc/include and /opt/vc/lib respectively, or available from GitHub within the same directory structure.

1.
tux@slitaz:~$ vcgencmd version
Oct 25 2012 16:37:21
Copyright (c) 2012 Broadcom
version 346337 (release)


2.
tux@slitaz:~$ vcgencmd measure_temp
temp=48.2'C

tux@slitaz:~$ cat /sys/class/thermal/thermal_zone0/temp
47615


3.
tux@slitaz:~$ dmesg | grep vchiq
[ 0.821732] vcos: [1]: vchiq_init_state: slot_zero = 0xffd80000, is_master = 0
[ 0.822159] vcos: [1]: vchiq_init_state: called
[ 0.823157] vcos: [1]: vchiq: initialised - version 2 (min 2), device 251.0

tux@slitaz:~$ ls -l /dev/vchiq
crw-rw---T 1 root video 251, 0 Dec 23 12:00 /dev/vchiq


4.
tux@slitaz:~$ ls /opt/vc/*bin
/opt/vc/bin:
edidparser tvservice vcdbg vcgencmd vchiq_test

/opt/vc/sbin:
install_vmcs vcfiled
tux@slitaz:~$


5.
tux@slitaz:~$ \
> for src in arm core h264 isp v3d uart pwm emmc pixel vec hdmi dpi ; do \
> echo -e "$src:\t$(vcgencmd measure_clock $src)" ; \
> done
arm: frequency(45)=700000000
core: frequency(1)=250000000
h264: frequency(28)=0
isp: frequency(42)=0
v3d: frequency(43)=0
uart: frequency(22)=3000000
pwm: frequency(25)=0
emmc: frequency(47)=100000000
pixel: frequency(29)=119000000
vec: frequency(10)=0
hdmi: frequency(9)=163683000
dpi: frequency(4)=0


6.
tux@slitaz:~$ \
> for id in core sdram_c sdram_i sdram_p ; do \
> echo -e "$id:\t$(vcgencmd measure_volts $id)" ; \
> done
core: volt=1.20V
sdram_c: volt=1.20V
sdram_i: volt=1.20V
sdram_p: volt=1.23V


7.
tux@slitaz:~$ \
> for codec in H264 MPG2 WVC1 ; do \
> echo -e "$codec:\t$(vcgencmd codec_enabled $codec)" ; \
> done
H264: H264=enabled
MPG2: MPG2=disabled
WVC1: WVC1=disabled
tux@slitaz:~$

Slitaz armhf -- VideoCore IV GPU




Broadcom VideoCore IV GPU

2.
tux@slitaz:~$ sudo vcgencmd version
Oct 25 2012 16:37:21
Copyright (c) 2012 Broadcom
version 346337 (release)


README.1st

Changelog

2012-12-14
- update kernel-3.2.27
- update firmware-2012-10-25 17c8799375
- adding support for the 512MB Model B

tree:17c8799375
https://github.com/raspberrypi/firmware/tree/17c8799375415f33681becc15a96458c75308773


RPi VideoCore APIs

The Raspberry Pi contains a Broadcom VideoCore IV GPU providing OpenGL ES 1.1, OpenGL ES 2.0, hardware-accelerated OpenVG 1.1, Open EGL, OpenMAX and 1080p30 H.264 high-profile decode.
[..]
Currently C header files and libraries for many of the Broadcom APIs are located in /opt/vc/include and /opt/vc/lib respectively, or available from GitHub within the same directory structure.


https://github.com/raspberrypi/firmware

This repository contains pre-compiled binaries of the current Raspberry Pi kernel and modules, userspace libraries, and bootloader/GPU firmware.
[..]
* ./opt/vc: includes userspace libraries for the VideCoreIV (EGL/GLES/OpenVG etc).

2013-03-11

Android-x86 JDQ39


Android-x86-about

Nexus7-about


The test build 20130228 is based on the latest Android 4.2.2 release (JB-MR1.1 branch).

1.
Source code tags and builds
Build     Tag     Notes
JDQ39     android-4.2.2_r1     latest Jelly Bean version, Galaxy Nexus, Nexus 7, Nexus 4, Nexus 10
http://source.android.com/source/build-numbers.html

2.
Factory Images "nakasig" for Nexus 7 (GSM/HSPA+)
Version     Download     MD5 Checksum     SHA-1 Checksum
4.2.2 (JDQ39)     Link     ee8db1ed6ff1c007fe12136d4bc65cd8     0798439d363beb145d9223a42ed9edf3de1a30f4
https://dl.google.com/dl/android/aosp/nakasig-jdq39-factory-0798439d.tgz
.

Android-x86 -2

debug mode


1.
# uname -a
Linux localhost 3.8.0-android-x86+ #1 SMP PREEMPT Thu Feb 28 01:43:45 CST 2013 i686 GNU/Linux

2.
# dmesg | head -11
<6>[    0.000000] Initializing cgroup subsys cpu
<5>[    0.000000] Linux version 3.8.0-android-x86+ (cwhuang@fw.cwhuang.info) (gcc version 4.7.2 20120921 (Red Hat 4.7.2-2) (GCC) ) #1 SMP PREEMPT Thu Feb 28 01:43:45 CST 2013
<6>[    0.000000] KERNEL supported cpus:
<6>[    0.000000]   Intel GenuineIntel
<6>[    0.000000]   AMD AuthenticAMD
<6>[    0.000000]   NSC Geode by NSC
<6>[    0.000000]   Cyrix CyrixInstead
<6>[    0.000000]   Centaur CentaurHauls
<6>[    0.000000]   Transmeta GenuineTMx86
<6>[    0.000000]   Transmeta TransmetaCPU
<6>[    0.000000]   UMC UMC UMC UMC

3.
# free
             total         used         free       shared      buffers
Mem:       1031488       395000       636448            0         6232
-/+ buffers:             388768       642720
Swap:            0            0            0

4.
# cat /proc/cmdline
quiet root=/dev/ram0 androidboot.hardware=android_x86 video=-16 SRC=/android-4.2-test

5.
# cat /proc/cpuinfo
processor    : 0
vendor_id    : GenuineIntel
cpu family    : 6
model        : 23
model name    : Pentium(R) Dual-Core  CPU      E6300  @ 2.80GHz
stepping    : 10
cpu MHz        : 2780.036
cache size    : 6144 KB
fdiv_bug    : no
hlt_bug        : no
f00f_bug    : no
coma_bug    : no
fpu        : yes
fpu_exception    : yes
cpuid level    : 5
wp        : yes
flags        : fpu vme de pse tsc msr mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 constant_tsc pni monitor ssse3
bogomips    : 5560.07
clflush size    : 64
cache_alignment    : 64
address sizes    : 36 bits physical, 48 bits virtual
power management:

Android-x86 4.2.2





android-x86-4.2-20130228.iso   197 MB

Key Features
http://www.android-x86.org/releases/build-20130228
The test build 20130228 is based on the latest Android 4.2.2 release (JB-MR1.1 branch). We have fixed and added x86 specified code to let the system runs smoothly on most x86 platforms, especially for tablets and netbooks. The key features in this release are

  •     Use the latest kernel 3.8.0 to support more drivers.
  •     OpenGL ES hardware acceleration for AMD Radeon and Intel chipsets (not included chips with PVR). You may disable it by adding HWACCEL=0 to the cmdline if you have trouble to use it.
  •     Support Multi-touch, Wifi, Audio, G-sensor, Camera and Backlight control.
  •     Simulate SDCard by internal storage.
  •     Auto mount usb driver and sdcard on plugging.
  •     Multi-user support (max 8).
  •     Support Ethernet (DHCP only).
  •     Support VM like Virtual Box.

2013-03-08

Slitaz -- TeamViewer/get-teamviewer -2




/etc/init.d/teamviewerd: No such file or directory

http://hg.slitaz.org/wok/file/7ae80fa5a40a/get-teamviewer/stuff/get-teamviewer
http://hg.slitaz.org/wok/diff/7ae80fa5a40a/get-teamviewer/stuff/get-teamviewer


1.
tux@slitaz:~$ sudo teamviewer --daemon start

/etc/init.d/teamviewerd start
/opt/teamviewer8/tv_bin/script/tvw_daemon: line 185: /etc/init.d/teamviewerd: No such file or directory
fail


2.
tux@slitaz:~$ ls -l /etc/init.d/team*
ls: /etc/init.d/team*: No such file or directory

tux@slitaz:~$ grep teamviewerd /var/lib/tazpkg/installed/teamviewer/files.list
/opt/teamviewer8/tv_bin/script/teamviewerd.service
/opt/teamviewer8/tv_bin/script/teamviewerdMint.conf
/opt/teamviewer8/tv_bin/script/teamviewerd.sysv
/opt/teamviewer8/tv_bin/script/teamviewerd.conf
/opt/teamviewer8/tv_bin/teamviewerd


3.
tux@slitaz:~$ sudo /opt/teamviewer8/tv_bin/script/teamviewerd.sysv start
Starting teamviewerd...

tux@slitaz:~$ netstat -tp
netstat: showing only processes with your user ID
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   
tcp        0      0 192.168.0.100:37282     server15002.teamviewer.com:5938 ESTABLISHED -
tcp        0      0 192.168.0.100:60123     server1600.teamviewer.com:5938 TIME_WAIT   -
netstat: /proc/net/tcp6: No such file or directory

tux@slitaz:~$ ps ax | tail -6
 3117 ?        Sl     0:00 /opt/teamviewer8/tv_bin/teamviewerd -d
 3133 ?        Sl     0:00 c:\TeamViewer\TeamViewer.exe
 3156 ?        Ss     0:00 /opt/teamviewer8/tv_bin/wine/bin/wineserver
 3162 ?        Sl     0:00 C:\windows\system32\services.exe
 3180 pts/2    R+     0:00 ps ax
 3181 pts/2    S+     0:00 tail -6


4.
Applications -> Internet -> TeamViewe 8

tux@slitaz:~$ netstat -tp
netstat: showing only processes with your user ID
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   
tcp        0      0 192.168.0.100:37282     server15002.teamviewer.com:5938 ESTABLISHED -
tcp        0      0 localhost:38060         localhost:60014         ESTABLISHED 3133/c:\TeamViewer\
tcp        0      0 localhost:49201         localhost:5939          ESTABLISHED 3133/c:\TeamViewer\
tcp        0      0 localhost:60014         localhost:38060         ESTABLISHED 3133/c:\TeamViewer\
tcp        0      0 localhost:5939          localhost:49201         ESTABLISHED -
netstat: /proc/net/tcp6: No such file or directory
tux@slitaz:~$


5.
http://hg.slitaz.org/wok/raw-rev/7ae80fa5a40a

diff -r 990f8bfa7b6d -r 7ae80fa5a40a get-teamviewer/stuff/get-teamviewer
--- a/get-teamviewer/stuff/get-teamviewer    Fri Mar 08 09:22:27 2013 +0100
+++ b/get-teamviewer/stuff/get-teamviewer    Fri Mar 08 11:32:57 2013 +0100
@@ -48,11 +48,12 @@
 mv $PACKAGE $PACKAGE-$VERSION

 cd $PACKAGE-$VERSION/fs
-ln -s $(cd usr/bin ; ls $PACKAGE*) usr/bin/$PACKAGE
+ln -s $(cd usr/bin ; ls $PACKAGE*) usr/bin/$PACKAGE 2> /dev/null || true
 mkdir -p usr/share/applications
 sed "s|EXEC|/usr/bin/$PACKAGE|g;s!ICON!/$(find opt | grep $PACKAGE.png)!g" \
-    < $(find opt | grep desktop.template) \
+    < $(find opt | grep -E '(desktop.template|\.desktop$)') \
     > usr/share/applications/$PACKAGE.desktop
+sed -i 's/readlink -e/readlink $0 || echo /' $(find opt | grep /$PACKAGE$)
 cd ../..

 cat > $PACKAGE-$VERSION/receipt <<EOT

2013-03-01

Slitaz -- udev

<30>udevd[706]: renamed network interface eth0 to eth1

ifconfig: SIOCGIFFLAGS: No such device
Starting udhcpc client on: eth1...
udhcpc: SIOCGIFINDEX: No such device


1.
tux@slitaz:~$ grep -e ifconfig -e udhcpc /var/log/boot.log
ifconfig: SIOCGIFFLAGS: No such device
Starting udhcpc client on: eth1...
udhcpc: SIOCGIFINDEX: No such device
tux@slitaz:~$

2.
tux@slitaz:~$ dmesg | grep eth
tg3 0000:02:00.0: eth0: Tigon3 [partno(BCM95784m) rev 5784100] (PCI Express) MAC address 00:21:85:xx:xx:7b
tg3 0000:02:00.0: eth0: attached PHY is 5784 (10/100/1000Base-T Ethernet) (WireSpeed[1])
tg3 0000:02:00.0: eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] TSOcap[1]
tg3 0000:02:00.0: eth0: dma_rwctrl[76180000] dma_mask[64-bit]
<30>udevd[706]: renamed network interface eth0 to eth1

3.
tux@slitaz:~$ ps ax | grep udevd
  643 ?        Ss     0:00 /sbin/udevd --daemon
 1089 ?        S      0:00 /sbin/udevd --daemon
 1090 ?        S      0:00 /sbin/udevd --daemon
 1495 pts/1    S+     0:00 grep udevd
tux@slitaz:~$

4.
tux@slitaz:~$ ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 00:21:85:xx:xx:7B 
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:17
tux@slitaz:~$

5.
tux@slitaz:~$ cat /etc/udev/rules.d/70-persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x14e4:0x1698 (tg3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:21:85:xx:xx:91", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x14e4:0x1698 (tg3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:21:85:xx:xx:7b", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# USB device 0x0b05:0x1786 (usb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="c8:60:00:xx:xx:22", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

# PCI device 0x11ab:0x4380 (sky2)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:30:1b:xx:xx:fe", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"