Debian rootfs ============= Use instructions from http://wiki.openmoko.org/wiki/Manual_Debian I am installing to NFS dir, so that i can make tarbal on my PC. Mount your NFS dir to /media/card for simplicity. Always use ext3 on SD cards - ext2 often gets corrupted during reboots. Step 1 ====== * Install cdebootstrap-static binary on your Neo. This can be done only once. wget http://ftp.de.debian.org/debian/pool/main/c/cdebootstrap/cdebootstrap-static_0.5.4_armel.deb ar -x cdebootstrap-static_0.5.4_armel.deb data.tar.gz tar -xz -C / -f data.tar.gz rm data.tar.gz cdebootstrap-static_0.5.4_armel.deb wget http://ftp.de.debian.org/debian/pool/main/d/debian-archive-keyring/debian-archive-keyring_2009.01.31_all.deb ar -x debian-archive-keyring_2009.01.31_all.deb data.tar.gz tar -xz -C / -f data.tar.gz rm data.tar.gz debian-archive-keyring_2009.01.31_all.deb Step 2 ====== cdebootstrap-static --flavour=minimal --include=ifupdown,udev,procps,netbase,nano,module-init-tools,wget,openssh-server,screen,mc,libasound2,libts-0.0-0,alsa-utils,ppp,udhcpc,wpasupplicant,wireless-tools,iputils-ping,bluez-utils,dosfstools,fbset stable /media/card/ http://ftp.de.debian.org/debian/ Step 3 ====== * Complete installation. Copy paste below in shell: echo "neo1973-debian" > /media/card/etc/hostname cat > /media/card/etc/network/interfaces <<__END__ auto lo iface lo inet loopback auto usb0 iface usb0 inet static address 192.168.0.202 netmask 255.255.255.0 network 192.168.0.0 gateway 192.168.0.200 up echo nameserver 208.67.222.222 >/etc/resolv.conf __END__ cat > /media/card/etc/fstab << __END__ rootfs / auto defaults,errors=remount-ro,noatime 0 1 proc /proc proc defaults 0 0 tmpfs /etc/network/run tmpfs defaults,noatime 0 0 tmpfs /tmp tmpfs defaults,noatime 0 0 tmpfs /var/lock tmpfs defaults,noatime 0 0 tmpfs /var/run tmpfs defaults,noatime 0 0 tmpfs /var/tmp tmpfs defaults,noatime 0 0 __END__ cat > /media/card/etc/apt/apt.conf.d/99no-install-recommends << __END__ APT::Install-Recommends "0"; __END__ sed -i 's/\(PermitEmptyPasswords\) no/\1 yes/' /media/card/etc/ssh/sshd_config chroot /media/card /bin/sh -e <<__END_CHROOT__ echo root: | chpasswd apt-get --yes --purge remove cdebootstrap-helper-rc.d __END_CHROOT__ Step 4 ====== * Modem device nodes via USB - this does not work yet, any ideas? echo "# Samsung UARTS" > /media/card/etc/udev/rules.d/50-qtextended.rules echo "KERNEL=="s3c2410_serial[0-9]", NAME=\"ttySAC%n\"" >> /media/card/etc/udev/rules.d/50-qtextended.rules * Unpack alsa scenarios to /usr/share/openmoko - you can find these files in any openmoko distro. * Edit /etc/ppp/options and replace "auth" with "noauth" * Create /etc/fb.modes mode "vga" geometry 480 640 480 640 16 timings 100000 8 104 2 16 8 2 accel false endmode Calling "fbset vga" and "echo qvga-normal > /sys/bus/spi/devices/spi2.0/state" is needed for mplayer in 320x240 with correct colors. Step 5 ====== * Remove python that is dependency of alsa-utils and is not needed: chroot /media/card dpkg --force depends -r python python-minimal python2.5 python2.5-minimal exit * Remove all doc - we dont have space for it rm -rf /media/card/usr/share/doc/* rm -rf /media/card/usr/share/doc-base/* rm -rf /media/card/usr/share/info/* rm -rf /media/card/usr/share/man/* rm -rf /media/card/usr/share/sounds/alsa/* rm -rf /media/card/usr/share/ssh/blacklist* * Fix incompatible libts version cd /media/card/usr/lib ln -s libts-0.0.so.0 libts-1.0.so.0 * Remove .udev dir, that confuses udev. This dir is here after instalation and causes some error/warnings during init. Not sure what's the exact problem. cd /media/card/dev rm -rf .udev * Remove /etc/network/run and do make dir /etc/network/run Otherwise fstab mounting will fail for this directory rm /media/card/etc/network/run mkdir /media/card/etc/network/run Step 6 ====== * Copy your QTE install cd /media/card tar xzvpf qtopia-update.tar.gz Step 7 ====== * Add this to /media/card/etc/rc.local mknod /dev/ttySAC0 c 204 64 -m 660 mknod /dev/ttySAC1 c 204 65 -m 660 mknod /dev/ttySAC2 c 204 66 -m 660 chgrp dialout /dev/ttySAC0 rm -rf /var/run/ppp mkdir /var/run/ppp echo 1 > /sys/bus/platform/devices/neo1973-pm-gsm.0/power_on source /opt/Trolltech/Qtopia/qpe.env qpe & Step 8 - launching via qpe.sh, i dont use this ============================================== * Edit init script for qtopia: nano /media/card/opt/Trolltech/Qtopia/qpe.sh * On the very top change interpreter from /bin/ash to /bin/sh * For 2.6.28 kernels we dont have /dev/input/touchscreen0 so fix it like this: #export TSLIB_TSDEVICE=/dev/input/touchscreen0 export TSLIB_TSDEVICE=/dev/input/event1 * And after export handle creating modem dev node: mknod /dev/ttySAC0 c 204 64 -m 660 chgrp dialout /dev/ttySAC0 * Make QTE to launch automatically: cp /media/card/opt/Trolltech/Qtopia/qpe.sh /media/card/etc/init.d/qpe.sh cd /media/card/etc/rc5.d ln -s ../init.d/qpe.sh S98qpe.sh Step 9 ====== * Compile kernel. I am now using andy-tracking and moredrivers config. The bluetooth stuff must be compiled as modules otherwise bt does not work for me. * Copy kernel to /media/card/boot cd /media/card/boot echo "console=tty0 loglevel=8 rootdelay=1" > append-GTA02 scp /home/radek/linux-2.6/GTA02/uImage-GTA02.bin root@192.168.0.202:/media/card/boot/uImage-GTA02.bin Step 10 ======= * Unmount nfs on Neo sync umount /media/card * Pack it all on your desktop cd /media/card tar -czvf ../qtmoko.tar.gz . Step 11 ======= * Make jffs image * Copy your qte dir to /tmp/qte * Delete contents of boot, because for NAND it's not needed: rm -rf /tmp/qte/boot/* * Make jffs2 image: mkfs.jffs2 --pad=0x700000 -o qtmoko.jffs2 -e 0x20000 -n -d/tmp/qte