From nobody Sun Jul 17 18:46:08 2022 X-Original-To: dev-commits-src-main@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 4LmDZZ4jxmz4X1JJ for ; Sun, 17 Jul 2022 18:46:14 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic305-20.consmr.mail.gq1.yahoo.com (sonic305-20.consmr.mail.gq1.yahoo.com [98.137.64.83]) (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 4LmDZZ3cMgz47X7 for ; Sun, 17 Jul 2022 18:46:14 +0000 (UTC) (envelope-from marklmi@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1658083572; bh=v0ihfuLGDiib8XNW/cAjXAfl2BIAbCfcOyU4cnaa9bA=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=oga/bJrlAAEBXj6LpSs5buR9uMyfdNeMN/3NCma3e1Jjd2xrxXm7qVz3K/zDVLn5+1xLLdqFEJrDV2svDAtNnbq+QFp1prs53HSzYaBBUj2OPify5pjc6EZtmUMNQmo3BZ5sG5pc5DMENOb+uh4ZhghDCueQugW1QD6Siry86b+ZWzjpliBGoJiaCKWJ1W+m2+ZIQrPkBiiK53S0gY3xc56z8sE7lEHv9O5rx5wbjiSmiXNNr/z7zTi7Im3HuozDOcFyaky6+6YWLqHvA/qkkqivBSyBT5decMeyy+B2MQT2Y2cdPQjgESCyp+0jI060cxHl80E9pYztULYx+fGKIw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1658083572; bh=JQDT2xqzEeIEzf+v32QPS1jkev1DRE37Bg7gQdzYIPD=; h=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wN4ejWHkWwlfHQn3afOcycXAFCBDHD2Mbc_IA._tyIySD72TI. D4mTLN97A2NGDMwhpaUCfiq_kQOK6BdeqAFgYEUQBwyf8ENqWjWb4.qJ9hVI5gS7cPKnabfg4DWv GnIQyBpQ6XtMlUPQicZ2EXKSvz2fkYrzocVg3yIA1JaspGQ36OvC5t_8weJnJFZ8q8Ptt5iDjm8f eTswNqYvvXenxIon3HuQo1GEwEMfk2TsTBjaXmoMHNn_QTQm6BEP7Z03OgUz8wzqbLm2_j76FdH9 s4597fE1rCU7VNRt.R4F1i1DvM31YRtQVQmb2p7ESRrybj.m50ACsKpTF3iDTb4tvU4bX_c21BNE b51GPUHF2EiTLCqsLRoMb2Q3MV86y8lX0FzzQbAeWvcQK0_ZNN2kmxJ.zwqLH1ouJbmZ1k9H0QGH i77O9ZkCo_AzmilY7Js1gOJIM7XAfWfJnujwdslkypvutDMWRScnAX_Cy7JXEDos4UTfkfnGmpxd yFwHLidc5AdwWrF1BwGqdq0iQ3ZY0IM35GAe_96wylV01zAqR5TVLp2I9aGCt7TFIhZMfzcPdkGZ olFxWY3c- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.gq1.yahoo.com with HTTP; Sun, 17 Jul 2022 18:46:12 +0000 Received: by hermes--production-ne1-7864dcfd54-5p9s9 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 322e3e7f0e20eab5731ebbe0789df5fb; Sun, 17 Jul 2022 18:46:10 +0000 (UTC) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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: <202207171708.26HH81bA062303@gndrsh.dnsmgr.net> Date: Sun, 17 Jul 2022 11:46:08 -0700 Cc: Glen Barber , Warner Losh , "dev-commits-src-main@freebsd.org" , "Dr. Rolf Jansen" , freebsd-arm Content-Transfer-Encoding: quoted-printable Message-Id: References: <202207171708.26HH81bA062303@gndrsh.dnsmgr.net> To: "Rodney W. Grimes" X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Rspamd-Queue-Id: 4LmDZZ3cMgz47X7 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N On 2022-Jul-17, at 10:08, Rodney W. Grimes = wrote: >> On 2022-Jul-16, at 23:24, Mark Millard wrote: >>=20 >>> 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. >>=20 >> I tried it locally and it reproduced the problem alignment: >>=20 >> # 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) >>=20 >> ... # gpart add -t'!12' -a512k -s50m -b1m md0 >> md0s1 added >> ... # gpart show md0 [I normally strip out long shell prompts but missed the 2 that had been above.] >> =3D> 63 6291393 md0 MBR (3.0G) >> 63 2016 - free - (1.0M) >> 2079 102312 1 fat32lba (50M) >> 104391 6187065 - free - (3.0G) >>=20 >> Note the 2016 and 2079 (instead of 1985 and 2048). I'll note that I've no clue if the 2016 and 2079 results for kern.geom.part.mbr.enforce_chs=3D1 are correct/appropriate vs. not for the context. "-x63 -y255" was listed in the mdconfig command. I'm just reporting what results and that it matches the odd SBC image alignments in snapshot and release images. There could be more to it. >> Reminder of the old result, reported before, that >> implicitly had: >>=20 >> # sysctl kern.geom.part.mbr.enforce_chs >> kern.geom.part.mbr.enforce_chs: 0 >>=20 >> as its context: >>=20 >> 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 >>=20 >> Looks to me like the environment that uses >> /usr/src/release to produce Small Board Computer >> images has: >>=20 >> # sysctl kern.geom.part.mbr.enforce_chs >> kern.geom.part.mbr.enforce_chs: 1 >>=20 >> and this is leading to the misalignments for the MBR images. >=20 > Very nice digging Mark, > Perhaps an assert for kern.geom.part.mbr.enforce_chs not > being zero in /usr/src/release scripts is in order so that > the builds blow up rather than produce BAD images. Just > becuase this gets fixed on the projects systems does not > mean some user running release builds can not stumble into > it. Please Please Please!!!! >=20 > Again, thanks for digging down to atleast this one > potential cause! >=20 =3D=3D=3D Mark Millard marklmi at yahoo.com