[Bootloader] U-boot for the multi-boot support

Search This thread

sp3dev

Senior Member
Jul 11, 2006
554
675
Kaluga/Moscow
Hi!

As with Galaxy S2, I have ported the u-boot bootloader to the Galaxy Nexus. It can be chainloaded from samsung bootloader (loaded instead of linux kernel) safely.
It could be useful to have multiple ROMs on one device or test other OS like Ubuntu or Genode.
Detailed installation guide is available at Ksys Labs LLC wiki http://ksyslabs.org/doku.php?id=gnex_uboot .I'll just copy-paste it here

Happy hacking and don't forget to visit our wiki at http://ksyslabs.org !

===== Rationale ======
There were a couple reasons to port u-boot to Galaxy Nexus
* Security: we cannot trust the proprietary samsung bootloader
* Implementing dual-boot for original and custom firmware
* Booting Genode operating system

===== Demo =====

===== Compilation from source =====
Source code is in https://github.com/Ksys-labs/uboot-tuna

There exist two branches of interest
* master - contains the official stable releases. may be force-pushed and rebased, beware
* tuna-fosdem-hacks contains the u-boot that was used for FOSDEM 2013 to demo booting Genode

To compile, you need to have the ARM cross-compiler. I recommend codesourcery 2010q1-188 because that's what I'm using and some users reported that newer compilers produce broken binaries.

There are two ways to use the u-boot. One is flashing it instead of the Samsung SBL bootloader. The other one is chainloading it from the SBL.

Flashing instead of SBL has the following advantages
* Faster boot time than chainloading
* Ability to use the standard partitioning layout

There is a number of issues and therefore we do not recommend flashing it instead of SBL
* No Fastboot support (preliminary USB RNDIS and DHCP BOOTP support is available), you'll have to use OMAPFlash to restore the device if you flash a non-working kernel
* No display initialization. You'll have to disable the "Check for Bootloader initialization" option in kernel config


By default, the chainloaded version is compiled. It is loaded (by the SBL) to the address **0x81808000**.

If you want to build the SBL replacement version, edit the **include/configs/omap4_tuna.h** file and uncomment the **#define TUNA_SPL_BUILD** line. X-loader loads the bootloader to the address **0xa0208000**.

Code:
    export PATH=/home/alexander/handhelds/armv6/codesourcery/bin:$PATH
    export ARCH=arm
    export CROSS_COMPILE=arm-none-eabi-
    
    U_BOARD=omap4_tuna
    make clean
    make distclean
    
    make ${U_BOARD}_config
    make -j8 ${U_BOARD}
    mkbootimg --kernel u-boot.bin --ramdisk /dev/null -o u-boot.aimg

===== Installation =====
==== Chainloaded Mode ====
You'll need the root access to your device.

You can take the prebuilt u-boot here. http://ksyslabs.org/lib/exe/fetch.php?media=gnex-uboot-chainloaded.img

The u-boot has the support for android boot images. When flashed instead of the SBL, it boots the kernel off the "Boot" partition. When chainloaded, it looks for the kernel in **/system/boot/vmlinux.uimg** . Additionally, it first looks for the **/system/boot/boot.scr.uimg** so you can put custom commands there and override the kernel image.


It also supports booting custom images from **/sdcard/boot/vmlinux.uimg** and **/sdcard/boot/boot.scr.uimg**


If you need larger images, I suggest that you use the **tuna-fosdem-hacks** branch, format the cache partition to ext2 and put the files to **/cache/media/boot/**

push the files to your device via adb
Code:
    adb push gnex-uboot-chainloaded.img /sdcard/
    adb hell

now, in the device shell, do the following
Code:
    su
    cat /dev/block/platform/omap/omap_hsmmc.0/by-name/boot > /sdcard/vmlinux.uimg
    mount -o remount,rw /system
    mkdir /system/boot
    cp /sdcard/vmlinux.uimg /system/boot/
    cat /sdcard/gnex-uboot-chainloaded.img > /dev/block/platform/omap/omap_hsmmc.0/by-name/boot
    sync
    reboot

Instead of installing gnex-uboot-chainloaded.img via dd, you can use fastboot
Code:
fastboot flash:raw boot u-boot.img

===== Replacing samsung bootloader =====
OMAP4 devices cannot be bricked completely because the CPU has a firmware loader in the OTP (one-time programmable) memory. When the device is powered, it tries booting from USB.

Make sure to have an old version of x-loader (PRIMEKK14) because newer ones have the security hole which allowed booting unsigned bootloaders fixed. The installation procedure is roughly the same, but use **sbl** partition. And also install xloader from http://ksyslabs.org/lib/exe/fetch.php?media=gnex-xloader-working.img


Code:
    adb push gnex-xloader-working.img /sdcard/

Code:
    cat /sdcard/gnex-xloader-working.img > /dev/block/platform/omap/omap_hsmmc.0/by-name/xloader

There exists a Samsung recovery tool which can unbrick the devices with corrupted xloader/SBL. You will need a computer running Windows XP.

Search the internet for the archive named "OMAPFlash_tuna.zip" which has md5 "ddbf07a1d36b044c40af5788a83b5395". We cannot upload it here because of the unclear license status.


===== Making images =====
You can either use Android's mkbootimg to produce ANDROID! type images (not recommended) or u-boot's mkimage (in the u-boot tools directory) to make boot images. Using ANDROID! format is discouraged because the loader code in the u-boot is buggy and may fail in some corner cases such as large images.

==== making a custom boot image ====
Code:
    mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n linux -d zImage vmlinux.uimg
    
    #alternatively, just do that when compiling linux
    #do not forget to add mkimage to your PATH variable
    make uImage

==== making a custom boot script ====
Code:
    mkimage -A arm -O linux -T script -C none -a 0x84000000 -e 0x84000000 -n android -d boot.scr boot.scr.uimg

===== Booting Modes =====
The bootloader supports several boot modes. Each boot mode is indicated by the color of the LED and activated by a combination of hardware buttons. It also supports the Android "reboot to recovery" and "reboot to bootloader" features

* Normal Boot -> no keys are pressed, cyan LED
* Recovery Boot -> Volume Up key pressed, green LED
* Custom Boot -> Volume Down key pressed, blue LED
* USB RNDIS mode -> both Volume keys pressed, purple LED

===== Pitfalls =====
* No Fastboot or DFU (RNDIS BOOTP is untested) -> not a big deal if you're chainloading, right?
* Serial number is always 0123456789abcdef or sth like that. Anyone to fix that?
* UART support is quirky. The device will likely hang if booted with the UART cable. Workaround: boot without the UART cable and plug right after the purple LED flashes.

===== A sample boot script for android =====
Make a boot.scr.uimg from it and push it to the correct location.
Code:
    setenv bootargs "mem=1G vmalloc=768M omap_wdt.timer_margin=30 mms_ts.panel_id=18
    no_console_suspend console=ttyFIQ0";
    setenv loaddaddr 0x82000000;
    setenv devtype mmc;
    setenv devnum 0;
    setenv kernel_part 0xc;
    setenv kernel_name /media/boot/vmlinux.uimg;
    
    echo Load Address: ${loaddaddr};
    echo cmdline:${bootargs};
    if ext4load ${devtype} ${devnum}:${kernel_part} ${loaddaddr} ${kernel_name}; then
    	bootm ${loaddaddr};
    	exit 0;
    elif ext2load ${devtype} ${devnum}:${kernel_part} ${loaddaddr} ${kernel_name}; then
    	bootm ${loaddaddr};
    	exit 0;
    else
    	echo failed to boot custom image;
    fi
 
Last edited:

Carlos_Manuel

Senior Member
Apr 28, 2011
4,092
5,368
25
Kuressaare
Nice!

Before there actually wasn't any dual boot stuff for Nexus but now there is really much....

I will laugh if someone ports still another dual boot loader to Nexus, E.g BootiQi dual boot loader or what it is..., (for Jét it is JétQi) but I don't remember the original dual boot files names...
 

savantist

Senior Member
Jan 2, 2012
154
52
Jakarta
about.me

sp3dev

Senior Member
Jul 11, 2006
554
675
Kaluga/Moscow
I wanna use the chainloaded method, so first thing I should do is fastboot-ing that .img just like another bootloader file? then chainload the u-boot file?

but it looks like I'm replacing samsung SBL (replacing SBL method) if I do that, doesn't it?

Yes, you can actually fastboot it via
"fastboot flash:raw boot u-boot.img"

and no, you don't need to mess with xloader for chainloading
 
  • Like
Reactions: savantist

fauntelroy

Senior Member
Mar 2, 2010
108
53
finally "The Great Sp3dev"
nice work like always,
playing with it now,let's see where it goes


Sent from my Galaxy Nexus using xda premium
 

dlhxr

Senior Member
May 26, 2011
558
508
New York City
OnePlus One
OnePlus 3
The latter one is the one I'm using on my phone so it should work.

ah, I bricked my phone with your gnex-xloader-working using following script... It is only 128K. Is that right?
Code:
cat /sdcard/gnex-xloader-working.img > /dev/block/platform/omap/omap_hsmmc.0/by-name/xloader
Is PRIMEKK14 bootloader the only one to work since we only have http://forum.xda-developers.com/showthread.php?t=1587498 this thread for bootloader and there's no flashable version of PRIMEKK14?

I use OMAPFlash to save it having PRIMEKK15 bootloader and I do not have the courage to do it again...:(
 
  • Like
Reactions: savantist

sp3dev

Senior Member
Jul 11, 2006
554
675
Kaluga/Moscow
ah, I bricked my phone with your gnex-xloader-working using following script... It is only 128K. Is that right?
Code:
cat /sdcard/gnex-xloader-working.img > /dev/block/platform/omap/omap_hsmmc.0/by-name/xloader
Is PRIMEKK14 bootloader the only one to work since we only have http://forum.xda-developers.com/showthread.php?t=1587498 this thread for bootloader and there's no flashable version of PRIMEKK14?

I use OMAPFlash to save it having PRIMEKK15 bootloader and I do not have the courage to do it again...:(

Oh well, I specially edited the post so that chainloaded users don't flash loader. You only need the xloaded if you flash u-boot instead of SBL. Otherwise, treat u-boot just as linux kernel.

As for replacing bootloader, I guess PRIMEKK15 should also work, I just didn't notice when the security check was introduced. Yeah, use OMAPFlash to recover anyway. And note that you cannot use my precompiled u-boot to replace SBL. As written in the beginning of the post, you need to change a define in config and recompile because the load address and partition layout are different for chainloading and direct booting cases.
 

dlhxr

Senior Member
May 26, 2011
558
508
New York City
OnePlus One
OnePlus 3
Oh well, I specially edited the post so that chainloaded users don't flash loader. You only need the xloaded if you flash u-boot instead of SBL. Otherwise, treat u-boot just as linux kernel.

As for replacing bootloader, I guess PRIMEKK15 should also work, I just didn't notice when the security check was introduced. Yeah, use OMAPFlash to recover anyway. And note that you cannot use my precompiled u-boot to replace SBL. As written in the beginning of the post, you need to change a define in config and recompile because the load address and partition layout are different for chainloading and direct booting cases.

Some feedback here. I flashed u-boot to boot partition and save the original boot image to /system/boot/vmlinux.uimg.
Without any key pressed it shows
Code:
Wrong Image Format for boot command
Error: can't get kernel image!
Not booting xxxxxxxxx
Fail to boot
The characters on the screen does not show well and some of them can't be recognized....:(
When I press the volume up, it boot into recovery.
When I press the volume down, it shows
Code:
File not found /media/boot/vmlinux.uimg
Unrecognized filesystem type
Fail to boot
Something is wrong with my procedure?:confused:
 

dlhxr

Senior Member
May 26, 2011
558
508
New York City
OnePlus One
OnePlus 3
Another small question. I want to make a zip to flash the U-boot, but always failed. I have to use fastboot command to flash gnex-uboot-chainloaded.img to boot.img.
What is in my updater-script.
Code:
mount("ext4", "EMMC", "/dev/block/platform/omap/omap_hsmmc.0/by-name/system", "/system");
package_extract_file("gnex-uboot-chainloaded.img", "/tmp/gnex-uboot-chainloaded.img");
package_extract_file("META-INF/com/google/android/switch_boot.sh", "/tmp/switch_boot.sh");
set_perm(0, 0, 0777, "/tmp/switch_boot.sh");
run_program("/tmp/switch_boot.sh");
set_perm(0, 0, 0777, "/system/boot/vmlinux.uimg");
unmount("/system");
What is in my switch_boot.sh
Code:
#!/sbin/sh
cat /dev/block/platform/omap/omap_hsmmc.0/by-name/boot > /tmp/vmlinux.uimg
mkdir /system/boot
cp /tmp/vmlinux.uimg /system/boot/
cat /tmp/gnex-uboot-chainloaded.img /dev/block/platform/omap/omap_hsmmc.0/by-name/boot

It seems the last line doesn't work...
Code:
cat /tmp/gnex-uboot-chainloaded.img /dev/block/platform/omap/omap_hsmmc.0/by-name/boot

If I use the following command in updater-script,
Code:
package_extract_file("gnex-uboot-chainloaded.img", "/dev/block/platform/omap/omap_hsmmc.0/by-name/boot");
The device enters bootloader directly showing no boot image after reboot....
 

sp3dev

Senior Member
Jul 11, 2006
554
675
Kaluga/Moscow
If I use the following command in updater-script,
Code:
package_extract_file("gnex-uboot-chainloaded.img", "/dev/block/platform/omap/omap_hsmmc.0/by-name/boot");
The device enters bootloader directly showing no boot image after reboot....

That's because SBL expects the boot partition to contain the image in ANDROID! format. It creates the image itself when you flash via fastboot with the ":raw" suffix.

Try that
Code:
mkbootimg --kernel gnex-uboot-chainloaded.img --ramdisk /dev/null -o u-boot.aimg

Not sure why the original boot image didn't work for you. Are you copying the boot.img to vmlinux.uimg or the raw zImage? you should do the former, the u-boot expects either the "ANDROID!" image or the one made with mkimage.

If anything, you could try repacking the boot image yourself or try mine to see if it boots (it's for jb 4.1.1 though)
http://rghost.ru/44686398
 

savantist

Senior Member
Jan 2, 2012
154
52
Jakarta
about.me
chainloading method, in fact it works on PRIMELC03 too... :confused:

btw,
if I flash the xloader (replacing bootloader method), then how am I gonna back to original samsung bootloader/PRIMELC03 since there isn't fastboot support in your u-boot bootloader?
using odin? or omapflash? :crying:

thanks.
 

sp3dev

Senior Member
Jul 11, 2006
554
675
Kaluga/Moscow
chainloading method, in fact it works on PRIMELC03 too... :confused:
ok, I probably didn't make it clear enough. chainloading works with any bootloader and is safe.

btw,
if I flash the xloader (replacing bootloader method), then how am I gonna back to original samsung bootloader/PRIMELC03 since there isn't fastboot support in your u-boot bootloader?
using odin? or omapflash? :crying:

thanks.

if you can boot android or recovery, thenuse dd it to /dev/block/blah-blah-blah, otherwise - omapflash.
 

savantist

Senior Member
Jan 2, 2012
154
52
Jakarta
about.me
ok, I probably didn't make it clear enough. chainloading works with any bootloader and is safe.

if you can boot android or recovery, thenuse dd it to /dev/block/blah-blah-blah, otherwise - omapflash.

you wrote it on wrong part on first page yesterday, makes me little bit confused, but it's corrected now... :D
but to do "replacing bootloader method", one should flash PRIMEKK14 or PRIMEKK15 bootloader before, right?

wow... omapflash... :(
 

sp3dev

Senior Member
Jul 11, 2006
554
675
Kaluga/Moscow
you wrote it on wrong part on first page yesterday, makes me little bit confused, but it's corrected now... :D
but to do "replacing bootloader method", one should flash PRIMEKK14 or PRIMEKK15 bootloader before, right?

wow... omapflash... :(

well, some bootloaders after PRIMEKK may work, but I have not tested and we had some new phones with the recent firmware versions from stock, and u-boot failed to work there until xloader was downgraded
 

Top Liked Posts

  • There are no posts matching your filters.
  • 16
    Hi!

    As with Galaxy S2, I have ported the u-boot bootloader to the Galaxy Nexus. It can be chainloaded from samsung bootloader (loaded instead of linux kernel) safely.
    It could be useful to have multiple ROMs on one device or test other OS like Ubuntu or Genode.
    Detailed installation guide is available at Ksys Labs LLC wiki http://ksyslabs.org/doku.php?id=gnex_uboot .I'll just copy-paste it here

    Happy hacking and don't forget to visit our wiki at http://ksyslabs.org !

    ===== Rationale ======
    There were a couple reasons to port u-boot to Galaxy Nexus
    * Security: we cannot trust the proprietary samsung bootloader
    * Implementing dual-boot for original and custom firmware
    * Booting Genode operating system

    ===== Demo =====

    ===== Compilation from source =====
    Source code is in https://github.com/Ksys-labs/uboot-tuna

    There exist two branches of interest
    * master - contains the official stable releases. may be force-pushed and rebased, beware
    * tuna-fosdem-hacks contains the u-boot that was used for FOSDEM 2013 to demo booting Genode

    To compile, you need to have the ARM cross-compiler. I recommend codesourcery 2010q1-188 because that's what I'm using and some users reported that newer compilers produce broken binaries.

    There are two ways to use the u-boot. One is flashing it instead of the Samsung SBL bootloader. The other one is chainloading it from the SBL.

    Flashing instead of SBL has the following advantages
    * Faster boot time than chainloading
    * Ability to use the standard partitioning layout

    There is a number of issues and therefore we do not recommend flashing it instead of SBL
    * No Fastboot support (preliminary USB RNDIS and DHCP BOOTP support is available), you'll have to use OMAPFlash to restore the device if you flash a non-working kernel
    * No display initialization. You'll have to disable the "Check for Bootloader initialization" option in kernel config


    By default, the chainloaded version is compiled. It is loaded (by the SBL) to the address **0x81808000**.

    If you want to build the SBL replacement version, edit the **include/configs/omap4_tuna.h** file and uncomment the **#define TUNA_SPL_BUILD** line. X-loader loads the bootloader to the address **0xa0208000**.

    Code:
        export PATH=/home/alexander/handhelds/armv6/codesourcery/bin:$PATH
        export ARCH=arm
        export CROSS_COMPILE=arm-none-eabi-
        
        U_BOARD=omap4_tuna
        make clean
        make distclean
        
        make ${U_BOARD}_config
        make -j8 ${U_BOARD}
        mkbootimg --kernel u-boot.bin --ramdisk /dev/null -o u-boot.aimg

    ===== Installation =====
    ==== Chainloaded Mode ====
    You'll need the root access to your device.

    You can take the prebuilt u-boot here. http://ksyslabs.org/lib/exe/fetch.php?media=gnex-uboot-chainloaded.img

    The u-boot has the support for android boot images. When flashed instead of the SBL, it boots the kernel off the "Boot" partition. When chainloaded, it looks for the kernel in **/system/boot/vmlinux.uimg** . Additionally, it first looks for the **/system/boot/boot.scr.uimg** so you can put custom commands there and override the kernel image.


    It also supports booting custom images from **/sdcard/boot/vmlinux.uimg** and **/sdcard/boot/boot.scr.uimg**


    If you need larger images, I suggest that you use the **tuna-fosdem-hacks** branch, format the cache partition to ext2 and put the files to **/cache/media/boot/**

    push the files to your device via adb
    Code:
        adb push gnex-uboot-chainloaded.img /sdcard/
        adb hell

    now, in the device shell, do the following
    Code:
        su
        cat /dev/block/platform/omap/omap_hsmmc.0/by-name/boot > /sdcard/vmlinux.uimg
        mount -o remount,rw /system
        mkdir /system/boot
        cp /sdcard/vmlinux.uimg /system/boot/
        cat /sdcard/gnex-uboot-chainloaded.img > /dev/block/platform/omap/omap_hsmmc.0/by-name/boot
        sync
        reboot

    Instead of installing gnex-uboot-chainloaded.img via dd, you can use fastboot
    Code:
    fastboot flash:raw boot u-boot.img

    ===== Replacing samsung bootloader =====
    OMAP4 devices cannot be bricked completely because the CPU has a firmware loader in the OTP (one-time programmable) memory. When the device is powered, it tries booting from USB.

    Make sure to have an old version of x-loader (PRIMEKK14) because newer ones have the security hole which allowed booting unsigned bootloaders fixed. The installation procedure is roughly the same, but use **sbl** partition. And also install xloader from http://ksyslabs.org/lib/exe/fetch.php?media=gnex-xloader-working.img


    Code:
        adb push gnex-xloader-working.img /sdcard/

    Code:
        cat /sdcard/gnex-xloader-working.img > /dev/block/platform/omap/omap_hsmmc.0/by-name/xloader

    There exists a Samsung recovery tool which can unbrick the devices with corrupted xloader/SBL. You will need a computer running Windows XP.

    Search the internet for the archive named "OMAPFlash_tuna.zip" which has md5 "ddbf07a1d36b044c40af5788a83b5395". We cannot upload it here because of the unclear license status.


    ===== Making images =====
    You can either use Android's mkbootimg to produce ANDROID! type images (not recommended) or u-boot's mkimage (in the u-boot tools directory) to make boot images. Using ANDROID! format is discouraged because the loader code in the u-boot is buggy and may fail in some corner cases such as large images.

    ==== making a custom boot image ====
    Code:
        mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n linux -d zImage vmlinux.uimg
        
        #alternatively, just do that when compiling linux
        #do not forget to add mkimage to your PATH variable
        make uImage

    ==== making a custom boot script ====
    Code:
        mkimage -A arm -O linux -T script -C none -a 0x84000000 -e 0x84000000 -n android -d boot.scr boot.scr.uimg

    ===== Booting Modes =====
    The bootloader supports several boot modes. Each boot mode is indicated by the color of the LED and activated by a combination of hardware buttons. It also supports the Android "reboot to recovery" and "reboot to bootloader" features

    * Normal Boot -> no keys are pressed, cyan LED
    * Recovery Boot -> Volume Up key pressed, green LED
    * Custom Boot -> Volume Down key pressed, blue LED
    * USB RNDIS mode -> both Volume keys pressed, purple LED

    ===== Pitfalls =====
    * No Fastboot or DFU (RNDIS BOOTP is untested) -> not a big deal if you're chainloading, right?
    * Serial number is always 0123456789abcdef or sth like that. Anyone to fix that?
    * UART support is quirky. The device will likely hang if booted with the UART cable. Workaround: boot without the UART cable and plug right after the purple LED flashes.

    ===== A sample boot script for android =====
    Make a boot.scr.uimg from it and push it to the correct location.
    Code:
        setenv bootargs "mem=1G vmalloc=768M omap_wdt.timer_margin=30 mms_ts.panel_id=18
        no_console_suspend console=ttyFIQ0";
        setenv loaddaddr 0x82000000;
        setenv devtype mmc;
        setenv devnum 0;
        setenv kernel_part 0xc;
        setenv kernel_name /media/boot/vmlinux.uimg;
        
        echo Load Address: ${loaddaddr};
        echo cmdline:${bootargs};
        if ext4load ${devtype} ${devnum}:${kernel_part} ${loaddaddr} ${kernel_name}; then
        	bootm ${loaddaddr};
        	exit 0;
        elif ext2load ${devtype} ${devnum}:${kernel_part} ${loaddaddr} ${kernel_name}; then
        	bootm ${loaddaddr};
        	exit 0;
        else
        	echo failed to boot custom image;
        fi
    1
    I wanna use the chainloaded method, so first thing I should do is fastboot-ing that .img just like another bootloader file? then chainload the u-boot file?

    but it looks like I'm replacing samsung SBL (replacing SBL method) if I do that, doesn't it?

    Yes, you can actually fastboot it via
    "fastboot flash:raw boot u-boot.img"

    and no, you don't need to mess with xloader for chainloading
    1
    The latter one is the one I'm using on my phone so it should work.

    ah, I bricked my phone with your gnex-xloader-working using following script... It is only 128K. Is that right?
    Code:
    cat /sdcard/gnex-xloader-working.img > /dev/block/platform/omap/omap_hsmmc.0/by-name/xloader
    Is PRIMEKK14 bootloader the only one to work since we only have http://forum.xda-developers.com/showthread.php?t=1587498 this thread for bootloader and there's no flashable version of PRIMEKK14?

    I use OMAPFlash to save it having PRIMEKK15 bootloader and I do not have the courage to do it again...:(
    1
    Well, maybe try dumping less than 8M?
    like dd if=/dev/block/... of=kernel.img bs=6M count=1



    You have to put it to
    /sdcard/boot/vmlinux.uimg
    that's actually the same as
    /data/media/boot/vmlinux.uimg (sdcard is really a symlink to /data/media)

    If you want to boot off cache, you'd need to recompile u-boot, but it should work just fine with /sdcard. (I needed to boot from cache because we used a non-linux OS and the kernel size was around 100MB)

    Sorry, I didn't express myself well.
    Now I see uboot will search for /sdcard/boot/vmlinux.uimg when pressing volume down button.
    But how can I multiboot? It seems uboot only realizes booting different kernel. I want to boot different rom. I am using AOKP and I want to test ubuntu without damaging my AOKP...

    By the way, what OS are you using? Can galaxy nexus boot into a non-linux os?:confused: