All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [v3, 0/4] Supporting building a second Barebox config
@ 2016-01-20 22:43 Pieter Smith
  2016-01-20 22:43 ` [Buildroot] [v3, 1/4] barebox: prepare for secondary config build Pieter Smith
                   ` (4 more replies)
  0 siblings, 5 replies; 38+ messages in thread
From: Pieter Smith @ 2016-01-20 22:43 UTC (permalink / raw)
  To: buildroot

This patch-set in 4 parts adds support for building barebox with up to 2
configurations. It can be used to build the barebox x-loader or MLO (also
called Secondary Program Loader) in addition to the standard barebox build
(Tertiary Program Loader). This implements the design proposed in
http://elinux.org/Buildroot#Todo_list:
1. Have boot/barebox/ containing the common stuff.
2. Add two separate packages boot/barebox-1/ and boot/barebox-2/.
3. There is only one version selection, but each package allows to
   define the configuration to be used.
4. Design is a little bit like package/gcc, where we have multiple gcc builds,
   but share a lot of common definitions between the packages.

To demonstrate that it works as advertized, the last patch adds a defconfig for
the beaglebone black that makes use of the added functionality.

Revision history:
v3: Updated for master at 544e2c5871f223facd1ab3c2853cd07ad70dd9d1
v2: Dropped x-loader build specialization in favor of 2 generic barebox builds
v1: Initial posting

Pieter Smith (4):
  barebox: prepare for secondary config build
  barebox: adds option to build secondary config
  barebox: user selection of build output images
  beaglebone: adds barebox bootloader defconfig

 boot/barebox/Config.in                | 155 +++++++++++++++++++++++++++++-----
 boot/barebox/barebox-1/barebox-1.hash |   1 +
 boot/barebox/barebox-1/barebox-1.mk   |  90 ++++++++++++++++++++
 boot/barebox/barebox-2/barebox-2.hash |   1 +
 boot/barebox/barebox-2/barebox-2.mk   |  61 +++++++++++++
 boot/barebox/barebox.mk               |  61 +------------
 configs/beaglebone_barebox_defconfig  |  39 +++++++++
 7 files changed, 328 insertions(+), 80 deletions(-)
 create mode 120000 boot/barebox/barebox-1/barebox-1.hash
 create mode 100644 boot/barebox/barebox-1/barebox-1.mk
 create mode 120000 boot/barebox/barebox-2/barebox-2.hash
 create mode 100644 boot/barebox/barebox-2/barebox-2.mk
 create mode 100644 configs/beaglebone_barebox_defconfig

-- 
2.5.0

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 1/4] barebox: prepare for secondary config build
  2016-01-20 22:43 [Buildroot] [v3, 0/4] Supporting building a second Barebox config Pieter Smith
@ 2016-01-20 22:43 ` Pieter Smith
  2016-02-22 11:03   ` Yegor Yefremov
  2016-02-26 23:17   ` Arnout Vandecappelle
  2016-01-20 22:43 ` [Buildroot] [v3, 2/4] barebox: adds option to build secondary config Pieter Smith
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 38+ messages in thread
From: Pieter Smith @ 2016-01-20 22:43 UTC (permalink / raw)
  To: buildroot

No functional changes, but prepares barebox for building with two
configurations (similar to package/gcc).

Signed-off-by: Pieter Smith <pieter@boesman.nl>
---
 boot/barebox/Config.in                | 71 +++++++++++++++++++-----------
 boot/barebox/barebox-1/barebox-1.hash |  1 +
 boot/barebox/barebox-1/barebox-1.mk   | 81 +++++++++++++++++++++++++++++++++++
 boot/barebox/barebox.mk               | 61 +-------------------------
 4 files changed, 129 insertions(+), 85 deletions(-)
 create mode 120000 boot/barebox/barebox-1/barebox-1.hash
 create mode 100644 boot/barebox/barebox-1/barebox-1.mk

diff --git a/boot/barebox/Config.in b/boot/barebox/Config.in
index 39cb5d2..ed120af 100644
--- a/boot/barebox/Config.in
+++ b/boot/barebox/Config.in
@@ -64,9 +64,52 @@ config BR2_TARGET_BAREBOX_CUSTOM_GIT_VERSION
 
 endif
 
+config BR2_TARGET_BAREBOX_BAREBOXENV
+	bool "bareboxenv tool in target"
+	help
+	  Install bareboxenv tool in target.
+
+config BR2_TARGET_BAREBOX_CUSTOM_ENV
+	bool "Generate an environment image"
+	help
+	  Generate a custom environment image. This environment will
+	  contain the variables and scripts to be used at boot by
+	  barebox.
+
+config BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH
+	string "Environment path"
+	depends on BR2_TARGET_BAREBOX_CUSTOM_ENV
+	help
+	  Path to the directory containing the custom barebox
+	  environment. Depending on your setup, it will probably be
+	  based on either the content of the defaultenv or
+	  defaultenv-2 directories in the barebox source code, plus
+	  the additions needed. The output will be an image in the
+	  barebox devfs format, stored in the images directory, with
+	  the same name as the directory name given here.
 
 choice
-	prompt "Barebox configuration"
+	prompt "Number of Barebox configurations"
+	default BR2_TARGET_BAREBOX_SINGLE_CONFIG
+
+config BR2_TARGET_BAREBOX_ONE_CONFIG
+	select BR2_TARGET_BAREBOX_1
+	bool "Build 1 config"
+	help
+	  Build only one barebox config.
+	  Useful for building the traditional TPL (Tertiary Program
+	  Loader).
+
+endchoice
+
+config BR2_TARGET_BAREBOX_1
+	bool "Barebox configuration 1"
+	default y
+
+if BR2_TARGET_BAREBOX_1
+
+choice
+	prompt "Type of configuration"
 	default BR2_TARGET_BAREBOX_USE_DEFCONFIG
 
 config BR2_TARGET_BAREBOX_USE_DEFCONFIG
@@ -78,7 +121,7 @@ config BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG
 endchoice
 
 config BR2_TARGET_BAREBOX_BOARD_DEFCONFIG
-	string "board defconfig"
+	string "Board defconfig"
 	depends on BR2_TARGET_BAREBOX_USE_DEFCONFIG
 	help
 	  Name of the board for which Barebox should be built, without
@@ -97,28 +140,6 @@ config BR2_TARGET_BAREBOX_CONFIG_FRAGMENT_FILES
 	  A space-separated list of configuration fragment files,
 	  that will be merged to the main Barebox configuration file.
 
-config BR2_TARGET_BAREBOX_BAREBOXENV
-	bool "bareboxenv tool in target"
-	help
-	  Install bareboxenv tool in target.
-
-config BR2_TARGET_BAREBOX_CUSTOM_ENV
-	bool "Generate an environment image"
-	help
-	  Generate a custom environment image. This environment will
-	  contain the variables and scripts to be used at boot by
-	  barebox.
-
-config BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH
-	string "Environment path"
-	depends on BR2_TARGET_BAREBOX_CUSTOM_ENV
-	help
-	  Path to the directory containing the custom barebox
-	  environment. Depending on your setup, it will probably be
-	  based on either the content of the defaultenv or
-	  defaultenv-2 directories in the barebox source code, plus
-	  the additions needed. The output will be an image in the
-	  barebox devfs format, stored in the images directory, with
-	  the same name as the directory name given here.
+endif
 
 endif
diff --git a/boot/barebox/barebox-1/barebox-1.hash b/boot/barebox/barebox-1/barebox-1.hash
new file mode 120000
index 0000000..b6462b8
--- /dev/null
+++ b/boot/barebox/barebox-1/barebox-1.hash
@@ -0,0 +1 @@
+../barebox.hash
\ No newline at end of file
diff --git a/boot/barebox/barebox-1/barebox-1.mk b/boot/barebox/barebox-1/barebox-1.mk
new file mode 100644
index 0000000..3374ece
--- /dev/null
+++ b/boot/barebox/barebox-1/barebox-1.mk
@@ -0,0 +1,81 @@
+################################################################################
+#
+# barebox-1
+#
+################################################################################
+
+BAREBOX_1_VERSION = $(BAREBOX_VERSION)
+BAREBOX_1_SITE = $(BAREBOX_SITE)
+BAREBOX_1_SITE_METHOD = $(BAREBOX_SITE_METHOD)
+BAREBOX_1_SOURCE = $(BAREBOX_SOURCE)
+BAREBOX_1_DEPENDENCIES = $(BAREBOX_DEPENDENCIES)
+BAREBOX_1_LICENSE = $(BAREBOX_LICENSE)
+BAREBOX_1_LICENSE_FILES = $(BAREBOX_LICENSE_FILES)
+BAREBOX_1_POST_PATCH_HOOKS += $(BAREBOX_POST_PATCH_HOOKS)
+BAREBOX_1_MAKE_FLAGS = $(BAREBOX_MAKE_FLAGS)
+BAREBOX_1_MAKE_ENV = $(BAREBOX_MAKE_ENV)
+BAREBOX_1_INSTALL_IMAGES = $(BAREBOX_INSTALL_IMAGES)
+
+ifeq ($(BR2_TARGET_BAREBOX_USE_DEFCONFIG),y)
+BAREBOX_1_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))_defconfig
+else ifeq ($(BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG),y)
+BAREBOX_1_KCONFIG_FILE = $(call qstrip,$(BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE))
+endif
+
+BAREBOX_1_KCONFIG_FRAGMENT_FILES = $(BAREBOX_KCONFIG_FRAGMENT_FILES)
+BAREBOX_1_KCONFIG_EDITORS = $(BAREBOX_KCONFIG_EDITORS)
+BAREBOX_1_KCONFIG_OPTS = $(BAREBOX_MAKE_FLAGS)
+
+ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
+define BAREBOX_1_BUILD_BAREBOXENV_CMDS
+	$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -o $(@D)/bareboxenv \
+		$(@D)/scripts/bareboxenv.c
+endef
+endif
+
+ifeq ($(BR2_TARGET_BAREBOX_CUSTOM_ENV),y)
+BAREBOX_1_ENV_NAME = $(notdir $(call qstrip,\
+	$(BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH)))
+define BAREBOX_1_BUILD_CUSTOM_ENV
+	$(@D)/scripts/bareboxenv -s \
+		$(call qstrip, $(BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH)) \
+		$(@D)/$(BAREBOX_1_ENV_NAME)
+endef
+define BAREBOX_1_INSTALL_CUSTOM_ENV
+	cp $(@D)/$(BAREBOX_1_ENV_NAME) $(BINARIES_DIR)
+endef
+endif
+
+define BAREBOX_1_BUILD_CMDS
+	$(BAREBOX_1_BUILD_BAREBOXENV_CMDS)
+	$(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_1_MAKE_FLAGS) -C $(@D)
+	$(BAREBOX_1_BUILD_CUSTOM_ENV)
+endef
+
+define BAREBOX_1_INSTALL_IMAGES_CMDS
+	if test -h $(@D)/barebox-flash-image ; then \
+		cp -L $(@D)/barebox-flash-image $(BINARIES_DIR)/barebox.bin ; \
+	else \
+		cp $(@D)/barebox.bin $(BINARIES_DIR);\
+	fi
+	$(BAREBOX_1_INSTALL_CUSTOM_ENV)
+endef
+
+ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
+define BAREBOX_1_INSTALL_TARGET_CMDS
+	cp $(@D)/bareboxenv $(TARGET_DIR)/usr/bin
+endef
+endif
+
+# Checks to give errors that the user can understand
+# Must be before we call to kconfig-package
+ifeq ($(BR2_TARGET_BAREBOX_2)$(BR_BUILDING),yy)
+# We must use the user-supplied kconfig value, because
+# BAREBOX_1_KCONFIG_DEFCONFIG will at least contain the
+# trailing _defconfig
+ifeq ($(or $(BAREBOX_1_KCONFIG_FILE),$(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))),)
+$(error No Barebox config. Check your BR2_TARGET_BAREBOX_BOARD_DEFCONFIG or BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE settings)
+endif
+endif
+
+$(eval $(kconfig-package))
diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk
index 7715daf..55bd187 100644
--- a/boot/barebox/barebox.mk
+++ b/boot/barebox/barebox.mk
@@ -55,66 +55,7 @@ endif
 BAREBOX_MAKE_FLAGS = ARCH=$(BAREBOX_ARCH) CROSS_COMPILE="$(TARGET_CROSS)"
 BAREBOX_MAKE_ENV = $(TARGET_MAKE_ENV)
 
-ifeq ($(BR2_TARGET_BAREBOX_USE_DEFCONFIG),y)
-BAREBOX_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))_defconfig
-else ifeq ($(BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG),y)
-BAREBOX_KCONFIG_FILE = $(call qstrip,$(BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE))
-endif
-
 BAREBOX_KCONFIG_FRAGMENT_FILES = $(call qstrip,$(BR2_TARGET_BAREBOX_CONFIG_FRAGMENT_FILES))
 BAREBOX_KCONFIG_EDITORS = menuconfig xconfig gconfig nconfig
-BAREBOX_KCONFIG_OPTS = $(BAREBOX_MAKE_FLAGS)
-
-ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
-define BAREBOX_BUILD_BAREBOXENV_CMDS
-	$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -o $(@D)/bareboxenv \
-		$(@D)/scripts/bareboxenv.c
-endef
-endif
-
-ifeq ($(BR2_TARGET_BAREBOX_CUSTOM_ENV),y)
-BAREBOX_ENV_NAME = $(notdir $(call qstrip,\
-	$(BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH)))
-define BAREBOX_BUILD_CUSTOM_ENV
-	$(@D)/scripts/bareboxenv -s \
-		$(call qstrip, $(BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH)) \
-		$(@D)/$(BAREBOX_ENV_NAME)
-endef
-define BAREBOX_INSTALL_CUSTOM_ENV
-	cp $(@D)/$(BAREBOX_ENV_NAME) $(BINARIES_DIR)
-endef
-endif
-
-define BAREBOX_BUILD_CMDS
-	$(BAREBOX_BUILD_BAREBOXENV_CMDS)
-	$(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D)
-	$(BAREBOX_BUILD_CUSTOM_ENV)
-endef
-
-define BAREBOX_INSTALL_IMAGES_CMDS
-	if test -h $(@D)/barebox-flash-image ; then \
-		cp -L $(@D)/barebox-flash-image $(BINARIES_DIR)/barebox.bin ; \
-	else \
-		cp $(@D)/barebox.bin $(BINARIES_DIR);\
-	fi
-	$(BAREBOX_INSTALL_CUSTOM_ENV)
-endef
-
-ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
-define BAREBOX_INSTALL_TARGET_CMDS
-	cp $(@D)/bareboxenv $(TARGET_DIR)/usr/bin
-endef
-endif
-
-# Checks to give errors that the user can understand
-# Must be before we call to kconfig-package
-ifeq ($(BR2_TARGET_BAREBOX)$(BR_BUILDING),yy)
-# We must use the user-supplied kconfig value, because
-# BAREBOX_KCONFIG_DEFCONFIG will at least contain the
-# trailing _defconfig
-ifeq ($(or $(BAREBOX_KCONFIG_FILE),$(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))),)
-$(error No Barebox config. Check your BR2_TARGET_BAREBOX_BOARD_DEFCONFIG or BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE settings)
-endif
-endif
 
