This is a RFC series trying to
- Allow users to select lzma support of kexec-tools.
- Allow lzma and gzip support of kexec-tools coexist in one build.
- Make the kernel use the specified --command-line parameter from kexec to
boot the crashkernel.
This series was tested by myself monthes ago on HIWIFI-HC6361 with 3.10 kernel.
I just cleaned it a bit and tested again on the same device with 3.14 kernel.
Initramfs variants of .elf, .elf.lzma, .elf.gz kernel are tested and boot fine.
I just tried to test it on QEMU Malta guest, but it fails with "Invalid memory
segment" error, not sure what's going wrong though.
.elf.lzma and .elf.gz files are created with the following commands from the
.elf kernel.
gzip -c openwrt-ar71xx-generic-vmlinux-initramfs.elf >
openwrt-ar71xx-generic-vmlinux-initramfs.elf.gz
./staging_dir/host/bin/lzma e
openwrt-ar71xx-generic-vmlinux-initramfs.elf -lc1 -lp2 -pb2
openwrt-ar71xx-generic-vmlinux-initramfs.elf.lzma
They can be then loaded by kexec as the following.
kexec -d --command-line='board=HiWiFi-HC6361 console=ttyATH0,115200
noinitrd' -l /tmp/vmlinux-initramfs.elf.lzma
kexec -d --command-line='board=HiWiFi-HC6361 console=ttyATH0,115200
noinitrd' -l /tmp/vmlinux-initramfs.elf.gz
kexec -d -e
The kernel patch looks shabby and contains many pr_info() and friends for
debugging purposes at the moment. Maybe we will clean them up later as the
patch matures on.
Yousong Zhou (7):
kexec-tools: add patch for fixing kexec-tools' configure.ac.
kexec-tools: add patch for fixing zlib/lzma decompression.
kexec-tools: add patch for fixing compilation warnings.
kexec-tools: remove unnecessary patch 0004-mips_regdefs.patch.
kexec-tools: show up only when KERNEL_KEXEC is enabled.
kexec-tools: add choice for selecting lzma support.
mips/kexec: parse and use parameters specified by userspace kexec
tool.
package/boot/kexec-tools/Config.in | 5 +
package/boot/kexec-tools/Makefile | 6 +-
.../kexec-tools/patches/0004-mips_regdefs.patch | 103 -------
.../kexec-tools/patches/101-fix-configure_ac.patch | 33 +++
.../patches/102-fix-zlib-lzma-decompress.patch | 101 +++++++
.../patches/103-fix-compilation-warnings.patch | 79 ++++++
.../333-kexec-parameter-from-kexec-tools.patch | 298 ++++++++++++++++++++
.../333-kexec-parameter-from-kexec-tools.patch | 298 ++++++++++++++++++++
8 files changed, 817 insertions(+), 106 deletions(-)
delete mode 100644 package/boot/kexec-tools/patches/0004-mips_regdefs.patch
create mode 100644 package/boot/kexec-tools/patches/101-fix-configure_ac.patch
create mode 100644
package/boot/kexec-tools/patches/102-fix-zlib-lzma-decompress.patch
create mode 100644
package/boot/kexec-tools/patches/103-fix-compilation-warnings.patch
create mode 100644
target/linux/generic/patches-3.10/333-kexec-parameter-from-kexec-tools.patch
create mode 100644
target/linux/generic/patches-3.14/333-kexec-parameter-from-kexec-tools.patch
--
1.7.10.4
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel