Skip to contentSkip to conversation

arm64 bootwrapper fixes

PATCH New Geoff Levand 2 participants 6 messages Jun 12, 2014 – Jun 20, 2014 Kbuild

lore
Share & tools
lore
#0 lore raw

cover arm64 bootwrapper fixes

Hi Catalin,

Here are two fixes for the arm64 bootwrapper. The first is a critical makefile fix, the second a minor configure fix. Please consider.

-Geoff

The following changes since commit 09d7031d5642ff1d81c0dede9b86822d67b6b52a:

boot-wrapper: arm64: add support for GICv3 (2014-05-09 18:43:52 +0100)

are available in the git repository at:

git://git.linaro.org/people/geoff.levand/boot-wrapper-aarch64.git master

for you to fetch changes up to 8ad2293111bbd60ddecd071be34734c2b46415df:

  configure: Fixes for --enable-xxx (2014-06-11 17:07:54 -0700)

----------------------------------------------------------------
Geoff Levand (2):
Makefile: Add local perl module include path
configure: Fixes for --enable-xxx

 Makefile.am  | 14 +++++++-------
 configure.ac | 19 +++++++++----------
 2 files changed, 16 insertions(+), 17 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/2 Makefile: Add local perl module include path

We recently added perl scripting to our makefile, but omitted adding the include path of the local modules in the invocation of perl. Fixes build errors like these when building out of the source tree:

Can't locate FDT.pm in @INC (you may need to install the FDT module)

---
 Makefile.am | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
Makefile.am +7 -7
index aa4e572..0c174e6 100644
@@ -8,9 +8,9 @@
 # found in the LICENSE.txt file.
 
 # VE
-PHYS_OFFSET	:= $(shell $(top_srcdir)/findmem.pl $(KERNEL_DTB))
-UART_BASE	:= $(shell $(top_srcdir)/findbase.pl $(KERNEL_DTB) 0 'arm,pl011')
-SYSREGS_BASE	:= $(shell $(top_srcdir)/findbase.pl $(KERNEL_DTB) 0 'arm,vexpress-sysreg')
+PHYS_OFFSET	:= $(shell perl -I $(top_srcdir) $(top_srcdir)/findmem.pl $(KERNEL_DTB))
+UART_BASE	:= $(shell perl -I $(top_srcdir) $(top_srcdir)/findbase.pl $(KERNEL_DTB) 0 'arm,pl011')
+SYSREGS_BASE	:= $(shell perl -I $(top_srcdir) $(top_srcdir)/findbase.pl $(KERNEL_DTB) 0 'arm,vexpress-sysreg')
 CNTFRQ		:= 0x01800000	# 24Mhz
 
 DEFINES		= -DCNTFRQ=$(CNTFRQ)
@@ -39,14 +39,14 @@ CPUS_NODE	:=
 endif
 
 if GICV3
-GIC_DIST_BASE	:= $(shell $(top_srcdir)/findbase.pl $(KERNEL_DTB) 0 'arm,gic-v3')
-GIC_RDIST_BASE	:= $(shell $(top_srcdir)/findbase.pl $(KERNEL_DTB) 1 'arm,gic-v3')
+GIC_DIST_BASE	:= $(shell perl -I $(top_srcdir) $(top_srcdir)/findbase.pl $(KERNEL_DTB) 0 'arm,gic-v3')
+GIC_RDIST_BASE	:= $(shell perl -I $(top_srcdir) $(top_srcdir)/findbase.pl $(KERNEL_DTB) 1 'arm,gic-v3')
 DEFINES		+= -DGIC_DIST_BASE=$(GIC_DIST_BASE)
 DEFINES		+= -DGIC_RDIST_BASE=$(GIC_RDIST_BASE)
 GIC		:= gic-v3.o
 else
-GIC_DIST_BASE	:= $(shell $(top_srcdir)/findbase.pl $(KERNEL_DTB) 0 'arm,cortex-a15-gic')
-GIC_CPU_BASE	:= $(shell $(top_srcdir)/findbase.pl $(KERNEL_DTB) 1 'arm,cortex-a15-gic')
+GIC_DIST_BASE	:= $(shell perl -I $(top_srcdir) $(top_srcdir)/findbase.pl $(KERNEL_DTB) 0 'arm,cortex-a15-gic')
+GIC_CPU_BASE	:= $(shell perl -I $(top_srcdir) $(top_srcdir)/findbase.pl $(KERNEL_DTB) 1 'arm,cortex-a15-gic')
 DEFINES		+= -DGIC_CPU_BASE=$(GIC_CPU_BASE)
 DEFINES		+= -DGIC_DIST_BASE=$(GIC_DIST_BASE)
 GIC		:= gic.o
Signature · 1 line
1.9.1
#2 lore raw

PATCH 2/2 configure: Fixes for --enable-xxx