-$(eval $(kconfig-package))
+include $(sort $(wildcard boot/barebox/*/*.mk))
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 2/4] barebox: adds option to build secondary config
  2016-01-20 22:43 [Buildroot] [v3, 0/4] Supporting building a second Barebox config Pieter Smith
  2016-01-20 22:43 ` [Buildroot] [v3, 1/4] barebox: prepare for secondary config build Pieter Smith
@ 2016-01-20 22:43 ` Pieter Smith
  2016-02-22 11:03   ` Yegor Yefremov
  2016-02-26 23:26   ` Arnout Vandecappelle
  2016-01-20 22:43 ` [Buildroot] [v3, 3/4] barebox: user selection of build output images Pieter Smith
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 38+ messages in thread
From: Pieter Smith @ 2016-01-20 22:43 UTC (permalink / raw)
  To: buildroot

Support selection of secondary config, but version, source URL and patches are
shared with barebox bootloader build.

Signed-off-by: Pieter Smith <pieter@boesman.nl>
---
 boot/barebox/Config.in                | 60 ++++++++++++++++++++++++++++++++++-
 boot/barebox/barebox-2/barebox-2.hash |  1 +
 boot/barebox/barebox-2/barebox-2.mk   | 54 +++++++++++++++++++++++++++++++
 3 files changed, 114 insertions(+), 1 deletion(-)
 create mode 120000 boot/barebox/barebox-2/barebox-2.hash
 create mode 100644 boot/barebox/barebox-2/barebox-2.mk

diff --git a/boot/barebox/Config.in b/boot/barebox/Config.in
index ed120af..f848afe 100644
--- a/boot/barebox/Config.in
+++ b/boot/barebox/Config.in
@@ -100,11 +100,20 @@ config BR2_TARGET_BAREBOX_ONE_CONFIG
 	  Useful for building the traditional TPL (Tertiary Program
 	  Loader).
 
+config BR2_TARGET_BAREBOX_TWO_CONFIGS
+	select BR2_TARGET_BAREBOX_1
+	select BR2_TARGET_BAREBOX_2
+	bool "Build 2 configs"
+	help
+	  Build two barebox configurations.
+	  Useful for building an SPL (Secondary Program Loader) in addition to
+	  the traditional TPL (Tertiary Program Loader), such as the X-Loader
+	  or MLO for Texas Instruments processors.
+
 endchoice
 
 config BR2_TARGET_BAREBOX_1
 	bool "Barebox configuration 1"
-	default y
 
 if BR2_TARGET_BAREBOX_1
 
@@ -142,4 +151,53 @@ config BR2_TARGET_BAREBOX_CONFIG_FRAGMENT_FILES
 
 endif
 
+if BR2_TARGET_BAREBOX_TWO_CONFIGS
+
+config BR2_TARGET_BAREBOX_2
+	bool "Barebox configuration 2"
+
+if BR2_TARGET_BAREBOX_2
+
+choice
+	prompt "Type of configuration"
+	default BR2_TARGET_BAREBOX_2_USE_DEFCONFIG
+
+config BR2_TARGET_BAREBOX_2_USE_DEFCONFIG
+	bool "Using a defconfig"
+
+config BR2_TARGET_BAREBOX_2_USE_CUSTOM_CONFIG
+	bool "Using a custom config file"
+
+endchoice
+
+config BR2_TARGET_BAREBOX_2_BOARD_DEFCONFIG
+	string "Board defconfig"
+	depends on BR2_TARGET_BAREBOX_2_USE_DEFCONFIG
+	help
+	  Name of the board for which Barebox should be built, without
+	  the _defconfig suffix.
+
+
+config BR2_TARGET_BAREBOX_2_CUSTOM_CONFIG_FILE
+	string "Configuration file path"
+	depends on BR2_TARGET_BAREBOX_2_USE_CUSTOM_CONFIG
+	help
+	  Path to the barebox configuration file
+
+config BR2_TARGET_BAREBOX_2_CONFIG_FRAGMENT_FILES
+	string "Additional configuration fragment files"
+	help
+	  A space-separated list of configuration fragment files,
+	  that will be merged to the main Barebox configuration file.
+
+config BR2_TARGET_BAREBOX_2_INSTALL_FILENAME
+	string "Destination image filename in output/images"
+	default "MLO"
+	help
+	  Name to give the image in the output/images directory.
+
+endif
+
+endif
+
 endif
diff --git a/boot/barebox/barebox-2/barebox-2.hash b/boot/barebox/barebox-2/barebox-2.hash
new file mode 120000
index 0000000..b6462b8
--- /dev/null
+++ b/boot/barebox/barebox-2/barebox-2.hash
@@ -0,0 +1 @@
+../barebox.hash
\ No newline at end of file
diff --git a/boot/barebox/barebox-2/barebox-2.mk b/boot/barebox/barebox-2/barebox-2.mk
new file mode 100644
index 0000000..a735f67
--- /dev/null
+++ b/boot/barebox/barebox-2/barebox-2.mk
@@ -0,0 +1,54 @@
+################################################################################
+#
+# barebox-2
+#
+################################################################################
+
+BAREBOX_2_VERSION = $(BAREBOX_VERSION)
+BAREBOX_2_SITE = $(BAREBOX_SITE)
+BAREBOX_2_SITE_METHOD = $(BAREBOX_SITE_METHOD)
+BAREBOX_2_SOURCE = $(BAREBOX_SOURCE)
+BAREBOX_2_DEPENDENCIES = $(BAREBOX_DEPENDENCIES)
+BAREBOX_2_LICENSE = $(BAREBOX_LICENSE)
+BAREBOX_2_LICENSE_FILES = $(BAREBOX_LICENSE_FILES)
+BAREBOX_2_POST_PATCH_HOOKS += $(BAREBOX_POST_PATCH_HOOKS)
+BAREBOX_2_MAKE_FLAGS = $(BAREBOX_MAKE_FLAGS)
+BAREBOX_2_MAKE_ENV = $(BAREBOX_MAKE_ENV)
+BAREBOX_2_INSTALL_IMAGES = $(BAREBOX_INSTALL_IMAGES)
+BAREBOX_2_INSTALL_DEST = $(BINARIES_DIR)/$(call qstrip,$(BR2_TARGET_BAREBOX_2_INSTALL_FILENAME))
+
+ifeq ($(BR2_TARGET_BAREBOX_2_USE_DEFCONFIG),y)
+BAREBOX_2_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_TARGET_BAREBOX_2_BOARD_DEFCONFIG))_defconfig
+else ifeq ($(BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG),y)
+BAREBOX_2_KCONFIG_FILE = $(call qstrip,$(BR2_TARGET_BAREBOX_2_CUSTOM_CONFIG_FILE))
+endif
+
+BAREBOX_2_KCONFIG_FRAGMENT_FILES = $(BAREBOX_KCONFIG_FRAGMENT_FILES)
+BAREBOX_2_KCONFIG_EDITORS = $(BAREBOX_KCONFIG_EDITORS)
+BAREBOX_2_KCONFIG_OPTS = $(BAREBOX_MAKE_FLAGS)
+
+define BAREBOX_2_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_2_MAKE_FLAGS) -C $(@D)
+endef
+
+define BAREBOX_2_INSTALL_IMAGES_CMDS
+	if test -h $(@D)/barebox-flash-image ; then \
+		cp -L $(@D)/barebox-flash-image $(BAREBOX_2_INSTALL_DEST) ; \
+	else \
+		cp $(@D)/barebox.bin $(BAREBOX_2_INSTALL_DEST);\
+	fi
+endef
+
+
+# Checks to give errors that the user can understand
+# Must be before we call to kconfig-package
+ifeq ($(BR2_TARGET_BAREBOX_2)$(BR_BUILDING),yy)
+# We must use the user-supplied kconfig value, because
+# BAREBOX_2_KCONFIG_DEFCONFIG will at least contain the
+# trailing _defconfig
+ifeq ($(or $(BAREBOX_2_KCONFIG_FILE),$(call qstrip,$(BR2_TARGET_BAREBOX_2_BOARD_DEFCONFIG))),)
+$(error No Barebox config. Check your BR2_TARGET_BAREBOX_2_BOARD_DEFCONFIG or BR2_TARGET_BAREBOX_2_CUSTOM_CONFIG_FILE settings)
+endif
+endif
+
+$(eval $(kconfig-package))
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 3/4] barebox: user selection of build output images
  2016-01-20 22:43 [Buildroot] [v3, 0/4] Supporting building a second Barebox config Pieter Smith
  2016-01-20 22:43 ` [Buildroot] [v3, 1/4] barebox: prepare for secondary config build Pieter Smith
  2016-01-20 22:43 ` [Buildroot] [v3, 2/4] barebox: adds option to build secondary config Pieter Smith
@ 2016-01-20 22:43 ` Pieter Smith
  2016-02-22 11:03   ` Yegor Yefremov
  2016-02-26 23:43   ` Arnout Vandecappelle
  2016-01-20 22:43 ` [Buildroot] [v3, 4/4] beaglebone: adds barebox bootloader defconfig Pieter Smith
  2016-02-16 11:55 ` [Buildroot] [v3, 0/4] Supporting building a second Barebox config Yegor Yefremov
  4 siblings, 2 replies; 38+ messages in thread
From: Pieter Smith @ 2016-01-20 22:43 UTC (permalink / raw)
  To: buildroot

A non-default image can be selected as the barebox build output in the images/
directory. This typically is needed to select the appropriate image generated
by multi-platform support defconfigs (E.g. am335x).

Signed-off-by: Pieter Smith <pieter@boesman.nl>
---
 boot/barebox/Config.in              | 36 ++++++++++++++++++++++++++++++++++++
 boot/barebox/barebox-1/barebox-1.mk | 13 +++++++++++--
 boot/barebox/barebox-2/barebox-2.mk |  7 +++++++
 3 files changed, 54 insertions(+), 2 deletions(-)

diff --git a/boot/barebox/Config.in b/boot/barebox/Config.in
index f848afe..fe76f8a 100644
--- a/boot/barebox/Config.in
+++ b/boot/barebox/Config.in
@@ -149,6 +149,24 @@ config BR2_TARGET_BAREBOX_CONFIG_FRAGMENT_FILES
 	  A space-separated list of configuration fragment files,
 	  that will be merged to the main Barebox configuration file.
 
+choice
+	prompt "Barebox image file"
+	default BR2_TARGET_BAREBOX_USE_DEFAULT_IMAGE
+
+config BR2_TARGET_BAREBOX_USE_DEFAULT_IMAGE
+	bool "Using the default image file"
+
+config BR2_TARGET_BAREBOX_USE_SPECIFIC_IMAGE
+	bool "Using a specific image file"
+
+endchoice
+
+config BR2_TARGET_BAREBOX_IMAGE_FILE
+	string "Image file path"
+	depends on BR2_TARGET_BAREBOX_USE_SPECIFIC_IMAGE
+	help
+	  Name of the built barebox image file in the barebox images directory
+
 endif
 
 if BR2_TARGET_BAREBOX_TWO_CONFIGS
@@ -190,6 +208,24 @@ config BR2_TARGET_BAREBOX_2_CONFIG_FRAGMENT_FILES
 	  A space-separated list of configuration fragment files,
 	  that will be merged to the main Barebox configuration file.
 
+choice
+	prompt "Barebox image file"
+	default BR2_TARGET_BAREBOX_2_USE_DEFAULT_IMAGE
+
+config BR2_TARGET_BAREBOX_2_USE_DEFAULT_IMAGE
+	bool "Using the default image file"
+
+config BR2_TARGET_BAREBOX_2_USE_SPECIFIC_IMAGE
+	bool "Using a specific image file"
+
+endchoice
+
+config BR2_TARGET_BAREBOX_2_IMAGE_FILE
+	string "Image file path"
+	depends on BR2_TARGET_BAREBOX_2_USE_SPECIFIC_IMAGE
+	help
+	  Name of the built barebox image file in the barebox images directory
+
 config BR2_TARGET_BAREBOX_2_INSTALL_FILENAME
 	string "Destination image filename in output/images"
 	default "MLO"
diff --git a/boot/barebox/barebox-1/barebox-1.mk b/boot/barebox/barebox-1/barebox-1.mk
index 3374ece..8441842 100644
--- a/boot/barebox/barebox-1/barebox-1.mk
+++ b/boot/barebox/barebox-1/barebox-1.mk
@@ -15,6 +15,7 @@ BAREBOX_1_POST_PATCH_HOOKS += $(BAREBOX_POST_PATCH_HOOKS)
 BAREBOX_1_MAKE_FLAGS = $(BAREBOX_MAKE_FLAGS)
 BAREBOX_1_MAKE_ENV = $(BAREBOX_MAKE_ENV)
 BAREBOX_1_INSTALL_IMAGES = $(BAREBOX_INSTALL_IMAGES)
+BAREBOX_1_INSTALL_DEST = $(BINARIES_DIR)/barebox.bin
 
 ifeq ($(BR2_TARGET_BAREBOX_USE_DEFCONFIG),y)
 BAREBOX_1_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))_defconfig
@@ -52,14 +53,22 @@ define BAREBOX_1_BUILD_CMDS
 	$(BAREBOX_1_BUILD_CUSTOM_ENV)
 endef
 
+ifdef BR2_TARGET_BAREBOX_USE_SPECIFIC_IMAGE
+define BAREBOX_1_INSTALL_IMAGES_CMDS
+	cp -L $(@D)/images/$(call qstrip,$(BR2_TARGET_BAREBOX_IMAGE_FILE)) \
+		$(BAREBOX_1_INSTALL_DEST)
+	$(BAREBOX_1_INSTALL_CUSTOM_ENV)
+endef
+else
 define BAREBOX_1_INSTALL_IMAGES_CMDS
 	if test -h $(@D)/barebox-flash-image ; then \
-		cp -L $(@D)/barebox-flash-image $(BINARIES_DIR)/barebox.bin ; \
+		cp -L $(@D)/barebox-flash-image $(BAREBOX_1_INSTALL_DEST) ; \
 	else \
-		cp $(@D)/barebox.bin $(BINARIES_DIR);\
+		cp $(@D)/barebox.bin $(BAREBOX_1_INSTALL_DEST);\
 	fi
 	$(BAREBOX_1_INSTALL_CUSTOM_ENV)
 endef
+endif
 
 ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
 define BAREBOX_1_INSTALL_TARGET_CMDS
diff --git a/boot/barebox/barebox-2/barebox-2.mk b/boot/barebox/barebox-2/barebox-2.mk
index a735f67..71e0266 100644
--- a/boot/barebox/barebox-2/barebox-2.mk
+++ b/boot/barebox/barebox-2/barebox-2.mk
@@ -31,6 +31,12 @@ define BAREBOX_2_BUILD_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_2_MAKE_FLAGS) -C $(@D)
 endef
 
+ifdef BR2_TARGET_BAREBOX_2_USE_SPECIFIC_IMAGE
+define BAREBOX_2_INSTALL_IMAGES_CMDS
+	cp -L $(@D)/images/$(call qstrip,$(BR2_TARGET_BAREBOX_2_IMAGE_FILE)) \
+		$(BAREBOX_2_INSTALL_DEST)
+endef
+else
 define BAREBOX_2_INSTALL_IMAGES_CMDS
 	if test -h $(@D)/barebox-flash-image ; then \
 		cp -L $(@D)/barebox-flash-image $(BAREBOX_2_INSTALL_DEST) ; \
@@ -38,6 +44,7 @@ define BAREBOX_2_INSTALL_IMAGES_CMDS
 		cp $(@D)/barebox.bin $(BAREBOX_2_INSTALL_DEST);\
 	fi
 endef
+endif
 
 
 # Checks to give errors that the user can understand
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 4/4] beaglebone: adds barebox bootloader defconfig
  2016-01-20 22:43 [Buildroot] [v3, 0/4] Supporting building a second Barebox config Pieter Smith
                   ` (2 preceding siblings ...)
  2016-01-20 22:43 ` [Buildroot] [v3, 3/4] barebox: user selection of build output images Pieter Smith
@ 2016-01-20 22:43 ` Pieter Smith
  2016-02-22 11:04   ` Yegor Yefremov
  2016-02-26 23:47   ` Arnout Vandecappelle
  2016-02-16 11:55 ` [Buildroot] [v3, 0/4] Supporting building a second Barebox config Yegor Yefremov
  4 siblings, 2 replies; 38+ messages in thread
From: Pieter Smith @ 2016-01-20 22:43 UTC (permalink / raw)
  To: buildroot

* Builds barebox MLO and the barebox bootloader.
* Barebox integrates a perfectly good device-tree for the bbb, so no dtb is
  being generated with the kernel.

Signed-off-by: Pieter Smith <pieter@boesman.nl>
---
 configs/beaglebone_barebox_defconfig | 39 ++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 configs/beaglebone_barebox_defconfig

diff --git a/configs/beaglebone_barebox_defconfig b/configs/beaglebone_barebox_defconfig
new file mode 100644
index 0000000..b4fd67b
--- /dev/null
+++ b/configs/beaglebone_barebox_defconfig
@@ -0,0 +1,39 @@
+# architecture
+BR2_arm=y
+BR2_cortex_a8=y
+BR2_ARM_EABIHF=y
+
+# system
+BR2_TARGET_GENERIC_HOSTNAME="beaglebone"
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttyO0"
+# BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/beaglebone/post-image.sh"
+
+# filesystem
+BR2_PACKAGE_AM33X_CM3=y
+BR2_TARGET_ROOTFS_EXT2=y
+# BR2_TARGET_ROOTFS_TAR is not set
+
+# lock down headers to avoid breaking with new defaults
+BR2_KERNEL_HEADERS_VERSION=y
+BR2_DEFAULT_KERNEL_VERSION="3.12.10"
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_12=y
+
+# bootloader
+BR2_TARGET_BAREBOX_TWO_CONFIGS=y
+BR2_TARGET_BAREBOX=y
+BR2_TARGET_BAREBOX_BOARD_DEFCONFIG="am335x"
+BR2_TARGET_BAREBOX_USE_SPECIFIC_IMAGE=y
+BR2_TARGET_BAREBOX_IMAGE_FILE="barebox-am33xx-beaglebone.img"
+BR2_TARGET_BAREBOX_2=y
+BR2_TARGET_BAREBOX_2_BOARD_DEFCONFIG="am335x_mlo"
+BR2_TARGET_BAREBOX_2_USE_SPECIFIC_IMAGE=y
+BR2_TARGET_BAREBOX_2_IMAGE_FILE="barebox-am33xx-beaglebone-mlo.img"
+
+# kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_LATEST_VERSION=y
+BR2_LINUX_KERNEL_USE_DEFCONFIG=y
+BR2_LINUX_KERNEL_DEFCONFIG="omap2plus"
+BR2_LINUX_KERNEL_ZIMAGE=y
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 0/4] Supporting building a second Barebox config
  2016-01-20 22:43 [Buildroot] [v3, 0/4] Supporting building a second Barebox config Pieter Smith
                   ` (3 preceding siblings ...)
  2016-01-20 22:43 ` [Buildroot] [v3, 4/4] beaglebone: adds barebox bootloader defconfig Pieter Smith
@ 2016-02-16 11:55 ` Yegor Yefremov
  2016-02-16 18:55   ` Pieter Smith
  4 siblings, 1 reply; 38+ messages in thread
From: Yegor Yefremov @ 2016-02-16 11:55 UTC (permalink / raw)
  To: buildroot

Hi Pieter,

On Wed, Jan 20, 2016 at 11:43 PM, Pieter Smith <pieter@boesman.nl> wrote:
> This patch-set in 4 parts adds support for building barebox with up to 2
> configurations. It can be used to build the barebox x-loader or MLO (also
> called Secondary Program Loader) in addition to the standard barebox build
> (Tertiary Program Loader). This implements the design proposed in
> http://elinux.org/Buildroot#Todo_list:
> 1. Have boot/barebox/ containing the common stuff.
> 2. Add two separate packages boot/barebox-1/ and boot/barebox-2/.
> 3. There is only one version selection, but each package allows to
>    define the configuration to be used.
> 4. Design is a little bit like package/gcc, where we have multiple gcc builds,
>    but share a lot of common definitions between the packages.
>
> To demonstrate that it works as advertized, the last patch adds a defconfig for
> the beaglebone black that makes use of the added functionality.

I've applied the patches and built both MLO and barebox.bin binaries.
The patches are working as expected.

I have following use case: I have one board, but want provide
different environment scripts per project. These scripts should be
stored in BR2_EXTERNAL folder. I'd like to also embed them into
barebox.bin. How can I do it in BR?

Yegor

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 0/4] Supporting building a second Barebox config
  2016-02-16 11:55 ` [Buildroot] [v3, 0/4] Supporting building a second Barebox config Yegor Yefremov
@ 2016-02-16 18:55   ` Pieter Smith
  2016-02-16 21:27     ` Yegor Yefremov
  0 siblings, 1 reply; 38+ messages in thread
From: Pieter Smith @ 2016-02-16 18:55 UTC (permalink / raw)
  To: buildroot

On Tue, Feb 16, 2016 at 12:55:30PM +0100, Yegor Yefremov wrote:
> Hi Pieter,
> 
> On Wed, Jan 20, 2016 at 11:43 PM, Pieter Smith <pieter@boesman.nl> wrote:
> > This patch-set in 4 parts adds support for building barebox with up to 2
> > configurations. It can be used to build the barebox x-loader or MLO (also
> > called Secondary Program Loader) in addition to the standard barebox build
> > (Tertiary Program Loader). This implements the design proposed in
> > http://elinux.org/Buildroot#Todo_list:
> > 1. Have boot/barebox/ containing the common stuff.
> > 2. Add two separate packages boot/barebox-1/ and boot/barebox-2/.
> > 3. There is only one version selection, but each package allows to
> >    define the configuration to be used.
> > 4. Design is a little bit like package/gcc, where we have multiple gcc builds,
> >    but share a lot of common definitions between the packages.
> >
> > To demonstrate that it works as advertized, the last patch adds a defconfig for
> > the beaglebone black that makes use of the added functionality.
> 
> I've applied the patches and built both MLO and barebox.bin binaries.
> The patches are working as expected.

Glad to hear it.

> I have following use case: I have one board, but want provide
> different environment scripts per project. These scripts should be
> stored in BR2_EXTERNAL folder. I'd like to also embed them into
> barebox.bin. How can I do it in BR?

If I understand you correctly, you would like to customize the barebox
environment integrated into barebox.bin on a per-project basis. This is
something I spent a few hours looking into, but I have not found an adequate
solution. It may be easier to bake a new buildroot environment and flash that. 

Will this satisfy your use-case?

> Yegor

- Pieter

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 0/4] Supporting building a second Barebox config
  2016-02-16 18:55   ` Pieter Smith
@ 2016-02-16 21:27     ` Yegor Yefremov
  2016-02-21 17:25       ` Pieter Smith
  0 siblings, 1 reply; 38+ messages in thread
From: Yegor Yefremov @ 2016-02-16 21:27 UTC (permalink / raw)
  To: buildroot

On Tue, Feb 16, 2016 at 7:55 PM, Pieter Smith <pieter@boesman.nl> wrote:
> On Tue, Feb 16, 2016 at 12:55:30PM +0100, Yegor Yefremov wrote:
>> Hi Pieter,
>>
>> On Wed, Jan 20, 2016 at 11:43 PM, Pieter Smith <pieter@boesman.nl> wrote:
>> > This patch-set in 4 parts adds support for building barebox with up to 2
>> > configurations. It can be used to build the barebox x-loader or MLO (also
>> > called Secondary Program Loader) in addition to the standard barebox build
>> > (Tertiary Program Loader). This implements the design proposed in
>> > http://elinux.org/Buildroot#Todo_list:
>> > 1. Have boot/barebox/ containing the common stuff.
>> > 2. Add two separate packages boot/barebox-1/ and boot/barebox-2/.
>> > 3. There is only one version selection, but each package allows to
>> >    define the configuration to be used.
>> > 4. Design is a little bit like package/gcc, where we have multiple gcc builds,
>> >    but share a lot of common definitions between the packages.
>> >
>> > To demonstrate that it works as advertized, the last patch adds a defconfig for
>> > the beaglebone black that makes use of the added functionality.
>>
>> I've applied the patches and built both MLO and barebox.bin binaries.
>> The patches are working as expected.
>
> Glad to hear it.
>
>> I have following use case: I have one board, but want provide
>> different environment scripts per project. These scripts should be
>> stored in BR2_EXTERNAL folder. I'd like to also embed them into
>> barebox.bin. How can I do it in BR?
>
> If I understand you correctly, you would like to customize the barebox
> environment integrated into barebox.bin on a per-project basis. This is
> something I spent a few hours looking into, but I have not found an adequate
> solution. It may be easier to bake a new buildroot environment and flash that.
>
> Will this satisfy your use-case?

I've found a solution: http://patchwork.ozlabs.org/patch/583444/

The question is should enable both inetrnel and external env image? I
think we should keep both in parallel.

Yegor

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 0/4] Supporting building a second Barebox config
  2016-02-16 21:27     ` Yegor Yefremov
@ 2016-02-21 17:25       ` Pieter Smith
  0 siblings, 0 replies; 38+ messages in thread
From: Pieter Smith @ 2016-02-21 17:25 UTC (permalink / raw)
  To: buildroot

On Tue, Feb 16, 2016 at 10:27:46PM +0100, Yegor Yefremov wrote:
> On Tue, Feb 16, 2016 at 7:55 PM, Pieter Smith <pieter@boesman.nl> wrote:
> > On Tue, Feb 16, 2016 at 12:55:30PM +0100, Yegor Yefremov wrote:
> >> Hi Pieter,
> >>
> >> On Wed, Jan 20, 2016 at 11:43 PM, Pieter Smith <pieter@boesman.nl> wrote:
> >> > This patch-set in 4 parts adds support for building barebox with up to 2
> >> > configurations. It can be used to build the barebox x-loader or MLO (also
> >> > called Secondary Program Loader) in addition to the standard barebox build
> >> > (Tertiary Program Loader). This implements the design proposed in
> >> > http://elinux.org/Buildroot#Todo_list:
> >> > 1. Have boot/barebox/ containing the common stuff.
> >> > 2. Add two separate packages boot/barebox-1/ and boot/barebox-2/.
> >> > 3. There is only one version selection, but each package allows to
> >> >    define the configuration to be used.
> >> > 4. Design is a little bit like package/gcc, where we have multiple gcc builds,
> >> >    but share a lot of common definitions between the packages.
> >> >
> >> > To demonstrate that it works as advertized, the last patch adds a defconfig for
> >> > the beaglebone black that makes use of the added functionality.
> >>
> >> I've applied the patches and built both MLO and barebox.bin binaries.
> >> The patches are working as expected.
> >
> > Glad to hear it.
> >
> >> I have following use case: I have one board, but want provide
> >> different environment scripts per project. These scripts should be
> >> stored in BR2_EXTERNAL folder. I'd like to also embed them into
> >> barebox.bin. How can I do it in BR?
> >
> > If I understand you correctly, you would like to customize the barebox
> > environment integrated into barebox.bin on a per-project basis. This is
> > something I spent a few hours looking into, but I have not found an adequate
> > solution. It may be easier to bake a new buildroot environment and flash that.
> >
> > Will this satisfy your use-case?
> 
> I've found a solution: http://patchwork.ozlabs.org/patch/583444/
> 
> The question is should enable both inetrnel and external env image? I
> think we should keep both in parallel.

I agree with having both in parallel. I have a personal preference for a
baked-in environments. It allows environment resetting with an erase or delete
(not the case with a separate env image). I can however come up with a number
of use-cases where an external env image is useful from a manufacturing
perspective.
 
> Yegor

- Pieter

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 1/4] barebox: prepare for secondary config build
  2016-01-20 22:43 ` [Buildroot] [v3, 1/4] barebox: prepare for secondary config build Pieter Smith
@ 2016-02-22 11:03   ` Yegor Yefremov
  2016-02-26 23:17   ` Arnout Vandecappelle
  1 sibling, 0 replies; 38+ messages in thread
From: Yegor Yefremov @ 2016-02-22 11:03 UTC (permalink / raw)
  To: buildroot

On Wed, Jan 20, 2016 at 11:43 PM, Pieter Smith <pieter@boesman.nl> wrote:
> No functional changes, but prepares barebox for building with two
> configurations (similar to package/gcc).
>
> Signed-off-by: Pieter Smith <pieter@boesman.nl>

Tested-by: Yegor Yefremov <yegorslists@googlemail.com>

> ---
>  boot/barebox/Config.in                | 71 +++++++++++++++++++-----------
>  boot/barebox/barebox-1/barebox-1.hash |  1 +
>  boot/barebox/barebox-1/barebox-1.mk   | 81 +++++++++++++++++++++++++++++++++++
>  boot/barebox/barebox.mk               | 61 +-------------------------
>  4 files changed, 129 insertions(+), 85 deletions(-)
>  create mode 120000 boot/barebox/barebox-1/barebox-1.hash
>  create mode 100644 boot/barebox/barebox-1/barebox-1.mk
>
> diff --git a/boot/barebox/Config.in b/boot/barebox/Config.in
> index 39cb5d2..ed120af 100644
> --- a/boot/barebox/Config.in
> +++ b/boot/barebox/Config.in
> @@ -64,9 +64,52 @@ config BR2_TARGET_BAREBOX_CUSTOM_GIT_VERSION
>
>  endif
>
> +config BR2_TARGET_BAREBOX_BAREBOXENV
> +       bool "bareboxenv tool in target"
> +       help
> +         Install bareboxenv tool in target.
> +
> +config BR2_TARGET_BAREBOX_CUSTOM_ENV
> +       bool "Generate an environment image"
> +       help
> +         Generate a custom environment image. This environment will
> +         contain the variables and scripts to be used at boot by
> +         barebox.
> +
> +config BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH
> +       string "Environment path"
> +       depends on BR2_TARGET_BAREBOX_CUSTOM_ENV
> +       help
> +         Path to the directory containing the custom barebox
> +         environment. Depending on your setup, it will probably be
> +         based on either the content of the defaultenv or
> +         defaultenv-2 directories in the barebox source code, plus
> +         the additions needed. The output will be an image in the
> +         barebox devfs format, stored in the images directory, with
> +         the same name as the directory name given here.
>
>  choice
> -       prompt "Barebox configuration"
> +       prompt "Number of Barebox configurations"
> +       default BR2_TARGET_BAREBOX_SINGLE_CONFIG
> +
> +config BR2_TARGET_BAREBOX_ONE_CONFIG
> +       select BR2_TARGET_BAREBOX_1
> +       bool "Build 1 config"
> +       help
> +         Build only one barebox config.
> +         Useful for building the traditional TPL (Tertiary Program
> +         Loader).
> +
> +endchoice
> +
> +config BR2_TARGET_BAREBOX_1
> +       bool "Barebox configuration 1"
> +       default y
> +
> +if BR2_TARGET_BAREBOX_1
> +
> +choice
> +       prompt "Type of configuration"
>         default BR2_TARGET_BAREBOX_USE_DEFCONFIG
>
>  config BR2_TARGET_BAREBOX_USE_DEFCONFIG
> @@ -78,7 +121,7 @@ config BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG
>  endchoice
>
>  config BR2_TARGET_BAREBOX_BOARD_DEFCONFIG
> -       string "board defconfig"
> +       string "Board defconfig"
>         depends on BR2_TARGET_BAREBOX_USE_DEFCONFIG
>         help
>           Name of the board for which Barebox should be built, without
> @@ -97,28 +140,6 @@ config BR2_TARGET_BAREBOX_CONFIG_FRAGMENT_FILES
>           A space-separated list of configuration fragment files,
>           that will be merged to the main Barebox configuration file.
>
> -config BR2_TARGET_BAREBOX_BAREBOXENV
> -       bool "bareboxenv tool in target"
> -       help
> -         Install bareboxenv tool in target.
> -
> -config BR2_TARGET_BAREBOX_CUSTOM_ENV
> -       bool "Generate an environment image"
> -       help
> -         Generate a custom environment image. This environment will
> -         contain the variables and scripts to be used at boot by
> -         barebox.
> -
> -config BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH
> -       string "Environment path"
> -       depends on BR2_TARGET_BAREBOX_CUSTOM_ENV
> -       help
> -         Path to the directory containing the custom barebox
> -         environment. Depending on your setup, it will probably be
> -         based on either the content of the defaultenv or
> -         defaultenv-2 directories in the barebox source code, plus
> -         the additions needed. The output will be an image in the
> -         barebox devfs format, stored in the images directory, with
> -         the same name as the directory name given here.
> +endif
>
>  endif
> diff --git a/boot/barebox/barebox-1/barebox-1.hash b/boot/barebox/barebox-1/barebox-1.hash
> new file mode 120000
> index 0000000..b6462b8
> --- /dev/null
> +++ b/boot/barebox/barebox-1/barebox-1.hash
> @@ -0,0 +1 @@
> +../barebox.hash
> \ No newline at end of file
> diff --git a/boot/barebox/barebox-1/barebox-1.mk b/boot/barebox/barebox-1/barebox-1.mk
> new file mode 100644
> index 0000000..3374ece
> --- /dev/null
> +++ b/boot/barebox/barebox-1/barebox-1.mk
> @@ -0,0 +1,81 @@
> +################################################################################
> +#
> +# barebox-1
> +#
> +################################################################################
> +
> +BAREBOX_1_VERSION = $(BAREBOX_VERSION)
> +BAREBOX_1_SITE = $(BAREBOX_SITE)
> +BAREBOX_1_SITE_METHOD = $(BAREBOX_SITE_METHOD)
> +BAREBOX_1_SOURCE = $(BAREBOX_SOURCE)
> +BAREBOX_1_DEPENDENCIES = $(BAREBOX_DEPENDENCIES)
> +BAREBOX_1_LICENSE = $(BAREBOX_LICENSE)
> +BAREBOX_1_LICENSE_FILES = $(BAREBOX_LICENSE_FILES)
> +BAREBOX_1_POST_PATCH_HOOKS += $(BAREBOX_POST_PATCH_HOOKS)
> +BAREBOX_1_MAKE_FLAGS = $(BAREBOX_MAKE_FLAGS)
> +BAREBOX_1_MAKE_ENV = $(BAREBOX_MAKE_ENV)
> +BAREBOX_1_INSTALL_IMAGES = $(BAREBOX_INSTALL_IMAGES)
> +
> +ifeq ($(BR2_TARGET_BAREBOX_USE_DEFCONFIG),y)
> +BAREBOX_1_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))_defconfig
> +else ifeq ($(BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG),y)
> +BAREBOX_1_KCONFIG_FILE = $(call qstrip,$(BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE))
> +endif
> +
> +BAREBOX_1_KCONFIG_FRAGMENT_FILES = $(BAREBOX_KCONFIG_FRAGMENT_FILES)
> +BAREBOX_1_KCONFIG_EDITORS = $(BAREBOX_KCONFIG_EDITORS)
> +BAREBOX_1_KCONFIG_OPTS = $(BAREBOX_MAKE_FLAGS)
> +
> +ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
> +define BAREBOX_1_BUILD_BAREBOXENV_CMDS
> +       $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -o $(@D)/bareboxenv \
> +               $(@D)/scripts/bareboxenv.c
> +endef
> +endif
> +
> +ifeq ($(BR2_TARGET_BAREBOX_CUSTOM_ENV),y)
> +BAREBOX_1_ENV_NAME = $(notdir $(call qstrip,\
> +       $(BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH)))
> +define BAREBOX_1_BUILD_CUSTOM_ENV
> +       $(@D)/scripts/bareboxenv -s \
> +               $(call qstrip, $(BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH)) \
> +               $(@D)/$(BAREBOX_1_ENV_NAME)
> +endef
> +define BAREBOX_1_INSTALL_CUSTOM_ENV
> +       cp $(@D)/$(BAREBOX_1_ENV_NAME) $(BINARIES_DIR)
> +endef
> +endif
> +
> +define BAREBOX_1_BUILD_CMDS
> +       $(BAREBOX_1_BUILD_BAREBOXENV_CMDS)
> +       $(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_1_MAKE_FLAGS) -C $(@D)
> +       $(BAREBOX_1_BUILD_CUSTOM_ENV)
> +endef
> +
> +define BAREBOX_1_INSTALL_IMAGES_CMDS
> +       if test -h $(@D)/barebox-flash-image ; then \
> +               cp -L $(@D)/barebox-flash-image $(BINARIES_DIR)/barebox.bin ; \
> +       else \
> +               cp $(@D)/barebox.bin $(BINARIES_DIR);\
> +       fi
> +       $(BAREBOX_1_INSTALL_CUSTOM_ENV)
> +endef
> +
> +ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
> +define BAREBOX_1_INSTALL_TARGET_CMDS
> +       cp $(@D)/bareboxenv $(TARGET_DIR)/usr/bin
> +endef
> +endif
> +
> +# Checks to give errors that the user can understand
> +# Must be before we call to kconfig-package
> +ifeq ($(BR2_TARGET_BAREBOX_2)$(BR_BUILDING),yy)
> +# We must use the user-supplied kconfig value, because
> +# BAREBOX_1_KCONFIG_DEFCONFIG will at least contain the
> +# trailing _defconfig
> +ifeq ($(or $(BAREBOX_1_KCONFIG_FILE),$(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))),)
> +$(error No Barebox config. Check your BR2_TARGET_BAREBOX_BOARD_DEFCONFIG or BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE settings)
> +endif
> +endif
> +
> +$(eval $(kconfig-package))
> diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk
> index 7715daf..55bd187 100644
> --- a/boot/barebox/barebox.mk
> +++ b/boot/barebox/barebox.mk
> @@ -55,66 +55,7 @@ endif
>  BAREBOX_MAKE_FLAGS = ARCH=$(BAREBOX_ARCH) CROSS_COMPILE="$(TARGET_CROSS)"
>  BAREBOX_MAKE_ENV = $(TARGET_MAKE_ENV)
>
> -ifeq ($(BR2_TARGET_BAREBOX_USE_DEFCONFIG),y)
> -BAREBOX_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))_defconfig
> -else ifeq ($(BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG),y)
> -BAREBOX_KCONFIG_FILE = $(call qstrip,$(BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE))
> -endif
> -
>  BAREBOX_KCONFIG_FRAGMENT_FILES = $(call qstrip,$(BR2_TARGET_BAREBOX_CONFIG_FRAGMENT_FILES))
>  BAREBOX_KCONFIG_EDITORS = menuconfig xconfig gconfig nconfig
> -BAREBOX_KCONFIG_OPTS = $(BAREBOX_MAKE_FLAGS)
> -
> -ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
> -define BAREBOX_BUILD_BAREBOXENV_CMDS
> -       $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -o $(@D)/bareboxenv \
> -               $(@D)/scripts/bareboxenv.c
> -endef
> -endif
> -
> -ifeq ($(BR2_TARGET_BAREBOX_CUSTOM_ENV),y)
> -BAREBOX_ENV_NAME = $(notdir $(call qstrip,\
> -       $(BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH)))
> -define BAREBOX_BUILD_CUSTOM_ENV
> -       $(@D)/scripts/bareboxenv -s \
> -               $(call qstrip, $(BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH)) \
> -               $(@D)/$(BAREBOX_ENV_NAME)
> -endef
> -define BAREBOX_INSTALL_CUSTOM_ENV
> -       cp $(@D)/$(BAREBOX_ENV_NAME) $(BINARIES_DIR)
> -endef
> -endif
> -
> -define BAREBOX_BUILD_CMDS
> -       $(BAREBOX_BUILD_BAREBOXENV_CMDS)
> -       $(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D)
> -       $(BAREBOX_BUILD_CUSTOM_ENV)
> -endef
> -
> -define BAREBOX_INSTALL_IMAGES_CMDS
> -       if test -h $(@D)/barebox-flash-image ; then \
> -               cp -L $(@D)/barebox-flash-image $(BINARIES_DIR)/barebox.bin ; \
> -       else \
> -               cp $(@D)/barebox.bin $(BINARIES_DIR);\
> -       fi
> -       $(BAREBOX_INSTALL_CUSTOM_ENV)
> -endef
> -
> -ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
> -define BAREBOX_INSTALL_TARGET_CMDS
> -       cp $(@D)/bareboxenv $(TARGET_DIR)/usr/bin
> -endef
> -endif
> -
> -# Checks to give errors that the user can understand
> -# Must be before we call to kconfig-package
> -ifeq ($(BR2_TARGET_BAREBOX)$(BR_BUILDING),yy)
> -# We must use the user-supplied kconfig value, because
> -# BAREBOX_KCONFIG_DEFCONFIG will at least contain the
> -# trailing _defconfig
> -ifeq ($(or $(BAREBOX_KCONFIG_FILE),$(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))),)
> -$(error No Barebox config. Check your BR2_TARGET_BAREBOX_BOARD_DEFCONFIG or BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE settings)
> -endif
> -endif
>
> -$(eval $(kconfig-package))
> +include $(sort $(wildcard boot/barebox/*/*.mk))
> --
> 2.5.0
>

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 2/4] barebox: adds option to build secondary config
  2016-01-20 22:43 ` [Buildroot] [v3, 2/4] barebox: adds option to build secondary config Pieter Smith
@ 2016-02-22 11:03   ` Yegor Yefremov
  2016-02-26 23:26   ` Arnout Vandecappelle
  1 sibling, 0 replies; 38+ messages in thread
From: Yegor Yefremov @ 2016-02-22 11:03 UTC (permalink / raw)
  To: buildroot

On Wed, Jan 20, 2016 at 11:43 PM, Pieter Smith <pieter@boesman.nl> wrote:
> Support selection of secondary config, but version, source URL and patches are
> shared with barebox bootloader build.
>
> Signed-off-by: Pieter Smith <pieter@boesman.nl>

Tested-by: Yegor Yefremov <yegorslists@googlemail.com>

> ---
>  boot/barebox/Config.in                | 60 ++++++++++++++++++++++++++++++++++-
>  boot/barebox/barebox-2/barebox-2.hash |  1 +
>  boot/barebox/barebox-2/barebox-2.mk   | 54 +++++++++++++++++++++++++++++++
>  3 files changed, 114 insertions(+), 1 deletion(-)
>  create mode 120000 boot/barebox/barebox-2/barebox-2.hash
>  create mode 100644 boot/barebox/barebox-2/barebox-2.mk
>
> diff --git a/boot/barebox/Config.in b/boot/barebox/Config.in
> index ed120af..f848afe 100644
> --- a/boot/barebox/Config.in
> +++ b/boot/barebox/Config.in
> @@ -100,11 +100,20 @@ config BR2_TARGET_BAREBOX_ONE_CONFIG
>           Useful for building the traditional TPL (Tertiary Program
>           Loader).
>
> +config BR2_TARGET_BAREBOX_TWO_CONFIGS
> +       select BR2_TARGET_BAREBOX_1
> +       select BR2_TARGET_BAREBOX_2
> +       bool "Build 2 configs"
> +       help
> +         Build two barebox configurations.
> +         Useful for building an SPL (Secondary Program Loader) in addition to
> +         the traditional TPL (Tertiary Program Loader), such as the X-Loader
> +         or MLO for Texas Instruments processors.
> +
>  endchoice
>
>  config BR2_TARGET_BAREBOX_1
>         bool "Barebox configuration 1"
> -       default y
>
>  if BR2_TARGET_BAREBOX_1
>
> @@ -142,4 +151,53 @@ config BR2_TARGET_BAREBOX_CONFIG_FRAGMENT_FILES
>
>  endif
>
> +if BR2_TARGET_BAREBOX_TWO_CONFIGS
> +
> +config BR2_TARGET_BAREBOX_2
> +       bool "Barebox configuration 2"
> +
> +if BR2_TARGET_BAREBOX_2
> +
> +choice
> +       prompt "Type of configuration"
> +       default BR2_TARGET_BAREBOX_2_USE_DEFCONFIG
> +
> +config BR2_TARGET_BAREBOX_2_USE_DEFCONFIG
> +       bool "Using a defconfig"
> +
> +config BR2_TARGET_BAREBOX_2_USE_CUSTOM_CONFIG
> +       bool "Using a custom config file"
> +
> +endchoice
> +
> +config BR2_TARGET_BAREBOX_2_BOARD_DEFCONFIG
> +       string "Board defconfig"
> +       depends on BR2_TARGET_BAREBOX_2_USE_DEFCONFIG
> +       help
> +         Name of the board for which Barebox should be built, without
> +         the _defconfig suffix.
> +
> +
> +config BR2_TARGET_BAREBOX_2_CUSTOM_CONFIG_FILE
> +       string "Configuration file path"
> +       depends on BR2_TARGET_BAREBOX_2_USE_CUSTOM_CONFIG
> +       help
> +         Path to the barebox configuration file
> +
> +config BR2_TARGET_BAREBOX_2_CONFIG_FRAGMENT_FILES
> +       string "Additional configuration fragment files"
> +       help
> +         A space-separated list of configuration fragment files,
> +         that will be merged to the main Barebox configuration file.
> +
> +config BR2_TARGET_BAREBOX_2_INSTALL_FILENAME
> +       string "Destination image filename in output/images"
> +       default "MLO"
> +       help
> +         Name to give the image in the output/images directory.
> +
> +endif
> +
> +endif
> +
>  endif
> diff --git a/boot/barebox/barebox-2/barebox-2.hash b/boot/barebox/barebox-2/barebox-2.hash
> new file mode 120000
> index 0000000..b6462b8
> --- /dev/null
> +++ b/boot/barebox/barebox-2/barebox-2.hash
> @@ -0,0 +1 @@
> +../barebox.hash
> \ No newline at end of file
> diff --git a/boot/barebox/barebox-2/barebox-2.mk b/boot/barebox/barebox-2/barebox-2.mk
> new file mode 100644
> index 0000000..a735f67
> --- /dev/null
> +++ b/boot/barebox/barebox-2/barebox-2.mk
> @@ -0,0 +1,54 @@
> +################################################################################
> +#
> +# barebox-2
> +#
> +################################################################################
> +
> +BAREBOX_2_VERSION = $(BAREBOX_VERSION)
> +BAREBOX_2_SITE = $(BAREBOX_SITE)
> +BAREBOX_2_SITE_METHOD = $(BAREBOX_SITE_METHOD)
> +BAREBOX_2_SOURCE = $(BAREBOX_SOURCE)
> +BAREBOX_2_DEPENDENCIES = $(BAREBOX_DEPENDENCIES)
> +BAREBOX_2_LICENSE = $(BAREBOX_LICENSE)
> +BAREBOX_2_LICENSE_FILES = $(BAREBOX_LICENSE_FILES)
> +BAREBOX_2_POST_PATCH_HOOKS += $(BAREBOX_POST_PATCH_HOOKS)
> +BAREBOX_2_MAKE_FLAGS = $(BAREBOX_MAKE_FLAGS)
> +BAREBOX_2_MAKE_ENV = $(BAREBOX_MAKE_ENV)
> +BAREBOX_2_INSTALL_IMAGES = $(BAREBOX_INSTALL_IMAGES)
> +BAREBOX_2_INSTALL_DEST = $(BINARIES_DIR)/$(call qstrip,$(BR2_TARGET_BAREBOX_2_INSTALL_FILENAME))
> +
> +ifeq ($(BR2_TARGET_BAREBOX_2_USE_DEFCONFIG),y)
> +BAREBOX_2_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_TARGET_BAREBOX_2_BOARD_DEFCONFIG))_defconfig
> +else ifeq ($(BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG),y)
> +BAREBOX_2_KCONFIG_FILE = $(call qstrip,$(BR2_TARGET_BAREBOX_2_CUSTOM_CONFIG_FILE))
> +endif
> +
> +BAREBOX_2_KCONFIG_FRAGMENT_FILES = $(BAREBOX_KCONFIG_FRAGMENT_FILES)
> +BAREBOX_2_KCONFIG_EDITORS = $(BAREBOX_KCONFIG_EDITORS)
> +BAREBOX_2_KCONFIG_OPTS = $(BAREBOX_MAKE_FLAGS)
> +
> +define BAREBOX_2_BUILD_CMDS
> +       $(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_2_MAKE_FLAGS) -C $(@D)
> +endef
> +
> +define BAREBOX_2_INSTALL_IMAGES_CMDS
> +       if test -h $(@D)/barebox-flash-image ; then \
> +               cp -L $(@D)/barebox-flash-image $(BAREBOX_2_INSTALL_DEST) ; \
> +       else \
> +               cp $(@D)/barebox.bin $(BAREBOX_2_INSTALL_DEST);\
> +       fi
> +endef
> +
> +
> +# Checks to give errors that the user can understand
> +# Must be before we call to kconfig-package
> +ifeq ($(BR2_TARGET_BAREBOX_2)$(BR_BUILDING),yy)
> +# We must use the user-supplied kconfig value, because
> +# BAREBOX_2_KCONFIG_DEFCONFIG will at least contain the
> +# trailing _defconfig
> +ifeq ($(or $(BAREBOX_2_KCONFIG_FILE),$(call qstrip,$(BR2_TARGET_BAREBOX_2_BOARD_DEFCONFIG))),)
> +$(error No Barebox config. Check your BR2_TARGET_BAREBOX_2_BOARD_DEFCONFIG or BR2_TARGET_BAREBOX_2_CUSTOM_CONFIG_FILE settings)
> +endif
> +endif
> +
> +$(eval $(kconfig-package))
> --
> 2.5.0
>

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 3/4] barebox: user selection of build output images
  2016-01-20 22:43 ` [Buildroot] [v3, 3/4] barebox: user selection of build output images Pieter Smith
