[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] xen/arm: Correctly boot with an initrd and no linux command line



commit 3b2f92c1f8567461562fac9922fbad223dc8c6cf
Author:     Julien Grall <julien.grall@xxxxxxxxxx>
AuthorDate: Mon Feb 10 17:34:46 2014 +0000
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Tue Feb 11 12:46:54 2014 +0000

    xen/arm: Correctly boot with an initrd and no linux command line
    
    When DOM0 device tree is building, the properties for initrd will
    only be added if there is a linux command line. This will result to a panic
    later:
    
    (XEN) *** LOADING DOMAIN 0 ***
    (XEN) Populate P2M 0x20000000->0x40000000 (1:1 mapping for dom0)
    (XEN) Loading kernel from boot module 2
    (XEN) Loading zImage from 0000000001000000 to 
0000000027c00000-0000000027eafb48
    (XEN) Loading dom0 initrd from 0000000002000000 to 
0x0000000028200000-0x0000000028c00000
    (XEN)
    (XEN) ****************************************
    (XEN) Panic on CPU 0:
    (XEN) Cannot fix up "linux,initrd-start" property
    (XEN) ****************************************
    (XEN)
    
    Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 xen/arch/arm/domain_build.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 47b781b..5ca2f15 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -209,12 +209,15 @@ static int write_properties(struct domain *d, struct 
kernel_info *kinfo,
             return res;
     }
 
-    if ( dt_node_path_is_equal(node, "/chosen") && bootargs )
+    if ( dt_node_path_is_equal(node, "/chosen") )
     {
-        res = fdt_property(kinfo->fdt, "bootargs", bootargs,
-                           strlen(bootargs) + 1);
-        if ( res )
-            return res;
+        if ( bootargs )
+        {
+            res = fdt_property(kinfo->fdt, "bootargs", bootargs,
+                               strlen(bootargs) + 1);
+            if ( res )
+                return res;
+        }
 
         /*
          * If the bootloader provides an initrd, we must create a placeholder
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.