Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 923f7974 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull kbuild changes from Michal Marek:
 - Unification of cmd_uimage among archs that use it
 - make headers_check tries harder before reporting a missing
   <linux/types.h> include
 - kbuild portability fix for shells that do not support echo -e
 - make clean descends into samples/
 - setlocalversion grep fix
 - modpost typo fix
 - dtc warnings fix

* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  setlocalversion: Use "grep -q" instead of piping output to "read dummy"
  modpost: fix ALL_INIT_DATA_SECTIONS
  Kbuild: centralize MKIMAGE and cmd_uimage definitions
  headers_check: recursively search for linux/types.h inclusion
  scripts/Kbuild.include: Fix portability problem of "echo -e"
  scripts: dtc: fix compile warnings
  kbuild: clean up samples directory
  kbuild: disable -Wmissing-field-initializers for W=1
parents a7697b94 7f3bd6c9
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1170,7 +1170,7 @@ MRPROPER_FILES += .config .config.old .version .old_version \
#
#
clean: rm-dirs  := $(CLEAN_DIRS)
clean: rm-dirs  := $(CLEAN_DIRS)
clean: rm-files := $(CLEAN_FILES)
clean: rm-files := $(CLEAN_FILES)
clean-dirs      := $(addprefix _clean_, . $(vmlinux-alldirs) Documentation)
clean-dirs      := $(addprefix _clean_, . $(vmlinux-alldirs) Documentation samples)


PHONY += $(clean-dirs) clean archclean
PHONY += $(clean-dirs) clean archclean
$(clean-dirs):
$(clean-dirs):
+9 −14
Original line number Original line Diff line number Diff line
@@ -11,8 +11,6 @@
# Copyright (C) 1995-2002 Russell King
# Copyright (C) 1995-2002 Russell King
#
#


MKIMAGE         := $(srctree)/scripts/mkuboot.sh

ifneq ($(MACHINE),)
ifneq ($(MACHINE),)
include $(srctree)/$(MACHINE)/Makefile.boot
include $(srctree)/$(MACHINE)/Makefile.boot
endif
endif
@@ -69,22 +67,19 @@ $(obj)/dtbs: $(addprefix $(obj)/, $(dtb-y))


clean-files := *.dtb
clean-files := *.dtb


quiet_cmd_uimage = UIMAGE  $@
ifneq ($(LOADADDR),)
      cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T kernel \
  UIMAGE_LOADADDR=$(LOADADDR)
		   -C none -a $(LOADADDR) -e $(STARTADDR) \
else
		   -n 'Linux-$(KERNELRELEASE)' -d $< $@

  ifeq ($(CONFIG_ZBOOT_ROM),y)
  ifeq ($(CONFIG_ZBOOT_ROM),y)
$(obj)/uImage: LOADADDR=$(CONFIG_ZBOOT_ROM_TEXT)
    UIMAGE_LOADADDR=$(CONFIG_ZBOOT_ROM_TEXT)
  else
  else
$(obj)/uImage: LOADADDR=$(ZRELADDR)
    UIMAGE_LOADADDR=$(ZRELADDR)
  endif
endif
endif

$(obj)/uImage: STARTADDR=$(LOADADDR)


check_for_multiple_loadaddr = \
check_for_multiple_loadaddr = \
if [ $(words $(LOADADDR)) -gt 1 ]; then \
if [ $(words $(UIMAGE_LOADADDR)) -gt 1 ]; then \
	echo 'multiple load addresses: $(LOADADDR)'; \
	echo 'multiple load addresses: $(UIMAGE_LOADADDR)'; \
	echo 'This is incompatible with uImages'; \
	echo 'This is incompatible with uImages'; \
	echo 'Specify LOADADDR on the commandline to build an uImage'; \
	echo 'Specify LOADADDR on the commandline to build an uImage'; \
	false; \
	false; \
+3 −6
Original line number Original line Diff line number Diff line
@@ -6,8 +6,6 @@
# for more details.
# for more details.
#
#


MKIMAGE		:= $(srctree)/scripts/mkuboot.sh

extra-y		:= vmlinux.bin vmlinux.gz
extra-y		:= vmlinux.bin vmlinux.gz


OBJCOPYFLAGS_vmlinux.bin := -O binary -R .note.gnu.build-id
OBJCOPYFLAGS_vmlinux.bin := -O binary -R .note.gnu.build-id
@@ -17,10 +15,9 @@ $(obj)/vmlinux.bin: vmlinux FORCE
$(obj)/vmlinux.gz: $(obj)/vmlinux.bin FORCE
$(obj)/vmlinux.gz: $(obj)/vmlinux.bin FORCE
	$(call if_changed,gzip)
	$(call if_changed,gzip)