@ 2016-02-22 11:03   ` Yegor Yefremov
  2016-02-26 23:43   ` Arnout Vandecappelle
  1 sibling, 0 replies; 38+ messages in thread
From: Yegor Yefremov @ 2016-02-22 11:03 UTC (permalink / raw)
  To: buildroot

On Wed, Jan 20, 2016 at 11:43 PM, Pieter Smith <pieter@boesman.nl> wrote:
> A non-default image can be selected as the barebox build output in the images/
> directory. This typically is needed to select the appropriate image generated
> by multi-platform support defconfigs (E.g. am335x).
>
> Signed-off-by: Pieter Smith <pieter@boesman.nl>

Tested-by: Yegor Yefremov <yegorslists@googlemail.com>

> ---
>  boot/barebox/Config.in              | 36 ++++++++++++++++++++++++++++++++++++
>  boot/barebox/barebox-1/barebox-1.mk | 13 +++++++++++--
>  boot/barebox/barebox-2/barebox-2.mk |  7 +++++++
>  3 files changed, 54 insertions(+), 2 deletions(-)
>
> diff --git a/boot/barebox/Config.in b/boot/barebox/Config.in
> index f848afe..fe76f8a 100644
> --- a/boot/barebox/Config.in
> +++ b/boot/barebox/Config.in
> @@ -149,6 +149,24 @@ config BR2_TARGET_BAREBOX_CONFIG_FRAGMENT_FILES
>           A space-separated list of configuration fragment files,
>           that will be merged to the main Barebox configuration file.
>
> +choice
> +       prompt "Barebox image file"
> +       default BR2_TARGET_BAREBOX_USE_DEFAULT_IMAGE
> +
> +config BR2_TARGET_BAREBOX_USE_DEFAULT_IMAGE
> +       bool "Using the default image file"
> +
> +config BR2_TARGET_BAREBOX_USE_SPECIFIC_IMAGE
> +       bool "Using a specific image file"
> +
> +endchoice
> +
> +config BR2_TARGET_BAREBOX_IMAGE_FILE
> +       string "Image file path"
> +       depends on BR2_TARGET_BAREBOX_USE_SPECIFIC_IMAGE
> +       help
> +         Name of the built barebox image file in the barebox images directory
> +
>  endif
>
>  if BR2_TARGET_BAREBOX_TWO_CONFIGS
> @@ -190,6 +208,24 @@ config BR2_TARGET_BAREBOX_2_CONFIG_FRAGMENT_FILES
>           A space-separated list of configuration fragment files,
>           that will be merged to the main Barebox configuration file.
>
> +choice
> +       prompt "Barebox image file"
> +       default BR2_TARGET_BAREBOX_2_USE_DEFAULT_IMAGE
> +
> +config BR2_TARGET_BAREBOX_2_USE_DEFAULT_IMAGE
> +       bool "Using the default image file"
> +
> +config BR2_TARGET_BAREBOX_2_USE_SPECIFIC_IMAGE
> +       bool "Using a specific image file"
> +
> +endchoice
> +
> +config BR2_TARGET_BAREBOX_2_IMAGE_FILE
> +       string "Image file path"
> +       depends on BR2_TARGET_BAREBOX_2_USE_SPECIFIC_IMAGE
> +       help
> +         Name of the built barebox image file in the barebox images directory
> +
>  config BR2_TARGET_BAREBOX_2_INSTALL_FILENAME
>         string "Destination image filename in output/images"
>         default "MLO"
> diff --git a/boot/barebox/barebox-1/barebox-1.mk b/boot/barebox/barebox-1/barebox-1.mk
> index 3374ece..8441842 100644
> --- a/boot/barebox/barebox-1/barebox-1.mk
> +++ b/boot/barebox/barebox-1/barebox-1.mk
> @@ -15,6 +15,7 @@ BAREBOX_1_POST_PATCH_HOOKS += $(BAREBOX_POST_PATCH_HOOKS)
>  BAREBOX_1_MAKE_FLAGS = $(BAREBOX_MAKE_FLAGS)
>  BAREBOX_1_MAKE_ENV = $(BAREBOX_MAKE_ENV)
>  BAREBOX_1_INSTALL_IMAGES = $(BAREBOX_INSTALL_IMAGES)
> +BAREBOX_1_INSTALL_DEST = $(BINARIES_DIR)/barebox.bin
>
>  ifeq ($(BR2_TARGET_BAREBOX_USE_DEFCONFIG),y)
>  BAREBOX_1_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))_defconfig
> @@ -52,14 +53,22 @@ define BAREBOX_1_BUILD_CMDS
>         $(BAREBOX_1_BUILD_CUSTOM_ENV)
>  endef
>
> +ifdef BR2_TARGET_BAREBOX_USE_SPECIFIC_IMAGE
> +define BAREBOX_1_INSTALL_IMAGES_CMDS
> +       cp -L $(@D)/images/$(call qstrip,$(BR2_TARGET_BAREBOX_IMAGE_FILE)) \
> +               $(BAREBOX_1_INSTALL_DEST)
> +       $(BAREBOX_1_INSTALL_CUSTOM_ENV)
> +endef
> +else
>  define BAREBOX_1_INSTALL_IMAGES_CMDS
>         if test -h $(@D)/barebox-flash-image ; then \
> -               cp -L $(@D)/barebox-flash-image $(BINARIES_DIR)/barebox.bin ; \
> +               cp -L $(@D)/barebox-flash-image $(BAREBOX_1_INSTALL_DEST) ; \
>         else \
> -               cp $(@D)/barebox.bin $(BINARIES_DIR);\
> +               cp $(@D)/barebox.bin $(BAREBOX_1_INSTALL_DEST);\
>         fi
>         $(BAREBOX_1_INSTALL_CUSTOM_ENV)
>  endef
> +endif
>
>  ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
>  define BAREBOX_1_INSTALL_TARGET_CMDS
> diff --git a/boot/barebox/barebox-2/barebox-2.mk b/boot/barebox/barebox-2/barebox-2.mk
> index a735f67..71e0266 100644
> --- a/boot/barebox/barebox-2/barebox-2.mk
> +++ b/boot/barebox/barebox-2/barebox-2.mk
> @@ -31,6 +31,12 @@ define BAREBOX_2_BUILD_CMDS
>         $(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_2_MAKE_FLAGS) -C $(@D)
>  endef
>
> +ifdef BR2_TARGET_BAREBOX_2_USE_SPECIFIC_IMAGE
> +define BAREBOX_2_INSTALL_IMAGES_CMDS
> +       cp -L $(@D)/images/$(call qstrip,$(BR2_TARGET_BAREBOX_2_IMAGE_FILE)) \
> +               $(BAREBOX_2_INSTALL_DEST)
> +endef
> +else
>  define BAREBOX_2_INSTALL_IMAGES_CMDS
>         if test -h $(@D)/barebox-flash-image ; then \
>                 cp -L $(@D)/barebox-flash-image $(BAREBOX_2_INSTALL_DEST) ; \
> @@ -38,6 +44,7 @@ define BAREBOX_2_INSTALL_IMAGES_CMDS
>                 cp $(@D)/barebox.bin $(BAREBOX_2_INSTALL_DEST);\
>         fi
>  endef
> +endif
>
>
>  # Checks to give errors that the user can understand
> --
> 2.5.0
>

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 4/4] beaglebone: adds barebox bootloader defconfig
  2016-01-20 22:43 ` [Buildroot] [v3, 4/4] beaglebone: adds barebox bootloader defconfig Pieter Smith
@ 2016-02-22 11:04   ` Yegor Yefremov
  2016-02-26 23:47   ` Arnout Vandecappelle
  1 sibling, 0 replies; 38+ messages in thread
From: Yegor Yefremov @ 2016-02-22 11:04 UTC (permalink / raw)
  To: buildroot

On Wed, Jan 20, 2016 at 11:43 PM, Pieter Smith <pieter@boesman.nl> wrote:
> * Builds barebox MLO and the barebox bootloader.
> * Barebox integrates a perfectly good device-tree for the bbb, so no dtb is
>   being generated with the kernel.
>
> Signed-off-by: Pieter Smith <pieter@boesman.nl>

Tested-by: Yegor Yefremov <yegorslists@googlemail.com>

> ---
>  configs/beaglebone_barebox_defconfig | 39 ++++++++++++++++++++++++++++++++++++
>  1 file changed, 39 insertions(+)
>  create mode 100644 configs/beaglebone_barebox_defconfig
>
> diff --git a/configs/beaglebone_barebox_defconfig b/configs/beaglebone_barebox_defconfig
> new file mode 100644
> index 0000000..b4fd67b
> --- /dev/null
> +++ b/configs/beaglebone_barebox_defconfig
> @@ -0,0 +1,39 @@
> +# architecture
> +BR2_arm=y
> +BR2_cortex_a8=y
> +BR2_ARM_EABIHF=y
> +
> +# system
> +BR2_TARGET_GENERIC_HOSTNAME="beaglebone"
> +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y
> +BR2_TARGET_GENERIC_GETTY_PORT="ttyO0"
> +# BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set
> +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/beaglebone/post-image.sh"
> +
> +# filesystem
> +BR2_PACKAGE_AM33X_CM3=y
> +BR2_TARGET_ROOTFS_EXT2=y
> +# BR2_TARGET_ROOTFS_TAR is not set
> +
> +# lock down headers to avoid breaking with new defaults
> +BR2_KERNEL_HEADERS_VERSION=y
> +BR2_DEFAULT_KERNEL_VERSION="3.12.10"
> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_12=y
> +
> +# bootloader
> +BR2_TARGET_BAREBOX_TWO_CONFIGS=y
> +BR2_TARGET_BAREBOX=y
> +BR2_TARGET_BAREBOX_BOARD_DEFCONFIG="am335x"
> +BR2_TARGET_BAREBOX_USE_SPECIFIC_IMAGE=y
> +BR2_TARGET_BAREBOX_IMAGE_FILE="barebox-am33xx-beaglebone.img"
> +BR2_TARGET_BAREBOX_2=y
> +BR2_TARGET_BAREBOX_2_BOARD_DEFCONFIG="am335x_mlo"
> +BR2_TARGET_BAREBOX_2_USE_SPECIFIC_IMAGE=y
> +BR2_TARGET_BAREBOX_2_IMAGE_FILE="barebox-am33xx-beaglebone-mlo.img"
> +
> +# kernel
> +BR2_LINUX_KERNEL=y
> +BR2_LINUX_KERNEL_LATEST_VERSION=y
> +BR2_LINUX_KERNEL_USE_DEFCONFIG=y
> +BR2_LINUX_KERNEL_DEFCONFIG="omap2plus"
> +BR2_LINUX_KERNEL_ZIMAGE=y
> --
> 2.5.0
>

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 1/4] barebox: prepare for secondary config build
  2016-01-20 22:43 ` [Buildroot] [v3, 1/4] barebox: prepare for secondary config build Pieter Smith
  2016-02-22 11:03   ` Yegor Yefremov
@ 2016-02-26 23:17   ` Arnout Vandecappelle
  2016-02-28  8:12     ` Pieter Smith
  2016-02-29  7:57     ` Pieter Smith
  1 sibling, 2 replies; 38+ messages in thread
