FORUMS
Remove All Ads from XDA
H10 Turbo

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

90 posts
Thanks Meter: 114
 
By rookie1, Member on 9th February 2011, 03:17 PM
Post Reply Email Thread
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.
The Following 21 Users Say Thank You to rookie1 For This Useful Post: [ View ] Gift rookie1 Ad-Free
 
 
9th February 2011, 04:42 PM |#2  
bedoig's Avatar
Senior Member
Thanks Meter: 119
 
More
Awesome, thanks!
9th February 2011, 04:42 PM |#3  
Senior Member
Salt Lake City, UT
Thanks Meter: 178
 
More
Thanks for this! Looking forward to giving it a go this afternoon.
9th February 2011, 04:54 PM |#4  
Member
Thanks Meter: 8
 
More
Thanks, this is going to be fun. Much easier than lilo
9th February 2011, 05:16 PM |#5  
Junior Member
Thanks Meter: 5
 
More
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!
The Following User Says Thank You to soonereng For This Useful Post: [ View ] Gift soonereng Ad-Free
9th February 2011, 06:15 PM |#6  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by ver2go

Thanks, this is going to be fun. Much easier than lilo

Does anybody even use lilo anymore? Civilized people use grub =P
9th February 2011, 06:57 PM |#7  
Member
Thanks Meter: 8
 
More
Quote:
Originally Posted by criley

Does anybody even use lilo anymore? Civilized people use grub =P

Yes, but grub2... now there is the wrench in the monkey works. Back to lilo is easier than dealing with grub2.
10th February 2011, 01:43 AM |#8  
Senior Member
Thanks Meter: 83
 
More
Awesome, thanks.

Sent from my LogicPD Zoom2 using Tapatalk
10th February 2011, 01:58 AM |#9  
Senior Member
Thanks Meter: 16
 
More
Ok, what about running NF or HC and stock Eclair on the eMMC, with Stock being the Alternate boot?
10th February 2011, 02:51 AM |#10  
OP Member
Thanks Meter: 114
 
More
Quote:
Originally Posted by fwdixon

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.
10th February 2011, 03:17 AM |#11  
DomSim's Avatar
Senior Member
Thanks Meter: 207
 
More
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.
The Following 2 Users Say Thank You to DomSim For This Useful Post: [ View ] Gift DomSim Ad-Free
Post Reply Subscribe to Thread

Tags
u-boot

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes