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

Commit f2dcd0f8 authored by Grant Likely's avatar Grant Likely
Browse files

Merge remote-tracking branch 'robherring/for-next' into devicetree/next

parents 465aac6d 300db34a
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -1175,15 +1175,16 @@ When kbuild executes, the following steps are followed (roughly):
	in an init section in the image. Platform code *must* copy the
	blob to non-init memory prior to calling unflatten_device_tree().

	Example:
		#arch/x86/platform/ce4100/Makefile
		clean-files := *dtb.S
	To use this command, simply add *.dtb into obj-y or targets, or make
	some other target depend on %.dtb

		DTC_FLAGS := -p 1024
		obj-y += foo.dtb.o
	A central rule exists to create $(obj)/%.dtb from $(src)/%.dts;
	architecture Makefiles do no need to explicitly write out that rule.

		$(obj)/%.dtb: $(src)/%.dts
			$(call cmd,dtc)
	Example:
		targets += $(dtb-y)
		clean-files += *.dtb
		DTC_FLAGS ?= -p 1024

--- 6.8 Custom kbuild commands

+2 −2
Original line number Diff line number Diff line
@@ -292,10 +292,10 @@ zinstall uinstall install: vmlinux
	$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@

%.dtb: scripts
	$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@
	$(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@

dtbs: scripts
	$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@
	$(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) dtbs

# We use MRPROPER_FILES and CLEAN_FILES now
archclean:
+0 −12
Original line number Diff line number Diff line
@@ -15,8 +15,6 @@ ifneq ($(MACHINE),)
include $(srctree)/$(MACHINE)/Makefile.boot
endif

include $(srctree)/arch/arm/boot/dts/Makefile

# Note: the following conditions must always be true:
#   ZRELADDR == virt_to_phys(PAGE_OFFSET + TEXT_OFFSET)
#   PARAMS_PHYS must be within 4MB of ZRELADDR
@@ -59,16 +57,6 @@ $(obj)/zImage: $(obj)/compressed/vmlinux FORCE

endif

targets += $(dtb-y)

# Rule to build device tree blobs
$(obj)/%.dtb: $(src)/dts/%.dts FORCE
	$(call if_changed_dep,dtc)

$(obj)/dtbs: $(addprefix $(obj)/, $(dtb-y))

clean-files := *.dtb

ifneq ($(LOADADDR),)
  UIMAGE_LOADADDR=$(LOADADDR)
else
+8 −0
Original line number Diff line number Diff line
@@ -104,4 +104,12 @@ dtb-$(CONFIG_ARCH_VT8500) += vt8500-bv07.dtb \
	wm8505-ref.dtb \
	wm8650-mid.dtb

targets += dtbs
endif

# *.dtb used to be generated in the directory above. Clean out the
# old build results so people don't accidentally use them.
dtbs: $(addprefix $(obj)/, $(dtb-y))
	$(Q)rm -f $(obj)/../*.dtb

clean-files := *.dtb
+11 −6
Original line number Diff line number Diff line
@@ -42,19 +42,23 @@ libs-y += $(LIBGCC)

# Default target when executing plain make
KBUILD_IMAGE	:= Image.gz
KBUILD_DTBS	:= dtbs

all:	$(KBUILD_IMAGE)
all:	$(KBUILD_IMAGE) $(KBUILD_DTBS)

boot := arch/arm64/boot

Image Image.gz: vmlinux
	$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@
	$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@

zinstall install: vmlinux
	$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@
	$(Q)$(MAKE) $(build)=$(boot) $@

%.dtb:
	$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@
%.dtb: scripts
	$(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@

dtbs: scripts
	$(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@

# We use MRPROPER_FILES and CLEAN_FILES now
archclean:
@@ -63,6 +67,7 @@ archclean:
define archhelp
  echo  '* Image.gz      - Compressed kernel image (arch/$(ARCH)/boot/Image.gz)'
  echo  '  Image         - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
  echo  '* dtbs          - Build device tree blobs for enabled boards'
  echo  '  install       - Install uncompressed kernel'
  echo  '  zinstall      - Install compressed kernel'
  echo  '                  Install using (your) ~/bin/installkernel or'
Loading