From: Arnout Vandecappelle @ 2016-02-26 23:17 UTC (permalink / raw)
  To: buildroot

On 01/20/16 23:43, Pieter Smith wrote:
> No functional changes, but prepares barebox for building with two
> configurations (similar to package/gcc).
> 
> Signed-off-by: Pieter Smith <pieter@boesman.nl>
> ---
>  boot/barebox/Config.in                | 71 +++++++++++++++++++-----------
>  boot/barebox/barebox-1/barebox-1.hash |  1 +
>  boot/barebox/barebox-1/barebox-1.mk   | 81 +++++++++++++++++++++++++++++++++++
>  boot/barebox/barebox.mk               | 61 +-------------------------
>  4 files changed, 129 insertions(+), 85 deletions(-)
>  create mode 120000 boot/barebox/barebox-1/barebox-1.hash
>  create mode 100644 boot/barebox/barebox-1/barebox-1.mk
> 
> diff --git a/boot/barebox/Config.in b/boot/barebox/Config.in
> index 39cb5d2..ed120af 100644
> --- a/boot/barebox/Config.in
> +++ b/boot/barebox/Config.in
> @@ -64,9 +64,52 @@ config BR2_TARGET_BAREBOX_CUSTOM_GIT_VERSION
>  
>  endif
>  
[snip]
>  
>  choice
> -	prompt "Barebox configuration"
> +	prompt "Number of Barebox configurations"
> +	default BR2_TARGET_BAREBOX_SINGLE_CONFIG
> +
> +config BR2_TARGET_BAREBOX_ONE_CONFIG
> +	select BR2_TARGET_BAREBOX_1
> +	bool "Build 1 config"
> +	help
> +	  Build only one barebox config.
> +	  Useful for building the traditional TPL (Tertiary Program
> +	  Loader).
> +
> +endchoice

 There is no need for this choice. You always need barebox-1 anyway. So you can
actually keep the Config.in as it is, and add the second barebox configuration
at the end.

> +
> +config BR2_TARGET_BAREBOX_1
> +	bool "Barebox configuration 1"
> +	default y
> +
> +if BR2_TARGET_BAREBOX_1
> +
> +choice
> +	prompt "Type of configuration"
>  	default BR2_TARGET_BAREBOX_USE_DEFCONFIG
>  
>  config BR2_TARGET_BAREBOX_USE_DEFCONFIG
> @@ -78,7 +121,7 @@ config BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG
>  endchoice
>  
>  config BR2_TARGET_BAREBOX_BOARD_DEFCONFIG
> -	string "board defconfig"
> +	string "Board defconfig"

 Why change the capitalisation? Should be a separate patch.

