* [Buildroot] [PATCH 0/2] add custom xtensa core support to linux and U-Boot
@ 2016-12-25 13:50 Max Filippov
2016-12-25 13:50 ` [Buildroot] [PATCH 1/2] linux: add xtensa overlay unpacking to prepatch step Max Filippov
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Max Filippov @ 2016-12-25 13:50 UTC (permalink / raw)
To: buildroot
Hello,
this series adds xtensa configuration overlay extraction to the prepatch
step of linux and U-Boot build. That allows building linux and U-Boot for
custom xtensa cores as a part of a buildroot build.
Max Filippov (2):
linux: add xtensa overlay unpacking to prepatch step
uboot: add xtensa overlay unpacking to prepatch step
boot/uboot/uboot.mk | 10 ++++++++++
linux/linux.mk | 10 ++++++++++
2 files changed, 20 insertions(+)
--
2.1.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/2] linux: add xtensa overlay unpacking to prepatch step
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 ` Max Filippov
2016-12-25 13:50 ` [Buildroot] [PATCH 2/2] uboot: " Max Filippov
2017-01-06 19:52 ` [Buildroot] [PATCH 0/2] add custom xtensa core support to linux and U-Boot Max Filippov
2 siblings, 0 replies; 4+ messages in thread
From: Max Filippov @ 2016-12-25 13:50 UTC (permalink / raw)
To: buildroot
Xtensa core configuration must to be added to linux 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>
---
linux/linux.mk | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/linux/linux.mk b/linux/linux.mk
index 988427c..f874f5e 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -82,6 +82,16 @@ ifeq ($(BR2_LINUX_KERNEL_UBOOT_IMAGE),y)
LINUX_DEPENDENCIES += host-uboot-tools
endif
+XTENSA_CORE_NAME = $(call qstrip, $(BR2_XTENSA_CORE_NAME))
+ifneq ($(XTENSA_CORE_NAME),)
+define LINUX_XTENSA_PRE_PATCH
+ test -d $(@D)/arch/xtensa/variants/$(XTENSA_CORE_NAME) || \
+ tar xf $(BR2_XTENSA_OVERLAY_DIR)/xtensa_$(XTENSA_CORE_NAME).tar \
+ -C $(@D) --strip-components=1 linux
+endef
+LINUX_PRE_PATCH_HOOKS += LINUX_XTENSA_PRE_PATCH
+endif
+
LINUX_MAKE_FLAGS = \
HOSTCC="$(HOSTCC)" \
HOSTCFLAGS="$(HOSTCFLAGS)" \
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 2/2] uboot: add xtensa overlay unpacking to prepatch step
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
2017-01-06 19:52 ` [Buildroot] [PATCH 0/2] add custom xtensa core support to linux and U-Boot Max Filippov
2 siblings, 0 replies; 4+ messages in thread
From: Max Filippov @ 2016-12-25 13:50 UTC (permalink / raw)
To: buildroot
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 0/2] add custom xtensa core support to linux and U-Boot
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 ` [Buildroot] [PATCH 2/2] uboot: " Max Filippov
@ 2017-01-06 19:52 ` Max Filippov
2 siblings, 0 replies; 4+ messages in thread
From: Max Filippov @ 2017-01-06 19:52 UTC (permalink / raw)
To: buildroot
ping?
On Sun, Dec 25, 2016 at 5:50 AM, Max Filippov <jcmvbkbc@gmail.com> wrote:
> Hello,
>
> this series adds xtensa configuration overlay extraction to the prepatch
> step of linux and U-Boot build. That allows building linux and U-Boot for
> custom xtensa cores as a part of a buildroot build.
>
> Max Filippov (2):
> linux: add xtensa overlay unpacking to prepatch step
> uboot: add xtensa overlay unpacking to prepatch step
>
> boot/uboot/uboot.mk | 10 ++++++++++
> linux/linux.mk | 10 ++++++++++
> 2 files changed, 20 insertions(+)
--
Thanks.
-- Max
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-01-06 19:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [Buildroot] [PATCH 2/2] uboot: " Max Filippov
2017-01-06 19:52 ` [Buildroot] [PATCH 0/2] add custom xtensa core support to linux and U-Boot Max Filippov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox