From c450c48e03aac308728fce69fdde7cbd8a7ab51c Mon Sep 17 00:00:00 2001 From: Radek Polak Date: Sat, 7 Dec 2013 20:51:57 +0100 Subject: [PATCH] gta02 doc - v58, use emdebian to shrink size --- doc/txt/debian_rootfs_howto.txt | 194 +++++++++++++++++++------------- 1 file changed, 116 insertions(+), 78 deletions(-) diff --git a/doc/txt/debian_rootfs_howto.txt b/doc/txt/debian_rootfs_howto.txt index a95b23569..8317f88d8 100644 --- a/doc/txt/debian_rootfs_howto.txt +++ b/doc/txt/debian_rootfs_howto.txt @@ -22,7 +22,7 @@ ssh -p 22222 root@localhost * The system is very minimal, download more packages: apt-get update -apt-get install cdebootstrap mtd-utils +apt-get install multistrap cdebootstrap mtd-utils Step 1 @@ -30,7 +30,63 @@ Step 1 * We will be installing new image to /media/card: -cdebootstrap --flavour=minimal --include=ifupdown,net-tools,procps,netbase,nano,module-init-tools,wget,openssh-server,screen,mc,libts-0.0-0,libasound2,alsa-utils,udhcpc,wpasupplicant,wireless-tools,iputils-ping,iproute,bluez,bluez-alsa,dosfstools,fbset,rsyslog,psmisc,iptables,dash,ttf-dejavu,libpng12-0,libjpeg8,libxtst6,sqlite3,ntpdate,gstreamer0.10-ffmpeg,gstreamer0.10-plugins-good,gstreamer0.10-fluendo-mp3,liblcms1,libmng1,libtiff4,libvorbisfile3,libicu48,gpsd,gpsd-clients,timeout,ppp,gstreamer0.10-alsa wheezy /media/card/ http://cdn.debian.net/debian/ +cd ~ +cat > multistrap.conf << __END__ + +[General] +arch=armel +directory=/media/card +cleanup=true +noauth=false +unpack=true +aptsources=Grip Debian +debootstrap=Grip Debian + +[Debian] +packages=openssh-server libts-0.0-0 udhcpc iputils-ping liblcms1 libexpat1 omhacks +source=http://cdn.debian.net/debian/ +keyring=debian-archive-keyring +suite=wheezy + +[Grip] +packages=ifupdown net-tools procps netbase nano module-init-tools wget screen mc wpasupplicant wireless-tools iproute dosfstools fbset rsyslog psmisc iptables dash ttf-dejavu libpng12-0 libjpeg8 libxtst6 sqlite3 ntpdate libmng1 libtiff4 libvorbisfile3 libicu48 gpsd ppp libasound2 alsa-utils libcap-ng0 libcap2 libsystemd-login0 dbus libgstreamer-plugins-base0.10-0 +keyring=emdebian-archive-keyring +source=http://www.emdebian.org/grip +suite=wheezy-grip + +__END__ + +multistrap -f multistrap.conf + + +ifupdown net-tools procps netbase nano module-init-tools wget openssh-server screen mc libts-0.0-0 udhcpc wpasupplicant wireless-tools iputils-ping iproute dosfstools fbset rsyslog psmisc iptables dash ttf-dejavu libpng12-0 libjpeg8 libxtst6 sqlite3 ntpdate liblcms1 libmng1 libtiff4 libvorbisfile3 libicu48 gpsd ppp libasound2 alsa-utils + +bluez bluez-alsa gpsd-clients gstreamer0.10-ffmpeg gstreamer0.10-plugins-good gstreamer0.10-fluendo-mp3 gstreamer0.10-alsa + +Step 1.2 - modified packages +============================ + +* wpa_supplicant has non upstream patch, bluez and gpsd-clients have useless + python dependencies. See step 14 and 15 below how they are built. + +cd /media/card +wget http://qtmoko.sourceforge.net/debian/gta02/armel/bluez_4.99-2_armel.deb +wget http://qtmoko.sourceforge.net/debian/gta02/armel/gpsd-clients_3.6-4+deb7u1_armel.deb +wget http://qtmoko.sourceforge.net/debian/gta02/armel/wpasupplicant_1.0-3_armel.deb +wget http://ftp.de.debian.org/debian/pool/main/b/bluez/bluez-alsa_4.99-2_armel.deb +mount -t proc none /media/card/proc +chroot /media/card +dpkg -i gpsd-clients_3.6-4+deb7u1_armel.deb +dpkg -i wpasupplicant_1.0-3_armel.deb +dpkg -i bluez_4.99-2_armel.deb +/etc/init.d/bluetooth stop +dpkg -i bluez-alsa_4.99-2_armel.deb +exit +umount /media/card/proc +rm gpsd-clients_3.6-4+deb7u1_armel.deb +rm wpasupplicant_1.0-3_armel.deb +rm bluez_4.99-2_armel.deb +rm bluez-alsa_4.99-2_armel.deb Step 2 @@ -72,7 +128,6 @@ sed -i 's/\(PermitEmptyPasswords\) no/\1 yes/' /media/card/etc/ssh/sshd_config chroot /media/card /bin/sh -e <<__END_CHROOT__ echo root: root | chpasswd sed -i 's/root:.*/root:C0XOiCyzQDtsA:14973:0:99999:7:::/' /etc/shadow -apt-get --yes --purge remove cdebootstrap-helper-rc.d __END_CHROOT__ @@ -151,31 +206,6 @@ update-rc.d -f alsa-utils remove exit -Step 4.1 - DHCP server - not using now -====================================== - -* DHCP server will arrange USB networking with PC out-of-the-box for - distributions using NetworkManager. - -* Not using now - the problem is that e.g. my notebook prefers usb0 over wifi - and internet does not work then. - -* You need install package dhcp3-server in step1. - -cat > /media/card/etc/dhcp3/dhcpd.conf <<__END__ -subnet 192.168.0.0 netmask 255.255.255.0 { - option routers 192.168.0.202; - option domain-name-servers 208.67.222.222, 208.67.220.220; - - pool { - max-lease-time 7200; - range 192.168.0.200 192.168.0.201; - allow unknown clients; - } -} -__END__ - - Step 4.5 - make it generate SSH keys on start ============================================= @@ -280,47 +310,6 @@ exit rm /media/card/etc/network/run mkdir /media/card/etc/network/run - -Step 6 - omhacks -================ - -* omhacks is used for controlling neo hardware, the version in squeeze is old - and can't be used with > 2.6.34 kernels, so install from sid: - -chroot /media/card -wget http://cdn.debian.net/debian/pool/main/o/omhacks/libomhacks0_0.16-1_armel.deb -wget http://cdn.debian.net/debian/pool/main/o/omhacks/omhacks_0.16-1_armel.deb -dpkg -i libomhacks0_0.16-1_armel.deb -dpkg -i omhacks_0.16-1_armel.deb -rm libomhacks0_0.16-1_armel.deb -rm omhacks_0.16-1_armel.deb -exit - -Step 6.2 - modified wpa_supplicant -================================== - -* There is a regression in wpa_supplicant affecting Freerunner. We have to - install modified version with this patch reverted: - -diff --git a/src/drivers/driver_wext.c b/src/drivers/driver_wext.c -index 9fa356b..e44aeac 100644 ---- a/src/drivers/driver_wext.c -+++ b/src/drivers/driver_wext.c -@@ -1007,7 +1007,7 @@ int wpa_driver_wext_scan(void *priv, struct wpa_driver_scan_params *params) - - /* Not all drivers generate "scan completed" wireless event, so try to - * read results after a timeout. */ -- timeout = 5; -+ timeout = 10; - if (drv->scan_complete_events) { - /* - * The driver seems to deliver SIOCGIWSCAN events to notify - - For more info check: - http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=679085 - http://w1.fi/bugz/show_bug.cgi?id=456 - http://patchwork.ozlabs.org/patch/167925/ - Step 6.5 - configure gpsd ========================= @@ -348,7 +337,7 @@ Step 8 - install QtMoko * I use qemu armel host for building qtmoko package. It should be as simple as -git checkout v55 +git checkout v58 dpkg-buildpackage * Note that you may need to install some dependencies before building: @@ -368,10 +357,10 @@ git submodule update --init * Install it chroot /media/card/ -wget http://qtmoko.sourceforge.net/debian/gta02/qtmoko-neo_55-1_armel.deb -dpkg -i qtmoko-neo_55-1_armel.deb +wget http://qtmoko.sourceforge.net/debian/gta02/qtmoko-neo_58-1_armel.deb +dpkg -i qtmoko-neo_58-1_armel.deb update-rc.d qtmoko-neo defaults -rm qtmoko-neo_55-1_armel.deb +rm qtmoko-neo_58-1_armel.deb exit killall qpe.sh # recent versions start qtmoko after install, so kill it rm -rf /media/card/home/root/* # remove all stuff created by qpe @@ -420,9 +409,9 @@ dpkg-buildpackage * Install kernel image: chroot /media/card -wget http://qtmoko.sourceforge.net/debian/gta02/linux-image-2.6.39-qtmoko-gta02_55-1_armel.deb -dpkg -i linux-image-2.6.39-qtmoko-gta02_55-1_armel.deb -rm linux-image-2.6.39-qtmoko-gta02_55-1_armel.deb +wget http://qtmoko.sourceforge.net/debian/gta02/linux-image-2.6.39-qtmoko-gta02_58-1_armel.deb +dpkg -i linux-image-2.6.39-qtmoko-gta02_58-1_armel.deb +rm linux-image-2.6.39-qtmoko-gta02_58-1_armel.deb exit * Create boot args and symlink for qi: @@ -490,7 +479,7 @@ Step 10 - release tarball ========================= cd /media/card -tar -czvf ../qtmoko-debian-gta02-v55.tar.gz . +tar -czvf ../qtmoko-debian-gta02-v58.tar.gz . Step 11 - make ubifs images =========================== @@ -541,7 +530,7 @@ vol_flags=autoresize __END__ mkfs.ubifs -r /media/card -o qtmoko-debian.ubifs -x zlib -m 2048 -e 126976 -c 2047 -ubinize -o qtmoko-debian-gta02-v55.ubi -m 2048 -p 128KiB -s 2048 -O 2048 ubinize.cfg +ubinize -o qtmoko-debian-gta02-v58.ubi -m 2048 -p 128KiB -s 2048 -O 2048 ubinize.cfg rm qtmoko-debian.ubifs Step 12 - jffs2 image (not using anymore) @@ -584,6 +573,55 @@ dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz apt-ftparchive release . > Release gpg -abs -o Release.gpg Release + +Step 14 - modified wpa_supplicant +================================== + +* There is a regression in wpa_supplicant affecting Freerunner. We have to + install modified version with this patch reverted: + +diff --git a/src/drivers/driver_wext.c b/src/drivers/driver_wext.c +index 9fa356b..e44aeac 100644 +--- a/src/drivers/driver_wext.c ++++ b/src/drivers/driver_wext.c +@@ -1007,7 +1007,7 @@ int wpa_driver_wext_scan(void *priv, struct wpa_driver_scan_params *params) + + /* Not all drivers generate "scan completed" wireless event, so try to + * read results after a timeout. */ +- timeout = 5; ++ timeout = 10; + if (drv->scan_complete_events) { + /* + * The driver seems to deliver SIOCGIWSCAN events to notify + + For more info check: + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=679085 + http://w1.fi/bugz/show_bug.cgi?id=456 + http://patchwork.ozlabs.org/patch/167925/ + +* The modified package is now uploaded with others here: + +http://qtmoko.sourceforge.net/debian/gta02/armel/ + +Step 15 - modified bluez and gpsd-clients +======================================== + +* These packages in wheezy suck because they add usless python dependencies + which is ~60MB + +* The tricks is that we rebuild them without dependencies: + + apt-get build-dep bluez gpsd-clients + apt-get source bluez gpsd-clients + +* Now edit their debian/control and manually remove dependencies and rebuild + packages with dpkg-buildpackage + +* The modified packages are now uploaded here: + +http://qtmoko.sourceforge.net/debian/gta02/armel/ + + Boot speedup ============ -- GitLab