>  	depends on BR2_TARGET_BAREBOX_USE_DEFCONFIG
>  	help
>  	  Name of the board for which Barebox should be built, without
> @@ -97,28 +140,6 @@ config BR2_TARGET_BAREBOX_CONFIG_FRAGMENT_FILES
>  	  A space-separated list of configuration fragment files,
>  	  that will be merged to the main Barebox configuration file.
>  
[snip]
> diff --git a/boot/barebox/barebox-1/barebox-1.mk b/boot/barebox/barebox-1/barebox-1.mk
> new file mode 100644
> index 0000000..3374ece
> --- /dev/null
> +++ b/boot/barebox/barebox-1/barebox-1.mk
> @@ -0,0 +1,81 @@
> +################################################################################
> +#
> +# barebox-1
> +#
> +################################################################################
> +
> +BAREBOX_1_VERSION = $(BAREBOX_VERSION)
> +BAREBOX_1_SITE = $(BAREBOX_SITE)
> +BAREBOX_1_SITE_METHOD = $(BAREBOX_SITE_METHOD)
> +BAREBOX_1_SOURCE = $(BAREBOX_SOURCE)
> +BAREBOX_1_DEPENDENCIES = $(BAREBOX_DEPENDENCIES)
> +BAREBOX_1_LICENSE = $(BAREBOX_LICENSE)
> +BAREBOX_1_LICENSE_FILES = $(BAREBOX_LICENSE_FILES)
> +BAREBOX_1_POST_PATCH_HOOKS += $(BAREBOX_POST_PATCH_HOOKS)
> +BAREBOX_1_MAKE_FLAGS = $(BAREBOX_MAKE_FLAGS)
> +BAREBOX_1_MAKE_ENV = $(BAREBOX_MAKE_ENV)

 MAKE_FLAGS and MAKE_ENV are only used in the commands below, so no need to
define a barebox-1 version.

> +BAREBOX_1_INSTALL_IMAGES = $(BAREBOX_INSTALL_IMAGES)

 This is just YES, it's a bit silly to add an extra variable for that.

> +
> +ifeq ($(BR2_TARGET_BAREBOX_USE_DEFCONFIG),y)
> +BAREBOX_1_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))_defconfig
> +else ifeq ($(BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG),y)
> +BAREBOX_1_KCONFIG_FILE = $(call qstrip,$(BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE))
> +endif
> +
> +BAREBOX_1_KCONFIG_FRAGMENT_FILES = $(BAREBOX_KCONFIG_FRAGMENT_FILES)
> +BAREBOX_1_KCONFIG_EDITORS = $(BAREBOX_KCONFIG_EDITORS)
> +BAREBOX_1_KCONFIG_OPTS = $(BAREBOX_MAKE_FLAGS)
> +
> +ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
> +define BAREBOX_1_BUILD_BAREBOXENV_CMDS
> +	$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -o $(@D)/bareboxenv \
> +		$(@D)/scripts/bareboxenv.c
> +endef
> +endif
> +
> +ifeq ($(BR2_TARGET_BAREBOX_CUSTOM_ENV),y)
> +BAREBOX_1_ENV_NAME = $(notdir $(call qstrip,\
> +	$(BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH)))
> +define BAREBOX_1_BUILD_CUSTOM_ENV
> +	$(@D)/scripts/bareboxenv -s \
> +		$(call qstrip, $(BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH)) \
> +		$(@D)/$(BAREBOX_1_ENV_NAME)
> +endef
> +define BAREBOX_1_INSTALL_CUSTOM_ENV
> +	cp $(@D)/$(BAREBOX_1_ENV_NAME) $(BINARIES_DIR)
> +endef
> +endif
> +
> +define BAREBOX_1_BUILD_CMDS
> +	$(BAREBOX_1_BUILD_BAREBOXENV_CMDS)
> +	$(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_1_MAKE_FLAGS) -C $(@D)
> +	$(BAREBOX_1_BUILD_CUSTOM_ENV)
> +endef

 BAREBOX_1_BUILD_CMDS and BAREBOX_2_BUILD_CMDS are very similar. You can
refactor them as follows (I think):

define BAREBOX_BUILD_CMDS
	$($(PKG)_BUILD_BAREBOXENV_CMDS)
	$(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D)
	$($(PKG)_BUILD_CUSTOM_ENV)
endef
BAREBOX_1_BUILD_CMDS = $(BAREBOX_BUILD_CMDS)
BAREBOX_2_BUILD_CMDS = $(BAREBOX_BUILD_CMDS)

 Since BAREBOX_2_BUILD_BAREBOXENV_CMDS isn't defined, that line will just
disappear, leaving just the make command for barebox-2.

 Same for the others below.

 Note that introducing the $(PKG) bits should be a separate patch, not together
with the move to barebox-1.

> +
> +define BAREBOX_1_INSTALL_IMAGES_CMDS
> +	if test -h $(@D)/barebox-flash-image ; then \
> +		cp -L $(@D)/barebox-flash-image $(BINARIES_DIR)/barebox.bin ; \
> +	else \
> +		cp $(@D)/barebox.bin $(BINARIES_DIR);\
> +	fi
> +	$(BAREBOX_1_INSTALL_CUSTOM_ENV)
> +endef
> +
> +ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
> +define BAREBOX_1_INSTALL_TARGET_CMDS
> +	cp $(@D)/bareboxenv $(TARGET_DIR)/usr/bin
> +endef
> +endif
> +
> +# Checks to give errors that the user can understand
> +# Must be before we call to kconfig-package
> +ifeq ($(BR2_TARGET_BAREBOX_2)$(BR_BUILDING),yy)

 BAREBOX_1 here.

> +# We must use the user-supplied kconfig value, because
> +# BAREBOX_1_KCONFIG_DEFCONFIG will at least contain the
> +# trailing _defconfig
> +ifeq ($(or $(BAREBOX_1_KCONFIG_FILE),$(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))),)
> +$(error No Barebox config. Check your BR2_TARGET_BAREBOX_BOARD_DEFCONFIG or BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE settings)
> +endif
> +endif
> +
> +$(eval $(kconfig-package))

 I wonder if it wouldn't be possible to keep barebox.mk unchanged, and just add
at the end (after the kconfig-package):

include boot/barebox/barebox-2/barebox-2.mk

 That's not entirely similar to gcc, but it's more consistent with what it
means. You always have the barebox package, and you have an optional extra
barebox-2 package which is a kind of submodule of barebox. Note however that we
currently don't have this pattern at all, so it could be controversial. But I
think it will simplify the patch a lot, and also simplify the logic.

 So in that case, you'd have a first patch that adds the required refactorings
in barebox.mk so the same variables are useable for barebox-2, and a second
patch that adds barebox-2 (and patches 3 and 4 stay the same of course).


 This is complicated stuff, thanks for working on this, and sorry that it's
taking so long!

 Regards,
 Arnout

[snip]

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 2/4] barebox: adds option to build secondary config
  2016-01-20 22:43 ` [Buildroot] [v3, 2/4] barebox: adds option to build secondary config Pieter Smith
  2016-02-22 11:03   ` Yegor Yefremov
@ 2016-02-26 23:26   ` Arnout Vandecappelle
  2016-02-29  8:01     ` Pieter Smith
  1 sibling, 1 reply; 38+ messages in thread
From: Arnout Vandecappelle @ 2016-02-26 23:26 UTC (permalink / raw)
  To: buildroot

On 01/20/16 23:43, Pieter Smith wrote:
> Support selection of secondary config, but version, source URL and patches are
> shared with barebox bootloader build.
> 
> Signed-off-by: Pieter Smith <pieter@boesman.nl>
> ---
>  boot/barebox/Config.in                | 60 ++++++++++++++++++++++++++++++++++-
>  boot/barebox/barebox-2/barebox-2.hash |  1 +
>  boot/barebox/barebox-2/barebox-2.mk   | 54 +++++++++++++++++++++++++++++++
>  3 files changed, 114 insertions(+), 1 deletion(-)
>  create mode 120000 boot/barebox/barebox-2/barebox-2.hash
>  create mode 100644 boot/barebox/barebox-2/barebox-2.mk
> 
> diff --git a/boot/barebox/Config.in b/boot/barebox/Config.in
> index ed120af..f848afe 100644
> --- a/boot/barebox/Config.in
> +++ b/boot/barebox/Config.in
> @@ -100,11 +100,20 @@ config BR2_TARGET_BAREBOX_ONE_CONFIG
>  	  Useful for building the traditional TPL (Tertiary Program
>  	  Loader).
>  
> +config BR2_TARGET_BAREBOX_TWO_CONFIGS
> +	select BR2_TARGET_BAREBOX_1
> +	select BR2_TARGET_BAREBOX_2
> +	bool "Build 2 configs"
> +	help
> +	  Build two barebox configurations.
> +	  Useful for building an SPL (Secondary Program Loader) in addition to
> +	  the traditional TPL (Tertiary Program Loader), such as the X-Loader
> +	  or MLO for Texas Instruments processors.
> +
>  endchoice
>  
>  config BR2_TARGET_BAREBOX_1
>  	bool "Barebox configuration 1"
> -	default y
>  
>  if BR2_TARGET_BAREBOX_1
>  
> @@ -142,4 +151,53 @@ config BR2_TARGET_BAREBOX_CONFIG_FRAGMENT_FILES
>  
>  endif
>  
> +if BR2_TARGET_BAREBOX_TWO_CONFIGS
> +
> +config BR2_TARGET_BAREBOX_2
> +	bool "Barebox configuration 2"

 So, if you remove the choice, then this config should stay and be called
something like "build second Barebox configuration", with the help text from
BR2_TARGET_BAREBOX_TWO_CONFIGS.

 And if the option of keeping barebox and just adding barebox-2 works out, then
this can also go into a separate Config.in file in the barebox-2 directory,
which is source'd from here.

 Also, it should be a menuconfig instead, since there are 5 entries.

> +
> +if BR2_TARGET_BAREBOX_2
> +
> +choice
> +	prompt "Type of configuration"
> +	default BR2_TARGET_BAREBOX_2_USE_DEFCONFIG
> +
> +config BR2_TARGET_BAREBOX_2_USE_DEFCONFIG
> +	bool "Using a defconfig"
> +
> +config BR2_TARGET_BAREBOX_2_USE_CUSTOM_CONFIG
> +	bool "Using a custom config file"
> +
> +endchoice
> +
> +config BR2_TARGET_BAREBOX_2_BOARD_DEFCONFIG
> +	string "Board defconfig"
> +	depends on BR2_TARGET_BAREBOX_2_USE_DEFCONFIG
> +	help
> +	  Name of the board for which Barebox should be built, without
> +	  the _defconfig suffix.
> +
> +

 Spurious line here.


 Regards,
 Arnout

> +config BR2_TARGET_BAREBOX_2_CUSTOM_CONFIG_FILE
> +	string "Configuration file path"
> +	depends on BR2_TARGET_BAREBOX_2_USE_CUSTOM_CONFIG
> +	help
> +	  Path to the barebox configuration file
> +
> +config BR2_TARGET_BAREBOX_2_CONFIG_FRAGMENT_FILES
> +	string "Additional configuration fragment files"
> +	help
> +	  A space-separated list of configuration fragment files,
> +	  that will be merged to the main Barebox configuration file.
> +
> +config BR2_TARGET_BAREBOX_2_INSTALL_FILENAME
> +	string "Destination image filename in output/images"
> +	default "MLO"
> +	help
> +	  Name to give the image in the output/images directory.
> +
> +endif
> +
> +endif
> +
>  endif
[snip]


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 3/4] barebox: user selection of build output images
  2016-01-20 22:43 ` [Buildroot] [v3, 3/4] barebox: user selection of build output images Pieter Smith
  2016-02-22 11:03   ` Yegor Yefremov
@ 2016-02-26 23:43   ` Arnout Vandecappelle
  2016-02-29  8:38     ` Pieter Smith
  1 sibling, 1 reply; 38+ messages in thread
From: Arnout Vandecappelle @ 2016-02-26 23:43 UTC (permalink / raw)
  To: buildroot

On 01/20/16 23:43, Pieter Smith wrote:
> A non-default image can be selected as the barebox build output in the images/
> directory. This typically is needed to select the appropriate image generated
> by multi-platform support defconfigs (E.g. am335x).
> 
> Signed-off-by: Pieter Smith <pieter@boesman.nl>
> ---
>  boot/barebox/Config.in              | 36 ++++++++++++++++++++++++++++++++++++
>  boot/barebox/barebox-1/barebox-1.mk | 13 +++++++++++--
>  boot/barebox/barebox-2/barebox-2.mk |  7 +++++++
>  3 files changed, 54 insertions(+), 2 deletions(-)
> 
> diff --git a/boot/barebox/Config.in b/boot/barebox/Config.in
> index f848afe..fe76f8a 100644
> --- a/boot/barebox/Config.in
> +++ b/boot/barebox/Config.in
> @@ -149,6 +149,24 @@ config BR2_TARGET_BAREBOX_CONFIG_FRAGMENT_FILES
>  	  A space-separated list of configuration fragment files,
>  	  that will be merged to the main Barebox configuration file.
>  
> +choice
> +	prompt "Barebox image file"
> +	default BR2_TARGET_BAREBOX_USE_DEFAULT_IMAGE
> +
> +config BR2_TARGET_BAREBOX_USE_DEFAULT_IMAGE
> +	bool "Using the default image file"
> +
> +config BR2_TARGET_BAREBOX_USE_SPECIFIC_IMAGE
> +	bool "Using a specific image file"
> +
> +endchoice
> +
> +config BR2_TARGET_BAREBOX_IMAGE_FILE
> +	string "Image file path"
> +	depends on BR2_TARGET_BAREBOX_USE_SPECIFIC_IMAGE
> +	help
> +	  Name of the built barebox image file in the barebox images directory
> +
>  endif

 If we deprecate barebox pre-2012.10, then we can simplify this a lot:

config BR2_TARGET_BAREBOX_IMAGE_FILE
	string "Image file path"
	default "barebox-flash-image"
	help
	  Name of the built barebox image file in the barebox images directory


 Even if we don't want to deprecate barebox pre-2012.10, I'd prefer to keep this
simple config and do the handling of legacy barebox.bin in the .mk file. For
pre-2012.10, you'd have to explicitly set it to barebox.bin instead (which
should be mentioned in the help text then).

 We should find a good way to deal with the images/ part of the path, however.
This could e.g. be done in the .mk file, by checking both the top dir and the
images dir.


 Regards,
 Arnout


[snip]


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 4/4] beaglebone: adds barebox bootloader defconfig
  2016-01-20 22:43 ` [Buildroot] [v3, 4/4] beaglebone: adds barebox bootloader defconfig Pieter Smith
  2016-02-22 11:04   ` Yegor Yefremov
@ 2016-02-26 23:47   ` Arnout Vandecappelle
  2016-02-26 23:48     ` Arnout Vandecappelle
  2016-02-29  8:44     ` Pieter Smith
  1 sibling, 2 replies; 38+ messages in thread
From: Arnout Vandecappelle @ 2016-02-26 23:47 UTC (permalink / raw)
  To: buildroot

On 01/20/16 23:43, Pieter Smith wrote:
> * Builds barebox MLO and the barebox bootloader.
> * Barebox integrates a perfectly good device-tree for the bbb, so no dtb is
>   being generated with the kernel.
> 
> Signed-off-by: Pieter Smith <pieter@boesman.nl>
> ---
>  configs/beaglebone_barebox_defconfig | 39 ++++++++++++++++++++++++++++++++++++
>  1 file changed, 39 insertions(+)
>  create mode 100644 configs/beaglebone_barebox_defconfig
> 
> diff --git a/configs/beaglebone_barebox_defconfig b/configs/beaglebone_barebox_defconfig
> new file mode 100644
> index 0000000..b4fd67b
> --- /dev/null
> +++ b/configs/beaglebone_barebox_defconfig
> @@ -0,0 +1,39 @@
> +# architecture
> +BR2_arm=y
> +BR2_cortex_a8=y
> +BR2_ARM_EABIHF=y
> +
> +# system
> +BR2_TARGET_GENERIC_HOSTNAME="beaglebone"
> +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y
> +BR2_TARGET_GENERIC_GETTY_PORT="ttyO0"
> +# BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set
> +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/beaglebone/post-image.sh"
> +
> +# filesystem
> +BR2_PACKAGE_AM33X_CM3=y
> +BR2_TARGET_ROOTFS_EXT2=y
> +# BR2_TARGET_ROOTFS_TAR is not set
> +
> +# lock down headers to avoid breaking with new defaults
> +BR2_KERNEL_HEADERS_VERSION=y
> +BR2_DEFAULT_KERNEL_VERSION="3.12.10"
> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_12=y
> +
> +# bootloader
> +BR2_TARGET_BAREBOX_TWO_CONFIGS=y
> +BR2_TARGET_BAREBOX=y
> +BR2_TARGET_BAREBOX_BOARD_DEFCONFIG="am335x"
> +BR2_TARGET_BAREBOX_USE_SPECIFIC_IMAGE=y
> +BR2_TARGET_BAREBOX_IMAGE_FILE="barebox-am33xx-beaglebone.img"
> +BR2_TARGET_BAREBOX_2=y
> +BR2_TARGET_BAREBOX_2_BOARD_DEFCONFIG="am335x_mlo"
> +BR2_TARGET_BAREBOX_2_USE_SPECIFIC_IMAGE=y
> +BR2_TARGET_BAREBOX_2_IMAGE_FILE="barebox-am33xx-beaglebone-mlo.img"
> +
> +# kernel
> +BR2_LINUX_KERNEL=y
> +BR2_LINUX_KERNEL_LATEST_VERSION=y

 Kernel version should be locked down as well.

> +BR2_LINUX_KERNEL_USE_DEFCONFIG=y
> +BR2_LINUX_KERNEL_DEFCONFIG="omap2plus"
> +BR2_LINUX_KERNEL_ZIMAGE=y

 Perhaps add a comment here that the dtb from barebox will be used.

 Regards,
 Arnout

> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 4/4] beaglebone: adds barebox bootloader defconfig
  2016-02-26 23:47   ` Arnout Vandecappelle
@ 2016-02-26 23:48     ` Arnout Vandecappelle
  2016-02-29  8:44     ` Pieter Smith
  1 sibling, 0 replies; 38+ messages in thread
From: Arnout Vandecappelle @ 2016-02-26 23:48 UTC (permalink / raw)
  To: buildroot

On 02/27/16 00:47, Arnout Vandecappelle wrote:
> On 01/20/16 23:43, Pieter Smith wrote:
>> * Builds barebox MLO and the barebox bootloader.
>> * Barebox integrates a perfectly good device-tree for the bbb, so no dtb is
>>   being generated with the kernel.
>>
>> Signed-off-by: Pieter Smith <pieter@boesman.nl>
>> ---
>>  configs/beaglebone_barebox_defconfig | 39 ++++++++++++++++++++++++++++++++++++
>>  1 file changed, 39 insertions(+)
>>  create mode 100644 configs/beaglebone_barebox_defconfig
>>
>> diff --git a/configs/beaglebone_barebox_defconfig b/configs/beaglebone_barebox_defconfig
>> new file mode 100644
>> index 0000000..b4fd67b
>> --- /dev/null
>> +++ b/configs/beaglebone_barebox_defconfig
>> @@ -0,0 +1,39 @@
>> +# architecture
>> +BR2_arm=y
>> +BR2_cortex_a8=y
>> +BR2_ARM_EABIHF=y
>> +
>> +# system
>> +BR2_TARGET_GENERIC_HOSTNAME="beaglebone"
>> +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y
>> +BR2_TARGET_GENERIC_GETTY_PORT="ttyO0"
>> +# BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set
>> +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/beaglebone/post-image.sh"
>> +
>> +# filesystem
>> +BR2_PACKAGE_AM33X_CM3=y
>> +BR2_TARGET_ROOTFS_EXT2=y
>> +# BR2_TARGET_ROOTFS_TAR is not set
>> +
>> +# lock down headers to avoid breaking with new defaults
>> +BR2_KERNEL_HEADERS_VERSION=y
>> +BR2_DEFAULT_KERNEL_VERSION="3.12.10"
>> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_12=y

 Oh, and this should be SAME_AS_KERNEL of course.

 Regards,
 Arnout

