From 1a1b5fa515ba1de577206afa43550c1de071cbba Mon Sep 17 00:00:00 2001 From: josch Date: Mon, 10 May 2010 10:37:48 +0200 Subject: [PATCH 01/22] added efl deps --- pyneo-rootfs.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyneo-rootfs.sh b/pyneo-rootfs.sh index 728dd24..336e479 100755 --- a/pyneo-rootfs.sh +++ b/pyneo-rootfs.sh @@ -2,7 +2,7 @@ ROOTDIR="pyneo-chroot" DIST="sid" -EFL=false +EFL=true PYNEO=true XFCE=false XORG=true @@ -101,7 +101,7 @@ if $EFL; then echo deb http://packages.enlightenment.org/debian $DIST main extras >> $ROOTDIR/etc/apt/sources.list cat > $ROOTDIR/etc/apt/preferences << __END__ Package: * -Pin: origin packages.enlightenment.org +Pin: origin packages.enlightenment.org Pin-Priority: 1001 __END__ curl http://packages.enlightenment.org/repo.key | chroot $ROOTDIR apt-key add - @@ -117,7 +117,7 @@ chroot $ROOTDIR apt-get update -qq # install enlightenment if $EFL; then - chroot $ROOTDIR apt-get install python-evas python-edje python-elementary python-emotion python-edbus libedje-bin -qq + chroot $ROOTDIR apt-get install libevas-svn-05-engines-core libevas-svn-05-engines-x python-evas python-edje python-elementary python-emotion python-edbus libedje-bin -qq fi # install xorg @@ -334,7 +334,7 @@ else sed -i 's/\(Driver \)"fbdev"/\1"glamo"/' /etc/X11/xorg.conf print_exit_status \$? - echo -n "Appending sound module." + echo -n "Appending sound module." echo "snd-soc-neo1973-gta02-wm8753" >> /etc/modules print_exit_status \$? From 1151c280426c5270e471212d3a92f56387f39d60 Mon Sep 17 00:00:00 2001 From: josch Date: Mon, 16 Aug 2010 19:59:25 +0100 Subject: [PATCH 02/22] include locale generation for en_US.UTF-8 --- pyneo-rootfs.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pyneo-rootfs.sh b/pyneo-rootfs.sh index 336e479..fe199d7 100755 --- a/pyneo-rootfs.sh +++ b/pyneo-rootfs.sh @@ -23,7 +23,7 @@ for APP in "cdebootstrap" "curl" "chroot"; do done # cdebotstrap -DEPS_SYSTEM="udev,module-init-tools,sysklogd,klogd,psmisc,mtd-utils,ntpdate,debconf-english" +DEPS_SYSTEM="locales,udev,module-init-tools,sysklogd,klogd,psmisc,mtd-utils,ntpdate,debconf-english" DEPS_CONSOLE="screen,less,vim-tiny,console-tools,conspy,console-setup-mini,man-db,fbset,input-utils,libts-bin" #DEPS_WLAN="wpasupplicant" #DEPS_BT="bluez,bluez-utils,bluez-alsa,bluez-gstreamer" @@ -79,10 +79,10 @@ echo 'Acquire::PDiffs "0";' > $ROOTDIR/etc/apt/apt.conf.d/99no-pdiffs sed -i 's/\(PermitEmptyPasswords\) no/\1 yes/' $ROOTDIR/etc/ssh/sshd_config sed -i 's/\(root:\)[^:]*\(:\)/\1\/\/plGAV7Hp3Zo\2/' $ROOTDIR/etc/shadow # locales -echo LANG="C" > $ROOTDIR/etc/default/locale -#echo LANG="en_US.UTF-8" > $ROOTDIR/etc/default/locale -#echo en_US.UTF-8 UTF-8 > $ROOTDIR/etc/locale.gen -#chroot $ROOTDIR locale-gen +#echo LANG="C" > $ROOTDIR/etc/default/locale +echo LANG="en_US.UTF-8" > $ROOTDIR/etc/default/locale +echo en_US.UTF-8 UTF-8 > $ROOTDIR/etc/locale.gen +chroot $ROOTDIR locale-gen # echo set debconf/frontend Teletype | chroot $ROOTDIR debconf-communicate # disable startup message of screen From 8008e43be30c99d520ae3f1438afc44ba17aed98 Mon Sep 17 00:00:00 2001 From: josch Date: Mon, 16 Aug 2010 21:05:55 +0200 Subject: [PATCH 03/22] changes to accomodate updates in debian init system for firstboot --- pyneo-rootfs.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pyneo-rootfs.sh b/pyneo-rootfs.sh index fe199d7..0f2e4a1 100755 --- a/pyneo-rootfs.sh +++ b/pyneo-rootfs.sh @@ -235,7 +235,7 @@ fi # firstboot script cat > $ROOTDIR/usr/sbin/firstboot.sh << __END__ #!/bin/sh -rm -f /etc/rcS.d/S99firstboot +chmod -x /usr/sbin/firstboot.sh [ -d /home/persistent ] || mkdir /home/persistent print_exit_status () { @@ -380,7 +380,17 @@ print_yellow "resuming normal boot..." sleep 3 __END__ chmod +x $ROOTDIR/usr/sbin/firstboot.sh -ln -sf /usr/sbin/firstboot.sh $ROOTDIR/etc/rcS.d/S99firstboot + +cat > $ROOTDIR/etc/rc.local << __END__ +#!/bin/sh -e + +if [ -x /usr/sbin/firstboot.sh ]; then + /usr/sbin/firstboot.sh +fi + +exit 0 + +__END__ # cleanup chroot $ROOTDIR apt-get remove cdebootstrap-helper-rc.d -qq From df55575a6e321931d0bd9f7a46e228de6fe5205f Mon Sep 17 00:00:00 2001 From: josch Date: Mon, 16 Aug 2010 21:08:15 +0200 Subject: [PATCH 04/22] dont use the enlightenment debian repository anymore --- pyneo-rootfs.sh | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/pyneo-rootfs.sh b/pyneo-rootfs.sh index 0f2e4a1..ac8fb20 100755 --- a/pyneo-rootfs.sh +++ b/pyneo-rootfs.sh @@ -96,17 +96,6 @@ sed -i "s/\([2-6]:23:respawn:\/sbin\/getty 38400 tty[2-6]\)/#\1/" $ROOTDIR/etc/i # enable fs fixes sed -i "s/\(FSCKFIX=\)no/\1yes/" $ROOTDIR/etc/default/rcS -# add enlightenment repository -if $EFL; then - echo deb http://packages.enlightenment.org/debian $DIST main extras >> $ROOTDIR/etc/apt/sources.list - cat > $ROOTDIR/etc/apt/preferences << __END__ -Package: * -Pin: origin packages.enlightenment.org -Pin-Priority: 1001 -__END__ - curl http://packages.enlightenment.org/repo.key | chroot $ROOTDIR apt-key add - -fi - # add pyneo repository if $PYNEO; then echo deb http://pyneo.org/debian/ / >> $ROOTDIR/etc/apt/sources.list From a85218c475846837fd53da1ea459a1212b3c1567 Mon Sep 17 00:00:00 2001 From: josch Date: Mon, 16 Aug 2010 21:10:52 +0200 Subject: [PATCH 05/22] update efl package list --- pyneo-rootfs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyneo-rootfs.sh b/pyneo-rootfs.sh index ac8fb20..f098051 100755 --- a/pyneo-rootfs.sh +++ b/pyneo-rootfs.sh @@ -106,7 +106,7 @@ chroot $ROOTDIR apt-get update -qq # install enlightenment if $EFL; then - chroot $ROOTDIR apt-get install libevas-svn-05-engines-core libevas-svn-05-engines-x python-evas python-edje python-elementary python-emotion python-edbus libedje-bin -qq + chroot $ROOTDIR apt-get install libevas-svn-06-engines-core libevas-svn-06-engines-x python-evas python-edje python-elementary python-edbus libedje-bin -qq fi # install xorg From 8acb1f5adb3b1e919a27f30bb27fe50e2af3381e Mon Sep 17 00:00:00 2001 From: josch Date: Mon, 16 Aug 2010 21:29:29 +0200 Subject: [PATCH 06/22] accomodate for udev changes - change NAME to SYMLINK --- pyneo-rootfs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyneo-rootfs.sh b/pyneo-rootfs.sh index f098051..3222d76 100755 --- a/pyneo-rootfs.sh +++ b/pyneo-rootfs.sh @@ -206,7 +206,7 @@ __END__ fi # modem -echo KERNEL==\"s3c2410_serial[0-9]\", NAME=\"ttySAC%n\" > $ROOTDIR/etc/udev/rules.d/51-calypso.rules +echo KERNEL==\"s3c2410_serial[0-9]\", SYMLINK=\"ttySAC%n\" > $ROOTDIR/etc/udev/rules.d/51-calypso.rules # kernel curl http://pyneo.org/downloads/gta0x/zImage-$KERNEL_VER-pyneo.bin > $ROOTDIR/boot/zImage-$KERNEL_VER-pyneo.bin ln -s zImage-$KERNEL_VER-pyneo.bin $ROOTDIR/boot/uImage-GTA01.bin From fcad9a7aa09ae7b5df3615a55a64d7850ea522f5 Mon Sep 17 00:00:00 2001 From: josch Date: Mon, 23 Aug 2010 20:28:58 +0200 Subject: [PATCH 07/22] added python-ecore --- pyneo-rootfs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyneo-rootfs.sh b/pyneo-rootfs.sh index 3222d76..c1cfd05 100755 --- a/pyneo-rootfs.sh +++ b/pyneo-rootfs.sh @@ -106,7 +106,7 @@ chroot $ROOTDIR apt-get update -qq # install enlightenment if $EFL; then - chroot $ROOTDIR apt-get install libevas-svn-06-engines-core libevas-svn-06-engines-x python-evas python-edje python-elementary python-edbus libedje-bin -qq + chroot $ROOTDIR apt-get install libevas-svn-06-engines-core libevas-svn-06-engines-x python-ecore python-evas python-edje python-elementary python-edbus libedje-bin -qq fi # install xorg From 59822714e51d37f9a4b183f42d2dac873c8d06d9 Mon Sep 17 00:00:00 2001 From: josch Date: Wed, 25 Aug 2010 12:25:33 +0200 Subject: [PATCH 08/22] use evdev instead of tslib and calibrate with xorg.conf.d script --- pyneo-rootfs.sh | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/pyneo-rootfs.sh b/pyneo-rootfs.sh index c1cfd05..8bd3235 100755 --- a/pyneo-rootfs.sh +++ b/pyneo-rootfs.sh @@ -24,7 +24,7 @@ done # cdebotstrap DEPS_SYSTEM="locales,udev,module-init-tools,sysklogd,klogd,psmisc,mtd-utils,ntpdate,debconf-english" -DEPS_CONSOLE="screen,less,vim-tiny,console-tools,conspy,console-setup-mini,man-db,fbset,input-utils,libts-bin" +DEPS_CONSOLE="screen,less,vim-tiny,console-tools,conspy,console-setup-mini,man-db,fbset,input-utils" #DEPS_WLAN="wpasupplicant" #DEPS_BT="bluez,bluez-utils,bluez-alsa,bluez-gstreamer" DEPS_NETMGMT="ifupdown,netbase,iputils-ping,dhcp3-client" @@ -111,21 +111,13 @@ fi # install xorg if $XORG; then - chroot $ROOTDIR apt-get install xorg xserver-xorg-input-tslib xserver-xorg-video-glamo nodm matchbox-window-manager -qq + chroot $ROOTDIR apt-get install xorg xserver-xorg-input-evdev xserver-xorg-video-glamo nodm matchbox-window-manager -qq # /etc/X11/xorg.conf cat > $ROOTDIR/etc/X11/xorg.conf << __END__ Section "Device" Identifier "Configured Video Device" Driver "fbdev" EndSection -Section "InputDevice" - Identifier "Configured Touchscreen" - Driver "tslib" - Option "CorePointer" "true" - Option "SendCoreEvents" "true" - Option "Device" "/dev/input/event2" - Option "Protocol" "Auto" -EndSection __END__ cat > $ROOTDIR/etc/skel/.xsession << __END__ #!/bin/sh @@ -143,6 +135,7 @@ NODM_X_OPTIONS='-nolisten tcp' NODM_MIN_SESSION_TIME=60 __END__ echo allowed_users=anybody > $ROOTDIR/etc/X11/Xwrapper.config + mkdir -p $ROOTDIR/etc/X11/xorg.conf.d fi # install pyneo @@ -288,7 +281,14 @@ print_yellow "Running on \$DEVICE." echo -n "Calibrating Touchscreen." if [ \$DEVICE = "gta01" ]; then - echo -67 36365 -2733100 -48253 -310 45219816 65536 > /etc/pointercal + cat > /etc/X11/xorg.conf.d/s3c2410.conf << __XORG__ +Section "InputClass" + Identifier "s3c2410 TouchScreen" + MatchProduct "s3c2410 TouchScreen" + Option "Calibration" "69, 922, 950, 65" + Option "SwapAxes" "1" +EndSection +__XORG__ print_exit_status \$? echo -n "Appending MAC address to kernel boot parameters." @@ -316,7 +316,14 @@ __HOSTS__ echo "/dev/mtdblock4 /media/nand jffs2 defaults,noatime 0 0" >> /etc/fstab print_exit_status \$? else - echo -67 38667 -4954632 -51172 121 46965312 65536 > /etc/pointercal + cat > /etc/X11/xorg.conf.d/s3c2410.conf << __XORG__ +Section "InputClass" + Identifier "s3c2410 TouchScreen" + MatchProduct "s3c2410 TouchScreen" + Option "Calibration" "110 922 924 96" + Option "SwapAxes" "1" +EndSection +__XORG__ print_exit_status \$? echo -n "Configuring glamo into xorg.conf." @@ -382,7 +389,7 @@ exit 0 __END__ # cleanup -chroot $ROOTDIR apt-get remove cdebootstrap-helper-rc.d -qq +chroot $ROOTDIR apt-get remove cdebootstrap-helper-rc.d xserver-xorg-input-synaptics xserver-xorg-input-wacom -qq chroot $ROOTDIR apt-get clean -qq rm -f $ROOTDIR/etc/ssh/ssh_host_* rm -f $ROOTDIR/var/lib/apt/lists/* From 2f8e39e88b32e06f54c99c32e6cf5522bc2d3095 Mon Sep 17 00:00:00 2001 From: josch Date: Thu, 26 Aug 2010 10:16:46 +0200 Subject: [PATCH 09/22] install xorg glamo driver separately to minimize installed package count --- pyneo-rootfs.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyneo-rootfs.sh b/pyneo-rootfs.sh index 8bd3235..72f97a4 100755 --- a/pyneo-rootfs.sh +++ b/pyneo-rootfs.sh @@ -111,7 +111,8 @@ fi # install xorg if $XORG; then - chroot $ROOTDIR apt-get install xorg xserver-xorg-input-evdev xserver-xorg-video-glamo nodm matchbox-window-manager -qq + chroot $ROOTDIR apt-get install xserver-xorg-video-glamo -qq + chroot $ROOTDIR apt-get install xorg xserver-xorg-input-evdev nodm matchbox-window-manager -qq # /etc/X11/xorg.conf cat > $ROOTDIR/etc/X11/xorg.conf << __END__ Section "Device" From c4f24ec876eb78cb227312abe175af448ab381f6 Mon Sep 17 00:00:00 2001 From: josch Date: Thu, 26 Aug 2010 13:26:20 +0200 Subject: [PATCH 10/22] we no longer need netplug --- pyneo-rootfs.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pyneo-rootfs.sh b/pyneo-rootfs.sh index 72f97a4..a3aa4d5 100755 --- a/pyneo-rootfs.sh +++ b/pyneo-rootfs.sh @@ -141,13 +141,11 @@ fi # install pyneo if $PYNEO; then - chroot $ROOTDIR apt-get install pyneo-pyneod pyneo-pybankd python-pyneo gsm0710muxd python-ijon pyneo-resolvconf dnsmasq netplug -qq --download-only + chroot $ROOTDIR apt-get install pyneo-pyneod pyneo-pybankd python-pyneo gsm0710muxd python-ijon pyneo-resolvconf dnsmasq -qq --download-only # an existing resolv.conf will prompt the user wether to overwrite it or not so delete it rm $ROOTDIR/etc/resolv.conf - chroot $ROOTDIR apt-get install pyneo-pyneod pyneo-pybankd python-pyneo gsm0710muxd python-ijon pyneo-resolvconf dnsmasq netplug -qq --no-download + chroot $ROOTDIR apt-get install pyneo-pyneod pyneo-pybankd python-pyneo gsm0710muxd python-ijon pyneo-resolvconf dnsmasq -qq --no-download - # let netplugd manage usb0 - echo usb0 >> $ROOTDIR/etc/netplug/netplugd.conf # configure dnsmasq cat > $ROOTDIR/etc/dnsmasq.d/pyneo << __END__ no-resolv From 43ed3ea2393b9051e5bddd1942c2b15b94c10bd3 Mon Sep 17 00:00:00 2001 From: josch Date: Thu, 26 Aug 2010 13:27:15 +0200 Subject: [PATCH 11/22] dnsmasq gets pulled by pyneo-resolvconf --- pyneo-rootfs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyneo-rootfs.sh b/pyneo-rootfs.sh index a3aa4d5..350b8e2 100755 --- a/pyneo-rootfs.sh +++ b/pyneo-rootfs.sh @@ -141,10 +141,10 @@ fi # install pyneo if $PYNEO; then - chroot $ROOTDIR apt-get install pyneo-pyneod pyneo-pybankd python-pyneo gsm0710muxd python-ijon pyneo-resolvconf dnsmasq -qq --download-only + chroot $ROOTDIR apt-get install pyneo-pyneod pyneo-pybankd python-pyneo gsm0710muxd python-ijon pyneo-resolvconf -qq --download-only # an existing resolv.conf will prompt the user wether to overwrite it or not so delete it rm $ROOTDIR/etc/resolv.conf - chroot $ROOTDIR apt-get install pyneo-pyneod pyneo-pybankd python-pyneo gsm0710muxd python-ijon pyneo-resolvconf dnsmasq -qq --no-download + chroot $ROOTDIR apt-get install pyneo-pyneod pyneo-pybankd python-pyneo gsm0710muxd python-ijon pyneo-resolvconf -qq --no-download # configure dnsmasq cat > $ROOTDIR/etc/dnsmasq.d/pyneo << __END__ From 893e13cae9902eb4fd39684d8ca5de68e63c2b26 Mon Sep 17 00:00:00 2001 From: josch Date: Thu, 26 Aug 2010 13:48:22 +0200 Subject: [PATCH 12/22] reintroduce firstboot as init script --- pyneo-rootfs.sh | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/pyneo-rootfs.sh b/pyneo-rootfs.sh index 350b8e2..e92dfdf 100755 --- a/pyneo-rootfs.sh +++ b/pyneo-rootfs.sh @@ -214,9 +214,20 @@ if $PYNEO; then fi # firstboot script -cat > $ROOTDIR/usr/sbin/firstboot.sh << __END__ -#!/bin/sh -chmod -x /usr/sbin/firstboot.sh +cat > $ROOTDIR/etc/init.d/firstboot << __END__ +#!/bin/sh -e +### BEGIN INIT INFO +# Provides: firstboot +# Required-Start: \$all +# Required-Stop: +# Default-Start: S +# Default-Stop: +# X-Interactive: true + +### END INIT INFO + +update-rc.d -f firstboot remove + [ -d /home/persistent ] || mkdir /home/persistent print_exit_status () { @@ -374,18 +385,8 @@ print_yellow "finished running firstboot tasks!" print_yellow "resuming normal boot..." sleep 3 __END__ -chmod +x $ROOTDIR/usr/sbin/firstboot.sh - -cat > $ROOTDIR/etc/rc.local << __END__ -#!/bin/sh -e - -if [ -x /usr/sbin/firstboot.sh ]; then - /usr/sbin/firstboot.sh -fi - -exit 0 - -__END__ +chmod +x $ROOTDIR/etc/init.d/firstboot +chroot $ROOTDIR update-rc.d firstboot start 99 S # cleanup chroot $ROOTDIR apt-get remove cdebootstrap-helper-rc.d xserver-xorg-input-synaptics xserver-xorg-input-wacom -qq From 2e24f920cd61c94471bd537b200f01fd85c4f7de Mon Sep 17 00:00:00 2001 From: josch Date: Thu, 26 Aug 2010 15:51:03 +0200 Subject: [PATCH 13/22] dont add home directory for new user if it exists --- pyneo-rootfs.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pyneo-rootfs.sh b/pyneo-rootfs.sh index e92dfdf..e19a6f5 100755 --- a/pyneo-rootfs.sh +++ b/pyneo-rootfs.sh @@ -360,7 +360,11 @@ __HOSTS__ fi echo -n "Creating new user" -useradd user -p //plGAV7Hp3Zo -s /bin/bash --create-home +if [ -d /home/user ]; then + useradd user -p //plGAV7Hp3Zo -s /bin/bash +else + useradd user -p //plGAV7Hp3Zo -s /bin/bash --create-home +fi print_exit_status \$? echo -n "Mounting NAND." From 607efd421fe63083bf26209465c5a4719be96d98 Mon Sep 17 00:00:00 2001 From: josch Date: Thu, 26 Aug 2010 15:52:58 +0200 Subject: [PATCH 14/22] remove ifupdown and update of package index --- pyneo-rootfs.sh | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/pyneo-rootfs.sh b/pyneo-rootfs.sh index e19a6f5..e17a05a 100755 --- a/pyneo-rootfs.sh +++ b/pyneo-rootfs.sh @@ -27,7 +27,7 @@ DEPS_SYSTEM="locales,udev,module-init-tools,sysklogd,klogd,psmisc,mtd-utils,ntpd DEPS_CONSOLE="screen,less,vim-tiny,console-tools,conspy,console-setup-mini,man-db,fbset,input-utils" #DEPS_WLAN="wpasupplicant" #DEPS_BT="bluez,bluez-utils,bluez-alsa,bluez-gstreamer" -DEPS_NETMGMT="ifupdown,netbase,iputils-ping,dhcp3-client" +DEPS_NETMGMT="netbase,iputils-ping" DEPS_NETAPPS="curl,wget,openssh-server,vpnc,rsync" cdebootstrap --include $DEPS_SYSTEM,$DEPS_CONSOLE,$DEPS_NETMGMT,$DEPS_NETAPPS --flavour=minimal $DIST $ROOTDIR http://ftp.debian.org/debian @@ -376,15 +376,6 @@ echo "\$DEVICE" > /etc/hostname hostname "\$DEVICE" print_exit_status \$? -echo -n "Bringing up usb networking." -ifdown usb0 -sleep 3 -print_exit_status \$? - -echo -n "Updating package index..." -apt-get update -qq -print_exit_status \$? - print_yellow "finished running firstboot tasks!" print_yellow "resuming normal boot..." sleep 3 From 41b8c3878d2ec958ee369dedef96c163dcf39476 Mon Sep 17 00:00:00 2001 From: josch Date: Thu, 26 Aug 2010 16:24:59 +0200 Subject: [PATCH 15/22] dhcpcd config --- pyneo-rootfs.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/pyneo-rootfs.sh b/pyneo-rootfs.sh index e17a05a..af592f3 100755 --- a/pyneo-rootfs.sh +++ b/pyneo-rootfs.sh @@ -155,6 +155,27 @@ log-queries clear-on-reload domain-needed __END__ + + cat > $ROOTDIR/etc/dhcpcd.conf << __END__ +hostname + +option domain_name_servers, domain_name, domain_search, host_name +option classless_static_routes + +option ntp_servers + +option interface_mtu + +require dhcp_server_identifier + +nohook lookup-hostname + +interface usb0 + static ip_address=192.168.0.202/24 + static routers=192.168.0.200 + static domain_name_servers=192.168.0.200 +__END__ + # pyneo-resolvconf installs new resolv.conf - revert that change cp /etc/resolv.conf $ROOTDIR/etc/resolv.conf fi From d74863f3100afe8d96b070a23f878dd37fa0cfce Mon Sep 17 00:00:00 2001 From: josch Date: Fri, 27 Aug 2010 11:45:32 +0200 Subject: [PATCH 16/22] use tput for colors --- pyneo-rootfs.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pyneo-rootfs.sh b/pyneo-rootfs.sh index af592f3..c75561a 100755 --- a/pyneo-rootfs.sh +++ b/pyneo-rootfs.sh @@ -257,15 +257,21 @@ print_exit_status () { cols=\`expr \$cols - 8\` if [ \$1 -ne 0 ]; then tput cup \$lines \$cols - echo "\\033[1;31m[failed]\\033[0m" + tput setf 1 + echo "[failed]" + tput sgr0 else tput cup \$lines \$cols - echo "\\033[1;32m[ done ]\\033[0m" + tput setf 2 + echo "[ done ]" + tput sgr0 fi } print_yellow () { - echo "\\033[1;33m\$1\\033[0m" + tput setf 3 + echo "\$1" + tput sgr0 } print_yellow "a/ aaQQaa/ a/ _a _a aajQaa _aaQQaa /_aQaaa " From c1af83a2002d9434ca9873a0adc14e692df28162 Mon Sep 17 00:00:00 2001 From: josch Date: Fri, 27 Aug 2010 14:44:02 +0200 Subject: [PATCH 17/22] no need of /etc/network/interfaces --- pyneo-rootfs.sh | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/pyneo-rootfs.sh b/pyneo-rootfs.sh index c75561a..bc1c370 100755 --- a/pyneo-rootfs.sh +++ b/pyneo-rootfs.sh @@ -27,7 +27,7 @@ DEPS_SYSTEM="locales,udev,module-init-tools,sysklogd,klogd,psmisc,mtd-utils,ntpd DEPS_CONSOLE="screen,less,vim-tiny,console-tools,conspy,console-setup-mini,man-db,fbset,input-utils" #DEPS_WLAN="wpasupplicant" #DEPS_BT="bluez,bluez-utils,bluez-alsa,bluez-gstreamer" -DEPS_NETMGMT="netbase,iputils-ping" +DEPS_NETMGMT="iputils-ping" DEPS_NETAPPS="curl,wget,openssh-server,vpnc,rsync" cdebootstrap --include $DEPS_SYSTEM,$DEPS_CONSOLE,$DEPS_NETMGMT,$DEPS_NETAPPS --flavour=minimal $DIST $ROOTDIR http://ftp.debian.org/debian @@ -43,18 +43,6 @@ echo "127.0.0.1 localhost" > $ROOTDIR/etc/hosts # /etc/resolv.conf # while building use host's resolv.conf cp /etc/resolv.conf $ROOTDIR/etc/resolv.conf -# /etc/network/interfaces -cat > $ROOTDIR/etc/network/interfaces << __END__ -auto lo -iface lo inet loopback -auto usb0 -iface usb0 inet static - address neo - netmask 255.255.255.0 - network 192.168.0.0 - gateway host - dns-nameservers host -__END__ # /etc/fstab cat > $ROOTDIR/etc/fstab << __END__ # From 5fd23f559d57318f8818002c14dafb9398b32982 Mon Sep 17 00:00:00 2001 From: josch Date: Fri, 27 Aug 2010 15:24:11 +0200 Subject: [PATCH 18/22] no need of full xorg package --- pyneo-rootfs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyneo-rootfs.sh b/pyneo-rootfs.sh index bc1c370..8d91adf 100755 --- a/pyneo-rootfs.sh +++ b/pyneo-rootfs.sh @@ -100,7 +100,7 @@ fi # install xorg if $XORG; then chroot $ROOTDIR apt-get install xserver-xorg-video-glamo -qq - chroot $ROOTDIR apt-get install xorg xserver-xorg-input-evdev nodm matchbox-window-manager -qq + chroot $ROOTDIR apt-get install xserver-xorg-input-evdev nodm matchbox-window-manager -qq # /etc/X11/xorg.conf cat > $ROOTDIR/etc/X11/xorg.conf << __END__ Section "Device" From c74210b3318e58610813052fd30d975d00b07b58 Mon Sep 17 00:00:00 2001 From: josch Date: Sun, 29 Aug 2010 20:12:57 +0200 Subject: [PATCH 19/22] implement new networking --- pyneo-rootfs.sh | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/pyneo-rootfs.sh b/pyneo-rootfs.sh index 8d91adf..9454ad6 100755 --- a/pyneo-rootfs.sh +++ b/pyneo-rootfs.sh @@ -27,7 +27,7 @@ DEPS_SYSTEM="locales,udev,module-init-tools,sysklogd,klogd,psmisc,mtd-utils,ntpd DEPS_CONSOLE="screen,less,vim-tiny,console-tools,conspy,console-setup-mini,man-db,fbset,input-utils" #DEPS_WLAN="wpasupplicant" #DEPS_BT="bluez,bluez-utils,bluez-alsa,bluez-gstreamer" -DEPS_NETMGMT="iputils-ping" +DEPS_NETMGMT="iputils-ping,iproute,dnsutils" DEPS_NETAPPS="curl,wget,openssh-server,vpnc,rsync" cdebootstrap --include $DEPS_SYSTEM,$DEPS_CONSOLE,$DEPS_NETMGMT,$DEPS_NETAPPS --flavour=minimal $DIST $ROOTDIR http://ftp.debian.org/debian @@ -158,12 +158,38 @@ require dhcp_server_identifier nohook lookup-hostname +allowinterfaces usb0 wlan0 + interface usb0 static ip_address=192.168.0.202/24 static routers=192.168.0.200 static domain_name_servers=192.168.0.200 __END__ + cat > $ROOTDIR/etc/init.d/loopback.sh << __END__ +#!/bin/sh -e +### BEGIN INIT INFO +# Provides: loopback +# Required-Start: mountkernfs $local_fs +# Required-Stop: $local_fs +# Default-Start: S +# Default-Stop: +# Short-Description: Raise loopback interface. +### END INIT INFO + +if [ -x /sbin/ip ]; then + ip link set lo up + exit 0 +fi +__END__ + chroot $ROOTDIR update-rc.d loopback.sh defaults + + sed -i 's/# Required-\(Start:\|Stop: \)\(.*\)/# Required-\1\2 dbus/' $ROOTDIR/etc/init.d/dnsmasq + chroot $ROOTDIR update-rc.d dnsmasq defaults + + sed -i 's/# Required-\(Start:\|Stop: \)\(.*\)/# Required-\1\2 dnsmasq dbus/' $ROOTDIR/etc/init.d/dhcpcd + chroot $ROOTDIR update-rc.d dhcpcd defaults + # pyneo-resolvconf installs new resolv.conf - revert that change cp /etc/resolv.conf $ROOTDIR/etc/resolv.conf fi From 77741ecfaad911a10d8281cf8fc44cfe19f1b620 Mon Sep 17 00:00:00 2001 From: josch Date: Sun, 29 Aug 2010 23:12:13 +0200 Subject: [PATCH 20/22] use Tektronix-like ansi color codes with tput --- pyneo-rootfs.sh | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/pyneo-rootfs.sh b/pyneo-rootfs.sh index 9454ad6..f3d439c 100755 --- a/pyneo-rootfs.sh +++ b/pyneo-rootfs.sh @@ -182,10 +182,11 @@ if [ -x /sbin/ip ]; then exit 0 fi __END__ - chroot $ROOTDIR update-rc.d loopback.sh defaults + chmod +x $ROOTDIR/etc/init.d/loopback.sh + chroot $ROOTDIR update-rc.d loopback.sh start 20 S sed -i 's/# Required-\(Start:\|Stop: \)\(.*\)/# Required-\1\2 dbus/' $ROOTDIR/etc/init.d/dnsmasq - chroot $ROOTDIR update-rc.d dnsmasq defaults + chroot $ROOTDIR update-rc.d dnsmasq start 20 2 3 4 5 . stop 80 1 sed -i 's/# Required-\(Start:\|Stop: \)\(.*\)/# Required-\1\2 dnsmasq dbus/' $ROOTDIR/etc/init.d/dhcpcd chroot $ROOTDIR update-rc.d dhcpcd defaults @@ -271,21 +272,21 @@ print_exit_status () { cols=\`expr \$cols - 8\` if [ \$1 -ne 0 ]; then tput cup \$lines \$cols - tput setf 1 + tput setaf 1 echo "[failed]" - tput sgr0 + tput op else tput cup \$lines \$cols - tput setf 2 + tput setaf 2 echo "[ done ]" - tput sgr0 + tput op fi } print_yellow () { - tput setf 3 + tput setaf 3 echo "\$1" - tput sgr0 + tput op } print_yellow "a/ aaQQaa/ a/ _a _a aajQaa _aaQQaa /_aQaaa " From c0e03a5d30dc97bbaf057c1b9ce2f1ecc2de3c66 Mon Sep 17 00:00:00 2001 From: josch Date: Sat, 25 Dec 2010 22:56:35 +0100 Subject: [PATCH 21/22] fixed X.Org evdev calibration option format --- pyneo-rootfs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyneo-rootfs.sh b/pyneo-rootfs.sh index f3d439c..cd1a180 100755 --- a/pyneo-rootfs.sh +++ b/pyneo-rootfs.sh @@ -337,7 +337,7 @@ if [ \$DEVICE = "gta01" ]; then Section "InputClass" Identifier "s3c2410 TouchScreen" MatchProduct "s3c2410 TouchScreen" - Option "Calibration" "69, 922, 950, 65" + Option "Calibration" "69 922 950 65" Option "SwapAxes" "1" EndSection __XORG__ From df52c834b242046ff4206f49c8f4b4fa9ce0fb59 Mon Sep 17 00:00:00 2001 From: josch Date: Wed, 29 Dec 2010 16:00:58 +0100 Subject: [PATCH 22/22] replace psmisc by procps --- pyneo-rootfs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyneo-rootfs.sh b/pyneo-rootfs.sh index cd1a180..d72ce3f 100755 --- a/pyneo-rootfs.sh +++ b/pyneo-rootfs.sh @@ -23,7 +23,7 @@ for APP in "cdebootstrap" "curl" "chroot"; do done # cdebotstrap -DEPS_SYSTEM="locales,udev,module-init-tools,sysklogd,klogd,psmisc,mtd-utils,ntpdate,debconf-english" +DEPS_SYSTEM="locales,udev,module-init-tools,sysklogd,klogd,procps,mtd-utils,ntpdate,debconf-english" DEPS_CONSOLE="screen,less,vim-tiny,console-tools,conspy,console-setup-mini,man-db,fbset,input-utils" #DEPS_WLAN="wpasupplicant" #DEPS_BT="bluez,bluez-utils,bluez-alsa,bluez-gstreamer"