From nobody Sun Jul 17 06:45:41 2022 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4LlwbM4SC8z4TPfc for ; Sun, 17 Jul 2022 06:45:51 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic306-19.consmr.mail.gq1.yahoo.com (sonic306-19.consmr.mail.gq1.yahoo.com [98.137.68.82]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4LlwbG6FG8z41fN for ; Sun, 17 Jul 2022 06:45:46 +0000 (UTC) (envelope-from marklmi@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1658040345; bh=L7Ao+BpBKWiuWKWbJGu4G59nJSWbbKhE/0mlqYYSuqE=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=TRVNlIII+xEW9EhylvetPGoGvRav+ZF8r4layudeMK9Zrg3Re70U0GcXaYOmxVWaFZY1AlNxKYl3Fa/0mUspOwztPBC+n6XRL/9Ne8krQsY5TmzKXcNMdQGPXrzCSkja+4fnoMQjHQFjA5SuCO+opO7jyzFYpCwVm9dFqsxUeb2/U9/4Xvk7qjDYOfKMSfTwDv8N7xqRYndxgEE+/oOtxRk8W2pMqkGAEsTWCA6ivnqY0Odc8Rmqif/oHrdPDCTD0zQgpeTYEHRZ9CzNNb2sRVW6nyWs/R/W+uxpHdDUAYMZmKaijZIFJMzioqpxaZFfnA+YjcbrKCBlrAt28dtwrQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1658040345; bh=nsjImyqvP/BpQcxYlzr0wDsQ3D3DZjcPKqi/ljG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gj581kp9QvmyDi1c9qq12MLqExFlvQ9i2xyv50cegZvwoUrS8LC_F8T0OBpZr8wRZV5G_ hFh1LOCfpCmISlsZ0o1dVPCrwVWmCz3VMdEVstuGNDIunNSqeO6g_d09wfXDx76OVwf9gy.PADfX exRXvuOYQiGSHrD9gl6vHwNa_qmr0NG8VQt2HWSRwRZi3xtAEzpJxLDGnGYD.uRiiLTjHa_0wKbV eoRSn4.OKBhndE0C9QouhmVwicGVGxyZytAGbqhB6zqnQV0YCglts3F3HV8kR4qWZIpexOyqG.qF jHNAN5VC04QE8NCNbmMiFNJSoANJSVV_WDGzg0X4YtaKWzIEAyVEszeXxMbsFN3lGnv5j3mF_BxQ dCi1xxIx27VLZB0kXJwctBYhasIyT.g.UoFXJuHhB02akLtihezi_JcYkKQUMBc2A1w03PUixsms MrKSowEc5JvkjX13Xyk46TRHeOMeMtgwSAkiVWjo4ldd9yEZ.vPtVHjP26ob1dN9Eg1QjxYeiqDA 9bSRPAUJKyun20RL8P.8YRA.Ohp6CB.WFHoWhm_v0uyGgYTIWhdqoSeBTm2t4ydX4rpBNoYYM6m3 9H4g- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.gq1.yahoo.com with HTTP; Sun, 17 Jul 2022 06:45:45 +0000 Received: by hermes--production-gq1-56bb98dbc7-28prh (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 2f74c6f4928df2986b0e57e4ef4fb5a2; Sun, 17 Jul 2022 06:45:42 +0000 (UTC) Content-Type: text/plain; charset=us-ascii List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: git: 1dfcff294e44 - main - release: increase IMAGE_SIZE for arm, arm64, riscv [odd alignment for SBC images] From: Mark Millard In-Reply-To: Date: Sat, 16 Jul 2022 23:45:41 -0700 Cc: Warner Losh , dev-commits-src-main@freebsd.org, "Rodney W. Grimes" , "Dr. Rolf Jansen" , freebsd-arm Content-Transfer-Encoding: quoted-printable Message-Id: <16906DFD-286B-4D59-9438-CA9CD9026C55@yahoo.com> References: <84410D65-6F86-44E5-8B14-8A523C9919C7.ref@yahoo.com> <84410D65-6F86-44E5-8B14-8A523C9919C7@yahoo.com> <20220713201327.GY30607@FreeBSD.org> <7F4F9683-B4DE-4F65-BBD7-027039A0C270@yahoo.com> <20220713204227.GA30607@FreeBSD.org> <8A02A4A4-9F3A-47F2-9985-EA2151043BB7@yahoo.com> <4D903E5A-58FB-4516-AC53-AEDFF48564A7@yahoo.com> <20220714152125.GB30607@FreeBSD.org> <3E2DCFBD-CC8F-4C13-B18C-B7DA26ED8E84@yahoo.com> To: Glen Barber X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Rspamd-Queue-Id: 4LlwbG6FG8z41fN X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=TRVNlIII; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.68.82 as permitted sender) smtp.mailfrom=marklmi@yahoo.com X-Spamd-Result: default: False [-3.38 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.991]; NEURAL_HAM_MEDIUM(-0.89)[-0.887]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; BLOCKLISTDE_FAIL(0.00)[98.137.68.82:server fail]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RCVD_IN_DNSWL_NONE(0.00)[98.137.68.82:from]; RCPT_COUNT_FIVE(0.00)[6]; FREEMAIL_FROM(0.00)[yahoo.com]; TO_DN_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org] X-ThisMailContainsUnwantedMimeParts: N On 2022-Jul-16, at 23:24, Mark Millard wrote: > On 2022-Jul-15, at 17:41, Mark Millard wrote: >=20 >> FYI for the new snapshot build of 13.1-STABLE: >>=20 >> # mdconfig -u0 -f = FreeBSD-13.1-STABLE-arm64-aarch64-RPI-20220715-831c6b8edda-251792.img=20 >> # gpart show md0 >> =3D> 63 10485697 md0 MBR (5.0G) >> 63 2016 - free - (1.0M) >> 2079 102312 1 fat32lba [active] (50M) >> 104391 10381329 2 freebsd (5.0G) >> 10485720 40 - free - (20K) >>=20 >> So: still has the 2016 and 2079 that do not seem to match >> what /usr/src/release/ materials would indicate --and the >> 2079 leads to poor alignment for a microsd cards, for >> example. >>=20 >> But, at least something was produced this time. There is >> now a 13.1-STABLE snapshot to test the handling related >> to the new UFS/FFS superblock validations. >=20 > In the live build environment that makes the images, > what is: >=20 > # sysctl kern.geom.part.mbr.enforce_chs > kern.geom.part.mbr.enforce_chs: 0 >=20 > I ask because of the description: >=20 > QUOTE > kern.geom.part.mbr.enforce_chs: 0 > Specify how the Master Boot Record (MBR) module does = alignment. > If this variable is set to a non-zero value, the module = will > automatically recalculate the user-specified offset and = size for > alignment with the CHS geometry. Otherwise the values = will be > left unchanged. > END QUOTE >=20 > In particular, the text about non-zero values leading to: >=20 > QUOTE > the module will > automatically recalculate the user-specified offset and = size for > alignment with the CHS geometry > END QUOTE >=20 > This sounds like a potential way to not end up with the > what the /usr/src/release handling requests for the > small board computer images. It might explain the > mismatched alignment that I've been reporting. I tried it locally and it reproduced the problem alignment: # sysctl kern.geom.part.mbr.enforce_chs=3D1 kern.geom.part.mbr.enforce_chs: 0 -> 1 # truncate -s3072m mmjnk.test # mdconfig -u0 -fmmjnk.test -x63 -y255 # gpart create -sMBR md0 md0 created # gpart show md0 =3D> 63 6291393 md0 MBR (3.0G) 63 6291393 - free - (3.0G) CA72_16Gp_ZFS aarch64 1400063 1400063 # gpart add -t'!12' -a512k -s50m = -b1m md0 md0s1 added CA72_16Gp_ZFS aarch64 1400063 1400063 # gpart show md0 =3D> 63 6291393 md0 MBR (3.0G) 63 2016 - free - (1.0M) 2079 102312 1 fat32lba (50M) 104391 6187065 - free - (3.0G) Note the 2016 and 2079 (instead of 1985 and 2048). Reminder of the old result, reported before, that implicitly had: # sysctl kern.geom.part.mbr.enforce_chs kern.geom.part.mbr.enforce_chs: 0 as its context: QUOTE # truncate -s3072m mmjnk.test # mdconfig -u0 -fmmjnk.test -x63 -y255 # gpart create -sMBR md0 md0 created # gpart show md0 =3D> 63 6291393 md0 MBR (3.0G) 63 6291393 - free - (3.0G) # gpart add -t'!12' -a512k -s50m -b1m md0 md0s1 added # gpart show md0 =3D> 63 6291393 md0 MBR (3.0G) 63 1985 - free - (993K) 2048 102400 1 fat32lba (50M) 104448 6187008 - free - (3.0G) END QUOTE Looks to me like the environment that uses /usr/src/release to produce Small Board Computer images has: # sysctl kern.geom.part.mbr.enforce_chs kern.geom.part.mbr.enforce_chs: 1 and this is leading to the misalignments for the MBR images. =3D=3D=3D Mark Millard marklmi at yahoo.com