HomeFreeBSD

MFC r326992: embed_mfs: support embedding mfs into loader

Description

MFC r326992: 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 r327526: embed_mfs: correctly test grep return value

Reported by: br

MFC r327527: ath: revert accidental change committed with r327526

Sponsored by: The FreeBSD Foundation

Details

Provenance
emasteAuthored on
Parents
rS331690: MFC r324707: embed_mfs: add error handling, usage
Branches
Unknown
Tags
Unknown