Is it possible to boot alternative OS from an USB stick?

Mitch Bradley wmb at laptop.org
Sun Aug 24 22:00:07 EDT 2008


Bert Freudenberg wrote:
> Am 24.08.2008 um 11:39 schrieb Hilaire Fernandes:
>
>   
>> > I am at the Smalltalk Camp in Amsterdam, with SqueakNOS colleagues we
>> > try to start XO machine with SqueakNOS operating system.
>> >
>> > We don't find the key sequence to boot on USB. We will keep searching
>> > but if any of you have direct pointer, thanks.
>>     
>
>
> The XO does not have a traditional BIOS, so its boot sequence is  
> different from normal PCs. It is running Open Firmware written in  
> Forth, and the actual boot can be customized by editing the boot/ 
> olpc.fth script on your USB stick:
>
> http://wiki.laptop.org/go/Olpc.fth
>
> You would need to write Forth code to load SqueakNOS and execute it.
>
> - Bert -
>
>   

Open Firmware can boot ELF binaries directly.  Put your .elf file in the 
root directory on a USB key that is formatted with either a FAT 
filesystem (preferred) or an ext2 filesystem.  Then, on an unsecured XO 
laptop, type:

ok boot u:\myprogram.elf

In the case of SqueakNOS, you will also have to deal with the fact that 
the screen resolution is 1200x900.  According to my reading of the 
SqueakNOS docs on the web, it only supports 1024x768 at present.

You will also face the problem that none of the XO's mass storage 
devices (NAND FLASH, SD card, USB mass storage) or network devices (USB 
wireless LAN, USB wired network interfaces) are on the SqueakNOS 
supported list.

One quick way to address that would be to build a simple call gateway 
whereby Squeak could call the OFW "client interface" and thus use the 
OFW drivers for those devices.  OFW has drivers for every builtin device 
on the XO, and for quite a few plugin USB devices.   The OFW client 
interface is called via a single subroutine entry point, passing a 
single argument - a pointer to an array that tells which subfunction to 
invoke and provides argument and result pointers.  From C, the only 
assembly language necessary is a couple of instructions in the early 
startup, to move the address of the gateway routine from a register to a 
variable from whence it can be later called as an indirect function.




More information about the Devel mailing list