>> +
>> +# bootloader
>> +BR2_TARGET_BAREBOX_TWO_CONFIGS=y
>> +BR2_TARGET_BAREBOX=y
>> +BR2_TARGET_BAREBOX_BOARD_DEFCONFIG="am335x"
>> +BR2_TARGET_BAREBOX_USE_SPECIFIC_IMAGE=y
>> +BR2_TARGET_BAREBOX_IMAGE_FILE="barebox-am33xx-beaglebone.img"
>> +BR2_TARGET_BAREBOX_2=y
>> +BR2_TARGET_BAREBOX_2_BOARD_DEFCONFIG="am335x_mlo"
>> +BR2_TARGET_BAREBOX_2_USE_SPECIFIC_IMAGE=y
>> +BR2_TARGET_BAREBOX_2_IMAGE_FILE="barebox-am33xx-beaglebone-mlo.img"
>> +
>> +# kernel
>> +BR2_LINUX_KERNEL=y
>> +BR2_LINUX_KERNEL_LATEST_VERSION=y
> 
>  Kernel version should be locked down as well.
> 
>> +BR2_LINUX_KERNEL_USE_DEFCONFIG=y
>> +BR2_LINUX_KERNEL_DEFCONFIG="omap2plus"
>> +BR2_LINUX_KERNEL_ZIMAGE=y
> 
>  Perhaps add a comment here that the dtb from barebox will be used.
> 
>  Regards,
>  Arnout
> 
>>
> 
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 1/4] barebox: prepare for secondary config build
  2016-02-26 23:17   ` Arnout Vandecappelle
@ 2016-02-28  8:12     ` Pieter Smith
  2016-02-29  7:47       ` Pieter Smith
  2016-02-29  7:57     ` Pieter Smith
  1 sibling, 1 reply; 38+ messages in thread
From: Pieter Smith @ 2016-02-28  8:12 UTC (permalink / raw)
  To: buildroot

On Sat, Feb 27, 2016 at 12:17:15AM +0100, Arnout Vandecappelle wrote:
> On 01/20/16 23:43, Pieter Smith wrote:
[snip] 
>  I wonder if it wouldn't be possible to keep barebox.mk unchanged, and just add
> at the end (after the kconfig-package):
> 
> include boot/barebox/barebox-2/barebox-2.mk
> 
>  That's not entirely similar to gcc, but it's more consistent with what it
> means. You always have the barebox package, and you have an optional extra
> barebox-2 package which is a kind of submodule of barebox. Note however that we
> currently don't have this pattern at all, so it could be controversial. But I
> think it will simplify the patch a lot, and also simplify the logic.
> 
>  So in that case, you'd have a first patch that adds the required refactorings
> in barebox.mk so the same variables are useable for barebox-2, and a second
> patch that adds barebox-2 (and patches 3 and 4 stay the same of course).

Yes. Thanks. A lot less messy. I started looking into this. It seems doable. It
might be neater to still split a barebox-common.mk to avoid a long list of
variable copies. Give me a day on this.

>  This is complicated stuff, thanks for working on this, and sorry that it's
> taking so long!
> 
>  Regards,
>  Arnout
> 
> [snip]
> 
> -- 
> Arnout Vandecappelle                          arnout at mind be
> Senior Embedded Software Architect            +32-16-286500
> Essensium/Mind                                http://www.mind.be
> G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
> LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
> GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

- Pieter

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 1/4] barebox: prepare for secondary config build
  2016-02-28  8:12     ` Pieter Smith
@ 2016-02-29  7:47       ` Pieter Smith
  2016-03-01 23:08         ` Arnout Vandecappelle
  0 siblings, 1 reply; 38+ messages in thread
From: Pieter Smith @ 2016-02-29  7:47 UTC (permalink / raw)
  To: buildroot

On Sun, Feb 28, 2016 at 09:12:04AM +0100, Pieter Smith wrote:
> On Sat, Feb 27, 2016 at 12:17:15AM +0100, Arnout Vandecappelle wrote:
> > On 01/20/16 23:43, Pieter Smith wrote:
> [snip] 
> >  I wonder if it wouldn't be possible to keep barebox.mk unchanged, and just add
> > at the end (after the kconfig-package):
> > 
> > include boot/barebox/barebox-2/barebox-2.mk
> > 
> >  That's not entirely similar to gcc, but it's more consistent with what it
> > means. You always have the barebox package, and you have an optional extra
> > barebox-2 package which is a kind of submodule of barebox. Note however that we
> > currently don't have this pattern at all, so it could be controversial. But I
> > think it will simplify the patch a lot, and also simplify the logic.
> > 
> >  So in that case, you'd have a first patch that adds the required refactorings
> > in barebox.mk so the same variables are useable for barebox-2, and a second
> > patch that adds barebox-2 (and patches 3 and 4 stay the same of course).
> 
> Yes. Thanks. A lot less messy. I started looking into this. It seems doable. It
> might be neater to still split a barebox-common.mk to avoid a long list of
> variable copies. Give me a day on this.
 
Thanks for the suggestion. It is shaping up nicely. There is one aspect that I
would appreciate input on: To all but completely eliminate duplication in the
makefiles for the two packages, I am wrapping all the current functionality in
boot/barebox/barebox.mk in a parameterized barebox-package function. E.g.:

  define barebox-package
  $(1)_VERSION = $$(call qstrip,$$(BR2_TARGET_BAREBOX_VERSION))
  ...
  $$(eval $$(kconfig-package))
  endef
  $(eval $(call barebox-package,BAREBOX))

And the whole of boot/barebox/barebox-2/barebox-2.mk becomes:

  $(eval $(call barebox-package,BAREBOX_2))

This however cannot avoid Config.in duplication, but the barebox-2 makefile
inherits all future barebox makefile improvements. The catch is that existing
barebox patches will have merge conflicts.

I already tied up with Yegor on the embedded custom environment patch-set,
which he is willing to rebase + solve the merge conflicts. We can then submit
the series with Yegor's patch and a barebox defconfig for the Beaglebone Black
as per your suggestion.

Do you think this is acceptable?

> >  This is complicated stuff, thanks for working on this, and sorry that it's
> > taking so long!
> > 
> >  Regards,
> >  Arnout
> > 
> > [snip]
> > 
> > -- 
> > Arnout Vandecappelle                          arnout at mind be
> > Senior Embedded Software Architect            +32-16-286500
> > Essensium/Mind                                http://www.mind.be
> > G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
> > LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
> > GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
> 
> - Pieter
- Pieter

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 1/4] barebox: prepare for secondary config build
  2016-02-26 23:17   ` Arnout Vandecappelle
  2016-02-28  8:12     ` Pieter Smith
@ 2016-02-29  7:57     ` Pieter Smith
  1 sibling, 0 replies; 38+ messages in thread
From: Pieter Smith @ 2016-02-29  7:57 UTC (permalink / raw)
  To: buildroot

On Sat, Feb 27, 2016 at 12:17:15AM +0100, Arnout Vandecappelle wrote:
> On 01/20/16 23:43, Pieter Smith wrote:
> > No functional changes, but prepares barebox for building with two
> > configurations (similar to package/gcc).
> > 
> > Signed-off-by: Pieter Smith <pieter@boesman.nl>
> > ---
> >  boot/barebox/Config.in                | 71 +++++++++++++++++++-----------
> >  boot/barebox/barebox-1/barebox-1.hash |  1 +
> >  boot/barebox/barebox-1/barebox-1.mk   | 81 +++++++++++++++++++++++++++++++++++
> >  boot/barebox/barebox.mk               | 61 +-------------------------
> >  4 files changed, 129 insertions(+), 85 deletions(-)
> >  create mode 120000 boot/barebox/barebox-1/barebox-1.hash
> >  create mode 100644 boot/barebox/barebox-1/barebox-1.mk
> > 
> > diff --git a/boot/barebox/Config.in b/boot/barebox/Config.in
> > index 39cb5d2..ed120af 100644
> > --- a/boot/barebox/Config.in
> > +++ b/boot/barebox/Config.in
> > @@ -64,9 +64,52 @@ config BR2_TARGET_BAREBOX_CUSTOM_GIT_VERSION
> >  
> >  endif
> >  
> [snip]
> >  
> >  choice
> > -	prompt "Barebox configuration"
> > +	prompt "Number of Barebox configurations"
> > +	default BR2_TARGET_BAREBOX_SINGLE_CONFIG
> > +
> > +config BR2_TARGET_BAREBOX_ONE_CONFIG
> > +	select BR2_TARGET_BAREBOX_1
> > +	bool "Build 1 config"
> > +	help
> > +	  Build only one barebox config.
> > +	  Useful for building the traditional TPL (Tertiary Program
> > +	  Loader).
> > +
> > +endchoice
> 
>  There is no need for this choice. You always need barebox-1 anyway. So you can
> actually keep the Config.in as it is, and add the second barebox configuration
> at the end.

ACK. Will not be in the v4 patch series.

> > +
> > +config BR2_TARGET_BAREBOX_1
> > +	bool "Barebox configuration 1"
> > +	default y
> > +
> > +if BR2_TARGET_BAREBOX_1
> > +
> > +choice
> > +	prompt "Type of configuration"
> >  	default BR2_TARGET_BAREBOX_USE_DEFCONFIG
> >  
> >  config BR2_TARGET_BAREBOX_USE_DEFCONFIG
> > @@ -78,7 +121,7 @@ config BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG
> >  endchoice
> >  
> >  config BR2_TARGET_BAREBOX_BOARD_DEFCONFIG
> > -	string "board defconfig"
> > +	string "Board defconfig"
> 
>  Why change the capitalisation? Should be a separate patch.

Oops. This snuck through. I don't consider this necessary.

> >  	depends on BR2_TARGET_BAREBOX_USE_DEFCONFIG
> >  	help
> >  	  Name of the board for which Barebox should be built, without
> > @@ -97,28 +140,6 @@ config BR2_TARGET_BAREBOX_CONFIG_FRAGMENT_FILES
> >  	  A space-separated list of configuration fragment files,
> >  	  that will be merged to the main Barebox configuration file.
> >  
> [snip]
> > diff --git a/boot/barebox/barebox-1/barebox-1.mk b/boot/barebox/barebox-1/barebox-1.mk
> > new file mode 100644
> > index 0000000..3374ece
> > --- /dev/null
> > +++ b/boot/barebox/barebox-1/barebox-1.mk
> > @@ -0,0 +1,81 @@
> > +################################################################################
> > +#
> > +# barebox-1
> > +#
> > +################################################################################
> > +
> > +BAREBOX_1_VERSION = $(BAREBOX_VERSION)
> > +BAREBOX_1_SITE = $(BAREBOX_SITE)
> > +BAREBOX_1_SITE_METHOD = $(BAREBOX_SITE_METHOD)
> > +BAREBOX_1_SOURCE = $(BAREBOX_SOURCE)
> > +BAREBOX_1_DEPENDENCIES = $(BAREBOX_DEPENDENCIES)
> > +BAREBOX_1_LICENSE = $(BAREBOX_LICENSE)
> > +BAREBOX_1_LICENSE_FILES = $(BAREBOX_LICENSE_FILES)
> > +BAREBOX_1_POST_PATCH_HOOKS += $(BAREBOX_POST_PATCH_HOOKS)
> > +BAREBOX_1_MAKE_FLAGS = $(BAREBOX_MAKE_FLAGS)
> > +BAREBOX_1_MAKE_ENV = $(BAREBOX_MAKE_ENV)
> 
>  MAKE_FLAGS and MAKE_ENV are only used in the commands below, so no need to
> define a barebox-1 version.
> 
> > +BAREBOX_1_INSTALL_IMAGES = $(BAREBOX_INSTALL_IMAGES)
> 
>  This is just YES, it's a bit silly to add an extra variable for that.

If you can ACK the barebox-package function suggestion, this all disappears.
 
[snip]

>  BAREBOX_1_BUILD_CMDS and BAREBOX_2_BUILD_CMDS are very similar. You can
> refactor them as follows (I think):
> 
> define BAREBOX_BUILD_CMDS
> 	$($(PKG)_BUILD_BAREBOXENV_CMDS)
> 	$(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D)
> 	$($(PKG)_BUILD_CUSTOM_ENV)
> endef
> BAREBOX_1_BUILD_CMDS = $(BAREBOX_BUILD_CMDS)
> BAREBOX_2_BUILD_CMDS = $(BAREBOX_BUILD_CMDS)
> 
>  Since BAREBOX_2_BUILD_BAREBOXENV_CMDS isn't defined, that line will just
> disappear, leaving just the make command for barebox-2.
> 
>  Same for the others below.
> 
>  Note that introducing the $(PKG) bits should be a separate patch, not together
> with the move to barebox-1.

Thanks. Will spend more time eliminating code duplication in future. If you can
ACK the barebox-package function suggestion, this all disappears.
 
> 
> > +
> > +define BAREBOX_1_INSTALL_IMAGES_CMDS
> > +	if test -h $(@D)/barebox-flash-image ; then \
> > +		cp -L $(@D)/barebox-flash-image $(BINARIES_DIR)/barebox.bin ; \
> > +	else \
> > +		cp $(@D)/barebox.bin $(BINARIES_DIR);\
> > +	fi
> > +	$(BAREBOX_1_INSTALL_CUSTOM_ENV)
> > +endef
> > +
> > +ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
> > +define BAREBOX_1_INSTALL_TARGET_CMDS
> > +	cp $(@D)/bareboxenv $(TARGET_DIR)/usr/bin
> > +endef
> > +endif
> > +
> > +# Checks to give errors that the user can understand
> > +# Must be before we call to kconfig-package
> > +ifeq ($(BR2_TARGET_BAREBOX_2)$(BR_BUILDING),yy)
> 
>  BAREBOX_1 here.

Oops. Thanks!

[snip]
 
>  I wonder if it wouldn't be possible to keep barebox.mk unchanged, and just add
> at the end (after the kconfig-package):
> 
> include boot/barebox/barebox-2/barebox-2.mk
> 
>  That's not entirely similar to gcc, but it's more consistent with what it
> means. You always have the barebox package, and you have an optional extra
> barebox-2 package which is a kind of submodule of barebox. Note however that we
> currently don't have this pattern at all, so it could be controversial. But I
> think it will simplify the patch a lot, and also simplify the logic.
> 
>  So in that case, you'd have a first patch that adds the required refactorings
> in barebox.mk so the same variables are useable for barebox-2, and a second
> patch that adds barebox-2 (and patches 3 and 4 stay the same of course).

Already accepted the challenge in a previous mail. ;-)

>  This is complicated stuff, thanks for working on this, and sorry that it's
> taking so long!

No problem. I like the complicated stuff. Makefiles are a wonderful opportunity
to prove that in any language you can write cleaner code, no matter how
horrible the syntax. ;-)

>  Regards,
>  Arnout
> 
> [snip]
> 
> -- 
> Arnout Vandecappelle                          arnout at mind be
> Senior Embedded Software Architect            +32-16-286500
> Essensium/Mind                                http://www.mind.be
> G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
> LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
> GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

- Pieter

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 2/4] barebox: adds option to build secondary config
  2016-02-26 23:26   ` Arnout Vandecappelle
@ 2016-02-29  8:01     ` Pieter Smith
  0 siblings, 0 replies; 38+ messages in thread
From: Pieter Smith @ 2016-02-29  8:01 UTC (permalink / raw)
  To: buildroot

On Sat, Feb 27, 2016 at 12:26:51AM +0100, Arnout Vandecappelle wrote:
> On 01/20/16 23:43, Pieter Smith wrote:
> > Support selection of secondary config, but version, source URL and patches are
> > shared with barebox bootloader build.

[snip]

>  So, if you remove the choice, then this config should stay and be called
> something like "build second Barebox configuration", with the help text from
> BR2_TARGET_BAREBOX_TWO_CONFIGS.
> 
>  And if the option of keeping barebox and just adding barebox-2 works out, then
> this can also go into a separate Config.in file in the barebox-2 directory,
> which is source'd from here.
> 
>  Also, it should be a menuconfig instead, since there are 5 entries.

ACK. Done. I also feel that each bootloader in the bootloader menu should be a
menuconfig item. Right now I find it hard to see the boundaries between
different bootloaders when options are used. But I won't try to solve the world
in a single patch series. ;-)

> > +
> > +if BR2_TARGET_BAREBOX_2
> > +
> > +choice
> > +	prompt "Type of configuration"
> > +	default BR2_TARGET_BAREBOX_2_USE_DEFCONFIG
> > +
> > +config BR2_TARGET_BAREBOX_2_USE_DEFCONFIG
> > +	bool "Using a defconfig"
> > +
> > +config BR2_TARGET_BAREBOX_2_USE_CUSTOM_CONFIG
> > +	bool "Using a custom config file"
> > +
> > +endchoice
> > +
> > +config BR2_TARGET_BAREBOX_2_BOARD_DEFCONFIG
> > +	string "Board defconfig"
> > +	depends on BR2_TARGET_BAREBOX_2_USE_DEFCONFIG
> > +	help
> > +	  Name of the board for which Barebox should be built, without
> > +	  the _defconfig suffix.
> > +
> > +
> 
>  Spurious line here.

Oops. Thanks.

>  Regards,
>  Arnout

[snip]

- Pieter

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 3/4] barebox: user selection of build output images
  2016-02-26 23:43   ` Arnout Vandecappelle
@ 2016-02-29  8:38     ` Pieter Smith
  2016-03-01 23:14       ` Arnout Vandecappelle
  0 siblings, 1 reply; 38+ messages in thread
From: Pieter Smith @ 2016-02-29  8:38 UTC (permalink / raw)
  To: buildroot

On Sat, Feb 27, 2016 at 12:43:40AM +0100, Arnout Vandecappelle wrote:
> On 01/20/16 23:43, Pieter Smith wrote:
> > A non-default image can be selected as the barebox build output in the images/
> > directory. This typically is needed to select the appropriate image generated
> > by multi-platform support defconfigs (E.g. am335x).

[snip]

>  If we deprecate barebox pre-2012.10, then we can simplify this a lot:
> 
> config BR2_TARGET_BAREBOX_IMAGE_FILE
> 	string "Image file path"
> 	default "barebox-flash-image"
> 	help
> 	  Name of the built barebox image file in the barebox images directory
> 
> 
>  Even if we don't want to deprecate barebox pre-2012.10, I'd prefer to keep this
> simple config and do the handling of legacy barebox.bin in the .mk file. For
> pre-2012.10, you'd have to explicitly set it to barebox.bin instead (which
> should be mentioned in the help text then).

ACK. Done. I solved this with the above default and help text pointing the user
to use 'barebox.bin' for older versions. I'm just waiting for Yegor, and then
I'll repost.

Right now a user-friendly warning is generated if an old config is used and
this config item has not yet been set. I can have the makefile also generate a
hint for older barebox versions if the image filename isn't found:
- Do you think the additional complexity is warranted?

>  We should find a good way to deal with the images/ part of the path, however.
> This could e.g. be done in the .mk file, by checking both the top dir and the
> images dir.

ACK. Done. In v4 I first try the build ./ directory, and then ./images.

>  Regards,
>  Arnout

[snip]

- Pieter

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 4/4] beaglebone: adds barebox bootloader defconfig
  2016-02-26 23:47   ` Arnout Vandecappelle
  2016-02-26 23:48     ` Arnout Vandecappelle
@ 2016-02-29  8:44     ` Pieter Smith
  2016-03-01 23:15       ` Arnout Vandecappelle
  1 sibling, 1 reply; 38+ messages in thread
From: Pieter Smith @ 2016-02-29  8:44 UTC (permalink / raw)
  To: buildroot

On Sat, Feb 27, 2016 at 12:47:26AM +0100, Arnout Vandecappelle wrote:
> On 01/20/16 23:43, Pieter Smith wrote:
> > * Builds barebox MLO and the barebox bootloader.
> > * Barebox integrates a perfectly good device-tree for the bbb, so no dtb is
> >   being generated with the kernel.

[snip]

> > +# kernel
> > +BR2_LINUX_KERNEL=y
> > +BR2_LINUX_KERNEL_LATEST_VERSION=y
> 
>  Kernel version should be locked down as well.

ACK. Will do.

> > +BR2_LINUX_KERNEL_USE_DEFCONFIG=y
> > +BR2_LINUX_KERNEL_DEFCONFIG="omap2plus"
> > +BR2_LINUX_KERNEL_ZIMAGE=y
> 
>  Perhaps add a comment here that the dtb from barebox will be used.

A comment in the defconfig file? Not that I am against it, but will anybody
actually read it?

>  Regards,
>  Arnout

[snip]

- Pieter

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 1/4] barebox: prepare for secondary config build
  2016-02-29  7:47       ` Pieter Smith
