Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp1306358ybb; Fri, 29 Mar 2019 01:42:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqy2xiHhQKPO7Lfdve1BptuVfTsEpqXYisjO9uhpqYb5kIRW+jeXILIvfmkK0REcYUMewF0x X-Received: by 2002:a17:902:b484:: with SMTP id y4mr40320691plr.88.1553848924770; Fri, 29 Mar 2019 01:42:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553848924; cv=none; d=google.com; s=arc-20160816; b=XHXqm9Nw5z2jm4KlFuQEnR9gE2vwpR6q4/gPi0xi2toFhani0k2hsyTShbG0bdxqx6 DytETRRxYLfStKl/NGyQTv7U3qkdj7rTBwHs4MXZkZqlITkYqnsFimqyO8Hkf9rqdjBT J9OfVFk6Fy2bl1VkxCu9b5RK430fNxHWuxxuNNnXTNzJbZCdW6+zdhCdcMHQeJRgW7cv k2+gkWek7eA/rAhQ2NPO8roBVkf66g/mvvJNfDK1oTfqdqbQrWefkEiDoEko/cr22vbc TloGfxdkR0AYgGzYpM0Pa5rcAC0BAi5ZYVzsiTxDSGzBXs/0c8OzjBSjxd7T0rCCs0Xz yQtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:references :in-reply-to:message-id:dkim-signature; bh=BN8YFCnkZyMt7fbqBBq+kQwchPieT1bmK69D5rfkV7o=; b=e8hvcwV2iw1ssHax7/ljUrXVzpO+0HOziwe3FL758KW/on2v/zJB8KSAyZhy/+FtIN yw4dAMHLTT05LILi9Vgu0jYORrUF9ta9lv1wJt3UgtBcfxav7/09PVURR/WB8+kwBCkk jsRNkOorh+yUe4LW8OnckOvpb49orNXIElRlK3k0i2uniOi1RHqqJbVuj+iidT3Jk9m+ 6Xkqo/UV1BQGYUrPAljyiShIbJAzsPiq7/upbG2K74q/gntUq8nssMO5vIjcm8dOd4BJ 6sKKMK0jCy8CoYsy5eDCtt/baKKpI8BHrxsR39gm+J+jWsN8Ame6qgp8/GrFSKAgcNck tnQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b="dZVmImQ/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c4si1396640pgk.353.2019.03.29.01.41.49; Fri, 29 Mar 2019 01:42:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b="dZVmImQ/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729199AbfC2Ikl (ORCPT + 99 others); Fri, 29 Mar 2019 04:40:41 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:15047 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729287AbfC2Ik0 (ORCPT ); Fri, 29 Mar 2019 04:40:26 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 44VwD74mfxz9v0nL; Fri, 29 Mar 2019 09:40:23 +0100 (CET) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=dZVmImQ/; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id knD2RpUqNE3p; Fri, 29 Mar 2019 09:40:23 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 44VwD73ZGrz9v0n9; Fri, 29 Mar 2019 09:40:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1553848823; bh=BN8YFCnkZyMt7fbqBBq+kQwchPieT1bmK69D5rfkV7o=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=dZVmImQ/+Mrs7jcexlMR8C4NYyrtgNNliyol3HLF7lkiDiQHvjDZe07RmWuGiF6d9 u6DQXpkYiHosQwOqIWrWd1QgN6M2PlJjShHkHwlbzjoIu9zDye/rI3sUCwtSXLDmz/ FQltAWFl4ovnU45HeraceWPnvKBRsT5x5gKo18/0= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 73AA08B825; Fri, 29 Mar 2019 09:40:24 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id daa-pkjtDzun; Fri, 29 Mar 2019 09:40:24 +0100 (CET) Received: from po16846vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.2]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 58E438B779; Fri, 29 Mar 2019 09:40:24 +0100 (CET) Received: by po16846vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 490946FC95; Fri, 29 Mar 2019 08:40:24 +0000 (UTC) Message-Id: <40f0a5645b721eeb6b8d9bc078be9d0155feff33.1553848759.git.christophe.leroy@c-s.fr> In-Reply-To: <3632dd9c8115965b37fd0b8fc50b3352395933fa.1553848759.git.christophe.leroy@c-s.fr> References: <3632dd9c8115965b37fd0b8fc50b3352395933fa.1553848759.git.christophe.leroy@c-s.fr> From: Christophe Leroy Subject: [PATCH v1 4/4] powerpc/boot: Add lzo support for uImage To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Fri, 29 Mar 2019 08:40:24 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch allows to generate lzo compressed uImage Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig | 1 + arch/powerpc/boot/Makefile | 2 ++ arch/powerpc/boot/wrapper | 5 ++++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 6f1d49fdae98..df3694b947ce 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -203,6 +203,7 @@ config PPC select HAVE_KERNEL_XZ if PPC_BOOK3S || 44x select HAVE_KERNEL_LZMA if DEFAULT_UIMAGE select HAVE_KERNEL_BZIP2 if DEFAULT_UIMAGE + select HAVE_KERNEL_LZO if DEFAULT_UIMAGE select HAVE_KPROBES select HAVE_KPROBES_ON_FTRACE select HAVE_KRETPROBES diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 0a7f8c2dc8af..4675575774d7 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -24,6 +24,7 @@ compress-$(CONFIG_KERNEL_GZIP) := CONFIG_KERNEL_GZIP compress-$(CONFIG_KERNEL_XZ) := CONFIG_KERNEL_XZ compress-$(CONFIG_KERNEL_LZMA) := CONFIG_KERNEL_LZMA compress-$(CONFIG_KERNEL_BZIP2) := CONFIG_KERNEL_BZIP2 +compress-$(CONFIG_KERNEL_LZO) := CONFIG_KERNEL_LZO ifdef CROSS32_COMPILE BOOTCC := $(CROSS32_COMPILE)gcc @@ -261,6 +262,7 @@ compressor-$(CONFIG_KERNEL_GZIP) := gz compressor-$(CONFIG_KERNEL_XZ) := xz compressor-$(CONFIG_KERNEL_LZMA) := lzma compressor-$(CONFIG_KERNEL_BZIP2) := bz2 +compressor-$(CONFIG_KERNEL_LZO) := lzo # args (to if_changed): 1 = (this rule), 2 = platform, 3 = dts 4=dtb 5=initrd quiet_cmd_wrap = WRAP $@ diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper index d1384e8c0c6f..2fd3483f9d80 100755 --- a/arch/powerpc/boot/wrapper +++ b/arch/powerpc/boot/wrapper @@ -137,7 +137,7 @@ while [ "$#" -gt 0 ]; do -Z) shift [ "$#" -gt 0 ] || usage - [ "$1" != "gz" -o "$1" != "xz" -o "$1" != "lzma" -o "$1" != "bz2" -o "$1" != "none" ] || usage + [ "$1" != "gz" -o "$1" != "xz" -o "$1" != "lzma" -o "$1" != "bz2" -o "$1" != "lzo" -o "$1" != "none" ] || usage compression=".$1" uboot_comp=$1 @@ -383,6 +383,9 @@ if [ -z "$cacheit" -o ! -f "$vmz$compression" -o "$vmz$compression" -ot "$kernel .bz2) bzip2 -f "$vmz.$$" ;; + .lzo) + lzop -f -9 "$vmz.$$" + ;; *) # drop the compression suffix so the stripped vmlinux is used compression= -- 2.13.3