From patchwork Tue Aug 31 10:22:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Art Nikpal X-Patchwork-Id: 1522521 X-Patchwork-Delegate: trini@ti.com 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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=h2/D+QY0; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GzNYT5wg8z9sR4 for ; Tue, 31 Aug 2021 20:22:51 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 982A7833C2; Tue, 31 Aug 2021 12:22:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="h2/D+QY0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B59ED8340C; Tue, 31 Aug 2021 12:22:38 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) (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 DADE0833B3 for ; Tue, 31 Aug 2021 12:22:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=email2tema@gmail.com Received: by mail-pf1-x431.google.com with SMTP id s29so9740020pfw.5 for ; Tue, 31 Aug 2021 03:22:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=I7MkymyBlVNnCDO/4UreJEJKtF/23IpoOTt/NGlza+A=; b=h2/D+QY0wokC2gwBLrNjvQWD5jwEuDHtHSIjx/NiwBLOQPFdyVRPlR8+p7IRfsyvcw mPftQypF4of4PnkrbtYGoCXAwWhxXKEiDmpmz9VvKMOZLwmfSIh9O+8UBuvtJZhL5q4X P1gDKiJ8Y/Vvlu5yBR81MHpMqaHhqJqW6zbeqr5a1Q5XMoWUuFr0Y3cVXzEq7khEpeOX kUMeL5dBCrU/orWtMjdec5J9xHTtroDYyJKL1weOga89Rb1+oGA4OVnktS799IA3PHa9 QdMWAk4kMT38Yni4aPkb+xJuiU8GZ18GVZRdvKLE3qcZbmnWlFSIBbSJKxqA7qaK5VmO x3Dw== 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:mime-version :content-transfer-encoding; bh=I7MkymyBlVNnCDO/4UreJEJKtF/23IpoOTt/NGlza+A=; b=DpgrMFK72sTPDPN6U8wizmPgLT1bX1VEwFVx7mMsT3euFM0j29U2VLq8E8ZHV5rkJA Gi2VpMWSOUtphxuWgl0dPiDz54BQ1lJB+8VLwc6Jzu2SIXou9WQNXo/eqCy4iBrmm1n2 PrkFO8vD9jA84F47tuWb0RwH+QI8ma9pBPv9zt60oz8wjvDVwUYZVNShEtnyRUxCjfpO fLbh9nAeEcFWwIkd0gzTXH5iwMH2Qz5gt+pTG/DmVX0ZgFE0nUwHnyd7E3sN89Ypauzt KFIDUEQqrq/z7cWsCxvVa9Km8QshCF93n94MA32aQW68pi/JRCq8E1d8T7kq0wHpHS+z o2Lw== X-Gm-Message-State: AOAM533YQTgG6TumWDeIGdhcwBpmbpGkByEXgORudIAgGwhlqFtV6Wff kk1KoKujDQdX5nXelVCqIzM= X-Google-Smtp-Source: ABdhPJzhhdlmTK51TbE/4IUKg22sup9J8AlcFt6Q6QD7SwADsrYKIFWJCSaviLo29siU5gRH2nAzTg== X-Received: by 2002:a63:fd51:: with SMTP id m17mr25921103pgj.395.1630405351950; Tue, 31 Aug 2021 03:22:31 -0700 (PDT) Received: from localhost.localdomain (104.194.74.249.16clouds.com. [104.194.74.249]) by smtp.gmail.com with ESMTPSA id p17sm2358328pjg.54.2021.08.31.03.22.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Aug 2021 03:22:31 -0700 (PDT) From: Artem Lapkin X-Google-Original-From: Artem Lapkin To: trini@konsulko.com, narmstrong@baylibre.com Cc: u-boot@lists.denx.de, u-boot-amlogic@groups.io, christianshewitt@gmail.com, sjg@chromium.org, art@khadas.com, nick@khadas.com, gouwa@khadas.com Subject: [PATCH] image: add lz4 zstd compression magic map Date: Tue, 31 Aug 2021 18:22:18 +0800 Message-Id: <20210831102218.2960058-1-art@khadas.com> X-Mailer: git-send-email 2.25.1 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.103.2 at phobos.denx.de X-Virus-Status: Clean Add lz4 and zstd compression magic map. Already can decompress images with lz4 and zstd compression type. Signed-off-by: Artem Lapkin --- common/image.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/image.c b/common/image.c index 59c52a1f9a..e199d61a4c 100644 --- a/common/image.c +++ b/common/image.c @@ -216,6 +216,8 @@ static const struct comp_magic_map image_comp[] = { { IH_COMP_GZIP, "gzip", {0x1f, 0x8b},}, { IH_COMP_LZMA, "lzma", {0x5d, 0x00},}, { IH_COMP_LZO, "lzo", {0x89, 0x4c},}, + { IH_COMP_LZ4, "lz4", {0x04, 0x22},}, + { IH_COMP_ZSTD, "zstd", {0x28, 0xb5},}, { IH_COMP_NONE, "none", {}, }, };