@ 2016-03-01 23:08         ` Arnout Vandecappelle
  2016-03-02  7:50           ` Pieter Smith
  0 siblings, 1 reply; 38+ messages in thread
From: Arnout Vandecappelle @ 2016-03-01 23:08 UTC (permalink / raw)
  To: buildroot

On 02/29/16 08:47, Pieter Smith wrote:
> On Sun, Feb 28, 2016 at 09:12:04AM +0100, Pieter Smith wrote:
>> On Sat, Feb 27, 2016 at 12:17:15AM +0100, Arnout Vandecappelle wrote:
>>> On 01/20/16 23:43, Pieter Smith wrote:
>> [snip] 
>>>  I wonder if it wouldn't be possible to keep barebox.mk unchanged, and just add
>>> at the end (after the kconfig-package):
>>>
>>> include boot/barebox/barebox-2/barebox-2.mk
>>>
>>>  That's not entirely similar to gcc, but it's more consistent with what it
>>> means. You always have the barebox package, and you have an optional extra
>>> barebox-2 package which is a kind of submodule of barebox. Note however that we
>>> currently don't have this pattern at all, so it could be controversial. But I
>>> think it will simplify the patch a lot, and also simplify the logic.
>>>
>>>  So in that case, you'd have a first patch that adds the required refactorings
>>> in barebox.mk so the same variables are useable for barebox-2, and a second
>>> patch that adds barebox-2 (and patches 3 and 4 stay the same of course).
>>
>> Yes. Thanks. A lot less messy. I started looking into this. It seems doable. It
>> might be neater to still split a barebox-common.mk to avoid a long list of
>> variable copies. Give me a day on this.
>  
> Thanks for the suggestion. It is shaping up nicely. There is one aspect that I
> would appreciate input on: To all but completely eliminate duplication in the
> makefiles for the two packages, I am wrapping all the current functionality in
> boot/barebox/barebox.mk in a parameterized barebox-package function. E.g.:
> 
>   define barebox-package
>   $(1)_VERSION = $$(call qstrip,$$(BR2_TARGET_BAREBOX_VERSION))
>   ...
>   $$(eval $$(kconfig-package))
>   endef
>   $(eval $(call barebox-package,BAREBOX))
> 
> And the whole of boot/barebox/barebox-2/barebox-2.mk becomes:
> 
>   $(eval $(call barebox-package,BAREBOX_2))

 No, I don't think we want this, because it hides a lot of what barebox-2 is
doing internally. It's OK and actually better (in my opinion) if barebox-2.mk is
just a long list like:

BAREBOX_2_VERSION = $(BAREBOX_VERSION)
BAREBOX_2_SITE = $(BAREBOX_SITE)
...
BAREBOX_2_BUILD_CMDS = $(BAREBOX_BUILD_CMDS)
...
$(eval $(kconfig-package))


 Regards,
 Arnout

> 
> This however cannot avoid Config.in duplication, but the barebox-2 makefile
> inherits all future barebox makefile improvements. The catch is that existing
> barebox patches will have merge conflicts.
> 
> I already tied up with Yegor on the embedded custom environment patch-set,
> which he is willing to rebase + solve the merge conflicts. We can then submit
> the series with Yegor's patch and a barebox defconfig for the Beaglebone Black
> as per your suggestion.
> 
> Do you think this is acceptable?
> 
>>>  This is complicated stuff, thanks for working on this, and sorry that it's
>>> taking so long!
>>>
>>>  Regards,
>>>  Arnout
>>>
>>> [snip]
>>>
>>> -- 
>>> Arnout Vandecappelle                          arnout at mind be
>>> Senior Embedded Software Architect            +32-16-286500
>>> Essensium/Mind                                http://www.mind.be
>>> G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
>>> LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
>>> GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
>>
>> - Pieter
> - Pieter
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 3/4] barebox: user selection of build output images
  2016-02-29  8:38     ` Pieter Smith
@ 2016-03-01 23:14       ` Arnout Vandecappelle
  2016-03-02  7:54         ` Pieter Smith
  0 siblings, 1 reply; 38+ messages in thread
From: Arnout Vandecappelle @ 2016-03-01 23:14 UTC (permalink / raw)
  To: buildroot

On 02/29/16 09:38, Pieter Smith wrote:
> On Sat, Feb 27, 2016 at 12:43:40AM +0100, Arnout Vandecappelle wrote:
>> On 01/20/16 23:43, Pieter Smith wrote:
>>> A non-default image can be selected as the barebox build output in the images/
>>> directory. This typically is needed to select the appropriate image generated
>>> by multi-platform support defconfigs (E.g. am335x).
> 
> [snip]
> 
>>  If we deprecate barebox pre-2012.10, then we can simplify this a lot:
>>
>> config BR2_TARGET_BAREBOX_IMAGE_FILE
>> 	string "Image file path"
>> 	default "barebox-flash-image"
>> 	help
>> 	  Name of the built barebox image file in the barebox images directory
>>
>>
>>  Even if we don't want to deprecate barebox pre-2012.10, I'd prefer to keep this
>> simple config and do the handling of legacy barebox.bin in the .mk file. For
>> pre-2012.10, you'd have to explicitly set it to barebox.bin instead (which
>> should be mentioned in the help text then).
> 
> ACK. Done. I solved this with the above default and help text pointing the user
> to use 'barebox.bin' for older versions. I'm just waiting for Yegor, and then
> I'll repost.
> 
> Right now a user-friendly warning is generated if an old config is used and
> this config item has not yet been set. 

 If you give it a default value, it _will_ be set for old configs.

> I can have the makefile also generate a
> hint for older barebox versions if the image filename isn't found:
> - Do you think the additional complexity is warranted?

 Yes, that's worth it.

 Regards,
 Arnout

> 
>>  We should find a good way to deal with the images/ part of the path, however.
>> This could e.g. be done in the .mk file, by checking both the top dir and the
>> images dir.
> 
> ACK. Done. In v4 I first try the build ./ directory, and then ./images.
> 
>>  Regards,
>>  Arnout
> 
> [snip]
> 
> - Pieter
> 
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 4/4] beaglebone: adds barebox bootloader defconfig
  2016-02-29  8:44     ` Pieter Smith
@ 2016-03-01 23:15       ` Arnout Vandecappelle
  2016-03-02  7:55         ` Pieter Smith
  0 siblings, 1 reply; 38+ messages in thread
From: Arnout Vandecappelle @ 2016-03-01 23:15 UTC (permalink / raw)
  To: buildroot

On 02/29/16 09:44, Pieter Smith wrote:
> On Sat, Feb 27, 2016 at 12:47:26AM +0100, Arnout Vandecappelle wrote:
>> On 01/20/16 23:43, Pieter Smith wrote:
>>> * Builds barebox MLO and the barebox bootloader.
>>> * Barebox integrates a perfectly good device-tree for the bbb, so no dtb is
>>>   being generated with the kernel.
> 
> [snip]
> 
>>> +# kernel
>>> +BR2_LINUX_KERNEL=y
>>> +BR2_LINUX_KERNEL_LATEST_VERSION=y
>>
>>  Kernel version should be locked down as well.
> 
> ACK. Will do.
> 
>>> +BR2_LINUX_KERNEL_USE_DEFCONFIG=y
>>> +BR2_LINUX_KERNEL_DEFCONFIG="omap2plus"
>>> +BR2_LINUX_KERNEL_ZIMAGE=y
>>
>>  Perhaps add a comment here that the dtb from barebox will be used.
> 
> A comment in the defconfig file? Not that I am against it, but will anybody
> actually read it?

 Look at the other defconfig files, most of them have comments in them. That's
mostly for people who update the defconfigs, but also for newcomers who take a
look at them to make it easier to understand.

 Regards,
 Arnout


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 1/4] barebox: prepare for secondary config build
  2016-03-01 23:08         ` Arnout Vandecappelle
@ 2016-03-02  7:50           ` Pieter Smith
  2016-03-02 18:12             ` Arnout Vandecappelle
  0 siblings, 1 reply; 38+ messages in thread
From: Pieter Smith @ 2016-03-02  7:50 UTC (permalink / raw)
  To: buildroot

On Wed, Mar 02, 2016 at 12:08:34AM +0100, Arnout Vandecappelle wrote:
> On 02/29/16 08:47, Pieter Smith wrote:
[snip]
> >  
> > Thanks for the suggestion. It is shaping up nicely. There is one aspect that I
> > would appreciate input on: To all but completely eliminate duplication in the
> > makefiles for the two packages, I am wrapping all the current functionality in
> > boot/barebox/barebox.mk in a parameterized barebox-package function. E.g.:
> > 
> >   define barebox-package
> >   $(1)_VERSION = $$(call qstrip,$$(BR2_TARGET_BAREBOX_VERSION))
> >   ...
> >   $$(eval $$(kconfig-package))
> >   endef
> >   $(eval $(call barebox-package,BAREBOX))
> > 
> > And the whole of boot/barebox/barebox-2/barebox-2.mk becomes:
> > 
> >   $(eval $(call barebox-package,BAREBOX_2))
> 
>  No, I don't think we want this, because it hides a lot of what barebox-2 is
> doing internally. It's OK and actually better (in my opinion) if barebox-2.mk is
> just a long list like:

Pity. This quite elegantly solved my concerns. barebox and barebox-2 differ
only in menuconfig and barebox environment configuration space. The rest should
always be identical.

> BAREBOX_2_VERSION = $(BAREBOX_VERSION)
> BAREBOX_2_SITE = $(BAREBOX_SITE)

This shouldn't change much in future, so I can still do the variable copying if
you prefer.

> BAREBOX_2_BUILD_CMDS = $(BAREBOX_BUILD_CMDS)

This will not work. Both the BAREBOX_BUILD_CMDS and BAREBOX_INSTALL_IMAGES_CMDS
need parameterization. I can solve this with with:
1. A scaled down version of the above barebox-package function to generate the
   boilerplate, or
2. Parameterizable functions and duplicated boilerplate.

IMHO reducing duplication always improves clarity and maintenance, so I would
go for option 1.

What has your preference?

> ...
> $(eval $(kconfig-package))
> 
> 
>  Regards,
>  Arnout

[snip]

I would like to:
1. Ensure that all improvements to barebox propagate to barebox-2 in future.
2. Avoid having something error-prone to resolve the above. IMHO using a review
   process to keep two pieces of code in sync is quite error-prone and an
   unnecessary cognitive burden on developers.

- Pieter

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 3/4] barebox: user selection of build output images
  2016-03-01 23:14       ` Arnout Vandecappelle
@ 2016-03-02  7:54         ` Pieter Smith
  2016-03-02 18:18           ` Arnout Vandecappelle
  0 siblings, 1 reply; 38+ messages in thread
From: Pieter Smith @ 2016-03-02  7:54 UTC (permalink / raw)
  To: buildroot

On Wed, Mar 02, 2016 at 12:14:15AM +0100, Arnout Vandecappelle wrote:
> On 02/29/16 09:38, Pieter Smith wrote:

[snip]

> > 
> > ACK. Done. I solved this with the above default and help text pointing the user
> > to use 'barebox.bin' for older versions. I'm just waiting for Yegor, and then
> > I'll repost.
> > 
> > Right now a user-friendly warning is generated if an old config is used and
> > this config item has not yet been set. 
> 
>  If you give it a default value, it _will_ be set for old configs.

If the user remembers to run defconfig. If he doesn't, the error is quite vague.

> > I can have the makefile also generate a
> > hint for older barebox versions if the image filename isn't found:
> > - Do you think the additional complexity is warranted?
> 
>  Yes, that's worth it.

ACK. Will do.

>  Regards,
>  Arnout

[snip]

- Pieter

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 4/4] beaglebone: adds barebox bootloader defconfig
  2016-03-01 23:15       ` Arnout Vandecappelle
@ 2016-03-02  7:55         ` Pieter Smith
  0 siblings, 0 replies; 38+ messages in thread
From: Pieter Smith @ 2016-03-02  7:55 UTC (permalink / raw)
  To: buildroot

On Wed, Mar 02, 2016 at 12:15:13AM +0100, Arnout Vandecappelle wrote:
> On 02/29/16 09:44, Pieter Smith wrote:

[snip]

> > A comment in the defconfig file? Not that I am against it, but will anybody
> > actually read it?
> 
>  Look at the other defconfig files, most of them have comments in them. That's
> mostly for people who update the defconfigs, but also for newcomers who take a
> look at them to make it easier to understand.

ACK. Will add the comments.

[snip]

- Pieter

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 1/4] barebox: prepare for secondary config build
  2016-03-02  7:50           ` Pieter Smith
@ 2016-03-02 18:12             ` Arnout Vandecappelle
  2016-03-02 21:32               ` Pieter Smith
  0 siblings, 1 reply; 38+ messages in thread
From: Arnout Vandecappelle @ 2016-03-02 18:12 UTC (permalink / raw)
  To: buildroot

 [Adding other core devs in CC, see the beginning and the end]

On 03/02/16 08:50, Pieter Smith wrote:
> On Wed, Mar 02, 2016 at 12:08:34AM +0100, Arnout Vandecappelle wrote:
>> On 02/29/16 08:47, Pieter Smith wrote:
> [snip]
>>>  
>>> Thanks for the suggestion. It is shaping up nicely. There is one aspect that I
>>> would appreciate input on: To all but completely eliminate duplication in the
>>> makefiles for the two packages, I am wrapping all the current functionality in
>>> boot/barebox/barebox.mk in a parameterized barebox-package function. E.g.:
>>>
>>>   define barebox-package
>>>   $(1)_VERSION = $$(call qstrip,$$(BR2_TARGET_BAREBOX_VERSION))
>>>   ...
>>>   $$(eval $$(kconfig-package))
>>>   endef
>>>   $(eval $(call barebox-package,BAREBOX))
>>>
>>> And the whole of boot/barebox/barebox-2/barebox-2.mk becomes:
>>>
>>>   $(eval $(call barebox-package,BAREBOX_2))
>>
>>  No, I don't think we want this, because it hides a lot of what barebox-2 is
>> doing internally. It's OK and actually better (in my opinion) if barebox-2.mk is
>> just a long list like:
> 
> Pity. This quite elegantly solved my concerns. barebox and barebox-2 differ
> only in menuconfig and barebox environment configuration space. The rest should
> always be identical.
> 
>> BAREBOX_2_VERSION = $(BAREBOX_VERSION)
>> BAREBOX_2_SITE = $(BAREBOX_SITE)
> 
> This shouldn't change much in future, so I can still do the variable copying if
> you prefer.
> 
>> BAREBOX_2_BUILD_CMDS = $(BAREBOX_BUILD_CMDS)
> 
> This will not work. Both the BAREBOX_BUILD_CMDS and BAREBOX_INSTALL_IMAGES_CMDS
> need parameterization. I can solve this with with:
> 1. A scaled down version of the above barebox-package function to generate the
>    boilerplate, or
> 2. Parameterizable functions and duplicated boilerplate.
> 
> IMHO reducing duplication always improves clarity and maintenance, so I would
> go for option 1.
> 
> What has your preference?

 The BUILD_CMDS can be parameterized without using functions, by using
$($(PKG)_...) variables instead of $(BAREBOX_2_...). That's what I tried to show
in my first reply:

define BAREBOX_BUILD_CMDS
	$($(PKG)_BUILD_BAREBOXENV_CMDS)
	$(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D)
	$($(PKG)_BUILD_CUSTOM_ENV)
endef
BAREBOX_2_BUILD_CMDS = $(BAREBOX_BUILD_CMDS)

BAREBOX_2_BUILD_BAREBOXENV_CMDS and BAREBOX_2_BUILD_CUSTOM_ENV will not be set,
so those parts are removed. The rest should be identical for barebox-2, but if
you do need something else you can add something like $($(PKG)_EXTRA_FLAGS).

> 
>> ...
>> $(eval $(kconfig-package))
>>
>>
>>  Regards,
>>  Arnout
> 
> [snip]
> 
> I would like to:
> 1. Ensure that all improvements to barebox propagate to barebox-2 in future.
> 2. Avoid having something error-prone to resolve the above. IMHO using a review
>    process to keep two pieces of code in sync is quite error-prone and an
>    unnecessary cognitive burden on developers.

 There isn't really much to keep in sync between the two, only when you suddenly
add _INSTALL_STAGING_CMDS for instance you'd have to update barebox-2.mk to copy
that as well.


 There are two reasons why I prefer the copying of variables:

1. I think that functions are a bit more difficult to understand.
2. I'm considering to add infrastructure that facilitates the pattern of copying
variables, something like

$(eval $(call inherit-package,barebox))

which would expand to

BAREBOX_2_VERSION ?= BAREBOX_VERSION
BAREBOX_2_SITE ?= BAREBOX_SITE
...
BAREBOX_2_BUILD_CMDS ?= BAREBOX_BUILD_CMDS

so that in the end the barebox-2.mk does indeed become nothing more than a
single eval line, and that the same approach can easily be used for other packages.


 However, this is just my opinion, other developers may see it differently,
hence the CC.


 Regards,
 Arnout

> 
> - Pieter
> 

-- 
Arnout Vandecappelle      arnout dot vandecappelle at essensium dot com
Senior Embedded Software Architect . . . . . . +32-478-010353 (mobile)
Essensium, Mind division . . . . . . . . . . . . . . http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium . . . . . BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 3/4] barebox: user selection of build output images
  2016-03-02  7:54         ` Pieter Smith
@ 2016-03-02 18:18           ` Arnout Vandecappelle
  2016-03-02 21:40             ` Pieter Smith
  0 siblings, 1 reply; 38+ messages in thread
From: Arnout Vandecappelle @ 2016-03-02 18:18 UTC (permalink / raw)
  To: buildroot

On 03/02/16 08:54, Pieter Smith wrote:
> On Wed, Mar 02, 2016 at 12:14:15AM +0100, Arnout Vandecappelle wrote:
>> On 02/29/16 09:38, Pieter Smith wrote:
> 
> [snip]
> 
>>>
>>> ACK. Done. I solved this with the above default and help text pointing the user
>>> to use 'barebox.bin' for older versions. I'm just waiting for Yegor, and then
>>> I'll repost.
>>>
>>> Right now a user-friendly warning is generated if an old config is used and
>>> this config item has not yet been set. 
>>
>>  If you give it a default value, it _will_ be set for old configs.
> 
> If the user remembers to run defconfig. If he doesn't, the error is quite vague.

 When you update buildroot and run 'make', there should be an implicit run of
'make oldconfig', which will update all the automatic symbols and ask for any
new ones. TBH I don't completely understand how it works, but it happens like
that for me.

 Regards,
 Arnout

