So, how do I find out how to do it? I built u-boot for my board. 'objdump -f u-boot' after I built it showed:
Generally, u-boot is loaded at the same address it executes at. So, I confirmed with objdump -x, the full output is too long to quote here, but this is relevant:u-boot: file format elf32-littlearmarchitecture: armv5te, flags 0x00000112:EXEC_P, HAS_SYMS, D_PAGEDstart address 0x21f00000
Idx Name Size VMA LMA File off Algnwhich confirms the address. So, I booted up the old u-boot I wanted to replace and loaded u-boot.bin at 0x21f00000 and jumped to it:
0 .text 0002f5e4 21f00000 21f00000 00010000 2**5
CONTENTS, ALLOC, LOAD, READONLY, CODE
RomBOOTAnd we're in...
Start AT91Bootstrap...
U-Boot 1.3.4 (Jul 24 2009 - 17:50:12)
DRAM: 64 MB
NAND: 256 MiB
In: serial
Out: serial
Err: serial
Net: macb0
macb0: Starting autonegotiation...
macb0: Autonegotiation complete
macb0: link up, 100Mbps full-duplex (lpa: 0x45e1)
Hit any key to stop autoboot: 0
U-Boot> tftp 0x21f00000 u-boot.bin
macb0: link up, 100Mbps full-duplex (lpa: 0x45e1)
Using macb0 device
TFTP from server 10.0.0.5; our IP address is 10.0.0.4
Filename 'u-boot.bin'.
Load address: 0x21f00000
Loading: ####################
done
Bytes transferred = 288984 (468d8 hex)
U-Boot> go 0x21f00000
## Starting application at 0x21F00000 ...
U-Boot 2016.05-00018-g2f0dd66 (Sep 18 2016 - 21:38:36 -0600)
CPU: AT91SAM9G20
Crystal frequency: 18.432 MHz
CPU clock : 396.288 MHz
Master clock : 132.096 MHz
DRAM: 64 MiB
WARNING: Caches not enabled
NAND: 256 MiB
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Net: macb0
Error: macb0 address not set.
Hit any key to stop autoboot: 0
U-Boot>
1 comment:
Great, thanks for sharing this post.Much thanks again. Awesome.
Data Science Online Training in Hyderabad
Data Science Online Course
Post a Comment