Re: git: 1dfcff294e44 - main - release: increase IMAGE_SIZE for arm, arm64, riscv

From: Mark Millard <marklmi_at_yahoo.com>
Date: Thu, 14 Jul 2022 15:10:12 UTC
On 2022-Jul-13, at 13:52, Mark Millard <marklmi@yahoo.com> wrote:

>>>>> . . .
>>>>> QUOTE
>>>>> I tried what it looks to me the /usr/src/release/
>>>>> code would do initially for arm64/RPI.conf (but with
>>>>> my file naming and an explicit -u0 style of use):
>>>>> 
>>>>> # truncate -s3072m mmjnk.test
>>>>> # mdconfig -u0 -fmmjnk.test -x63 -y255
>>>>> # gpart create -sMBR md0
>>>>> md0 created
>>>>> # gpart show md0
>>>>> =>     63  6291393  md0  MBR  (3.0G)
>>>>>    63  6291393       - free -  (3.0G)
>>>>> # gpart add -t'!12' -a512k -s50m -b1m md0
>>>>> md0s1 added
>>>>> # gpart show md0
>>>>> =>     63  6291393  md0  MBR  (3.0G)
>>>>>    63     1985       - free -  (993K)
>>>>>  2048   102400    1  fat32lba  (50M)
>>>>> 104448  6187008       - free -  (3.0G)

Note that 2048 is nicely aligned for microsd cards.

>>>>> I tried the same sequence in a chroot into a 13.0-RELEASE-p11
>>>>> tree on an aarch64 main [so: 14] machine. I got the same result.
>>>>> 
>>>>> But such is not what the 13.1-RELEASE build produced, for
>>>>> example:
>>>>> 
>>>>> # mdconfig -u0 -fFreeBSD-13.1-RELEASE-arm64-aarch64-RPI.img -x63 -y255
>>>>> # gpart show md0
>>>>> =>     63  6291393  md0  MBR  (3.0G)
>>>>>    63     2016       - free -  (1.0M)
>>>>>  2079   102312    1  fat32lba  [active]  (50M)
>>>>> 104391  6187041    2  freebsd  (3.0G)
>>>>> 6291432       24       - free -  (12K)

Note that 2079 is not nicely aligned for microsd cards.
(So the 2016 is larger than appropriate for alignment.)

>>>>> (There are no 13.1-STABLE snapshots available to download
>>>>> and look at.)
>>>>> 
>>>>> Looking at the recent 14.0-CURRENT snapshot:
>>>>> 
>>>>> # mdconfig -u0 -fFreeBSD-14.0-CURRENT-arm64-aarch64-RPI-20220708-a0b956f5ac5-256605.img -x63 -y255
>>>>> # gpart show md0
>>>>> =>     63  6291393  md0  MBR  (3.0G)
>>>>>    63     2016       - free -  (1.0M)
>>>>>  2079   102312    1  fat32lba  [active]  (50M)
>>>>> 104391  6187041    2  freebsd  (3.0G)
>>>>> 6291432       24       - free -  (12K)

Again, note that 2079 is not nicely aligned for microsd cards.

>>>>> So, also not matching.
>>>>> END QUOTE
. . .

The original message that I quoted from was from an exchange
about the inefficient alignments in the existing .img files.

But it does not appear that modern /usr/src/release/ by itself
would produce the inefficient alignments unless the mdconfig
and gpart combination used did something odd overall that
did not happen in my example sequence.

Here, I'm just using the mismatch to indicate that the snapshot
and release builds do not seem to match what /usr/src/release/
is set up to do. I've not managed to reproduce the alignment
that the snapshot and release .img files have in them by
following the /usr/src/release steps for the example Small
Board Computer that I'm using to illustrate the issue.

It suggests something odd is going on for the official image
builds that makes the difference. What, I've no clue.


===
Mark Millard
marklmi at yahoo.com