* [PATCH 1/2] kbuild: initramfs fix dependency checking for compressed target
@ 2017-01-05 10:29 Nicholas Piggin
2017-01-05 10:29 ` [PATCH 2/2] kbuild: initramfs cleanup, set target from Kconfig Nicholas Piggin
2017-01-05 19:06 ` [PATCH 1/2] kbuild: initramfs fix dependency checking for compressed target Florian Fainelli
0 siblings, 2 replies; 4+ messages in thread
From: Nicholas Piggin @ 2017-01-05 10:29 UTC (permalink / raw)
To: Michal Marek
Cc: Nicholas Piggin, linux-kbuild, Andrew Morton, Florian Fainelli,
torvalds, pebolle, ppandit
When using initramfs compression, the data file compression suffix
gets quotes pulled in from Kconfig, e.g., initramfs_data.cpio".gz"
which make does not match a target and causes rebuild.
Fix this by filtering out quotes from the Kconfig string.
Fixes: 35e669e1a254 ("initramfs: select builtin initram compression algorithm on KConfig instead of Makefile")
Reviewed-by: Francisco Blas Izquierdo Riera (klondike) <klondike@klondike.es>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
usr/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/usr/Makefile b/usr/Makefile
index 17a513268325..746c3fd0b933 100644
--- a/usr/Makefile
+++ b/usr/Makefile
@@ -5,7 +5,7 @@
klibcdirs:;
PHONY += klibcdirs
-suffix_y = $(CONFIG_INITRAMFS_COMPRESSION)
+suffix_y = $(subst $\",,$(CONFIG_INITRAMFS_COMPRESSION))
AFLAGS_initramfs_data.o += -DINITRAMFS_IMAGE="usr/initramfs_data.cpio$(suffix_y)"
# Generate builtin.o based on initramfs_data.o
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] kbuild: initramfs cleanup, set target from Kconfig
2017-01-05 10:29 [PATCH 1/2] kbuild: initramfs fix dependency checking for compressed target Nicholas Piggin
@ 2017-01-05 10:29 ` Nicholas Piggin
2017-01-05 19:07 ` Florian Fainelli
2017-01-05 19:06 ` [PATCH 1/2] kbuild: initramfs fix dependency checking for compressed target Florian Fainelli
1 sibling, 1 reply; 4+ messages in thread
From: Nicholas Piggin @ 2017-01-05 10:29 UTC (permalink / raw)
To: Michal Marek
Cc: Nicholas Piggin, linux-kbuild, Andrew Morton, Florian Fainelli,
torvalds, pebolle, ppandit
Rather than keep a list of all possible compression types in the
Makefile, set the target explicitly from Kconfig.
Reviewed-by: Francisco Blas Izquierdo Riera (klondike) <klondike@klondike.es>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
usr/Makefile | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/usr/Makefile b/usr/Makefile
index 746c3fd0b933..0b87e71c00fc 100644
--- a/usr/Makefile
+++ b/usr/Makefile
@@ -6,7 +6,9 @@ klibcdirs:;
PHONY += klibcdirs
suffix_y = $(subst $\",,$(CONFIG_INITRAMFS_COMPRESSION))
-AFLAGS_initramfs_data.o += -DINITRAMFS_IMAGE="usr/initramfs_data.cpio$(suffix_y)"
+datafile_y = initramfs_data.cpio$(suffix_y)
+AFLAGS_initramfs_data.o += -DINITRAMFS_IMAGE="usr/$(datafile_y)"
+
# Generate builtin.o based on initramfs_data.o
obj-$(CONFIG_BLK_DEV_INITRD) := initramfs_data.o
@@ -14,7 +16,7 @@ obj-$(CONFIG_BLK_DEV_INITRD) := initramfs_data.o
# initramfs_data.o contains the compressed initramfs_data.cpio image.
# The image is included using .incbin, a dependency which is not
# tracked automatically.
-$(obj)/initramfs_data.o: $(obj)/initramfs_data.cpio$(suffix_y) FORCE
+$(obj)/initramfs_data.o: $(obj)/$(datafile_y) FORCE
#####
# Generate the initramfs cpio archive
@@ -38,10 +40,8 @@ endif
quiet_cmd_initfs = GEN $@
cmd_initfs = $(initramfs) -o $@ $(ramfs-args) $(ramfs-input)
-targets := initramfs_data.cpio.gz initramfs_data.cpio.bz2 \
- initramfs_data.cpio.lzma initramfs_data.cpio.xz \
- initramfs_data.cpio.lzo initramfs_data.cpio.lz4 \
- initramfs_data.cpio
+targets := $(datafile_y)
+
# do not try to update files included in initramfs
$(deps_initramfs): ;
@@ -51,6 +51,6 @@ $(deps_initramfs): klibcdirs
# 2) There are changes in which files are included (added or deleted)
# 3) If gen_init_cpio are newer than initramfs_data.cpio
# 4) arguments to gen_initramfs.sh changes
-$(obj)/initramfs_data.cpio$(suffix_y): $(obj)/gen_init_cpio $(deps_initramfs) klibcdirs
+$(obj)/$(datafile_y): $(obj)/gen_init_cpio $(deps_initramfs) klibcdirs
$(Q)$(initramfs) -l $(ramfs-input) > $(obj)/.initramfs_data.cpio.d
$(call if_changed,initfs)
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] kbuild: initramfs fix dependency checking for compressed target
2017-01-05 10:29 [PATCH 1/2] kbuild: initramfs fix dependency checking for compressed target Nicholas Piggin
2017-01-05 10:29 ` [PATCH 2/2] kbuild: initramfs cleanup, set target from Kconfig Nicholas Piggin
@ 2017-01-05 19:06 ` Florian Fainelli
1 sibling, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2017-01-05 19:06 UTC (permalink / raw)
To: Nicholas Piggin, Michal Marek
Cc: linux-kbuild, Andrew Morton, torvalds, pebolle, ppandit
On 01/05/2017 02:29 AM, Nicholas Piggin wrote:
> When using initramfs compression, the data file compression suffix
> gets quotes pulled in from Kconfig, e.g., initramfs_data.cpio".gz"
> which make does not match a target and causes rebuild.
>
> Fix this by filtering out quotes from the Kconfig string.
>
> Fixes: 35e669e1a254 ("initramfs: select builtin initram compression algorithm on KConfig instead of Makefile")
> Reviewed-by: Francisco Blas Izquierdo Riera (klondike) <klondike@klondike.es>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] kbuild: initramfs cleanup, set target from Kconfig
2017-01-05 10:29 ` [PATCH 2/2] kbuild: initramfs cleanup, set target from Kconfig Nicholas Piggin
@ 2017-01-05 19:07 ` Florian Fainelli
0 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2017-01-05 19:07 UTC (permalink / raw)
To: Nicholas Piggin, Michal Marek
Cc: linux-kbuild, Andrew Morton, torvalds, pebolle, ppandit
On 01/05/2017 02:29 AM, Nicholas Piggin wrote:
> Rather than keep a list of all possible compression types in the
> Makefile, set the target explicitly from Kconfig.
>
> Reviewed-by: Francisco Blas Izquierdo Riera (klondike) <klondike@klondike.es>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-01-05 19:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-05 10:29 [PATCH 1/2] kbuild: initramfs fix dependency checking for compressed target Nicholas Piggin
2017-01-05 10:29 ` [PATCH 2/2] kbuild: initramfs cleanup, set target from Kconfig Nicholas Piggin
2017-01-05 19:07 ` Florian Fainelli
2017-01-05 19:06 ` [PATCH 1/2] kbuild: initramfs fix dependency checking for compressed target Florian Fainelli
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.