All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [RFC 0/2] add a minimal genimage support
@ 2015-02-12 22:33 Vivien Didelot
  2015-02-12 22:33 ` [Buildroot] [RFC 1/2] Makefile: add target-genimage Vivien Didelot
  2015-02-12 22:33 ` [Buildroot] [RFC 2/2] boards/raspberrypi: add a sample genimage config Vivien Didelot
  0 siblings, 2 replies; 7+ messages in thread
From: Vivien Didelot @ 2015-02-12 22:33 UTC (permalink / raw)
  To: buildroot

This patchset adds a minimal support for genimage config files, to ease the
generation of custom complete target images.

The first patch explains the convenience of this host tool, and adds the
mechanism to wrap and call genimage against optional config file(s).

The second patch uses the Raspberry Pi as an example for genimage. This shows
how Buildroot can be used to create a fully functional SD card image with a
persistent rootfs, without the need to mount any partition.

Vivien Didelot (2):
  Makefile: add target-genimage
  boards/raspberrypi: add a sample genimage config

 Makefile                                  | 17 +++++++++++++++--
 board/raspberrypi/genimage/persistent.cfg | 29 +++++++++++++++++++++++++++++
 board/raspberrypi/readme.txt              |  9 +++++++--
 configs/raspberrypi_defconfig             |  4 ++++
 system/Config.in                          | 22 ++++++++++++++++++++++
 5 files changed, 77 insertions(+), 4 deletions(-)
 create mode 100644 board/raspberrypi/genimage/persistent.cfg

-- 
2.3.0

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [RFC 1/2] Makefile: add target-genimage
  2015-02-12 22:33 [Buildroot] [RFC 0/2] add a minimal genimage support Vivien Didelot
@ 2015-02-12 22:33 ` Vivien Didelot
  2015-02-14 17:24   ` Danomi Manchego
  2015-02-12 22:33 ` [Buildroot] [RFC 2/2] boards/raspberrypi: add a sample genimage config Vivien Didelot
  1 sibling, 1 reply; 7+ messages in thread
From: Vivien Didelot @ 2015-02-12 22:33 UTC (permalink / raw)
  To: buildroot

genimage is a convenient host tool which eases the generation of images
and partition layout by providing simple configuration files.

This patch adds a new BR2_ROOTFS_GENIMAGE_CFG menuconfig entry, which is
a space-separated list of config files. Indeed, you may want to split
images in different files, or put them all together in the same file.

BR2_ROOTFS_GENIMAGE_HOST_DEPENDENCIES is meant to auto-select the
packages that genimage may use, such as mkdosfs or mcopy (which copies
files from/to unmounted vfat images).

The rational behind adding this to Buildroot is that genimage requires
an overhead configuration to use it, like temporary directories, host
dependencies, and images path, that Buildroot is all aware of. This
minimal addition is optional and allows the user not to write the same
post-image script to wrap the genimage call.

Finally, the new "target-genimage" make target is called before
target-post-image so that the post-image script can still clean
intermediate generated images and do whatever with the very final image.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
---
 Makefile         | 17 +++++++++++++++--
 system/Config.in | 22 ++++++++++++++++++++++
 2 files changed, 37 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 338c992..1eb1619 100644
--- a/Makefile
+++ b/Makefile
@@ -434,7 +434,7 @@ world: target-post-image
 
 .PHONY: all world toolchain dirs clean distclean source outputmakefile \
 	legal-info legal-info-prepare legal-info-clean printvars \
-	target-finalize target-post-image \
+	target-finalize target-genimage target-post-image \
 	$(TARGETS) $(TARGETS_ROOTFS) \
 	$(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) $(TARGETS_LEGAL_INFO) \
 	$(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
@@ -621,7 +621,20 @@ endif
 		$(call MESSAGE,"Executing post-build script $(s)"); \
 		$(EXTRA_ENV) $(s) $(TARGET_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
 
-target-post-image: $(TARGETS_ROOTFS) target-finalize
+target-genimage: $(TARGETS_ROOTFS) target-finalize
+	@$(foreach cfg, $(call qstrip,$(BR2_ROOTFS_GENIMAGE_CFG)), \
+	$(call MESSAGE,"Executing genimage with config $(cfg)"); \
+	  T=$$(mktemp -d $(BUILD_DIR)/.genimage.XXXXXXXXXX); \
+	  mkdir -p $$T/{root,tmp}; \
+	  $(EXTRA_ENV) output/host/usr/bin/genimage \
+	  --rootpath $$T/root \
+	  --tmppath $$T/tmp \
+	  --inputpath output/images/ \
+	  --outputpath output/images/ \
+	  --config $(cfg); \
+	  rm -rf $$T$(sep))
+
+target-post-image: target-genimage
 	@$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_IMAGE_SCRIPT)), \
 		$(call MESSAGE,"Executing post-image script $(s)"); \
 		$(EXTRA_ENV) $(s) $(BINARIES_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
diff --git a/system/Config.in b/system/Config.in
index 95e10ab..2596da8 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -421,6 +421,28 @@ config BR2_ROOTFS_POST_BUILD_SCRIPT
 	  argument. Make sure the exit code of those scripts are 0, otherwise
 	  make will stop after calling them.
 
+config BR2_ROOTFS_GENIMAGE_CFG
+	string "genimage config files to prepare custom images"
+	default ""
+	help
+	  Specify a space-separated list of configuration files for genimage to be
+	  run after the build has finished and after Buildroot has packed the files
+	  into selected filesystem images.
+
+	  This can for example be used to generate a card image with an vfat
+	  partition containing some boot files, and an ext4 rootfs.
+
+	  genimage is executed from the main Buildroot source directory, with input
+	  and output paths configured to output/images.
+
+config BR2_ROOTFS_GENIMAGE_HOST_DEPENDENCIES
+	bool "genimage host dependencies"
+	default y
+	depends on BR2_ROOTFS_GENIMAGE_CFG != ""
+	select BR2_PACKAGE_HOST_GENIMAGE
+	select BR2_PACKAGE_HOST_DOSFSTOOLS
+	select BR2_PACKAGE_HOST_MTOOLS
+
 config BR2_ROOTFS_POST_IMAGE_SCRIPT
 	string "Custom scripts to run after creating filesystem images"
 	default ""
-- 
2.3.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Buildroot] [RFC 2/2] boards/raspberrypi: add a sample genimage config
  2015-02-12 22:33 [Buildroot] [RFC 0/2] add a minimal genimage support Vivien Didelot
  2015-02-12 22:33 ` [Buildroot] [RFC 1/2] Makefile: add target-genimage Vivien Didelot
