Re: EDK2 on RPi3 was: Re: u-boot debug, was: Re: U-boot on RPI3, sees disk but won't boot it

From: Mark Millard <marklmi_at_yahoo.com>
Date: Mon, 24 Oct 2022 18:50:11 UTC
On 2022-Oct-24, at 10:49, bob prohaska <fbsd@www.zefox.net> wrote:

> I'd like to thank both of you for the light you've shed on the
> boot problems encountered with RPi. 
> 
> For the moment I'll go back to my original goal of getting
> Pi2's to boot from the JMS-based usb-serial bridges presently
> on-hand. Preliminary experiments using a JMS561 bridge and
> a Pi2 using the version of bootcode.bin located at
> https://github.com/raspberrypi/firmware/raw/master/boot/bootcode.bin
> [referring page https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#special-bootcode-bin-only-boot-mode]
> seem to be promising under -current.

bootcode.bin is only likely to help stages before
u-boot.bin starts. If it makes to to u-boot.bin
starting, bootcode.bin is then likely irrelevant
from then on.

In fact bootcoce.bin is what loads the start*.elf
that is used. If the start*.elf starts, bootcode.bin
is likely irrelevant past that point.

[The purpose of bootcode.bin is the special boot mode,
more recent versions having more adjustments. There is
no special version of bootcode.bin that I'm aware of.]

> The interest I expressed in EDK2 appears to have been misguided,
> or at least premature. I was hoping it might be a more tractable
> replacement for u-boot, but it's equally inscrutable to an amateur.

> Worse, only the macciatobin flavor builds under poudriere and
> my attempts at a plain "make" build using FLAVOR=rpi3 have so far 
> failed on the same host.

Was this based on mina ports before vs. after:

QUOTE
author	Mark Millard <marklmi26-fbsd@yahoo.com>	2022-10-21 21:47:14 +0000
committer	Lorenzo Salvadore <salvadore@FreeBSD.org>	2022-10-21 22:00:03 +0000
commit	819bf69c15605e1e31998c91fb3fd02d5bc9fa0f (patch)
tree	eb19abc8a6fc47da2072bcd9847e3431c4c9ec93 /sysutils/edk2
parent	bf7a619316b5b24fe6a20df07881d7f2bce821d7 (diff)
download	ports-819bf69c15605e1e31998c91fb3fd02d5bc9fa0f.tar.gz
ports-819bf69c15605e1e31998c91fb3fd02d5bc9fa0f.zip
sysutils/edk2: Fix build on aarch64
Build on aarch64 was failing with the following error:

ld-elf.so.1: /lib/libgcc_s.so.1: version GCC_4.5.0 required by
/usr/local/lib/gcc11/libstdc++.so.6 not found

Fix by using /usr/local/lib/gcc*/libgcc_s.so.1 instead.

While here, also define WWW variable.
END QUOTE

I'll note that quarterly did not get the update yet.

http://ampere3.nyi.freebsd.org/build.html?mastername=131arm64-default&build=5bb856165324

shows sysutils/edk2@rpi4 as having successfully built:

=>> Building sysutils/edk2
build started at Mon Oct 24 00:09:06 UTC 2022
port directory: /usr/ports/sysutils/edk2
package name: edk2-rpi4-g202202_1
building for: FreeBSD 131arm64-default-job-04 13.1-RELEASE-p2 FreeBSD 13.1-RELEASE-p2 arm64
maintained by: uboot@FreeBSD.org
Makefile ident: 
Poudriere version: 3.2.8-21-g883afb07
Host OSVERSION: 1400063
Jail OSVERSION: 1301000
. . .
=======================<phase: package        >============================
===>  Building package for edk2-rpi4-g202202_1
===========================================================================
=>> Cleaning up wrkdir
===>  Cleaning for edk2-rpi4-g202202_1
build of sysutils/edk2@rpi4 | edk2-rpi4-g202202_1 ended at Mon Oct 24 00:16:06 UTC 2022
build time: 00:07:00

(So built under 13.1-RELEASE.)

It also shows sysutils/edk2@fvp has having built just
fine.

@rpi3 and the default build have not started building
yet. 4 flavors (bhve, xen, and 2 qemu variants) are
amd64 only and so are ignored.

(sysutils/uefi-edk2-bhyve-csm is something separate.)


===
Mark Millard
marklmi at yahoo.com