Re: State of the freebsd/crochet project?

Mark Millard <[email protected]>
Newsgroups gmane.os.freebsd.devel.arm
Message-ID <[email protected]>
On Oct 18, 2023, at 21:41, Rahul Rameshbabu <[email protected]> wrote:

> On Tue, 17 Oct, 2023 09:01:33 -0600 "Warner Losh" <[email protected]> wrote:
>> On Tue, Oct 17, 2023, 7:44 AM void <[email protected]> wrote:
>> 
>> On Tue, Oct 17, 2023 at 07:13:28AM -0600, Warner Losh wrote:
>> 
>>> Crochet has no active maintainers. Most people have moved on to poudriere.
>> 
>> Does poudriere handle the msdos uboot *and* efi part when 
>> creating the image?
>> 
>> Yes. I worked with manu years ago to put all the needed metadata for the different boards into the ports...
> 
> It does but it seems to have an unfortunate caveat. It assumes that
> FAT16 is supported by all embedded targets. The Raspberry Pi 4 and I
> assume the Pi 5 as well drop support for FAT16

The snapshot images booted the RPI4B's that I have access to just fine
last I tried such. But release/arm64/RPI.conf and release/tools/arm.subr
which are used to build such uses (selective axtractions across files):

FAT_SIZE="50m -b 1m"
FAT_TYPE="16"
. . .
gpart add -t efi -l efi -a 512k -s ${FAT_SIZE} ${mddev}
newfs_msdos -L efi -F ${FAT_TYPE} /dev/${mddev}s1

FreeBSD release images are also build with such: efi partition
type and a FAT16 file system.

Looking at a (my abbreviation) RaspiOS64 boot media used to boot
the RPi4B's (official RPi* media content, not FreeBSD materials):

# newfs_msdos -N /dev/da0s1
/dev/da0s1: 523984 sectors in 32749 FAT16 clusters (8192 bytes/cluster)
BytesPerSec=512 SecPerClust=16 ResSectors=1 FATs=2 RootDirEnts=512 Media=0xf0 FATsecs=128 SecPerTrack=63 Heads=255 HiddenSecs=0 HugeSectors=524288

But it does have a partition type of fat32lba:

# gpart show -p /dev/da0
=>       63  468862065    da0  MBR  (224G)
         63       8129         - free -  (4.0M)
       8192     524288  da0s1  fat32lba  (256M)
     532480  468329648  da0s2  linux-data  (223G)

Do you know some specific RPi4B EEPROM content for which a FAT16
file syatem is not supported? (The EEPROM has the RPi4B boot
loader.) Or are you saying some U-Boot vintage is restricted to
FAT32 file systems for loading FreeBSD's EFI/BOOT/bootaa64.efi ?

Or may be you are referencing the partition type (expressed here
in gpart terms), instead of the actual file system type that is
contained? :

     efi                    The system partition for computers that use the
                            Extensible Firmware Interface (EFI).  The scheme-
                            specific types are "!239" for MBR, and
                            "!c12a7328-f81f-11d2-ba4b-00a0c93ec93b" for GPT.
. . .
     fat16                  A partition that contains a FAT16 filesystem.  The
                            scheme-specific type is "!6" for MBR.

     fat32                  A partition that contains a FAT32 filesystem.  The
                            scheme-specific type is "!11" for MBR.

     fat32lba               A partition that contains a FAT32 (LBA)
                            filesystem.  The scheme-specific type is "!12" for
                            MBR.

(It has been some time since last I tried it, but last I tried
partition type fat16, the RPi4B's boot from it just fine if I
remember right. But GPT is supported, not just MBR.)

> , so the boot partition
> needs to be FAT32.
> 

Not for the actual file system for any fairly modern vintage of
RPi4B EEPROM content or U-Boot that I'm aware of. I've less
certainty about the range of partition types, not having tested
such in recent times.

Is there a chance you are using so large of an msdos file
system that a FAT32/FAT32LBA file system is a requirement?

===
Mark Millard
marklmi at yahoo.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.