From nobody Tue Dec 19 17:45:51 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Svkd15pNNz54cxN for ; Tue, 19 Dec 2023 17:45:57 +0000 (UTC) (envelope-from titus@edc.ro) Received: from eatlas.ro (eatlas.ro [86.126.82.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "eatlas.ro", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Svkd117CLz4VV3 for ; Tue, 19 Dec 2023 17:45:56 +0000 (UTC) (envelope-from titus@edc.ro) Authentication-Results: mx1.freebsd.org; none Received: from mail.edc.ro ([10.1.4.58]) by eatlas.ro (8.16.1/8.16.1) with ESMTPS id 3BJHjpel088639 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 19 Dec 2023 19:45:51 +0200 (EET) (envelope-from titus@edc.ro) Received: from tituss-imac.eatlas.local (eatlas.ro [86.126.82.18]) (authenticated bits=0) by mail.edc.ro (8.16.1/8.16.1) with ESMTPSA id 3BJHjngE073175 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Dec 2023 19:45:50 +0200 (EET) (envelope-from titus@edc.ro) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=edc.ro; s=mail; t=1703007950; bh=3lqiyxyTvJGA6bqmuNaQGmmMj2SAlxn24sKtRHWZiy8=; h=From:Subject:Date:In-Reply-To:Cc:To:References; b=qrbmNvVDONCAYEuJnQw37s87P1W6BsbdBfd5Z7bJ3uIEsrLKozi7aWmQLoprDH4CY k2I8akDoifu4YmFZKCIOGRtg/e4PGhVnCqiIWOseBM8yCZxfo9BTfEPpqHmwXfJZi5 8L6PWMa4psnlwZVqO0dUyEVidK+0GVcADHjdCX9o= From: titus Message-Id: <1573661F-100C-46C6-9A75-524B1AACF1FA@edc.ro> Content-Type: multipart/alternative; boundary="Apple-Mail=_3658101A-78B0-4427-B7B5-98EC65515BC6" List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Subject: Re: u-boot-nanopi-r5c [Was: Re: 14-BETA5 panic on rk3566] https://personalbsd.org/images Date: Tue, 19 Dec 2023 19:45:51 +0200 In-Reply-To: Cc: freebsd-arm To: Harry References: <43691d67-3d00-e8d5-f917-fbb2963454cc@thegalacticzoo.com> X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on ns.edc.ro X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:8708, ipnet:86.120.0.0/13, country:RO] X-Spamd-Bar: ---- X-Rspamd-Queue-Id: 4Svkd117CLz4VV3 --Apple-Mail=_3658101A-78B0-4427-B7B5-98EC65515BC6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii u-boot can/does provide EFI api to freebsd so you can boot an aarch64 = image if have an rk3566 board (orange pi 3b) and i run 14.x on it i just built https://github.com/Kwiboo/u-boot-rockchip = (mostly because they = provided an opi3b dtb and mainline did not) add CONFIG_EFI_LOADER=3Dy to the opi3b_defconfig, build, dd, boot (bl31 = built from source, tpl from rkbin) depending on your board / dtb / luck what works and what not may vary i have uart / sd / emmc / gmac / sata / pcie / usb / thermal / cpu freq = control / spi flash working on mine=20 but i need to patch some of the drivers and have a frankensteined dtb = between official opi3b and pine quarzt64 i have no video output, only serial you may want to take a look at = https://forums.freebsd.org/threads/running-freebsd-on-radxa-rock-3c-rk3566= -board.89389/ = =20 rk3399 is better supported than rk35xx > On Dec 19, 2023, at 7:22 PM, Harry wrote: >=20 > On 12/16/23 04:30, Fred G. Finster wrote: >>> ... >> Hary, I can see you are testing and setting up a build environment = for the Nano Pi R5C SBC. Look at Sleep Walkers work over at = https://personalBSD.org and Telegram Group t.me/personalbsd >>=20 >> = https://personalbsd.org/images/FreeBSD-aarch64-14.0-CURRENT-NanoPi-R5C-202= 30522.img.xz=20 >>=20 >=20 > Hello Fred, >=20 >=20 > thanks, I stumbled across this resource before purchasing R5C, which I = considered as my insurance for having an easy onboarding, I thought - = the download is 404 these days and I couldn't find a copy out there. >=20 >=20 >> Give this image a test run on your hardware NanoPi r5c. Then read = register settings and save. See what settings and values (ie binary = blobs NOT LOADED ) exist in your kernel boot image. Then modify your = own sources and build another new image again. >> Chat with SleepWalker and maybe get a working build environment? >> ExtroWerk user, was porting FreeBSD to a GeniaTech RK3566 SBC board. >> https://t.me/PersonalBSD/11146 I see ExtroWerk was asking me to = build an image for him. >> https://extrowerk.com/2023-10-30/Geniatech-XPI-3566-ZERO-SBC.html >> https://github.com/extrowerk >>=20 >>=20 >>=20 >> Yes, Harry, I want to see you successfully build a FreeBSD kernel = from source to run and execute on the NanoPi r5c single board computer. = Ie Get all the "little ducks in a row." >=20 >=20 > Stacking downloaded images in the correct order with correct offset = worked - I can boot cross-compiled FreeBSD-14-aarch64 kernel+world from = such a SD-card. But the TianoCore port I found produces incorrect ACPI = tables - e.g the eMMC controller is only accessible if I disable ACPI = and load a DTB via loader.conf. >=20 > My goal was to understand the arm-SoC boot process, at least to some = degree, and having the ability to compile all the necessary blobs myself = - otherwise I would need to choose a vendor who officially supports = FreeBSD - which is none afaik, meaning I'd need to deploy a different = operating system for my project. Either vendor supported or code = available. Tinkering with dubiously acquired 'images' isn't feasible = for me. >=20 > Is the complete u-boot port obsolete these days? As far as I = understand, there's no UEFI support and since ubldr was canceled. Is = there really no way to boot FreeBSD aarch64 with self-compiled = ingredients? (at least with only including the bl31_dram blob) >=20 > I will have a look in src/release for the aarch64 platform, but I = thought deploying the boot firmware was more straight forward - = especially since there's plenty of doc's claiming that u-boot is all you = need... > It's hard to identify outdated docs - which is the majority, if not = all I found so far... >=20 > Thanks, >=20 > -harry >=20 >=20 >=20 --Apple-Mail=_3658101A-78B0-4427-B7B5-98EC65515BC6 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii u-boot can/does provide EFI api to freebsd so you can boot an = aarch64 image
if have an rk3566 board (orange pi 3b) and = i run 14.x on it
i just built https://github.com/Kwiboo/u-boot-rockchip (mostly = because they provided an opi3b dtb and mainline did not)
add CONFIG_EFI_LOADER=3Dy to the opi3b_defconfig, build, dd, = boot (bl31 built from source, tpl from rkbin)
depending on your board / dtb / luck what works and what not = may vary
i have uart / sd / emmc / gmac / sata / = pcie / usb / thermal / cpu freq control / spi flash working on = mine 
but i need to patch some of the = drivers and have a frankensteined dtb between official opi3b and pine = quarzt64
i have no video output, only serial

rk3399 is better supported than = rk35xx

On Dec 19, 2023, at 7:22 PM, Harry <freebsd@omnilan.de> = wrote:

On 12/16/23 04:30, Fred G. Finster wrote:
...
Hary,  I can see you are = testing and setting up a build environment for the Nano Pi R5C = SBC.   Look at Sleep Walkers work over at https://personalBSD.org   and Telegram Group t.me/personalbsd

https://personalbsd.org/images/FreeBSD-aarch64-14.0-CURRENT-Nan= oPi-R5C-20230522.img.xz

Hello Fred,


thanks, I stumbled across this resource before purchasing = R5C, which I considered as my insurance for having an easy onboarding, I = thought - the download is 404 these days and I couldn't find a copy out = there.


Give this image a test run on your hardware = NanoPi r5c.   Then read register settings and save.  See = what settings and values (ie binary blobs NOT LOADED ) exist in your = kernel boot image.  Then modify your own sources and build another = new image again.
Chat with SleepWalker and maybe get a = working build environment?
ExtroWerk user, was porting = FreeBSD to a GeniaTech RK3566 SBC board.
https://t.me/PersonalBSD/11146  I see ExtroWerk was = asking me to build an image for him.
https://extrowerk.com/2023-10-30/Geniatech-XPI-3566-ZERO-SBC.ht= ml
https://github.com/extrowerk



Yes, Harry, I want to see you = successfully build a FreeBSD kernel from source to run and execute on = the NanoPi r5c single board computer.  Ie Get all the "little ducks = in a row."


Stacking downloaded images in the correct order with correct = offset worked - I can boot cross-compiled FreeBSD-14-aarch64 = kernel+world from such a SD-card.  But the TianoCore port I found = produces incorrect ACPI tables - e.g the eMMC controller is only = accessible if I disable ACPI and load a DTB via loader.conf.

My goal was to understand the arm-SoC boot = process, at least to some degree, and having the ability to compile all = the necessary blobs myself - otherwise I would need to choose a vendor = who officially supports FreeBSD - which is none afaik, meaning I'd need = to deploy a different operating system for my project. Either vendor = supported or code available.  Tinkering with dubiously acquired = 'images' isn't feasible for me.

Is the = complete u-boot port obsolete these days?  As far as I understand, = there's no UEFI support and since ubldr was canceled. Is there really no = way to boot FreeBSD aarch64 with self-compiled ingredients? (at least = with only including the bl31_dram blob)

I = will have a look in src/release for the aarch64 platform, but I thought = deploying the boot firmware was more straight forward - especially since = there's plenty of doc's claiming that u-boot is all you need...
It's hard to identify outdated docs - which is the majority, = if not all I found so far...

Thanks,

-harry




= --Apple-Mail=_3658101A-78B0-4427-B7B5-98EC65515BC6--