quick and dirty multiboot SD card?

i know there's a multiboot BB image that was used for the 2008 ESC
conference, available here:

  http://beagleboard.org/esc

but if i wanted to put together my own multiboot SD card, is it as
simple as

  * FAT partition with multiple kernel images with different names
  * multiple following ext2/3 partitions, each with its own
    root filesystem
  * always using x-boot and u-boot in NAND, and reconfiguring
    the u-boot parameters there whenever i want to switch

it seems straightforward enough. would that work? if so, i'm happy
to run out and grab a 16G SD card and throw everything i care about
onto that.

rday

p.s. as i read it, the ESC image has more cleverness built into it,
but i'm just asking about a really fundamental way to support
multiboot. will the bootloaders in NAND handle this? thanks.

  i know there's a multiboot BB image that was used for the 2008 ESC
conference, available here:

  ESC Build Your Own Embedded System online registration deadline 3/25 - BeagleBoard

but if i wanted to put together my own multiboot SD card, is it as
simple as

  * FAT partition with multiple kernel images with different names
  * multiple following ext2/3 partitions, each with its own
    root filesystem
  * always using x-boot and u-boot in NAND, and reconfiguring
    the u-boot parameters there whenever i want to switch

it seems straightforward enough. would that work? if so, i'm happy
to run out and grab a 16G SD card and throw everything i care about
onto that.

I am doing multiboot on BUG. MicroSD card is split to 4 partitions -
each has rootfs and kernel in /boot directory.

pri

bootcmd=ethinit;run bootmmc;bootm 0x80800000
bootmmc=mmcinfo;ext2load mmc 0:${bootmmcpart} 0x80800000 /boot/uImage
bootargs=console=ttymxc4,115200 rootdelay=1 root=/dev/mmcblk0p2
bootmmcpart=2

As you see to boot different partition I have to change two variables
'bootmmcpart' to select where from to take kernel and 'bootargs'.

Regards,

sorry, i don't know of this "BUGboot" of which you speak, i'll check
into it. my plan was to use simple u-boot, use the NAND-resident
x-boot and u-boot, put all my kernel images into the first partition,
and their respective root filesystems into subsequent partitions. is
there any reason that wouldn't work? then, on each boot, i could
simply modify the kernel image name and root= parameter to get
whatever combination i wanted. is anyone else doing that? i see no
reason that that wouldn't work.

rday

I am 99.9% certain that "BUGboot" is u-boot with a custom prompt.

Philip

That should work… You might want to do things slightly differently … I have U-Boot (loaded from SD card) load a script from the SD card and run it. That then sets all the various options for bootargs and loads the relevant kernel image and boots it. This gives me the advantage that from within Linux I can swap files around and change the U-Boot version / the boot script file and then just “reboot” knowing that it will come back into the right OS / kernel / root… (and I’m using a 32Gb SD card with no problems :slight_smile:

Thats U-Boot prompt.

Regards,

care to share that script? i suspect it's precisely what i'm
looking for, and was about to re-invent.

rday

Sure… I’ll tidy it up to use a simple config file and then post it tomorrow when I’m back with my Beagle…

This is the script I’ve been using for simple multiboot card: http://pastebin.org/4802
With some notes: http://pastebin.org/4807

Enjoy,

Mike

Just occurred to me that the U-Boot environment needs to be blank in NAND for this to work… if you want to boot exclusively off the SD card then do a “nand erase”…

or, IIRC, just hold down the "user" button to boot off of the SD,
no? or am i misremembering?

rday

Michael,

Sorry if my question is stupid, but I’m a newbie in embedded Linux. I understood that your script only enables the use of a single root filesystem… Am I right ? How difficult is to add to your script the possibility to switch also the root filesystem ? I mean, it should be nice to have Android, Ubuntu, Angstrom, etc…, all installed in a same card !!
Thanks,
Siqueira

Pressing the user button will load MLO from SD, which might load u-boot from SD, but it will still keep using the u-boot env in NAND.

regards,

Koen

whoops, quite right, sorry for the misinformation.

rday

You can have lots of root filesystems… just change which partition is being used in the config file… (mmcblk0p2 → mmcblk0p3, or 4 or 5) The script doesn’t stop bootup like say Grub would but rather lets you reconfigure what will happen after a reboot…

I don’t know if Android has “mkimage”. If it doesn’t then you’ll need to copy it across or compile it otherwise you’ll be stuck in Android.