Commit d4ea881f authored by Will Deacon's avatar Will Deacon
Browse files

Merge branch 'for-next/kbuild' into for-next/core

* for-next/kbuild:
  arm64: boot: Support Flat Image Tree
  arm64: Add BOOT_TARGETS variable
parents b2b7cc6d 7a23b027
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ Sphinx\ [#f1]_ 2.4.4 sphinx-build --version
cpio                   any              cpio --version
GNU tar                1.28             tar --version
gtags (optional)       6.6.5            gtags --version
mkimage (optional)     2017.01          mkimage --version
====================== ===============  ========================================

.. [#f1] Sphinx is needed only to build the Kernel documentation
@@ -189,6 +190,14 @@ The kernel build requires GNU GLOBAL version 6.6.5 or later to generate
tag files through ``make gtags``.  This is due to its use of the gtags
``-C (--directory)`` flag.

mkimage
-------

This tool is used when building a Flat Image Tree (FIT), commonly used on ARM
platforms. The tool is available via the ``u-boot-tools`` package or can be
built from the U-Boot source code. See the instructions at
https://docs.u-boot.org/en/latest/build/tools.html#building-tools-for-linux

System utilities
****************

+7 −0
Original line number Diff line number Diff line
@@ -3051,6 +3051,13 @@ F: drivers/mmc/host/sdhci-of-arasan.c
N:	zynq
N:	xilinx
ARM64 FIT SUPPORT
M:	Simon Glass <sjg@chromium.org>
L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S:	Maintained
F:	arch/arm64/boot/Makefile
F:	scripts/make_fit.py
ARM64 PORT (AARCH64 ARCHITECTURE)
M:	Catalin Marinas <catalin.marinas@arm.com>
M:	Will Deacon <will@kernel.org>
+9 −2
Original line number Diff line number Diff line
@@ -154,6 +154,10 @@ libs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
# Default target when executing plain make
boot		:= arch/arm64/boot

BOOT_TARGETS	:= Image vmlinuz.efi image.fit

PHONY += $(BOOT_TARGETS)

ifeq ($(CONFIG_EFI_ZBOOT),)
KBUILD_IMAGE	:= $(boot)/Image.gz
else
@@ -162,8 +166,10 @@ endif

all:	$(notdir $(KBUILD_IMAGE))

vmlinuz.efi: Image
Image vmlinuz.efi: vmlinux
image.fit: dtbs

vmlinuz.efi image.fit: Image
$(BOOT_TARGETS): vmlinux
	$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@

Image.%: Image
@@ -215,6 +221,7 @@ virtconfig:
define archhelp
  echo  '* Image.gz      - Compressed kernel image (arch/$(ARCH)/boot/Image.gz)'
  echo  '  Image         - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
  echo  '  image.fit     - Flat Image Tree (arch/$(ARCH)/boot/image.fit)'
  echo  '  install       - Install uncompressed kernel'
  echo  '  zinstall      - Install compressed kernel'
  echo  '                  Install using (your) ~/bin/installkernel or'
+1 −0
Original line number Diff line number Diff line
@@ -2,3 +2,4 @@
Image
Image.gz
vmlinuz*
image.fit
+5 −1
Original line number Diff line number Diff line
@@ -16,7 +16,8 @@

OBJCOPYFLAGS_Image :=-O binary -R .note -R .note.gnu.build-id -R .comment -S

targets := Image Image.bz2 Image.gz Image.lz4 Image.lzma Image.lzo Image.zst
targets := Image Image.bz2 Image.gz Image.lz4 Image.lzma Image.lzo \
	Image.zst image.fit

$(obj)/Image: vmlinux FORCE
	$(call if_changed,objcopy)
@@ -39,6 +40,9 @@ $(obj)/Image.lzo: $(obj)/Image FORCE
$(obj)/Image.zst: $(obj)/Image FORCE
	$(call if_changed,zstd)

$(obj)/image.fit: $(obj)/Image $(obj)/dts/dtbs-list FORCE
	$(call if_changed,fit)

EFI_ZBOOT_PAYLOAD	:= Image
EFI_ZBOOT_BFD_TARGET	:= elf64-littleaarch64
EFI_ZBOOT_MACH_TYPE	:= ARM64
Loading