Skip to contentSkip to conversation

Add target to print buildroot version

PATCH Superseded Arnout Vandecappelle (Essensium/Mind) 4 participants 15 messages Mar 4, 2012 – Mar 6, 2012 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/3 Add target to print buildroot version

From: "Arnout Vandecappelle (Essensium/Mind)" <[email protected]>

It's convenient to have a target to print the buildroot version, for use in external scripts calling buildroot.

---
 .topdeps |    1 +
 .topmsg  |    7 +++++++
 Makefile |    5 ++++-
 3 files changed, 12 insertions(+), 1 deletions(-)
 create mode 100644 .topdeps
 create mode 100644 .topmsg
.topdeps new file +1 -0
new file mode 100644
index 0000000..1f7391f
@@ -0,0 +1 @@
+master
.topmsg new file +7 -0
new file mode 100644
index 0000000..b431fc4
@@ -0,0 +1,7 @@
+From: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
+Subject: [PATCH] Add target to print buildroot version
+
+It's convenient to have a target to print the buildroot version, for use
+in external scripts calling buildroot.
+
+Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
Makefile +4 -1
index d508888..30099d9 100644
@@ -48,7 +48,7 @@ export BR2_VERSION_FULL:=$(BR2_VERSION)$(shell $(TOPDIR)/support/scripts/setloca
 noconfig_targets:=menuconfig nconfig gconfig xconfig config oldconfig randconfig \
 	defconfig %_defconfig savedefconfig allyesconfig allnoconfig silentoldconfig release \
 	randpackageconfig allyespackageconfig allnopackageconfig \
-	source-check
+	source-check print-version
 
 # Strip quotes and then whitespaces
 qstrip=$(strip $(subst ",,$(1)))
@@ -721,6 +721,9 @@ release:
 	bzip2 -9 -c < $(OUT).tar > $(OUT).tar.bz2
 	rm -rf $(OUT) $(OUT).tar
 
+print-version:
+	@echo $(BR2_VERSION_FULL)
+
 ################################################################################
 # GENDOC -- generates the make targets needed to build a specific type of
 #           asciidoc documentation.
Signature · 1 line
1.7.9.1
#1 lore raw

PATCH v2 1/3 Add target to print buildroot version

Quoted 1 line · On Sunday 04 March 2012 14:03:14 Arnout Vandecappelle (Essensium/Mind) wrote:

From: "Arnout Vandecappelle (Essensium/Mind)" <[email protected]>

Slightly off-topic: does anyone know how I get rid of this redundant
From: line?

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
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:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#2 lore raw

PATCH v2 1/3 Add target to print buildroot version

Hi Arnout,

Quoted 4 lines · Arnout Vandecappelle
Quoted 1 line · On Sunday 04 March 2012 14:03:14 Arnout Vandecappelle (Essensium/Mind) wrote:

From: "Arnout Vandecappelle (Essensium/Mind)"<[email protected]>

Slightly off-topic: does anyone know how I get rid of this redundant
From: line?

In your patches I also see .topdeps and .topmsg files, so may this be is a topgit issue? I'm sorry I don't use it, so I cannot help.

I don't have this problem using plain git format-patch + git send-mail.

Luca

#3 lore raw

PATCH v2 1/3 Add target to print buildroot version

Quoted 10 lines · On Monday 05 March 2012 10:29:29 Luca Ceresoli wrote:

Hi Arnout,

Quoted 4 lines · Arnout Vandecappelle
Quoted 1 line · On Sunday 04 March 2012 14:03:14 Arnout Vandecappelle (Essensium/Mind) wrote:

From: "Arnout Vandecappelle (Essensium/Mind)"<[email protected]>

Slightly off-topic: does anyone know how I get rid of this redundant
From: line?

In your patches I also see .topdeps and .topmsg files, so may this be is a topgit issue? I'm sorry I don't use it, so I cannot help.

I didn't even notice those myself :-) I just playing with topgit, so
that's not the cause.

Quoted 2 lines

I don't have this problem using plain git format-patch + git send-mail.

I use git send-mail directly. Maybe that's it...

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
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:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#4 lore raw

PATCH v2 1/3 Add target to print buildroot version

In reply to Arnout Vandecappelle

Le Sun, 4 Mar 2012 14:05:35 +0100,
Arnout Vandecappelle <[email protected]> a ?crit :

Quoted 2 lines

Slightly off-topic: does anyone know how I get rid of this redundant
From: line?

I'm not sure how you generate your patches, but I never have this From:
line on my patches.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#5 lore raw

PATCH v2 2/3 config: make it possible to specify which config file to use for 'make defconfig'

In reply to Arnout Vandecappelle (Essensium/Mind)

From: "Arnout Vandecappelle (Essensium/Mind)" <[email protected]>

So that this works:

% make defconfig DEFCONFIG=~/busybox-defconfig

Right now we have to do:

% cp ~/busybox-defconfig configs/busybox_defconfig % make busybox_defconfig

That would dirty the buildroot tree and requires it to be writable.

---
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Makefile +1 -1
index 30099d9..b450b8f 100644
@@ -602,7 +602,7 @@ silentoldconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
 
 defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
 	@mkdir -p $(BUILD_DIR)/buildroot-config
-	@$(COMMON_CONFIG_ENV) $< --defconfig $(CONFIG_CONFIG_IN)
+	@$(COMMON_CONFIG_ENV) $< --defconfig$(patsubst %,=%,$(BR2_DEFCONFIG)) $(CONFIG_CONFIG_IN)
 
 %_defconfig: $(BUILD_DIR)/buildroot-config/conf $(TOPDIR)/configs/%_defconfig outputmakefile
 	@mkdir -p $(BUILD_DIR)/buildroot-config
Signature · 1 line
1.7.9.1
#6 lore raw

PATCH v2 2/3 config: make it possible to specify which config file to use for 'make defconfig'

Le Sun, 4 Mar 2012 14:03:15 +0100,
"Arnout Vandecappelle (Essensium/Mind)" <[email protected]> a ?crit :

Quoted 8 lines

From: "Arnout Vandecappelle (Essensium/Mind)" <[email protected]>

So that this works:

% make defconfig DEFCONFIG=~/busybox-defconfig

Right now we have to do:

Quoted 7 lines

% cp ~/busybox-defconfig configs/busybox_defconfig % make busybox_defconfig

That would dirty the buildroot tree and requires it to be writable.

Please change "busybox" to "buildroot" in the commit log. Otherwise, it's confusing since one might think you're talking about the Busybox configuration file.

Makefile silentoldconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile · line 605

Quoted 1 line
Makefile +1 -0
+	@$(COMMON_CONFIG_ENV) $< --defconfig$(patsubst %,=%,$(BR2_DEFCONFIG)) $(CONFIG_CONFIG_IN)

I'm not sure I understand why patsubst is used here. Something like:

	$(if $(BR2_DEFCONFIG),=$(BR2_DEFCONFIG))

would look more natural to me. Unless I'm missing something, of course.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#7 lore raw

PATCH v2 2/3 config: make it possible to specify which config file to use for 'make defconfig'

In reply to Arnout Vandecappelle (Essensium/Mind)
Quoted 24 lines · Arnout Vandecappelle (Essensium/Mind)

From: "Arnout Vandecappelle (Essensium/Mind)"<[email protected]>

So that this works:

% make defconfig DEFCONFIG=~/busybox-defconfig

Right now we have to do:

% cp ~/busybox-defconfig configs/busybox_defconfig % make busybox_defconfig

That would dirty the buildroot tree and requires it to be writable.

---
  Makefile |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
Makefile +0 -0
index 30099d9..b450b8f 100644

Makefile silentoldconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile · line 608

Quoted 8 lines
Makefile +1 -1
@@ -602,7 +602,7 @@ silentoldconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
 
  defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
  	@mkdir -p $(BUILD_DIR)/buildroot-config
-	@$(COMMON_CONFIG_ENV) $<  --defconfig $(CONFIG_CONFIG_IN)
+	@$(COMMON_CONFIG_ENV) $<  --defconfig$(patsubst %,=%,$(BR2_DEFCONFIG)) $(CONFIG_CONFIG_IN)
 
  %_defconfig: $(BUILD_DIR)/buildroot-config/conf $(TOPDIR)/configs/%_defconfig outputmakefile
  	@mkdir -p $(BUILD_DIR)/buildroot-config
#8 lore raw

PATCH v2 2/3 config: make it possible to specify which config file to use for 'make defconfig'

In reply to Arnout Vandecappelle (Essensium/Mind)
Quoted 1 line · Arnout Vandecappelle (Essensium/Mind)

From: "Arnout Vandecappelle (Essensium/Mind)" <[email protected]>

Is this really from you?

Quoted 6 lines

So that this works:

?% make defconfig DEFCONFIG=~/busybox-defconfig

- ? ? ? @$(COMMON_CONFIG_ENV) $< --defconfig $(CONFIG_CONFIG_IN)
+ ? ? ? @$(COMMON_CONFIG_ENV) $< --defconfig$(patsubst %,=%,$(BR2_DEFCONFIG)) $(CONFIG_CONFIG_IN)

Looks like an inconsistency there. AFAICS, it would be 'make defconfig BR2_DEFCONFIG=foo'.

Cheers.

Signature · 1 line
Felipe Contreras
#9 lore raw

PATCH v2 3/3 Add test infrastructure

In reply to Arnout Vandecappelle (Essensium/Mind)

From: "Arnout Vandecappelle (Essensium/Mind)" <[email protected]>

The test infrastructure is a script and a list of tests to be run. Additional test configurations can be added later to the test directory.

---
 .topdeps         |    3 +-
 .topmsg          |   13 ++++-
 test/runtests.sh |  122 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 test/testspecs   |   24 +++++++++++
 4 files changed, 158 insertions(+), 4 deletions(-)
 create mode 100755 test/runtests.sh
 create mode 100644 test/testspecs
.topdeps +2 -1
index 1f7391f..bbe331b 100644
@@ -1 +1,2 @@
-master
+t/print-version
+t/defconfig
.topmsg +10 -3
index b431fc4..3a90662 100644
@@ -1,7 +1,14 @@
 From: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
-Subject: [PATCH] Add target to print buildroot version
+Subject: [PATCH] Add test infrastructure
 
-It's convenient to have a target to print the buildroot version, for use
-in external scripts calling buildroot.
+The test infrastructure is a script and a list of tests to be run.
+Additional test configurations can be added later to the test directory.
 
 Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
+---
+Changes v2:
+ - Fixed support for defconfig and *packageconfig
+ - This now depends on the BR2_DEFCONFIG patch
+ - Use printf instead of echo (feedback from Yann)
+ - Use ${...} for all variable references (feedback from Yann)
+ - Put quotes around everything (feedback from Yann)
test/runtests.sh new file +122 -0

122 lines not on this page · raw message

test/testspecs new file +24 -0
new file mode 100644
index 0000000..2e3be3d
@@ -0,0 +1,24 @@
+configs/armadeus_apf9328_defconfig=def,randpackage
+configs/at91rm9200df_defconfig=def,randpackage
+configs/at91sam9260dfc_defconfig=def,randpackage
+configs/at91sam9261ek_defconfig=def,randpackage
+configs/at91sam9263ek_defconfig=def,randpackage
+configs/at91sam9g20dfc_defconfig=def,randpackage
+configs/atngw100_defconfig=def,randpackage
+configs/atstk100x_defconfig=def,randpackage
+configs/ea3250_defconfig=def,randpackage
+configs/fdi3250_defconfig=def,randpackage
+configs/integrator926_defconfig=def,randpackage
+configs/kb9202_defconfig=def,randpackage
+configs/mini2440_defconfig=def,randpackage
+configs/mx53loco_defconfig=def,randpackage
+configs/phy3250_defconfig=def,randpackage
+configs/qemu_arm_versatile_defconfig=def,randpackage
+configs/qemu_mips_malta_defconfig=def,randpackage
+configs/qemu_mipsel_malta_defconfig=def,randpackage
+configs/qemu_ppc_g3beige_defconfig=def,randpackage
+configs/qemu_sh4_r2d_defconfig=def,randpackage
+configs/qemu_sparc_ss10_defconfig=def,randpackage
+configs/qemu_x86_64_defconfig=def,randpackage
+configs/qemu_x86_defconfig=def,randpackage
+configs/sheevaplug_defconfig=def,randpackage
Signature · 1 line
1.7.9.1
#10 lore raw

PATCH v2 3/3 Add test infrastructure

test/runtests.sh line 57

Quoted 2 lines · On Sunday 04 March 2012 14:03:16 Arnout Vandecappelle (Essensium/Mind) wrote:
test/runtests.sh new file +2 -0
+       cp "${baseconfigfile}" "${configdir}/.config.in"
+       printf 'BR2_HOST_DIR="%s"\n' "${hostdir}" >> "${configdir}/.config.in"

The purpose of this non-default hostdir was to be able to reuse the
toolchain for several tests. That doesn't work the way it's done now, of course - it will still be rebuilt.

What I would need to do is:
1. build the toolchain using this config
2. change the config to use the external toolchain in ${hostdir}
3. run randpackageconfig
4. build with that randpackageconfig

I'm not sure how to do steps 1 and 2, though.

For step 1, I don't think there is a target for building the
toolchain, is there? For the internal toolchain it's a long list of targets, for an external or crosstool-NG toolchain it's 'uclibc'.

For step 2, how can I reliably change the config file to reflect the
external toolchain? I'd need to remove a lot of symbols but also add the external toolchain configuration options... Maybe we should create a piece of .config that sets all this when an internal or crosstool-NG toolchain is built?

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
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:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#11 lore raw

PATCH v2 3/3 Add test infrastructure

In reply to Arnout Vandecappelle (Essensium/Mind)

Le Sun, 4 Mar 2012 14:03:16 +0100,
"Arnout Vandecappelle (Essensium/Mind)" <[email protected]> a ?crit :

Quoted 2 lines

The test infrastructure is a script and a list of tests to be run. Additional test configurations can be added later to the test directory.

I know Peter has some test scripts as well, and so I have. Maybe we should first share what we have, and see what we can factorize?

In any case, this test infrastructure discussion should really be part of a separate set of patches. While your first two patches can be merged without much discussion, this third patch really requires some discussion. I don't want this test infrastructure to be the thing used only by one person, it needs to be used and usable by others.

Regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#12 lore raw

PATCH v2 3/3 Add test infrastructure

Quoted 8 lines · On Monday 05 March 2012 10:39:58 Thomas Petazzoni wrote:

Le Sun, 4 Mar 2012 14:03:16 +0100,
"Arnout Vandecappelle (Essensium/Mind)" <[email protected]> a ?crit :

Quoted 2 lines

The test infrastructure is a script and a list of tests to be run. Additional test configurations can be added later to the test directory.

I know Peter has some test scripts as well, and so I have. Maybe we should first share what we have, and see what we can factorize?

I was hoping that this patch would spur you guys on to do exactly that :-)

Quoted 5 lines

In any case, this test infrastructure discussion should really be part of a separate set of patches. While your first two patches can be merged without much discussion, this third patch really requires some discussion. I don't want this test infrastructure to be the thing used only by one person, it needs to be used and usable by others.

Agreed. But the third patch depends on the other two, that's why I send
it as a single series. Peter usually does pick up individual patches from a series so I don't see a problem with that.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
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:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#13 lore raw

PATCH v2 1/3 Add target to print buildroot version

In reply to Arnout Vandecappelle (Essensium/Mind)

Le Sun, 4 Mar 2012 14:03:14 +0100,
"Arnout Vandecappelle (Essensium/Mind)" <[email protected]> a ?crit :

Quoted 9 lines

From: "Arnout Vandecappelle (Essensium/Mind)" <[email protected]>

It's convenient to have a target to print the buildroot version, for use in external scripts calling buildroot.

---
 .topdeps |    1 +
 .topmsg  |    7 +++++++

Are you sure about these?

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#14 lore raw

PATCH v2 1/3 Add target to print buildroot version

In reply to Arnout Vandecappelle (Essensium/Mind)
Quoted 9 lines · Arnout Vandecappelle (Essensium/Mind)

From: "Arnout Vandecappelle (Essensium/Mind)"<[email protected]>

It's convenient to have a target to print the buildroot version, for use in external scripts calling buildroot.

---
  .topdeps |    1 +
  .topmsg  |    7 +++++++

Apart from these files (and possibly the unneeded From: line),