Custom bootloader
Jump to navigation
Jump to search
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.
Boot location
\ \ 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
overclock
You can also overclock your OLPC with the olpc.fth file. In order to accomplish this you need to set your timings before it loads the operating system. You must add some numbers to the forth stack and when write these registers using wmrsr. Shown below is a specific overclock frequency and that can be changed by altering the middle number to what you find below in the overclock table.
7de009e 5dd 4c000014 wrmsr
You then add in any specific booting information you want (see above).
XO-1 Overclock Settings in MHz; default is 433/166 (4d9) |
|||||
CPU | Bus Speed | ||||
133 | 166 | 200 | 216 | 233 | |
333 | 3d3 | 4d3 | 5d3 | 653 | 6d3 |
366 | 3d5 | 4d5 | 5d5 | 655 | 6d5 |
400 | 3d7 | 4d7 | 5d7 | 657 | 6d7 |
433 | 3d9 | 4d9 | 5d9 | 659 | 6d9 |
466 | 3db | 4db | 5db | 65b | 6db |
500 | 3dd | 4dd | 5dd | 65d | 6dd |
533 | 3df | 4df | 5df | 65f | 6df |
566 | 3e1 | 4e1 | 5e1 | 661 | 6e1 |