Re: u-boot-nanopi-r5c [Was: Re: 14-BETA5 panic on rk3566] https://personalbsd.org/images
Date: Tue, 19 Dec 2023 17:45:51 UTC
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 <https://github.com/Kwiboo/u-boot-rockchip> (mostly because they provided an opi3b dtb and mainline did not) add CONFIG_EFI_LOADER=y 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 you may want to take a look at https://forums.freebsd.org/threads/running-freebsd-on-radxa-rock-3c-rk3566-board.89389/ <https://forums.freebsd.org/threads/running-freebsd-on-radxa-rock-3c-rk3566-board.89389/> 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-NanoPi-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.html >> 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 > > >