Re: u-boot-nanopi-r5c [Was: Re: 14-BETA5 panic on rk3566]

From: Harry <freebsd_at_omnilan.de>
Date: Mon, 18 Dec 2023 18:22:11 UTC
On 12/15/23 16:56, Emmanuel Vadot wrote:
>   U-Boot also doesn't support the DRAM controller so we also need an
> external blob from rkbin.
>   That's the main reason I haven't done ports for u-boot on rk356x so
> one have to compile u-boot themselve.
>   It can be simply done like any other u-boot targets and only needs two
> env variable :
> export BL31=/path/to/rkbin/bin/rk35/rk3568_bl31_v1.43.elf
> export
> ROCKCHIP_TPL=/path/to/rkbin/bin/rk35/rk3568_ddr_1560MHz_v1.18.bin

Thanks! I'm happy that - besides the ddr_CLOCK - it matches what I came 
up with so far :-)

I'm trying to understand what happens with the help of this:
http://opensource.rock-chips.com/wiki_Boot_option

The attached diff (updates sysutils/linux-rkbin (g20190719->g20230726), 
sysutils/u-boot-master (2020.07->2023.10) and adds 
sysutils/u-boot-nanopi-r5c)
allows me to build u-boot, supposedly supporting R5C(rk3568).

After putting these onto SD-card with
dd 
if=/.chroot/build.FreeBSD-14/usr/local/share/u-boot/u-boot-nanopi-r5c/idbloader.img 
of=/dev/da1 seek=8 bs=4k conv=sync
dd 
if=/.chroot/build.FreeBSD-14/usr/local/share/u-boot/u-boot-nanopi-r5c/u-boot.itb 
of=/dev/da1 seek=2048 bs=4k conv=sync

my nanopi-R5C boots from eMMC instead of SD.

I downloaded a NANOPI-R5C_EFI.itb elsewhere.
I can get the TianoCore port booting...

But I'm missing the part, where ubldr, the FreeBSD post-u-boot-loader, 
is supposed to take over - and how...

I simply created a freebsd-ufs partition and put /boot along with a 
loader.conf onto it, which works using the foreign TianoCore port, but 
not my newly created u-boot.


What am I missung after dd'ing?
Any hints appreciated!


-harry


P.S.: sysutils/u-boot-nanopi-r5c/Makefile is wrong in the diff attached, 
the I used the commented nanopi-r5c-rk3568_defconfig! 
evb-rk3568_defconfig is a leftover...