Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Max Filippov <jcmvbkbc@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/2] uboot: add xtensa overlay unpacking to prepatch step
Date: Sun, 25 Dec 2016 05:50:38 -0800	[thread overview]
Message-ID: <1482673838-24567-3-git-send-email-jcmvbkbc@gmail.com> (raw)
In-Reply-To: <1482673838-24567-1-git-send-email-jcmvbkbc@gmail.com>

Xtensa core configuration must to be added to U-Boot before it can be
built for that xtensa CPU variant. Extract configuration files from the
xtensa overlay in prepatch step as is done with other packages that
need to be configured for a specific xtensa core.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
 boot/uboot/uboot.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index 6b9d544..900aadc 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -148,6 +148,16 @@ endef
 UBOOT_POST_EXTRACT_HOOKS += UBOOT_COPY_OLD_LICENSE_FILE
 UBOOT_POST_RSYNC_HOOKS += UBOOT_COPY_OLD_LICENSE_FILE
 
+XTENSA_CORE_NAME = $(call qstrip, $(BR2_XTENSA_CORE_NAME))
+ifneq ($(XTENSA_CORE_NAME),)
+define UBOOT_XTENSA_PRE_PATCH
+	test -d $(@D)/arch/xtensa/include/asm/arch-$(XTENSA_CORE_NAME) || \
+	tar xf $(BR2_XTENSA_OVERLAY_DIR)/xtensa_$(XTENSA_CORE_NAME).tar \
+		-C $(@D) --strip-components=1 u-boot
+endef
+UBOOT_PRE_PATCH_HOOKS += UBOOT_XTENSA_PRE_PATCH
+endif
+
 # Analogous code exists in linux/linux.mk. Basically, the generic
 # package infrastructure handles downloading and applying remote
 # patches. Local patches are handled depending on whether they are
-- 
2.1.4

  parent reply	other threads:[~2016-12-25 13:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-25 13:50 [Buildroot] [PATCH 0/2] add custom xtensa core support to linux and U-Boot Max Filippov
2016-12-25 13:50 ` [Buildroot] [PATCH 1/2] linux: add xtensa overlay unpacking to prepatch step Max Filippov
2016-12-25 13:50 ` Max Filippov [this message]
2017-01-06 19:52 ` [Buildroot] [PATCH 0/2] add custom xtensa core support to linux and U-Boot Max Filippov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1482673838-24567-3-git-send-email-jcmvbkbc@gmail.com \
    --to=jcmvbkbc@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox