mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-11-08 18:43:21 +01:00
There is nothing arch specific about building dtb files other than their location under /arch/*/boot/dts/. Keeping each arch aligned is a pain. The dependencies and supported targets are all slightly different. Also, a cross-compiler for each arch is needed, but really the host compiler preprocessor is perfectly fine for building dtbs. Move the build rules to a common location and remove the arch specific ones. This is done in a single step to avoid warnings about overriding rules. The build dependencies had been a mixture of 'scripts' and/or 'prepare'. These pull in several dependencies some of which need a target compiler (specifically devicetable-offsets.h) and aren't needed to build dtbs. All that is really needed is dtc, so adjust the dependencies to only be dtc. This change enables support 'dtbs_install' on some arches which were missing the target. Acked-by: Will Deacon <[email protected]> Acked-by: Paul Burton <[email protected]> Acked-by: Ley Foon Tan <[email protected]> Acked-by: Masahiro Yamada <[email protected]> Cc: Michal Marek <[email protected]> Cc: Vineet Gupta <[email protected]> Cc: Russell King <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Yoshinori Sato <[email protected]> Cc: Michal Simek <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: James Hogan <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Chris Zankel <[email protected]> Cc: Max Filippov <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Rob Herring <[email protected]>
61 lines
1.6 KiB
Makefile
61 lines
1.6 KiB
Makefile
#
|
|
# linux/arch/c6x/Makefile
|
|
#
|
|
# This file is subject to the terms and conditions of the GNU General Public
|
|
# License. See the file "COPYING" in the main directory of this archive
|
|
# for more details.
|
|
#
|
|
|
|
KBUILD_DEFCONFIG := dsk6455_defconfig
|
|
|
|
cflags-y += -mno-dsbt -msdata=none -D__linux__
|
|
|
|
cflags-$(CONFIG_C6X_BIG_KERNEL) += -mlong-calls
|
|
|
|
KBUILD_CFLAGS_MODULE += -mlong-calls -mno-dsbt -msdata=none
|
|
|
|
CHECKFLAGS +=
|
|
|
|
KBUILD_CFLAGS += $(cflags-y)
|
|
KBUILD_AFLAGS += $(cflags-y)
|
|
|
|
ifdef CONFIG_CPU_BIG_ENDIAN
|
|
KBUILD_CFLAGS += -mbig-endian
|
|
KBUILD_AFLAGS += -mbig-endian
|
|
LINKFLAGS += -mbig-endian
|
|
KBUILD_LDFLAGS += -mbig-endian -EB
|
|
CHECKFLAGS += -D_BIG_ENDIAN
|
|
endif
|
|
|
|
head-y := arch/c6x/kernel/head.o
|
|
core-y += arch/c6x/kernel/ arch/c6x/mm/ arch/c6x/platforms/
|
|
libs-y += arch/c6x/lib/
|
|
|
|
# Default to vmlinux.bin, override when needed
|
|
all: vmlinux.bin
|
|
|
|
boot := arch/$(ARCH)/boot
|
|
|
|
# Are we making a dtbImage.<boardname> target? If so, crack out the boardname
|
|
DTB:=$(subst dtbImage.,,$(filter dtbImage.%, $(MAKECMDGOALS)))
|
|
export DTB
|
|
|
|
core-y += $(boot)/dts/
|
|
|
|
# With make 3.82 we cannot mix normal and wildcard targets
|
|
|
|
vmlinux.bin: vmlinux
|
|
$(Q)$(MAKE) $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
|
|
|
|
dtbImage.%: vmlinux
|
|
$(Q)$(MAKE) $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
|
|
|
|
archclean:
|
|
$(Q)$(MAKE) $(clean)=$(boot)
|
|
|
|
define archhelp
|
|
@echo ' vmlinux.bin - Binary kernel image (arch/$(ARCH)/boot/vmlinux.bin)'
|
|
@echo ' dtbImage.<dt> - ELF image with $(arch)/boot/dts/<dt>.dts linked in'
|
|
@echo ' - stripped elf with fdt blob'
|
|
endef
|