diff options
author | Martin Dengler <martin@martindengler.com> | 2009-08-18 13:39:36 (GMT) |
---|---|---|
committer | Martin Dengler <martin@martindengler.com> | 2009-08-18 13:39:36 (GMT) |
commit | 4a05b3efd6ae8996d80bd1e32596dbd30437350d (patch) | |
tree | 17cbff1b2f77186e4ab21c4bc1636c3ef636ae6e | |
parent | 84584b48e270044045f1e2604ccd32482ac40a65 (diff) |
olpc.fth now always boots from whence it was loaded
-rwxr-xr-x | bootable-tree-to-removable-img.sh | 2 | ||||
-rw-r--r-- | olpc.fth.bootmenu | 38 | ||||
-rw-r--r-- | soas-xo.ks | 44 |
3 files changed, 35 insertions, 49 deletions
diff --git a/bootable-tree-to-removable-img.sh b/bootable-tree-to-removable-img.sh index f78ff19..182345a 100755 --- a/bootable-tree-to-removable-img.sh +++ b/bootable-tree-to-removable-img.sh @@ -31,8 +31,6 @@ mount -t ext2 $device $TMP_MNT cp -a $ROOT/* $TMP_MNT -cp ../olpc.fth.bootmenu $TMP_MNT/boot/olpc.fth - umount $TMP_MNT losetup -d $device diff --git a/olpc.fth.bootmenu b/olpc.fth.bootmenu deleted file mode 100644 index 3b65688..0000000 --- a/olpc.fth.bootmenu +++ /dev/null @@ -1,38 +0,0 @@ -\ olpc.fth - -" root=mtd0 rootfstype=jffs2 console=tty0 console=ttyS0,115200 fbcon=font:SUN12x22" to boot-file -" nand:\boot\vmlinuz" to boot-device - -setup-smbios - -." Temporary boot menu for testing" cr -cr -." 1 to boot from SD" cr -." 2 to boot from USB" cr -." 3 to boot from internal NAND" cr -." 4 to boot alternate image from NAND" cr -cr -key case - [char] 1 of \ SD boot info - " ro root=/dev/mmcblk0p1 console=ttyS0,115200 console=tty0 fbcon=font:SUN12x22" to boot-file - " sd:\boot\vmlinuz" to boot-device - " sd:\boot\initrd.img" to ramdisk - endof - [char] 2 of \ USB boot info - " ro root=/dev/sda1 console=ttyS0,115200 console=tty0 fbcon=font:SUN12x22" to boot-file - " disk:\boot\vmlinuz" to boot-device - " disk:\boot\initrd.img" to ramdisk - endof - [char] 4 of \ Alternate boot image info - " ro root=mtd0 rootfstype=jffs2 console=ttyS0,115200 console=tty0 fbcon=font:SUN12x22" to boot-file - " nand:\boot-alt\vmlinuz" to boot-device - " nand:\boot-alt\initrd.img" to ramdisk - endof - ( default ) \ Default sugar boot image info - " ro root=mtd0 rootfstype=jffs2 console=ttyS0,115200 console=tty0 fbcon=font:SUN12x22" to boot-file - " nand:\boot\vmlinuz" to boot-device - " nand:\boot\initrd.img" to ramdisk -endcase - - -boot @@ -45,16 +45,42 @@ yum-presto cat > /boot/olpc.fth <<EOF \ olpc.fth -" root=mtd0 rootfstype=jffs2 console=tty0 console=ttyS0,115200 fbcon=font:SUN12x22" to boot-file -" nand:\boot\vmlinuz" to boot-device -" nand:\boot\initrd.img" to ramdisk +: set-path-macros ( -- ) + button-o game-key? if " \boot-alt" else " \boot" then pn-buf place + + " /chosen" find-package if ( phandle ) + " bootpath" rot get-package-property 0= if ( propval$ ) + get-encoded-string ( bootpath$ ) + [char] \ left-parse-string 2nip ( dn$ ) + dn-buf place ( ) + then + then + + " nand" dn-buf count sindex 0>= if + " root=mtd0 rootfstype=jffs2" + else + " root=LABEL=OLPCRoot" + then + " ROOTDEV" $set-macro +; + +: olpc-fth-boot-me + set-path-macros + ?ofw-reflash + " ro ${ROOTDEV} console=ttyS0,115200 console=tty0 fbcon=font:SUN12x22" expand$ to boot-file + " ${DN}${PN}\vmlinuz" expand$ to boot-device + " ${DN}${PN}\olpcrd.img" expand$ to ramdisk + + setup-smbios + unfreeze + dcon-unfreeze + visible + + boot +; + +olpc-fth-boot-me -setup-smbios -unfreeze -dcon-unfreeze -visible - -boot EOF # END olpc.fth |