> 
>>> I can have the makefile also generate a
>>> hint for older barebox versions if the image filename isn't found:
>>> - Do you think the additional complexity is warranted?
>>
>>  Yes, that's worth it.
> 
> ACK. Will do.
> 
>>  Regards,
>>  Arnout
> 
> [snip]
> 
> - Pieter
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 1/4] barebox: prepare for secondary config build
  2016-03-02 18:12             ` Arnout Vandecappelle
@ 2016-03-02 21:32               ` Pieter Smith
  2016-03-05 13:16                 ` Pieter Smith
  0 siblings, 1 reply; 38+ messages in thread
From: Pieter Smith @ 2016-03-02 21:32 UTC (permalink / raw)
  To: buildroot

On Wed, Mar 02, 2016 at 07:12:57PM +0100, Arnout Vandecappelle wrote:
>  [Adding other core devs in CC, see the beginning and the end]
> 
> On 03/02/16 08:50, Pieter Smith wrote:
[snip]
> >> BAREBOX_2_BUILD_CMDS = $(BAREBOX_BUILD_CMDS)
> > 
> > This will not work. Both the BAREBOX_BUILD_CMDS and BAREBOX_INSTALL_IMAGES_CMDS
> > need parameterization. I can solve this with with:
> > 1. A scaled down version of the above barebox-package function to generate the
> >    boilerplate, or
> > 2. Parameterizable functions and duplicated boilerplate.
> > 
> > IMHO reducing duplication always improves clarity and maintenance, so I would
> > go for option 1.
> > 
> > What has your preference?
> 
>  The BUILD_CMDS can be parameterized without using functions, by using
> $($(PKG)_...) variables instead of $(BAREBOX_2_...). That's what I tried to show
> in my first reply:

Off course, silly me... I've been making use of this since forever. It works
because of the eval in $(eval $(kconfig-package)). I'll do it this way.
 
> define BAREBOX_BUILD_CMDS
> 	$($(PKG)_BUILD_BAREBOXENV_CMDS)
> 	$(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D)
> 	$($(PKG)_BUILD_CUSTOM_ENV)
> endef
> BAREBOX_2_BUILD_CMDS = $(BAREBOX_BUILD_CMDS)
> 
> BAREBOX_2_BUILD_BAREBOXENV_CMDS and BAREBOX_2_BUILD_CUSTOM_ENV will not be set,
> so those parts are removed. The rest should be identical for barebox-2, but if
> you do need something else you can add something like $($(PKG)_EXTRA_FLAGS).

I agree with not needing the additional BAREBOX_2_BUILD_BAREBOXENV_CMDS and
BAREBOX_2_INSTALL_BAREBOXENV_CMDS (why would you need to install bareboxenv to
the rootfs twice), but I would like to keep the BAREBOX_2_BUILD_CUSTOM_ENV and
the built-in variant in Yegor's pending patch-set. They allow customization of
the barebox environment, and therefore the boot behavior.

[snip]

> > I would like to:
> > 1. Ensure that all improvements to barebox propagate to barebox-2 in future.
> > 2. Avoid having something error-prone to resolve the above. IMHO using a review
> >    process to keep two pieces of code in sync is quite error-prone and an
> >    unnecessary cognitive burden on developers.
> 
>  There isn't really much to keep in sync between the two, only when you suddenly
> add _INSTALL_STAGING_CMDS for instance you'd have to update barebox-2.mk to copy
> that as well.
> 
>  There are two reasons why I prefer the copying of variables:
> 
> 1. I think that functions are a bit more difficult to understand.
> 2. I'm considering to add infrastructure that facilitates the pattern of copying
> variables, something like
> 
> $(eval $(call inherit-package,barebox))
>
> 
> which would expand to
> 
> BAREBOX_2_VERSION ?= BAREBOX_VERSION
> BAREBOX_2_SITE ?= BAREBOX_SITE
> ...
> BAREBOX_2_BUILD_CMDS ?= BAREBOX_BUILD_CMDS
> 
> so that in the end the barebox-2.mk does indeed become nothing more than a
> single eval line, and that the same approach can easily be used for other packages.

This would certainly be an elegant improvement! Do any of the other packages
need this? I can help with this if you don't have the time. Off-course I would
rather do this in a later patch-series.

>  However, this is just my opinion, other developers may see it differently,
> hence the CC.

Off course. Your opinion is held in rather high regard, so I would like to have
at least one of the regular barebox developers on board. ;-)

[snip]

- Pieter 

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 3/4] barebox: user selection of build output images
  2016-03-02 18:18           ` Arnout Vandecappelle
@ 2016-03-02 21:40             ` Pieter Smith
  2016-03-06 23:03               ` Arnout Vandecappelle
  0 siblings, 1 reply; 38+ messages in thread
From: Pieter Smith @ 2016-03-02 21:40 UTC (permalink / raw)
  To: buildroot

On Wed, Mar 02, 2016 at 07:18:19PM +0100, Arnout Vandecappelle wrote:
> On 03/02/16 08:54, Pieter Smith wrote:
> > On Wed, Mar 02, 2016 at 12:14:15AM +0100, Arnout Vandecappelle wrote:
> >> On 02/29/16 09:38, Pieter Smith wrote:
> > 
> > [snip]
> > 
> >>>
> >>> ACK. Done. I solved this with the above default and help text pointing the user
> >>> to use 'barebox.bin' for older versions. I'm just waiting for Yegor, and then
> >>> I'll repost.
> >>>
> >>> Right now a user-friendly warning is generated if an old config is used and
> >>> this config item has not yet been set. 
> >>
> >>  If you give it a default value, it _will_ be set for old configs.
> > 
> > If the user remembers to run defconfig. If he doesn't, the error is quite vague.
> 
>  When you update buildroot and run 'make', there should be an implicit run of
> 'make oldconfig', which will update all the automatic symbols and ask for any
> new ones. TBH I don't completely understand how it works, but it happens like
> that for me.

I was troubleshooting with `make barebox-2`, which doesn't perform an
auto-defconfig. The error was unintelligible because some variables were
resolving to empty strings. I therefore added a check which offers a similar
prompt to what is currently done at the end of barebox.mk.

If nobody has a serious gripe with this, I would prefer to keep the check.

[snip]

- Pieter

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 1/4] barebox: prepare for secondary config build
  2016-03-02 21:32               ` Pieter Smith
@ 2016-03-05 13:16                 ` Pieter Smith
  2016-03-06 21:16                   ` Arnout Vandecappelle
  0 siblings, 1 reply; 38+ messages in thread
From: Pieter Smith @ 2016-03-05 13:16 UTC (permalink / raw)
  To: buildroot

On Wed, Mar 02, 2016 at 10:32:56PM +0100, Pieter Smith wrote:
> On Wed, Mar 02, 2016 at 07:12:57PM +0100, Arnout Vandecappelle wrote:

[snip]

> >  The BUILD_CMDS can be parameterized without using functions, by using
> > $($(PKG)_...) variables instead of $(BAREBOX_2_...). That's what I tried to show
> > in my first reply:
> 
> Off course, silly me... I've been making use of this since forever. It works
> because of the eval in $(eval $(kconfig-package)). I'll do it this way.
>  
> > define BAREBOX_BUILD_CMDS
> > 	$($(PKG)_BUILD_BAREBOXENV_CMDS)
> > 	$(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D)
> > 	$($(PKG)_BUILD_CUSTOM_ENV)
> > endef
> > BAREBOX_2_BUILD_CMDS = $(BAREBOX_BUILD_CMDS)
> > 
> > BAREBOX_2_BUILD_BAREBOXENV_CMDS and BAREBOX_2_BUILD_CUSTOM_ENV will not be set,
> > so those parts are removed. The rest should be identical for barebox-2, but if
> > you do need something else you can add something like $($(PKG)_EXTRA_FLAGS).
> 
> I agree with not needing the additional BAREBOX_2_BUILD_BAREBOXENV_CMDS and
> BAREBOX_2_INSTALL_BAREBOXENV_CMDS (why would you need to install bareboxenv to
> the rootfs twice), but I would like to keep the BAREBOX_2_BUILD_CUSTOM_ENV and
> the built-in variant in Yegor's pending patch-set. They allow customization of
> the barebox environment, and therefore the boot behavior.

I am having some trouble with this. I am not able to handle ifdef-space
diversity in this way. Ifdef-space diversity is used to determine how barebox
should be configured, whether / how the barebox environment should be built,
and to print user-friendly config errors. The ifdef logic is not all trivial
(almost half of the makefile logic), so I would like to avoid duplicating it
between barebox and barebox-2. The only way I know of to avoid this duplication
is by extracting the logic info a definition and using $(eval), which is
exactly what you want to avoid.

Also, for two of the ifdef-space diversity sections, $(PKG) seems to be
undefined at the time of evaluation. Getting to the bottom of this is proving
quite taxing. I can get around this by doing an `$(eval $(call ...,BAREBOX))`,
which looks a lot like my initial suggestion.

I am getting to the point where I am just going to duplicate the ifdef sections
and leave the consistency burden with future reviewers. I understand your
concern that some developers do not understanding $(eval) all that well, but
this is like trying to solve the problem with my shoelaces tied.

[snip]
 
> >  However, this is just my opinion, other developers may see it differently,
> > hence the CC.
> 
> Off course. Your opinion is held in rather high regard, so I would like to have
> at least one of the regular barebox developers on board. ;-)

Is there anyone else we can prod to weigh in on this? Please have a look at the
templated proposal and confirm your opinion on $(eval):
https://github.com/smipi1/bbb_buildroot/tree/barebox_2nd_config_build-v4-templated.

[snip]

- Pieter

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 1/4] barebox: prepare for secondary config build
  2016-03-05 13:16                 ` Pieter Smith
@ 2016-03-06 21:16                   ` Arnout Vandecappelle
  2016-03-07 18:31                     ` Pieter Smith
  0 siblings, 1 reply; 38+ messages in thread
From: Arnout Vandecappelle @ 2016-03-06 21:16 UTC (permalink / raw)
  To: buildroot

On 03/05/16 14:16, Pieter Smith wrote:
> On Wed, Mar 02, 2016 at 10:32:56PM +0100, Pieter Smith wrote:
>> On Wed, Mar 02, 2016 at 07:12:57PM +0100, Arnout Vandecappelle wrote:
> 
> [snip]
> 
>>>  The BUILD_CMDS can be parameterized without using functions, by using
>>> $($(PKG)_...) variables instead of $(BAREBOX_2_...). That's what I tried to show
>>> in my first reply:
>>
>> Off course, silly me... I've been making use of this since forever. It works
>> because of the eval in $(eval $(kconfig-package)). I'll do it this way.
>>  
>>> define BAREBOX_BUILD_CMDS
>>> 	$($(PKG)_BUILD_BAREBOXENV_CMDS)
>>> 	$(TARGET_MAKE_ENV) $(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D)
>>> 	$($(PKG)_BUILD_CUSTOM_ENV)
>>> endef
>>> BAREBOX_2_BUILD_CMDS = $(BAREBOX_BUILD_CMDS)
>>>
>>> BAREBOX_2_BUILD_BAREBOXENV_CMDS and BAREBOX_2_BUILD_CUSTOM_ENV will not be set,
>>> so those parts are removed. The rest should be identical for barebox-2, but if
>>> you do need something else you can add something like $($(PKG)_EXTRA_FLAGS).
>>
>> I agree with not needing the additional BAREBOX_2_BUILD_BAREBOXENV_CMDS and
>> BAREBOX_2_INSTALL_BAREBOXENV_CMDS (why would you need to install bareboxenv to
>> the rootfs twice), but I would like to keep the BAREBOX_2_BUILD_CUSTOM_ENV and
>> the built-in variant in Yegor's pending patch-set. They allow customization of
>> the barebox environment, and therefore the boot behavior.
> 
> I am having some trouble with this. I am not able to handle ifdef-space
> diversity in this way. Ifdef-space diversity is used to determine how barebox
> should be configured, whether / how the barebox environment should be built,
> and to print user-friendly config errors. The ifdef logic is not all trivial
> (almost half of the makefile logic), so I would like to avoid duplicating it
> between barebox and barebox-2. The only way I know of to avoid this duplication
> is by extracting the logic info a definition and using $(eval), which is
> exactly what you want to avoid.

 Ah yes, I didn't realize that. Indeed, for those things there is no way to
handle them with $(PKG).

 Actually I would like those things to move to kconfig-package, but that would
be dragging things a bit too far for this series.

 So yes, your idea of $(call barebox-package) looks good. One small remark that
you can already fix before submitting: in the patch that adds the
barebox-package function, say explicitly in the commit message if anything has
changed except for $ -> $$ and BAREBOX -> $(1). That'll make review easier.

 Regards,
 Arnout

> 
> Also, for two of the ifdef-space diversity sections, $(PKG) seems to be
> undefined at the time of evaluation. Getting to the bottom of this is proving
> quite taxing. I can get around this by doing an `$(eval $(call ...,BAREBOX))`,
> which looks a lot like my initial suggestion.
> 
> I am getting to the point where I am just going to duplicate the ifdef sections
> and leave the consistency burden with future reviewers. I understand your
> concern that some developers do not understanding $(eval) all that well, but
> this is like trying to solve the problem with my shoelaces tied.
> 
> [snip]
>  
>>>  However, this is just my opinion, other developers may see it differently,
>>> hence the CC.
>>
>> Off course. Your opinion is held in rather high regard, so I would like to have
>> at least one of the regular barebox developers on board. ;-)
> 
> Is there anyone else we can prod to weigh in on this? Please have a look at the
> templated proposal and confirm your opinion on $(eval):
> https://github.com/smipi1/bbb_buildroot/tree/barebox_2nd_config_build-v4-templated.
> 
> [snip]
> 
> - Pieter
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 3/4] barebox: user selection of build output images
  2016-03-02 21:40             ` Pieter Smith
@ 2016-03-06 23:03               ` Arnout Vandecappelle
  0 siblings, 0 replies; 38+ messages in thread
From: Arnout Vandecappelle @ 2016-03-06 23:03 UTC (permalink / raw)
  To: buildroot

On 03/02/16 22:40, Pieter Smith wrote:
> On Wed, Mar 02, 2016 at 07:18:19PM +0100, Arnout Vandecappelle wrote:
>> On 03/02/16 08:54, Pieter Smith wrote:
>>> On Wed, Mar 02, 2016 at 12:14:15AM +0100, Arnout Vandecappelle wrote:
>>>> On 02/29/16 09:38, Pieter Smith wrote:
>>>
>>> [snip]
>>>
>>>>>
>>>>> ACK. Done. I solved this with the above default and help text pointing the user
>>>>> to use 'barebox.bin' for older versions. I'm just waiting for Yegor, and then
>>>>> I'll repost.
>>>>>
>>>>> Right now a user-friendly warning is generated if an old config is used and
>>>>> this config item has not yet been set. 
>>>>
>>>>  If you give it a default value, it _will_ be set for old configs.
>>>
>>> If the user remembers to run defconfig. If he doesn't, the error is quite vague.
>>
>>  When you update buildroot and run 'make', there should be an implicit run of
>> 'make oldconfig', which will update all the automatic symbols and ask for any
>> new ones. TBH I don't completely understand how it works, but it happens like
>> that for me.
> 
> I was troubleshooting with `make barebox-2`, which doesn't perform an
> auto-defconfig. The error was unintelligible because some variables were
> resolving to empty strings. I therefore added a check which offers a similar
> prompt to what is currently done at the end of barebox.mk.
> 
> If nobody has a serious gripe with this, I would prefer to keep the check.

 OK no problem.

 Thanks,

 Regards,
 Arnout


> 
> [snip]
> 
> - Pieter
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [Buildroot] [v3, 1/4] barebox: prepare for secondary config build
  2016-03-06 21:16                   ` Arnout Vandecappelle
@ 2016-03-07 18:31                     ` Pieter Smith
  0 siblings, 0 replies; 38+ messages in thread
From: Pieter Smith @ 2016-03-07 18:31 UTC (permalink / raw)
  To: buildroot

On Sun, Mar 06, 2016 at 10:16:55PM +0100, Arnout Vandecappelle wrote:
> On 03/05/16 14:16, Pieter Smith wrote:

[snip]

> > I am having some trouble with this. I am not able to handle ifdef-space
> > diversity in this way. Ifdef-space diversity is used to determine how barebox
> > should be configured, whether / how the barebox environment should be built,
> > and to print user-friendly config errors. The ifdef logic is not all trivial
> > (almost half of the makefile logic), so I would like to avoid duplicating it
> > between barebox and barebox-2. The only way I know of to avoid this duplication
> > is by extracting the logic info a definition and using $(eval), which is
> > exactly what you want to avoid.
> 
>  Ah yes, I didn't realize that. Indeed, for those things there is no way to
> handle them with $(PKG).
> 
>  Actually I would like those things to move to kconfig-package, but that would
> be dragging things a bit too far for this series.
> 
>  So yes, your idea of $(call barebox-package) looks good. One small remark that
> you can already fix before submitting: in the patch that adds the
> barebox-package function, say explicitly in the commit message if anything has
> changed except for $ -> $$ and BAREBOX -> $(1). That'll make review easier.

Thanks for having a look. I will break the series up into smaller pieces to
ease review:
1 - 2 as before.
3. Break out barebox-package (Explain the $ -> $$ subst).
4. Make the variable name-space configurable (Explain BAREBOX -> $(1) subst).
5. Make the package source name-space configurable (Explain BAREBOX -> $(2)
   subst).
6. Introduce boot/barebox-2/barebox-2.mk and Config.in with
   $(call barebox-package,BAREBOX_2,BAREBOX)
7. Add a defconfig for the BBB.

[snip]

Thank you for helping to bang this into shape.

- Pieter

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2016-03-07 18:31 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-20 22:43 [Buildroot] [v3, 0/4] Supporting building a second Barebox config Pieter Smith
2016-01-20 22:43 ` [Buildroot] [v3, 1/4] barebox: prepare for secondary config build Pieter Smith
2016-02-22 11:03   ` Yegor Yefremov
2016-02-26 23:17   ` Arnout Vandecappelle
2016-02-28  8:12     ` Pieter Smith
2016-02-29  7:47       ` Pieter Smith
2016-03-01 23:08         ` Arnout Vandecappelle
2016-03-02  7:50           ` Pieter Smith
2016-03-02 18:12             ` Arnout Vandecappelle
2016-03-02 21:32               ` Pieter Smith
2016-03-05 13:16                 ` Pieter Smith
2016-03-06 21:16                   ` Arnout Vandecappelle
2016-03-07 18:31                     ` Pieter Smith
2016-02-29  7:57     ` Pieter Smith
2016-01-20 22:43 ` [Buildroot] [v3, 2/4] barebox: adds option to build secondary config Pieter Smith
2016-02-22 11:03   ` Yegor Yefremov
2016-02-26 23:26   ` Arnout Vandecappelle
2016-02-29  8:01     ` Pieter Smith
2016-01-20 22:43 ` [Buildroot] [v3, 3/4] barebox: user selection of build output images Pieter Smith
2016-02-22 11:03   ` Yegor Yefremov
2016-02-26 23:43   ` Arnout Vandecappelle
2016-02-29  8:38     ` Pieter Smith
2016-03-01 23:14       ` Arnout Vandecappelle
2016-03-02  7:54         ` Pieter Smith
2016-03-02 18:18           ` Arnout Vandecappelle
2016-03-02 21:40             ` Pieter Smith
2016-03-06 23:03               ` Arnout Vandecappelle
2016-01-20 22:43 ` [Buildroot] [v3, 4/4] beaglebone: adds barebox bootloader defconfig Pieter Smith
2016-02-22 11:04   ` Yegor Yefremov
2016-02-26 23:47   ` Arnout Vandecappelle
2016-02-26 23:48     ` Arnout Vandecappelle
2016-02-29  8:44     ` Pieter Smith
2016-03-01 23:15       ` Arnout Vandecappelle
2016-03-02  7:55         ` Pieter Smith
2016-02-16 11:55 ` [Buildroot] [v3, 0/4] Supporting building a second Barebox config Yegor Yefremov
2016-02-16 18:55   ` Pieter Smith
2016-02-16 21:27     ` Yegor Yefremov
2016-02-21 17:25       ` Pieter Smith

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.