diff options
author | Wang Nan <wangnan0@huawei.com> | 2014-03-25 12:09:45 +0800 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2014-03-28 09:47:21 -0700 |
commit | ec7f2473ac125902d38f5d30fb3ce36df0e5df83 (patch) | |
tree | 43501477b97e0cbe485826a7e50f1ffb73f6544b /kexec/arch/arm/kexec-zImage-arm.c | |
parent | ac3c7949bbd19d65d352964205e5e212890636a6 (diff) |
Pass initrd position by dtb
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>
Acked-by: Dave Young <dyoung@redhat.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/arch/arm/kexec-zImage-arm.c')
-rw-r--r-- | kexec/arch/arm/kexec-zImage-arm.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/kexec/arch/arm/kexec-zImage-arm.c b/kexec/arch/arm/kexec-zImage-arm.c index aea1278..bfbf290 100644 --- a/kexec/arch/arm/kexec-zImage-arm.c +++ b/kexec/arch/arm/kexec-zImage-arm.c @@ -460,6 +460,19 @@ 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); + + unsigned long start, end; + start = cpu_to_be32((unsigned long)(initrd_base)); + end = cpu_to_be32((unsigned long)(initrd_base + initrd_size)); + + if (setup_dtb_prop(&dtb_buf, &dtb_length, "/chosen", + "linux,initrd-start", &start, + sizeof(start))) + return -1; + if (setup_dtb_prop(&dtb_buf, &dtb_length, "/chosen", + "linux,initrd-end", &end, + sizeof(end))) + return -1; } /* Stick the dtb at the end of the initrd and page |