Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/soas-xo.ks
diff options
context:
space:
mode:
authorMartin Dengler <martin@martindengler.com>2009-08-18 13:39:36 (GMT)
committer Martin Dengler <martin@martindengler.com>2009-08-18 13:39:36 (GMT)
commit4a05b3efd6ae8996d80bd1e32596dbd30437350d (patch)
tree17cbff1b2f77186e4ab21c4bc1636c3ef636ae6e /soas-xo.ks
parent84584b48e270044045f1e2604ccd32482ac40a65 (diff)
olpc.fth now always boots from whence it was loaded
Diffstat (limited to 'soas-xo.ks')
-rw-r--r--soas-xo.ks44
1 files changed, 35 insertions, 9 deletions
diff --git a/soas-xo.ks b/soas-xo.ks
index 051460c..15433aa 100644
--- a/soas-xo.ks
+++ b/soas-xo.ks
@@ -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