Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/5] Add a post-image script mechanism
Date: Wed, 16 Jan 2013 22:41:59 +0100	[thread overview]
Message-ID: <20130116224159.774f3f70@skate> (raw)
In-Reply-To: <201301162103.43793.yann.morin.1998@free.fr>

Dear Yann E. MORIN,

On Wed, 16 Jan 2013 21:03:43 +0100, Yann E. MORIN wrote:

> No need to pass $(BINARIES_DIR) as it now is in the environment.

I'd prefer to pass $(BINARIES_DIR) as argument, in order to keep a
symmetry with what we do for the post-build script.

> Would it make sense to run this under fakeroot?

Why?

> Also, I wonder if we could instead call these scripts for each image
> we generate, so it will already be run under fakeroot.

No, I don't think it's a good idea. For example, in my use-case, it was
used to create a firmware image that bundles multiple images generated
by Buildroot. So getting called on a per-image basis doesn't make sense.

> Not sure how to pass the image type to the script, though.
> Maybe, something like:
>   post-image.sh <image-file> <image-type> <compression>
> 
> with image-type ? {tar,ext2,squashfs...}
> and  compression ? {none,gz,bz2,lzma,xz...}
> 
> And the script would typically contain:
> 
>   #!/bin/sh
>   img_type="${1}"
>   img_file="${2}"
>   img_comp="${3}"
>   case "${img_type}" in
>     tar)
>       handle_tar "${img_file}" "#{img_comp}"
>       ;;
>     squashfs)
>       handle_squash "${img_file}"
>       ;;
>     *)
>       # Ignore other types
>      ;;
>   esac
> 
> At least, I find it more interesting.

Unfortunately, not me. Calling a script once all images are generated
is *simple*, the script is free to do whatever it wants. Iterate over
all images, iterate over certain images only, etc. There is really no
need to over-engineer this thing.

I really don't see the point of putting more complexity into this.
Let's have something nicely symmetric between the post-build script
feature and the post-image script feature.

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

  reply	other threads:[~2013-01-16 21:41 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-16 19:09 [Buildroot] Post-image script feature and other related fixes Thomas Petazzoni
2013-01-16 19:09 ` [Buildroot] [PATCH 1/5] Add a post-image script mechanism Thomas Petazzoni
2013-01-16 19:22   ` Stefan Fröberg
2013-01-16 20:03   ` Yann E. MORIN
2013-01-16 21:41     ` Thomas Petazzoni [this message]
2013-01-16 22:06       ` Yann E. MORIN
2013-01-17  8:14         ` Jeremy Rosen
2013-01-25 18:48   ` Yann E. MORIN
2013-01-29 16:27   ` Luca Ceresoli
2013-01-16 19:09 ` [Buildroot] [PATCH 2/5] docs/manual: mention the new post-image mechanism Thomas Petazzoni
2013-01-16 20:06   ` Yann E. MORIN
2013-01-16 21:42     ` Thomas Petazzoni
2013-01-25 18:50   ` Yann E. MORIN
2013-01-29 16:27   ` Luca Ceresoli
2013-01-16 19:09 ` [Buildroot] [PATCH 3/5] package/customize: remove Thomas Petazzoni
2013-01-19 12:51   ` Arnout Vandecappelle
2013-01-25 18:35   ` Yann E. MORIN
2013-01-29 16:27   ` Luca Ceresoli
2013-01-16 19:09 ` [Buildroot] [PATCH 4/5] docs/manual: no longer mention the package/customize thing Thomas Petazzoni
2013-01-16 20:10   ` Yann E. MORIN
2013-01-25 18:32   ` Yann E. MORIN
2013-01-29 16:27   ` Luca Ceresoli
2013-01-16 19:09 ` [Buildroot] [PATCH 5/5] docs/manual: slightly reword the solutions to customize rootfs Thomas Petazzoni
2013-01-25 18:31   ` Yann E. MORIN
2013-01-29 16:27   ` Luca Ceresoli

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=20130116224159.774f3f70@skate \
    --to=thomas.petazzoni@free-electrons.com \
    --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