User talk:Wmb@firmworks.com: Difference between revisions

From OLPC
Jump to navigation Jump to search
Line 48: Line 48:


Thanks for all of the help. I modified the /boot/olpc.fth file and I now run at 564.942 MHz. per "cat /proc/cpuinfo" and I have been running memtest at that speed for several hours with no error. Memtest reports a memory speed of 512 Mbs.
Thanks for all of the help. I modified the /boot/olpc.fth file and I now run at 564.942 MHz. per "cat /proc/cpuinfo" and I have been running memtest at that speed for several hours with no error. Memtest reports a memory speed of 512 Mbs.

Q:

Ivan Krstić wrote: (on the VPRI FONC mailing list)

There was an experimental 'fastboot' branch of Open Firmware that
allowed an XO to (cold)boot a full image from a separate partition in
about 3 seconds from power-on to Linux console. Various practicalities
kept it from being used.

Is that branch still available somewhere? Is that work considered
"active", "dormant", or "dead" (i.e. OLPC does not intend to pick it up
again)?

- Felix Rabe

Revision as of 20:48, 1 June 2008

recurse, yum

Hi! In lesson 4, I might have only used the definition of factorial that used the word 'recurse', and just skipped 'recursive'. 'recurse' is ever so much nicer, don't you think?

<Mitch> I don't have a strong opinion about recurse vs. recursive. Both get the job done.

Thanks for the awesome intro to forth!

<Mitch> You're welcome, glad you like it.

Questions on building Forth firmware

How do I build the firmware? I want to add some new words and some games.

westfield@potter-pod.com

Mike Westfield

Answer:

svn co svn://openbios.org/openfirmware
cd openfirmware/cpu/x86/pc/olpc/build
make

The whole process takes less than a minute if you have a reasonably fast Internet connection.

You can put new "fload" commands in openfirmware/cpu/x86/pc/olpc/fw.bth to include the files defining your new features.

Thanks.

What I am trying to do is automatically, during a boot, over-clock my XO. What file can I modify to execute my new word or words?


Answer:

  1. If you want to build a new firmware image, you can cause it to execute your new words automatically by calling them inside the definition "startup", which is defined in the file "openfirmware/cpu/x86/pc/olpc/fw.bth
  2. Alternatively, you can do it without building new firmware simply by putting your new definitions inside the file "/boot/olpc.fth" on the boot device (which is typically the NAND FLASH, but might also be a USB key or SD card). On a system with security turned off, OFW boots by interpreting Forth source code from that file. That file normally contains code to look for updates, then sets up the cmdline and ramdisk and re-executes the "boot" command to load the kernel. You can add any additional code that you want to it. On a USB key or SD card, the "/boot/" directory is just "/boot/", but on NAND FLASH, "/boot" is a symlink to "/versions/boot/current/boot", and there is some additional trickery at the OS level to switch versions, so you may need to dig around to find the actual location of /boot/olpc.fth under Linux.


How do I get this new build into my XO?

Answer:

Put the new image on a USB key (for example in a file named "new.rom") and type:

 ok flash u:\new.rom

Thanks for all of the help. I modified the /boot/olpc.fth file and I now run at 564.942 MHz. per "cat /proc/cpuinfo" and I have been running memtest at that speed for several hours with no error. Memtest reports a memory speed of 512 Mbs.

Q:

Ivan Krstić wrote: (on the VPRI FONC mailing list)

 There was an experimental 'fastboot' branch of Open Firmware that
 allowed an XO to (cold)boot a full image from a separate partition in
 about 3 seconds from power-on to Linux console. Various practicalities
 kept it from being used.

Is that branch still available somewhere? Is that work considered "active", "dormant", or "dead" (i.e. OLPC does not intend to pick it up again)?

- Felix Rabe