From nobody Sun Jul 10 20:05:54 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 A63B81D0596F for ; Sun, 10 Jul 2022 20:07:40 +0000 (UTC) (envelope-from warlock@phouka1.phouka.net) Received: from phouka1.phouka.net (phouka1.phouka.net [107.170.196.116]) (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 "phouka.net", Issuer "Go Daddy Secure Certificate Authority - G2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Lgyjl69PLz3nKQ for ; Sun, 10 Jul 2022 20:07:39 +0000 (UTC) (envelope-from warlock@phouka1.phouka.net) Received: from phouka1.phouka.net (localhost [127.0.0.1]) by phouka1.phouka.net (8.16.1/8.16.1) with ESMTPS id 26AK5tTk079390 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sun, 10 Jul 2022 13:05:55 -0700 (PDT) (envelope-from warlock@phouka1.phouka.net) Received: (from warlock@localhost) by phouka1.phouka.net (8.16.1/8.16.1/Submit) id 26AK5sYu079389; Sun, 10 Jul 2022 13:05:54 -0700 (PDT) (envelope-from warlock) Date: Sun, 10 Jul 2022 13:05:54 -0700 From: John Kennedy To: "Dr. Rolf Jansen" Cc: freebsd-arm Subject: Re: Partition layout of ARM SD card images Message-ID: References: <1F42EED0-B39F-4E33-986A-FB70A3AA4362@cyclaero.com> 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1F42EED0-B39F-4E33-986A-FB70A3AA4362@cyclaero.com> X-Rspamd-Queue-Id: 4Lgyjl69PLz3nKQ X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of warlock@phouka1.phouka.net has no SPF policy when checking 107.170.196.116) smtp.mailfrom=warlock@phouka1.phouka.net X-Spamd-Result: default: False [-1.79 / 15.00]; AUTH_NA(1.00)[]; NEURAL_HAM_SHORT(-1.00)[-0.999]; NEURAL_HAM_MEDIUM(-1.00)[-0.998]; NEURAL_HAM_LONG(-0.99)[-0.991]; FORGED_SENDER(0.30)[warlock@phouka.net,warlock@phouka1.phouka.net]; MIME_GOOD(-0.10)[text/plain]; R_SPF_NA(0.00)[no SPF record]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:14061, ipnet:107.170.192.0/18, country:US]; MLMMJ_DEST(0.00)[freebsd-arm]; MID_RHS_MATCH_FROMTLD(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[phouka.net]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_NEQ_ENVFROM(0.00)[warlock@phouka.net,warlock@phouka1.phouka.net] X-ThisMailContainsUnwantedMimeParts: N On Sun, Jul 10, 2022 at 04:26:02PM -0300, Dr. Rolf Jansen wrote: > ... 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 = 104448, which as a matter of fact is 4k aligned (104448*512/4096 = 13056) and 1M aligned as well (104448*512/1024/1024 = 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. I think there are historical reasons, probably more with not "wasting" space on small SD cards (~512 byte blocks). I haven't had it bite me recently, at least, but I imagine the FreeBSD folks are trying (perhaps vainly) to keep image count to a minimum. I think I was tweaking my images from RPI2 and later to 4K and 1M like you are to line up with the storage I had them stored on and the filesystems inside the partitions.