From owner-svn-src-head@freebsd.org Wed Sep 13 17:03:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFF7EE060E3; Wed, 13 Sep 2017 17:03:03 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 893C36E90C; Wed, 13 Sep 2017 17:03:02 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.2] (unknown [209.51.186.28]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 52CA813558; Wed, 13 Sep 2017 17:02:55 +0000 (UTC) Subject: Re: svn commit: r323554 - head/sys/boot/efi/boot1 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201709131700.v8DH02ga019489@repo.freebsd.org> From: Allan Jude Message-ID: <905ca592-5f9e-cad2-15d9-89cb39b47b46@freebsd.org> Date: Wed, 13 Sep 2017 13:02:51 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <201709131700.v8DH02ga019489@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="If8wIlS0BDs6wQaPDPDIVCBi0JnU0wcUS" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Sep 2017 17:03:03 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --If8wIlS0BDs6wQaPDPDIVCBi0JnU0wcUS Content-Type: multipart/mixed; boundary="RiBmPanumEdkELgiwMdUe8hUnVKctqwjh"; protected-headers="v1" From: Allan Jude To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <905ca592-5f9e-cad2-15d9-89cb39b47b46@freebsd.org> Subject: Re: svn commit: r323554 - head/sys/boot/efi/boot1 References: <201709131700.v8DH02ga019489@repo.freebsd.org> In-Reply-To: <201709131700.v8DH02ga019489@repo.freebsd.org> --RiBmPanumEdkELgiwMdUe8hUnVKctqwjh Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 2017-09-13 13:00, Allan Jude wrote: > Author: allanjude > Date: Wed Sep 13 17:00:02 2017 > New Revision: 323554 > URL: https://svnweb.freebsd.org/changeset/base/323554 >=20 > Log: > Increase EFI boot file size frok 128k to 384k > =20 > generate_fat.sh does the following: > - create an 800kb zero-filled file > - create an md device backed by this file > - format the device fat12 > - mount the filesystem > - create the EFI ESP directory structure > - create the EFI boot file (BOOTx64 for amd64, BOOTaa64 for aarch64, = etc) > - Adds a marker to the beginning of the file, and pad it to 384kb > - 384kb was chosen as it is less than half of 800kb, thus allowing > users to keep a backup of their older boot file in the small partit= ion > - Unmount the filesystem > - Scan the image and find the offset where the marker was inserted > - The process requires root, to make image generation easier, images = for > each architecture are pregenerated, compressed with xz, and checked= > into svn. > =20 > The Makefile that generates boot1.efifat does the following: > - Ensure the compiled boot1.efi file is no larger than the generated = image > - Decompress the template created by generate-fat.sh > - dd the contents of boot1.efi into boot1.efifat starting at the offs= et > where the marker is found. This allows any file less than the maxim= um > size to be written into the fat filesystem without having to mount = it, > so no root privileges are required. > =20 > Later work by imp and myself makes bsdinstall create a 200mb fat16 in= stead > of using this process, but it is retained to make image generation ea= sier. > =20 > Submitted by: Eric McCorkle (original version) > Reviewed by: emaste, tsoome, Eric McCorkle > MFC after: 1 month > Differential Revision: https://reviews.freebsd.org/D9680 >=20 > Added: > head/sys/boot/efi/boot1/fat-amd64.tmpl.xz (contents, props changed)= > head/sys/boot/efi/boot1/fat-arm.tmpl.xz (contents, props changed) > head/sys/boot/efi/boot1/fat-arm64.tmpl.xz (contents, props changed)= > head/sys/boot/efi/boot1/fat-i386.tmpl.xz (contents, props changed) > Deleted: > head/sys/boot/efi/boot1/fat-amd64.tmpl.bz2.uu > head/sys/boot/efi/boot1/fat-arm.tmpl.bz2.uu > head/sys/boot/efi/boot1/fat-arm64.tmpl.bz2.uu > head/sys/boot/efi/boot1/fat-i386.tmpl.bz2.uu > Modified: > head/sys/boot/efi/boot1/Makefile > head/sys/boot/efi/boot1/Makefile.fat > head/sys/boot/efi/boot1/generate-fat.sh >=20 I forgot to mention: I did away with uuencoding the binary files, because svn and git can handle binary files just fine, and it was just silly. I switched from bzip to xzip, as we are getting away from using bzip as a part of the toolchain. --=20 Allan Jude --RiBmPanumEdkELgiwMdUe8hUnVKctqwjh-- --If8wIlS0BDs6wQaPDPDIVCBi0JnU0wcUS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJZuWS+AAoJEBmVNT4SmAt+ij4P/RbwDlUFDzHX3cUjXbpMn7Sz UXUSPydbtMNHg6MlwkH1o2JGt5k+QRfeYmmJjws1TcBCClksjRGa2N7CKJqXmwdC uHTZQTBoN4tZ8XlrUF5s5ZgqwXA9DUbWDA4crw2hDoGYouYZJnGUAWMTPpgXncLH tAgbAVXvqLVspWRmnpSATBQHmePE9ICEpiUc41ljCgpboSEecJE9MBV8+IegqK/9 9VFfyKTYKg9RLm8faD2TJnsQ7B+7O+YnVO8O3u5PzipqCvZHW6GKUnm01mzZMScW ejyyF/UlLqxMzEfXjnElgFqP0Lq8Ictuz4W0w0fmcR4JCRrz/tkjr4gs07nA9kqn miNJWRwuGRpTCOJGFA9OZgaLr9yvwqP2ci5K4KMQvjc44FIKUKrDeHiX1e+kmVcX KTn2t+jGHlyMnxjxTxAZUKHsgbHMnH/CvVtIs8teCxgOTah3KihWYDo5gcwau2Gk YaA6u8s4j/JG52boXkQEalMN8m9nuahZttJJMhlqGK7rJ3h2QsBvxQ0S47aUxzF5 UmCaKhNOlxqlnq6WxgnnuPkq64mB1qvp9x8GnI0ctRrta551ENsieWZgQQCi/1Iw Zd6Se+8AXh/KubdvHMg0tGoH42ZmBOMlHjSnmpLq1YefrVlRjRGVfQRxKjvp6h8N IPekimgPbLQGQhe0gSUb =/ABy -----END PGP SIGNATURE----- --If8wIlS0BDs6wQaPDPDIVCBi0JnU0wcUS--