arm kexec commandline support
Quoted 1 line · Hans Henry von Tresckow
On 6/7/07, Thomas Kunze <thommycheck at gmx.de> wrote:
...
Quoted 12 lines
Quoted 12 lines
I have written a quick hack to support custom commandlines for arm with kexec. You need:
http://www2.informatik.hu-berlin.de/~tkunze/zaurus/patches/kexec_commandline-3.patch
and:
http://www2.informatik.hu-berlin.de/~tkunze/zaurus/patches/atag_support.patch
(from lak)
...
Quoted 7 lines
I tested this with linux-rp-2.6.20 on poodle. The kernel will boot and I can kexec other kernels with built in cmdlines. If I try to set a new cmdline however, it segfaults. Here is the crash dump:
<0>Starting new kernel
<1>Unable to handle kernel paging request at virtual addresse0000100
I to am searching for a kexec solution (for a Compulab CM-X270)
I can progress this code a little further and eliminate the segfault with the following patch, but still nothing after the final Bye! message :(
arch/arm/kernel/setup.c 2007-09-27 16:57:17.000000000 +0100 renamed from arch/arm/kernel/setup.c-orig 2007-09-27 15:23:22.000000000 +0100 +10 -0
@@ -769,6 +769,8 @@ } arch_initcall(customize_machine); +extern unsigned long kexec_atag_list; + void __init setup_arch(char **cmdline_p) { struct tag *tags = (struct tag *)&init_tags;
@@ -782,10 +784,18 @@ if (mdesc->soft_reboot) reboot_setup("s"); + printk(KERN_INFO "__atags_pointer %x, mdesc->boot_params %x\n", + __atags_pointer, mdesc->boot_params); if (__atags_pointer) + { tags = phys_to_virt(__atags_pointer); + kexec_atag_list = __atags_pointer; + } else if (mdesc->boot_params) + { tags = phys_to_virt(mdesc->boot_params); + kexec_atag_list = mdesc->boot_params; + } /* * If we have the old style parameters, convert them to
Signature · 1 line
Bob Dunlop
Quoted 8 lines · Bob Dunlop, on September 27, 2007, wrote:
Quoted 1 line · Hans Henry von Tresckow
On 6/7/07, Thomas Kunze <thommycheck at gmx.de> wrote:
...
Quoted 5 lines
Quoted 5 lines
I have written a quick hack to support custom commandlines for arm with kexec. You need:
http://www2.informatik.hu-berlin.de/~tkunze/zaurus/patches/kexec_commandline-3.patch
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
and:
http://www2.informatik.hu-berlin.de/~tkunze/zaurus/patches/atag_support.patch
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
(from lak)
...
Quoted 2 lines
I tested this with linux-rp-2.6.20 on poodle. The kernel will boot and
I
Quoted 11 lines
Quoted 5 lines
can kexec other kernels with built in cmdlines. If I try to set a new cmdline however, it segfaults. Here is the crash dump:
<0>Starting new kernel
<1>Unable to handle kernel paging request at virtual addresse0000100I to am searching for a kexec solution (for a Compulab CM-X270)
I can progress this code a little further and eliminate the segfault with the following patch, but still nothing after the final Bye! message :(
[patch snipped]
Permit me to pop into this thread. At the risk of covering old ground, I
believe that the discussion on L-A-K ended with the general conscensus that the preferred approach was to use the "preserve-original-atags" patch [1], and write something new that would permit the user-space "kexec" command to edit/replace/remove the preserved atags.
The first half of this is done -- it's been submitted upstream (since it is a useful patch in and of itself even without the ability to change command-lines, permitting kexec to actually work on machines that require bootloader atags, such as the OpenMoko distro on the Neo).
The second half has not been started, but probably should begin with Uli's work with the kexec command, I would expect.
The advantage of this approach is that the first patch takes care of all the ugly stuff that result in seg faults, and other horrors. All that is required for the second half is to use the pointer to the buffer containing the atags, and replace, or edit, or remove the contents at will.
It's on my list of things to do, but for the moment the sysfs approach, while ugly, has worked on all the ARM machines I use. It would be great if someone with a bit more spare time could take a hack at the second part of this problem.
Regards,
Mike
[1] http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=4579/1
Quoted 74 lines · Mike (mwester)
Quoted 4 lines · Bob Dunlop, on September 27, 2007, wrote:
Quoted 1 line · Hans Henry von Tresckow
On 6/7/07, Thomas Kunze <thommycheck at gmx.de> wrote:
...
Quoted 1 line
Quoted 1 line
I have written a quick hack to support custom commandlines for arm
with
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
kexec. You need:
http://www2.informatik.hu-berlin.de/~tkunze/zaurus/patches/kexec_commandline-3.patch
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
and:
http://www2.informatik.hu-berlin.de/~tkunze/zaurus/patches/atag_support.patch
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
(from lak)
...
Quoted 2 lines
I tested this with linux-rp-2.6.20 on poodle. The kernel will boot
and
IQuoted 9 lines
Quoted 5 lines
can kexec other kernels with built in cmdlines. If I try to set a new cmdline however, it segfaults. Here is the crash dump:
<0>Starting new kernel
<1>Unable to handle kernel paging request at virtual addresse0000100I to am searching for a kexec solution (for a Compulab CM-X270)
I can progress this code a little further and eliminate the segfault
with
Quoted 2 lines
the following patch, but still nothing after the final Bye! message :(
[patch snipped]
Permit me to pop into this thread. At the risk of covering old ground, I
believe that the discussion on L-A-K ended with the general conscensus that
the preferred approach was to use the "preserve-original-atags" patch [1], and write something new that would permit the user-space "kexec" command to
edit/replace/remove the preserved atags.The first half of this is done -- it's been submitted upstream (since it is
a useful patch in and of itself even without the ability to change command-lines, permitting kexec to actually work on machines that require bootloader atags, such as the OpenMoko distro on the Neo).The second half has not been started, but probably should begin with Uli's work with the kexec command, I would expect.
The advantage of this approach is that the first patch takes care of all the
ugly stuff that result in seg faults, and other horrors. All that is required for the second half is to use the pointer to the buffer containing
the atags, and replace, or edit, or remove the contents at will.It's on my list of things to do, but for the moment the sysfs approach, while ugly, has worked on all the ARM machines I use. It would be great if
someone with a bit more spare time could take a hack at the second part of this problem.Regards,
Mike
Quoted 7 lines
[1] http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=4579/1
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Thanks for the update mike :)
I am going to play with uli's patch a little bit to see how that will work. I am glad to see that your main patch made it upstream :)
Thanks,
Henry von Tresckow (hvontres)