Kexec support in LinuxSH †
- kexec kernel support patch for linux-2.6.13-sh
- apply this patch
- set kernel config option
- Kernel features -> kexec system call
- kexec-tools
- binary and source
- linux-zImage kernel boot support
- append option support.
- When the append option is not specified,
/proc/cmdline is used.
- NetBSD-elf Kernel boot support from Linux's kexec.
- howto option support.
- miniroot (ramdisk root file system) support.
- debian binary package installation
landisk:~# apt-get install kernel-image-2.6.13-sh kexec-tools
- kexec command help
landisk:~# kexec
No kernel specified
kexec 1.99 released 21 December 2004
Usage: kexec [OPTION]... [kernel]
Directly reboot into a new kernel
-h, --help Print this help.
-v, --version Print the version of kexec.
-f, --force Force an immediate kexec, don't call shutdown.
-x, --no-ifdown Don't bring down network interfaces.
(if used, must be last option specified)
-l, --load Load the new kernel into the current kernel.
-p, --load-panic Load the new kernel for use on panic.
-u, --unload Unload the current kexec target kernel.
-e, --exec Execute a currently loaded kernel.
-t, --type=TYPE Specify the new kernel is of this type.
--mem-min=<addr> Specify the lowest memory addres to load code into.
--mem-max=<addr> Specify the highest memory addres to load code into.
Supported kernel file types and options:
zImage-sh
--append=STRING Set the kernel command line to STRING.
--empty-zero=ADDRESS Set the kernel top ADDRESS.
netbsd-sh
--howto=VALUE NetBSD kernel boot option.
--miniroot=FILE NetBSD miniroot ramdisk.
Architecture options:
none
Default options:
--append="ro root=303 mem=64M console=ttySC1,9600"
--empty-zero=0x0c001000
STRING of --appned is set form /proc/cmdline as default.
ADDRESS of --empty-zero can be set SHELL environment variable
KEXEC_EMPTY_ZERO as default.
ADDRESS can be get in the following method in your system.
1) "grep empty_zero /proc/kallsyms".
2) "grep empty_zero System.map".
3) CONFIG_MEMORY_START + CONFIG_ZERO_PAGE_OFFSET in your kernel
config file.
- example1 -- kexec linux kernel
landisk:~# kexec --append="mem=64M console=ttySC1,9600 root=/dev/hda3 ro" /boot/zImage
- example2 -- kexec NetBSD kernel (sample kernel of LANDISK and ramdisk image)
landisk:~# kexec --miniroot=miniroot.img netbsd-RAMDISK
- note
shutdown command is called from kexec command automatically. Therefore, it is safe.
- Appendix
linux and tools for LANDISK(SH4)
My English is very poor. Please edit it freely.
kexec support in linux-2.4.21-iodata †
- kexec kernel support patch for linux-2.4.21-iodata
- apply this patch
- set kernel config option
- Kernel hacking -> kexec system call
|