[Buildroot] [PATCH 3/9] linux: meddle not in the affairs of filesystems, for you are tasty with bacon

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Thu Oct 1 06:20:25 UTC 2015


Yann,

On Wed, 30 Sep 2015 23:54:46 +0200, Yann E. MORIN wrote:
> Currently, the rule to rebuild the Linux kernel with an initramfs
> directly depends on the filesystem image filename.
> 
> This is inherently "bad" from a purity point of view. linux.mk should
> not have to delve into the fs internals.
> 
> Rather, make it directly depend on the "frontal" rule that generates the
> cpio image.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998 at free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
> Cc: Arnout Vandecappelle <arnout at mind.be>
> 
> ---
> This, too, will be useful for the initramfs patch coming next.
> ---
>  linux/linux.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/linux/linux.mk b/linux/linux.mk
> index 316f973..864ccbf 100644
> --- a/linux/linux.mk
> +++ b/linux/linux.mk
> @@ -392,7 +392,7 @@ $(eval $(kconfig-package))
>  # been generated in $(BINARIES_DIR)/rootfs.cpio.
>  $(LINUX_DIR)/.stamp_initramfs_rebuilt: $(LINUX_DIR)/.stamp_target_installed
>  $(LINUX_DIR)/.stamp_initramfs_rebuilt: $(LINUX_DIR)/.stamp_images_installed
> -$(LINUX_DIR)/.stamp_initramfs_rebuilt: $(BINARIES_DIR)/rootfs.cpio
> +$(LINUX_DIR)/.stamp_initramfs_rebuilt: rootfs-cpio

Are you sure this is OK ? It creates a dependency of a "real target" on
a "phony target", which means that the "real target" will *always* be
rebuilt, at every invocation of "make". Is this what we want?

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


More information about the buildroot mailing list