Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Ceresoli <luca@lucaceresoli.net>
To: buildroot@busybox.net
Subject: [Buildroot] [pull request] Pull request for branch	for-2011.08/bootloaders
Date: Tue, 31 May 2011 22:01:13 +0200	[thread overview]
Message-ID: <4DE54909.80900@lucaceresoli.net> (raw)
In-Reply-To: <cover.1306782275.git.thomas.petazzoni@free-electrons.com>

Hi Thomas,

Thomas Petazzoni wrote:
> Hello,
>
> We have a package infrastructure that allows to share a lot of common
> behaviour between packages, and allows to add new features easily to
> all existing packages (Git/Mercurial download support, or usage of an
> external source tree, etc.).
>
> Unfortunately, some of the packages that would most benefit from those
> new infrastructure features are the bootloader and kernel, since it's
> typically the software components that have to be modified/tuned
> during the course of an embedded Linux project.
>
> Therefore, this series converts all bootloaders makefiles and the
> kernel makefile to the package infrastructure, and adds the
> possibility of fetching the kernel and u-boot through Git (it can be
> added to other bootloaders with just a few lines of changes, mostly at
> the Config.in level).
[snip]

> Most of the changes have already been tested sucessfully by Luca Ceresoli.

I confirm the new patchset is working, and the newly-introduced git knob in
menuconfig does as well.

On the other hand, I noticed an annoying problem.

Both Linux and U-Boot embed a version string computed from git describe or
similar, which includes the most recent git tag name and possibly the
abbreviated SHA1. This info is very useful to keep software traceability.

If buildroot is built from a git tree (as opposed to a tar.gz release) 
and the
build is done in-tree, the version computation for U-Boot and Linux does not
work anymore.

U-Boot prints at startup:
 > U-Boot 2011.03-00106-gbfd25f9-dirty (May 31 2011 - 15:30:36)
which looks ok, except bfd25f9 is the current commit in the buildroot git
repository, not in the U-Boot one.
This looks obvious (after having noticed it...), because U-Boot gets built
inside output/build/u-boot-$(VERSION)/, which is not a git repo. So git 
describe
does actually describe the buildroot repo instead.

Linux just does not attach any -g<SHA1> to its version number, which is 
equally
wrong since I configured buildroot to checkout a commit that is not a tag.
In fact if Linux is built inside its own git repo as I used to do so far, it
prints a version number that includes the abbreviated SHA1.

The root of this problem is in the way git download with in buildroot, and
actually it would affect any package downloaded via git which uses git info
to compute their version numbers.

Is there anyone else out there using the version string (computed from 
tag and
SHA1) for software traceability?

If this is considered a problem, the only solution that comes to my mind 
is that
we should clone a git repo in output/build/<package>, not extract a tarball.
This is definitely not very nice.

Luca

      parent reply	other threads:[~2011-05-31 20:01 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-30 20:22 [Buildroot] [pull request] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
2011-05-30 20:22 ` [Buildroot] [PATCH 01/26] Makefile.package.in: Makes it possible to override the default extract commands Thomas Petazzoni
2011-05-30 20:22 ` [Buildroot] [PATCH 02/26] Fix quoting in default extract command Thomas Petazzoni
2011-05-30 20:22 ` [Buildroot] [PATCH 03/26] linux: make it possible to install the kernel in /boot Thomas Petazzoni
2011-06-20 15:02   ` Luca Ceresoli
2011-06-20 15:52     ` Thomas Petazzoni
2011-05-30 20:22 ` [Buildroot] [PATCH 04/26] linux: use the defconfig mechanism after tuning the config Thomas Petazzoni
2011-05-30 20:22 ` [Buildroot] [PATCH 05/26] package: add infrastructure to install things in images/ Thomas Petazzoni
2011-05-30 20:22 ` [Buildroot] [PATCH 06/26] package: fix patching procedure for host packages Thomas Petazzoni
2011-05-30 20:22 ` [Buildroot] [PATCH 07/26] barebox: use = instead of := and re-indent Thomas Petazzoni
2011-05-30 20:22 ` [Buildroot] [PATCH 08/26] barebox: convert to GENTARGETS Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 09/26] at91bootstrap: use = instead of := and indent properly Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 10/26] at91bootstrap: convert to GENTARGETS Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 11/26] at91dataflashboot: use = instead of := and indent Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 12/26] at91dataflashboot: convert to GENTARGETS Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 13/26] syslinux: " Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 14/26] grub: convert to AUTOTARGETS Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 15/26] grub2: remove package Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 16/26] u-boot: convert to GENTARGETS Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 17/26] uboot-mkimage: new package Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 18/26] linux: rename LINUX26 to LINUX Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 19/26] linux: indent and align some definitions Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 20/26] package: add support for post-download hooks Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 21/26] linux: convert to the GENTARGETS infrastructure Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 22/26] boot: rename BR2_TARGET_* to BR2_BOOT_* Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 23/26] u-boot: rename options BR2_BOOT_UBOOT* to BR2_BOOT_U_BOOT* Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 24/26] Improve TARGETS handling for bootloaders and kernel Thomas Petazzoni
2011-06-20 15:01   ` Luca Ceresoli
2011-06-20 15:59     ` Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 25/26] linux: allow specification of a custom Git repository as a source Thomas Petazzoni
2011-05-30 23:14   ` Mike Frysinger
2011-05-31  6:58     ` Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 26/26] u-boot: allow specification of custom Git repo as source Thomas Petazzoni
2011-05-31 20:01 ` Luca Ceresoli [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DE54909.80900@lucaceresoli.net \
    --to=luca@lucaceresoli.net \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox