Discussion:
[fedora-arm] rock64 and odroid c2 boards
mark co-dyre
2018-12-08 08:34:40 UTC
Permalink
Hello all,

I've been looking for a group like this for a while now to hopefully help with learning how to get get a recent version of u-boot working properly so I can get fedora 29 to boot on my rock64 and odroid c2 boards. I'd also like to contribute this back once I get this working properly.

So far I've gotten the odroid c2 to boot fine using the stock hardkernel 3.16 lts kernel and their older version of u-boot. For this I had used a chrooted instance of a Fedora 29 minimum sitting on the Ubuntu distro they provide. From this I built a new initramfs with dracut against a copy of the hosted ubunutu lib/modules.

This all worked fine although I'd like to get it working with a recent u-boot, UEFI and load the grub.efi binary to boot the standard fedora kernel. I had got to the point where I had loaded the grub binary and was able to select my kernel (stock fedora 4.18.x kernel); Although things would hang after. I suspect the main reason for the hang was I borrowed the opensuse grub.efi UEFI app because I could not get the fedora one to run. Other than the binary blob stuff from hardkernel u-boot was stock and it was booting into u-boot just fine.

I've set that board aside for now to use it as a build host and have moved on to my rock64 board. After putting the stock fedora 29 minimal image on a card and attempting to boot it Im seeing:

... regular u-boot stuff blah blah blah (full u-boot log is below)
Hit any key to stop autoboot: 0
Card did not respond to voltage select!
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
** Unable to read file / **
Found EFI removable media binary efi/boot/bootaa64.efi
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Scanning disk ***@ff500000.blk...
Card did not respond to voltage select!
Scanning disk ***@ff520000.blk...
Disk ***@ff520000.blk not ready
Found 4 disks
858216 bytes read in 43 ms (19 MiB/s)
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
## Starting EFI application at 02000000 ...
System BootOrder not found. Initializing defaults.
Creating boot entry "Boot0000" with label "Fedora" for file "\EFI\fedora\shimaa64.efi"
... hangs here

I'm using the u-boot binary from another distro (arch linux) configured for a rock64 device; Not the Fedora one. I'm pretty ignorant on how the shim stuff works although I would like to learn all those details to form a better understanding. My current understanding is that this shim is a signed (by UEFI signing service) initial bootloader that handles chaining to a trusted full bootloader (grub in this case). Does grub need to be signed in some way to work with this shim that loads it?

Are there any good resources out there that would help me better understand what is happening? My next step is going to be to use the fedora u-boot of course and see where that leads me. Although my gut is telling that may not produce the outcome I desire.

I'm very familiar with patching and building so I'm not afraid to dig in and create some patches to bounce back once I have these up and running I'm just hoping to have someone provide some insight as to what I should be focusing on so I can gain some traction.

I've noticed there's a #fedora-meeting-2 IRC channel that meets on Tues at 3pm UTC; I'm planning on dropping by next week.

Well that's all for now I'm exhausted and need some sleep :)

Thanks for reading,


DDR version 1.06 20170424
In
SRX
LPDDR3
786MHz
Bus Width=32 Col=11 Bank=8 Row=15/15 CS=2 Die Bus-Width=32 Size=4096MB
ddrconfig:7
OUT
Boot1 Release Time: 2017-05-18, version: 2.43
ChipType = 0x11, 187
emmc reinit
emmc reinit
SdmmcInit=2 20
SdmmcInit=0 0
BootCapSize=0
UserCapSize=30436MB
FwPartOffset=2000 , 0
StorageInit ok = 60041
Raw SecureMode = 0
SecureInit read PBA: 0x4
SecureInit read PBA: 0x404
SecureInit read PBA: 0x804
SecureInit read PBA: 0xc04
SecureInit read PBA: 0x1004
SecureInit ret = 0, SecureMode = 0
LoadTrustBL
No find bl30.bin
No find bl32.bin
Load uboot, ReadLba = 2000
Load OK, addr=0x200000, size=0x8b0ec
RunBL31 0x10000
NOTICE: BL31: v1.3(debug):f947c7e
NOTICE: BL31: Built : 09:28:45, May 31 2017
NOTICE: BL31:Rockchip release version: v1.3
INFO: ARM GICv2 driver initialized
INFO: Using opteed sec cpu_context!
INFO: boot cpu mask: 1
INFO: plat_rockchip_pmu_init: pd status 0xe
INFO: BL31: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destiK
ERROR: Error initializing runtime service opteed_fast
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x200000
INFO: SPSR = 0x3c9


U-Boot 2018.03-1 (Apr 02 2018 - 19:14:47 -0600) Arch Linux ARM

Model: Rockchip RK3328 EVB
DRAM: 4 GiB
MMC: ***@ff500000: 1, ***@ff520000: 0
Loading Environment from MMC... *** Warning - bad CRC, using default environment

