olpc.fth question

Sridhar Dhanapalan sridhar at laptop.org.au
Wed Jun 13 09:25:28 EDT 2012


Building upon Jerry's message, you may be interested in our One
Education USB (formerly called XO-AU USB):

https://dev.laptop.org.au/projects/xo-au-usb/

The idea is to have a single USB stick with many tools that may be
needed in the field. It is designed for use by (non-technical)
teachers to manage their classroom deployments.

You can download a working version from
http://mirror.aarnet.edu.au/pub/olpc-au/XO/OE-USB/1.1/

The base version contains no OS, but the xo15 version contains OLPC
Australia's latest XO-1.5 image.

To use, extract the zip file directly to the root of a USB drive. Then
insert into a developer-unlocked XO-1.5 and boot. You should get a
boot menu from the stick.

Sridhar


On 13 June 2012 21:23, Kevin Gordon <kgordon420 at gmail.com> wrote:
>
> Jerry, James and Martin:
>
> Adam and I thank you all ... a lot  We are now 100% operational using 1 USB
> stick to update all versions of XO.  We will add some more exception
> handling and 1.75 specifics to the procedures once we return to Canada, but
> the combination of OOB 4.1 and the olpc.fth boot are making the frequent
> process of updating/enhancing things while here in Kenya just fly!!!
>
> Cheers,
>
> KG
>
> On Tue, Jun 12, 2012 at 8:00 PM, James Cameron <quozl at laptop.org> wrote:
>>
>> On Tue, Jun 12, 2012 at 11:08:29AM -0400, Kevin Gordon wrote:
>> > Disclaimer:  Newbie Forth question ....:-)
>>
>> Always welcome.
>>
>> > We are trying to create a consolidated unsecured update stick.
>>
>> I worked on a secured update drive last week, so the techniques are on
>> my mind.
>>
>> > [...]
>> > So for those coming from a non-Forth background, we have hit a road
>> > block. Is there perhaps a way to store a 'possible' command into a
>> > variable then execute that 'variable' as a command, thereby perhaps
>> > bypassing any of the apparent syntax error checking?  Unexpected
>> > end-of-line is the most common result from attempting to call within
>> > an if statement.  Or, we get copy-nand? on the 1.5 or fs-update? on
>> > the 1.0 when the command exists in the source - whether it will
>> > actually get 'called' or not ,based on the variable containing the
>> > machine type..
>>
>> evaluate or eval is a word that expects a string descriptor on the
>> stack, and then executes the string as if it were typed.
>>
>> : eval  ( adr len -- )  ...  ;
>>
>> For example:
>>
>>        ok " 8 ." eval
>>        8
>>        ok
>>
>> or
>>
>>        : install-xo-1  " copy-nand u:\fs.img"  eval  ;
>>
>> The string can be assembled from pieces rather than from literals.
>> You may find an example of that in the power log collector on the
>> wiki, which assembles filenames.
>>
>> If there is a possibility that the evaluated command may fail, you
>> should catch the exception and handle it.  Use catch for that.
>>
>> Good reference for catch and throw:
>> http://www.complang.tuwien.ac.at/anton/euroforth/ef98/milendorf98.pdf
>>
>> For example:
>>
>> : install-xo-1
>>   " copy-nand u:\fs.img"      ( adr len )
>>   ['] eval                    ( adr len 'eval )
>>   catch                       ( ??? ??? exception# | 0 )
>>   if                          ( ??? ??? )
>>      2drop                    ( )
>>      ." copy-nand failed, press any key" key drop
>>   then                        ( )
>> ;
>>
>> You might also place the exception handler higher up.
>>
>> We also have $fs-update in later XO-1.5 and XO-1.75 versions, so that
>> eval is not needed.  There is no $copy-nand .
>>
>> --
>> James Cameron
>> http://quozl.linux.org.au/
>
>
>
> _______________________________________________
> Devel mailing list
> Devel at lists.laptop.org
> http://lists.laptop.org/listinfo/devel
>



More information about the Devel mailing list