From nobody Sun Jul 10 21:55:28 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 992691D03855 for ; Sun, 10 Jul 2022 22:06:37 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic305-21.consmr.mail.gq1.yahoo.com (sonic305-21.consmr.mail.gq1.yahoo.com [98.137.64.84]) (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 4Lh1M02LDXz49DB for ; Sun, 10 Jul 2022 22:06:36 +0000 (UTC) (envelope-from marklmi@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1657490794; bh=BO/r2rdI3HFdixCua9TaTWAgOYneoBXdJNSvnzvC1ug=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=OFsYsPOp+MtuHWScd1FWWtGzTJtwp949Ku1vTMth6Mgw7A6kXPKbr/T24RSk/rwajKGlUcxEhDYc/BuSQ/hKqG3DqrPP8lt8rUvbN6gFZFT0ehtUI/CCRLKeM182n0b6dMk1bmlLAU0GJ8PRzgjNFNChOc/3+3b72+9IVR4opkqb0gzC0tXm4ke9F+Mwf/UoPTdd+dlEMvoyTfb0gTKhF04AhexJoZkYZErCPQO39nv0muNaKbk8ZS51FJEK1OmL24keN40DCDpZ3ak4+UikHHnyVbCkuKZ1BZ/NASrlwoN9b3eBYKCm74WBrBsnpnMrd6dKDaBA2G45G7T7VGR0GQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1657490794; bh=cOQopzCnJJ7YzSENBa/wuEm3xJjOj+FtLRD+oseT9L+=; h=X-Sonic-MF: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Pn33GaIojRPfesXRo4V0cpUtw8Tl.vrNfhsDkWu Gv5c6VKK95oEyXOb3V5S36xLLa8OEwk_KjacPwveyAFtMtyrUa420yIAG37iveIlJisfqd.fvdK. IQoeEHN30n8ZCsKyLjegr84.EhvzKl.jQUQKXaKNHATZD1SqNwrmV0T72_SRxPhoKb0JXHyRQveH LkTO1iUNF85JLtRDbX2nVWAyXz3rjEHlotaworLZ6yHucDVkUxAzZnenZ2iVHnJs9KcI8Z1RWSir utg_C3eUpETdjF0mbGy9ZSiqg21fToVtlnjhmdnJ.1Aqnwukr8Q4jq4EmWnOrC0.tHM.FVI7SB4v xFcLgiLpSqx0_hG.zG0sgLeHzqxmG8ePXt.jpduZt1EysODi_JIXKOSAPyWoMYqYdkJTYWW7MfMw eNVyIb2iRtPjU0VC5naLPx.No5Jx8LR0xqewez6Nsg.cO2d1Xpd4p1Aw8Oh57.rOMgBNhA9UnGLm .4K.b1VdfUb4DZKRW7Eb92xplRSEl0tm339P6N2JBmx4dy50bmzfjg34.MjmWR4nBu4nQnbQLQwR 5kQ-- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.gq1.yahoo.com with HTTP; Sun, 10 Jul 2022 22:06:34 +0000 Received: by hermes--production-bf1-58957fb66f-dd4hs (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 269811fb2977960aa25a6af455c657b0; Sun, 10 Jul 2022 21:55:30 +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: Partition layout of ARM SD card images From: Mark Millard In-Reply-To: Date: Sun, 10 Jul 2022 14:55:28 -0700 Cc: freebsd-arm Content-Transfer-Encoding: quoted-printable Message-Id: <97AEE0AA-7EB1-44B6-9175-841425077974@yahoo.com> References: <1F42EED0-B39F-4E33-986A-FB70A3AA4362@cyclaero.com> To: "Dr. Rolf Jansen" X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Rspamd-Queue-Id: 4Lh1M02LDXz49DB X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=OFsYsPOp; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.64.84 as permitted sender) smtp.mailfrom=marklmi@yahoo.com X-Spamd-Result: default: False [-3.12 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; NEURAL_HAM_SHORT(-1.00)[-0.997]; NEURAL_HAM_LONG(-0.63)[-0.626]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; 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]; RCVD_IN_DNSWL_NONE(0.00)[98.137.64.84:from]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; MLMMJ_DEST(0.00)[freebsd-arm]; TO_DN_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; MIME_TRACE(0.00)[0:+]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.64.84:from] X-ThisMailContainsUnwantedMimeParts: N On 2022-Jul-10, at 14:34, Dr. Rolf Jansen = wrote: >> Am 10.07.2022 um 17:48 schrieb Mark Millard : >>=20 >> On 2022-Jul-10, at 12:26, Dr. Rolf Jansen = wrote: >>=20 >>> For example let's have a llok on the partition layout of, = FreeBSD-13.1-RELEASE-arm64-aarch64-RPI.img (the others are similar): >>>=20 >>> # mdconfig -a -u 0 -t vnode -f = diskimg/FreeBSD-13.1-RELEASE-arm64-aarch64-RPI.img >>> # gpart show md0 md0s2 >>>=20 >>> =3D> 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) >>>=20 >>> =3D> 0 6187041 md0s2 BSD (3.0G) >>> 0 57 - free - (29K) >>> 57 6186880 1 freebsd-ufs (2.9G) >>> 6186937 104 - free - (52K) >>>=20 >>> The start of the fat32 boot slice s1 (containing the u-boot) stuff = is neither aligned to 1M nor to 4k, it starts on an odd base. The start = of the BSD payload slice s2 and its size are odd as well. The padding of = 57 blocks within s2 lets the UFS partition start on a globally even = base, namely 104391+57 =3D 104448, which as a matter of fact is 4k = aligned (104448*512/4096 =3D 13056) and 1M aligned as well = (104448*512/1024/1024 =3D 51), however all this keeps looking strange. >>>=20 >>> Are there reasons for this partition layout besides making it look = more interesting? If yes, some insights would be good. >>=20 >> The layout details are more specific to the aarch64 RPi* context >> than to general aarch64 SD card images. For example, the Rock64 >> image is different: >>=20 >> # mdconfig -a -u 0 -t vnode -f = FreeBSD-14.0-CURRENT-arm64-aarch64-ROCK64-20220708-a0b956f5ac5-256605.img >> # gpart show md0 >> =3D> 40 6291376 md0 GPT (3.0G) >> 40 32728 - free - (16M) >> 32768 102400 1 efi (50M) >> 135168 6156160 2 freebsd-ufs (2.9G) >> 6291328 88 - free - (44K) >=20 > This is a GPT table, while the others are still MBR. Images which come = with u-boot must have a different layout. I know it is a GPT table. That is part of the point about the variety of contexts that there are across the Small Board Computers. No SBC that has a U-Boot/whatever needing more space than is provided below is going to use the same 2079 figure: =3D> 63 ??? md0 ??? (?) 63 2016 - free - (1.0M) 2079 ?????? 1 fat32lba [active] (?) MBR vs. GPT is not the fundamental issue for that. =3D=3D=3D Mark Millard marklmi at yahoo.com