Message ID | 20190430131935.17426-1-jelle@vdwaa.nl |
---|---|
State | New |
Headers | show
Return-Path: <arch-projects-bounces@archlinux.org> Delivered-To: patchwork@archlinux.org Received: from apollo.archlinux.org (localhost [127.0.0.1]) by apollo.archlinux.org (Postfix) with ESMTP id 6336EDD0E6B6 for <patchwork@archlinux.org>; Tue, 30 Apr 2019 13:19:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on apollo X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=DKIM_INVALID=1, DKIM_SIGNED=0.1,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3 autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-BL-Results: <dns:1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.7.8.0.6.0.6.1.0.8.f.4.0.1.0.a.2.list.dnswl.org> [127.0.9.2] Received: from orion.archlinux.org (orion.archlinux.org [IPv6:2a01:4f8:160:6087::1]) by apollo.archlinux.org (Postfix) with ESMTPS for <patchwork@archlinux.org>; Tue, 30 Apr 2019 13:19:57 +0000 (UTC) Received: from orion.archlinux.org (localhost [127.0.0.1]) by orion.archlinux.org (Postfix) with ESMTP id 44765123DA199A; Tue, 30 Apr 2019 13:19:55 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [IPv6:2a01:4f8:160:3033::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits)) (No client certificate requested) by orion.archlinux.org (Postfix) with ESMTPS; Tue, 30 Apr 2019 13:19:55 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 235F42C94B; Tue, 30 Apr 2019 13:19:55 +0000 (UTC) Authentication-Results: luna.archlinux.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=vdwaa-nl.20150623.gappssmtp.com header.i=@vdwaa-nl.20150623.gappssmtp.com header.b=Vp+QpxKG Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id F2E582C948 for <arch-projects@lists.archlinux.org>; Tue, 30 Apr 2019 13:19:52 +0000 (UTC) Received: from orion.archlinux.org (orion.archlinux.org [IPv6:2a01:4f8:160:6087::1]) by luna.archlinux.org (Postfix) with ESMTPS for <arch-projects@lists.archlinux.org>; Tue, 30 Apr 2019 13:19:52 +0000 (UTC) Received: from orion.archlinux.org (localhost [127.0.0.1]) by orion.archlinux.org (Postfix) with ESMTP id 90A0F123DA1998 for <arch-projects@archlinux.org>; Tue, 30 Apr 2019 13:19:47 +0000 (UTC) Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by orion.archlinux.org (Postfix) with ESMTPS for <arch-projects@archlinux.org>; Tue, 30 Apr 2019 13:19:43 +0000 (UTC) Received: by mail-ed1-x543.google.com with SMTP id d1so12229105edd.13 for <arch-projects@archlinux.org>; Tue, 30 Apr 2019 06:19:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vdwaa-nl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=q37HFWTYs+Nf2zXEgXJ7VY9Jj3gcBdj/OilNHpRAsUs=; b=Vp+QpxKGwDUSwcc25enmZ7mdK48cpWLEVRofwWhOQYeaB6EEia9Nejz1SFFDWC/ANH dIiIXOr4bEjviXTUDHTJ2K9gJ7bT+0Ou/YqMZdKg4JHxtyXlY0ou+meFhriHB+gXUFs7 SKv+lIlF128ouMCHFWgIRBwr7/B4tfc0Hk3JVRXgWfQdHoWGRFAjf45qb1WfzvvzpHbG vWQVyEB0UR7mWG9EQG8hxCqYsCciNlJLo7d9dJO5wq0YMLHGzOlI0XuDdZoTPf2F1EVg 6Q7lj934CLnCNrtX6Svalld521zXEzqafwLnMlfFLXvVIBE/9AR7edpyhkNML1V7g7vL X/HQ== 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=q37HFWTYs+Nf2zXEgXJ7VY9Jj3gcBdj/OilNHpRAsUs=; b=ModX5pdvT2nOzTg1eOiSSvPXSW78LnA8TPdHHCOhwATzp9zGVz7izUcaQ4vZNnnWwV OMSifTj7X1+4WaKkygmSRlj0nEKU/80K2cz2yoDD/PDhhUui/zTTgz/rDsTabgHRyD0D Jt9AUrenHd9eWtu9zGc7arUC0ZPsvxieS2H2uVGKcdYelHUKu4A59rquV6aLLFp02MpW WlbcdwITab4S7Qz/cVzeajFfN1Gr1n4wUg7E/SSuMTXlNBi2d/1t1Uhr74pBtaF7obWO FRWTb4lbqU+LEMljKYG92/m+e5WKeO1QyZXtRY9Spa2SD2gVtA1Z3XM/mS+NGc4WXDZ9 a5AA== X-Gm-Message-State: APjAAAW6VKZ2W2bczDSFYXHijYBs+2+aXe8BeScEycmqp2tZFN6c0YZq a3BXwHrZZ9MRLkK1VI6t4bCIQW0ty5Ey4Q== X-Google-Smtp-Source: APXvYqwcF8DeifUT2tzHpVMfWLe9OVlD+3tnTBtjCUdWzxlvgNMZUfm4Uwf62wfUoge5pYYV9v+i8g== X-Received: by 2002:a17:906:7c12:: with SMTP id t18mr93707ejo.59.1556630382913; Tue, 30 Apr 2019 06:19:42 -0700 (PDT) Received: from helium.kopano.lan (D57D69B5.static.ziggozakelijk.nl. [213.125.105.181]) by smtp.gmail.com with ESMTPSA id z10sm6274388ejg.36.2019.04.30.06.19.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Apr 2019 06:19:42 -0700 (PDT) From: Jelle van der Waa <jelle@vdwaa.nl> To: arch-projects@archlinux.org Date: Tue, 30 Apr 2019 15:19:35 +0200 Message-Id: <20190430131935.17426-1-jelle@vdwaa.nl> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [arch-projects] [mkinitcpio] [PATCH] lsinitcpio: Add zstd decompression support X-BeenThere: arch-projects@archlinux.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Arch Linux projects development discussion <arch-projects.archlinux.org> List-Unsubscribe: <https://lists.archlinux.org/options/arch-projects>, <mailto:arch-projects-request@archlinux.org?subject=unsubscribe> List-Archive: <https://lists.archlinux.org/pipermail/arch-projects/> List-Post: <mailto:arch-projects@archlinux.org> List-Help: <mailto:arch-projects-request@archlinux.org?subject=help> List-Subscribe: <https://lists.archlinux.org/listinfo/arch-projects>, <mailto:arch-projects-request@archlinux.org?subject=subscribe> Reply-To: Arch Linux projects development discussion <arch-projects@archlinux.org> Errors-To: arch-projects-bounces@archlinux.org Sender: "arch-projects" <arch-projects-bounces@archlinux.org> |
Series |
[mkinitcpio] lsinitcpio: Add zstd decompression support
|
expand
|
diff --git a/lsinitcpio b/lsinitcpio index bcb4a19..d44a714 100755 --- a/lsinitcpio +++ b/lsinitcpio @@ -131,6 +131,12 @@ detect_filetype() { return fi + read -rd '' bytes < <(hexdump -n 4 -e '"%x"' "$1") + if [[ $bytes = 'fd2fb528' ]]; then + echo 'zstd' + return + fi + # still nothing? hrmm, maybe the user goofed and it's a kernel if kver "$1" >/dev/null; then die '%s is a kernel image, not an initramfs image!' "$1"
Add detection support for zstd compressed initramfs, the magic number of zstd is defined as 0xFD2FB528. https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl> --- lsinitcpio | 6 ++++++ 1 file changed, 6 insertions(+)