Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Dec 2023 15:32:00 -0800
From:      Mark Millard <marklmi@yahoo.com>
To:        titus <titus@edc.ro>
Cc:        Harry <freebsd@omnilan.de>, freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: u-boot-nanopi-r5c [Was: Re: 14-BETA5 panic on rk3566]
Message-ID:  <578FCC1A-71B9-4712-948C-CC35D6AC89CD@yahoo.com>
In-Reply-To: <C9932658-C4FD-45F4-AE3A-355BCD914BFD@edc.ro>
References:  <2CE509A2-AECF-4562-A080-589AC7888F21@edc.ro> <20231012184430.952dd9d5a26c97ee225c9e77@bidouilliste.com> <5211ad65-5289-4776-b839-7c681de77bf4@omnilan.de> <20231215165640.78bab647c883368b8fc9c34e@bidouilliste.com> <04c04e63-cfe2-4fa6-b6c3-615b6ae8a3d6@omnilan.de> <6DCACFA0-0377-4D6F-804A-CF5CEC8918DB@yahoo.com> <C9932658-C4FD-45F4-AE3A-355BCD914BFD@edc.ro>

next in thread | previous in thread | raw e-mail | index | archive | help
On Dec 18, 2023, at 14:15, titus <titus@edc.ro> wrote:

> if u-boot is configured with EFI support then
> u-boot loads loader.efi directly (bootaa64.efi) which is already on =
aarch64 images

Up to detailed naming conventions, armv7 also works via a
renamed loader.efi for FreeBSD's way of setting things
up (such as via sysutils/u-boot-* ports) and has for years.
The name is bootarm.efi for armv7. For example, each of:

=
FreeBSD-15.0-CURRENT-arm-armv7-GENERICSD-20231216-ca39f23347e1-266973.img.=
xz
=
FreeBSD-14.0-STABLE-arm-armv7-GENERICSD-20231216-2ef9079ece5a-266002.img.x=
z
=
FreeBSD-13.2-STABLE-arm-armv7-GENERICSD-20231216-9986fd59d855-256898.img.x=
z

from the =
http://ftp3.freebsd.org/pub/FreeBSD/snapshots/ISO-IMAGES/?C=3DM&O=3DD
area are that way.

>> On 18 Dec 2023, at 20:44, Mark Millard <marklmi@yahoo.com> wrote:
>>=20
>> On Dec 18, 2023, at 10:22, Harry <freebsd@omnilan.de> wrote:
>>>=20
>>> 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=3D/path/to/rkbin/bin/rk35/rk3568_bl31_v1.43.elf
>>>> export
>>>> ROCKCHIP_TPL=3D/path/to/rkbin/bin/rk35/rk3568_ddr_1560MHz_v1.18.bin
>>>=20
>>> 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=3D/.chroot/build.FreeBSD-14/usr/local/share/u-boot/u-boot-nanopi-r5c/id=
bloader.img of=3D/dev/da1 seek=3D8 bs=3D4k conv=3Dsync
>>> dd =
if=3D/.chroot/build.FreeBSD-14/usr/local/share/u-boot/u-boot-nanopi-r5c/u-=
boot.itb of=3D/dev/da1 seek=3D2048 bs=3D4k conv=3Dsync
>>> 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.
>>>=20
>>> What am I missung after dd'ing?
>>> Any hints appreciated!
>>=20
>> FYI: ubldr is no longer part of the standard/typical way of booting =
these days,
>> at least for armv7 (and aarch64):
>>=20
>> =
https://cgit.freebsd.org/ports/commit/sysutils/u-boot-master?id=3D0d6e5081=
eb00
>>=20
>> reports (back in mid-2021):
>>=20
>> QUOTE
>> author Emmanuel Vadot <manu@FreeBSD.org> 2021-05-11 18:27:14 +0000
>> committer Emmanuel Vadot <manu@FreeBSD.org> 2021-05-11 20:22:54 +0000
>> commit 0d6e5081eb0080c4703f1c5cc69c34f38d9149b7 (patch)
>> . . .
>> sysutils/u-boot-*: Remove ubldr support
>> We have been using loader.efi on armv7 for a long time now. Remove =
support for booting with ubldr and the needed patches that were never =
upstreamed. While here add CONFIG_EFI_GRUB_ARM32_WORKAROUND=3Dy in the =
Fragment as it's needed to have the cache flushed for us when loader.efi =
is started.
>> END QUOTE
>>=20
>> Any documentation indicating sny ubldr involvement likely predates =
that
>> change.
>>=20
>>> -harry
>>>=20
>>> 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...
>>>=20
>>> <FE-r5c_ports.diff.xz>
>>=20


=3D=3D=3D
Mark Millard
marklmi at yahoo.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?578FCC1A-71B9-4712-948C-CC35D6AC89CD>