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

(cherry picked from commit ba045ba49dedb068ba2f0e13fbb1c1a91fde8333)

Details

Provenance
mmelAuthored on Nov 3 2024, 12:15 PM
Reviewer
emaste
Differential Revision
D47488: arm: Improve the creation of kernel.bin
Parents
rG098e4ecd6549: vm_pageout: Disallow invalid values for act_scan_laundry_weight
Branches
Unknown
Tags
Unknown