From patchwork Thu Jan 7 04:35:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1423148 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=PGYKCuTk; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DBD1z2fklz9sVm for ; Thu, 7 Jan 2021 15:35:51 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8E386827D8; Thu, 7 Jan 2021 05:35:34 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="PGYKCuTk"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1A0D3827C3; Thu, 7 Jan 2021 05:35:31 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id ECB118279F for ; Thu, 7 Jan 2021 05:35:26 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd2f.google.com with SMTP id e22so4442460iom.5 for ; Wed, 06 Jan 2021 20:35:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oAluhUvJMcCsq5OxA6NXeaqqi2gV8zp8JTi0mPiWgQs=; b=PGYKCuTk1qaDQgM8lnEAISb2RtlkVGp5/X5WXTuooJsgpjZCVJNjp6qloF9zk5bzZR XUC3VRYZk+1S5zNbDiVjHtbLOjrHWKcroHJ61IYSwIfKBEkrtcAPWYuJ72uSBd7FoVjD gvrha0VU1PFqWw0fSHhCrWFI41ZFKpoi43C4M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oAluhUvJMcCsq5OxA6NXeaqqi2gV8zp8JTi0mPiWgQs=; b=o8GL3F+hsERuD6nkhM9hpJgBWO0t9+aKEWO/t4fA/FxWCeJwrYPVpQWM77CKshfiDI fpb3U/TRvgM2VdwaRrzLY6doAimGvYkgH8/Rc1DkBQe2DOo0DEeEHYguYnDN1Gr6bhX+ K/J/pSdqvkgeTzMhfESz7e+8Pe+Evdes8ft0hS6gT3LQjGJTg009Bj4/S6QQBkQkFVU6 9RqcCZYXOco+D9MGoCi7vU0ehKN6vNLzkXad88l0t+/x/yTnqCXX3LQIN6DpyxzgO5qU kUSgw2VeH3EyMkn6IhCudhhslLFa2Z929JFv497zw9OiWDExlXlqiExJRgjVKyLsZjeF KHwQ== X-Gm-Message-State: AOAM531fVaZ8lnzMkCU8mDGVcFBaJWhsnflCARs6+nWt+zQp2xVz7Ko8 9xObmF573UROynBDtGB4OBL6MxgU9Zb+sMro X-Google-Smtp-Source: ABdhPJwyuKajQ1mOmoXO00+y7EYeIncruq1J9mSvO2h/0LCAfsB7ggGQ1pCAFtsIpNoWqxkIqv76eA== X-Received: by 2002:a5e:de08:: with SMTP id e8mr5326314iok.203.1609994125630; Wed, 06 Jan 2021 20:35:25 -0800 (PST) Received: from localhost.localdomain (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id l78sm3724562ild.30.2021.01.06.20.35.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Jan 2021 20:35:25 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Simon Glass Subject: [PATCH 02/10] patman: Correct lz4 compression parameters Date: Wed, 6 Jan 2021 21:35:11 -0700 Message-Id: <20210106213503.2.Ice90ef82a59cb480c8364f78f7c796412bffccfd@changeid> X-Mailer: git-send-email 2.29.2.729.g45daf8777d-goog In-Reply-To: <20210107043519.2634625-1-sjg@chromium.org> References: <20210107043519.2634625-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean At present on large files, lz4 uses a larger block size (e.g. 256KB) than the 64KB supported by the U-Boot decompression implementation. Also it is optimised for maximum compression speed, producing larger output than we would like. Update the parameters to correct these problems. Signed-off-by: Simon Glass Signed-off-by: Simon Glass --- tools/patman/tools.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/patman/tools.py b/tools/patman/tools.py index d8e01a3e60e..10997e43868 100644 --- a/tools/patman/tools.py +++ b/tools/patman/tools.py @@ -476,7 +476,8 @@ def Compress(indata, algo, with_header=True): fname = GetOutputFilename('%s.comp.tmp' % algo) WriteFile(fname, indata) if algo == 'lz4': - data = Run('lz4', '--no-frame-crc', '-c', fname, binary=True) + data = Run('lz4', '--no-frame-crc', '-B4', '-5', '-c', fname, + binary=True) # cbfstool uses a very old version of lzma elif algo == 'lzma': outfname = GetOutputFilename('%s.comp.otmp' % algo)