File tree Expand file tree Collapse file tree 7 files changed +337
-3
lines changed Expand file tree Collapse file tree 7 files changed +337
-3
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ Sphinx\ [#f1]_ 2.4.4 sphinx-build --version
62
62
cpio any cpio --version
63
63
GNU tar 1.28 tar --version
64
64
gtags (optional) 6.6.5 gtags --version
65
+ mkimage (optional) 2017.01 mkimage --version
65
66
====================== =============== ========================================
66
67
67
68
.. [#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
189
190
tag files through ``make gtags ``. This is due to its use of the gtags
190
191
``-C (--directory) `` flag.
191
192
193
+ mkimage
194
+ -------
195
+
196
+ This tool is used when building a Flat Image Tree (FIT), commonly used on ARM
197
+ platforms. The tool is available via the ``u-boot-tools `` package or can be
198
+ built from the U-Boot source code. See the instructions at
199
+ https://docs.u-boot.org/en/latest/build/tools.html#building-tools-for-linux
200
+
192
201
System utilities
193
202
****************
194
203
Original file line number Diff line number Diff line change @@ -3051,6 +3051,13 @@ F: drivers/mmc/host/sdhci-of-arasan.c
3051
3051
N: zynq
3052
3052
N: xilinx
3053
3053
3054
+ ARM64 FIT SUPPORT
3055
+ M: Simon Glass <
[email protected] >
3056
+ L:
[email protected] (moderated for non-subscribers)
3057
+ S: Maintained
3058
+ F: arch/arm64/boot/Makefile
3059
+ F: scripts/make_fit.py
3060
+
3054
3061
ARM64 PORT (AARCH64 ARCHITECTURE)
3055
3062
M: Catalin Marinas <
[email protected] >
3056
3063
M: Will Deacon <
[email protected] >
Original file line number Diff line number Diff line change @@ -154,6 +154,10 @@ libs-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
154
154
# Default target when executing plain make
155
155
boot := arch/arm64/boot
156
156
157
+ BOOT_TARGETS := Image vmlinuz.efi image.fit
158
+
159
+ PHONY += $(BOOT_TARGETS )
160
+
157
161
ifeq ($(CONFIG_EFI_ZBOOT ) ,)
158
162
KBUILD_IMAGE := $(boot ) /Image.gz
159
163
else
@@ -162,8 +166,10 @@ endif
162
166
163
167
all : $(notdir $(KBUILD_IMAGE ) )
164
168
165
- vmlinuz.efi : Image
166
- Image vmlinuz.efi : vmlinux
169
+ image.fit : dtbs
170
+
171
+ vmlinuz.efi image.fit : Image
172
+ $(BOOT_TARGETS ) : vmlinux
167
173
$(Q )$(MAKE ) $(build ) =$(boot ) $(boot ) /$@
168
174
169
175
Image.% : Image
@@ -215,6 +221,7 @@ virtconfig:
215
221
define archhelp
216
222
echo '* Image.gz - Compressed kernel image (arch/$(ARCH ) /boot/Image.gz)'
217
223
echo ' Image - Uncompressed kernel image (arch/$(ARCH ) /boot/Image)'
224
+ echo ' image.fit - Flat Image Tree (arch/$(ARCH ) /boot/image.fit)'
218
225
echo ' install - Install uncompressed kernel'
219
226
echo ' zinstall - Install compressed kernel'
220
227
echo ' Install using (your) ~/bin/installkernel or'
Original file line number Diff line number Diff line change 2
2
Image
3
3
Image.gz
4
4
vmlinuz *
5
+ image.fit
Original file line number Diff line number Diff line change 16
16
17
17
OBJCOPYFLAGS_Image :=-O binary -R .note -R .note.gnu.build-id -R .comment -S
18
18
19
- targets := Image Image.bz2 Image.gz Image.lz4 Image.lzma Image.lzo Image.zst
19
+ targets := Image Image.bz2 Image.gz Image.lz4 Image.lzma Image.lzo \
20
+ Image.zst image.fit
20
21
21
22
$(obj ) /Image : vmlinux FORCE
22
23
$(call if_changed,objcopy)
@@ -39,6 +40,9 @@ $(obj)/Image.lzo: $(obj)/Image FORCE
39
40
$(obj ) /Image.zst : $(obj ) /Image FORCE
40
41
$(call if_changed,zstd)
41
42
43
+ $(obj ) /image.fit : $(obj ) /Image $(obj ) /dts/dtbs-list FORCE
44
+ $(call if_changed,fit)
45
+
42
46
EFI_ZBOOT_PAYLOAD := Image
43
47
EFI_ZBOOT_BFD_TARGET := elf64-littleaarch64
44
48
EFI_ZBOOT_MACH_TYPE := ARM64
Original file line number Diff line number Diff line change @@ -504,6 +504,22 @@ quiet_cmd_uimage = UIMAGE $@
504
504
-a $(UIMAGE_LOADADDR) -e $(UIMAGE_ENTRYADDR) \
505
505
-n '$(UIMAGE_NAME)' -d $< $@
506
506
507
+ # Flat Image Tree (FIT)
508
+ # This allows for packaging of a kernel and all devicetrees files, using
509
+ # compression.
510
+ # ---------------------------------------------------------------------------
511
+
512
+ MAKE_FIT := $(srctree)/scripts/make_fit.py
513
+
514
+ # Use this to override the compression algorithm
515
+ FIT_COMPRESSION ?= gzip
516
+
517
+ quiet_cmd_fit = FIT $@
518
+ cmd_fit = $(MAKE_FIT) -o $@ --arch $(UIMAGE_ARCH) --os linux \
519
+ --name '$(UIMAGE_NAME)' \
520
+ $(if $(findstring 1,$(KBUILD_VERBOSE)),-v) \
521
+ --compress $(FIT_COMPRESSION) -k $< @$(word 2,$^)
522
+
507
523
# XZ
508
524
# ---------------------------------------------------------------------------
509
525
# Use xzkern to compress the kernel image and xzmisc to compress other things.
You can’t perform that action at this time.
0 commit comments