Closed lcdunstan closed 8 years ago
I don't see those commits on linux-sunxi/sunxi
. However, it looks like they did get applied to the linux-sunxi/mirror/master
, which looks like an old copy of the mainline U-Boot master
, so we should probably switch to that.
I've updated my master
branch to use the latest upstream U-Boot release:
https://github.com/talex5/xen-arm-builder
However, I had to edit the cubieboard2 boot script to move Linux to a different memory location. I guess U-Boot is now using that area for something else (possibly its stack). I couldn't find what was using it, or anything suggesting that the new address is free. Xen requires a contiguous block of memory for dom0, so either we have to put everything at the top of RAM, or everything at the bottom, and U-Boot is already using the bottom addresses.
The Cubieboard 3 might need similar updates, but I haven't tested it.
Let me know if it works for you!
It isn't convenient for me build the whole image right now, but building that version of U-Boot works, and I ran just the commands to write the .bin and .scr to the card, and it booted fine...
With the new U-Boot:
sunxi# bdinfo
arch_number = 0x100010BB
boot_params = 0x40000100
DRAM bank = 0x00000000
-> start = 0x40000000
-> size = 0x40000000
eth0name = dwmac.1c50000
ethaddr = 02:12:0a:42:bb:28
current eth = dwmac.1c50000
ip_addr = <NULL>
baudrate = 115200 bps
TLB addr = 0x7F6F0000
relocaddr = 0x7F657000
reloc off = 0x35657000
irq_sp = 0x7F236EF0
sp start = 0x7F236EE0
FB base = 0x00000000
With the old one:
sun7i# bdinfo
arch_number = 0x000010BB
boot_params = 0x40000100
DRAM bank = 0x00000000
-> start = 0x40000000
-> size = 0x40000000
eth0name = dwmac.1c50000
ethaddr = 02:12:0a:42:bb:28
current eth = dwmac.1c50000
ip_addr = <NULL>
baudrate = 115200 bps
TLB addr = 0x7FFF0000
relocaddr = 0x7FF86000
reloc off = 0x35F86000
irq_sp = 0x7FB65EF0
sp start = 0x7FB65EE0
So the old script was overwriting the TLB and relocated U-Boot code I guess. I'm not sure why the address is different though.
I had to make changes to get this working on the cubietruck. I used the following addresses
setenv kernel_addr_r 0xaf600000 # 8M
setenv ramdisk_addr_r 0xaee00000 # 8M
setenv fdt_addr 0xaec00000 # 2M
setenv xen_addr_r 0xaea00000 # 2M
Thanks @infidel - I didn't know about that command! For future reference, here is the output on the CubieTruck:
arch_number = 0x100010BB
boot_params = 0x40000100
DRAM bank = 0x00000000
-> start = 0x40000000
-> size = 0x80000000
eth0name = dwmac.1c50000
ethaddr = 02:0d:07:81:13:60
current eth = dwmac.1c50000
ip_addr = <NULL>
baudrate = 115200 bps
TLB addr = 0xBF6F0000
relocaddr = 0xBF656000
reloc off = 0x75656000
irq_sp = 0xBF235EF0
sp start = 0xBF235EE0
FB base = 0xBFD00000
I've updated the patch to include @Furao's settings and made a PR (#58).
clone-repos.sh:
clone_branch git://github.com/jwrdegoede u-boot-sunxi sunxi-next
Looks like the main "sunxi" branch is the right one. That fork is also even with the upstream. Thus:
git clone git://github.com/linux-sunxi/u-boot-sunxi.git
I haven't tried building and running it yet, but I will when I can.