Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S943483AbcJaOUb (ORCPT ); Mon, 31 Oct 2016 10:20:31 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:37455 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S943431AbcJaOU0 (ORCPT ); Mon, 31 Oct 2016 10:20:26 -0400 X-Originating-IP: 82.170.150.80 From: Maarten ter Huurne To: Ralf Baechle , Alban Bedel , linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org, Maarten ter Huurne Subject: [PATCH] MIPS: zboot: Add "uzImage.bin" target Date: Mon, 31 Oct 2016 15:19:55 +0100 Message-Id: <1477923595-12033-1-git-send-email-maarten@treewalker.org> X-Mailer: git-send-email 2.6.6 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1867 Lines: 54 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 --- arch/mips/Makefile | 4 ++++ arch/mips/boot/compressed/Makefile | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/arch/mips/Makefile b/arch/mips/Makefile index fbf40d3..c004da4 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -320,6 +320,9 @@ bootz-y := vmlinuz bootz-y += vmlinuz.bin bootz-y += vmlinuz.ecoff bootz-y += vmlinuz.srec +ifeq ($(shell expr $(zload-y) \< 0xffffffff80000000 2> /dev/null), 0) +bootz-y += uzImage.bin +endif ifdef CONFIG_LASAT rom.bin rom.sw: vmlinux @@ -433,6 +436,7 @@ define archhelp echo ' uImage.gz - U-Boot image (gzip)' echo ' uImage.lzma - U-Boot image (lzma)' echo ' uImage.lzo - U-Boot image (lzo)' + echo ' uzImage.bin - U-Boot image (self-extracting)' echo ' dtbs - Device-tree blobs for enabled boards' echo ' dtbs_install - Install dtbs to $(INSTALL_DTBS_PATH)' echo diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile index 90aca95..011b145 100644 --- a/arch/mips/boot/compressed/Makefile +++ b/arch/mips/boot/compressed/Makefile @@ -84,6 +84,7 @@ else VMLINUZ_LOAD_ADDRESS = $(shell $(obj)/calc_vmlinuz_load_addr \ $(obj)/vmlinux.bin $(VMLINUX_LOAD_ADDRESS)) endif +UIMAGE_LOADADDR = $(VMLINUZ_LOAD_ADDRESS) vmlinuzobjs-y += $(obj)/piggy.o @@ -129,4 +130,7 @@ OBJCOPYFLAGS_vmlinuz.srec := $(OBJCOPYFLAGS) -S -O srec vmlinuz.srec: vmlinuz $(call cmd,objcopy) +uzImage.bin: vmlinuz.bin FORCE + $(call if_changed,uimage,none) + clean-files := $(objtree)/vmlinuz $(objtree)/vmlinuz.{32,ecoff,bin,srec} -- 2.6.6