Makefile (4353dd3b70783ebbc83fcf12d9c0af3fbab0223b) | Makefile (7ae4a78daacf240a8247cde73337dc4b26d253da) |
---|---|
1# SPDX-License-Identifier: GPL-2.0 2# 3# linux/arch/arm/boot/compressed/Makefile 4# 5# create a compressed vmlinuz image from the original vmlinux 6# 7 8OBJS = --- 62 unchanged lines hidden (view full) --- 71CPPFLAGS_vmlinux.lds := -DTEXT_START="$(ZTEXTADDR)" -DBSS_START="$(ZBSSADDR)" 72 73compress-$(CONFIG_KERNEL_GZIP) = gzip 74compress-$(CONFIG_KERNEL_LZO) = lzo 75compress-$(CONFIG_KERNEL_LZMA) = lzma 76compress-$(CONFIG_KERNEL_XZ) = xzkern 77compress-$(CONFIG_KERNEL_LZ4) = lz4 78 | 1# SPDX-License-Identifier: GPL-2.0 2# 3# linux/arch/arm/boot/compressed/Makefile 4# 5# create a compressed vmlinuz image from the original vmlinux 6# 7 8OBJS = --- 62 unchanged lines hidden (view full) --- 71CPPFLAGS_vmlinux.lds := -DTEXT_START="$(ZTEXTADDR)" -DBSS_START="$(ZBSSADDR)" 72 73compress-$(CONFIG_KERNEL_GZIP) = gzip 74compress-$(CONFIG_KERNEL_LZO) = lzo 75compress-$(CONFIG_KERNEL_LZMA) = lzma 76compress-$(CONFIG_KERNEL_XZ) = xzkern 77compress-$(CONFIG_KERNEL_LZ4) = lz4 78 |
79# Borrowed libfdt files for the ATAG compatibility mode | 79libfdt_objs := fdt_rw.o fdt_ro.o fdt_wip.o fdt.o |
80 | 80 |
81libfdt := fdt_rw.c fdt_ro.c fdt_wip.c fdt.c 82libfdt_hdrs := fdt.h libfdt.h libfdt_internal.h 83 84libfdt_objs := $(addsuffix .o, $(basename $(libfdt))) 85 86$(addprefix $(obj)/,$(libfdt) $(libfdt_hdrs)): $(obj)/%: $(srctree)/scripts/dtc/libfdt/% 87 $(call cmd,shipped) 88 89$(addprefix $(obj)/,$(libfdt_objs) atags_to_fdt.o): \ 90 $(addprefix $(obj)/,$(libfdt_hdrs)) 91 | |
92ifeq ($(CONFIG_ARM_ATAG_DTB_COMPAT),y) 93OBJS += $(libfdt_objs) atags_to_fdt.o 94endif 95 | 81ifeq ($(CONFIG_ARM_ATAG_DTB_COMPAT),y) 82OBJS += $(libfdt_objs) atags_to_fdt.o 83endif 84 |
85# -fstack-protector-strong triggers protection checks in this code, 86# but it is being used too early to link to meaningful stack_chk logic. 87nossp-flags-$(CONFIG_CC_HAS_STACKPROTECTOR_NONE) := -fno-stack-protector 88$(foreach o, $(libfdt_objs) atags_to_fdt.o, \ 89 $(eval CFLAGS_$(o) := -I $(srctree)/scripts/dtc/libfdt $(nossp-flags-y))) 90 91# These were previously generated C files. When you are building the kernel 92# with O=, make sure to remove the stale files in the output tree. Otherwise, 93# the build system wrongly compiles the stale ones. 94ifdef building_out_of_srctree 95$(shell rm -f $(addprefix $(obj)/, fdt_rw.c fdt_ro.c fdt_wip.c fdt.c)) 96endif 97 |
|
96targets := vmlinux vmlinux.lds piggy_data piggy.o \ 97 lib1funcs.o ashldi3.o bswapsdi2.o \ 98 head.o $(OBJS) 99 | 98targets := vmlinux vmlinux.lds piggy_data piggy.o \ 99 lib1funcs.o ashldi3.o bswapsdi2.o \ 100 head.o $(OBJS) 101 |
100clean-files += piggy_data lib1funcs.S ashldi3.S bswapsdi2.S \ 101 $(libfdt) $(libfdt_hdrs) hyp-stub.S | 102clean-files += piggy_data lib1funcs.S ashldi3.S bswapsdi2.S hyp-stub.S |
102 103KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING 104 105ifeq ($(CONFIG_FUNCTION_TRACER),y) 106ORIG_CFLAGS := $(KBUILD_CFLAGS) 107KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS)) 108endif 109 | 103 104KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING 105 106ifeq ($(CONFIG_FUNCTION_TRACER),y) 107ORIG_CFLAGS := $(KBUILD_CFLAGS) 108KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS)) 109endif 110 |
110# -fstack-protector-strong triggers protection checks in this code, 111# but it is being used too early to link to meaningful stack_chk logic. 112nossp-flags-$(CONFIG_CC_HAS_STACKPROTECTOR_NONE) := -fno-stack-protector 113CFLAGS_atags_to_fdt.o := $(nossp-flags-y) 114CFLAGS_fdt.o := $(nossp-flags-y) 115CFLAGS_fdt_ro.o := $(nossp-flags-y) 116CFLAGS_fdt_rw.o := $(nossp-flags-y) 117CFLAGS_fdt_wip.o := $(nossp-flags-y) 118 | |
119ccflags-y := -fpic $(call cc-option,-mno-single-pic-base,) -fno-builtin \ 120 -I$(obj) $(DISABLE_ARM_SSP_PER_TASK_PLUGIN) 121asflags-y := -DZIMAGE 122 123# Supply kernel BSS size to the decompressor via a linker symbol. 124KBSS_SZ = $(shell echo $$(($$($(NM) $(obj)/../../../../vmlinux | \ 125 sed -n -e 's/^\([^ ]*\) [AB] __bss_start$$/-0x\1/p' \ 126 -e 's/^\([^ ]*\) [AB] __bss_stop$$/+0x\1/p') )) ) --- 76 unchanged lines hidden --- | 111ccflags-y := -fpic $(call cc-option,-mno-single-pic-base,) -fno-builtin \ 112 -I$(obj) $(DISABLE_ARM_SSP_PER_TASK_PLUGIN) 113asflags-y := -DZIMAGE 114 115# Supply kernel BSS size to the decompressor via a linker symbol. 116KBSS_SZ = $(shell echo $$(($$($(NM) $(obj)/../../../../vmlinux | \ 117 sed -n -e 's/^\([^ ]*\) [AB] __bss_start$$/-0x\1/p' \ 118 -e 's/^\([^ ]*\) [AB] __bss_stop$$/+0x\1/p') )) ) --- 76 unchanged lines hidden --- |