New F11 for XO-1.5 build 32

Jerry Vonau jvonau at shaw.ca
Thu Oct 22 01:53:53 UTC 2009


On Thu, 2009-10-22 at 12:20 +1100, James Cameron wrote:
> On Wed, Oct 21, 2009 at 07:57:13PM -0500, Jerry Vonau wrote:
> > On Mon, 2009-10-19 at 05:13 -0400, John Watlington wrote: [?]
> > > The expected usage model for an XO is that if there is a bootable
> > > image on the external SD card or USB, it will be booted.   If you
> > > want to boot from the internal SD card, either remove the external SD
> > > card or the bootable image installed on it.
> > > 
> > > I don't think we want to change this model.
> > > 
> > > This is currently broken, due to the way that the kernel names
> > > devices.   I believe that the proposed solution was to use udev
> > > in the initramfs image to provide stable names.
> > 
> > Think the key here is to use something like set-bootpath-dev in livecd's
> > olpc.fth to auto detect where the olpc.fth was picked up (booted?) from.
> > This is reflected in /ofw/chosen/bootpath, can some one short-cut me to
> > the source in ofw?
> 
> Not *quite* sure what you are after, but bootpath is in
> ofw/core/bootparm.fth 
> 

I've been playing around booting my XO with and without an external SD
card. If I boot the external card, the internal on get mounted as /
based on root=/dev/mmcblk0p2. While /ofw/chosen/bootpath recalls which
device used as the source for the olpc.fth file. 

With internal only:
pci/sd at c/disk at 1:\boot\vmlinuz

With both external/internal
pci/sd at c/disk at 2:\boot\vmlinuz  

I was thinking that if we could parse bootpath, kind of like
livecd-to-disk does with this...

: set-bootpath-dev  ( -- )
   " /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

   " /sd"  dn-buf  count  sindex  0>=   if
          " sd:"
   else
          " u:"
   then
   " BOOTPATHDEV" $set-macro

just with a different strings to tell the difference between the
internal and external SD cards.
 
> ...
> 
> d# 1024 buffer: path-buf
> headers
> ' path-buf  " bootpath" chosen-string
> headerless
> d# 1024 buffer: args-buf
> headers
> ' args-buf  " bootargs" chosen-string
> 
> ...
> 
> And it relates to load-path which is used in
> cpu/x86/pc/olpc/security.fth and
> cpu/x86/pc/linux.fth
> 
> (svn 1424)

Thanks, will dig more.

Jerry





More information about the Fedora-olpc-list mailing list