In reply to Geoff Levand

When the --enable-psci=no or --enable-gicv3=no form of configure option was passed our configure script was setting the option to yes. This changes the logic slightly to fix the problem.

---
 configure.ac | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)
configure.ac +9 -10
index b60f869..c61564b 100644
@@ -41,12 +41,11 @@ AC_SUBST([KERNEL_IMAGE], [$KERN_IMAGE])
 AC_SUBST([KERNEL_DTB], [$KERN_DTB])
 
 # Allow a user to pass --enable-psci
-USE_PSCI=no
 AC_ARG_ENABLE([psci],
 	AS_HELP_STRING([--enable-psci], [enable the psci boot method]),
-	[USE_PSCI=yes],
-	[USE_PSCI=no])
-AM_CONDITIONAL([PSCI], [test "x$USE_PSCI" = "xyes"])
+	[enable_psci=$enableval])
+AM_CONDITIONAL([PSCI], [test "x$enable_psci" = "xyes"])
+AS_IF([test "x$enable_psci" = "xyes"], [], [enable_psci=no])
 
 # Allow a user to pass --with-cpu-ids
 C_CPU_IDS="0x0,0x1,0x2,0x3"
@@ -69,12 +68,11 @@ AC_ARG_WITH([cmdline],
 AC_SUBST([CMDLINE], [$C_CMDLINE])
 
 # Allow a user to pass --enable-gicv3
-USE_GICV3=no
 AC_ARG_ENABLE([gicv3],
 	AS_HELP_STRING([--enable-gicv3], [enable GICv3 instead of GICv2]),
-	[USE_GICV3=yes],
-	[USE_GICV3=no])
-AM_CONDITIONAL([GICV3], [test "x$USE_GICV3" = "xyes"])
+	[enable_gicv3=$enableval])
+AM_CONDITIONAL([GICV3], [test "x$enable_gicv3" = "xyes"])
+AS_IF([test "x$enable_gicv3" = "xyes"], [], [enable_gicv3=no])
 
 # Ensure that we have all the needed programs
 AC_PROG_CC
@@ -93,6 +91,7 @@ AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
 
 # Print the final config to the user.
+
 echo ""
 echo "  Boot wrapper configuration"
 echo "  =========================="
@@ -101,7 +100,7 @@ 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}"
+echo "  Use PSCI?                          $enable_psci"
 echo "  CPU IDs:                           ${CPU_IDS}"
-echo "  Use GICv3?                         ${USE_GICV3}"
+echo "  Use GICv3?                         $enable_gicv3"
 echo ""
Signature · 1 line
1.9.1
#3 lore raw

cover arm64 bootwrapper fixes

In reply to Geoff Levand

Hi Geoff,

Quoted 4 lines · Geoff Levand

Hi Catalin,

Here are two fixes for the arm64 bootwrapper. The first is a critical makefile fix, the second a minor configure fix. Please consider.

Thanks for putting these together, it's much appreciated.

With Catalin's blessing I've taken over bootwrapper maintenance, so I've taken these into my tree [1] with some slight changes to the second patch to fit in with the existing naming scheme.

Cheers,
Mark.

[1] git://git.kernel.org/pub/scm/linux/kernel/git/mark/boot-wrapper-aarch64.git

Quoted 34 lines

-Geoff

The following changes since commit 09d7031d5642ff1d81c0dede9b86822d67b6b52a:

boot-wrapper: arm64: add support for GICv3 (2014-05-09 18:43:52 +0100)

are available in the git repository at:

git://git.linaro.org/people/geoff.levand/boot-wrapper-aarch64.git master

for you to fetch changes up to 8ad2293111bbd60ddecd071be34734c2b46415df:

  configure: Fixes for --enable-xxx (2014-06-11 17:07:54 -0700)

----------------------------------------------------------------
Geoff Levand (2):
Makefile: Add local perl module include path
configure: Fixes for --enable-xxx

 Makefile.am  | 14 +++++++-------
 configure.ac | 19 +++++++++----------
 2 files changed, 16 insertions(+), 17 deletions(-)
Signature · 7 lines
1.9.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#4 lore raw

cover arm64 bootwrapper fixes

Hi Mark,

Quoted 3 lines · Mark Rutland

With Catalin's blessing I've taken over bootwrapper maintenance, so I've taken these into my tree [1] with some slight changes to the second patch to fit in with the existing naming scheme.

I tested your latest, and it seems to work OK.

-Geoff

#5 lore raw

cover arm64 bootwrapper fixes

Quoted 8 lines · Geoff Levand

Hi Mark,

Quoted 3 lines · Mark Rutland

With Catalin's blessing I've taken over bootwrapper maintenance, so I've taken these into my tree [1] with some slight changes to the second patch to fit in with the existing naming scheme.

I tested your latest, and it seems to work OK.

Thanks for testing!

Mark.