Skip to content

Commit ccebb88

Browse files
mthuurneralfbaechle
authored andcommitted
MIPS: zboot: Add "uzImage.bin" target
uzImage.bin is vmlinuz.bin wrapped in a legacy U-Boot image. Since the extraction code is inside the image, it does not depend on the boot loader to extract the kernel. Signed-off-by: Maarten ter Huurne <maarten@treewalker.org> Cc: Alban Bedel <albeu@free.fr> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/14473/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent 0c744ea commit ccebb88

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

‎arch/mips/Makefile‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,9 @@ bootz-y := vmlinuz
320320
bootz-y += vmlinuz.bin
321321
bootz-y += vmlinuz.ecoff
322322
bootz-y += vmlinuz.srec
323+
ifeq ($(shell expr $(zload-y) \< 0xffffffff80000000 2> /dev/null), 0)
324+
bootz-y += uzImage.bin
325+
endif
323326

324327
ifdef CONFIG_LASAT
325328
rom.bin rom.sw: vmlinux
@@ -433,6 +436,7 @@ define archhelp
433436
echo ' uImage.gz - U-Boot image (gzip)'
434437
echo ' uImage.lzma - U-Boot image (lzma)'
435438
echo ' uImage.lzo - U-Boot image (lzo)'
439+
echo ' uzImage.bin - U-Boot image (self-extracting)'
436440
echo ' dtbs - Device-tree blobs for enabled boards'
437441
echo ' dtbs_install - Install dtbs to $(INSTALL_DTBS_PATH)'
438442
echo

‎arch/mips/boot/compressed/Makefile‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ else
8484
VMLINUZ_LOAD_ADDRESS = $(shell $(obj)/calc_vmlinuz_load_addr \
8585
$(obj)/vmlinux.bin $(VMLINUX_LOAD_ADDRESS))
8686
endif
87+
UIMAGE_LOADADDR = $(VMLINUZ_LOAD_ADDRESS)
8788

8889
vmlinuzobjs-y += $(obj)/piggy.o
8990

@@ -129,4 +130,7 @@ OBJCOPYFLAGS_vmlinuz.srec := $(OBJCOPYFLAGS) -S -O srec
129130
vmlinuz.srec: vmlinuz
130131
$(call cmd,objcopy)
131132

133+
uzImage.bin: vmlinuz.bin FORCE
134+
$(call if_changed,uimage,none)
135+
132136
clean-files := $(objtree)/vmlinuz $(objtree)/vmlinuz.{32,ecoff,bin,srec}

0 commit comments

Comments
 (0)