.. | .. |
---|
16 | 16 | KBUILD_LDFLAGS_MODULE += --be8 |
---|
17 | 17 | endif |
---|
18 | 18 | |
---|
19 | | -ifeq ($(CONFIG_ARM_MODULE_PLTS),y) |
---|
20 | | -KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/arm/kernel/module.lds |
---|
21 | | -endif |
---|
22 | | - |
---|
23 | 19 | GZFLAGS :=-9 |
---|
24 | 20 | #KBUILD_CFLAGS +=-pipe |
---|
25 | 21 | |
---|
.. | .. |
---|
45 | 41 | ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) |
---|
46 | 42 | KBUILD_CPPFLAGS += -mbig-endian |
---|
47 | 43 | CHECKFLAGS += -D__ARMEB__ |
---|
48 | | -AS += -EB |
---|
49 | 44 | KBUILD_LDFLAGS += -EB |
---|
50 | 45 | else |
---|
51 | 46 | KBUILD_CPPFLAGS += -mlittle-endian |
---|
52 | 47 | CHECKFLAGS += -D__ARMEL__ |
---|
53 | | -AS += -EL |
---|
54 | 48 | KBUILD_LDFLAGS += -EL |
---|
55 | 49 | endif |
---|
56 | 50 | |
---|
.. | .. |
---|
77 | 71 | arch-$(CONFIG_CPU_32v5) =-D__LINUX_ARM_ARCH__=5 -march=armv5te |
---|
78 | 72 | arch-$(CONFIG_CPU_32v4T) =-D__LINUX_ARM_ARCH__=4 -march=armv4t |
---|
79 | 73 | arch-$(CONFIG_CPU_32v4) =-D__LINUX_ARM_ARCH__=4 -march=armv4 |
---|
80 | | -arch-$(CONFIG_CPU_32v3) =-D__LINUX_ARM_ARCH__=3 -march=armv3 |
---|
| 74 | +arch-$(CONFIG_CPU_32v3) =-D__LINUX_ARM_ARCH__=3 -march=armv3m |
---|
81 | 75 | |
---|
82 | 76 | # Evaluate arch cc-option calls now |
---|
83 | 77 | arch-y := $(arch-y) |
---|
.. | .. |
---|
123 | 117 | AFLAGS_NOWARN :=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W) |
---|
124 | 118 | |
---|
125 | 119 | ifeq ($(CONFIG_THUMB2_KERNEL),y) |
---|
126 | | -AFLAGS_AUTOIT :=$(call as-option,-Wa$(comma)-mimplicit-it=always,-Wa$(comma)-mauto-it) |
---|
127 | | -CFLAGS_ISA :=-mthumb $(AFLAGS_AUTOIT) $(AFLAGS_NOWARN) |
---|
| 120 | +CFLAGS_ISA :=-mthumb -Wa,-mimplicit-it=always $(AFLAGS_NOWARN) |
---|
128 | 121 | AFLAGS_ISA :=$(CFLAGS_ISA) -Wa$(comma)-mthumb |
---|
129 | | -# Work around buggy relocation from gas if requested: |
---|
130 | | -ifeq ($(CONFIG_THUMB2_AVOID_R_ARM_THM_JUMP11),y) |
---|
131 | | -KBUILD_CFLAGS_MODULE +=-fno-optimize-sibling-calls |
---|
132 | | -endif |
---|
133 | 122 | else |
---|
134 | 123 | CFLAGS_ISA :=$(call cc-option,-marm,) $(AFLAGS_NOWARN) |
---|
135 | 124 | AFLAGS_ISA :=$(CFLAGS_ISA) |
---|
.. | .. |
---|
146 | 135 | |
---|
147 | 136 | # Text offset. This list is sorted numerically by address in order to |
---|
148 | 137 | # provide a means to avoid/resolve conflicts in multi-arch kernels. |
---|
| 138 | +# Note: the 32kB below this value is reserved for use by the kernel |
---|
| 139 | +# during boot, and this offset is critical to the functioning of |
---|
| 140 | +# kexec-tools. |
---|
149 | 141 | textofs-y := 0x00008000 |
---|
150 | 142 | # We don't want the htc bootloader to corrupt kernel during resume |
---|
151 | 143 | textofs-$(CONFIG_PM_H1940) := 0x00108000 |
---|
| 144 | +# RTD1195 has Boot ROM at start of address space |
---|
| 145 | +textofs-$(CONFIG_ARCH_REALTEK) := 0x00108000 |
---|
152 | 146 | # SA1111 DMA bug: we don't want the kernel to live in precious DMA-able memory |
---|
153 | 147 | ifeq ($(CONFIG_ARCH_SA1100),y) |
---|
154 | 148 | textofs-$(CONFIG_SA1111) := 0x00208000 |
---|
155 | 149 | endif |
---|
| 150 | +textofs-$(CONFIG_ARCH_IPQ40XX) := 0x00208000 |
---|
156 | 151 | textofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000 |
---|
157 | 152 | textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000 |
---|
158 | 153 | textofs-$(CONFIG_ARCH_MESON) := 0x00208000 |
---|
159 | 154 | textofs-$(CONFIG_ARCH_AXXIA) := 0x00308000 |
---|
160 | 155 | textofs-$(CONFIG_CPU_RK3308) := 0x00058000 |
---|
161 | | -textofs-$(CONFIG_CPU_PX30) := 0x00208000 |
---|
162 | 156 | ifeq ($(CONFIG_ROCKCHIP_THUNDER_BOOT),y) |
---|
| 157 | +textofs-$(CONFIG_CPU_RV1106) := 0x00208000 |
---|
163 | 158 | textofs-$(CONFIG_CPU_RV1126) := 0x00608000 |
---|
164 | 159 | endif |
---|
| 160 | +textofs-$(CONFIG_RV1106_HPMCU_FAST_WAKEUP) := 0x00208000 |
---|
165 | 161 | |
---|
166 | 162 | # Machine directory name. This list is sorted alphanumerically |
---|
167 | 163 | # by CONFIG_* macro name. |
---|
168 | 164 | machine-$(CONFIG_ARCH_ACTIONS) += actions |
---|
169 | 165 | machine-$(CONFIG_ARCH_ALPINE) += alpine |
---|
170 | 166 | machine-$(CONFIG_ARCH_ARTPEC) += artpec |
---|
| 167 | +machine-$(CONFIG_ARCH_ASPEED) += aspeed |
---|
171 | 168 | machine-$(CONFIG_ARCH_AT91) += at91 |
---|
172 | 169 | machine-$(CONFIG_ARCH_AXXIA) += axxia |
---|
173 | 170 | machine-$(CONFIG_ARCH_BCM) += bcm |
---|
.. | .. |
---|
186 | 183 | machine-$(CONFIG_ARCH_HIGHBANK) += highbank |
---|
187 | 184 | machine-$(CONFIG_ARCH_HISI) += hisi |
---|
188 | 185 | machine-$(CONFIG_ARCH_INTEGRATOR) += integrator |
---|
189 | | -machine-$(CONFIG_ARCH_IOP13XX) += iop13xx |
---|
190 | 186 | machine-$(CONFIG_ARCH_IOP32X) += iop32x |
---|
191 | | -machine-$(CONFIG_ARCH_IOP33X) += iop33x |
---|
192 | 187 | machine-$(CONFIG_ARCH_IXP4XX) += ixp4xx |
---|
193 | 188 | machine-$(CONFIG_ARCH_KEYSTONE) += keystone |
---|
194 | | -machine-$(CONFIG_ARCH_KS8695) += ks8695 |
---|
195 | 189 | machine-$(CONFIG_ARCH_LPC18XX) += lpc18xx |
---|
196 | 190 | machine-$(CONFIG_ARCH_LPC32XX) += lpc32xx |
---|
197 | 191 | machine-$(CONFIG_ARCH_MESON) += meson |
---|
.. | .. |
---|
202 | 196 | machine-$(CONFIG_ARCH_MVEBU) += mvebu |
---|
203 | 197 | machine-$(CONFIG_ARCH_MXC) += imx |
---|
204 | 198 | machine-$(CONFIG_ARCH_MEDIATEK) += mediatek |
---|
| 199 | +machine-$(CONFIG_ARCH_MILBEAUT) += milbeaut |
---|
205 | 200 | machine-$(CONFIG_ARCH_MXS) += mxs |
---|
206 | | -machine-$(CONFIG_ARCH_NETX) += netx |
---|
| 201 | +machine-$(CONFIG_ARCH_MSTARV7) += mstar |
---|
207 | 202 | machine-$(CONFIG_ARCH_NOMADIK) += nomadik |
---|
208 | 203 | machine-$(CONFIG_ARCH_NPCM) += npcm |
---|
209 | 204 | machine-$(CONFIG_ARCH_NSPIRE) += nspire |
---|
.. | .. |
---|
214 | 209 | machine-$(CONFIG_ARCH_PICOXCELL) += picoxcell |
---|
215 | 210 | machine-$(CONFIG_ARCH_PXA) += pxa |
---|
216 | 211 | machine-$(CONFIG_ARCH_QCOM) += qcom |
---|
| 212 | +machine-$(CONFIG_ARCH_RDA) += rda |
---|
| 213 | +machine-$(CONFIG_ARCH_REALTEK) += realtek |
---|
217 | 214 | machine-$(CONFIG_ARCH_REALVIEW) += realview |
---|
218 | 215 | ifndef CONFIG_ARM_PSCI |
---|
219 | 216 | machine-$(CONFIG_ARCH_ROCKCHIP) += rockchip |
---|
220 | 217 | endif |
---|
221 | 218 | machine-$(CONFIG_ARCH_RPC) += rpc |
---|
222 | | -machine-$(CONFIG_ARCH_S3C24XX) += s3c24xx |
---|
223 | | -machine-$(CONFIG_ARCH_S3C64XX) += s3c64xx |
---|
| 219 | +machine-$(CONFIG_PLAT_SAMSUNG) += s3c |
---|
224 | 220 | machine-$(CONFIG_ARCH_S5PV210) += s5pv210 |
---|
225 | 221 | machine-$(CONFIG_ARCH_SA1100) += sa1100 |
---|
226 | 222 | machine-$(CONFIG_ARCH_RENESAS) += shmobile |
---|
.. | .. |
---|
236 | 232 | machine-$(CONFIG_ARCH_VERSATILE) += versatile |
---|
237 | 233 | machine-$(CONFIG_ARCH_VEXPRESS) += vexpress |
---|
238 | 234 | machine-$(CONFIG_ARCH_VT8500) += vt8500 |
---|
239 | | -machine-$(CONFIG_ARCH_W90X900) += w90x900 |
---|
240 | 235 | machine-$(CONFIG_ARCH_ZX) += zx |
---|
241 | 236 | machine-$(CONFIG_ARCH_ZYNQ) += zynq |
---|
242 | 237 | machine-$(CONFIG_PLAT_SPEAR) += spear |
---|
243 | 238 | |
---|
244 | 239 | # Platform directory name. This list is sorted alphanumerically |
---|
245 | 240 | # by CONFIG_* macro name. |
---|
246 | | -plat-$(CONFIG_ARCH_EXYNOS) += samsung |
---|
247 | 241 | plat-$(CONFIG_ARCH_OMAP) += omap |
---|
248 | | -plat-$(CONFIG_ARCH_S3C64XX) += samsung |
---|
249 | | -plat-$(CONFIG_ARCH_S5PV210) += samsung |
---|
250 | | -plat-$(CONFIG_PLAT_IOP) += iop |
---|
251 | 242 | plat-$(CONFIG_PLAT_ORION) += orion |
---|
252 | 243 | plat-$(CONFIG_PLAT_PXA) += pxa |
---|
253 | | -plat-$(CONFIG_PLAT_S3C24XX) += samsung |
---|
254 | 244 | plat-$(CONFIG_PLAT_VERSATILE) += versatile |
---|
255 | 245 | |
---|
256 | 246 | ifeq ($(CONFIG_ARCH_EBSA110),y) |
---|
.. | .. |
---|
278 | 268 | |
---|
279 | 269 | ifneq ($(CONFIG_ARCH_MULTIPLATFORM),y) |
---|
280 | 270 | ifneq ($(CONFIG_ARM_SINGLE_ARMV7M),y) |
---|
281 | | -ifeq ($(KBUILD_SRC),) |
---|
282 | | -KBUILD_CPPFLAGS += $(patsubst %,-I%include,$(machdirs) $(platdirs)) |
---|
283 | | -else |
---|
284 | 271 | KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs) $(platdirs)) |
---|
285 | | -endif |
---|
286 | 272 | endif |
---|
287 | 273 | endif |
---|
288 | 274 | |
---|
289 | 275 | export TEXT_OFFSET GZFLAGS MMUEXT |
---|
290 | 276 | |
---|
291 | | -# Do we have FASTFPE? |
---|
292 | | -FASTFPE :=arch/arm/fastfpe |
---|
293 | | -ifeq ($(FASTFPE),$(wildcard $(FASTFPE))) |
---|
294 | | -FASTFPE_OBJ :=$(FASTFPE)/ |
---|
295 | | -endif |
---|
296 | | - |
---|
297 | | -core-$(CONFIG_FPE_NWFPE) += arch/arm/nwfpe/ |
---|
298 | | -core-$(CONFIG_FPE_FASTFPE) += $(FASTFPE_OBJ) |
---|
299 | | -core-$(CONFIG_VFP) += arch/arm/vfp/ |
---|
300 | | -core-$(CONFIG_XEN) += arch/arm/xen/ |
---|
301 | | -core-$(CONFIG_KVM_ARM_HOST) += arch/arm/kvm/ |
---|
302 | | -core-$(CONFIG_VDSO) += arch/arm/vdso/ |
---|
303 | | - |
---|
| 277 | +core-y += arch/arm/ |
---|
304 | 278 | # If we have a machine-specific directory, then include it in the build. |
---|
305 | | -core-y += arch/arm/kernel/ arch/arm/mm/ arch/arm/common/ |
---|
306 | | -core-y += arch/arm/probes/ |
---|
307 | | -core-y += arch/arm/net/ |
---|
308 | | -core-y += arch/arm/crypto/ |
---|
309 | | -core-y += arch/arm/firmware/ |
---|
310 | 279 | core-y += $(machdirs) $(platdirs) |
---|
| 280 | + |
---|
| 281 | +# For cleaning |
---|
| 282 | +core- += $(patsubst %,arch/arm/mach-%/, $(machine-)) |
---|
| 283 | +core- += $(patsubst %,arch/arm/plat-%/, $(plat-)) |
---|
311 | 284 | |
---|
312 | 285 | drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/ |
---|
313 | 286 | |
---|
.. | .. |
---|
321 | 294 | KBUILD_IMAGE := $(boot)/zImage |
---|
322 | 295 | endif |
---|
323 | 296 | |
---|
324 | | -# Build the DT binary blobs if we have OF configured |
---|
325 | | -ifeq ($(CONFIG_USE_OF),y) |
---|
326 | | -KBUILD_DTBS := dtbs |
---|
| 297 | +ifeq ($(CONFIG_STACKPROTECTOR_PER_TASK),y) |
---|
| 298 | +prepare: stack_protector_prepare |
---|
| 299 | +stack_protector_prepare: prepare0 |
---|
| 300 | + $(eval SSP_PLUGIN_CFLAGS := \ |
---|
| 301 | + -fplugin-arg-arm_ssp_per_task_plugin-tso=$(shell \ |
---|
| 302 | + awk '{if ($$2 == "THREAD_SZ_ORDER") print $$3;}'\ |
---|
| 303 | + include/generated/asm-offsets.h) \ |
---|
| 304 | + -fplugin-arg-arm_ssp_per_task_plugin-offset=$(shell \ |
---|
| 305 | + awk '{if ($$2 == "TI_STACK_CANARY") print $$3;}'\ |
---|
| 306 | + include/generated/asm-offsets.h)) |
---|
| 307 | + $(eval KBUILD_CFLAGS += $(SSP_PLUGIN_CFLAGS)) |
---|
| 308 | + $(eval GCC_PLUGINS_CFLAGS += $(SSP_PLUGIN_CFLAGS)) |
---|
327 | 309 | endif |
---|
328 | 310 | |
---|
329 | | -all: $(notdir $(KBUILD_IMAGE)) $(KBUILD_DTBS) |
---|
| 311 | +all: $(notdir $(KBUILD_IMAGE)) |
---|
330 | 312 | |
---|
331 | 313 | |
---|
332 | 314 | archheaders: |
---|
.. | .. |
---|
354 | 336 | $(INSTALL_TARGETS): |
---|
355 | 337 | $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@ |
---|
356 | 338 | |
---|
357 | | -%.dtb: | scripts |
---|
358 | | - $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@ |
---|
359 | | - |
---|
360 | | -PHONY += dtbs dtbs_install |
---|
361 | | - |
---|
362 | | -dtbs: prepare scripts |
---|
363 | | - $(Q)$(MAKE) $(build)=$(boot)/dts |
---|
364 | | - |
---|
365 | | -dtbs_install: |
---|
366 | | - $(Q)$(MAKE) $(dtbinst)=$(boot)/dts |
---|
367 | | - |
---|
368 | 339 | PHONY += vdso_install |
---|
369 | 340 | vdso_install: |
---|
370 | 341 | ifeq ($(CONFIG_VDSO),y) |
---|
.. | .. |
---|
386 | 357 | echo ' uImage - U-Boot wrapped zImage' |
---|
387 | 358 | echo ' bootpImage - Combined zImage and initial RAM disk' |
---|
388 | 359 | echo ' (supply initrd image via make variable INITRD=<path>)' |
---|
389 | | - echo '* dtbs - Build device tree blobs for enabled boards' |
---|
390 | | - echo ' dtbs_install - Install dtbs to $(INSTALL_DTBS_PATH)' |
---|
391 | 360 | echo ' install - Install uncompressed kernel' |
---|
392 | 361 | echo ' zinstall - Install compressed kernel' |
---|
393 | 362 | echo ' uinstall - Install U-Boot wrapped compressed kernel' |
---|
.. | .. |
---|
397 | 366 | echo ' vdso_install - Install unstripped vdso.so to $$(INSTALL_MOD_PATH)/vdso' |
---|
398 | 367 | endef |
---|
399 | 368 | |
---|
400 | | -kernel.img: zImage |
---|
401 | | - $(Q)scripts/mkkrnlimg $(objtree)/arch/arm/boot/zImage $(objtree)/kernel.img >/dev/null |
---|
402 | | - @echo ' Image: kernel.img (with zImage) is ready' |
---|
403 | | -ifdef CONFIG_MODULES |
---|
404 | | - $(Q)if [ "$(srctree)" = "$(objtree)" ]; then $(MAKE) modules; fi |
---|
405 | | -endif |
---|
| 369 | +MAKE_MODULES ?= y |
---|
406 | 370 | |
---|
407 | | -ifdef CONFIG_DRM |
---|
408 | | -LOGO := $(notdir $(wildcard $(srctree)/logo.bmp)) |
---|
409 | | -LOGO_KERNEL := $(notdir $(wildcard $(srctree)/logo_kernel.bmp)) |
---|
| 371 | +%.img: |
---|
| 372 | +ifeq ("$(CONFIG_MODULES)$(MAKE_MODULES)$(srctree)","yy$(objtree)") |
---|
| 373 | + $(Q)$(MAKE) $*.dtb zImage Image.gz modules |
---|
| 374 | +else |
---|
| 375 | + $(Q)$(MAKE) $*.dtb zImage Image.gz |
---|
410 | 376 | endif |
---|
411 | | - |
---|
412 | | -%.img: %.dtb kernel.img $(LOGO) $(LOGO_KERNEL) |
---|
413 | 377 | $(Q)$(srctree)/scripts/mkimg --dtb $*.dtb |
---|
414 | 378 | |
---|
415 | 379 | CLEAN_DIRS += out |
---|