*

Welcome, Guest. Please login or register.

Get your own OLPC - Buy an XO laptop on eBay!
Pages: [1]
Print
Author Topic: Original olpc.fth backup needed (Everyone)  (Read 4605 times)

Original olpc.fth backup needed (Everyone)

grey-haired-xo-user
Commenter

Posts: 8


October 14, 2009, 10:57:39 AM

Dear fellow Xoers,
while setting up my ubuntu intrepid sd-card i've accidently overwritten my /boot/olpc.fth file on the xo with something stupid.

also the /etc/fstab file. Thus, the Xo won't boot anymore.

I now need to replace these 2 files with the originals to fix the problem. It would be very nice if anyone that also uses the latest Build 802 (8.2.1) (2009-05-13) could post the 2 files in plain text here..

(if you don't know how to do, simply open up the Terminal activity, type:

Code:
su -

to change into super user mode

Code:
nano /boot/olpc.fth
or
Code:
nano /etc/fstab

to edit the olpc.fth / fstab file. Now u can simply mark the lines, and select copy from the edit menu, to paste it in here. Ctrl+X exits the Nano-Editor.

Thank you very much in advance!
greetings from germany

one grey haired xo user Smiley


p.s.: if u've accidently messed up the files yourself so it won't boot, deleting your /security/develop.sig out of the open firmware command line will fix it until you copy it in there again. the command to do so on the OFW command prompt would be:

Code:
del nand:\security\develop.sig
« Last Edit: October 14, 2009, 10:59:48 AM by grey-haired-xo-user » Logged

#1 Re: Original olpc.fth backup needed (Everyone)

XOIOWA
Senior Contributor
**
Posts: 119



October 14, 2009, 06:38:24 PM

Here are my files:

olpc.fth

Code:
\ OLPC boot script

[ifndef] do-firmware-update

: do-firmware-update  ( img$ -- )

\ Keep .error from printing an input sream position report
\ which makes a buffer@<address> show up in the error message
  ['] noop to show-error

  visible

   tuck flash-buf  swap move   ( len )

   ['] ?image-valid  catch  ?dup  if    ( )
      visible
      red-letters
      ." Bad firmware image file - "  .error
      ." Continuing with old firmware" cr
      black-letters
      exit
   then

   true to file-loaded?

   d# 12,000 wait-until   \ Wait for EC to notice the battery

   ['] ?enough-power  catch  ?dup  if
      visible
      red-letters
      ." Unsafe to update firmware now - " .error
      ."  Continuing with old firmware" cr
      black-letters
      exit
   then

   " Updating firmware" ?lease-debug-cr

   ec-indexed-io-off?  if
      visible
      ." Restarting to enable SPI FLASH writing."  cr
      d# 3000 ms
      ec-ixio-reboot
      security-failure
   then

   \ Latch alternate? flag for next startup
   alternate?  if  [char] A h# 82 cmos!  then

   reflash      \ Should power-off and reboot
   show-x
   " Reflash returned, unexpectedly" .security-failure
;

[then]

[ifndef] ?ofw-reflash
\ Check for new firmware.
: ?ofw-reflash  ( -- )
   " ${DN}${PN}\bootfw.zip" expand$
   ['] (boot-read) catch  if  2drop exit  then
   img$  firmware-up-to-date?  if  exit  then
   img$ do-firmware-update
;

[then]

: set-path-macros  ( -- )
   button-o game-key?  if  " \boot-alt"  else  " \boot"  then  pn-buf place

   " /chosen" find-package  if                       ( phandle )
      " bootpath" rot  get-package-property  0=  if  ( propval$ )
         get-encoded-string                          ( bootpath$ )
         [char] \ left-parse-string  2nip            ( dn$ )
         dn-buf place                                ( )
      then
   then

   " nand"  dn-buf count  sindex  0>=   if
      " root=mtd0 rootfstype=jffs2"
   else
      " root=LABEL=OLPCRoot rootfstype=ext3"
   then
   " ROOTDEV" $set-macro
;

: olpc-fth-boot-me
   set-path-macros
   ?ofw-reflash
   " ro ${ROOTDEV} console=ttyS0,115200 console=tty0 fbcon=font:SUN12x22" expand$ to boot-file
   " ${DN}${PN}\vmlinuz"    expand$ to boot-device
   " ${DN}${PN}\olpcrd.img" expand$ to ramdisk
   boot
;
olpc-fth-boot-me

/etc/fstab

Code:
mtd0                    /                       jffs2    defaults,noatime 1 1
none /ofw  promfs defaults 0 0

devpts                  /dev/pts                devpts  gid=5,mode=620    0 0
tmpfs                   /dev/shm                tmpfs   defaults,size=15% 0 0
proc                    /proc                   proc    defaults          0 0
sysfs                   /sys                    sysfs   defaults          0 0

I hope that helps.
Logged

#2 Re: Original olpc.fth backup needed (Everyone)

Eddie Owens
Contributor
*
Posts: 94


October 14, 2009, 07:28:29 PM

Did you completely set up your Ubuntu Intrepid, so that you can boot from it?
If so you ought to be able to access the NAND:  and copy/paste in the files from the board here.

Or if you have another computer and a fresh USB stick, you could simply do a clean install of the OS, as described here:

http://wiki.laptop.org/go/Clean-install_procedure (but you will lose your developer's key if it is not backed up externally).

And as far as the olpc.fth is concerned, here is a "Multiboot" version that works well whether placed on SD card or USB stick, and will allow you to boot from either of those or the NAND: as well:

http://www.olpcnews.com/forum/index.php?topic=2375.msg20473#msg20473

I have the Multiboot version on my Teapot's Ubuntu and it works well
Logged

#3 Re: Original olpc.fth backup needed (Everyone)

grey-haired-xo-user
Commenter

Posts: 8


October 15, 2009, 10:10:00 AM

thank you very much you two, unfortunately none of it worked, not even the multiboot file from the forum. i tried to set up Ubuntu along wih http://wiki.laptop.org/go/Installing_Ubuntu_using_Compressed_Files but nothing happens. As after many tries the Terminal app went white with every start as well, i reinstalled Sugar 802 and made a backup of the 2 files this time

olpc.fth:
Code:
\ OLPC boot script

[ifndef] do-firmware-update

: do-firmware-update  ( img$ -- )

\ Keep .error from printing an input sream position report
\ which makes a buffer@<address> show up in the error message
  ['] noop to show-error

  visible

   tuck flash-buf  swap move   ( len )

   ['] ?image-valid  catch  ?dup  if    ( )
      visible
      red-letters
      ." Bad firmware image file - "  .error
      ." Continuing with old firmware" cr
      black-letters
      exit
   then

   true to file-loaded?

   d# 12,000 wait-until   \ Wait for EC to notice the battery

   ['] ?enough-power  catch  ?dup  if
      visible
      red-letters
      ." Unsafe to update firmware now - " .error
      ."  Continuing with old firmware" cr
      black-letters
      exit
   then

   " Updating firmware" ?lease-debug-cr

   ec-indexed-io-off?  if
      visible
      ." Restarting to enable SPI FLASH writing."  cr
      d# 3000 ms
      ec-ixio-reboot
      security-failure
   then

   \ Latch alternate? flag for next startup
   alternate?  if  [char] A h# 82 cmos!  then

   reflash      \ Should power-off and reboot
   show-x
   " Reflash returned, unexpectedly" .security-failure
;

[then]

[ifndef] ?ofw-reflash
\ Check for new firmware.
: ?ofw-reflash  ( -- )
   " ${DN}${PN}\bootfw.zip" expand$
   ['] (boot-read) catch  if  2drop exit  then
   img$  firmware-up-to-date?  if  exit  then
   img$ do-firmware-update
;

[then]

: set-path-macros  ( -- )
   button-o game-key?  if  " \boot-alt"  else  " \boot"  then  pn-buf place

   " /chosen" find-package  if                       ( phandle )
      " bootpath" rot  get-package-property  0=  if  ( propval$ )
         get-encoded-string                          ( bootpath$ )
         [char] \ left-parse-string  2nip            ( dn$ )
         dn-buf place                                ( )
      then
   then

   " nand"  dn-buf count  sindex  0>=   if
      " root=mtd0 rootfstype=jffs2"
   else
      " root=LABEL=OLPCRoot rootfstype=ext3"
   then
   " ROOTDEV" $set-macro
;

: olpc-fth-boot-me
   set-path-macros
   ?ofw-reflash
   " ro ${ROOTDEV} console=ttyS0,115200 console=tty0 fbcon=font:SUN12x22" expand$ to boot$
   " ${DN}${PN}\vmlinuz"    expand$ to boot-device
   " ${DN}${PN}\olpcrd.img" expand$ to ramdisk
   boot
;
olpc-fth-boot-me

and fstab
Code:
mtd0                    /                       jffs2    defaults,noatime 1 1
none /ofw  promfs defaults 0 0

devpts                  /dev/pts                devpts  gid=5,mode=620    0 0
tmpfs                   /dev/shm                tmpfs   defaults,size=15% 0 0
proc                    /proc                   proc    defaults          0 0
sysfs                   /sys                    sysfs   defaults          0 0

i try to setup teapots ubuntu tomorrow (when i find it Smiley)

thank you 2 alot,
oghxousr
Logged

#4 Re: Original olpc.fth backup needed (Everyone)

Eddie Owens
Contributor
*
Posts: 94


October 15, 2009, 07:07:15 PM



Teapot's Ubuntu instructions are here:  http://www.olpcnews.com/forum/index.php?topic=4053 .

If you have not done so already,  request your developer's key (it may take a couple of days to get it).  The link with info on how to get it are in Teapot's instructions.

I should add that it is probably a good idea to hang on to your Sugar 8.2.0 fresh install source.  More than a few people find that they somehow manage to clobber their NAND: Sugar installation more than once.  And when you get your developer's key, put it in a safe place also.

Have fun!
Logged

#5 Re: Original olpc.fth backup needed (Everyone)

grey-haired-xo-user
Commenter

Posts: 8


October 22, 2009, 10:20:43 AM

thanks again! i finally installed teapots ubuntu (i gave it a try some time ago, but i had sticky keys so i couldnt work with it) and it works like a charm!!

it took abit to set it up with all the applications i like and to find out how to increase the speed. it sometimes sill is slow as heck, but much more convinient then sugar (depending on what u want to do with it, of course)

i run opera which speed is quite good (the same as under sugar if not faster) now and found some fun games like jumpnbump netpanzer or progress quest (haha) that run very smoothly! over all its a better system to get in touch with linux, with the manpages and all. feels more homely with a desktop.

if only i could find out how to stretch fullscreen-games to the whole display and how to disable wireless at startup... hmm

greetings,
oghxousr
Logged
Pages: [1]
Print
Jump to:  

Members
Total Members: 2406
Latest: sembik
Stats
Total Posts: 31943
Total Topics: 3843
Online Today: 29
Online Ever: 238
(April 18, 2011, 09:48:50 PM)
Users Online
Users: 0
Guests: 22
Total: 22