Commit graph

3 commits

Author SHA1 Message Date
Jessica Clarke
b85b57e0f4 arm64: Don't rely on host readelf for u-boot booti image generation
readelf is not a bootstrap tool and so cannot be relied upon to exist.
On macOS there is no system readelf, and even on Linux or FreeBSD where
it does exist, BUILD_WITH_STRICT_TMPPATH builds won't be able to use it.
Instead of making it a bootstrap tool, just use nm as that suffices and
already is a bootstrap tool.

Fixes:		28482babd0 ("arm64: Use new arm_kernel_boothdr script for generating booti images.")
Reviewed by:	emaste, mmel
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D32734

(cherry picked from commit 1846bbd1b3)
2022-01-24 23:59:51 +00:00
Michal Meloun
8e3cc69a4e booti: Enable loading the kernel image to any address aligned to 2 MB
We've supported this for a long time, plus most u-boot setups quietly expect

MFC after:	2 weeks

(cherry picked from commit b07a6bd15a)
2022-01-20 11:10:21 +01:00
Michal Meloun
59f46e34cf sys/tools: Add a tool for generating arm and arm64 kernel images.
This tool can generate kernel images without changing the offsets in
the final executable. It replaces the ELF header by properly sized zeroed
block then emits a relative jump to _start(for  'v7jump' or 'v8jump' option)
or the booti header (for 'v8booti' option) to the beginning of the converted file.
Submited by:	ian
2020-12-30 13:22:04 +01:00