• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[ADV](multi)u-boot v0.4

Search This thread

rookie1

Senior Member
Nov 12, 2007
90
114
Source code is up at https://github.com/rookie1/u-boot-nc1.2


May 15 - Thanks to verygreen, I've modified multi u-boot to solve SD booting problem. Version bumped to 0.4.

It's reported the previous version has compatibility issues with 2.6.32 kernel. I've updated multi u-boot base on B&N 1.2 source. Now it's flashable using CWM. Boot message should show "(multi)U-Boot v0.4 loading..." after flashing this. Note this zip is for flashing to EMMC. For people using this on SD card, you need to manually copy the u-boot.bin in this zip file to your SD card boot partition.


Download link - http://dl.dropbox.com/u/20480343/multi-uboot-v0.4.zip

Looks like people are requesting different boot orders. I've created this multi-boot capable u-boot for you all :)


Install instructions

1. If you plan to use a bootable sd card to control the boot, replace u-boot.bin on 1st partition of the sd card with my (multi)u-boot.bin. Remember to make a backup of your original u-boot.bin just in case.
2. If you do not plan to use a bootable sd card, replace the u-boot.bin on 1st partition of the eMMC. Again remember to make a backup.


How to configure boot
normal boot is booting up without pressing any key. alternate boot is booting up with Home key ('n' key) pressed. recovery boot is booting up with both Vol+ and Vol- key pressed.

1. Boot device order
Which device to boot from is controlled by a file called u-boot.order in the same partition as (multi)u-boot.bin. Only the 1st 2 bytes of this file are significant. The first byte tells (multi)u-boot.bin where to look for kernel/ramdisk in normal boot. 2nd byte tells (multi)u-boot.bin where to look for kernel/ramdisk in alternate boot.

Value '0' means sd card, value '1' means eMMC.

For example, if you do "echo 10 > u-boot.order", you are telling (multi)u-boot.bin to load kernel/ramdisk from eMMC in normal boot, and load from sd card in alternate boot.

If this file is not present, both normal and alternate boot will load from the device where u-boot.bin is.

2. Alternate boot kernel/ramdisk file name
In the same partition as (multi)u-boot.bin, you can create 2 new files, u-boot.altimg and u-boot.altram to specify the kernel image and ramdisk file name to load in alternate boot.

In normal boot, (multi)u-boot.bin loads default kernel image (uImage) and default ramdisk (uRamdisk) from the device specified by the 1st byte in u-boot.order.

If either file is not present, the default value (uImage or uRamdisk) will be used.

Example configuration

1. eMMC stock eclair, sd card froyo or hc, and you want to boot normally into eMMC, and press 'n' key to boot into sd card
- put (multi)u-boot.bin into sd card 1st partition
- create a text file named u-boot.order in you sd card 1st partition, which contains 10

2. eMMC stock eclair, sd card froyo or hc, and you want to boot normally into sd card, and press 'n' key to boot into eMMC
- put (multi)u-boot.bin into sd card 1st partition
- create a file named u-boot.order, which contains 01

3. eMMC contains dual boot eclair and froyo (see my dual-boot post), boot normally into stock, press 'n' to boot into froyo
- put (multi)u-boot.bin into eMMC 1st partition
- if you have setup dual boot using my script, create a text file named u-boot.altimg, which contains the word "uFImg" (without quotes), and another text file named u-boot.altram with content "uFRam" (without quotes).

There are other combinations possible, e.g. creating a dual boot froyo and hc sd card without touching stock eMMC, using oc kernel as normal boot and stock kernel as alternate boot, etc.
 
Last edited:

soonereng

Member
Jan 16, 2011
20
5
Works great!

I was going to try my hand at this but didn't know exactly what files to modify when making u-boot.bin. Any pointers on what you modified? Thanks!
 
  • Like
Reactions: {Diemex}

rookie1

Senior Member
Nov 12, 2007
90
114
Ok, what about running NF or HC and stock Eclair on the eMMC, with Stock being the Alternate boot?

Sure. Just do the following (assuming you have already got dual boot set up correctly)
- rename uImage (stock kernel) to uImage.stock
- rename uRamdisk (stock ramdisk) to uRamdisk.stock
- rename uFImg (NF kernel) to uImage
- rename uFRam (NF ramdisk) to uRamdisk
- u-boot.altimg should contain "uImage.stock"
- u-boot.altram should contain "uRamdisk.stock"

Btw, my modified u-boot only reads 16 characters from u-boot.altimg and u-boot.altram. So limit your kernel image and ramdisk file name length to less than 16 chars. Otherwise unexpected things can happen.:p
 

fwdixon

