ARM64 – Odroid C2 U-Boot – Latest..
I discovered there was a later version (6) of the U-boot patch for the Odroid C2, and also – after more research – found the reason for the compile error…
It turns out that the GIT version (May 5, 2016) of U-boot currently needs two patches..
The first one is to provide psci_system_reset for armv8, and details can be found here: http://article.gmane.org/gmane.comp.boot-loaders.u-boot/259967/
The second is the C2 support patch itself, which needs psci_system_reset to compile correctly, and details of version 6 of the patch can be found here: http://article.gmane.org/gmane.comp.boot-loaders.u-boot/259968/
After applying these two patches, and adding the Hardkernel binary in sd_fuse, then U-boot compiled and installed OK, but the C2 still failed to initialise:
BL2 Built : 11:44:26, Nov 25 2015. gxb gfb13a3b-c2 - jcao@wonton Board ID = 8 set vcck to 1100 mv set vddee to 1050 mv CPU clk: 1536MHz DDR channel setting: DDR0 Rank0+1 same DDR0: 2048MB(auto) @ 912MHz(2T)-13 DataBus test pass! AddrBus test pass! Load fip header from eMMC, src: 0x0000c200, des: 0x01400000, size: 0x000000b0 aml log : SIG CHK : 351 for address 0x01700000 reset... GXBB:BL1:08dafd:0a8993;FEAT:EDFC318C;POC:3;RCY:0;EMMC:0;READ:0;CHK:0; << repeated... >>
I had already found that the latest ‘mainline’ kernel code for the C2 (in linux-next) would not boot with the Hardkernel-supplied version of U- Boot, which is why this new/patched version is needed..
More info when I have made some more progress..
Robert Gadsdon. May 6, 2016.
This sounds like there will be (soonish) ODROID C2 mainline support in U-Boot, is that correct? “Initial Meson GXBaby device trees for Tronsmart Vega S95 (S905)” should land in 4.6 kernel.
There will be support in U-Boot, and the ‘mainline’ kernel, but the timing is always difficult to predict.. The U-boot patches are still very much in the review stage, and not yet in the development tree..
The ‘mainline’ kernel support may not include all features, at first.. If I had to guess, I would think that Odroid C2 support would be in the 4.7 kernel, but these things always have a habit of slipping..
RG.
I’ve been successful in booting the c2 into full u-boot with Ethernet & UART support under rc3 uboot with patches applied including the 2 above. The other patches in the set should also be applied so 4 in total.
Still uses the original first stage loader to boot into rc3 but the new u-boot rc3 has to be packaged and encrypted correctly for the first stage to be able to load it. This can be done manually through the fip_create and aml_encrypt_gbx scripts and then creating an image using dd commands to package it up.
Looks something like this in the end…
=> GXBB:BL1:08dafd:0a8993;FEAT:EDFC318C;POC:3;RCY:0;EMMC:800;NAND:81;SD:0;READ:0;CHK:0;
TE: 245728
no sdio debug board detected
BL2 Built : 11:44:26, Nov 25 2015.
gxb gfb13a3b-c2 – jcao@wonton
Board ID = 8
set vcck to 1100 mv
set vddee to 1050 mv
CPU clk: 1536MHz
DDR channel setting: DDR0 Rank0+1 same
DDR0: 2048MB(auto) @ 912MHz(2T)-13
DataBus test pass!
AddrBus test pass!
Load fip header from SD, src: 0x0000c200, des: 0x01400000, size: 0x000000b0
Load bl30 from SD, src: 0x00010200, des: 0x01000000, size: 0x00009ef0
Sending bl30………………………………….OK.
Run bl30…
Load bl301 from SD, src: 0x0001c200, des: 0x01000000, size: 0x000017c0
Wait bl30…Done
Sending bl301……OK.
Run bl301…
0x10100000, size: 0x0001113020200, des
— UART initialized after reboot —
[Reset cause: unknown]
[Image: unknown, amlogic_v1.1.3046-00db630 2015-10-28 15:24:31 xiaobo.gu@droid05]
bl30: check_permit, count is 1
bl30: check_permit: ok!
chipid: ef beLoad bl33 from SD, src: 0x00034200, des: 0x01000000, size: 0x0003a590
ad de d f0 ad ba ef be ad de not ES chip
[0.360521 Inits done]
secure task start!
high task start!
low task start!
NOTICE: BL3-1: v1.0(debug):4d2e34d
NOTICE: BL3-1: Built : 17:08:35, Oct 29 2015
INFO: BL3-1: Initializing runtime services
INFO: BL3-1: Preparing for EL3 exit to normal world
INFO: BL3-1: Next image address = 0x1000000
INFO: BL3-1: Next image spsr = 0x3c9
U-Boot 2016.05-rc3-gbbca710-dirty (May 09 2016 – 18:45:53 +1000) odroid-c2
DRAM: 2 GiB
Using default environment
In: serial@4c0
Out: serial@4c0
Err: serial@4c0
Net: eth0: eth_designware
=>
Thanks for this… I’ll have to read up on the encryption commands etc., and give it a try..
RG.