# bootstrap a lenny installation on the host PC debootstrap --verbose --arch armel --foreign lenny lenny-armel http://ftp.fr.debian.org/debian # boot the FR, then lets say that the lenny-armel root filesystem is available under /media/card # prepare the chrooted environment and enter it for i in /dev /dev/pts /sys /proc /tmp; do mount --bind $i /media/card$i; done chroot /media/card # continue the bootstrap process /debootstrap/debootstrap --second-stage # do not forget to set a password later passwd root << EOF root root EOF # add some sources cat >> /etc/apt/sources.list << EOS deb http://ftp.de.debian.org/debian lenny main deb http://pkg-fso.alioth.debian.org/debian unstable main deb-src http://pkg-fso.alioth.debian.org/debian unstable main EOS apt-get update apt-get --assume-yes --force-yes install pkg-fso-keyring apt-get update # remove some automatically installed packages that are not needed apt-get --assume-yes purge man-db manpages # configure the usb0 interface cat >> /etc/network/interfaces << EOF auto lo usb0 iface lo inet loopback iface usb0 inet static address 192.168.0.202 netmask 255.255.255.0 gateway 192.168.0.200 EOF # load some modules at startup cat >> /etc/modules << EOF g_ether ohci-hcd snd-soc-neo1973-gta02-wm8753 EOF # set the hostname echo "gta02" > /etc/hostname hostname `cat /etc/hostname` # install some more packages apt-get --assume-yes install udev dropbear apt-get --assume-yes install xserver-xglamo fso-frameworkd fso-config-gta02 fso-sounds-yue-base apt-get --assume-yes install python-qt4 mrxvt matchbox-keyboard xserver-xephyr python-qt4-dbus python-xlib python-pysqlite2 # free some space rm -f /var/cache/apt/archives/*.deb # create a quick & dirty startup script cat << EOF > /etc/rc.local #!/bin/sh -e Xglamo -screen 480x640x24 :0 vt4 -nolisten tcp -dpi 130 -hide-cursor & sleep 3 DISPLAY=:0 HOME=/root export DISPLAY HOME /root/auimd-0.3/auimd.py -fullscreen & exit 0 EOF # workaround for python-xlib xauth touch /root/.Xauthority # exit from chroot # this file does not exists by default mknod /media/card/dev/console c 5 1 # last thing : making the system bootable # 1. layout your sdcard this way : # - /dev/mmcblk0p1 : kernel, 8M, FAT # - /dev/mmcblk0p2 : rootfs, either ext2 or ext3 # 2. copy the kernel as uImage.bin in the first FAT partition # 3. copy kernel modules into /lib/modules in the rootfs