Re: RPI4-4Gb Boot fails from SD card (both my build AND the official 14.3 build)
Date: Sun, 27 Jul 2025 17:23:54 UTC
On Jul 27, 2025, at 10:14, Karl Denninger <karl@denninger.net> wrote:
> Yeah well, "works" always beats "doesn't" and those other ports (I also build for Pi2s, and that's there as well) are still being updated as packages because there they are, with a 2025 mod date on them.
> Right now, as it stands, at least some older Pi4s will NOT boot the current published images.
> I will see (when my new one gets here) if that SAME image (with the "deprecated" u-boot from the Pi3 package) will boot in the newer Pi4s.
I'll note that the rpi2 U-Boot is for the v1.1 and before 32-bit-only
version (or 32-bit-only operation on a 64-bit capable system).
There never was a U-Boot for the v1.2 RPi2B that was 64-bit capable:
the RPi3B support covered that.
I'll get access to an old 8 GiByte RPi4B (that has the 3 GiByte
limitation) and see if it has the problem or not.
> On 7/27/2025 13:10, Mark Millard wrote:
>> On Jul 27, 2025, at 09:47, Karl Denninger <karl@denninger.net> wrote:
>>
>>
>>> This is what fails (from /usr/local/share/u-boot/u-boot-rpi4):
>>> strings u-boot.bin | grep "U-Boot 20"
>>> _+{}|~:"~<>?2H53F6CDBAU-Boot 2025.04 (Jul 01 2025 - 23:03:56 +0000)
>>> $ cksum u-boot.bin
>>> 3394302399 702400 u-boot.bin
>>> This boots (from /usr/local/share/u-boot/u-boot-rpi3):
>>> $ strings u-boot.bin | grep "U-Boot 20"
>>> _+{}|~:"~<>?2H53F6CDBAU-Boot 2025.04 (Jul 01 2025 - 19:02:10 +0000)
>>> $ cksum u-boot.bin
>>> 3805910080 641584 u-boot.bin
>>> I changed nothing else; merely copied in the pi-3 u-boot.bin to the card that already had the rest on it (didn't re-run a build) and it boots as expected.
>>>
>> The modern https://cgit.freebsd.org/src/ has just:
>>
>> release/arm64/RPI.conf
>>
>> for the RPi3B's/RPi4B's and such that uses:
>>
>> EMBEDDEDPORTS="sysutils/u-boot-rpi-arm64 sysutils/rpi-firmware"
>>
>> It makes no use of the ports sysutils/u-boot-rpi4 or of
>> sysutils/u-boot-rpi3 . This started in release/arm64/ back
>> in very late 2020:
>>
>> QUOTE
>> author Emmanuel Vadot <manu@FreeBSD.org> 2020-12-15 15:13:06 +0000
>> committer Emmanuel Vadot <manu@FreeBSD.org> 2020-12-15 15:13:06 +0000
>>
>> commit ff9c6d3f09d14b02b30a7f1bbf0613a8a23ec0f5 (patch)
>> tree 9414ba9e916c2df78b7b1a39abdc140c2cabb397 /release/arm64/RPI.conf
>> parent b8b3f4fdc31fb21b54f5f3104e318e1c342cb2d9 (diff)
>>
>> release: Rename arm64/RPI3.conf to arm64/RPI.conf
>>
>> We now have a u-boot port and config.txt for booting on all 64bits variant of the RPI boards (RPI2v1.1, RPI3* and RPI4*) so use the new u-boot-rpi-arm64 and the config_arm64.txt files.
>> END QUOTE
>>
>> You are using U-Boot's that have no official release status
>> any more. (Not that the official one works: what I tested
>> should have had the official sysutils/u-boot-rpi-arm64
>> u-boot.bin and it fails for the old 4 GiByte RPI4B.)
>>
>>
>>> start4.elf comes off the rpi-firmware package (and thus is invarient); mine shows:
>>> [karl@NewFS /usr/local/share/rpi-firmware]$ strings start4.elf|grep _ID_
>>> VC_BUILD_ID_USER: dom
>>> VC_BUILD_ID_TIME: 10:50:39
>>> VC_BUILD_ID_VARIANT: start
>>> VC_BUILD_ID_TIME: Mar 17 2023
>>> VC_BUILD_ID_BRANCH: bcm2711_2
>>> VC_BUILD_ID_HOSTNAME: buildbot
>>> VC_BUILD_ID_PLATFORM: raspberrypi_linux
>>> VC_BUILD_ID_VERSION: 82f3750a65fadae9a38077e3c2e217ad158c8d54 (clean)
>>> (Same as yours)
>>> On 7/27/2025 12:37, Bakul Shah wrote:
>>>
>>>> FWIW, I am running freebsd-current on a 4GB Raspberry Pi 4 Model B Rev 1.1 (bought in June 2019). It used to run 14.0-RELEASE but I switched it to 15.0-CURRENT in February. Its firmware was updated (under raspbian) I don't recall what it is now. Its root is on a usb ssd & doesn't have an SDcard installed now (last it had an sdcard in on October 29).
>>>>
>>>> # strings /boot/efi/u-boot.bin | grep "U-Boot 20"
>>>> _+{}|~:"~<>?2H53F6CDBAU-Boot 2024.07 (Apr 24 2025 - 03:47:59 +0000)
>>>>
>>>> # strings /boot/efi/start4.elf | grep _ID_
>>>> VC_BUILD_ID_USER: dom
>>>> VC_BUILD_ID_TIME: 10:50:39
>>>> VC_BUILD_ID_VARIANT: start
>>>> VC_BUILD_ID_TIME: Mar 17 2023
>>>> VC_BUILD_ID_BRANCH: bcm2711_2
>>>> VC_BUILD_ID_HOSTNAME: buildbot
>>>> VC_BUILD_ID_PLATFORM: raspberrypi_linux
>>>> VC_BUILD_ID_VERSION: 82f3750a65fadae9a38077e3c2e217ad158c8d54 (clean)
>>>>
>>>> ^^^ this is the same as what Mark Millard reported.
>>>>
>>>>
>>>>> On Jul 27, 2025, at 7:53 AM, Karl Denninger <karl@denninger.net> wrote:
>>>>>
>>>>> Now this is interesting.....
>>>>> The image I have been running (and the one apparently in the official releases -- I'll have to go look but I mimic'd what it was doing for ARM64 on the Pis) was using the u-boot binary out of the rpi-4 package.
>>>>> If I copy in the u-boot.bin file out of the rpi-3 package the older Pi4 I have here boots and runs. The u-boot.bin files are different in both size and content despite allegedly being the same version.
>>>>> I do not have (yet) one of the newer Pi4s to test with but do have one coming, so I'll check that one as well -- and in the meantime, well, guess where I'll be pulling the u-boot binary from in my builds since this one works with both the "3" and "4"s that I have.....
>>>>> On 7/27/2025 08:10, Karl Denninger wrote:
>>>>>
>>>>>> On 7/26/2025 23:40, Mark Millard wrote:
>>>>>>
>>>>>>> On Jul 26, 2025, at 18:24, Karl Denninger <karl@denninger.net> wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> Well, the same card (physically the same card) boots in the Pi3 with the same FreeBSD load *and* the same card loaded with an "official" Pi firmware load boots in the 4 and runs. I have attempted this with two very different SD cards -- one Sandisk Ultra that previously had Kodi on it and was running in that specific Pi4 and the second is one that while slower is one of a dozen here of a series that have served me extremely well in Pis for a very, very long time.
>>>>>>>> The builds on my box (and apparently the one on the FreeBSD official image page) are all using 2025-04 u-boot as the official FreeBSD load off the distribution page behaves exactly the same way -- the EFI loader boots without incident, gets and loads the kernel, the kernel boots as expected but the mmc driver takes timeouts and cannot see the sd card after the kernel comes up, thus root mount fails.
>>>>>>>>
>>>>>>>>
>>>>>>> Summary: The below booted from a microsd card just fine
>>>>>>> on one system --but not on another-- based on:
>>>>>>>
>>>>>>> FreeBSD-14.3-STABLE-arm64-aarch64-RPI-20250724-f0a7a1bda375-272016.img.xz
>>>>>>>
>>>>>>> It failed for a rather old 4 GByte RPi4B that I got access
>>>>>>> to (older EEPROM content as well) --but worked on a modern
>>>>>>> 8 GiByte RPi4B.
>>>>>>>
>>>>>> Lovely. So from appearances there's a hardware difference that apparently results in this; this is an older one (quite old) which is the only "4" I have right now. I guess it get relegated to Kodi use (if ever); I'll see about sourcing some newer ones (whether I borked it when I updated its firmware as Kodi wanted or whether its rot somewhere in the FreeBSD driver code that breaks for this hardware but not newer stuff I don't know.)
>>>>>> I'll play with some older u-boot copies I have laying around but since the EFI loader and then kernel starts I'll wager that ain't the issue and see about sourcing a couple of the newer ones to play with for the purpose I'm screwing with these in the first place.
>>>>>>
>>>>>
===
Mark Millard
marklmi at yahoo.com