linux: apply xtensa overlay
authorMax Filippov <jcmvbkbc@gmail.com>
Sun, 9 Jul 2017 12:22:00 +0000 (05:22 -0700)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 9 Jul 2017 15:03:37 +0000 (17:03 +0200)
Xtensa core configuration must be added to linux before it can be
built for that xtensa CPU variant. Extract configuration files from the
xtensa overlay as is done for other packages that need to be configured
for a specific xtensa core.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
arch/arch.mk.xtensa
linux/linux.mk

index 1bc700aac072468ed490787b6c3b68927eb382af..7eb671537262a6102b9c1efc275ce2db09a48272 100644 (file)
@@ -23,7 +23,7 @@ endif
 # arch-xtensa-overlay-extract -- extract an extensa overlay
 #
 # argument 1 is the path in which to extract
-# argument 2 is the component to extract, one of: gcc, binutils, gdb
+# argument 2 is the component to extract, one of: gcc, binutils, gdb, linux
 #
 # Example:
 #   $(call arch-xtensa-overlay-extract,/path/to/overlay.tar,$(@D),gcc)
index b0e974774af92f632253cc5cf52f169290135544..032d64fc22e3074869003af220e76de89371cdfc 100644 (file)
@@ -86,6 +86,14 @@ ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS),y)
 LINUX_DEPENDENCIES += host-uboot-tools
 endif
 
+ifneq ($(ARCH_XTENSA_OVERLAY_FILE),)
+define LINUX_XTENSA_OVERLAY_EXTRACT
+       $(call arch-xtensa-overlay-extract,$(@D),linux)
+endef
+LINUX_POST_EXTRACT_HOOKS += LINUX_XTENSA_OVERLAY_EXTRACT
+LINUX_EXTRA_DOWNLOADS += $(ARCH_XTENSA_OVERLAY_URL)
+endif
+
 LINUX_MAKE_FLAGS = \
        HOSTCC="$(HOSTCC)" \
        HOSTCFLAGS="$(HOSTCFLAGS)" \