]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
embed_mfs: support embedding mfs into loader
authorEd Maste <emaste@FreeBSD.org>
Tue, 19 Dec 2017 19:44:06 +0000 (19:44 +0000)
committerEd Maste <emaste@FreeBSD.org>
Tue, 19 Dec 2017 19:44:06 +0000 (19:44 +0000)
commit2dd51e16ca5b8a28d5d917c66ebb6998cf2c344d
tree7a74fd148fdf633d717c088260436fa00678e812
parenta0a073b16d0ca366a263137fb9dda4950fd75720
embed_mfs: support embedding mfs into loader

The script originally supported embedding an mfs into ELF files or any
other type of file, because it searched for magic strings to mark the
beginning and end of the embeddable section. It was later modified to
read the section offset and length via readelf, which made it work for
ELF only. Restore the ability to update arbitrary file types by using
the readelf technique for ELF, and the magic string technique for all
others (including PE/COFF files like loader.efi).

Submitted by: Zakary Nafziger <worldofzak@gmail.com>
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D12746
sys/tools/embed_mfs.sh