From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] ARM: decompressor: simplify libfdt builds
Date: Fri, 17 Jan 2020 22:15:34 +0000 [thread overview]
Message-ID: <20200117221534.GR25745@shell.armlinux.org.uk> (raw)
In-Reply-To: <20191204044950.10418-1-masahiroy@kernel.org>
On Wed, Dec 04, 2019 at 01:49:50PM +0900, Masahiro Yamada wrote:
> Copying source files during the build time may not end up with
> as clean code as expected.
>
> lib/fdt*.c simply wrap scripts/dtc/libfdt/fdt*.c, and it works
> nicely. Let's follow that approach for the arm decompressor, too.
>
> Add four wrappers, arch/arm/boot/compressed/fdt*.c and remove
> the Makefile messes. Another nice thing is we no longer need to
> maintain the own libfdt_env.h because the decompressor can include
> <linux/libfdt_env.h>.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
> KernelVersion: v5.5-rc1
>
>
> arch/arm/boot/compressed/.gitignore | 9 -------
> arch/arm/boot/compressed/Makefile | 33 +++++++------------------
> arch/arm/boot/compressed/atags_to_fdt.c | 1 +
> arch/arm/boot/compressed/fdt.c | 1 +
> arch/arm/boot/compressed/fdt_ro.c | 1 +
> arch/arm/boot/compressed/fdt_rw.c | 1 +
> arch/arm/boot/compressed/fdt_wip.c | 1 +
> arch/arm/boot/compressed/libfdt_env.h | 24 ------------------
> 8 files changed, 14 insertions(+), 57 deletions(-)
> create mode 100644 arch/arm/boot/compressed/fdt.c
> create mode 100644 arch/arm/boot/compressed/fdt_ro.c
> create mode 100644 arch/arm/boot/compressed/fdt_rw.c
> create mode 100644 arch/arm/boot/compressed/fdt_wip.c
> delete mode 100644 arch/arm/boot/compressed/libfdt_env.h
>
> diff --git a/arch/arm/boot/compressed/.gitignore b/arch/arm/boot/compressed/.gitignore
> index 86b2f5d28240..2fdb4885846b 100644
> --- a/arch/arm/boot/compressed/.gitignore
> +++ b/arch/arm/boot/compressed/.gitignore
> @@ -6,12 +6,3 @@ hyp-stub.S
> piggy_data
> vmlinux
> vmlinux.lds
> -
> -# borrowed libfdt files
> -fdt.c
> -fdt.h
> -fdt_ro.c
> -fdt_rw.c
> -fdt_wip.c
> -libfdt.h
> -libfdt_internal.h
> diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
> index da599c3a1193..d01ce71afac6 100644
> --- a/arch/arm/boot/compressed/Makefile
> +++ b/arch/arm/boot/compressed/Makefile
> @@ -76,29 +76,23 @@ compress-$(CONFIG_KERNEL_LZMA) = lzma
> compress-$(CONFIG_KERNEL_XZ) = xzkern
> compress-$(CONFIG_KERNEL_LZ4) = lz4
>
> -# Borrowed libfdt files for the ATAG compatibility mode
> -
> -libfdt := fdt_rw.c fdt_ro.c fdt_wip.c fdt.c
> -libfdt_hdrs := fdt.h libfdt.h libfdt_internal.h
> -
> -libfdt_objs := $(addsuffix .o, $(basename $(libfdt)))
> -
> -$(addprefix $(obj)/,$(libfdt) $(libfdt_hdrs)): $(obj)/%: $(srctree)/scripts/dtc/libfdt/%
> - $(call cmd,shipped)
> +ifeq ($(CONFIG_ARM_ATAG_DTB_COMPAT),y)
> +libfdt_objs = fdt_rw.o fdt_ro.o fdt_wip.o fdt.o atags_to_fdt.o
>
> -$(addprefix $(obj)/,$(libfdt_objs) atags_to_fdt.o): \
> - $(addprefix $(obj)/,$(libfdt_hdrs))
> +OBJS += $(libfdt_objs)
>
> -ifeq ($(CONFIG_ARM_ATAG_DTB_COMPAT),y)
> -OBJS += $(libfdt_objs) atags_to_fdt.o
> +# -fstack-protector-strong triggers protection checks in this code,
> +# but it is being used too early to link to meaningful stack_chk logic.
> +nossp-flags-$(CONFIG_CC_HAS_STACKPROTECTOR_NONE) := -fno-stack-protector
> +$(foreach o, $(libfdt_objs), \
> + $(eval CFLAGS_$(o) := -I $(srctree)/scripts/dtc/libfdt) $(nossp-flags-y))
The above change causes build breakage over a number of ARM builds,
which unfortunately doesn't result in emails from any build system
containing the cause of the failure.
See
https://kernelci.org/build/rmk/branch/for-next/kernel/v5.5-rc1-12-g9a6545e2fc83/
where the failures are reported as:
../arch/arm/boot/compressed/Makefile:87: *** missing separator. Stop.
Thanks. Patch dropped.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ARM: decompressor: simplify libfdt builds
Date: Fri, 17 Jan 2020 22:15:34 +0000 [thread overview]
Message-ID: <20200117221534.GR25745@shell.armlinux.org.uk> (raw)
In-Reply-To: <20191204044950.10418-1-masahiroy@kernel.org>
On Wed, Dec 04, 2019 at 01:49:50PM +0900, Masahiro Yamada wrote:
> Copying source files during the build time may not end up with
> as clean code as expected.
>
> lib/fdt*.c simply wrap scripts/dtc/libfdt/fdt*.c, and it works
> nicely. Let's follow that approach for the arm decompressor, too.
>
> Add four wrappers, arch/arm/boot/compressed/fdt*.c and remove
> the Makefile messes. Another nice thing is we no longer need to
> maintain the own libfdt_env.h because the decompressor can include
> <linux/libfdt_env.h>.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
> KernelVersion: v5.5-rc1
>
>
> arch/arm/boot/compressed/.gitignore | 9 -------
> arch/arm/boot/compressed/Makefile | 33 +++++++------------------
> arch/arm/boot/compressed/atags_to_fdt.c | 1 +
> arch/arm/boot/compressed/fdt.c | 1 +
> arch/arm/boot/compressed/fdt_ro.c | 1 +
> arch/arm/boot/compressed/fdt_rw.c | 1 +
> arch/arm/boot/compressed/fdt_wip.c | 1 +
> arch/arm/boot/compressed/libfdt_env.h | 24 ------------------
> 8 files changed, 14 insertions(+), 57 deletions(-)
> create mode 100644 arch/arm/boot/compressed/fdt.c
> create mode 100644 arch/arm/boot/compressed/fdt_ro.c
> create mode 100644 arch/arm/boot/compressed/fdt_rw.c
> create mode 100644 arch/arm/boot/compressed/fdt_wip.c
> delete mode 100644 arch/arm/boot/compressed/libfdt_env.h
>
> diff --git a/arch/arm/boot/compressed/.gitignore b/arch/arm/boot/compressed/.gitignore
> index 86b2f5d28240..2fdb4885846b 100644
> --- a/arch/arm/boot/compressed/.gitignore
> +++ b/arch/arm/boot/compressed/.gitignore
> @@ -6,12 +6,3 @@ hyp-stub.S
> piggy_data
> vmlinux
> vmlinux.lds
> -
> -# borrowed libfdt files
> -fdt.c
> -fdt.h
> -fdt_ro.c
> -fdt_rw.c
> -fdt_wip.c
> -libfdt.h
> -libfdt_internal.h
> diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
> index da599c3a1193..d01ce71afac6 100644
> --- a/arch/arm/boot/compressed/Makefile
> +++ b/arch/arm/boot/compressed/Makefile
> @@ -76,29 +76,23 @@ compress-$(CONFIG_KERNEL_LZMA) = lzma
> compress-$(CONFIG_KERNEL_XZ) = xzkern
> compress-$(CONFIG_KERNEL_LZ4) = lz4
>
> -# Borrowed libfdt files for the ATAG compatibility mode
> -
> -libfdt := fdt_rw.c fdt_ro.c fdt_wip.c fdt.c
> -libfdt_hdrs := fdt.h libfdt.h libfdt_internal.h
> -
> -libfdt_objs := $(addsuffix .o, $(basename $(libfdt)))
> -
> -$(addprefix $(obj)/,$(libfdt) $(libfdt_hdrs)): $(obj)/%: $(srctree)/scripts/dtc/libfdt/%
> - $(call cmd,shipped)
> +ifeq ($(CONFIG_ARM_ATAG_DTB_COMPAT),y)
> +libfdt_objs = fdt_rw.o fdt_ro.o fdt_wip.o fdt.o atags_to_fdt.o
>
> -$(addprefix $(obj)/,$(libfdt_objs) atags_to_fdt.o): \
> - $(addprefix $(obj)/,$(libfdt_hdrs))
> +OBJS += $(libfdt_objs)
>
> -ifeq ($(CONFIG_ARM_ATAG_DTB_COMPAT),y)
> -OBJS += $(libfdt_objs) atags_to_fdt.o
> +# -fstack-protector-strong triggers protection checks in this code,
> +# but it is being used too early to link to meaningful stack_chk logic.
> +nossp-flags-$(CONFIG_CC_HAS_STACKPROTECTOR_NONE) := -fno-stack-protector
> +$(foreach o, $(libfdt_objs), \
> + $(eval CFLAGS_$(o) := -I $(srctree)/scripts/dtc/libfdt) $(nossp-flags-y))
The above change causes build breakage over a number of ARM builds,
which unfortunately doesn't result in emails from any build system
containing the cause of the failure.
See
https://kernelci.org/build/rmk/branch/for-next/kernel/v5.5-rc1-12-g9a6545e2fc83/
where the failures are reported as:
../arch/arm/boot/compressed/Makefile:87: *** missing separator. Stop.
Thanks. Patch dropped.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up
next prev parent reply other threads:[~2020-01-17 22:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-04 4:49 [PATCH] ARM: decompressor: simplify libfdt builds Masahiro Yamada
2019-12-04 4:49 ` Masahiro Yamada
2020-01-17 22:15 ` Russell King - ARM Linux admin [this message]
2020-01-17 22:15 ` Russell King - ARM Linux admin
2020-01-19 1:24 ` Masahiro Yamada
2020-01-19 1:24 ` Masahiro Yamada
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=20200117221534.GR25745@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
/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 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.