@ 2015-02-12 22:33 ` Vivien Didelot
  1 sibling, 0 replies; 7+ messages in thread
From: Vivien Didelot @ 2015-02-12 22:33 UTC (permalink / raw)
  To: buildroot

This patch adds a "persistent.cfg" genimage config file for the
Raspberry Pi, to use with a persistent rootfs. The final generated
"sdcard.img" image is ready to use and contains the setup explained in
the board readme.txt file: a bootable vfat partition with the
rpi-firmware files, and an ext4 rootfs partition.

The defconfig and readme file have been slightly changed to add the
generation of the rootfs.ext4 filesystem.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
---
 board/raspberrypi/genimage/persistent.cfg | 29 +++++++++++++++++++++++++++++
 board/raspberrypi/readme.txt              |  9 +++++++--
 configs/raspberrypi_defconfig             |  4 ++++
 3 files changed, 40 insertions(+), 2 deletions(-)
 create mode 100644 board/raspberrypi/genimage/persistent.cfg

diff --git a/board/raspberrypi/genimage/persistent.cfg b/board/raspberrypi/genimage/persistent.cfg
new file mode 100644
index 0000000..9919cc5
--- /dev/null
+++ b/board/raspberrypi/genimage/persistent.cfg
@@ -0,0 +1,29 @@
+image boot.vfat {
+  vfat {
+    files = {
+      "rpi-firmware/bootcode.bin",
+      "rpi-firmware/config.txt",
+      "rpi-firmware/fixup.dat",
+      "rpi-firmware/start.elf",
+      "zImage"
+    }
+  }
+  size = 10M
+}
+
+image sdcard.img {
+  hdimage {
+  }
+
+  partition boot {
+    partition-type = 0xC
+    bootable = "true"
+    image = "boot.vfat"
+  }
+
+  partition rootfs {
+    partition-type = 0x83
+    image = "rootfs.ext4"
+    size = 512M
+  }
+}
diff --git a/board/raspberrypi/readme.txt b/board/raspberrypi/readme.txt
index ead9227..832c746 100644
--- a/board/raspberrypi/readme.txt
+++ b/board/raspberrypi/readme.txt
@@ -11,6 +11,9 @@ Buildroot, you have to choose whether you will use:
 
 Also, a good source of information is http://elinux.org/R-Pi_Hub
 
+Note: Buildroot already prepared an "sdcard.img" image for a persistent
+rootfs, but this document explains how to do it manually.
+
 How to build it
 ===============
 
@@ -56,6 +59,7 @@ After building, you should obtain this tree:
 
     output/images/
     +-- rootfs.tar                              [0]
+    +-- rootfs.ext4                             [0]
     +-- rpi-firmware/
     |   +-- bcm2708-rpi-b.dtb                   [1]
     |   +-- bcm2708-rpi-b-plus.dtb              [1]
@@ -65,8 +69,9 @@ After building, you should obtain this tree:
     |   `-- start.elf
     `-- zImage
 
-[0] Note for Volatile: rootfs.tar will only be there if you kept
-    "tar the root filesystem" option selected in "Filesystem images".
+[0] Note for Volatile: rootfs.tar and rootfs.ext4 will only be there if
+    you kept "tar the root filesystem" and "ext2/3/4 root filesystem"
+    options selected in "Filesystem images".
 
 [1] The DTBs (Device Tree Blobs) will only be present if you setup
     Buildroot to install the DTBs from the rpi-firmware package, and
diff --git a/configs/raspberrypi_defconfig b/configs/raspberrypi_defconfig
index 835657c..26ebfb4 100644
--- a/configs/raspberrypi_defconfig
+++ b/configs/raspberrypi_defconfig
@@ -20,3 +20,7 @@ BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="c256eb9968c8997dce47350d2075e42f1b3991d3"
 BR2_LINUX_KERNEL_USE_DEFCONFIG=y
 BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi_quick"
 BR2_LINUX_KERNEL_ZIMAGE=y
+
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_ROOTFS_GENIMAGE_CFG="board/raspberrypi/genimage/persistent.cfg"
-- 
2.3.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Buildroot] [RFC 1/2] Makefile: add target-genimage
  2015-02-12 22:33 ` [Buildroot] [RFC 1/2] Makefile: add target-genimage Vivien Didelot
