* [PATCH 1/6] ARM: decompressor: drop unneeded assignments to "targets"
2016-02-22 7:31 [PATCH 0/6] ARM: decompressor: several cleanups Masahiro Yamada
@ 2016-02-22 7:31 ` Masahiro Yamada
2016-02-22 7:31 ` [PATCH 2/6] ARM: decompressor: drop more " Masahiro Yamada
` (5 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: Masahiro Yamada @ 2016-02-22 7:31 UTC (permalink / raw)
To: linux-arm-kernel
The "targets" exists to specify which files need the corresponding
".*_cmd" files to be included during the build. In other words, it
is used for files that need to detect the change of the command line
by if_changed, if_changed_dep, and if_changed_rule. While, these
files are just copied by "$(call cmd,shipped)". Adding them to the
"targets" is meaningless because $(call cmd,...) never creates
".*_cmd" files. Such files as ".lib1funcs.S.cmd", ".ashldi3.S.cmd"
do not exist in the first place.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
arch/arm/boot/compressed/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 7a6a58e..7090ad3 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -91,8 +91,8 @@ endif
targets := vmlinux vmlinux.lds \
piggy.$(suffix_y) piggy.$(suffix_y).o \
- lib1funcs.o lib1funcs.S ashldi3.o ashldi3.S bswapsdi2.o \
- bswapsdi2.S font.o font.c head.o misc.o $(OBJS)
+ lib1funcs.o ashldi3.o bswapsdi2.o \
+ font.o head.o misc.o $(OBJS)
# Make sure files are removed during clean
extra-y += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern piggy.lz4 \
--
1.9.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 2/6] ARM: decompressor: drop more unneeded assignments to "targets"
2016-02-22 7:31 [PATCH 0/6] ARM: decompressor: several cleanups Masahiro Yamada
2016-02-22 7:31 ` [PATCH 1/6] ARM: decompressor: drop unneeded assignments to "targets" Masahiro Yamada
@ 2016-02-22 7:31 ` Masahiro Yamada
2016-02-22 7:31 ` [PATCH 3/6] ARM: decompressor: use clean-files instead of extra-y to clean files Masahiro Yamada
` (4 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: Masahiro Yamada @ 2016-02-22 7:31 UTC (permalink / raw)
To: linux-arm-kernel
The objects "font.o" and "misc.o" are contained in $(OBJS), and it
is already added to the "targets".
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
arch/arm/boot/compressed/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 7090ad3..476ef00 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -92,7 +92,7 @@ endif
targets := vmlinux vmlinux.lds \
piggy.$(suffix_y) piggy.$(suffix_y).o \
lib1funcs.o ashldi3.o bswapsdi2.o \
- font.o head.o misc.o $(OBJS)
+ head.o $(OBJS)
# Make sure files are removed during clean
extra-y += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern piggy.lz4 \
--
1.9.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 3/6] ARM: decompressor: use clean-files instead of extra-y to clean files
2016-02-22 7:31 [PATCH 0/6] ARM: decompressor: several cleanups Masahiro Yamada
2016-02-22 7:31 ` [PATCH 1/6] ARM: decompressor: drop unneeded assignments to "targets" Masahiro Yamada
2016-02-22 7:31 ` [PATCH 2/6] ARM: decompressor: drop more " Masahiro Yamada
@ 2016-02-22 7:31 ` Masahiro Yamada
2016-02-22 7:31 ` [PATCH 4/6] ARM: decompressor: drop redundant FORCE in Makefile Masahiro Yamada
` (3 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: Masahiro Yamada @ 2016-02-22 7:31 UTC (permalink / raw)
To: linux-arm-kernel
This code works fine here, but it is tricky to use "extra-y" for
specifying files to be removed during "make clean". Kbuild provides
"clean-files" for this purpose.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
arch/arm/boot/compressed/Makefile | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 476ef00..f9e8e68 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -94,8 +94,7 @@ targets := vmlinux vmlinux.lds \
lib1funcs.o ashldi3.o bswapsdi2.o \
head.o $(OBJS)
-# Make sure files are removed during clean
-extra-y += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern piggy.lz4 \
+clean-files += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern piggy.lz4 \
lib1funcs.S ashldi3.S bswapsdi2.S $(libfdt) $(libfdt_hdrs) \
hyp-stub.S
--
1.9.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 4/6] ARM: decompressor: drop redundant FORCE in Makefile
2016-02-22 7:31 [PATCH 0/6] ARM: decompressor: several cleanups Masahiro Yamada
` (2 preceding siblings ...)
2016-02-22 7:31 ` [PATCH 3/6] ARM: decompressor: use clean-files instead of extra-y to clean files Masahiro Yamada
@ 2016-02-22 7:31 ` Masahiro Yamada
2016-02-22 7:31 ` [PATCH 5/6] ARM: decompressor: merge piggy.*.S and simplify Makefile Masahiro Yamada
` (2 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: Masahiro Yamada @ 2016-02-22 7:31 UTC (permalink / raw)
To: linux-arm-kernel
The object "piggy.$(suffix_y).o" is created from "piggy.$(suffix).S"
by the following pattern rule defined in scripts/Makefile.build:
$(obj)/%.o: $(src)/%.S FORCE
$(call if_changed_dep,as_o_S)
FORCE is already added to the prerequisite of the object there.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
arch/arm/boot/compressed/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index f9e8e68..903b953 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -187,7 +187,7 @@ $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.$(suffix_y).o \
$(obj)/piggy.$(suffix_y): $(obj)/../Image FORCE
$(call if_changed,$(suffix_y))
-$(obj)/piggy.$(suffix_y).o: $(obj)/piggy.$(suffix_y) FORCE
+$(obj)/piggy.$(suffix_y).o: $(obj)/piggy.$(suffix_y)
CFLAGS_font.o := -Dstatic=
--
1.9.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 5/6] ARM: decompressor: merge piggy.*.S and simplify Makefile
2016-02-22 7:31 [PATCH 0/6] ARM: decompressor: several cleanups Masahiro Yamada
` (3 preceding siblings ...)
2016-02-22 7:31 ` [PATCH 4/6] ARM: decompressor: drop redundant FORCE in Makefile Masahiro Yamada
@ 2016-02-22 7:31 ` Masahiro Yamada
2016-02-22 7:31 ` [PATCH 6/6] ARM: decompressor: rename suffix_y to compress-y Masahiro Yamada
2016-02-22 11:36 ` [PATCH 0/6] ARM: decompressor: several cleanups Russell King - ARM Linux
6 siblings, 0 replies; 11+ messages in thread
From: Masahiro Yamada @ 2016-02-22 7:31 UTC (permalink / raw)
To: linux-arm-kernel
The files piggy.$(suffix).S are similar enough to be merged into a
single file. This also allows clean up of the Makefile.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
arch/arm/boot/compressed/.gitignore | 6 +-----
arch/arm/boot/compressed/Makefile | 14 ++++++--------
arch/arm/boot/compressed/{piggy.gzip.S => piggy.S} | 2 +-
arch/arm/boot/compressed/piggy.lz4.S | 6 ------
arch/arm/boot/compressed/piggy.lzma.S | 6 ------
arch/arm/boot/compressed/piggy.lzo.S | 6 ------
arch/arm/boot/compressed/piggy.xzkern.S | 6 ------
7 files changed, 8 insertions(+), 38 deletions(-)
rename arch/arm/boot/compressed/{piggy.gzip.S => piggy.S} (67%)
delete mode 100644 arch/arm/boot/compressed/piggy.lz4.S
delete mode 100644 arch/arm/boot/compressed/piggy.lzma.S
delete mode 100644 arch/arm/boot/compressed/piggy.lzo.S
delete mode 100644 arch/arm/boot/compressed/piggy.xzkern.S
diff --git a/arch/arm/boot/compressed/.gitignore b/arch/arm/boot/compressed/.gitignore
index 0714e03..86b2f5d 100644
--- a/arch/arm/boot/compressed/.gitignore
+++ b/arch/arm/boot/compressed/.gitignore
@@ -3,11 +3,7 @@ bswapsdi2.S
font.c
lib1funcs.S
hyp-stub.S
-piggy.gzip
-piggy.lzo
-piggy.lzma
-piggy.xzkern
-piggy.lz4
+piggy_data
vmlinux
vmlinux.lds
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 903b953..3243f09 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -89,14 +89,12 @@ ifeq ($(CONFIG_ARM_ATAG_DTB_COMPAT),y)
OBJS += $(libfdt_objs) atags_to_fdt.o
endif
-targets := vmlinux vmlinux.lds \
- piggy.$(suffix_y) piggy.$(suffix_y).o \
+targets := vmlinux vmlinux.lds piggy_data piggy.o \
lib1funcs.o ashldi3.o bswapsdi2.o \
head.o $(OBJS)
-clean-files += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern piggy.lz4 \
- lib1funcs.S ashldi3.S bswapsdi2.S $(libfdt) $(libfdt_hdrs) \
- hyp-stub.S
+clean-files += piggy_data lib1funcs.S ashldi3.S bswapsdi2.S \
+ $(libfdt) $(libfdt_hdrs) hyp-stub.S
KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
@@ -177,17 +175,17 @@ fi
efi-obj-$(CONFIG_EFI_STUB) := $(objtree)/drivers/firmware/efi/libstub/lib.a
-$(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.$(suffix_y).o \
+$(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.o \
$(addprefix $(obj)/, $(OBJS)) $(lib1funcs) $(ashldi3) \
$(bswapsdi2) $(efi-obj-y) FORCE
@$(check_for_multiple_zreladdr)
$(call if_changed,ld)
@$(check_for_bad_syms)
-$(obj)/piggy.$(suffix_y): $(obj)/../Image FORCE
+$(obj)/piggy_data: $(obj)/../Image FORCE
$(call if_changed,$(suffix_y))
-$(obj)/piggy.$(suffix_y).o: $(obj)/piggy.$(suffix_y)
+$(obj)/piggy.o: $(obj)/piggy_data
CFLAGS_font.o := -Dstatic=
diff --git a/arch/arm/boot/compressed/piggy.gzip.S b/arch/arm/boot/compressed/piggy.S
similarity index 67%
rename from arch/arm/boot/compressed/piggy.gzip.S
rename to arch/arm/boot/compressed/piggy.S
index a68adf9..f720884 100644
--- a/arch/arm/boot/compressed/piggy.gzip.S
+++ b/arch/arm/boot/compressed/piggy.S
@@ -1,6 +1,6 @@
.section .piggydata,#alloc
.globl input_data
input_data:
- .incbin "arch/arm/boot/compressed/piggy.gzip"
+ .incbin "arch/arm/boot/compressed/piggy_data"
.globl input_data_end
input_data_end:
diff --git a/arch/arm/boot/compressed/piggy.lz4.S b/arch/arm/boot/compressed/piggy.lz4.S
deleted file mode 100644
index 3d9a575..0000000
--- a/arch/arm/boot/compressed/piggy.lz4.S
+++ /dev/null
@@ -1,6 +0,0 @@
- .section .piggydata,#alloc
- .globl input_data
-input_data:
- .incbin "arch/arm/boot/compressed/piggy.lz4"
- .globl input_data_end
-input_data_end:
diff --git a/arch/arm/boot/compressed/piggy.lzma.S b/arch/arm/boot/compressed/piggy.lzma.S
deleted file mode 100644
index d7e69cf..0000000
--- a/arch/arm/boot/compressed/piggy.lzma.S
+++ /dev/null
@@ -1,6 +0,0 @@
- .section .piggydata,#alloc
- .globl input_data
-input_data:
- .incbin "arch/arm/boot/compressed/piggy.lzma"
- .globl input_data_end
-input_data_end:
diff --git a/arch/arm/boot/compressed/piggy.lzo.S b/arch/arm/boot/compressed/piggy.lzo.S
deleted file mode 100644
index a425ad9..0000000
--- a/arch/arm/boot/compressed/piggy.lzo.S
+++ /dev/null
@@ -1,6 +0,0 @@
- .section .piggydata,#alloc
- .globl input_data
-input_data:
- .incbin "arch/arm/boot/compressed/piggy.lzo"
- .globl input_data_end
-input_data_end:
diff --git a/arch/arm/boot/compressed/piggy.xzkern.S b/arch/arm/boot/compressed/piggy.xzkern.S
deleted file mode 100644
index 5703f30..0000000
--- a/arch/arm/boot/compressed/piggy.xzkern.S
+++ /dev/null
@@ -1,6 +0,0 @@
- .section .piggydata,#alloc
- .globl input_data
-input_data:
- .incbin "arch/arm/boot/compressed/piggy.xzkern"
- .globl input_data_end
-input_data_end:
--
1.9.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 6/6] ARM: decompressor: rename suffix_y to compress-y
2016-02-22 7:31 [PATCH 0/6] ARM: decompressor: several cleanups Masahiro Yamada
` (4 preceding siblings ...)
2016-02-22 7:31 ` [PATCH 5/6] ARM: decompressor: merge piggy.*.S and simplify Makefile Masahiro Yamada
@ 2016-02-22 7:31 ` Masahiro Yamada
2016-02-22 11:36 ` [PATCH 0/6] ARM: decompressor: several cleanups Russell King - ARM Linux
6 siblings, 0 replies; 11+ messages in thread
From: Masahiro Yamada @ 2016-02-22 7:31 UTC (permalink / raw)
To: linux-arm-kernel
The "$(suffix_y)" no longer appears in the file names, but it just
specifies the method of the file compression. The "compress-y" sounds
more suitable.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
arch/arm/boot/compressed/Makefile | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 3243f09..5018bfa 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -66,11 +66,11 @@ endif
CPPFLAGS_vmlinux.lds := -DTEXT_START="$(ZTEXTADDR)" -DBSS_START="$(ZBSSADDR)"
-suffix_$(CONFIG_KERNEL_GZIP) = gzip
-suffix_$(CONFIG_KERNEL_LZO) = lzo
-suffix_$(CONFIG_KERNEL_LZMA) = lzma
-suffix_$(CONFIG_KERNEL_XZ) = xzkern
-suffix_$(CONFIG_KERNEL_LZ4) = lz4
+compress-$(CONFIG_KERNEL_GZIP) = gzip
+compress-$(CONFIG_KERNEL_LZO) = lzo
+compress-$(CONFIG_KERNEL_LZMA) = lzma
+compress-$(CONFIG_KERNEL_XZ) = xzkern
+compress-$(CONFIG_KERNEL_LZ4) = lz4
# Borrowed libfdt files for the ATAG compatibility mode
@@ -183,7 +183,7 @@ $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.o \
@$(check_for_bad_syms)
$(obj)/piggy_data: $(obj)/../Image FORCE
- $(call if_changed,$(suffix_y))
+ $(call if_changed,$(compress-y))
$(obj)/piggy.o: $(obj)/piggy_data
--
1.9.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 0/6] ARM: decompressor: several cleanups
2016-02-22 7:31 [PATCH 0/6] ARM: decompressor: several cleanups Masahiro Yamada
` (5 preceding siblings ...)
2016-02-22 7:31 ` [PATCH 6/6] ARM: decompressor: rename suffix_y to compress-y Masahiro Yamada
@ 2016-02-22 11:36 ` Russell King - ARM Linux
2016-02-22 12:08 ` Masahiro Yamada
6 siblings, 1 reply; 11+ messages in thread
From: Russell King - ARM Linux @ 2016-02-22 11:36 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Feb 22, 2016 at 04:31:11PM +0900, Masahiro Yamada wrote:
> Masahiro Yamada (6):
> ARM: decompressor: drop unneeded assignments to "targets"
> ARM: decompressor: drop more unneeded assignments to "targets"
> ARM: decompressor: use clean-files instead of extra-y to clean files
> ARM: decompressor: drop redundant FORCE in Makefile
> ARM: decompressor: merge piggy.*.S and simplify Makefile
> ARM: decompressor: rename suffix_y to compress-y
Most of this looks fine to me, but I've a question about how thoroughly
patch 5 has been tested: iow, do we get correct behaviour if only the
compression method is changed?
Thanks.
--
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
^ permalink raw reply [flat|nested] 11+ messages in thread* [PATCH 0/6] ARM: decompressor: several cleanups
2016-02-22 11:36 ` [PATCH 0/6] ARM: decompressor: several cleanups Russell King - ARM Linux
@ 2016-02-22 12:08 ` Masahiro Yamada
2016-02-22 12:18 ` Russell King - ARM Linux
0 siblings, 1 reply; 11+ messages in thread
From: Masahiro Yamada @ 2016-02-22 12:08 UTC (permalink / raw)
To: linux-arm-kernel
Hi Russell,
2016-02-22 20:36 GMT+09:00 Russell King - ARM Linux <linux@arm.linux.org.uk>:
> On Mon, Feb 22, 2016 at 04:31:11PM +0900, Masahiro Yamada wrote:
>> Masahiro Yamada (6):
>> ARM: decompressor: drop unneeded assignments to "targets"
>> ARM: decompressor: drop more unneeded assignments to "targets"
>> ARM: decompressor: use clean-files instead of extra-y to clean files
>> ARM: decompressor: drop redundant FORCE in Makefile
>> ARM: decompressor: merge piggy.*.S and simplify Makefile
>> ARM: decompressor: rename suffix_y to compress-y
>
> Most of this looks fine to me, but I've a question about how thoroughly
> patch 5 has been tested: iow, do we get correct behaviour if only the
> compression method is changed?
>
> Thanks.
I did build-test, changing the configuration
CONFIG_KERNEL_GZIP -> CONFIG_KERNEL_LZMA -> CONFIG_KERNEL_XZ -> ...
I confirmed zImage was created from the expected piggy.
For run-test, it worked fine too.
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 0/6] ARM: decompressor: several cleanups
2016-02-22 12:08 ` Masahiro Yamada
@ 2016-02-22 12:18 ` Russell King - ARM Linux
2016-02-22 12:33 ` Masahiro Yamada
0 siblings, 1 reply; 11+ messages in thread
From: Russell King - ARM Linux @ 2016-02-22 12:18 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Feb 22, 2016 at 09:08:05PM +0900, Masahiro Yamada wrote:
> I did build-test, changing the configuration
> CONFIG_KERNEL_GZIP -> CONFIG_KERNEL_LZMA -> CONFIG_KERNEL_XZ -> ...
>
> I confirmed zImage was created from the expected piggy.
>
> For run-test, it worked fine too.
Okay, please drop them into the patch system, thanks.
--
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 0/6] ARM: decompressor: several cleanups
2016-02-22 12:18 ` Russell King - ARM Linux
@ 2016-02-22 12:33 ` Masahiro Yamada
0 siblings, 0 replies; 11+ messages in thread
From: Masahiro Yamada @ 2016-02-22 12:33 UTC (permalink / raw)
To: linux-arm-kernel
Hi Russell,
2016-02-22 21:18 GMT+09:00 Russell King - ARM Linux <linux@arm.linux.org.uk>:
> On Mon, Feb 22, 2016 at 09:08:05PM +0900, Masahiro Yamada wrote:
>> I did build-test, changing the configuration
>> CONFIG_KERNEL_GZIP -> CONFIG_KERNEL_LZMA -> CONFIG_KERNEL_XZ -> ...
>>
>> I confirmed zImage was created from the expected piggy.
>>
>> For run-test, it worked fine too.
>
> Okay, please drop them into the patch system, thanks.
I did so. Thanks.
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 11+ messages in thread