kexec-tools:arm: support zImage with appended device tree
Subsystems (2)
PATCH v2 1/1 kexec-tools:arm: support zImage with appended device tree
Arm linux supports zImage with appended dtb (CONFIG_ARM_APPENDED_DTB) and the concatenated image is generated like cat zImage dtb > zImage_w_dtb.
This patch is to support the concatednated zImage. This changes the priority of sources for dtb.
1. --dtb dtb_file
2. zImage_with_dtb <= newly added
3. /sys/firmware/fdt
4. /proc/device-tree
The dtb content in the concatenated zImage has priority over the other fdt sources like /sys/firmware/fdt or /proc/device-tree. It's because the same reason that --dtb command line option has the most priority for fdt source. Users have some cases when they'd like to use different dtb from running system.
Users don't need to specify dtb file separately in the command line (--dtb) and don't have to have /sys/firmware/fdt or /proc/device-tree if dtb is available in zImage.
We can do
- kexec --load-panic zImage_with_different_dtb_from_running_system
rather than
- kexec --load-panic zImage --dtb different_dtb_from_running_system
---
v2: make checking for fdt header & size robust.
amend commit log.
kexec/arch/arm/kexec-arm.h | 1 + kexec/arch/arm/kexec-zImage-arm.c | 54 +++++++++++++++++++++++++++++++-------- 2 files changed, 44 insertions(+), 11 deletions(-)
kexec/arch/arm/kexec-arm.h +1 -0
@@ -4,6 +4,7 @@#include <sys/types.h> #define SYSFS_FDT "/sys/firmware/fdt" +#define APPENDED_FDT ((char *)-1)/* it doesn't mean to be opened. */ #define BOOT_BLOCK_VERSION 17#define BOOT_BLOCK_LAST_COMP_VERSION 16
kexec/arch/arm/kexec-zImage-arm.c +43 -11
84 lines not on this page · raw message
Signature · 7 lines
2.7.4 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec