#
331691 |
|
28-Mar-2018 |
emaste |
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
|
#
331690 |
|
28-Mar-2018 |
emaste |
MFC r324707: embed_mfs: add error handling, usage
Ensure that we are called with two arguments, and that the output file is writable. Also, if we cannot find the mfs section report the output file name rather than "kernel", as this script may be used with other than kernels.
Sponsored by: The FreeBSD Foundation
|
#
312082 |
|
13-Jan-2017 |
lwhsu |
MFC r311881:
Replace using of objdump with elfdump
In-tree objdump is too old to dump new ELF headers. But for example if we use: `make CROSS_TOOLCHAIN=riscv64-gcc TARGET_ARCH=riscv64` and do not specify CROSS_BINUTILS_PREFIX in env, embed_mfs.sh cannot find the correct objdump. This patch just replaces using of objdump with elfdump to collect needed information.
Later we may also put an ELFDUMP in CROSSENV and use it in embed_mfs.sh .
Reviewed by: emaste, br Differential Revision: https://reviews.freebsd.org/D9062
|
#
295137 |
|
02-Feb-2016 |
adrian |
Fix MFS builds when both MD_ROOT_SIZE and MFS_IMAGE are specified
MD_ROOT_SIZE and embed_mfs.sh were basically retired as part of https://reviews.freebsd.org/D2903 . However, when building a kernel with 'options MD_ROOT_SIZE' specified, this results in a non-working MFS, as within sys/dev/md/md.c we fall within the wrong # ifdef.
This patch implements the following:
* Allow kernels to be built without the MD_ROOT_SIZE option, which results in a kernel built as per D2903. * Allow kernels to be built with the MD_ROOT_SIZE option, which results in a kernel built similarly to the pre-D2903 way, with the following differences: * The MFS is now put in a separate section within the kernel (oldmfs, so it differs from the mfs section introduced by D2903). * embed_mfs.sh is changed, so it looks up the oldmfs section within the kernel, gets its size and offset, sees if the MFS will fit within the allocated oldmfs section and only if all is well does a dd of the MFS image into the kernel.
Submitted by: Stanislav Galabov <sgalabov@gmail.com> Reviewed by: brooks, imp Differential Revision: https://reviews.freebsd.org/D5093
|