Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Sep 2017 13:02:51 -0400
From:      Allan Jude <allanjude@freebsd.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r323554 - head/sys/boot/efi/boot1
Message-ID:  <905ca592-5f9e-cad2-15d9-89cb39b47b46@freebsd.org>
In-Reply-To: <201709131700.v8DH02ga019489@repo.freebsd.org>
References:  <201709131700.v8DH02ga019489@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--If8wIlS0BDs6wQaPDPDIVCBi0JnU0wcUS
Content-Type: multipart/mixed; boundary="RiBmPanumEdkELgiwMdUe8hUnVKctqwjh";
 protected-headers="v1"
From: Allan Jude <allanjude@freebsd.org>
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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?905ca592-5f9e-cad2-15d9-89cb39b47b46>