Date: Tue, 29 Apr 2025 05:54:20 GMT From: Warner Losh <imp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 7554a5b611fd - main - arm: Hack to make kernel.bin into a zImage Message-ID: <202504290554.53T5sK1A092542@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7554a5b611fd8e9a97cb6937a1110079568d4fd3 commit 7554a5b611fd8e9a97cb6937a1110079568d4fd3 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-01-09 04:17:50 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2025-04-29 05:53:48 +0000 arm: Hack to make kernel.bin into a zImage Add a the zImage header before start. This allows some boot loaders (including xen) to load kernel.bin as a zImage. I did this for someone who was doing some work on getting FreeBSD/armv7 working on Xen. That never went anywhere, but this seems useful in its own right. Sponsored by: Netflix --- sys/arm/arm/locore.S | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/arm/arm/locore.S b/sys/arm/arm/locore.S index 6acaaa8a7eb4..2947032531b1 100644 --- a/sys/arm/arm/locore.S +++ b/sys/arm/arm/locore.S @@ -98,6 +98,16 @@ .globl btext btext: ASENTRY_NP(_start) + .rept 8 /* zImage header */ + mov r0, r0 + .endr + + b start + + .word 0x016f2818 + .word 0 /* absolute load/run zImage address or 0 or PIC */ + .word (_edata - btext) +start: STOP_UNWINDING /* Can't unwind into the bootloader! */ /* Make sure interrupts are disabled. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202504290554.53T5sK1A092542>