From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/5] Makefile: add media image generation
Date: Thu, 19 Mar 2015 23:05:14 +0100 [thread overview]
Message-ID: <550B481A.4090708@mind.be> (raw)
In-Reply-To: <20150319000445.GD4578@free.fr>
On 19/03/15 01:04, Yann E. MORIN wrote:
> As discussed on IRC, I wonder why you need to add a new target in the
> top-level Makefile, rather than re-use the filesystem infra. something
> like:
>
> fs/Config.in
>
> # Existing filesystems, up to:
> source "fs/yaffs2/Config.in"
> commet "Aggregate filesystems" # Or whatever prompt that has meaning
> source "fs/genimage/Config.in"
>
>
> fs/genimage/Config.in
>
> config BR2_TARGET_ROOTFS_GENIMAGE
> bool "genimage"
> select BR2_PACKAGE_HOST_GENIMAGE
>
> config BR2_TARGET_ROOTFS_GENIMAGE_CFG
> string "path to genimage config files"
> depends on BR2_TARGET_ROOTFS_GENIMAGE
>
>
> fs/genimge/genimage.mk
>
> ROOTFS_GENIMAGE_DEPENDENCIES = host-genimage
> ROOTFS_GENIMAGE_DEPENDENCIES += $(if $(BR2_TARGET_ROOTFS_EXT2),rootfs-ext2)
> ROOTFS_GENIMAGE_DEPENDENCIES += $(if $(BR2_TARGET_ROOTFS_SQUASHFS),rootfs-squashfs)
> # And so on...
>
> define ROOTFS_GENIMAGE_CMD
> $(foreach cfg,$(call qstrip,$(BR2_TARGET_ROOTFS_GENIMAGE_CFG)),\
> TMPDIR="$$(mktemp -d $(BUILD_DIR)/.genimage.XXXXXXXXXX)" || exit 1; \
> $(INSTALL) -d -m 0755 $${TMPDIR}/{root,tmp} || exit 1; \
> $(EXTRA_ENV) $(HOST_DIR)/usr/bin/genimage \
> --rootpath $(TARGET_DIR) \
> --tmppath $${RMPDIR}/tmp \
> --inputpath $(BIANRIES_DIR) \
> --outputpath $(BIANRIES_DIR) \
> --config $(cfg) || exit 1; \
> rm -rf $${TMPDIR} || exit 1$(sep))
> endef
>
>
> And then there's no need to add another top-level Makefile rule.
But this approach looks more complicated, and if a new fs target is added the
genimage thing also has to be updated... So I'm more in favour of the original
proposal.
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: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
next prev parent reply other threads:[~2015-03-19 22:05 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-17 22:51 [Buildroot] [PATCH 0/5] media image generation Vivien Didelot
2015-03-17 22:51 ` [Buildroot] [PATCH 1/5] Makefile: add " Vivien Didelot
2015-03-19 0:04 ` Yann E. MORIN
2015-03-19 8:27 ` Thomas Petazzoni
2015-03-19 8:44 ` Yann E. MORIN
2015-03-19 9:19 ` Thomas Petazzoni
2015-03-19 17:37 ` Vivien Didelot
2015-03-19 18:25 ` Yann E. MORIN
2015-03-19 20:31 ` Vivien Didelot
2015-03-19 22:46 ` Arnout Vandecappelle
2015-03-19 22:05 ` Arnout Vandecappelle [this message]
2015-03-17 22:51 ` [Buildroot] [PATCH 2/5] board/raspberrypi: install Device Tree Vivien Didelot
2015-03-18 22:44 ` Yann E. MORIN
2015-03-18 23:05 ` Vivien Didelot
2015-03-17 22:51 ` [Buildroot] [PATCH 3/5] board/raspberrypi: add a genimage config Vivien Didelot
2015-03-17 22:51 ` [Buildroot] [PATCH 4/5] board/beaglebone: " Vivien Didelot
2015-03-17 22:51 ` [Buildroot] [PATCH 5/5] board/wandboard: " Vivien Didelot
2015-03-19 22:57 ` [Buildroot] [PATCH 0/5] media image generation Arnout Vandecappelle
2015-03-20 0:52 ` Vivien Didelot
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=550B481A.4090708@mind.be \
--to=arnout@mind.be \
--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