* [ptxdist] [PATCH 1/7] u-boot: specify GPL-2.0-only as LICENSE
@ 2018-10-10 12:03 Ahmad Fatoum
2018-10-10 12:03 ` [ptxdist] [PATCH 2/7] u-boot: add support for oldconfig/menuconfig Ahmad Fatoum
` (6 more replies)
0 siblings, 7 replies; 22+ messages in thread
From: Ahmad Fatoum @ 2018-10-10 12:03 UTC (permalink / raw)
To: ptxdist; +Cc: Ahmad Fatoum
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
rules/u-boot.make | 1 +
1 file changed, 1 insertion(+)
diff --git a/rules/u-boot.make b/rules/u-boot.make
index 94aa7745809d..aa7a01ca8fea 100644
--- a/rules/u-boot.make
+++ b/rules/u-boot.make
@@ -24,6 +24,7 @@ U_BOOT_SUFFIX := tar.bz2
U_BOOT_URL := ftp://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_LICENSE := GPL-2.0-only
# ----------------------------------------------------------------------------
# Prepare
--
2.19.0
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 22+ messages in thread
* [ptxdist] [PATCH 2/7] u-boot: add support for oldconfig/menuconfig
2018-10-10 12:03 [ptxdist] [PATCH 1/7] u-boot: specify GPL-2.0-only as LICENSE Ahmad Fatoum
@ 2018-10-10 12:03 ` Ahmad Fatoum
2018-10-16 7:52 ` Michael Olbrich
2018-10-16 8:25 ` Michael Olbrich
2018-10-10 12:03 ` [ptxdist] [PATCH 3/7] u-boot: add V=$(PTXDIST_VERBOSE) to make options Ahmad Fatoum
` (5 subsequent siblings)
6 siblings, 2 replies; 22+ messages in thread
From: Ahmad Fatoum @ 2018-10-10 12:03 UTC (permalink / raw)
To: ptxdist; +Cc: Ahmad Fatoum
while at it, remove U_BOOT_PATH, because it's PATH=$(CROSS_PATH) already
by default.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
rules/u-boot.make | 42 ++++++++++++++++++++++++++++++++++--------
1 file changed, 34 insertions(+), 8 deletions(-)
diff --git a/rules/u-boot.make b/rules/u-boot.make
index aa7a01ca8fea..46cfc192825a 100644
--- a/rules/u-boot.make
+++ b/rules/u-boot.make
@@ -26,6 +26,9 @@ U_BOOT_SOURCE := $(SRCDIR)/$(U_BOOT).$(U_BOOT_SUFFIX)
U_BOOT_DIR := $(BUILDDIR)/$(U_BOOT)
U_BOOT_LICENSE := GPL-2.0-only
+U_BOOT_CONFIG := $(call ptx/in-platformconfigdir, \
+ $(call remove_quotes, $(PTXCONF_U_BOOT_CONFIG)))
+
# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------
@@ -37,17 +40,26 @@ U_BOOT_WRAPPER_BLACKLIST := \
TARGET_DEBUG \
TARGET_BUILD_ID
-U_BOOT_PATH := PATH=$(CROSS_PATH)
-U_BOOT_MAKE_OPT := CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) HOSTCC=$(HOSTCC)
+U_BOOT_CONF_ENV := KCONFIG_NOTIMESTAMP=1
+U_BOOT_CONF_TOOL := kconfig
+U_BOOT_CONF_OPT := CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) HOSTCC=$(HOSTCC)
U_BOOT_MAKE_PAR := NO
U_BOOT_TAGS_OPT := ctags cscope etags
+U_BOOT_MAKE_OPT := $(U_BOOT_CONF_OPT)
-$(STATEDIR)/u-boot.prepare:
- @$(call targetinfo)
- cd $(U_BOOT_DIR) && \
- $(U_BOOT_PATH) \
- $(MAKE) $(U_BOOT_MAKE_OPT) $(PTXCONF_U_BOOT_CONFIG)
- @$(call touch)
+ifdef PTXCONF_U_BOOT
+$(U_BOOT_CONFIG):
+ @echo
+ @echo "****************************************************************************"
+ @echo "***** Please generate a u-boot config with 'ptxdist menuconfig u-boot' *****"
+ @echo "****************************************************************************"
+ @echo
+ @echo
+ @exit 1
+endif
+
+
+$(STATEDIR)/u-boot.prepare: $(U_BOOT_CONFIG)
# ----------------------------------------------------------------------------
# Install
@@ -91,4 +103,18 @@ $(STATEDIR)/u-boot.clean:
@rm -f $(IMAGEDIR)/u-boot.bin $(IMAGEDIR)/u-boot.srec $(IMAGEDIR)/u-boot.elf
@rm -f $(IMAGEDIR)/u-boot.imx
+# ----------------------------------------------------------------------------
+# oldconfig / menuconfig
+# ----------------------------------------------------------------------------
+
+u-boot_oldconfig u-boot_menuconfig u-boot_nconfig: $(STATEDIR)/u-boot.extract
+ @$(call world/kconfig-setup, U_BOOT)
+
+ @cd $(U_BOOT_DIR) && \
+ $(U_BOOT_PATH) $(U_BOOT_ENV) $(MAKE) $(U_BOOT_CONF_OPT) \
+ $(subst u-boot_,,$@)
+
+ @$(call world/kconfig-sync, U_BOOT)
+
+
# vim: syntax=make
--
2.19.0
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 22+ messages in thread
* [ptxdist] [PATCH 3/7] u-boot: add V=$(PTXDIST_VERBOSE) to make options
2018-10-10 12:03 [ptxdist] [PATCH 1/7] u-boot: specify GPL-2.0-only as LICENSE Ahmad Fatoum
2018-10-10 12:03 ` [ptxdist] [PATCH 2/7] u-boot: add support for oldconfig/menuconfig Ahmad Fatoum
@ 2018-10-10 12:03 ` Ahmad Fatoum
2018-10-11 6:52 ` Alexander Dahl
2018-10-10 12:03 ` [ptxdist] [PATCH 4/7] u-boot: run install(1)/rm(1) with -v Ahmad Fatoum
` (4 subsequent siblings)
6 siblings, 1 reply; 22+ messages in thread
From: Ahmad Fatoum @ 2018-10-10 12:03 UTC (permalink / raw)
To: ptxdist; +Cc: Ahmad Fatoum
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
rules/u-boot.make | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/rules/u-boot.make b/rules/u-boot.make
index 46cfc192825a..44b242d7ffc1 100644
--- a/rules/u-boot.make
+++ b/rules/u-boot.make
@@ -42,7 +42,10 @@ U_BOOT_WRAPPER_BLACKLIST := \
U_BOOT_CONF_ENV := KCONFIG_NOTIMESTAMP=1
U_BOOT_CONF_TOOL := kconfig
-U_BOOT_CONF_OPT := CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) HOSTCC=$(HOSTCC)
+U_BOOT_CONF_OPT := \
+ V=$(PTXDIST_VERBOSE) \
+ CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) \
+ HOSTCC=$(HOSTCC)
U_BOOT_MAKE_PAR := NO
U_BOOT_TAGS_OPT := ctags cscope etags
U_BOOT_MAKE_OPT := $(U_BOOT_CONF_OPT)
--
2.19.0
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 22+ messages in thread
* [ptxdist] [PATCH 4/7] u-boot: run install(1)/rm(1) with -v
2018-10-10 12:03 [ptxdist] [PATCH 1/7] u-boot: specify GPL-2.0-only as LICENSE Ahmad Fatoum
2018-10-10 12:03 ` [ptxdist] [PATCH 2/7] u-boot: add support for oldconfig/menuconfig Ahmad Fatoum
2018-10-10 12:03 ` [ptxdist] [PATCH 3/7] u-boot: add V=$(PTXDIST_VERBOSE) to make options Ahmad Fatoum
@ 2018-10-10 12:03 ` Ahmad Fatoum
2018-10-10 12:03 ` [ptxdist] [PATCH 5/7] u-boot: add u-boot{-dtb, -with-spl-pbl}.bin image installation options Ahmad Fatoum
` (3 subsequent siblings)
6 siblings, 0 replies; 22+ messages in thread
From: Ahmad Fatoum @ 2018-10-10 12:03 UTC (permalink / raw)
To: ptxdist; +Cc: Ahmad Fatoum
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
rules/u-boot.make | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/rules/u-boot.make b/rules/u-boot.make
index 44b242d7ffc1..24f3fe3983f5 100644
--- a/rules/u-boot.make
+++ b/rules/u-boot.make
@@ -78,21 +78,21 @@ $(STATEDIR)/u-boot.install:
$(STATEDIR)/u-boot.targetinstall:
@$(call targetinfo)
- @install -D -m644 $(U_BOOT_DIR)/u-boot.bin $(IMAGEDIR)/u-boot.bin
+ @install -v -D -m644 $(U_BOOT_DIR)/u-boot.bin $(IMAGEDIR)/u-boot.bin
ifdef PTXCONF_U_BOOT_INSTALL_SREC
- @install -D -m644 $(U_BOOT_DIR)/u-boot.srec $(IMAGEDIR)/u-boot.srec
+ @install -v -D -m644 $(U_BOOT_DIR)/u-boot.srec $(IMAGEDIR)/u-boot.srec
endif
ifdef PTXCONF_U_BOOT_INSTALL_ELF
- @install -D -m644 $(U_BOOT_DIR)/u-boot $(IMAGEDIR)/u-boot.elf
+ @install -v -D -m644 $(U_BOOT_DIR)/u-boot $(IMAGEDIR)/u-boot.elf
endif
ifdef PTXCONF_U_BOOT_INSTALL_MLO
- @install -D -m644 $(U_BOOT_DIR)/MLO $(IMAGEDIR)/MLO
+ @install -v -D -m644 $(U_BOOT_DIR)/MLO $(IMAGEDIR)/MLO
endif
ifdef PTXCONF_U_BOOT_INSTALL_U_BOOT_IMG
- @install -D -m644 $(U_BOOT_DIR)/u-boot.img $(IMAGEDIR)/u-boot.img
+ @install -v -D -m644 $(U_BOOT_DIR)/u-boot.img $(IMAGEDIR)/u-boot.img
endif
ifdef PTXCONF_U_BOOT_INSTALL_U_BOOT_IMX
- @install -D -m644 $(U_BOOT_DIR)/u-boot.imx $(IMAGEDIR)/u-boot.imx
+ @install -v -D -m644 $(U_BOOT_DIR)/u-boot.imx $(IMAGEDIR)/u-boot.imx
endif
@$(call touch)
@@ -103,8 +103,8 @@ endif
$(STATEDIR)/u-boot.clean:
@$(call targetinfo)
@$(call clean_pkg, U_BOOT)
- @rm -f $(IMAGEDIR)/u-boot.bin $(IMAGEDIR)/u-boot.srec $(IMAGEDIR)/u-boot.elf
- @rm -f $(IMAGEDIR)/u-boot.imx
+ @rm -vf $(IMAGEDIR)/u-boot.bin $(IMAGEDIR)/u-boot.srec $(IMAGEDIR)/u-boot.elf
+ @rm -vf $(IMAGEDIR)/u-boot.imx
# ----------------------------------------------------------------------------
# oldconfig / menuconfig
--
2.19.0
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 22+ messages in thread
* [ptxdist] [PATCH 5/7] u-boot: add u-boot{-dtb, -with-spl-pbl}.bin image installation options
2018-10-10 12:03 [ptxdist] [PATCH 1/7] u-boot: specify GPL-2.0-only as LICENSE Ahmad Fatoum
` (2 preceding siblings ...)
2018-10-10 12:03 ` [ptxdist] [PATCH 4/7] u-boot: run install(1)/rm(1) with -v Ahmad Fatoum
@ 2018-10-10 12:03 ` Ahmad Fatoum
2019-02-05 7:30 ` Alexander Dahl
2018-10-10 12:03 ` [ptxdist] [PATCH 6/7] u-boot: allow generation of custom environment binary Ahmad Fatoum
` (2 subsequent siblings)
6 siblings, 1 reply; 22+ messages in thread
From: Ahmad Fatoum @ 2018-10-10 12:03 UTC (permalink / raw)
To: ptxdist; +Cc: Ahmad Fatoum
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
platforms/u-boot.in | 14 ++++++++++++++
rules/u-boot.make | 13 +++++++++++--
2 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/platforms/u-boot.in b/platforms/u-boot.in
index 38684a03a376..bcb78cfc3f5a 100644
--- a/platforms/u-boot.in
+++ b/platforms/u-boot.in
@@ -75,5 +75,19 @@ config U_BOOT_INSTALL_U_BOOT_IMX
Installing the U-Boot image with imx header (u-boot.imx) into platform
image directory. Say yes if you are building for freescale i.MX SOC
+config U_BOOT_INSTALL_U_BOOT_DTB
+ prompt "install u-boot-dtb.bin"
+ bool
+ help
+ Installing the U-Boot binary concatenated with the device tree
+ into platform image directory.
+
+config U_BOOT_INSTALL_U_BOOT_WITH_SPL_PBL
+ prompt "install u-boot-with-spl-pbl.bin"
+ bool
+ help
+ Installing the U-Boot binary which contains as well the SPL and PBL.
+ Say yes if you are building for Layerscape SoCs
+
endif
diff --git a/rules/u-boot.make b/rules/u-boot.make
index 24f3fe3983f5..d9bcdf5ca64d 100644
--- a/rules/u-boot.make
+++ b/rules/u-boot.make
@@ -93,6 +93,14 @@ ifdef PTXCONF_U_BOOT_INSTALL_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
+endif
+ifdef PTXCONF_U_BOOT_INSTALL_U_BOOT_DTB
+ @install -v -D -m644 $(U_BOOT_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 \
+ $(IMAGEDIR)/u-boot-with-spl-pbl.bin
endif
@$(call touch)
@@ -103,8 +111,9 @@ endif
$(STATEDIR)/u-boot.clean:
@$(call targetinfo)
@$(call clean_pkg, U_BOOT)
- @rm -vf $(IMAGEDIR)/u-boot.bin $(IMAGEDIR)/u-boot.srec $(IMAGEDIR)/u-boot.elf
- @rm -vf $(IMAGEDIR)/u-boot.imx
+ @rm -vf $(IMAGEDIR)/u-boot.bin $(IMAGEDIR)/u-boot.srec
+ @rm -vf $(IMAGEDIR)/u-boot.elf $(IMAGEDIR)/u-boot.imx
+ @rm -vf $(IMAGEDIR)/u-boot-dtb.bin $(IMAGEDIR)/u-boot-with-spl-pbl.bin
# ----------------------------------------------------------------------------
# oldconfig / menuconfig
--
2.19.0
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 22+ messages in thread
* [ptxdist] [PATCH 6/7] u-boot: allow generation of custom environment binary
2018-10-10 12:03 [ptxdist] [PATCH 1/7] u-boot: specify GPL-2.0-only as LICENSE Ahmad Fatoum
` (3 preceding siblings ...)
2018-10-10 12:03 ` [ptxdist] [PATCH 5/7] u-boot: add u-boot{-dtb, -with-spl-pbl}.bin image installation options Ahmad Fatoum
@ 2018-10-10 12:03 ` Ahmad Fatoum
2018-10-16 8:13 ` Michael Olbrich
` (2 more replies)
2018-10-10 12:03 ` [ptxdist] [PATCH 7/7] u-boot: allow generation of boot script Ahmad Fatoum
2018-10-11 6:44 ` [ptxdist] [PATCH 1/7] u-boot: specify GPL-2.0-only as LICENSE Alexander Dahl
6 siblings, 3 replies; 22+ messages in thread
From: Ahmad Fatoum @ 2018-10-10 12:03 UTC (permalink / raw)
To: ptxdist; +Cc: Ahmad Fatoum
U-Boot can be configured at compile-time to expect the environment at a
set offset of e.g. the MMC.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
platforms/u-boot.in | 27 +++++++++++++++++++++++++++
rules/u-boot.make | 32 ++++++++++++++++++++++++++++++++
2 files changed, 59 insertions(+)
diff --git a/platforms/u-boot.in b/platforms/u-boot.in
index bcb78cfc3f5a..4e19d09c74f5 100644
--- a/platforms/u-boot.in
+++ b/platforms/u-boot.in
@@ -35,6 +35,33 @@ config U_BOOT_CONFIG
"yourbox_config". See Uboot's main Makefile for possible
configuration targets.
+config U_BOOT_ENV
+ prompt "Generate U-Boot environment binary image"
+ bool
+ help
+ Use U-Boot's mkenvimage to generate an U-Boot environment binary image
+ (uboot-env.bin) out of a text file (uboot-env.txt)
+ with entries of the form:
+ key1=value1
+ key2=value2
+
+if U_BOOT_ENV
+
+config U_BOOT_ENV_IMAGE_SIZE
+ prompt "U-Boot environment image size"
+ string
+ default '0x2000'
+ help
+ The output image size
+
+config U_BOOT_ENV_FLASH_REDUNDANT
+ prompt "Environment has multiple copies in flash"
+ bool
+ help
+ Whether there are multiple copies of the U-Boot environment in flash
+
+endif
+
comment "target install"
config U_BOOT_INSTALL_SREC
diff --git a/rules/u-boot.make b/rules/u-boot.make
index d9bcdf5ca64d..39228dbcaf9c 100644
--- a/rules/u-boot.make
+++ b/rules/u-boot.make
@@ -33,6 +33,16 @@ U_BOOT_CONFIG := $(call ptx/in-platformconfigdir, \
# Prepare
# ----------------------------------------------------------------------------
+U_BOOT_ENV_TXT := $(call ptx/in-platformconfigdir, uboot-env.txt)
+U_BOOT_ENV_BIN := $(IMAGEDIR)/uboot-env.bin
+
+ifdef PTXCONF_ENDIAN_BIG
+ U_BOOT_ENV_FLAGS += -b
+endif
+ifdef PTXCONF_U_BOOT_ENV_FLASH_REDUNDANT
+ U_BOOT_ENV_FLAGS += -r
+endif
+
U_BOOT_WRAPPER_BLACKLIST := \
TARGET_HARDEN_RELRO \
TARGET_HARDEN_BINDNOW \
@@ -64,6 +74,23 @@ endif
$(STATEDIR)/u-boot.prepare: $(U_BOOT_CONFIG)
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/u-boot.compile:
+ @$(call targetinfo)
+ @+cd $(U_BOOT_DIR) && $(U_BOOT_PATH) \
+ $(MAKE) $(U_BOOT_MAKE_OPT)
+ifdef PTXCONF_U_BOOT_ENV
+ @$(U_BOOT_DIR)/tools/mkenvimage \
+ $(U_BOOT_ENV_FLAGS) -s $(PTXCONF_U_BOOT_ENV_IMAGE_SIZE) \
+ -o $(U_BOOT_DIR)/uboot-env.bin \
+ $(U_BOOT_ENV_TXT)
+endif
+ @$(call touch)
+
+
# ----------------------------------------------------------------------------
# Install
# ----------------------------------------------------------------------------
@@ -102,6 +129,10 @@ ifdef PTXCONF_U_BOOT_INSTALL_U_BOOT_WITH_SPL_PBL
@install -v -D -m644 $(U_BOOT_DIR)/u-boot-with-spl-pbl.bin \
$(IMAGEDIR)/u-boot-with-spl-pbl.bin
endif
+
+ifdef PTXCONF_U_BOOT_ENV
+ @install -v -D -m644 $(U_BOOT_DIR)/uboot-env.bin $(U_BOOT_ENV_BIN)
+endif
@$(call touch)
# ----------------------------------------------------------------------------
@@ -114,6 +145,7 @@ $(STATEDIR)/u-boot.clean:
@rm -vf $(IMAGEDIR)/u-boot.bin $(IMAGEDIR)/u-boot.srec
@rm -vf $(IMAGEDIR)/u-boot.elf $(IMAGEDIR)/u-boot.imx
@rm -vf $(IMAGEDIR)/u-boot-dtb.bin $(IMAGEDIR)/u-boot-with-spl-pbl.bin
+ @rm -vf $(U_BOOT_ENV_BIN)
# ----------------------------------------------------------------------------
# oldconfig / menuconfig
--
2.19.0
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 22+ messages in thread
* [ptxdist] [PATCH 7/7] u-boot: allow generation of boot script
2018-10-10 12:03 [ptxdist] [PATCH 1/7] u-boot: specify GPL-2.0-only as LICENSE Ahmad Fatoum
` (4 preceding siblings ...)
2018-10-10 12:03 ` [ptxdist] [PATCH 6/7] u-boot: allow generation of custom environment binary Ahmad Fatoum
@ 2018-10-10 12:03 ` Ahmad Fatoum
2018-10-11 6:44 ` [ptxdist] [PATCH 1/7] u-boot: specify GPL-2.0-only as LICENSE Alexander Dahl
6 siblings, 0 replies; 22+ messages in thread
From: Ahmad Fatoum @ 2018-10-10 12:03 UTC (permalink / raw)
To: ptxdist; +Cc: Ahmad Fatoum
U-Boot can be configured via the environment to look for a boot script
in the rootfs. The boot script can then be used to customize the booting
process further.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
platforms/u-boot.in | 18 ++++++++++++++++++
rules/u-boot.make | 21 +++++++++++++++++++++
2 files changed, 39 insertions(+)
diff --git a/platforms/u-boot.in b/platforms/u-boot.in
index 4e19d09c74f5..12ab139e2391 100644
--- a/platforms/u-boot.in
+++ b/platforms/u-boot.in
@@ -62,6 +62,24 @@ config U_BOOT_ENV_FLASH_REDUNDANT
endif
+config U_BOOT_BOOT_SCRIPT
+ prompt "Compile U-Boot boot script"
+ bool
+ help
+ Use U-Boot's mkimage to compile a U-Boot boot script and install it
+ into the rootfs
+
+if U_BOOT_BOOT_SCRIPT
+
+config U_BOOT_BOOT_SCRIPT_ROOTFS_PATH
+ string
+ default "/boot/uboot.scr"
+ prompt "Installation path"
+ help
+ Target rootfs path where the U-Boot script should be located
+
+endif
+
comment "target install"
config U_BOOT_INSTALL_SREC
diff --git a/rules/u-boot.make b/rules/u-boot.make
index 39228dbcaf9c..2f8c60e1809e 100644
--- a/rules/u-boot.make
+++ b/rules/u-boot.make
@@ -2,6 +2,7 @@
#
# Copyright (C) 2007 by Sascha Hauer
# 2009, 2010 by Marc Kleine-Budde <mkl@pengutronix.de>
+# 2018 by Ahmad Fatoum <a.fatoum@pengutronix.de>
#
# See CREDITS for details about who has contributed to this project.
#
@@ -35,6 +36,9 @@ U_BOOT_CONFIG := $(call ptx/in-platformconfigdir, \
U_BOOT_ENV_TXT := $(call ptx/in-platformconfigdir, uboot-env.txt)
U_BOOT_ENV_BIN := $(IMAGEDIR)/uboot-env.bin
+U_BOOT_BOOT_SCRIPT_TXT := $(call ptx/in-platformconfigdir, uboot.scr)
+U_BOOT_BOOT_SCRIPT_BIN := $(call remove_quotes, \
+ $(PTXCONF_U_BOOT_BOOT_SCRIPT_ROOTFS_PATH))
ifdef PTXCONF_ENDIAN_BIG
U_BOOT_ENV_FLAGS += -b
@@ -87,6 +91,11 @@ ifdef PTXCONF_U_BOOT_ENV
$(U_BOOT_ENV_FLAGS) -s $(PTXCONF_U_BOOT_ENV_IMAGE_SIZE) \
-o $(U_BOOT_DIR)/uboot-env.bin \
$(U_BOOT_ENV_TXT)
+endif
+ifdef PTXCONF_U_BOOT_BOOT_SCRIPT
+ @$(U_BOOT_DIR)/tools/mkimage -T script -C none \
+ -d $(U_BOOT_BOOT_SCRIPT_TXT) \
+ $(U_BOOT_DIR)/uboot.scr
endif
@$(call touch)
@@ -132,6 +141,18 @@ endif
ifdef PTXCONF_U_BOOT_ENV
@install -v -D -m644 $(U_BOOT_DIR)/uboot-env.bin $(U_BOOT_ENV_BIN)
+endif
+ifdef PTXCONF_U_BOOT_BOOT_SCRIPT
+ @$(call install_init, u-boot)
+ @$(call install_fixup, u-boot, PRIORITY, optional)
+ @$(call install_fixup, u-boot, SECTION, base)
+ @$(call install_fixup, u-boot, AUTHOR, "Ahmad Fatoum <afa@pengutronix.de>")
+ @$(call install_fixup, u-boot, DESCRIPTION, "U-Boot boot script")
+
+ @$(call install_copy, u-boot, 0, 0, 0644, \
+ $(U_BOOT_DIR)/uboot.scr, $(U_BOOT_BOOT_SCRIPT_BIN))
+
+ @$(call install_finish, u-boot)
endif
@$(call touch)
--
2.19.0
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [ptxdist] [PATCH 1/7] u-boot: specify GPL-2.0-only as LICENSE
2018-10-10 12:03 [ptxdist] [PATCH 1/7] u-boot: specify GPL-2.0-only as LICENSE Ahmad Fatoum
` (5 preceding siblings ...)
2018-10-10 12:03 ` [ptxdist] [PATCH 7/7] u-boot: allow generation of boot script Ahmad Fatoum
@ 2018-10-11 6:44 ` Alexander Dahl
2018-10-11 9:05 ` Ahmad Fatoum
6 siblings, 1 reply; 22+ messages in thread
From: Alexander Dahl @ 2018-10-11 6:44 UTC (permalink / raw)
To: ptxdist; +Cc: Ahmad Fatoum
Hei hei,
Am Mittwoch, 10. Oktober 2018, 14:03:32 CEST schrieb Ahmad Fatoum:
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> rules/u-boot.make | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/rules/u-boot.make b/rules/u-boot.make
> index 94aa7745809d..aa7a01ca8fea 100644
> --- a/rules/u-boot.make
> +++ b/rules/u-boot.make
> @@ -24,6 +24,7 @@ U_BOOT_SUFFIX := tar.bz2
> U_BOOT_URL := ftp://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_LICENSE := GPL-2.0-only
I'm afraid it's not that simple. See Licenses/README in the U-Boot source
tree. A quick grep for SPDX over the whole U-Boot tree reveals different
licenses for different parts, including but not only:
BSD-2-Clause, BSD-3-Clause, GPL-2.0, GPL-2.0+, LGPL-2.1, …
Greets
Alex
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [ptxdist] [PATCH 3/7] u-boot: add V=$(PTXDIST_VERBOSE) to make options
2018-10-10 12:03 ` [ptxdist] [PATCH 3/7] u-boot: add V=$(PTXDIST_VERBOSE) to make options Ahmad Fatoum
@ 2018-10-11 6:52 ` Alexander Dahl
0 siblings, 0 replies; 22+ messages in thread
From: Alexander Dahl @ 2018-10-11 6:52 UTC (permalink / raw)
To: ptxdist; +Cc: Ahmad Fatoum
Hello,
Am Mittwoch, 10. Oktober 2018, 14:03:34 CEST schrieb Ahmad Fatoum:
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> rules/u-boot.make | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/rules/u-boot.make b/rules/u-boot.make
> index 46cfc192825a..44b242d7ffc1 100644
> --- a/rules/u-boot.make
> +++ b/rules/u-boot.make
> @@ -42,7 +42,10 @@ U_BOOT_WRAPPER_BLACKLIST := \
>
> U_BOOT_CONF_ENV := KCONFIG_NOTIMESTAMP=1
> U_BOOT_CONF_TOOL := kconfig
> -U_BOOT_CONF_OPT := CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE)
> HOSTCC=$(HOSTCC) +U_BOOT_CONF_OPT := \
> + V=$(PTXDIST_VERBOSE) \
> + CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) \
> + HOSTCC=$(HOSTCC)
> U_BOOT_MAKE_PAR := NO
> U_BOOT_TAGS_OPT := ctags cscope etags
> U_BOOT_MAKE_OPT := $(U_BOOT_CONF_OPT)
Reviewed-by: Alexander Dahl <ada@thorsis.com>
Greets
Alex
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [ptxdist] [PATCH 1/7] u-boot: specify GPL-2.0-only as LICENSE
2018-10-11 6:44 ` [ptxdist] [PATCH 1/7] u-boot: specify GPL-2.0-only as LICENSE Alexander Dahl
@ 2018-10-11 9:05 ` Ahmad Fatoum
0 siblings, 0 replies; 22+ messages in thread
From: Ahmad Fatoum @ 2018-10-11 9:05 UTC (permalink / raw)
To: Alexander Dahl, ptxdist
Hello
On 10/11/18 8:44 AM, Alexander Dahl wrote:
>> +U_BOOT_LICENSE := GPL-2.0-only
>
> I'm afraid it's not that simple. See Licenses/README in the U-Boot source
> tree. A quick grep for SPDX over the whole U-Boot tree reveals different
> licenses for different parts, including but not only:
>
> BSD-2-Clause, BSD-3-Clause, GPL-2.0, GPL-2.0+, LGPL-2.1, …
Oh, I based the patch on what's listed at https://www.denx.de/wiki/U-Boot/Licensing
I would leave this patch out then.
Thanks
Ahmad
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [ptxdist] [PATCH 2/7] u-boot: add support for oldconfig/menuconfig
2018-10-10 12:03 ` [ptxdist] [PATCH 2/7] u-boot: add support for oldconfig/menuconfig Ahmad Fatoum
@ 2018-10-16 7:52 ` Michael Olbrich
2018-10-16 8:02 ` Alexander Dahl
2018-10-16 8:25 ` Michael Olbrich
1 sibling, 1 reply; 22+ messages in thread
From: Michael Olbrich @ 2018-10-16 7:52 UTC (permalink / raw)
To: ptxdist; +Cc: Ahmad Fatoum
On Wed, Oct 10, 2018 at 02:03:33PM +0200, Ahmad Fatoum wrote:
> while at it, remove U_BOOT_PATH, because it's PATH=$(CROSS_PATH) already
> by default.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> rules/u-boot.make | 42 ++++++++++++++++++++++++++++++++++--------
> 1 file changed, 34 insertions(+), 8 deletions(-)
>
> diff --git a/rules/u-boot.make b/rules/u-boot.make
> index aa7a01ca8fea..46cfc192825a 100644
> --- a/rules/u-boot.make
> +++ b/rules/u-boot.make
> @@ -26,6 +26,9 @@ U_BOOT_SOURCE := $(SRCDIR)/$(U_BOOT).$(U_BOOT_SUFFIX)
> U_BOOT_DIR := $(BUILDDIR)/$(U_BOOT)
> U_BOOT_LICENSE := GPL-2.0-only
>
> +U_BOOT_CONFIG := $(call ptx/in-platformconfigdir, \
> + $(call remove_quotes, $(PTXCONF_U_BOOT_CONFIG)))
So, I'm pretty sure that the u-boot 'config' was simply a make target in
the past, not a config file.
Has this changed for all target or do we need an option to support both?
> +
> # ----------------------------------------------------------------------------
> # Prepare
> # ----------------------------------------------------------------------------
> @@ -37,17 +40,26 @@ U_BOOT_WRAPPER_BLACKLIST := \
> TARGET_DEBUG \
> TARGET_BUILD_ID
>
> -U_BOOT_PATH := PATH=$(CROSS_PATH)
> -U_BOOT_MAKE_OPT := CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) HOSTCC=$(HOSTCC)
> +U_BOOT_CONF_ENV := KCONFIG_NOTIMESTAMP=1
> +U_BOOT_CONF_TOOL := kconfig
> +U_BOOT_CONF_OPT := CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) HOSTCC=$(HOSTCC)
> U_BOOT_MAKE_PAR := NO
> U_BOOT_TAGS_OPT := ctags cscope etags
> +U_BOOT_MAKE_OPT := $(U_BOOT_CONF_OPT)
>
> -$(STATEDIR)/u-boot.prepare:
> - @$(call targetinfo)
> - cd $(U_BOOT_DIR) && \
> - $(U_BOOT_PATH) \
> - $(MAKE) $(U_BOOT_MAKE_OPT) $(PTXCONF_U_BOOT_CONFIG)
> - @$(call touch)
> +ifdef PTXCONF_U_BOOT
> +$(U_BOOT_CONFIG):
> + @echo
> + @echo "****************************************************************************"
> + @echo "***** Please generate a u-boot config with 'ptxdist menuconfig u-boot' *****"
> + @echo "****************************************************************************"
> + @echo
> + @echo
> + @exit 1
> +endif
> +
> +
> +$(STATEDIR)/u-boot.prepare: $(U_BOOT_CONFIG)
>
> # ----------------------------------------------------------------------------
> # Install
> @@ -91,4 +103,18 @@ $(STATEDIR)/u-boot.clean:
> @rm -f $(IMAGEDIR)/u-boot.bin $(IMAGEDIR)/u-boot.srec $(IMAGEDIR)/u-boot.elf
> @rm -f $(IMAGEDIR)/u-boot.imx
>
> +# ----------------------------------------------------------------------------
> +# oldconfig / menuconfig
> +# ----------------------------------------------------------------------------
> +
> +u-boot_oldconfig u-boot_menuconfig u-boot_nconfig: $(STATEDIR)/u-boot.extract
> + @$(call world/kconfig-setup, U_BOOT)
> +
> + @cd $(U_BOOT_DIR) && \
> + $(U_BOOT_PATH) $(U_BOOT_ENV) $(MAKE) $(U_BOOT_CONF_OPT) \
> + $(subst u-boot_,,$@)
> +
> + @$(call world/kconfig-sync, U_BOOT)
I think world/kconfig should be possible here (see kernel/barebox templates
for an example).
This open coded version is only needed if _MAKEVARS is used.
Michael
> +
> +
> # vim: syntax=make
> --
> 2.19.0
>
>
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [ptxdist] [PATCH 2/7] u-boot: add support for oldconfig/menuconfig
2018-10-16 7:52 ` Michael Olbrich
@ 2018-10-16 8:02 ` Alexander Dahl
0 siblings, 0 replies; 22+ messages in thread
From: Alexander Dahl @ 2018-10-16 8:02 UTC (permalink / raw)
To: ptxdist; +Cc: Michael Olbrich, Ahmad Fatoum
Hei hei,
Am Dienstag, 16. Oktober 2018, 09:52:55 CEST schrieb Michael Olbrich:
> On Wed, Oct 10, 2018 at 02:03:33PM +0200, Ahmad Fatoum wrote:
> > while at it, remove U_BOOT_PATH, because it's PATH=$(CROSS_PATH) already
> > by default.
> >
> > Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> > ---
> >
> > rules/u-boot.make | 42 ++++++++++++++++++++++++++++++++++--------
> > 1 file changed, 34 insertions(+), 8 deletions(-)
> >
> > diff --git a/rules/u-boot.make b/rules/u-boot.make
> > index aa7a01ca8fea..46cfc192825a 100644
> > --- a/rules/u-boot.make
> > +++ b/rules/u-boot.make
> > @@ -26,6 +26,9 @@ U_BOOT_SOURCE := $(SRCDIR)/$(U_BOOT).$(U_BOOT_SUFFIX)
> >
> > U_BOOT_DIR := $(BUILDDIR)/$(U_BOOT)
> > U_BOOT_LICENSE := GPL-2.0-only
> >
> > +U_BOOT_CONFIG := $(call ptx/in-platformconfigdir, \
> > + $(call remove_quotes, $(PTXCONF_U_BOOT_CONFIG)))
>
> So, I'm pretty sure that the u-boot 'config' was simply a make target in
> the past, not a config file.
> Has this changed for all target or do we need an option to support both?
You may need both. U-Boot has started introducing KConfig some time ago and is
in the (long) process of migrating all options to it. What you provide as make
target to recent U-Boot versions is actually a KConfig defconfig which
overwrites your .config and which is somehow magically merged with
preprocessor defines in includes/configs/yourboardname.h until the migration
process is done. (Correct me, if I understood that wrong.)
What I currently do is on a u-boot clone apart from ptxdist: menuconfig, then
savedefconfig, copy that over, commit in my u-boot tree, export patches and
use it as a defconfig make target in ptxdist.
Greets
Alex
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [ptxdist] [PATCH 6/7] u-boot: allow generation of custom environment binary
2018-10-10 12:03 ` [ptxdist] [PATCH 6/7] u-boot: allow generation of custom environment binary Ahmad Fatoum
@ 2018-10-16 8:13 ` Michael Olbrich
2018-10-16 10:58 ` Denis OSTERLAND
2018-10-16 11:20 ` Alexander Dahl
2 siblings, 0 replies; 22+ messages in thread
From: Michael Olbrich @ 2018-10-16 8:13 UTC (permalink / raw)
To: ptxdist
On Wed, Oct 10, 2018 at 02:03:37PM +0200, Ahmad Fatoum wrote:
> U-Boot can be configured at compile-time to expect the environment at a
> set offset of e.g. the MMC.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> platforms/u-boot.in | 27 +++++++++++++++++++++++++++
> rules/u-boot.make | 32 ++++++++++++++++++++++++++++++++
> 2 files changed, 59 insertions(+)
>
> diff --git a/platforms/u-boot.in b/platforms/u-boot.in
> index bcb78cfc3f5a..4e19d09c74f5 100644
> --- a/platforms/u-boot.in
> +++ b/platforms/u-boot.in
> @@ -35,6 +35,33 @@ config U_BOOT_CONFIG
> "yourbox_config". See Uboot's main Makefile for possible
> configuration targets.
>
> +config U_BOOT_ENV
> + prompt "Generate U-Boot environment binary image"
> + bool
> + help
> + Use U-Boot's mkenvimage to generate an U-Boot environment binary image
> + (uboot-env.bin) out of a text file (uboot-env.txt)
> + with entries of the form:
> + key1=value1
> + key2=value2
> +
> +if U_BOOT_ENV
> +
> +config U_BOOT_ENV_IMAGE_SIZE
> + prompt "U-Boot environment image size"
> + string
> + default '0x2000'
int
default 8192
This way, the value is always valid.
> + help
> + The output image size
"... in bytes" or whatever the size unit is.
> +
> +config U_BOOT_ENV_FLASH_REDUNDANT
> + prompt "Environment has multiple copies in flash"
> + bool
> + help
> + Whether there are multiple copies of the U-Boot environment in flash
> +
> +endif
> +
> comment "target install"
>
> config U_BOOT_INSTALL_SREC
> diff --git a/rules/u-boot.make b/rules/u-boot.make
> index d9bcdf5ca64d..39228dbcaf9c 100644
> --- a/rules/u-boot.make
> +++ b/rules/u-boot.make
> @@ -33,6 +33,16 @@ U_BOOT_CONFIG := $(call ptx/in-platformconfigdir, \
> # Prepare
> # ----------------------------------------------------------------------------
>
> +U_BOOT_ENV_TXT := $(call ptx/in-platformconfigdir, uboot-env.txt)
> +U_BOOT_ENV_BIN := $(IMAGEDIR)/uboot-env.bin
> +
> +ifdef PTXCONF_ENDIAN_BIG
> + U_BOOT_ENV_FLAGS += -b
> +endif
> +ifdef PTXCONF_U_BOOT_ENV_FLASH_REDUNDANT
> + U_BOOT_ENV_FLAGS += -r
> +endif
U_BOOT_ENV_FLAGS := \
$(call ptx/ifdef, PTXCONF_ENDIAN_BIG,-b) \
...
Michael
> +
> U_BOOT_WRAPPER_BLACKLIST := \
> TARGET_HARDEN_RELRO \
> TARGET_HARDEN_BINDNOW \
> @@ -64,6 +74,23 @@ endif
>
> $(STATEDIR)/u-boot.prepare: $(U_BOOT_CONFIG)
>
> +# ----------------------------------------------------------------------------
> +# Compile
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/u-boot.compile:
> + @$(call targetinfo)
> + @+cd $(U_BOOT_DIR) && $(U_BOOT_PATH) \
> + $(MAKE) $(U_BOOT_MAKE_OPT)
> +ifdef PTXCONF_U_BOOT_ENV
> + @$(U_BOOT_DIR)/tools/mkenvimage \
> + $(U_BOOT_ENV_FLAGS) -s $(PTXCONF_U_BOOT_ENV_IMAGE_SIZE) \
> + -o $(U_BOOT_DIR)/uboot-env.bin \
> + $(U_BOOT_ENV_TXT)
> +endif
> + @$(call touch)
> +
> +
> # ----------------------------------------------------------------------------
> # Install
> # ----------------------------------------------------------------------------
> @@ -102,6 +129,10 @@ ifdef PTXCONF_U_BOOT_INSTALL_U_BOOT_WITH_SPL_PBL
> @install -v -D -m644 $(U_BOOT_DIR)/u-boot-with-spl-pbl.bin \
> $(IMAGEDIR)/u-boot-with-spl-pbl.bin
> endif
> +
> +ifdef PTXCONF_U_BOOT_ENV
> + @install -v -D -m644 $(U_BOOT_DIR)/uboot-env.bin $(U_BOOT_ENV_BIN)
> +endif
> @$(call touch)
>
> # ----------------------------------------------------------------------------
> @@ -114,6 +145,7 @@ $(STATEDIR)/u-boot.clean:
> @rm -vf $(IMAGEDIR)/u-boot.bin $(IMAGEDIR)/u-boot.srec
> @rm -vf $(IMAGEDIR)/u-boot.elf $(IMAGEDIR)/u-boot.imx
> @rm -vf $(IMAGEDIR)/u-boot-dtb.bin $(IMAGEDIR)/u-boot-with-spl-pbl.bin
> + @rm -vf $(U_BOOT_ENV_BIN)
>
> # ----------------------------------------------------------------------------
> # oldconfig / menuconfig
> --
> 2.19.0
>
>
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [ptxdist] [PATCH 2/7] u-boot: add support for oldconfig/menuconfig
2018-10-10 12:03 ` [ptxdist] [PATCH 2/7] u-boot: add support for oldconfig/menuconfig Ahmad Fatoum
2018-10-16 7:52 ` Michael Olbrich
@ 2018-10-16 8:25 ` Michael Olbrich
1 sibling, 0 replies; 22+ messages in thread
From: Michael Olbrich @ 2018-10-16 8:25 UTC (permalink / raw)
To: ptxdist
Hi,
So it looks like we'll need to support the old mechanism as well.
Add a option 'EXTERNAL_CONFIG' to enable the config file.
On Wed, Oct 10, 2018 at 02:03:33PM +0200, Ahmad Fatoum wrote:
> while at it, remove U_BOOT_PATH, because it's PATH=$(CROSS_PATH) already
> by default.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> rules/u-boot.make | 42 ++++++++++++++++++++++++++++++++++--------
> 1 file changed, 34 insertions(+), 8 deletions(-)
>
> diff --git a/rules/u-boot.make b/rules/u-boot.make
> index aa7a01ca8fea..46cfc192825a 100644
> --- a/rules/u-boot.make
> +++ b/rules/u-boot.make
> @@ -26,6 +26,9 @@ U_BOOT_SOURCE := $(SRCDIR)/$(U_BOOT).$(U_BOOT_SUFFIX)
> U_BOOT_DIR := $(BUILDDIR)/$(U_BOOT)
> U_BOOT_LICENSE := GPL-2.0-only
>
ifdef PTXCONF_EXTERNAL_CONFIG
> +U_BOOT_CONFIG := $(call ptx/in-platformconfigdir, \
> + $(call remove_quotes, $(PTXCONF_U_BOOT_CONFIG)))
> +
> # ----------------------------------------------------------------------------
> # Prepare
> # ----------------------------------------------------------------------------
> @@ -37,17 +40,26 @@ U_BOOT_WRAPPER_BLACKLIST := \
> TARGET_DEBUG \
> TARGET_BUILD_ID
>
> -U_BOOT_PATH := PATH=$(CROSS_PATH)
> -U_BOOT_MAKE_OPT := CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) HOSTCC=$(HOSTCC)
> +U_BOOT_CONF_ENV := KCONFIG_NOTIMESTAMP=1
> +U_BOOT_CONF_TOOL := kconfig
> +U_BOOT_CONF_OPT := CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) HOSTCC=$(HOSTCC)
> U_BOOT_MAKE_PAR := NO
> U_BOOT_TAGS_OPT := ctags cscope etags
> +U_BOOT_MAKE_OPT := $(U_BOOT_CONF_OPT)
>
> -$(STATEDIR)/u-boot.prepare:
> - @$(call targetinfo)
ifdef PTXCONF_EXTERNAL_CONFIG
@$(call world/prepare, U_BOOT)
else
... the old stuff
endif
> - cd $(U_BOOT_DIR) && \
> - $(U_BOOT_PATH) \
> - $(MAKE) $(U_BOOT_MAKE_OPT) $(PTXCONF_U_BOOT_CONFIG)
> - @$(call touch)
> +ifdef PTXCONF_U_BOOT
> +$(U_BOOT_CONFIG):
> + @echo
> + @echo "****************************************************************************"
> + @echo "***** Please generate a u-boot config with 'ptxdist menuconfig u-boot' *****"
> + @echo "****************************************************************************"
> + @echo
> + @echo
> + @exit 1
> +endif
> +
> +
> +$(STATEDIR)/u-boot.prepare: $(U_BOOT_CONFIG)
This is no longer needed. PTXdist creates this dependency implicitly.
Michael
>
> # ----------------------------------------------------------------------------
> # Install
> @@ -91,4 +103,18 @@ $(STATEDIR)/u-boot.clean:
> @rm -f $(IMAGEDIR)/u-boot.bin $(IMAGEDIR)/u-boot.srec $(IMAGEDIR)/u-boot.elf
> @rm -f $(IMAGEDIR)/u-boot.imx
>
> +# ----------------------------------------------------------------------------
> +# oldconfig / menuconfig
> +# ----------------------------------------------------------------------------
> +
> +u-boot_oldconfig u-boot_menuconfig u-boot_nconfig: $(STATEDIR)/u-boot.extract
> + @$(call world/kconfig-setup, U_BOOT)
> +
> + @cd $(U_BOOT_DIR) && \
> + $(U_BOOT_PATH) $(U_BOOT_ENV) $(MAKE) $(U_BOOT_CONF_OPT) \
> + $(subst u-boot_,,$@)
> +
> + @$(call world/kconfig-sync, U_BOOT)
> +
> +
> # vim: syntax=make
> --
> 2.19.0
>
>
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [ptxdist] [PATCH 6/7] u-boot: allow generation of custom environment binary
2018-10-10 12:03 ` [ptxdist] [PATCH 6/7] u-boot: allow generation of custom environment binary Ahmad Fatoum
2018-10-16 8:13 ` Michael Olbrich
@ 2018-10-16 10:58 ` Denis OSTERLAND
2018-10-16 11:27 ` Alexander Dahl
2018-10-16 11:20 ` Alexander Dahl
2 siblings, 1 reply; 22+ messages in thread
From: Denis OSTERLAND @ 2018-10-16 10:58 UTC (permalink / raw)
To: ptxdist
Hi Ahmad,
Am Mittwoch, den 10.10.2018, 14:03 +0200 schrieb Ahmad Fatoum:
> U-Boot can be configured at compile-time to expect the environment at a
> set offset of e.g. the MMC.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> platforms/u-boot.in | 27 +++++++++++++++++++++++++++
> rules/u-boot.make | 32 ++++++++++++++++++++++++++++++++
> 2 files changed, 59 insertions(+)
>
> diff --git a/platforms/u-boot.in b/platforms/u-boot.in
> index bcb78cfc3f5a..4e19d09c74f5 100644
> --- a/platforms/u-boot.in
> +++ b/platforms/u-boot.in
> @@ -35,6 +35,33 @@ config U_BOOT_CONFIG
> "yourbox_config". See Uboot's main Makefile for possible
> configuration targets.
>
> +config U_BOOT_ENV
> + prompt "Generate U-Boot environment binary image"
> + bool
> + help
> + Use U-Boot's mkenvimage to generate an U-Boot environment binary image
> + (uboot-env.bin) out of a text file (uboot-env.txt)
> + with entries of the form:
> + key1=value1
> + key2=value2
> +
> +if U_BOOT_ENV
> +
> +config U_BOOT_ENV_IMAGE_SIZE
> + prompt "U-Boot environment image size"
> + string
> + default '0x2000'
> + help
> + The output image size
> +
> +config U_BOOT_ENV_FLASH_REDUNDANT
> + prompt "Environment has multiple copies in flash"
> + bool
> + help
> + Whether there are multiple copies of the U-Boot environment in flash
> +
> +endif
> +
> comment "target install"
>
> config U_BOOT_INSTALL_SREC
> diff --git a/rules/u-boot.make b/rules/u-boot.make
> index d9bcdf5ca64d..39228dbcaf9c 100644
> --- a/rules/u-boot.make
> +++ b/rules/u-boot.make
> @@ -33,6 +33,16 @@ U_BOOT_CONFIG := $(call ptx/in-platformconfigdir, \
> # Prepare
> # ----------------------------------------------------------------------------
>
> +U_BOOT_ENV_TXT := $(call ptx/in-platformconfigdir, uboot-env.txt)
> +U_BOOT_ENV_BIN := $(IMAGEDIR)/uboot-env.bin
> +
> +ifdef PTXCONF_ENDIAN_BIG
> + U_BOOT_ENV_FLAGS += -b
> +endif
> +ifdef PTXCONF_U_BOOT_ENV_FLASH_REDUNDANT
> + U_BOOT_ENV_FLAGS += -r
> +endif
> +
> U_BOOT_WRAPPER_BLACKLIST := \
> TARGET_HARDEN_RELRO \
> TARGET_HARDEN_BINDNOW \
> @@ -64,6 +74,23 @@ endif
>
> $(STATEDIR)/u-boot.prepare: $(U_BOOT_CONFIG)
>
> +# ----------------------------------------------------------------------------
> +# Compile
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/u-boot.compile:
> + @$(call targetinfo)
> + @+cd $(U_BOOT_DIR) && $(U_BOOT_PATH) \
> + $(MAKE) $(U_BOOT_MAKE_OPT)
I would prefer @$(call world/compile, U_BOOT) here.
> +ifdef PTXCONF_U_BOOT_ENV
> + @$(U_BOOT_DIR)/tools/mkenvimage \
> + $(U_BOOT_ENV_FLAGS) -s $(PTXCONF_U_BOOT_ENV_IMAGE_SIZE) \
> + -o $(U_BOOT_DIR)/uboot-env.bin \
> + $(U_BOOT_ENV_TXT)
> +endif
We had a similar case, but end up with an image of compiled in env, using get_default_envs script.
We didn´t had the time to clean it up.
--- a/rules/u-boot.make
+++ b/rules/u-boot.make
@@ -41,6 +41,19 @@ $(STATEDIR)/u-boot.prepare:
$(MAKE) $(U_BOOT_MAKE_OPT) $(PTXCONF_U_BOOT_CONFIG)
@$(call touch)
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/u-boot.compile:
+ @$(call targetinfo)
+ @$(call world/compile, U_BOOT)
+ cd $(U_BOOT_DIR) && \
+ $(U_BOOT_MAKE_OPT) \
+ $(U_BOOT_DIR)/scripts/get_default_envs.sh \
+ | $(U_BOOT_DIR)/tools/mkenvimage -s 262144 -r -o u-boot_env.bin -
+ @$(call touch)
+
# ----------------------------------------------------------------------------
# Install
# ----------------------------------------------------------------------------
> + @$(call touch)
> +
> +
> # ----------------------------------------------------------------------------
> # Install
> # ----------------------------------------------------------------------------
> @@ -102,6 +129,10 @@ ifdef PTXCONF_U_BOOT_INSTALL_U_BOOT_WITH_SPL_PBL
> @install -v -D -m644 $(U_BOOT_DIR)/u-boot-with-spl-pbl.bin \
> $(IMAGEDIR)/u-boot-with-spl-pbl.bin
> endif
> +
> +ifdef PTXCONF_U_BOOT_ENV
> + @install -v -D -m644 $(U_BOOT_DIR)/uboot-env.bin $(U_BOOT_ENV_BIN)
> +endif
> @$(call touch)
>
> # ----------------------------------------------------------------------------
> @@ -114,6 +145,7 @@ $(STATEDIR)/u-boot.clean:
> @rm -vf $(IMAGEDIR)/u-boot.bin $(IMAGEDIR)/u-boot.srec
> @rm -vf $(IMAGEDIR)/u-boot.elf $(IMAGEDIR)/u-boot.imx
> @rm -vf $(IMAGEDIR)/u-boot-dtb.bin $(IMAGEDIR)/u-boot-with-spl-pbl.bin
> + @rm -vf $(U_BOOT_ENV_BIN)
>
> # ----------------------------------------------------------------------------
> # oldconfig / menuconfig
Diehl Connectivity Solutions GmbH
Geschäftsführung: Horst Leonberger
Sitz der Gesellschaft: Nürnberg - Registergericht: Amtsgericht
Nürnberg: HRB 32315
___________________________________________________________________________________________________
Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten haben. Bitte loeschen Sie in diesem Fall die Nachricht.
Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung und/oder Publikation dieser E-Mail ist strengstens untersagt.
The contents of the above mentioned e-mail is not legally binding. This e-mail contains confidential and/or legally protected information. Please inform us if you have received this e-mail by
mistake and delete it in such a case. Each unauthorized reproduction, disclosure, alteration, distribution and/or publication of this e-mail is strictly prohibited.
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [ptxdist] [PATCH 6/7] u-boot: allow generation of custom environment binary
2018-10-10 12:03 ` [ptxdist] [PATCH 6/7] u-boot: allow generation of custom environment binary Ahmad Fatoum
2018-10-16 8:13 ` Michael Olbrich
2018-10-16 10:58 ` Denis OSTERLAND
@ 2018-10-16 11:20 ` Alexander Dahl
2 siblings, 0 replies; 22+ messages in thread
From: Alexander Dahl @ 2018-10-16 11:20 UTC (permalink / raw)
To: ptxdist; +Cc: Ahmad Fatoum
Hello,
Am Mittwoch, 10. Oktober 2018, 14:03:37 CEST schrieb Ahmad Fatoum:
> U-Boot can be configured at compile-time to expect the environment at a
> set offset of e.g. the MMC.
This does not describe what the patch adds. You generate a binary image and
extend ptxdist to do that at compile time. That image may be used to populate
some flash memory then.
Greets
Alex
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [ptxdist] [PATCH 6/7] u-boot: allow generation of custom environment binary
2018-10-16 10:58 ` Denis OSTERLAND
@ 2018-10-16 11:27 ` Alexander Dahl
2018-10-16 12:26 ` Michael Olbrich
0 siblings, 1 reply; 22+ messages in thread
From: Alexander Dahl @ 2018-10-16 11:27 UTC (permalink / raw)
To: ptxdist; +Cc: Denis OSTERLAND, Ahmad Fatoum
Hei hei,
Am Dienstag, 16. Oktober 2018, 10:58:50 CEST schrieb Denis OSTERLAND:
> Am Mittwoch, den 10.10.2018, 14:03 +0200 schrieb Ahmad Fatoum:
> > +ifdef PTXCONF_U_BOOT_ENV
> > + @$(U_BOOT_DIR)/tools/mkenvimage \
> > + $(U_BOOT_ENV_FLAGS) -s $(PTXCONF_U_BOOT_ENV_IMAGE_SIZE) \
> > + -o $(U_BOOT_DIR)/uboot-env.bin \
> > + $(U_BOOT_ENV_TXT)
> > +endif
>
> We had a similar case, but end up with an image of compiled in env, using
> get_default_envs script.
> We didn´t had the time to clean it up.
Same usecase here, but …
What I did was creating a new platform image rule depending on
HOST_U_BOOT_TOOLS. Creating an U-Boot environment image file is independent
from building U-Boot itself and it creates an artefact I would consider an
image. I'm not happy seeing this feature inside the U-Boot target package
itself.
The reason I didn't share my rules/image-ubootenv.make and platforms/image-
ubootenv.in was setting lots of custom options through the menu by replacing
placeholders, which makes that approach a little more complex than just
creating such an image from a static file.
If anyone is interested though, I could share.
Greets
Alex
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [ptxdist] [PATCH 6/7] u-boot: allow generation of custom environment binary
2018-10-16 11:27 ` Alexander Dahl
@ 2018-10-16 12:26 ` Michael Olbrich
2018-10-16 13:13 ` Alexander Dahl
2019-04-04 14:17 ` Alexander Dahl
0 siblings, 2 replies; 22+ messages in thread
From: Michael Olbrich @ 2018-10-16 12:26 UTC (permalink / raw)
To: ptxdist
On Tue, Oct 16, 2018 at 01:27:13PM +0200, Alexander Dahl wrote:
> Am Dienstag, 16. Oktober 2018, 10:58:50 CEST schrieb Denis OSTERLAND:
> > Am Mittwoch, den 10.10.2018, 14:03 +0200 schrieb Ahmad Fatoum:
> > > +ifdef PTXCONF_U_BOOT_ENV
> > > + @$(U_BOOT_DIR)/tools/mkenvimage \
> > > + $(U_BOOT_ENV_FLAGS) -s $(PTXCONF_U_BOOT_ENV_IMAGE_SIZE) \
> > > + -o $(U_BOOT_DIR)/uboot-env.bin \
> > > + $(U_BOOT_ENV_TXT)
> > > +endif
> >
> > We had a similar case, but end up with an image of compiled in env, using
> > get_default_envs script.
> > We didn´t had the time to clean it up.
>
> Same usecase here, but …
>
> What I did was creating a new platform image rule depending on
> HOST_U_BOOT_TOOLS. Creating an U-Boot environment image file is independent
> from building U-Boot itself and it creates an artefact I would consider an
> image. I'm not happy seeing this feature inside the U-Boot target package
> itself.
Ahmad had a separate package originally but I told him to integrate it...
It seemed more natural to me. Maybe because the environment is more
integrated in barebox and that's what I usually use.
But I'm not too set on it either way.
> The reason I didn't share my rules/image-ubootenv.make and platforms/image-
> ubootenv.in was setting lots of custom options through the menu by replacing
> placeholders, which makes that approach a little more complex than just
> creating such an image from a static file.
>
> If anyone is interested though, I could share.
Hmm, we could use ptxd_replace_magic() in general and source the config
files for this. Then a BSP could overwrite just the menu file and add some
options. Would that match your use-case?
What about the script (patch 7/7)? Do you think that should be a separate
package too?
Michael
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [ptxdist] [PATCH 6/7] u-boot: allow generation of custom environment binary
2018-10-16 12:26 ` Michael Olbrich
@ 2018-10-16 13:13 ` Alexander Dahl
2019-04-04 14:17 ` Alexander Dahl
1 sibling, 0 replies; 22+ messages in thread
From: Alexander Dahl @ 2018-10-16 13:13 UTC (permalink / raw)
To: ptxdist
Hello,
Am Dienstag, 16. Oktober 2018, 14:26:10 CEST schrieb Michael Olbrich:
> On Tue, Oct 16, 2018 at 01:27:13PM +0200, Alexander Dahl wrote:
> > Am Dienstag, 16. Oktober 2018, 10:58:50 CEST schrieb Denis OSTERLAND:
> > > Am Mittwoch, den 10.10.2018, 14:03 +0200 schrieb Ahmad Fatoum:
> > > > +ifdef PTXCONF_U_BOOT_ENV
> > > > + @$(U_BOOT_DIR)/tools/mkenvimage \
> > > > + $(U_BOOT_ENV_FLAGS) -s $(PTXCONF_U_BOOT_ENV_IMAGE_SIZE) \
> > > > + -o $(U_BOOT_DIR)/uboot-env.bin \
> > > > + $(U_BOOT_ENV_TXT)
> > > > +endif
> > >
> > > We had a similar case, but end up with an image of compiled in env,
> > > using
> > > get_default_envs script.
> > > We didn´t had the time to clean it up.
> >
> > Same usecase here, but …
> >
> > What I did was creating a new platform image rule depending on
> > HOST_U_BOOT_TOOLS. Creating an U-Boot environment image file is
> > independent
> > from building U-Boot itself and it creates an artefact I would consider an
> > image. I'm not happy seeing this feature inside the U-Boot target package
> > itself.
>
> Ahmad had a separate package originally but I told him to integrate it...
> It seemed more natural to me. Maybe because the environment is more
> integrated in barebox and that's what I usually use.
> But I'm not too set on it either way.
Well, if I understood correctly from just looking at the current rules in
master, the barebox package builds its environment in the compile stage. I
guess it does not make much sense to build a barebox env and not barebox or an
u-boot env without booting u-boot, so I can understand why one would want to
integrate it into that package. Bootloader and kernel image itself are also
put to IMAGEDIR from "normal" packages, not image packages, right?
> > The reason I didn't share my rules/image-ubootenv.make and
> > platforms/image-
> > ubootenv.in was setting lots of custom options through the menu by
> > replacing placeholders, which makes that approach a little more complex
> > than just creating such an image from a static file.
> >
> > If anyone is interested though, I could share.
>
> Hmm, we could use ptxd_replace_magic() in general and source the config
> files for this. Then a BSP could overwrite just the menu file and add some
> options. Would that match your use-case?
I didn't know about ptxd_replace_magic() before, but it seems to do exactly
what I achieved with calls to sed in my rules/image-ubootenv.make … so from a
quick glance I would say yes, it could match my use-case.
> What about the script (patch 7/7)? Do you think that should be a separate
> package too?
I did not yet use U-Boot scripts that way before (but maybe will do soon), but
the same reasoning applies as above. Maybe it's better to have it all in one
place in the U-Boot package.
Greets
Alex
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [ptxdist] [PATCH 5/7] u-boot: add u-boot{-dtb, -with-spl-pbl}.bin image installation options
2018-10-10 12:03 ` [ptxdist] [PATCH 5/7] u-boot: add u-boot{-dtb, -with-spl-pbl}.bin image installation options Ahmad Fatoum
@ 2019-02-05 7:30 ` Alexander Dahl
2019-02-05 9:29 ` Ahmad Fatoum
0 siblings, 1 reply; 22+ messages in thread
From: Alexander Dahl @ 2019-02-05 7:30 UTC (permalink / raw)
To: ptxdist; +Cc: Ahmad Fatoum
Hei hei,
I had another look at this series, because I'm currently building u-boot for a
new target. This patch looks good I think (see below).
However, what is the status of this whole series? Will there be a v2?
Am Mittwoch, 10. Oktober 2018, 14:03:36 CET schrieb Ahmad Fatoum:
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> platforms/u-boot.in | 14 ++++++++++++++
> rules/u-boot.make | 13 +++++++++++--
> 2 files changed, 25 insertions(+), 2 deletions(-)
>
> diff --git a/platforms/u-boot.in b/platforms/u-boot.in
> index 38684a03a376..bcb78cfc3f5a 100644
> --- a/platforms/u-boot.in
> +++ b/platforms/u-boot.in
> @@ -75,5 +75,19 @@ config U_BOOT_INSTALL_U_BOOT_IMX
> Installing the U-Boot image with imx header (u-boot.imx) into platform
> image directory. Say yes if you are building for freescale i.MX SOC
>
> +config U_BOOT_INSTALL_U_BOOT_DTB
> + prompt "install u-boot-dtb.bin"
> + bool
> + help
> + Installing the U-Boot binary concatenated with the device tree
> + into platform image directory.
> +
> +config U_BOOT_INSTALL_U_BOOT_WITH_SPL_PBL
> + prompt "install u-boot-with-spl-pbl.bin"
> + bool
> + help
> + Installing the U-Boot binary which contains as well the SPL and PBL.
> + Say yes if you are building for Layerscape SoCs
> +
> endif
>
> diff --git a/rules/u-boot.make b/rules/u-boot.make
> index 24f3fe3983f5..d9bcdf5ca64d 100644
> --- a/rules/u-boot.make
> +++ b/rules/u-boot.make
> @@ -93,6 +93,14 @@ ifdef PTXCONF_U_BOOT_INSTALL_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
> +endif
> +ifdef PTXCONF_U_BOOT_INSTALL_U_BOOT_DTB
> + @install -v -D -m644 $(U_BOOT_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 \
> + $(IMAGEDIR)/u-boot-with-spl-pbl.bin
> endif
> @$(call touch)
>
> @@ -103,8 +111,9 @@ endif
> $(STATEDIR)/u-boot.clean:
> @$(call targetinfo)
> @$(call clean_pkg, U_BOOT)
> - @rm -vf $(IMAGEDIR)/u-boot.bin $(IMAGEDIR)/u-boot.srec
> $(IMAGEDIR)/u-boot.elf - @rm -vf $(IMAGEDIR)/u-boot.imx
> + @rm -vf $(IMAGEDIR)/u-boot.bin $(IMAGEDIR)/u-boot.srec
> + @rm -vf $(IMAGEDIR)/u-boot.elf $(IMAGEDIR)/u-boot.imx
> + @rm -vf $(IMAGEDIR)/u-boot-dtb.bin $(IMAGEDIR)/u-boot-with-spl-pbl.bin
>
> #
> ---------------------------------------------------------------------------
> - # oldconfig / menuconfig
The "u-boot-dtb.bin" and clean parts look fine.
However, in upstream u-boot 2019.01 I could not find a defconfig which
actually creates a file "u-boot-with-spl-pbl.bin" although there seems to be a
make target for that. Could you name a defconfig for testing?
Greets
Alex
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [ptxdist] [PATCH 5/7] u-boot: add u-boot{-dtb, -with-spl-pbl}.bin image installation options
2019-02-05 7:30 ` Alexander Dahl
@ 2019-02-05 9:29 ` Ahmad Fatoum
0 siblings, 0 replies; 22+ messages in thread
From: Ahmad Fatoum @ 2019-02-05 9:29 UTC (permalink / raw)
To: Alexander Dahl, ptxdist
Hello Alexander,
On 2/5/19 8:30 AM, Alexander Dahl wrote:
> Hei hei,
>
> I had another look at this series, because I'm currently building u-boot for a
> new target. This patch looks good I think (see below).
>
> However, what is the status of this whole series? Will there be a v2?
No v2 planned, because I don't need this anymore..
Feel free to adopt the patches you need and formulate a v2 however!
>
> Am Mittwoch, 10. Oktober 2018, 14:03:36 CET schrieb Ahmad Fatoum:
>> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
>> ---
>> platforms/u-boot.in | 14 ++++++++++++++
>> rules/u-boot.make | 13 +++++++++++--
>> 2 files changed, 25 insertions(+), 2 deletions(-)
>>
>> diff --git a/platforms/u-boot.in b/platforms/u-boot.in
>> index 38684a03a376..bcb78cfc3f5a 100644
>> --- a/platforms/u-boot.in
>> +++ b/platforms/u-boot.in
>> @@ -75,5 +75,19 @@ config U_BOOT_INSTALL_U_BOOT_IMX
>> Installing the U-Boot image with imx header (u-boot.imx) into platform
>> image directory. Say yes if you are building for freescale i.MX SOC
>>
>> +config U_BOOT_INSTALL_U_BOOT_DTB
>> + prompt "install u-boot-dtb.bin"
>> + bool
>> + help
>> + Installing the U-Boot binary concatenated with the device tree
>> + into platform image directory.
>> +
>> +config U_BOOT_INSTALL_U_BOOT_WITH_SPL_PBL
>> + prompt "install u-boot-with-spl-pbl.bin"
>> + bool
>> + help
>> + Installing the U-Boot binary which contains as well the SPL and PBL.
>> + Say yes if you are building for Layerscape SoCs
>> +
>> endif
>>
>> diff --git a/rules/u-boot.make b/rules/u-boot.make
>> index 24f3fe3983f5..d9bcdf5ca64d 100644
>> --- a/rules/u-boot.make
>> +++ b/rules/u-boot.make
>> @@ -93,6 +93,14 @@ ifdef PTXCONF_U_BOOT_INSTALL_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
>> +endif
>> +ifdef PTXCONF_U_BOOT_INSTALL_U_BOOT_DTB
>> + @install -v -D -m644 $(U_BOOT_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 \
>> + $(IMAGEDIR)/u-boot-with-spl-pbl.bin
>> endif
>> @$(call touch)
>>
>> @@ -103,8 +111,9 @@ endif
>> $(STATEDIR)/u-boot.clean:
>> @$(call targetinfo)
>> @$(call clean_pkg, U_BOOT)
>> - @rm -vf $(IMAGEDIR)/u-boot.bin $(IMAGEDIR)/u-boot.srec
>> $(IMAGEDIR)/u-boot.elf - @rm -vf $(IMAGEDIR)/u-boot.imx
>> + @rm -vf $(IMAGEDIR)/u-boot.bin $(IMAGEDIR)/u-boot.srec
>> + @rm -vf $(IMAGEDIR)/u-boot.elf $(IMAGEDIR)/u-boot.imx
>> + @rm -vf $(IMAGEDIR)/u-boot-dtb.bin $(IMAGEDIR)/u-boot-with-spl-pbl.bin
>>
>> #
>> ---------------------------------------------------------------------------
>> - # oldconfig / menuconfig
>
> The "u-boot-dtb.bin" and clean parts look fine.
>
> However, in upstream u-boot 2019.01 I could not find a defconfig which
> actually creates a file "u-boot-with-spl-pbl.bin" although there seems to be a
> make target for that. Could you name a defconfig for testing?
ls1046ardb_emmc_defconfig
>
> Greets
> Alex
>
>
Cheers
Ahmad
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [ptxdist] [PATCH 6/7] u-boot: allow generation of custom environment binary
2018-10-16 12:26 ` Michael Olbrich
2018-10-16 13:13 ` Alexander Dahl
@ 2019-04-04 14:17 ` Alexander Dahl
1 sibling, 0 replies; 22+ messages in thread
From: Alexander Dahl @ 2019-04-04 14:17 UTC (permalink / raw)
To: ptxdist; +Cc: Michael Olbrich
Hello Michael,
I tried something you proposed, but it does not work yet, will proceed
tomorrow. I started this mail with some now obsolete info, but wrote some more
things, which I do not want to throw away once written. See below.
Am Dienstag, 16. Oktober 2018, 14:26:10 CEST schrieb Michael Olbrich:
> On Tue, Oct 16, 2018 at 01:27:13PM +0200, Alexander Dahl wrote:
> > What I did was creating a new platform image rule depending on
> > HOST_U_BOOT_TOOLS. Creating an U-Boot environment image file is
> > independent
> > from building U-Boot itself and it creates an artefact I would consider an
> > image. I'm not happy seeing this feature inside the U-Boot target package
> > itself.
>
> Ahmad had a separate package originally but I told him to integrate it...
> It seemed more natural to me. Maybe because the environment is more
> integrated in barebox and that's what I usually use.
> But I'm not too set on it either way.
Well, I mixed things up here. There's a difference between creating an U-Boot
script and wrap that in an U-Boot image (mkimage) and creating a binary file
with an U-Boot environment (mkenvimage). What we actually do is creating one
script to put on the target in /boot (basically with patch 7/7 now) and
another script to put in platform-*/images for serving by an tftp server
(which needs some replacements).
> What about the script (patch 7/7)? Do you think that should be a separate
> package too?
I will send a revised version of Ahmad's patch.
Greets
Alex
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2019-04-04 14:17 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-10 12:03 [ptxdist] [PATCH 1/7] u-boot: specify GPL-2.0-only as LICENSE Ahmad Fatoum
2018-10-10 12:03 ` [ptxdist] [PATCH 2/7] u-boot: add support for oldconfig/menuconfig Ahmad Fatoum
2018-10-16 7:52 ` Michael Olbrich
2018-10-16 8:02 ` Alexander Dahl
2018-10-16 8:25 ` Michael Olbrich
2018-10-10 12:03 ` [ptxdist] [PATCH 3/7] u-boot: add V=$(PTXDIST_VERBOSE) to make options Ahmad Fatoum
2018-10-11 6:52 ` Alexander Dahl
2018-10-10 12:03 ` [ptxdist] [PATCH 4/7] u-boot: run install(1)/rm(1) with -v Ahmad Fatoum
2018-10-10 12:03 ` [ptxdist] [PATCH 5/7] u-boot: add u-boot{-dtb, -with-spl-pbl}.bin image installation options Ahmad Fatoum
2019-02-05 7:30 ` Alexander Dahl
2019-02-05 9:29 ` Ahmad Fatoum
2018-10-10 12:03 ` [ptxdist] [PATCH 6/7] u-boot: allow generation of custom environment binary Ahmad Fatoum
2018-10-16 8:13 ` Michael Olbrich
2018-10-16 10:58 ` Denis OSTERLAND
2018-10-16 11:27 ` Alexander Dahl
2018-10-16 12:26 ` Michael Olbrich
2018-10-16 13:13 ` Alexander Dahl
2019-04-04 14:17 ` Alexander Dahl
2018-10-16 11:20 ` Alexander Dahl
2018-10-10 12:03 ` [ptxdist] [PATCH 7/7] u-boot: allow generation of boot script Ahmad Fatoum
2018-10-11 6:44 ` [ptxdist] [PATCH 1/7] u-boot: specify GPL-2.0-only as LICENSE Alexander Dahl
2018-10-11 9:05 ` Ahmad Fatoum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox