]> xenbits.xensource.com Git - people/julieng/boot-wrapper-aarch64.git/commitdiff
Xen: Support adding DT nodes
authorChristoffer Dall <christoffer.dall@linaro.org>
Mon, 20 Jun 2016 15:09:32 +0000 (16:09 +0100)
committerJulien Grall <julien.grall@arm.com>
Wed, 29 Jun 2016 09:59:56 +0000 (10:59 +0100)
Support adding xen,xen-bootargs node via --with-xen-bootargs to the
configure script and automatically add the Dom0 node to the DT as well.

Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Makefile.am
configure.ac

index 1a801c0f9c0d1a14fc7843c8ef70eeed9666f1d5..d83b417caadaa9f783e4ad4ccdbe62c51a42b411 100644 (file)
@@ -93,24 +93,32 @@ FILESYSTEM_END      := $(shell echo $$(($(FILESYSTEM_START) + $(FILESYSTEM_SIZE))))
 
 FDT_OFFSET     := 0x08000000
 
+if XEN
+XEN            := -DXEN=$(XEN_IMAGE)
+XEN_OFFSET     := 0x08200000
+KERNEL_SIZE    := $(shell stat -Lc %s $(KERNEL_IMAGE) 2>/dev/null || echo 0)
+DOM0_OFFSET    := $(shell echo $$(($(PHYS_OFFSET) + $(KERNEL_OFFSET))))
+XEN_BOOTARGS   := xen,xen-bootargs = \"$(BOOTARGS)\";                  \
+                  \#address-cells = <2>;                               \
+                  \#size-cells = <2>;                                  \
+                  module@1 {                                           \
+                       compatible = \"xen,linux-zimage\", \"xen,multiboot-module\"; \
+                       reg = <0x0 $(DOM0_OFFSET) 0x0 $(KERNEL_SIZE)>;  \
+                  };
+endif
+
+
 if INITRD
 INITRD_FLAGS   := -DUSE_INITRD
+INITRD_CHOSEN   := linux,initrd-start = <$(FILESYSTEM_START)>; \
+                  linux,initrd-end = <$(FILESYSTEM_END)>;
+endif
+
 CHOSEN_NODE    := chosen {                                             \
                        bootargs = \"$(CMDLINE)\";                      \
-                       linux,initrd-start = <$(FILESYSTEM_START)>;     \
-                       linux,initrd-end = <$(FILESYSTEM_END)>;         \
-                  };
-else
-INITRD_FLAGS   :=
-CHOSEN_NODE    := chosen {                                             \
-                       bootargs = \"$(CMDLINE)\";                      \
+                       $(INITRD_CHOSEN)                                \
+                       $(XEN_BOOTARGS)                                 \
                   };
-endif
-
-if XEN
-XEN            := -DXEN=$(XEN_IMAGE)
-XEN_OFFSET     := 0x08200000
-endif
 
 CPPFLAGS       += $(INITRD_FLAGS)
 CFLAGS         += -Iinclude/ -I$(ARCH_SRC)/include/
index 2441f8b0496db48c22e0d52252928d1264db059a..b0019399c12649ae75493e39e291123f2ea7b415 100644 (file)
@@ -95,6 +95,12 @@ AC_ARG_WITH([cmdline],
        [C_CMDLINE=$withval])
 AC_SUBST([CMDLINE], [$C_CMDLINE])
 
+X_BOOTARGS="console=dtuart dtuart=serial0 no-bootscrub"
+AC_ARG_WITH([xen-bootargs],
+       AS_HELP_STRING([--with-xen-bootargs], [set Xen bootargs]),
+       [X_BOOTARGS=$withval])
+AC_SUBST([BOOTARGS], [$X_BOOTARGS])
+
 # Allow a user to pass --enable-gicv3
 AC_ARG_ENABLE([gicv3],
        AS_HELP_STRING([--enable-gicv3], [enable GICv3 instead of GICv2]),
@@ -133,4 +139,7 @@ echo "  Use GICv3?                         ${USE_GICV3}"
 echo "  Boot-wrapper execution state:      AArch${BOOTWRAPPER_ES}"
 echo "  Kernel execution state:            AArch${KERNEL_ES}"
 echo "  Xen image                          ${X_IMAGE:-NONE}"
+if test "x${X_IMAGE}" != "x"; then
+echo "  Xen Bootargs:                      ${X_BOOTARGS}"
+fi
 echo ""