diff --git a/fs/etc/rc.local b/fs/etc/rc.local index 576df03..65baa15 100755 --- a/fs/etc/rc.local +++ b/fs/etc/rc.local @@ -11,6 +11,10 @@ # # By default this script does nothing. +clean(){ + systemctl poweroff +} + # Print the IP address _IP=$(hostname -I) || true if [ "$_IP" ]; then @@ -19,12 +23,13 @@ fi if [ -e /dev/sda ]; then if [ -e /dev/sdb ]; then + trap clean EXIT TERM INT cd /opt/groomer /usr/sbin/led & - # avoid possibe misuse + # avoid possible misuse /sbin/ifconfig eth0 down ./init.sh - /sbin/shutdown -P -h now + systemctl poweroff fi fi diff --git a/get_shell.exp b/get_shell.exp index 34ce874..17af2d7 100755 --- a/get_shell.exp +++ b/get_shell.exp @@ -2,7 +2,7 @@ set timeout -1 -spawn qemu-system-arm -kernel tests/140509-kernel -cpu arm1176 -m 256 -M versatilepb \ +spawn qemu-system-arm -kernel tests/140730-kernel -cpu arm1176 -m 256 -M versatilepb \ -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw console=ttyAMA0 console=ttyS0" \ -drive file=[lindex $argv 0],index=0,media=disk \ -monitor telnet:localhost:4444,server,nowait \ diff --git a/mount_image.sh b/mount_image.sh index 3ac3079..531245f 100755 --- a/mount_image.sh +++ b/mount_image.sh @@ -31,7 +31,7 @@ PARTITION_BOOT='/dev/sdd1' # If you use the img ##### Debian -IMAGE='2014-01-07-wheezy-raspbian.img' +IMAGE='2014-06-20-wheezy-raspbian.img' OFFSET_ROOTFS=$((122880 * 512)) OFFSET_BOOT=$((8192 * 512)) ##### Arch diff --git a/resize_img.md b/resize_img.md index aa87a60..231d3af 100644 --- a/resize_img.md +++ b/resize_img.md @@ -3,12 +3,12 @@ Add empty space to the image Add 2Gb -> dd if=/dev/zero bs=1024k count=2048 >> 2014-01-07-wheezy-raspbian.img +> dd if=/dev/zero bs=1024k count=2048 >> 2014-06-20-wheezy-raspbian.img Expand partition size ===================== -> fdisk 2014-01-07-wheezy-raspbian.img +> fdisk 2014-06-20-wheezy-raspbian.img Command (m for help): *p* diff --git a/tests/run.exp b/tests/run.exp index 5db4565..c4fa861 100755 --- a/tests/run.exp +++ b/tests/run.exp @@ -2,7 +2,7 @@ set timeout -1 -spawn qemu-system-arm -kernel 140509-kernel -cpu arm1176 -m 256 -M versatilepb \ +spawn qemu-system-arm -kernel 140730-kernel -cpu arm1176 -m 200 -M versatilepb \ -append "root=/dev/sdc2 panic=1 rootfstype=ext4 ro console=ttyAMA0 console=ttyS0" \ -drive file=[lindex $argv 1],index=0,media=disk \ -drive file=[lindex $argv 2],index=1,media=disk \ @@ -10,7 +10,8 @@ spawn qemu-system-arm -kernel 140509-kernel -cpu arm1176 -m 256 -M versatilepb \ -serial stdio -soundhw all -nographic \ -chardev stdio,id=mon0 -mon chardev=mon0,mode=readline \ -chardev socket,id=mon1,host=localhost,port=4444,server,nowait \ - -mon chardev=mon1,mode=control,pretty=on + -mon chardev=mon1,mode=control,pretty=on \ + -vnc 0.0.0.0:1 expect "reboot: System halted" diff --git a/tests/run.sh b/tests/run.sh index abb102c..9100b8b 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -2,7 +2,7 @@ # http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way/ -IMAGE='../2014-01-07-wheezy-raspbian.img' +IMAGE='../2014-06-20-wheezy-raspbian.img' OFFSET_ROOTFS=$((122880 * 512)) IMAGE_VFAT_NORM="testcase.vfat"