* [PATCH 1/3] kexec: align initrd when no --image-size
2014-01-22 10:52 [PATCH 0/3] kexec-tools: fix bugs and pass initrd position for arm Wang Nan
@ 2014-01-22 10:52 ` Wang Nan
2014-02-06 3:44 ` Dave Young
2014-01-22 10:52 ` [PATCH 2/3] kexec: pass initrd position in dtb Wang Nan
` (3 subsequent siblings)
4 siblings, 1 reply; 13+ messages in thread
From: Wang Nan @ 2014-01-22 10:52 UTC (permalink / raw)
To: kexec; +Cc: Wang Nan, Simon Horman, Dave Young, Geng Hui
Before this patch, when no --image-size passed, initrd_base is caculated using
base + len * 4, which is unaligned, and unable to pass check in
add_segment_phys_virt():
if (base & (pagesize -1)) {
die("Base address: 0x%lx is not page aligned\n", base);
}
Signed-off-by: Wang Nan <wangnan0@huawei.com>
Cc: Simon Horman <horms@verge.net.au>
Cc: Dave Young <dyoung@redhat.com>
Cc: Geng Hui <hui.geng@huawei.com>
---
kexec/arch/arm/kexec-zImage-arm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kexec/arch/arm/kexec-zImage-arm.c b/kexec/arch/arm/kexec-zImage-arm.c
index 792187a..4547765 100644
--- a/kexec/arch/arm/kexec-zImage-arm.c
+++ b/kexec/arch/arm/kexec-zImage-arm.c
@@ -351,7 +351,7 @@ int zImage_arm_load(int argc, char **argv, const char *buf, off_t len,
} else {
/* Otherwise, assume the maximum kernel compression ratio
* is 4, and just to be safe, place ramdisk after that */
- initrd_base = base + len * 4;
+ initrd_base = base + _ALIGN(len * 4, 4096);
}
if (use_atags) {
--
1.8.4
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH 1/3] kexec: align initrd when no --image-size
2014-01-22 10:52 ` [PATCH 1/3] kexec: align initrd when no --image-size Wang Nan
@ 2014-02-06 3:44 ` Dave Young
0 siblings, 0 replies; 13+ messages in thread
From: Dave Young @ 2014-02-06 3:44 UTC (permalink / raw)
To: Wang Nan; +Cc: Simon Horman, kexec, Geng Hui
On 01/22/14 at 06:52pm, Wang Nan wrote:
> Before this patch, when no --image-size passed, initrd_base is caculated using
> base + len * 4, which is unaligned, and unable to pass check in
> add_segment_phys_virt():
>
> if (base & (pagesize -1)) {
> die("Base address: 0x%lx is not page aligned\n", base);
> }
>
> Signed-off-by: Wang Nan <wangnan0@huawei.com>
> Cc: Simon Horman <horms@verge.net.au>
> Cc: Dave Young <dyoung@redhat.com>
> Cc: Geng Hui <hui.geng@huawei.com>
> ---
> kexec/arch/arm/kexec-zImage-arm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kexec/arch/arm/kexec-zImage-arm.c b/kexec/arch/arm/kexec-zImage-arm.c
> index 792187a..4547765 100644
> --- a/kexec/arch/arm/kexec-zImage-arm.c
> +++ b/kexec/arch/arm/kexec-zImage-arm.c
> @@ -351,7 +351,7 @@ int zImage_arm_load(int argc, char **argv, const char *buf, off_t len,
> } else {
> /* Otherwise, assume the maximum kernel compression ratio
> * is 4, and just to be safe, place ramdisk after that */
> - initrd_base = base + len * 4;
> + initrd_base = base + _ALIGN(len * 4, 4096);
get_page_size should be used instead of 4096, otherwise it looks good to me.
Thanks
Dave
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 2/3] kexec: pass initrd position in dtb
2014-01-22 10:52 [PATCH 0/3] kexec-tools: fix bugs and pass initrd position for arm Wang Nan
2014-01-22 10:52 ` [PATCH 1/3] kexec: align initrd when no --image-size Wang Nan
@ 2014-01-22 10:52 ` Wang Nan
2014-02-06 3:58 ` Dave Young
2014-01-22 10:52 ` [PATCH 3/3] kexec: increase zImage compression ratio from 4 to 5 Wang Nan
` (2 subsequent siblings)
4 siblings, 1 reply; 13+ messages in thread
From: Wang Nan @ 2014-01-22 10:52 UTC (permalink / raw)
To: kexec; +Cc: Wang Nan, Simon Horman, Dave Young, Geng Hui
This patch append the position of initrd to dtb when loading arm kernel and
initrd without using atag.
Signed-off-by: Wang Nan <wangnan0@huawei.com>
Cc: Simon Horman <horms@verge.net.au>
Cc: Dave Young <dyoung@redhat.com>
Cc: Geng Hui <hui.geng@huawei.com>
---
kexec/arch/arm/kexec-zImage-arm.c | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/kexec/arch/arm/kexec-zImage-arm.c b/kexec/arch/arm/kexec-zImage-arm.c
index 4547765..6d6b239 100644
--- a/kexec/arch/arm/kexec-zImage-arm.c
+++ b/kexec/arch/arm/kexec-zImage-arm.c
@@ -417,6 +417,41 @@ int zImage_arm_load(int argc, char **argv, const char *buf, off_t len,
if (ramdisk) {
add_segment(info, ramdisk_buf, initrd_size,
initrd_base, initrd_size);
+ const char *node_name = "/chosen";
+ const char *prop_start_name = "linux,initrd-start";
+ const char *prop_end_name = "linux,initrd-end";
+ int off;
+
+ dtb_length = fdt_totalsize(dtb_buf) + 1024 + 8;
+ dtb_buf = xrealloc(dtb_buf, dtb_length);
+ fdt_set_totalsize(dtb_buf, dtb_length);
+
+ /* check if a /choosen subnode already exists */
+ off = fdt_path_offset(dtb_buf, node_name);
+
+ if (off == -FDT_ERR_NOTFOUND)
+ off = fdt_add_subnode(dtb_buf, off, node_name);
+
+ if (off < 0) {
+ fprintf(stderr, "FDT: Error adding %s node.\n", node_name);
+ return -1;
+ }
+
+ unsigned long start, end;
+ start = cpu_to_be32((unsigned long)(initrd_base));
+ end = cpu_to_be32((unsigned long)(initrd_base + initrd_size));
+ if (fdt_setprop(dtb_buf, off, prop_start_name,
+ &start, sizeof(start)) != 0) {
+ fprintf(stderr, "FDT: Error setting %s/%s property.\n",
+ node_name, prop_start_name);
+ return -1;
+ }
+ if (fdt_setprop(dtb_buf, off, prop_end_name,
+ &end, sizeof(end)) != 0) {
+ fprintf(stderr, "FDT: Error setting %s/%s property.\n",
+ node_name, prop_end_name);
+ return -1;
+ }
}
/* Stick the dtb at the end of the initrd and page
--
1.8.4
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH 2/3] kexec: pass initrd position in dtb
2014-01-22 10:52 ` [PATCH 2/3] kexec: pass initrd position in dtb Wang Nan
@ 2014-02-06 3:58 ` Dave Young
0 siblings, 0 replies; 13+ messages in thread
From: Dave Young @ 2014-02-06 3:58 UTC (permalink / raw)
To: Wang Nan; +Cc: Simon Horman, kexec, Geng Hui
On 01/22/14 at 06:52pm, Wang Nan wrote:
> This patch append the position of initrd to dtb when loading arm kernel and
> initrd without using atag.
>
> Signed-off-by: Wang Nan <wangnan0@huawei.com>
> Cc: Simon Horman <horms@verge.net.au>
> Cc: Dave Young <dyoung@redhat.com>
> Cc: Geng Hui <hui.geng@huawei.com>
> ---
> kexec/arch/arm/kexec-zImage-arm.c | 35 +++++++++++++++++++++++++++++++++++
> 1 file changed, 35 insertions(+)
>
> diff --git a/kexec/arch/arm/kexec-zImage-arm.c b/kexec/arch/arm/kexec-zImage-arm.c
> index 4547765..6d6b239 100644
> --- a/kexec/arch/arm/kexec-zImage-arm.c
> +++ b/kexec/arch/arm/kexec-zImage-arm.c
> @@ -417,6 +417,41 @@ int zImage_arm_load(int argc, char **argv, const char *buf, off_t len,
> if (ramdisk) {
> add_segment(info, ramdisk_buf, initrd_size,
> initrd_base, initrd_size);
> + const char *node_name = "/chosen";
> + const char *prop_start_name = "linux,initrd-start";
> + const char *prop_end_name = "linux,initrd-end";
> + int off;
> +
> + dtb_length = fdt_totalsize(dtb_buf) + 1024 + 8;
why +8 here? is it the "/chosen" string size? if yes please change to use
strlen.
> + dtb_buf = xrealloc(dtb_buf, dtb_length);
Should check xrealloc return value here.
Since it is very similar with the code for appending cmdline, at least
creating a share function for adding a new node looks better.
> + fdt_set_totalsize(dtb_buf, dtb_length);
> +
> + /* check if a /choosen subnode already exists */
> + off = fdt_path_offset(dtb_buf, node_name);
> +
> + if (off == -FDT_ERR_NOTFOUND)
> + off = fdt_add_subnode(dtb_buf, off, node_name);
> +
> + if (off < 0) {
> + fprintf(stderr, "FDT: Error adding %s node.\n", node_name);
> + return -1;
> + }
> +
> + unsigned long start, end;
> + start = cpu_to_be32((unsigned long)(initrd_base));
> + end = cpu_to_be32((unsigned long)(initrd_base + initrd_size));
> + if (fdt_setprop(dtb_buf, off, prop_start_name,
> + &start, sizeof(start)) != 0) {
> + fprintf(stderr, "FDT: Error setting %s/%s property.\n",
> + node_name, prop_start_name);
> + return -1;
> + }
> + if (fdt_setprop(dtb_buf, off, prop_end_name,
> + &end, sizeof(end)) != 0) {
> + fprintf(stderr, "FDT: Error setting %s/%s property.\n",
> + node_name, prop_end_name);
> + return -1;
> + }
> }
>
> /* Stick the dtb at the end of the initrd and page
> --
> 1.8.4
>
>
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 3/3] kexec: increase zImage compression ratio from 4 to 5
2014-01-22 10:52 [PATCH 0/3] kexec-tools: fix bugs and pass initrd position for arm Wang Nan
2014-01-22 10:52 ` [PATCH 1/3] kexec: align initrd when no --image-size Wang Nan
2014-01-22 10:52 ` [PATCH 2/3] kexec: pass initrd position in dtb Wang Nan
@ 2014-01-22 10:52 ` Wang Nan
2014-02-06 4:01 ` Dave Young
2014-01-23 2:02 ` [PATCH 0/3] kexec-tools: fix bugs and pass initrd position for arm Dave Young
2014-01-23 2:47 ` Dave Young
4 siblings, 1 reply; 13+ messages in thread
From: Wang Nan @ 2014-01-22 10:52 UTC (permalink / raw)
To: kexec; +Cc: Wang Nan, Simon Horman, Dave Young, Geng Hui
Old code assume the zImage compression ration is 4, it is not enough, 5 shall be
better.
Signed-off-by: Wang Nan <wangnan0@huawei.com>
Cc: Simon Horman <horms@verge.net.au>
Cc: Dave Young <dyoung@redhat.com>
Cc: Geng Hui <hui.geng@huawei.com>
---
kexec/arch/arm/kexec-zImage-arm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kexec/arch/arm/kexec-zImage-arm.c b/kexec/arch/arm/kexec-zImage-arm.c
index 6d6b239..6e5e12b 100644
--- a/kexec/arch/arm/kexec-zImage-arm.c
+++ b/kexec/arch/arm/kexec-zImage-arm.c
@@ -351,7 +351,7 @@ int zImage_arm_load(int argc, char **argv, const char *buf, off_t len,
} else {
/* Otherwise, assume the maximum kernel compression ratio
* is 4, and just to be safe, place ramdisk after that */
- initrd_base = base + _ALIGN(len * 4, 4096);
+ initrd_base = base + _ALIGN(len * 5, 4096);
}
if (use_atags) {
--
1.8.4
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH 3/3] kexec: increase zImage compression ratio from 4 to 5
2014-01-22 10:52 ` [PATCH 3/3] kexec: increase zImage compression ratio from 4 to 5 Wang Nan
@ 2014-02-06 4:01 ` Dave Young
0 siblings, 0 replies; 13+ messages in thread
From: Dave Young @ 2014-02-06 4:01 UTC (permalink / raw)
To: Wang Nan; +Cc: Simon Horman, kexec, Geng Hui
On 01/22/14 at 06:52pm, Wang Nan wrote:
> Old code assume the zImage compression ration is 4, it is not enough, 5 shall be
> better.
4 works well during my test. Do you have real test case to reproduce this problem?
>
> Signed-off-by: Wang Nan <wangnan0@huawei.com>
> Cc: Simon Horman <horms@verge.net.au>
> Cc: Dave Young <dyoung@redhat.com>
> Cc: Geng Hui <hui.geng@huawei.com>
> ---
> kexec/arch/arm/kexec-zImage-arm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kexec/arch/arm/kexec-zImage-arm.c b/kexec/arch/arm/kexec-zImage-arm.c
> index 6d6b239..6e5e12b 100644
> --- a/kexec/arch/arm/kexec-zImage-arm.c
> +++ b/kexec/arch/arm/kexec-zImage-arm.c
> @@ -351,7 +351,7 @@ int zImage_arm_load(int argc, char **argv, const char *buf, off_t len,
> } else {
> /* Otherwise, assume the maximum kernel compression ratio
> * is 4, and just to be safe, place ramdisk after that */
> - initrd_base = base + _ALIGN(len * 4, 4096);
> + initrd_base = base + _ALIGN(len * 5, 4096);
> }
>
> if (use_atags) {
> --
> 1.8.4
>
>
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 0/3] kexec-tools: fix bugs and pass initrd position for arm
2014-01-22 10:52 [PATCH 0/3] kexec-tools: fix bugs and pass initrd position for arm Wang Nan
` (2 preceding siblings ...)
2014-01-22 10:52 ` [PATCH 3/3] kexec: increase zImage compression ratio from 4 to 5 Wang Nan
@ 2014-01-23 2:02 ` Dave Young
2014-01-23 2:47 ` Dave Young
4 siblings, 0 replies; 13+ messages in thread
From: Dave Young @ 2014-01-23 2:02 UTC (permalink / raw)
To: Wang Nan; +Cc: Simon Horman, kexec, Geng Hui
On 01/22/14 at 06:52pm, Wang Nan wrote:
> Hi,
>
> This patch series contains following bug fixes and cleanups for
> kexec-tools on arm platform:
>
> Wang Nan (3):
> kexec: align initrd when no --image-size
> kexec: pass initrd position in dtb
> kexec: increase zImage compress ratio from 4 to 5
>
> kexec/arch/arm/kexec-zImage-arm.c | 37 ++++++++++++++++++++++++++++++++++++-
> 1 file changed, 36 insertions(+), 1 deletion(-)
Previously I tested arm kexec on virtual machine, there's some breakage.
But due to lack of time I did not get chance to continue on it. I will have a
test with your patches and review the patches.
Thanks
Dave
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH 0/3] kexec-tools: fix bugs and pass initrd position for arm
2014-01-22 10:52 [PATCH 0/3] kexec-tools: fix bugs and pass initrd position for arm Wang Nan
` (3 preceding siblings ...)
2014-01-23 2:02 ` [PATCH 0/3] kexec-tools: fix bugs and pass initrd position for arm Dave Young
@ 2014-01-23 2:47 ` Dave Young
2014-01-23 2:56 ` Wang Nan
4 siblings, 1 reply; 13+ messages in thread
From: Dave Young @ 2014-01-23 2:47 UTC (permalink / raw)
To: Wang Nan; +Cc: Simon Horman, kexec, Geng Hui
On 01/22/14 at 06:52pm, Wang Nan wrote:
> Hi,
>
> This patch series contains following bug fixes and cleanups for
> kexec-tools on arm platform:
>
> Wang Nan (3):
> kexec: align initrd when no --image-size
> kexec: pass initrd position in dtb
> kexec: increase zImage compress ratio from 4 to 5
One question:
Is these kexec-tools patches enough for kexec work or still need the
kernel patches you sent?
Thanks
Dave
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH 0/3] kexec-tools: fix bugs and pass initrd position for arm
2014-01-23 2:47 ` Dave Young
@ 2014-01-23 2:56 ` Wang Nan
2014-01-23 3:38 ` Dave Young
0 siblings, 1 reply; 13+ messages in thread
From: Wang Nan @ 2014-01-23 2:56 UTC (permalink / raw)
To: Dave Young; +Cc: Simon Horman, kexec, Geng Hui
On 2014/1/23 10:47, Dave Young wrote:
> On 01/22/14 at 06:52pm, Wang Nan wrote:
>> Hi,
>>
>> This patch series contains following bug fixes and cleanups for
>> kexec-tools on arm platform:
>>
>> Wang Nan (3):
>> kexec: align initrd when no --image-size
>> kexec: pass initrd position in dtb
>> kexec: increase zImage compress ratio from 4 to 5
>
> One question:
> Is these kexec-tools patches enough for kexec work or still need the
> kernel patches you sent?
>
> Thanks
> Dave
>
kexec will work without the kernel side patches, but the atag, kernel
cmdline, dtb information and kernel configuration must be carefully
adjusted.
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 0/3] kexec-tools: fix bugs and pass initrd position for arm
2014-01-23 2:56 ` Wang Nan
@ 2014-01-23 3:38 ` Dave Young
2014-01-23 4:17 ` Wang Nan
0 siblings, 1 reply; 13+ messages in thread
From: Dave Young @ 2014-01-23 3:38 UTC (permalink / raw)
To: Wang Nan; +Cc: Simon Horman, kexec, Geng Hui
On 01/23/14 at 10:56am, Wang Nan wrote:
> On 2014/1/23 10:47, Dave Young wrote:
> > On 01/22/14 at 06:52pm, Wang Nan wrote:
> >> Hi,
> >>
> >> This patch series contains following bug fixes and cleanups for
> >> kexec-tools on arm platform:
> >>
> >> Wang Nan (3):
> >> kexec: align initrd when no --image-size
> >> kexec: pass initrd position in dtb
> >> kexec: increase zImage compress ratio from 4 to 5
> >
> > One question:
> > Is these kexec-tools patches enough for kexec work or still need the
> > kernel patches you sent?
> >
> > Thanks
> > Dave
> >
>
> kexec will work without the kernel side patches, but the atag, kernel
> cmdline, dtb information and kernel configuration must be carefully
> adjusted.
>
It does not work for me with below:
kexec -l /boot/vmlinuz-`uname -r` --append=`cat /proc/cmdline` --dtb vexpress-v2p-ca9.dtb
The dtb and kexec kernel are exactly same with the 1st kernel.
Is there any other things for setup in qemu, but probably it's different from your hardware
setup..
Thanks
Dave
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 0/3] kexec-tools: fix bugs and pass initrd position for arm
2014-01-23 3:38 ` Dave Young
@ 2014-01-23 4:17 ` Wang Nan
2014-01-23 5:00 ` Dave Young
0 siblings, 1 reply; 13+ messages in thread
From: Wang Nan @ 2014-01-23 4:17 UTC (permalink / raw)
To: Dave Young; +Cc: Simon Horman, kexec, Geng Hui
On 2014/1/23 11:38, Dave Young wrote:
> On 01/23/14 at 10:56am, Wang Nan wrote:
>> On 2014/1/23 10:47, Dave Young wrote:
>>> On 01/22/14 at 06:52pm, Wang Nan wrote:
>>>> Hi,
>>>>
>>>> This patch series contains following bug fixes and cleanups for
>>>> kexec-tools on arm platform:
>>>>
>>>> Wang Nan (3):
>>>> kexec: align initrd when no --image-size
>>>> kexec: pass initrd position in dtb
>>>> kexec: increase zImage compress ratio from 4 to 5
>>>
>>> One question:
>>> Is these kexec-tools patches enough for kexec work or still need the
>>> kernel patches you sent?
>>>
>>> Thanks
>>> Dave
>>>
>>
>> kexec will work without the kernel side patches, but the atag, kernel
>> cmdline, dtb information and kernel configuration must be carefully
>> adjusted.
>>
>
> It does not work for me with below:
> kexec -l /boot/vmlinuz-`uname -r` --append=`cat /proc/cmdline` --dtb vexpress-v2p-ca9.dtb
>
> The dtb and kexec kernel are exactly same with the 1st kernel.
> Is there any other things for setup in qemu, but probably it's different from your hardware
> setup..
>
> Thanks
> Dave
>
I only tried crash dump case. In my testing, following things need to be check:
1. When using dtb, the second kernel should disable CONFIG_ATAGS and CONFIG_ARM_APPENDED_DTB
2. In the second kernel, the memory information must be reconfigured using dtb or cmdline.
for example:
first kernel:
memory {
device_type = "memory";
reg = <0x80000000 0x40000000>;
};
if you want to load the second kernel at 0xa0000000: second kernel:
memory {
device_type = "memory";
reg = <0xa0000000 0x20000000>;
};
Pass a mem= option may also work, but when loading crash kernel, kexec-tools also append mem=
option to cmdline, they may conflict with each other.
The 3rd patch of my kernel patch is used to avoid the device tree reconfiguration, but it has not been
accepted.
Another thing: arm kernel must be loaded at a 128MB aligned position.
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH 0/3] kexec-tools: fix bugs and pass initrd position for arm
2014-01-23 4:17 ` Wang Nan
@ 2014-01-23 5:00 ` Dave Young
0 siblings, 0 replies; 13+ messages in thread
From: Dave Young @ 2014-01-23 5:00 UTC (permalink / raw)
To: Wang Nan; +Cc: Simon Horman, kexec, Geng Hui
On 01/23/14 at 12:17pm, Wang Nan wrote:
> On 2014/1/23 11:38, Dave Young wrote:
> > On 01/23/14 at 10:56am, Wang Nan wrote:
> >> On 2014/1/23 10:47, Dave Young wrote:
> >>> On 01/22/14 at 06:52pm, Wang Nan wrote:
> >>>> Hi,
> >>>>
> >>>> This patch series contains following bug fixes and cleanups for
> >>>> kexec-tools on arm platform:
> >>>>
> >>>> Wang Nan (3):
> >>>> kexec: align initrd when no --image-size
> >>>> kexec: pass initrd position in dtb
> >>>> kexec: increase zImage compress ratio from 4 to 5
> >>>
> >>> One question:
> >>> Is these kexec-tools patches enough for kexec work or still need the
> >>> kernel patches you sent?
> >>>
> >>> Thanks
> >>> Dave
> >>>
> >>
> >> kexec will work without the kernel side patches, but the atag, kernel
> >> cmdline, dtb information and kernel configuration must be carefully
> >> adjusted.
> >>
> >
> > It does not work for me with below:
> > kexec -l /boot/vmlinuz-`uname -r` --append=`cat /proc/cmdline` --dtb vexpress-v2p-ca9.dtb
> >
> > The dtb and kexec kernel are exactly same with the 1st kernel.
> > Is there any other things for setup in qemu, but probably it's different from your hardware
> > setup..
> >
> > Thanks
> > Dave
> >
>
> I only tried crash dump case. In my testing, following things need to be check:
Thanks for your suggestion.
>
> 1. When using dtb, the second kernel should disable CONFIG_ATAGS and CONFIG_ARM_APPENDED_DTB
Will try though I think it should be fixed and detected automaticlly.
> 2. In the second kernel, the memory information must be reconfigured using dtb or cmdline.
>
> for example:
>
> first kernel:
> memory {
> device_type = "memory";
> reg = <0x80000000 0x40000000>;
> };
>
> if you want to load the second kernel at 0xa0000000: second kernel:
> memory {
> device_type = "memory";
> reg = <0xa0000000 0x20000000>;
> };
>
> Pass a mem= option may also work, but when loading crash kernel, kexec-tools also append mem=
> option to cmdline, they may conflict with each other.
>
> The 3rd patch of my kernel patch is used to avoid the device tree reconfiguration, but it has not been
> accepted.
Great, will take a look and try your patch.
Thanks
Dave
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 13+ messages in thread