* [ptxdist] [PATCH 0/2] bootloader improvements
@ 2019-11-19 13:41 Alexander Dahl
2019-11-19 13:41 ` [ptxdist] [PATCH 1/2] at91bootstrap2: Revise make env and opt Alexander Dahl
2019-11-19 13:41 ` [ptxdist] [PATCH 2/2] u-boot: Build out-of-tree Alexander Dahl
0 siblings, 2 replies; 4+ messages in thread
From: Alexander Dahl @ 2019-11-19 13:41 UTC (permalink / raw)
To: ptxdist
Hei hei,
after finishing a rework of the u-boot.make rule for OOT build, I
noticed I had an unsubmitted patch for at91bootstrap2 lying around.
Because it's both bootloader stuff, you get both patches in one series.
You might want to test the u-boot patch a little more thoroughly!
Greets
Alex
Alexander Dahl (2):
at91bootstrap2: Revise make env and opt
u-boot: Build out-of-tree
rules/at91bootstrap2.make | 8 +++---
rules/u-boot.make | 58 +++++++++++++++++++++------------------
2 files changed, 36 insertions(+), 30 deletions(-)
--
2.20.1
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ptxdist] [PATCH 1/2] at91bootstrap2: Revise make env and opt
2019-11-19 13:41 [ptxdist] [PATCH 0/2] bootloader improvements Alexander Dahl
@ 2019-11-19 13:41 ` Alexander Dahl
2019-11-19 13:41 ` [ptxdist] [PATCH 2/2] u-boot: Build out-of-tree Alexander Dahl
1 sibling, 0 replies; 4+ messages in thread
From: Alexander Dahl @ 2019-11-19 13:41 UTC (permalink / raw)
To: ptxdist
The 'ARCH=$(PTXCONF_BAREBOX_ARCH_STRING)' is present since first version
of this package and maybe a leftover from some other package this is
based on. However that ARCH variable is not used by the at91boostrap 3.x
Makefile and barebox might not even be enabled.
The CROSS_COMPILE variable is changed to what other bootloader packages
use, and we support passing V=1 now.
Signed-off-by: Alexander Dahl <ada@thorsis.com>
---
rules/at91bootstrap2.make | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/rules/at91bootstrap2.make b/rules/at91bootstrap2.make
index dcceb17cf..47031fd6c 100644
--- a/rules/at91bootstrap2.make
+++ b/rules/at91bootstrap2.make
@@ -32,10 +32,10 @@ AT91BOOTSTRAP2_LICENSE := unknown
AT91BOOTSTRAP2_WRAPPER_BLACKLIST := \
$(PTXDIST_LOWLEVEL_WRAPPER_BLACKLIST)
-AT91BOOTSTRAP2_MAKE_OPT := \
- HOSTCC=$(HOSTCC) \
- ARCH=$(PTXCONF_BAREBOX_ARCH_STRING) \
- CROSS_COMPILE=$(COMPILER_PREFIX)
+AT91BOOTSTRAP2_MAKE_ENV := \
+ CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) \
+ HOSTCC=$(HOSTCC)
+AT91BOOTSTRAP2_MAKE_OPT := V=$(PTXDIST_VERBOSE)
ifdef PTXCONF_AT91BOOTSTRAP2
$(AT91BOOTSTRAP2_CONFIG):
--
2.20.1
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ptxdist] [PATCH 2/2] u-boot: Build out-of-tree
2019-11-19 13:41 [ptxdist] [PATCH 0/2] bootloader improvements Alexander Dahl
2019-11-19 13:41 ` [ptxdist] [PATCH 1/2] at91bootstrap2: Revise make env and opt Alexander Dahl
@ 2019-11-19 13:41 ` Alexander Dahl
2019-11-19 15:51 ` Bruno Thomsen
1 sibling, 1 reply; 4+ messages in thread
From: Alexander Dahl @ 2019-11-19 13:41 UTC (permalink / raw)
To: ptxdist; +Cc: Denis OSTERLAND, Bruno Thomsen
Like barebox and kernel, u-boot can be built out-of-tree, only few
modifications are necessary. This is especially nice when working in the
source tree U-Boot is built from.
Cc: Bruno Thomsen <bruno.thomsen@gmail.com>
Cc: Denis OSTERLAND <denis.osterland@diehl.com>
Signed-off-by: Alexander Dahl <ada@thorsis.com>
---
rules/u-boot.make | 58 ++++++++++++++++++++++++++---------------------
1 file changed, 32 insertions(+), 26 deletions(-)
diff --git a/rules/u-boot.make b/rules/u-boot.make
index 1aabe61b1..e3c2c2389 100644
--- a/rules/u-boot.make
+++ b/rules/u-boot.make
@@ -16,14 +16,16 @@ PACKAGES-$(PTXCONF_U_BOOT) += u-boot
#
# Paths and names
#
-U_BOOT_VERSION := $(call remove_quotes,$(PTXCONF_U_BOOT_VERSION))
-U_BOOT_MD5 := $(call remove_quotes,$(PTXCONF_U_BOOT_MD5))
-U_BOOT := u-boot-$(U_BOOT_VERSION)
-U_BOOT_SUFFIX := tar.bz2
-U_BOOT_URL := https://ftp.denx.de/pub/u-boot/$(U_BOOT).$(U_BOOT_SUFFIX)
-U_BOOT_SOURCE := $(SRCDIR)/$(U_BOOT).$(U_BOOT_SUFFIX)
-U_BOOT_DIR := $(BUILDDIR)/$(U_BOOT)
-U_BOOT_DEVPKG := NO
+U_BOOT_VERSION := $(call remove_quotes,$(PTXCONF_U_BOOT_VERSION))
+U_BOOT_MD5 := $(call remove_quotes,$(PTXCONF_U_BOOT_MD5))
+U_BOOT := u-boot-$(U_BOOT_VERSION)
+U_BOOT_SUFFIX := tar.bz2
+U_BOOT_URL := https://ftp.denx.de/pub/u-boot/$(U_BOOT).$(U_BOOT_SUFFIX)
+U_BOOT_SOURCE := $(SRCDIR)/$(U_BOOT).$(U_BOOT_SUFFIX)
+U_BOOT_DIR := $(BUILDDIR)/$(U_BOOT)
+U_BOOT_BUILD_DIR := $(U_BOOT_DIR)-build
+U_BOOT_DEVPKG := NO
+U_BOOT_BUILD_OOT := KEEP
ifdef PTXCONF_U_BOOT_CONFIGSYSTEM_KCONFIG
U_BOOT_CONFIG := $(call ptx/in-platformconfigdir, \
@@ -44,10 +46,16 @@ endif
U_BOOT_WRAPPER_BLACKLIST := \
$(PTXDIST_LOWLEVEL_WRAPPER_BLACKLIST)
+U_BOOT_CONF_OPT := \
+ -C $(U_BOOT_DIR) \
+ O=$(U_BOOT_BUILD_DIR) \
+ V=$(PTXDIST_VERBOSE)
+
U_BOOT_MAKE_ENV := \
CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) \
HOSTCC=$(HOSTCC)
-U_BOOT_MAKE_OPT := V=$(PTXDIST_VERBOSE)
+U_BOOT_MAKE_OPT := $(U_BOOT_CONF_OPT)
+
U_BOOT_TAGS_OPT := ctags cscope etags
ifdef PTXCONF_U_BOOT_CONFIGSYSTEM_KCONFIG
@@ -57,9 +65,7 @@ endif
ifdef PTXCONF_U_BOOT_CONFIGSYSTEM_LEGACY
U_BOOT_CONF_ENV := PATH=$(CROSS_PATH) $(U_BOOT_MAKE_ENV)
-U_BOOT_CONF_OPT := \
- $(U_BOOT_MAKE_OPT) \
- $(call remove_quotes, $(PTXCONF_U_BOOT_CONFIG))
+U_BOOT_CONF_OPT += $(call remove_quotes, $(PTXCONF_U_BOOT_CONFIG))
U_BOOT_MAKE_PAR := NO
endif
@@ -79,7 +85,7 @@ endif
ifdef PTXCONF_U_BOOT_CONFIGSYSTEM_LEGACY
$(STATEDIR)/u-boot.prepare:
@$(call targetinfo)
- $(U_BOOT_CONF_ENV) $(MAKE) -C $(U_BOOT_DIR) $(U_BOOT_CONF_OPT)
+ $(U_BOOT_CONF_ENV) $(MAKE) $(U_BOOT_CONF_OPT)
@$(call touch)
endif
@@ -91,9 +97,9 @@ $(STATEDIR)/u-boot.compile:
@$(call targetinfo)
@$(call world/compile, U_BOOT)
ifdef PTXCONF_U_BOOT_BOOT_SCRIPT
- @$(U_BOOT_DIR)/tools/mkimage -T script -C none \
+ @$(U_BOOT_BUILD_DIR)/tools/mkimage -T script -C none \
-d $(U_BOOT_BOOT_SCRIPT_TXT) \
- $(U_BOOT_DIR)/boot.scr.uimg
+ $(U_BOOT_BUILD_DIR)/boot.scr.uimg
endif
@$(call touch)
@@ -111,34 +117,34 @@ $(STATEDIR)/u-boot.install:
$(STATEDIR)/u-boot.targetinstall:
@$(call targetinfo)
- @install -v -D -m644 $(U_BOOT_DIR)/u-boot.bin $(IMAGEDIR)/u-boot.bin
+ @install -v -D -m644 $(U_BOOT_BUILD_DIR)/u-boot.bin $(IMAGEDIR)/u-boot.bin
ifdef PTXCONF_U_BOOT_INSTALL_SREC
- @install -v -D -m644 $(U_BOOT_DIR)/u-boot.srec $(IMAGEDIR)/u-boot.srec
+ @install -v -D -m644 $(U_BOOT_BUILD_DIR)/u-boot.srec $(IMAGEDIR)/u-boot.srec
endif
ifdef PTXCONF_U_BOOT_INSTALL_ELF
- @install -v -D -m644 $(U_BOOT_DIR)/u-boot $(IMAGEDIR)/u-boot.elf
+ @install -v -D -m644 $(U_BOOT_BUILD_DIR)/u-boot $(IMAGEDIR)/u-boot.elf
endif
ifdef PTXCONF_U_BOOT_INSTALL_SPL
- @install -v -D -m644 $(U_BOOT_DIR)/SPL $(IMAGEDIR)/SPL
+ @install -v -D -m644 $(U_BOOT_BUILD_DIR)/SPL $(IMAGEDIR)/SPL
endif
ifdef PTXCONF_U_BOOT_INSTALL_MLO
- @install -v -D -m644 $(U_BOOT_DIR)/MLO $(IMAGEDIR)/MLO
+ @install -v -D -m644 $(U_BOOT_BUILD_DIR)/MLO $(IMAGEDIR)/MLO
endif
ifdef PTXCONF_U_BOOT_INSTALL_U_BOOT_IMG
- @install -v -D -m644 $(U_BOOT_DIR)/u-boot.img $(IMAGEDIR)/u-boot.img
+ @install -v -D -m644 $(U_BOOT_BUILD_DIR)/u-boot.img $(IMAGEDIR)/u-boot.img
endif
ifdef PTXCONF_U_BOOT_INSTALL_U_BOOT_IMX
- @install -v -D -m644 $(U_BOOT_DIR)/u-boot.imx $(IMAGEDIR)/u-boot.imx
+ @install -v -D -m644 $(U_BOOT_BUILD_DIR)/u-boot.imx $(IMAGEDIR)/u-boot.imx
endif
ifdef PTXCONF_U_BOOT_INSTALL_U_BOOT_DTB_IMX
- @install -v -D -m644 $(U_BOOT_DIR)/u-boot-dtb.imx $(IMAGEDIR)/u-boot-dtb.imx
+ @install -v -D -m644 $(U_BOOT_BUILD_DIR)/u-boot-dtb.imx $(IMAGEDIR)/u-boot-dtb.imx
endif
ifdef PTXCONF_U_BOOT_INSTALL_U_BOOT_DTB
- @install -v -D -m644 $(U_BOOT_DIR)/u-boot-dtb.bin \
+ @install -v -D -m644 $(U_BOOT_BUILD_DIR)/u-boot-dtb.bin \
$(IMAGEDIR)/u-boot-dtb.bin
endif
ifdef PTXCONF_U_BOOT_INSTALL_U_BOOT_WITH_SPL_PBL
- @install -v -D -m644 $(U_BOOT_DIR)/u-boot-with-spl-pbl.bin \
+ @install -v -D -m644 $(U_BOOT_BUILD_DIR)/u-boot-with-spl-pbl.bin \
$(IMAGEDIR)/u-boot-with-spl-pbl.bin
endif
@@ -150,7 +156,7 @@ ifdef PTXCONF_U_BOOT_BOOT_SCRIPT
@$(call install_fixup, u-boot, DESCRIPTION, "U-Boot boot script")
@$(call install_copy, u-boot, 0, 0, 0644, \
- $(U_BOOT_DIR)/boot.scr.uimg, $(U_BOOT_BOOT_SCRIPT_BIN))
+ $(U_BOOT_BUILD_DIR)/boot.scr.uimg, $(U_BOOT_BOOT_SCRIPT_BIN))
@$(call install_finish, u-boot)
endif
--
2.20.1
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ptxdist] [PATCH 2/2] u-boot: Build out-of-tree
2019-11-19 13:41 ` [ptxdist] [PATCH 2/2] u-boot: Build out-of-tree Alexander Dahl
@ 2019-11-19 15:51 ` Bruno Thomsen
0 siblings, 0 replies; 4+ messages in thread
From: Bruno Thomsen @ 2019-11-19 15:51 UTC (permalink / raw)
To: Alexander Dahl; +Cc: Denis OSTERLAND, ptxdist
Hi,
Den tir. 19. nov. 2019 kl. 14.41 skrev Alexander Dahl <ada@thorsis.com>:
>
> Like barebox and kernel, u-boot can be built out-of-tree, only few
> modifications are necessary. This is especially nice when working in the
> source tree U-Boot is built from.
>
> Cc: Bruno Thomsen <bruno.thomsen@gmail.com>
> Cc: Denis OSTERLAND <denis.osterland@diehl.com>
> Signed-off-by: Alexander Dahl <ada@thorsis.com>
Our bootloader image build and works on target.
Tested-by: Bruno Thomsen <bruno.thomsen@gmail.com>
Sending a version 3 of "u-boot: generate environment image", that's
rebased on top of this patch.
/Bruno
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-11-19 15:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-19 13:41 [ptxdist] [PATCH 0/2] bootloader improvements Alexander Dahl
2019-11-19 13:41 ` [ptxdist] [PATCH 1/2] at91bootstrap2: Revise make env and opt Alexander Dahl
2019-11-19 13:41 ` [ptxdist] [PATCH 2/2] u-boot: Build out-of-tree Alexander Dahl
2019-11-19 15:51 ` Bruno Thomsen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox