ubldr



Code:
Other Bootloaders
U-Boot
Many modern boards and ARM-based systems come with U-Boot. Something like the first-level bootloader described above often runs first, and gets the low-level hardware (clocks and ram) running enough to load and launch u-boot. U-boot can be customized with support for a wide variety of storage systems, network interfaces, filesystems, and even utilities to test and format hardware devices and copy data to them.

Generally you need a copy of u-boot that has been customized and compiled for your particular chip and board.

[ need more info here. ]
ubldr
[ need more here too ]

?????

So where do I find out anything about ubldr?
 
When you run buildworld you pass UBLDR_LOADADDR to make. This is the address you would tell u-boot to load ubldr with. I find it the preferred way of booting armv7 with Das U-Boot. You can also boot using kernel.bin but this is not very intuitive because you'd have to update the kernel file on the fat partition (assuming you are using a fat partition) every time you update the system. When I build armv7 I use 0x88000000 for UBLDR_LOADADDR.
 
The default UBLDR_LOADADDR can be found in /usr/src/stand/arm/uboot/Makefile. This is where ubldr and ubldr.bin are built.
 
Looks accurate. Why don't you try both and see which one works best for you? This boot command should work for ubldr.bin assuming U-Boot is on a FAT partition:

if mmc rescan; then
fatload mmc 0 0x80200000 ubldr.bin;
go 0x80200000;
fi;


Change the address if it doesn't work. This one is for ubldr but you must know what the UBLDR_LOADADDR is. I built for 0x88000000 but it will be different for you:

if mmc rescan; then
fatload mmc 0 0x88000000 ubldr;
bootelf 0x88000000;
fi;


You could try dumping ubldr and searching for the symbol. If it is not overridden elsewhere it will be 0x1000000.
 
I don't actually have a problem with ubldr it works just fine when loaded on a FAT partition on my USB stick, I was just interested in how ubldr and ubldr.bin worked since I've never seen any documentation on them.

Just FYI my FAT partition just contains ubldr and /boot/uEnv.txt which contains:-
Code:
bootfile=ubldr
kernel_addr_r=0x01000000
loadaddr=0x02000000
bootcmd_bsd=fatload ide 0:1 ${loadaddr} ${bootfile} && bootelf ${loadaddr}

This is used to boot FreeBSD on a GoFlex Home (Marvel Kirkwood armv5) device.
 
Looks like the image you are using wants you to use ubldr and if that's all it contains you'll have to use it. If you nm ubldr you can look for UBLDR_LOADADDR. It's a global symbol located at the address you'll need to load ubldr at. Confirm that the UBLDR_LOADADDR is actually located at 0x02000000. Then you'll see that's why it's being loaded at that particular address.

Code:
880515f0 r Te2
880519f0 r Te3
8804f9c8 r Te4
88000000 A UBLDR_LOADADDR
         w _DYNAMIC
8804ed9c d _GLOBAL_OFFSET_TABLE_
880407b4 W ___longjmp
88049c2c T __aeabi_idiv
8804085c T __aeabi_idivmod
 
Back
Top