From nobody Sun Jul 10 19:26:02 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 241A81D00363 for ; Sun, 10 Jul 2022 19:26:12 +0000 (UTC) (envelope-from freebsd-rj@cyclaero.com) Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [85.215.255.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "*.smtp.rzone.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Lgxnt5k7jz3jZm for ; Sun, 10 Jul 2022 19:26:10 +0000 (UTC) (envelope-from freebsd-rj@cyclaero.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1657481168; s=strato-dkim-0002; d=cyclaero.com; h=To:Date:Message-Id:Subject:From:Cc:Date:From:Subject:Sender; bh=rZ5gviWlhmznRpRypZgJd5Q+kHHMxunQgb+oTvA3sZs=; b=YOKqXWtlH0Zl4ZX1Z+W7NUaFl962TUup8fqha2s37efdghOA4sehVDkjOQqGeysFsZ yVifNZBbrmO6uQq1y9HSA1KPkXJ9d1NyvETiaFmcNEmSjcnhqDz8dSek0uncvbRjbcmd b6T1InSCnnJyJ5IftBrTnOmK4CYSvUzW8vUNIvx8Jc3Fti/SUJLWRbKqjTw5Kl1wdEUq EDmPtTrlKddb+G7qmk89AHs1ik3ebsaq+ay7c68q2Ff4VrSrDil4k+2OMDyd3f4+ZlF+ MB8YdSsCoZp4S2T2u0p0QCrCWo0Xo9z3f4WZSGLjhhY68hYpojtavx7O4opIq7DAlkYl uQrw== X-RZG-AUTH: ":O2kGeEG7b/pS1F2rRHW2isrKl4DV03XBEi+I6ZuztdvN9wS3wFGySS4Lw+ldTBio08NTPnK5bNCibgxfnBg=" X-RZG-CLASS-ID: mo00 Received: from mail.obsigna.com by smtp.strato.de (RZmta 47.46.1 AUTH) with ESMTPSA id kcd9d5y6AJQ8cwo (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate) for ; Sun, 10 Jul 2022 21:26:08 +0200 (CEST) Received: from rolf-mini.obsigna.com (unknown [177.95.254.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.obsigna.com (Postfix) with ESMTPSA id F008863910 for ; Sun, 10 Jul 2022 21:26:07 +0200 (CEST) From: "Dr. Rolf Jansen" Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable 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 12.4 \(3445.104.15\)) Subject: Partition layout of ARM SD card images Message-Id: <1F42EED0-B39F-4E33-986A-FB70A3AA4362@cyclaero.com> Date: Sun, 10 Jul 2022 16:26:02 -0300 To: freebsd-arm X-Mailer: Apple Mail (2.3445.104.15) X-Rspamd-Queue-Id: 4Lgxnt5k7jz3jZm X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cyclaero.com header.s=strato-dkim-0002 header.b=YOKqXWtl; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd-rj@cyclaero.com designates 85.215.255.20 as permitted sender) smtp.mailfrom=freebsd-rj@cyclaero.com X-Spamd-Result: default: False [-2.00 / 15.00]; FROM_NAME_HAS_TITLE(1.00)[dr]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:85.215.255.0/24]; R_DKIM_ALLOW(-0.20)[cyclaero.com:s=strato-dkim-0002]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_NONE(0.00)[85.215.255.20:from]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-arm]; ASN(0.00)[asn:6724, ipnet:85.215.255.0/24, country:DE]; MIME_TRACE(0.00)[0:+]; DKIM_TRACE(0.00)[cyclaero.com:+]; RCVD_COUNT_THREE(0.00)[3]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; TO_DN_ALL(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[cyclaero.com]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N For example let's have a llok on the partition layout of, = FreeBSD-13.1-RELEASE-arm64-aarch64-RPI.img (the others are similar): # mdconfig -a -u 0 -t vnode -f = diskimg/FreeBSD-13.1-RELEASE-arm64-aarch64-RPI.img # gpart show md0 md0s2 =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) =3D> 0 6187041 md0s2 BSD (3.0G) 0 57 - free - (29K) 57 6186880 1 freebsd-ufs (2.9G) 6186937 104 - free - (52K) 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. Are there reasons for this partition layout besides making it look more = interesting? If yes, some insights would be good. For the time being, I created a second SD card from the initial one for = my RPi 4, and it's partition table is as follows: =20 # gpart show mmcsd0 mmcsd0s2 =3D> 63 62410689 mmcsd0 MBR (30G) 63 25 - free - (13K) 88 102312 1 fat32lba [active] (50M) 102400 62308352 2 freebsd (30G) =3D> 0 62308352 mmcsd0s2 BSD (30G) 0 56623104 1 freebsd-ufs (27G) 56623104 5685248 2 freebsd-swap (2.7G)