@ 2015-02-14 17:24   ` Danomi Manchego
  2015-02-16 16:41     ` Vivien Didelot
  0 siblings, 1 reply; 7+ messages in thread
From: Danomi Manchego @ 2015-02-14 17:24 UTC (permalink / raw)
  To: buildroot

Vivean,

A couple nitpicks ...

On Thu, Feb 12, 2015 at 5:33 PM, Vivien Didelot
<vivien.didelot@savoirfairelinux.com> wrote:
> genimage is a convenient host tool which eases the generation of images
> and partition layout by providing simple configuration files.
>
> This patch adds a new BR2_ROOTFS_GENIMAGE_CFG menuconfig entry, which is
> a space-separated list of config files. Indeed, you may want to split
> images in different files, or put them all together in the same file.
>
> BR2_ROOTFS_GENIMAGE_HOST_DEPENDENCIES is meant to auto-select the
> packages that genimage may use, such as mkdosfs or mcopy (which copies
> files from/to unmounted vfat images).
>
> The rational behind adding this to Buildroot is that genimage requires

spelling: "rationale".

> an overhead configuration to use it, like temporary directories, host
> dependencies, and images path, that Buildroot is all aware of. This
> minimal addition is optional and allows the user not to write the same
> post-image script to wrap the genimage call.
>
> Finally, the new "target-genimage" make target is called before
> target-post-image so that the post-image script can still clean
> intermediate generated images and do whatever with the very final image.
>
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
> ---
>  Makefile         | 17 +++++++++++++++--
>  system/Config.in | 22 ++++++++++++++++++++++
>  2 files changed, 37 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 338c992..1eb1619 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -434,7 +434,7 @@ world: target-post-image
>
>  .PHONY: all world toolchain dirs clean distclean source outputmakefile \
>         legal-info legal-info-prepare legal-info-clean printvars \
> -       target-finalize target-post-image \
> +       target-finalize target-genimage target-post-image \
>         $(TARGETS) $(TARGETS_ROOTFS) \
>         $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) $(TARGETS_LEGAL_INFO) \
>         $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
> @@ -621,7 +621,20 @@ endif
>                 $(call MESSAGE,"Executing post-build script $(s)"); \
>                 $(EXTRA_ENV) $(s) $(TARGET_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
>
> -target-post-image: $(TARGETS_ROOTFS) target-finalize
> +target-genimage: $(TARGETS_ROOTFS) target-finalize
> +       @$(foreach cfg, $(call qstrip,$(BR2_ROOTFS_GENIMAGE_CFG)), \
> +       $(call MESSAGE,"Executing genimage with config $(cfg)"); \
> +         T=$$(mktemp -d $(BUILD_DIR)/.genimage.XXXXXXXXXX); \
> +         mkdir -p $$T/{root,tmp}; \
> +         $(EXTRA_ENV) output/host/usr/bin/genimage \
> +         --rootpath $$T/root \
> +         --tmppath $$T/tmp \
> +         --inputpath output/images/ \
> +         --outputpath output/images/ \
> +         --config $(cfg); \
> +         rm -rf $$T$(sep))

I don't think the final $(sep) is needed, since this the last line of
a makefile target, as opposed to, say. a template.

Danomi -


> +
> +target-post-image: target-genimage
>         @$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_IMAGE_SCRIPT)), \
>                 $(call MESSAGE,"Executing post-image script $(s)"); \
>                 $(EXTRA_ENV) $(s) $(BINARIES_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
> diff --git a/system/Config.in b/system/Config.in
> index 95e10ab..2596da8 100644
> --- a/system/Config.in
> +++ b/system/Config.in
> @@ -421,6 +421,28 @@ config BR2_ROOTFS_POST_BUILD_SCRIPT
>           argument. Make sure the exit code of those scripts are 0, otherwise
>           make will stop after calling them.
>
> +config BR2_ROOTFS_GENIMAGE_CFG
> +       string "genimage config files to prepare custom images"
> +       default ""
> +       help
> +         Specify a space-separated list of configuration files for genimage to be
> +         run after the build has finished and after Buildroot has packed the files
> +         into selected filesystem images.
> +
> +         This can for example be used to generate a card image with an vfat
> +         partition containing some boot files, and an ext4 rootfs.
> +
> +         genimage is executed from the main Buildroot source directory, with input
> +         and output paths configured to output/images.
> +
> +config BR2_ROOTFS_GENIMAGE_HOST_DEPENDENCIES
> +       bool "genimage host dependencies"
> +       default y
> +       depends on BR2_ROOTFS_GENIMAGE_CFG != ""
> +       select BR2_PACKAGE_HOST_GENIMAGE
> +       select BR2_PACKAGE_HOST_DOSFSTOOLS
> +       select BR2_PACKAGE_HOST_MTOOLS
> +
>  config BR2_ROOTFS_POST_IMAGE_SCRIPT
>         string "Custom scripts to run after creating filesystem images"
>         default ""
> --
> 2.3.0
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [RFC 1/2] Makefile: add target-genimage
  2015-02-14 17:24   ` Danomi Manchego
@ 2015-02-16 16:41     ` Vivien Didelot
  2015-02-17  2:37       ` Danomi Manchego
  0 siblings, 1 reply; 7+ messages in thread
From: Vivien Didelot @ 2015-02-16 16:41 UTC (permalink / raw)
  To: buildroot

Hi Danomi,

> A couple nitpicks ...

[...]

> > The rational behind adding this to Buildroot is that genimage
> > requires
> 
> spelling: "rationale".

Thanks.

[...]

> > --- a/Makefile
> > +++ b/Makefile
> > @@ -434,7 +434,7 @@ world: target-post-image
> >
> >  .PHONY: all world toolchain dirs clean distclean source
> >  outputmakefile \
> >         legal-info legal-info-prepare legal-info-clean printvars \
> > -       target-finalize target-post-image \
> > +       target-finalize target-genimage target-post-image \
> >         $(TARGETS) $(TARGETS_ROOTFS) \
> >         $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) $(TARGETS_LEGAL_INFO)
> >         \
> >         $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
> > @@ -621,7 +621,20 @@ endif
> >                 $(call MESSAGE,"Executing post-build script $(s)");
> >                 \
> >                 $(EXTRA_ENV) $(s) $(TARGET_DIR) $(call
> >                 qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
> >
> > -target-post-image: $(TARGETS_ROOTFS) target-finalize
> > +target-genimage: $(TARGETS_ROOTFS) target-finalize
> > +       @$(foreach cfg, $(call qstrip,$(BR2_ROOTFS_GENIMAGE_CFG)),
> > \
> > +       $(call MESSAGE,"Executing genimage with config $(cfg)"); \
> > +         T=$$(mktemp -d $(BUILD_DIR)/.genimage.XXXXXXXXXX); \
> > +         mkdir -p $$T/{root,tmp}; \
> > +         $(EXTRA_ENV) output/host/usr/bin/genimage \
> > +         --rootpath $$T/root \
> > +         --tmppath $$T/tmp \
> > +         --inputpath output/images/ \
> > +         --outputpath output/images/ \
> > +         --config $(cfg); \
> > +         rm -rf $$T$(sep))
> 
> I don't think the final $(sep) is needed, since this the last line of
> a makefile target, as opposed to, say. a template.

Are you sure? I'm not sure either but I tried to follow the other foreach 
statements.

Thanks for the nitpicks. Other than that, an feedback on the overall RFC?

Regards,
Vivien

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [RFC 1/2] Makefile: add target-genimage
  2015-02-16 16:41     ` Vivien Didelot
@ 2015-02-17  2:37       ` Danomi Manchego
  2015-02-25 10:48         ` Zoltan Gyarmati
  0 siblings, 1 reply; 7+ messages in thread
From: Danomi Manchego @ 2015-02-17  2:37 UTC (permalink / raw)
  To: buildroot

Vivien,

On Mon, Feb 16, 2015 at 11:41 AM, Vivien Didelot
<vivien.didelot@savoirfairelinux.com> wrote:
> Hi Danomi,
>
>> A couple nitpicks ...
>
> [...]
>
>> > The rational behind adding this to Buildroot is that genimage
>> > requires
>>
>> spelling: "rationale".
>
> Thanks.
>
> [...]
>
>> > --- a/Makefile
>> > +++ b/Makefile
>> > @@ -434,7 +434,7 @@ world: target-post-image
>> >
>> >  .PHONY: all world toolchain dirs clean distclean source
>> >  outputmakefile \
>> >         legal-info legal-info-prepare legal-info-clean printvars \
>> > -       target-finalize target-post-image \
>> > +       target-finalize target-genimage target-post-image \
>> >         $(TARGETS) $(TARGETS_ROOTFS) \
>> >         $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) $(TARGETS_LEGAL_INFO)
>> >         \
>> >         $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
>> > @@ -621,7 +621,20 @@ endif
>> >                 $(call MESSAGE,"Executing post-build script $(s)");
>> >                 \
>> >                 $(EXTRA_ENV) $(s) $(TARGET_DIR) $(call
>> >                 qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
>> >
>> > -target-post-image: $(TARGETS_ROOTFS) target-finalize
>> > +target-genimage: $(TARGETS_ROOTFS) target-finalize
>> > +       @$(foreach cfg, $(call qstrip,$(BR2_ROOTFS_GENIMAGE_CFG)),
>> > \
>> > +       $(call MESSAGE,"Executing genimage with config $(cfg)"); \
>> > +         T=$$(mktemp -d $(BUILD_DIR)/.genimage.XXXXXXXXXX); \
>> > +         mkdir -p $$T/{root,tmp}; \
>> > +         $(EXTRA_ENV) output/host/usr/bin/genimage \
>> > +         --rootpath $$T/root \
>> > +         --tmppath $$T/tmp \
>> > +         --inputpath output/images/ \
>> > +         --outputpath output/images/ \
>> > +         --config $(cfg); \
>> > +         rm -rf $$T$(sep))
>>
>> I don't think the final $(sep) is needed, since this the last line of
>> a makefile target, as opposed to, say. a template.
>
> Are you sure? I'm not sure either but I tried to follow the other foreach
> statements.

Ah, so sorry, I missed the fact that it was a foreach.  Comment retracted!


> Thanks for the nitpicks. Other than that, an feedback on the overall RFC?

Sorry, I haven't actually tried it.

Danomi -


> Regards,
> Vivien

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [RFC 1/2] Makefile: add target-genimage
  2015-02-17  2:37       ` Danomi Manchego
@ 2015-02-25 10:48         ` Zoltan Gyarmati
  0 siblings, 0 replies; 7+ messages in thread
From: Zoltan Gyarmati @ 2015-02-25 10:48 UTC (permalink / raw)
  To: buildroot

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dear Vivien,


looks good so far, and it fits well into my workflow, thanks for your
contribution.
Unfortunately the out-of tree build is broken with this version,
please see inline in your patch my comment.
I would propose to resend this patch with the fixed typos and the fix
for the out-of-tree build.


On 17.02.2015 03:37, Danomi Manchego wrote:
> Vivien,
> 
> On Mon, Feb 16, 2015 at 11:41 AM, Vivien Didelot 
> <vivien.didelot@savoirfairelinux.com> wrote:
>> Hi Danomi,
>> 
>>> A couple nitpicks ...
>> 
>> [...]
>> 
>>>> The rational behind adding this to Buildroot is that
>>>> genimage requires
>>> 
>>> spelling: "rationale".
>> 
>> Thanks.
>> 
>> [...]
>> 
>>>> --- a/Makefile +++ b/Makefile @@ -434,7 +434,7 @@ world:
>>>> target-post-image
>>>> 
>>>> .PHONY: all world toolchain dirs clean distclean source 
>>>> outputmakefile \ legal-info legal-info-prepare
>>>> legal-info-clean printvars \ -       target-finalize
>>>> target-post-image \ +       target-finalize target-genimage
>>>> target-post-image \ $(TARGETS) $(TARGETS_ROOTFS) \ 
>>>> $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) $(TARGETS_LEGAL_INFO) 
>>>> \ $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \ @@ -621,7
>>>> +621,20 @@ endif $(call MESSAGE,"Executing post-build script
>>>> $(s)"); \ $(EXTRA_ENV) $(s) $(TARGET_DIR) $(call 
>>>> qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
>>>> 
>>>> -target-post-image: $(TARGETS_ROOTFS) target-finalize 
>>>> +target-genimage: $(TARGETS_ROOTFS) target-finalize +
>>>> @$(foreach cfg, $(call qstrip,$(BR2_ROOTFS_GENIMAGE_CFG)), \ 
>>>> +       $(call MESSAGE,"Executing genimage with config
>>>> $(cfg)"); \ +         T=$$(mktemp -d
>>>> $(BUILD_DIR)/.genimage.XXXXXXXXXX); \ +         mkdir -p
>>>> $$T/{root,tmp}; \ +         $(EXTRA_ENV)
>>>> output/host/usr/bin/genimage \
should be $(HOST_DIR)/output/host/



>>>> +         --rootpath $$T/root \ +         --tmppath $$T/tmp
>>>> \ +         --inputpath output/images/ \ +
>>>> --outputpath output/images/ \
both of the paths should be $(BINARIES_DIR)


>>>> +         --config $(cfg); \ +         rm -rf $$T$(sep))
>>> 
>>> I don't think the final $(sep) is needed, since this the last
>>> line of a makefile target, as opposed to, say. a template.
>> 
>> Are you sure? I'm not sure either but I tried to follow the other
>> foreach statements.
> 
> Ah, so sorry, I missed the fact that it was a foreach.  Comment
> retracted!
> 
> 
>> Thanks for the nitpicks. Other than that, an feedback on the
>> overall RFC?
> 
> Sorry, I haven't actually tried it.
> 
> Danomi -
> 
> 
>> Regards, Vivien
> _______________________________________________ buildroot mailing
> list buildroot at busybox.net 
> http://lists.busybox.net/mailman/listinfo/buildroot
> 



- -- 
Bests,
Zoltan Gyarmati
IRC freenode: zgyarmati
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJU7ah2AAoJEAGmEeeR8iVhZ38H/0ZX29k/tKM3zjy05jwAGEcE
OM0ySLjhIH+8843/CaNBszDXhG7kIxvfpFfX6ugGnmPJ2NAWu3ajnqk9oYHYkDyN
gJJ7cN7aKo1RzVz64idZNY4ZyOxWyJVAK8vuLroQMOZO2h3Ztepf577UsfayfE82
ThIY4tmAgwbIrdoWeC6R6YGtlMgIMpyzEtQe4FGqNYhMT29XMhyvAJfGt0Ep+EMR
o7FKZrBWMr+G+mX2M6QuFTPcAcY5hffqRUccOOp1pS5ciVSeOVkr2yUnlMpS5CNQ
8gCBAXjd2k/bWBpkdnn09xltVZQlOg1NysC4f7S1vqqFRrF9dfGv22Viz/I7yqA=
=kvfn
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-02-25 10:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-12 22:33 [Buildroot] [RFC 0/2] add a minimal genimage support Vivien Didelot
2015-02-12 22:33 ` [Buildroot] [RFC 1/2] Makefile: add target-genimage Vivien Didelot
2015-02-14 17:24   ` Danomi Manchego
2015-02-16 16:41     ` Vivien Didelot
2015-02-17  2:37       ` Danomi Manchego
2015-02-25 10:48         ` Zoltan Gyarmati
2015-02-12 22:33 ` [Buildroot] [RFC 2/2] boards/raspberrypi: add a sample genimage config Vivien Didelot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.