*Kexec support in LinuxSH [#b2f38d58]
-kexec kernel support patch for linux-2.6.13-sh~
--apply this patch~
--- %%&ref(linux-2.6.13-sh-kexec.patch);%%~
&color(red){This patch was merged into sh--stable--2.6 in LinuxSH.};~
~
--set kernel config option
---Kernel features -> kexec system call
~
~
-kexec-tools
--binary and source
---[[kexec-tools_1.101-sh.tgz:http://eggplant.ddo.jp/www/download/debian26/source/kexec-tools/kexec-tools_1.101-sh.tgz]]~
~
--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
#pre{{
landisk:~# apt-get install kernel-image-2.6.13-sh kexec-tools
}}
-kexec command help
#pre{{
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.
&color(red){--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
&color(red){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
#pre{{
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:http://eggplant.ddo.jp/www/download/SH-Linux_Kernel_Switcher/netbsd-otameshi.tgz]])
#pre{{
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)]]
~
~
CENTER:
&color(red){My English is very poor. Please edit it freely. };~
~
*kexec support in linux-2.4.21-iodata [#b719ff0a]
-kexec kernel support patch for linux-2.4.21-iodata~
--apply this patch~
--- &ref(linux-2.4.21-iodata-kexec.patch);~
~
--set kernel config option
---Kernel hacking -> kexec system call
~
~