Failed (-5)
In: ***@ff130000
Out: ***@ff130000
Err: ***@ff130000
Model: Rockchip RK3328 EVB
Net:
Warning: ***@ff540000 (eth0) using random MAC address - e6:d0:8e:31:57:c3
eth0: ***@ff540000
Hit any key to stop autoboot: 0
Card did not respond to voltage select!
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
** Unable to read file / **
Found EFI removable media binary efi/boot/bootaa64.efi
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Scanning disk ***@ff500000.blk...
Card did not respond to voltage select!
Scanning disk ***@ff520000.blk...
Disk ***@ff520000.blk not ready
Found 4 disks
858216 bytes read in 43 ms (19 MiB/s)
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
## Starting EFI application at 02000000 ...
System BootOrder not found. Initializing defaults.
Creating boot entry "Boot0000" with label "Fedora" for file "\EFI\fedora\shimaa64.efi"


_______________________________________________
arm mailing list -- ***@lists.fedoraproject.org
To unsubscribe send an email to arm-***@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/arc
Robert Moskowitz
2018-12-09 01:54:41 UTC
Permalink
Post by mark co-dyre
Hello all,
I've been looking for a group like this for a while now to hopefully help with learning how to get get a recent version of u-boot working properly so I can get fedora 29 to boot on my rock64 and odroid c2 boards. I'd also like to contribute this back once I get this working properly.
How does the C2 compare to the HC2?  Earlier posts discuss a patch to
uboot to support the HC2.
Post by mark co-dyre
So far I've gotten the odroid c2 to boot fine using the stock hardkernel 3.16 lts kernel and their older version of u-boot. For this I had used a chrooted instance of a Fedora 29 minimum sitting on the Ubuntu distro they provide. From this I built a new initramfs with dracut against a copy of the hosted ubunutu lib/modules.
This all worked fine although I'd like to get it working with a recent u-boot, UEFI and load the grub.efi binary to boot the standard fedora kernel. I had got to the point where I had loaded the grub binary and was able to select my kernel (stock fedora 4.18.x kernel); Although things would hang after. I suspect the main reason for the hang was I borrowed the opensuse grub.efi UEFI app because I could not get the fedora one to run. Other than the binary blob stuff from hardkernel u-boot was stock and it was booting into u-boot just fine.
... regular u-boot stuff blah blah blah (full u-boot log is below)
Hit any key to stop autoboot: 0
Card did not respond to voltage select!
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
** Unable to read file / **
Found EFI removable media binary efi/boot/bootaa64.efi
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Card did not respond to voltage select!
Found 4 disks
858216 bytes read in 43 ms (19 MiB/s)
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
## Starting EFI application at 02000000 ...
System BootOrder not found. Initializing defaults.
Creating boot entry "Boot0000" with label "Fedora" for file "\EFI\fedora\shimaa64.efi"
... hangs here
I'm using the u-boot binary from another distro (arch linux) configured for a rock64 device; Not the Fedora one. I'm pretty ignorant on how the shim stuff works although I would like to learn all those details to form a better understanding. My current understanding is that this shim is a signed (by UEFI signing service) initial bootloader that handles chaining to a trusted full bootloader (grub in this case). Does grub need to be signed in some way to work with this shim that loads it?
Are there any good resources out there that would help me better understand what is happening? My next step is going to be to use the fedora u-boot of course and see where that leads me. Although my gut is telling that may not produce the outcome I desire.
I'm very familiar with patching and building so I'm not afraid to dig in and create some patches to bounce back once I have these up and running I'm just hoping to have someone provide some insight as to what I should be focusing on so I can gain some traction.
I've noticed there's a #fedora-meeting-2 IRC channel that meets on Tues at 3pm UTC; I'm planning on dropping by next week.
Well that's all for now I'm exhausted and need some sleep :)
Thanks for reading,
DDR version 1.06 20170424
In
SRX
LPDDR3
786MHz
Bus Width=32 Col=11 Bank=8 Row=15/15 CS=2 Die Bus-Width=32 Size=4096MB
ddrconfig:7
OUT
Boot1 Release Time: 2017-05-18, version: 2.43
ChipType = 0x11, 187
emmc reinit
emmc reinit
SdmmcInit=2 20
SdmmcInit=0 0
BootCapSize=0
UserCapSize=30436MB
FwPartOffset=2000 , 0
StorageInit ok = 60041
Raw SecureMode = 0
SecureInit read PBA: 0x4
SecureInit read PBA: 0x404
SecureInit read PBA: 0x804
SecureInit read PBA: 0xc04
SecureInit read PBA: 0x1004
SecureInit ret = 0, SecureMode = 0
LoadTrustBL
No find bl30.bin
No find bl32.bin
Load uboot, ReadLba = 2000
Load OK, addr=0x200000, size=0x8b0ec
RunBL31 0x10000
NOTICE: BL31: v1.3(debug):f947c7e
NOTICE: BL31: Built : 09:28:45, May 31 2017
NOTICE: BL31:Rockchip release version: v1.3
INFO: ARM GICv2 driver initialized
INFO: Using opteed sec cpu_context!
INFO: boot cpu mask: 1
INFO: plat_rockchip_pmu_init: pd status 0xe
INFO: BL31: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC`s destiK
ERROR: Error initializing runtime service opteed_fast
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x200000
INFO: SPSR = 0x3c9
U-Boot 2018.03-1 (Apr 02 2018 - 19:14:47 -0600) Arch Linux ARM
Model: Rockchip RK3328 EVB
DRAM: 4 GiB
Loading Environment from MMC... *** Warning - bad CRC, using default environment
Failed (-5)
Model: Rockchip RK3328 EVB
Hit any key to stop autoboot: 0
Card did not respond to voltage select!
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
** Unable to read file / **
Found EFI removable media binary efi/boot/bootaa64.efi
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Card did not respond to voltage select!
Found 4 disks
858216 bytes read in 43 ms (19 MiB/s)
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
## Starting EFI application at 02000000 ...
System BootOrder not found. Initializing defaults.
Creating boot entry "Boot0000" with label "Fedora" for file "\EFI\fedora\shimaa64.efi"
_______________________________________________
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
_______________________________________________
arm mailing list -- ***@lists.fedoraproject.org
To unsubscribe send an email to arm-***@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/***@li
Robert Moskowitz
2018-12-09 17:07:06 UTC
Permalink
Interesting ... I'd like to check that patch out.
I believe the HC2 is really just a XU4 thats been turned into a NAS correct? If so the XU4 is a 32 bit 8 core SOC device (4-2GHz cores and 4-1.2GHz cores) where the C2 is a 64 bit 4 core (1.5ghz) device. I think Samsung put these 8 core devices in the galaxy s6 phones.
I have both devices actually. But my focus has been on the 64 bit devices because I found the fan on the XU4 undesirable and believe the 64 bit arm devices will take over the 32 bit ones eventually. Been the XU4 board is quiet awesome as well.
As for performance, the benchmarks that hardkernel has shown the XU4 out performs the the C2. The specs say that as well. Faster processors, more cores, faster vpu, usb 3.0 vs 2.0.
I plan on getting all devices working although I had wanted to start on these devices first.
Which thread talks about that patch?
I think it is subject:

how to make a working f28 sd card for odroid-hc2

Torbjorn Jansson <***@mbox200.swipnet.se>

Has been working on this.

_______________________________________________
arm mailing list -- ***@lists.fedoraproject.org
To unsubscribe send an email to arm-***@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archiv
Robert Moskowitz
2018-12-10 01:27:46 UTC
Permalink
Post by Robert Moskowitz
Interesting ... I'd like to check that patch out.
I believe the HC2 is really just a XU4 thats been turned into a NAS
correct?  If so the XU4 is a 32 bit 8 core SOC device (4-2GHz cores
and 4-1.2GHz cores) where the C2 is a 64 bit 4 core (1.5ghz)
device.  I think Samsung put these 8 core devices in the galaxy s6
phones.
I have both devices actually.  But my focus has been on the 64 bit
devices because I found the fan on the XU4 undesirable and believe
the 64 bit arm devices will take over the 32 bit ones eventually. 
Been the XU4 board is quiet awesome as well.
As for performance, the benchmarks that hardkernel has shown the XU4
out performs the the C2.   The specs say that as well.  Faster
processors, more cores, faster vpu, usb 3.0 vs 2.0.
I plan on getting all devices working although I had wanted to start
on these devices first.
Which thread talks about that patch?
how to make a working f28 sd card for odroid-hc2
Has been working on this.
http://git.denx.de/?p=u-boot.git;a=patch;h=9cd97c5b049a9a282dda0b1782cbb38d8cedb417
all this is doing is to add detection for hc2 and then load the
correct dtb file and that's all.
without this patch you need to create a symlink or copy to make it
load the correct dtb file (the hc1 one since hc1 & 2 is basically the
same thing)
an mark, please quote past mails in the thread when you reply so it is
clear what you are replying to.
Torbjorn,

That was more me.  Mark is coming in 'fresh' asking about C2 support. 
I  pointed him to past conversations, by you, about HC2 support and
perhaps they may be common issues.

Sorry for any confusion.

Robert
_______________________________________________
arm mailing list -- ***@lists.fedoraproject.org
To unsubscribe send an email to arm-***@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archive

Loading...