« September 2010 »
S M T W T F S
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    

This is hot

Upgrade VIA Epia-Board to current 2.6.28.7
774 times viewed
23.02.2009 18:41
t3blog Update to version 0.8.1 (Security, Bugfixes)
174 times viewed
03.02.2010 14:33
LaTeX Font Selection
100 times viewed
29.01.2010 17:17
linux.bigga.de now with RSS Feed
99 times viewed
25.11.2009 09:36

[blog...]

Currently the posts are filtered by: embedded
Reset this filter to see all posts.

29.10.2009
19:43

Replace Bash Indirect Variable Expansion Feature

replace bash syntax with POSIX conform equivalent

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 ;-)

 

10.06.2009
20:57

Enable Traffic Shaping on Fritz!Box 7170

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.

  1. checkout freetz-stable-1.0 from SVN (freetz-stable-1.1 didn't work with my box - it rebootet every 10 seconds)
  2. do a config and build (make menuconfig; make) and install the image in images/
  3. add the modules sch_cbq,ko and cli_u32.ko to kernel/Config.in
  4. apply my patch add-iproute2-freetz-1.0.patch
  5. make menuconfig; make and install the new image

This is a very rough howto. Don't hesitate to ask you questions as comment.

25.05.2009
19:36

Using xorg geode driver on Jetway J8F9

The Jetway J8F9 working in a box at weltcafe-dresden.de in Dresden, Germany
The Jetway J8F9 working in a box as public internet access in Weltcafe Dresden, Germany

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:

 

  • add the Option "MigrationHeuristic" "greedy" to the Device section of your xorg.conf. This disables parts of the accelleration.
  • use a different theme in Gnome. MurrinaStormCloud (the default) is quite slow. Human doesn't work either. I use Xfce-b5 at the moment. But there remains still some strange effects but this is not so important
22.05.2009
13:05

Updating Xubuntu on Jetway J8F9 Nano-ITX Board

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

 

 

06.05.2009
18:19

xxsvideo new release 0.8.4 will be released tomorrow

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.

[ 03.08.2010 ]