quiet_cmd_uimage = UIMAGE $@
UIMAGE_LOADADDR = $(CONFIG_LOAD_ADDRESS)
      cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A avr32 -O linux -T kernel	\
UIMAGE_ENTRYADDR = $(CONFIG_ENTRY_ADDRESS)
		-C gzip -a $(CONFIG_LOAD_ADDRESS) -e $(CONFIG_ENTRY_ADDRESS)	\
UIMAGE_COMPRESSION = gzip
		-n 'Linux-$(KERNELRELEASE)' -d $< $@


targets += uImage uImage.srec
targets += uImage uImage.srec
$(obj)/uImage: $(obj)/vmlinux.gz
$(obj)/uImage: $(obj)/vmlinux.gz
+8 −11
Original line number Original line Diff line number Diff line
@@ -6,20 +6,17 @@
# for more details.
# for more details.
#
#


MKIMAGE := $(srctree)/scripts/mkuboot.sh

targets := vmImage vmImage.bin vmImage.bz2 vmImage.gz vmImage.lzma vmImage.lzo vmImage.xip
targets := vmImage vmImage.bin vmImage.bz2 vmImage.gz vmImage.lzma vmImage.lzo vmImage.xip
extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma vmlinux.bin.lzo vmlinux.bin.xip
extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma vmlinux.bin.lzo vmlinux.bin.xip


UIMAGE_OPTS-y :=
ifeq ($(CONFIG_RAMKERNEL),y)
UIMAGE_OPTS-$(CONFIG_RAMKERNEL) += -a $(CONFIG_BOOT_LOAD)
UIMAGE_LOADADDR = $(CONFIG_BOOT_LOAD)
UIMAGE_OPTS-$(CONFIG_ROMKERNEL) += -a $(CONFIG_ROM_BASE) -x
else # CONFIG_ROMKERNEL must be set

UIMAGE_LOADADDR = $(CONFIG_ROM_BASE)
quiet_cmd_uimage = UIMAGE  $@
endif
      cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A $(ARCH) -O linux -T kernel \
UIMAGE_ENTRYADDR = $(shell $(NM) vmlinux | awk '$$NF == "__start" {print $$1}')
                   -C $(2) -n '$(CPU_REV)-$(KERNELRELEASE)' \
UIMAGE_NAME = '$(CPU_REV)-$(KERNELRELEASE)'
                   -e $(shell $(NM) vmlinux | awk '$$NF == "__start" {print $$1}') \
UIMAGE_OPTS-$(CONFIG_ROMKERNEL) += -x
                   $(UIMAGE_OPTS-y) -d $< $@


$(obj)/vmlinux.bin: vmlinux FORCE
$(obj)/vmlinux.bin: vmlinux FORCE
	$(call if_changed,objcopy)
	$(call if_changed,objcopy)
+3 −7
Original line number Original line Diff line number Diff line
@@ -2,8 +2,6 @@
# arch/microblaze/boot/Makefile
# arch/microblaze/boot/Makefile
#
#


MKIMAGE := $(srctree)/scripts/mkuboot.sh

obj-y += linked_dtb.o
obj-y += linked_dtb.o


targets := linux.bin linux.bin.gz simpleImage.%
targets := linux.bin linux.bin.gz simpleImage.%
@@ -35,11 +33,9 @@ quiet_cmd_strip = STRIP $@
	cmd_strip = $(STRIP) -K microblaze_start -K _end -K __log_buf \
	cmd_strip = $(STRIP) -K microblaze_start -K _end -K __log_buf \
				-K _fdt_start vmlinux -o $@
				-K _fdt_start vmlinux -o $@


quiet_cmd_uimage = UIMAGE  $@.ub
UIMAGE_IN = $@
	cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A microblaze -O linux -T kernel \
UIMAGE_OUT = $@.ub
		-C none -n 'Linux-$(KERNELRELEASE)' \
UIMAGE_LOADADDR = $(CONFIG_KERNEL_BASE_ADDR)
		-a $(CONFIG_KERNEL_BASE_ADDR) -e $(CONFIG_KERNEL_BASE_ADDR) \
		-d $@ $@.ub


$(obj)/simpleImage.%: vmlinux FORCE
$(obj)/simpleImage.%: vmlinux FORCE
	$(call if_changed,cp,.unstrip)
	$(call if_changed,cp,.unstrip)
Loading