kexec problem on SH platform nr 2

paolo.cortesi at paolo.cortesi at
Mon Feb 18 11:44:06 EST 2008

Please please help me.

I am still hacking the kexec-tool over SH4 platform using Paul suggests, but I have still the problem.

First I try to change the flags passed to kexec_load(..,..,..,kexec_flags).
In kexec-tools it was set to KEXEC_ARCH_DEFAULT; I set it KEXEC_ARCH_SH as well as in kernel include/linux/kexec.h 

Then I changed the:
P1 (0x80000000) + memory start (0x0c000000) + 0x00210000 or'ed in zImage_sh_load() that you suggested
in such way:

and I changed the initiliaziation start memory range to set available my CONFIG_MEMORY_START address.

The log that I got is the follow and I can´t see the new kernel really restating, after I lauch

./kexec -l new_zImage --type=zImage-sh --append="console=ttyAS1,115200" --empty-zero=84401000

The log....
empty_zero = 0x04401000
area = 0x04400000
Starting new kernel
kexec information
  segment[0]: 0x04401000 - 0x04402000 (0x00001000)
  segment[1]: 0x04c00000 - 0x04d5a000 (0x0015a000)
  start     : 0x84c00000

Can you still see any error?


Paolo Cortesi

> Hi,
> my name is Paolo Cortesi I'am working over one SH4 platform board ST71XX with linux kernel 2.6.17.
> I need to spawn a new Linux kernel over the Linux Kernel which is running, without the overhead of boot firmware, and I think that your kexec-tool could be suitable for this target.
> I try to use kexec following the steps:
> 1) I select the CONFIG_KEXEC option while building the runnig kernel.
> 2) I download your last recent version of kexec-tool which support SH4 platform
>    I used your .gz reachable by link:    
> 3) I launch the the configure by my script:
> 	export CC=sh4-linux-uclibc-gcc
> 	export LD=sh4-linux-uclibc-ld
> 	export AR=sh4-linux-uclibc-ar
> 	export CFLAGS="-DSHLINUX -D__SHLINUX__ -Wall -O2 -ml -m4 -pipe -fomit-frame-pointer -fno-strict-aliasing"
> 	./configure --host=sh4-linux 
> 4) I cross compile. During compilation I comment the invoke of /*crash_setup_regs(&fixed_regs, regs);*/ procedure that's called in crash_kexec procedure of kernel/kexec.c file (I could not find any implementation of this procedure).
> 5) I launch the runnig kernel, which execute:
>    kexec -l new_zImage --./kexec -l zImage --type=zImage-sh --append="command_line"
>    kexec -e
> Should be the wright procedure.
> But I have one NULL pointer deferenced when it´s called the last assembler procedure
> reboot_code_buffer (relocate_new_kernel) which is invoked in the kernel C procedure arch/sh/... machine_kexec.c
> Have you got an idea of the problem? Have you ever run your tool using one intrd kernel running
> Thanks in advance.
> Paolo Cortesi.
> _______________________________________________
> kexec mailing list
> kexec at

More information about the kexec mailing list