Custom bootloader: Difference between revisions

From OLPC
Jump to navigation Jump to search
(New page: This is the boot script for the olpc. It is normally ofund on the nand, in /boot. Open firmware first searches for this file on a usb stick, then on a sd card, and finally on the nand. ...)
 
m (Olpc.fth moved to Custom bootloader: I think it will fit in better in the wiki)
(No difference)

Revision as of 11:09, 8 April 2008

This is the boot script for the olpc. It is normally ofund on the nand, in /boot.

Open firmware first searches for this file on a usb stick, then on a sd card, and finally on the nand. Below are found a commonly used script to allow for booting from a variety of locations.

\ 
\ Uber bootscript for OLPC  Place in /boot as olpc.fth
\
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 dup drop dup dup
31 = if 
\ SD boot info
  " ro root=/dev/mmcblk0p1 rootdelay=1 console=ttyS0,115200 console=tty0 fbcon=font:SUN12x22" to boot-file
  " sd:\boot\vmlinuz" to boot-device
  " sd:\boot\olpcrd.img" to ramdisk
else 32 = if 
\ USB boot info
  " ro root=/dev/sda1 rootdelay=1 console=ttyS0,115200 console=tty0 fbcon=font:SUN12x22" to boot-file
  " disk:\boot\vmlinuz" to boot-device
  " disk:\boot\olpcrd.img" to ramdisk
else 34 = if 
\ Alternate boot image info
   " ro root=mtd0 console=ttyS0,115200 console=tty0 fbcon=font:SUN12x22" to boot-file
   " nand:\boot-alt\vmlinuz" to boot-device
   " nand:\boot-alt\olpcrd.img" to ramdisk
else 
\ Default into boot as sugar
   " ro root=mtd0 console=ttyS0,115200 console=tty0 fbcon=font:SUN12x22" to boot-file
   " nand:\boot\vmlinuz" to boot-device
   " nand:\boot\olpcrd.img" to ramdisk
then
then
then 
unfreeze
boot
\ end of script