]> xenbits.xensource.com Git - people/julieng/boot-wrapper-aarch64.git/commitdiff
Allow DTB to be overridden
authorMark Rutland <mark.rutland@arm.com>
Tue, 15 Apr 2014 15:20:48 +0000 (16:20 +0100)
committerMark Rutland <mark.rutland@arm.com>
Tue, 15 Apr 2014 15:20:48 +0000 (16:20 +0100)
Some platforms differ significantly enough from the RTSM VE platform
such the RTSM VE DTB is not a valid DTB for the platform. Now that we
have the appropriate logic for detecting device and memory base
addresses, there's no reason we can't allwo the user to arbittrarily
choose to use another DTB so long as the basics are present (memory, a
pl011, and V2M sysregs).

This patch adds a "--with-dtb" option to override the DTB to use. The
aformentioned base addresses are automatically dicovered at build time.
Where a required device is not present, the build will fail.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
configure.ac

index 70718ae03b696418e02c1978255a269c673c7d25..40d36a05cce622c328cd9d716302731b5b1c7338 100644 (file)
@@ -21,19 +21,24 @@ AC_ARG_WITH([kernel-dir],
        AS_HELP_STRING([--with-kernel-dir], [specify the root Linux kernel build directory (required)]),
        AC_SUBST([KERN_DIR], [$withval]),
        AC_MSG_ERROR([No kernel directory specified. Use --with-kernel-dir]))
-KERN_IMAGE=/arch/arm64/boot/Image
-KERN_DTB=/arch/arm64/boot/dts/rtsm_ve-aemv8a.dtb
+KERN_IMAGE=$KERN_DIR/arch/arm64/boot/Image
+KERN_DTB=$KERN_DIR/arch/arm64/boot/dts/rtsm_ve-aemv8a.dtb
+
+# Allow the user to override the default DTB
+AC_ARG_WITH([dtb],
+       AS_HELP_STRING([--with-dtb], [Specify a particular DTB to use]),
+       [KERN_DTB="$withval"])
 
 # Ensure that the user has provided us with a sane kernel dir.
 m4_define([CHECKFILES], [KERN_DIR,
-       KERN_DIR$KERN_DTB,
-       KERN_DIR$KERN_IMAGE])
+       KERN_DTB,
+       KERN_IMAGE])
 
 m4_foreach([checkfile], [CHECKFILES],
        [AC_CHECK_FILE([$checkfile], [], AC_MSG_ERROR([No such file or directory: $checkfile]))])
 
-AC_SUBST([KERNEL_IMAGE], [$KERN_DIR$KERN_IMAGE])
-AC_SUBST([KERNEL_DTB], [$KERN_DIR$KERN_DTB])
+AC_SUBST([KERNEL_IMAGE], [$KERN_IMAGE])
+AC_SUBST([KERNEL_DTB], [$KERN_DTB])
 
 # Allow a user to pass --enable-psci
 USE_PSCI=no
@@ -85,6 +90,7 @@ echo "  Boot wrapper configuration"
 echo "  =========================="
 echo ""
 echo "  Linux kernel build dir:            ${KERN_DIR}"
+echo "  Device tree blob:                  ${KERN_DTB}"
 echo "  Linux kernel command line:         ${CMDLINE}"
 echo "  Embedded initrd:                   ${FILESYSTEM:-NONE}"
 echo "  Use PSCI?                          ${USE_PSCI}"