[Buildroot] which templates are used?

Bjørn Forsman bjorn.forsman at gmail.com
Wed Apr 20 16:59:56 UTC 2011


On 19 April 2011 22:25, Thomas Petazzoni
<thomas.petazzoni at free-electrons.com> wrote:
> On Mon, 11 Apr 2011 17:06:03 -0700
> Steve Calfee <stevecalfee at gmail.com> wrote:
>
>>  BR2_ROOTFS_POST_BUILD_SCRIPT
>
> That's also what I use. Instead of making modifications to
> fs/skeleton/, or completely duplicating that skeleton, my post build
> script :

I currently use git branches and edit fs/skeleton in each branch. I have
one branch per project. I think this setup has some nice properties:

>  *) Adjust some files from the skeleton. It does this in a way that
>    allows to re-run make several times without screwing things. For
>    example, if I need to add a new line at the end of a file
>    (like /etc/fstab), I first test that this line hasn't already been
>    added, in order to avoid duplicates.

Automatically handled (or non-existent problem) if using fs/skeleton with
git branches.

> This technique has several advantages :
>
>  *) You don't change the default skeleton, which would mess things up
>    next time you upgrade Buildroot ;

Why is it messy?

Using git branches you will be notified of conflicts. Upgrades are safe.
If, on the other hand, the post build script is used to edits skeleton
files you may end up with undetected conflicts after a skeleton upgrade
(unsafe).

>  *) As the post build script is executed at every 'make' invocation,
>    you don't have to 'make clean ; make' to see the effect of your post
>    build script changes.

I've modified the top Makefile so that fs/skeleton is copied to target dir
on every 'make' (patches sent to list[1]).

It may be seen as a downside that this approach is only
one-project-per-branch. But I find that there are already differences
between projects, not only in the skeleton files, so I use one branch per
project anyway.

Are there any (other) downsides to this approach I may have missed?

[1]: http://lists.busybox.net/pipermail/buildroot/2011-March/041685.html

Best regards,
Bjørn Forsman


More information about the buildroot mailing list