add custom xtensa core support to linux and U-Boot
cover add custom xtensa core support to linux and U-Boot
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(+)
Signature · 1 line
2.1.4
PATCH 1/2 linux: add xtensa overlay unpacking to prepatch step
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.
--- linux/linux.mk | 10 ++++++++++ 1 file changed, 10 insertions(+)
linux/linux.mk +10 -0
@@ -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)" \
Signature · 1 line
2.1.4
PATCH 2/2 uboot: add xtensa overlay unpacking to prepatch step
In reply to Max FilippovXtensa 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.
--- boot/uboot/uboot.mk | 10 ++++++++++ 1 file changed, 10 insertions(+)
boot/uboot/uboot.mk +10 -0
@@ -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
Signature · 1 line
2.1.4
cover add custom xtensa core support to linux and U-Boot
In reply to Max Filippovping?
Quoted 13 lines · Max Filippov
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 stepboot/uboot/uboot.mk | 10 ++++++++++ linux/linux.mk | 10 ++++++++++ 2 files changed, 20 insertions(+)
Signature · 2 lines
Thanks. -- Max