Senior Member
Oct 15, 2010
299
16
Sure. Just do the following (assuming you have already got dual boot set up correctly)
- rename uImage (stock kernel) to uImage.stock
- rename uRamdisk (stock ramdisk) to uRamdisk.stock
- rename uFImg (NF kernel) to uImage
- rename uFRam (NF ramdisk) to uRamdisk
- u-boot.altimg should contain "uImage.stock"
- u-boot.altram should contain "uRamdisk.stock"

Btw, my modified u-boot only reads 16 characters from u-boot.altimg and u-boot.altram. So limit your kernel image and ramdisk file name length to less than 16 chars. Otherwise unexpected things can happen.:p

Awesome! That's what I was thinking, but jsut wanted to get confirmation. Also, good to know on the character limit in the names.
 

soonereng

Member
Jan 16, 2011
20
5
i would love to do this, but can we get step by step retard noob instructions for windows please? i would like to boot emmc froyo default and sdcard HC with the n key held.


Example configuration

1. eMMC stock eclair, sd card froyo or hc, and you want to boot normally into eMMC, and press 'n' key to boot into sd card
- put (multi)u-boot.bin into sd card 1st partition
- create a text file named u-boot.order in you sd card 1st partition, which contains 10

I'm assuming you already have froyo on the emmc, but the above is all you have to do.

In simple steps

1. Put your HC sdcard in your card reader on your Windows machine.
2. Make a copy of the existing u-boot.bin and save it to your hard-drive somewhere in case you don't like this.
3. Open a text editor and type "10" without the quotes and save the file as u-boot.order
4. Copy the u-boot.bin file out of the zip in the OP over to the sdcard (this will overwrite the original but we backed it up already in step 2)
5. Copy the u-boot.order file to the sdcard
6. Unmount sdcard from Windows and put it in your Nook and boot it up

Enjoy
 
Last edited:

DomSim

Senior Member
Sep 24, 2008
1,326
208
well, that sounds way easier than i thought. i thought i had to create and move a file onto the emmc portion of the phone, not the sdcard. also, wasnt clean on editing the the order file, thought i needed to hex edit it or something. trying now!
I'm assuming you already have froyo on the emmc, but the above is all you have to do.

In simple steps

1. Put your HC sdcard in your card reader on your Windows machine.
2. Make a copy of the existing u-boot.bin and save it to your hard-drive somewhere in case you don't like this.
3. Open a text editor and type "10" without the quotes and save the file as u-boot.order
4. Copy the u-boot.bin file out of the zip in the OP over to the sdcard (this will overwrite the original but we backed it up already in step 2)
5. Copy the u-boot.order file to the sdcard
6. Unmount sdcard from Windows and put it in your Nook and boot it up

Enjoy
 

DomSim

Senior Member
Sep 24, 2008
1,326
208
worked! just one question. when booted into emmc froyo, if i mount sd card by dragging down the notifiction menu and select mount, it mounts the "boot" partition for the HC build on the sdcard. im pretty sure that if i load up files in that area for the emmc froyo to use, it will keep HC from booting right? can this be changed so both the emmc froyo build and the sdcard honeycomb build can share the same sdcard partition?
 

jasoraso

Senior Member
May 24, 2007
581
177
Salt Lake City, UT
You can switch the partition that is loaded as sdcard by edition the file "vold.conference" in the /etc directory. Add "partition 4" in the second block, similar to what is in the first block. This will enable the emmc and the sdcard o/s yo share the same SD card files yassuming partition 4 is the SD card partition


Sent from my LogicPD Zoom2 using XDA App

Edit: that should be "vold.conf" not conference ... Darn auto-correct.
 
Last edited:
  • Like
Reactions: DomSim

DomSim

Senior Member
Sep 24, 2008
1,326
208
You can switch the partition that is loaded as sdcard by edition the file "vold.conference" in the /etc directory. Add "partition 4" in the second block, similar to what is in the first block. This will enable the emmc and the sdcard o/s yo share the same SD card files yassuming partition 4 is the SD card partition


Sent from my LogicPD Zoom2 using XDA App

i do not have a vold.conference in my /etc directory. at lease according to root explorer.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 21
    Source code is up at https://github.com/rookie1/u-boot-nc1.2


    May 15 - Thanks to verygreen, I've modified multi u-boot to solve SD booting problem. Version bumped to 0.4.

    It's reported the previous version has compatibility issues with 2.6.32 kernel. I've updated multi u-boot base on B&N 1.2 source. Now it's flashable using CWM. Boot message should show "(multi)U-Boot v0.4 loading..." after flashing this. Note this zip is for flashing to EMMC. For people using this on SD card, you need to manually copy the u-boot.bin in this zip file to your SD card boot partition.


    Download link - http://dl.dropbox.com/u/20480343/multi-uboot-v0.4.zip

    Looks like people are requesting different boot orders. I've created this multi-boot capable u-boot for you all :)


    Install instructions

    1. If you plan to use a bootable sd card to control the boot, replace u-boot.bin on 1st partition of the sd card with my (multi)u-boot.bin. Remember to make a backup of your original u-boot.bin just in case.
    2. If you do not plan to use a bootable sd card, replace the u-boot.bin on 1st partition of the eMMC. Again remember to make a backup.


    How to configure boot
    normal boot is booting up without pressing any key. alternate boot is booting up with Home key ('n' key) pressed. recovery boot is booting up with both Vol+ and Vol- key pressed.

    1. Boot device order
    Which device to boot from is controlled by a file called u-boot.order in the same partition as (multi)u-boot.bin. Only the 1st 2 bytes of this file are significant. The first byte tells (multi)u-boot.bin where to look for kernel/ramdisk in normal boot. 2nd byte tells (multi)u-boot.bin where to look for kernel/ramdisk in alternate boot.

    Value '0' means sd card, value '1' means eMMC.

    For example, if you do "echo 10 > u-boot.order", you are telling (multi)u-boot.bin to load kernel/ramdisk from eMMC in normal boot, and load from sd card in alternate boot.

    If this file is not present, both normal and alternate boot will load from the device where u-boot.bin is.

    2. Alternate boot kernel/ramdisk file name
    In the same partition as (multi)u-boot.bin, you can create 2 new files, u-boot.altimg and u-boot.altram to specify the kernel image and ramdisk file name to load in alternate boot.

    In normal boot, (multi)u-boot.bin loads default kernel image (uImage) and default ramdisk (uRamdisk) from the device specified by the 1st byte in u-boot.order.

    If either file is not present, the default value (uImage or uRamdisk) will be used.

    Example configuration

    1. eMMC stock eclair, sd card froyo or hc, and you want to boot normally into eMMC, and press 'n' key to boot into sd card
    - put (multi)u-boot.bin into sd card 1st partition
    - create a text file named u-boot.order in you sd card 1st partition, which contains 10

    2. eMMC stock eclair, sd card froyo or hc, and you want to boot normally into sd card, and press 'n' key to boot into eMMC
    - put (multi)u-boot.bin into sd card 1st partition
    - create a file named u-boot.order, which contains 01

    3. eMMC contains dual boot eclair and froyo (see my dual-boot post), boot normally into stock, press 'n' to boot into froyo
    - put (multi)u-boot.bin into eMMC 1st partition
    - if you have setup dual boot using my script, create a text file named u-boot.altimg, which contains the word "uFImg" (without quotes), and another text file named u-boot.altram with content "uFRam" (without quotes).

    There are other combinations possible, e.g. creating a dual boot froyo and hc sd card without touching stock eMMC, using oc kernel as normal boot and stock kernel as alternate boot, etc.
    3
    i would love to do this, but can we get step by step retard noob instructions for windows please? i would like to boot emmc froyo default and sdcard HC with the n key held.


    Example configuration

    1. eMMC stock eclair, sd card froyo or hc, and you want to boot normally into eMMC, and press 'n' key to boot into sd card
    - put (multi)u-boot.bin into sd card 1st partition
    - create a text file named u-boot.order in you sd card 1st partition, which contains 10

    I'm assuming you already have froyo on the emmc, but the above is all you have to do.

    In simple steps

    1. Put your HC sdcard in your card reader on your Windows machine.
    2. Make a copy of the existing u-boot.bin and save it to your hard-drive somewhere in case you don't like this.
    3. Open a text editor and type "10" without the quotes and save the file as u-boot.order
    4. Copy the u-boot.bin file out of the zip in the OP over to the sdcard (this will overwrite the original but we backed it up already in step 2)
    5. Copy the u-boot.order file to the sdcard
    6. Unmount sdcard from Windows and put it in your Nook and boot it up

    Enjoy
    2
    i would love to do this, but can we get step by step retard noob instructions for windows please? i would like to boot emmc froyo default and sdcard HC with the n key held.
    2
    so there is a file "vold.fstab in the etc (also /system/etc) which seems to contain the mounting info for the sdcard. im not knowledgable enough to make it work. i tried but only succeeded in break it. i have uploaded both the froyo and hc files if you would like to take a shot at it.

    I looked at your froyo vold.fstab and the block that mounts the SD card was set to "auto" - which I believe mounts the first vfat (msdos) partition it finds. I changed it to 4 (which is the same partition that the HC is mounting as its SD card.

    I would suggest you back up your froyo vold.fstab before replacing it with this one. Also, verify that the permissions match.

    Hope this helps. I'm just learning this stuff, too.

    jason
    1
    It actually can be done (although looks awful). The big problem though is how to cram all that info onto the screen if the font is much bigger... do you use the menu that often? If not, try using the short-cut keys... they do the same thing and you don't have to load the menu at all.