Currently the posts are filtered by: embedded
Reset this filter to see all posts.
Debian and Ubuntu changed the default shell /bin/sh from bash (Bourne Again Shell) to dash (Debian Almquist Shell).
The advantage of dash is its size, speed and POSIX compliance. The disadvantage is that many scripts written for bash won't work anymore because bash has specific features - so called "bashisms".
Â
One of this bashisms, I used frequently in the xxsvideo build system is the " indirect variable expansion". Which makes it possible to execute the following script:
#!/bin/bash                                                                                                                                      Â
                                                                                                                                                 Â
CONFIG_BUSYBOX=y
PACKAGENAME="BUSYBOX"
PACKAGECONFIG=CONFIG\_$PACKAGENAME
if [ "${!PACKAGECONFIG}" = "y" ]; then
       echo $PACKAGENAME "is selected"
else
       echo $PACKAGENAME "is NOT selected"
fi
If you call this script with bash you receive as expected "BUSYBOX is selected".
With dash you see:
./test.sh: 13: Bad substitution
I was looking a long time for the right way to replace this {!VAR} statement. But it's quite simple and suddenly I found a thread describing it:
#!/bin/dash
CONFIG_BUSYBOX=y
PACKAGENAME="BUSYBOX"
PACKAGECONFIG=CONFIG\_$PACKAGENAME
if [ "$(eval echo '$'$PACKAGECONFIG)" = "y" ]; then
   echo $PACKAGENAME "is selected"
else
   echo $PACKAGENAME "is NOT selected"
fi
Â
In short: With dash you write:
eval echo '$'$VARIABLE
which is equivalent to bash
echo ${!VARIABLE}
Â
... I think ;-)
Â
I'm using a Fritz!Box Fon WLAN 7170 as Hotspot in my caf'e. The DSL speed is 6000kBit/s and I only want people use 1MBit/s maximum. The Fritz!Box offers traffic shaping only to prioritize VOIP over common traffic.
Â
If you have linux box, you may use the tc command to do the following traffic shaping using class based queues (cbq):
Â
Â
#!/bin/sh
DEV=eth0
DEV=tiwlan0
TC=tc
RATE=768kbit
# erase all old
$TC qdisc del dev $DEV root
# set new
modprobe cls_u32
$TC qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 10mbit
$TC class add dev $DEV parent 1: classid 1:1 cbq rate $RATE \
allot 1500 prio 5 bounded isolated
$TC filter add dev $DEV parent 1: protocol ip prio 16 u32 \
match ip dst 0.0.0.0/0 flowid 1:1
Ok, this is a very hard limit of 768kBits/s for the whole WLAN-interface of the Fritz!Box. Of course you may add lter rules for specific hosts, ports, netmasks or whatever. See the lartc-guide for details.
Â
So far theory. But how to get this stuff working on the Fritz!Box? I found the Freetz-project which modifies the original firmware. You may add kernel modules, some applications and a new webinterface.
This is a very rough howto. Don't hesitate to ask you questions as comment.

After the Xubuntu upgrade to 8.10, I wanted to use the geode xorg driver to launch the xserver. But this didn't worked as in 8.04. Before spending too much time to find a working solution, I decided to upgrade to Xubuntu 9.04 using the xorg-1.6 server and xorg-geode-2.11.1 driver.
Again with 9.04 the fbdev driver worked fine but the geode driver startet with 800x600 instead of WXGA (1440x900). I tried a lot to force the driver to use another resolution. But no success. Then I added the Option "NoPanel" "true" and ... it worked! But like Martin-Eric wrote on the xorg-driver-geode mailinglist, it's prefered to not add any options to the xorg.conf. And indeed: in my BIOS there is a menu to choose CRT and/or Panel. After setting it to CRT, it works with the default xorg.conf! Great!
Being happy to use the geode driver another problem occurred: The active button of dialog boxes and some tabs in programs had black boxes as background. Not very useful with black text on it. There seems to be a bug but unfortunately nobody has time to fix it :-(
There are two workarounds:
For half a year, I have a Jetway Nano-ITX Board (J8F9) running with Xubuntu 8.04 on a CF-card. This Board is very slow with an AMD Geode but 100% silent and consumes only about 3 Watt. It's the perfect internet client for my cafe.
Â
One problem was the right setting for the display (quite cheap monitor with 1440x900 pixels). Before updating to 8.10 I had to edit the /etc/X11/xorg.conf manually and set:
Â
Section "Device"
Identifier "Configured Video Device"
#Option "UseFBDev" "true"
Driver "fbdev"
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
DefaultDepth 24
SubSection "Display"
# Virtual 1440 900
Modes "1440x900" "1280x1024" "1024x768"
EndSubSection
EndSection
Â
The Xorg-Version is:
Â
X.Org X Server 1.4.0.90
Release Date: 5 September 2007
X Protocol Version 11, Revision 0
Build Operating System: Linux Ubuntu (xorg-server 2:1.4.1~git20080131-1ubuntu9.
Current Operating System: Linux cafepc 2.6.24-19-generic #1 SMP Wed Aug 20 22:5
Build Date: 13 June 2008 01:08:21AM
Â
Â
After 5 minutes download and about 6 hours (!) packages replacements, the system was ready to reboot. But... it ends up in a kernel panic! And before booting, the install-tool deinstalled the old kernel. Very stupid.
Â
So I removed the CF-card and modified the boot/grub/menu.lst. Xubunto forgot to add the initrd-line below the kernel:
Â
initrd /boot/initrd.img-2.6.27-14-generic
Â
Â
On Sourceforge.net I'm still one of the maintainer of the xxsvideo linux build system. This buildsystem was started in 2007 by the small German company mycable GmbH for it's embedded development boards.
Tomorrow, I will release version 0.8.4 after 10 months of development. Ok, I didn't work 10 months every day on it. So it's more or less a bugfix release which is necessary because many packages were updated in the meantime or download server address changed.