HomeFreeBSD

arm: Improve the creation of kernel.bin

Description

arm: Improve the creation of kernel.bin

Instead of relinking the kernel without elf headers, replace them with
a binary blob of the same length starting with a jump to the kernel's start
address. This ensures that all symbols stay at the same offsets as in
the original kernel, so kernel.debug remains valid also for kernel.bin.

Also ensure that the awk script used runs with the neutral locale defined.
Awk 'write' is a locale compilant, and script is used to write binary data
to a file, so it needs to ensure that bytes > 127 are written unchanged.

While I'm on, set the neutral locale also for arm64, where the same script is
used to generate the kernel booti image.

Reviewed by: emaste, imp
Differential Revision: https://reviews.freebsd.org/D47488

Details

Provenance
mmelAuthored on Sun, Nov 3, 12:15 PM
Reviewer
emaste
Differential Revision
D47488: arm: Improve the creation of kernel.bin
Parents
rGbab5e3d46830: ig4(4): Add Meteor Lake PCI IDs
Branches
Unknown
Tags
Unknown