Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp1306685ybb; Fri, 29 Mar 2019 01:42:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqyb484Jb6DpDY9bkAF43sVQxUYYQKO5iHZX0vB+af9dU4uSrhRIXojD4w/76z/+Nll33Cvd X-Received: by 2002:aa7:91c8:: with SMTP id z8mr34936993pfa.110.1553848953916; Fri, 29 Mar 2019 01:42:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553848953; cv=none; d=google.com; s=arc-20160816; b=RIknphNjJ3WAY0Rs0HNYKbeliZuXjxUUpStoiWqLmSQf9VZCOSQnSXKbdjJKbZsi/J lu31TB+/XWv8wd1RzW4Sx7uERfaPiE08Y7mLbs6ra3n15I/SzoEXQWerzS6/4filJmSB ueJ7OmQZkwLzhGIlaGlaXRDxSQ2l/SNXLRDvH3K614ceKRY1X3Hp21g1X9Hn3+bydjBn 09yhvQk1Nh/lPmDG2LL6/yqvjY56jcOM0a+XZVY+EsogZUtWdrLNr4EtSATOxTSzqoKv u8p420TUdniUb+fhmz4SHrtlZASnW7bceAvB4xVbS32dMKjSZtBfRdMMavuAFVTwROez 956w== 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=eIMm8LzKHV4kGBIhPY9vz0+T+2xzpEd+mp7zWVxb9pI=; b=u0duq8kD2LANbeJ6ZSDqhESh8uw9mx2QNTh6QmR8XsLNKv+36S6eopY62L/MWb50/w FbnF9IpqGc9ckxm1FZbqURkMv1a5yjxIMMARM4AW47c3MVQnYcLyKRhRg+7ElnyRLgj7 QJa846YBqPoXoPZ9JR7siju00uCRc+sfN8n+DC2Bl9azK4qQLT7bo6yMBRUqrGfxL6dP 1gr3Ikkqunxro4DhAeSfkMHh8bA4gizbBqtmGajdyo+gJJXl4pZzDFfkcpoLmWT/sfkn bNLstl1YHVJleLWU2tbJaSYrsK8oqkjP7LwBFNEog+z6PG3lJyqFSI+3nDYUlYKGX7fS 639Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=PzUEVscq; 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 p2si1415511pgk.326.2019.03.29.01.42.18; Fri, 29 Mar 2019 01:42:33 -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=PzUEVscq; 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 S1729306AbfC2Ik3 (ORCPT + 99 others); Fri, 29 Mar 2019 04:40:29 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:10161 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729151AbfC2IkY (ORCPT ); Fri, 29 Mar 2019 04:40:24 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 44VwD5470Sz9v0nG; Fri, 29 Mar 2019 09:40:21 +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=PzUEVscq; 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 2xioH74lIaeB; Fri, 29 Mar 2019 09:40:21 +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 44VwD52wVKz9v0n9; Fri, 29 Mar 2019 09:40:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1553848821; bh=eIMm8LzKHV4kGBIhPY9vz0+T+2xzpEd+mp7zWVxb9pI=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=PzUEVscqxbB3zhngCRHl361bX+m3VtcuDx4/fp7hAJp0oi3xZtrambMyhDhS+NIt6 whvJpCJUURmXkBV8atP6GJn8uqFMFQ/qgFePSjEnxjQQnUM6wiC4fsHrJkh2OZ8E5G zE5WXI37vmTGV/z7Rt1zpaTYJx5sCY4AIIMxCSzI= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 67F8C8B825; Fri, 29 Mar 2019 09:40:22 +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 eIxsriYjUT3m; Fri, 29 Mar 2019 09:40:22 +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 416438B779; Fri, 29 Mar 2019 09:40:22 +0100 (CET) Received: by po16846vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 33F2D6FC95; Fri, 29 Mar 2019 08:40:22 +0000 (UTC) Message-Id: 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 2/4] powerpc/boot: Add lzma 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:22 +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 lzma 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 2d0be82c3061..69ff2476490c 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -201,6 +201,7 @@ config PPC select HAVE_IRQ_EXIT_ON_IRQ_STACK select HAVE_KERNEL_GZIP select HAVE_KERNEL_XZ if PPC_BOOK3S || 44x + select HAVE_KERNEL_LZMA 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 73d1f3562978..9b7b11a22925 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -22,6 +22,7 @@ all: $(obj)/zImage compress-$(CONFIG_KERNEL_GZIP) := CONFIG_KERNEL_GZIP compress-$(CONFIG_KERNEL_XZ) := CONFIG_KERNEL_XZ +compress-$(CONFIG_KERNEL_LZMA) := CONFIG_KERNEL_LZMA ifdef CROSS32_COMPILE BOOTCC := $(CROSS32_COMPILE)gcc @@ -257,6 +258,7 @@ endif compressor-$(CONFIG_KERNEL_GZIP) := gz compressor-$(CONFIG_KERNEL_XZ) := xz +compressor-$(CONFIG_KERNEL_LZMA) := lzma # 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 4e9beecf2502..51dc42f5acbc 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" != "none" ] || usage + [ "$1" != "gz" -o "$1" != "xz" -o "$1" != "lzma" -o "$1" != "none" ] || usage compression=".$1" uboot_comp=$1 @@ -374,6 +374,9 @@ if [ -z "$cacheit" -o ! -f "$vmz$compression" -o "$vmz$compression" -ot "$kernel .gz) gzip -n -f -9 "$vmz.$$" ;; + .lzma) + xz --format=lzma -f -6 "$vmz.$$" + ;; *) # drop the compression suffix so the stripped vmlinux is used compression= -- 2.13.3