All of lore.kernel.org
 help / color / mirror / Atom feed
* arm kexec commandline support
@ 2007-06-08  0:02 Thomas Kunze
  2007-06-11 14:58 ` Hans Henry von Tresckow
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Kunze @ 2007-06-08  0:02 UTC (permalink / raw)
  To: openembedded-devel

Hi all,

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)


How to use:
Use kexec as usual. To change the commandline do:
echo "your commandline" > /sys/kernel/kexec_cmdline

This sets up a ataglist in memory which is copied to 0xc0000100 when 
machine is rebooted.
This address is given the new kernel as ataglist in r2.

This works on collie, but should work on any arm machine. I didn't find 
out why I can't give an arbitrary address to the new kernel in r2 but it 
doesn't work (machine hangs.)

Comments are welcome.

Thomas



^ permalink raw reply	[flat|nested] 5+ messages in thread
* arm kexec commandline support
@ 2007-09-27 16:20 Bob Dunlop
  2007-09-27 17:08 ` Mike (mwester)
  0 siblings, 1 reply; 5+ messages in thread
From: Bob Dunlop @ 2007-09-27 16:20 UTC (permalink / raw)
  To: openembedded-devel

Hans Henry von Tresckow wrote:
>On 6/7/07, Thomas Kunze <thommycheck at gmx.de> wrote:
...
>> 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)
...
>
>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 address e0000100

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 :(


--- linux-2.6.22.9/arch/arm/kernel/setup.c-orig 2007-09-27 15:23:22.000000000 +0100
+++ linux-2.6.22.9/arch/arm/kernel/setup.c      2007-09-27 16:57:17.000000000 +0100
@@ -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

-- 
        Bob Dunlop



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-09-27 17:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-08  0:02 arm kexec commandline support Thomas Kunze
2007-06-11 14:58 ` Hans Henry von Tresckow
  -- strict thread matches above, loose matches on Subject: below --
2007-09-27 16:20 Bob Dunlop
2007-09-27 17:08 ` Mike (mwester)
2007-09-27 17:53   ` Hans Henry von Tresckow

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.