From patchwork Tue Nov 14 21:04:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 34484 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 955B8C4332F for ; Tue, 14 Nov 2023 21:04:24 +0000 (UTC) Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) by mx.groups.io with SMTP id smtpd.web11.4596.1699995861946153905 for ; Tue, 14 Nov 2023 13:04:22 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=XOgO7aFP; spf=pass (domain: linaro.org, ip: 209.85.208.178, mailfrom: dmitry.baryshkov@linaro.org) Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-2c6efcef4eeso80959691fa.1 for ; Tue, 14 Nov 2023 13:04:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699995860; x=1700600660; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=XKvQUi7N66H0+YjLKOa5duCvjvtc7Id8SUy8VFJ5mYQ=; b=XOgO7aFPEtvu9REPRJxcGdBK+BEGmZFApFAn5BV3iz5QQiS0c3prw8dR1MTKjEE4L8 kxF5P1p1NMtuoESo3FwBj3RVaS8a9WS/MOTfm7Yrzik+s4Xb+SWa1ydSvQJ9mja3JvhQ AUaacTwi8R4PglYxCTMv/WHOyl9gH8xWFHT6sPDQ7feH8uwVKAK0rK/xkrmB2Y8Proju TdCQgCbuGkz0OzNC6vgFzGKwWXp5rI3ZIZJ5h/cF+MHpQRa9i72dMB8QvdxxVsvrzjpa yeW7hRenfqTRcG6OYOFad5SJYdCc2KJFK1xBpsHiOQGQE8DOGeOE6LUUqXZzRRku5yGP hCVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699995860; x=1700600660; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XKvQUi7N66H0+YjLKOa5duCvjvtc7Id8SUy8VFJ5mYQ=; b=pCZeR1OYol9KxkzHWvxA9MxmP5w/MPGfe9/zbWkmdoDw8c4aCUb3sMn05adof4t+lK sCh6XUCvfjp7l/+sUn9M29rSx2vDUNsC4hAgRrjT8pfA/ry1kcW6UZw/i8Hti/z5++eN +slT9MiBI4L6TiEvSiA/03RCYNIPEed4EKb7gn1XY5qlEEDZZBX468GM8qw3wdz72j2C ydrKpxDvtfkyq85UhweJDa4wbRpRKVXs9OYBUOIWilOSsNOSMDFyLvCpeWyfpJNq9hCM iIVJWbhnzMcctOhiraWKLyz/erddf3cwk7NWvCfjzhAxI5k5p/br+nAtAxXtJn4MPdeu +0YQ== X-Gm-Message-State: AOJu0Yz1fQZvyIUPKa8BX6YIQnlpSVN2k9XvCC0BhcLN3uFy9mRMCp3F kIQo1WCiEq5UeVGKmDL8LZ+ozQKZKcG8RjOzHIU= X-Google-Smtp-Source: AGHT+IGt6nGGsMNJsvn8Mc3MO0Oglq+chft+ro/5K3AZk5YzkZJRTEbGUoKboW4yBU4SgFAQMZs7bw== X-Received: by 2002:a2e:a3d2:0:b0:2c5:6df:8b2c with SMTP id w18-20020a2ea3d2000000b002c506df8b2cmr2330453lje.45.1699995859785; Tue, 14 Nov 2023 13:04:19 -0800 (PST) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id a8-20020a05651c210800b002c001e57e1asm1437856ljq.73.2023.11.14.13.04.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 13:04:19 -0800 (PST) From: Dmitry Baryshkov To: openembedded-core@lists.openembedded.org Subject: [PATCH v2 1/2] rust-android-sparse: add lightweight simg2img/img2simg implementation Date: Wed, 15 Nov 2023 00:04:17 +0300 Message-Id: <20231114210418.1323819-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231114210418.1323819-1-dmitry.baryshkov@linaro.org> References: <20231114210418.1323819-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 14 Nov 2023 21:04:24 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190520 The Android's simg2img/img2simg comes from android-tools, which is a huge package with lots of dependencies on its own. It resides inside meta-oe rather than OE-Core. Add lightweight tool to handle sparse images, which is small enough to be pushed into OE-Core. Signed-off-by: Dmitry Baryshkov --- .../rust-android-sparse-crates.inc | 98 +++++++++++++++++++ .../rust-android-sparse_0.6.0.bb | 20 ++++ 2 files changed, 118 insertions(+) create mode 100644 meta/recipes-extended/rust-android-sparse/rust-android-sparse-crates.inc create mode 100644 meta/recipes-extended/rust-android-sparse/rust-android-sparse_0.6.0.bb diff --git a/meta/recipes-extended/rust-android-sparse/rust-android-sparse-crates.inc b/meta/recipes-extended/rust-android-sparse/rust-android-sparse-crates.inc new file mode 100644 index 000000000000..5f3e1c5657ff --- /dev/null +++ b/meta/recipes-extended/rust-android-sparse/rust-android-sparse-crates.inc @@ -0,0 +1,98 @@ +# Autogenerated with 'bitbake -c update_crates rust-android-sparse' + +# from Cargo.lock +SRC_URI += " \ + crate://crates.io/aho-corasick/0.7.18 \ + crate://crates.io/assert_cmd/0.9.1 \ + crate://crates.io/autocfg/1.0.1 \ + crate://crates.io/bitflags/1.3.2 \ + crate://crates.io/build_const/0.2.2 \ + crate://crates.io/byteorder/1.4.3 \ + crate://crates.io/cfg-if/1.0.0 \ + crate://crates.io/clap/2.34.0 \ + crate://crates.io/crc/1.8.1 \ + crate://crates.io/difference/2.0.0 \ + crate://crates.io/escargot/0.3.1 \ + crate://crates.io/float-cmp/0.4.0 \ + crate://crates.io/getrandom/0.2.3 \ + crate://crates.io/itoa/0.4.8 \ + crate://crates.io/libc/0.2.109 \ + crate://crates.io/memchr/2.4.1 \ + crate://crates.io/normalize-line-endings/0.2.2 \ + crate://crates.io/num-traits/0.2.14 \ + crate://crates.io/ppv-lite86/0.2.15 \ + crate://crates.io/predicates/0.9.1 \ + crate://crates.io/predicates-core/0.9.0 \ + crate://crates.io/predicates-tree/0.9.0 \ + crate://crates.io/proc-macro2/1.0.33 \ + crate://crates.io/quote/1.0.10 \ + crate://crates.io/rand/0.8.4 \ + crate://crates.io/rand_chacha/0.3.1 \ + crate://crates.io/rand_core/0.6.3 \ + crate://crates.io/rand_hc/0.3.1 \ + crate://crates.io/redox_syscall/0.2.10 \ + crate://crates.io/regex/1.5.4 \ + crate://crates.io/regex-syntax/0.6.25 \ + crate://crates.io/remove_dir_all/0.5.3 \ + crate://crates.io/ryu/1.0.6 \ + crate://crates.io/serde/1.0.130 \ + crate://crates.io/serde_derive/1.0.130 \ + crate://crates.io/serde_json/1.0.72 \ + crate://crates.io/syn/1.0.82 \ + crate://crates.io/tempfile/3.2.0 \ + crate://crates.io/textwrap/0.11.0 \ + crate://crates.io/treeline/0.1.0 \ + crate://crates.io/unicode-width/0.1.9 \ + crate://crates.io/unicode-xid/0.2.2 \ + crate://crates.io/wasi/0.10.2+wasi-snapshot-preview1 \ + crate://crates.io/winapi/0.3.9 \ + crate://crates.io/winapi-i686-pc-windows-gnu/0.4.0 \ + crate://crates.io/winapi-x86_64-pc-windows-gnu/0.4.0 \ +" + +SRC_URI[aho-corasick-0.7.18.sha256sum] = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +SRC_URI[assert_cmd-0.9.1.sha256sum] = "c5b60c276f334145cf2cec09c5bb6f63523f078c0c850909f66bca8f933cf809" +SRC_URI[autocfg-1.0.1.sha256sum] = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +SRC_URI[bitflags-1.3.2.sha256sum] = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +SRC_URI[build_const-0.2.2.sha256sum] = "b4ae4235e6dac0694637c763029ecea1a2ec9e4e06ec2729bd21ba4d9c863eb7" +SRC_URI[byteorder-1.4.3.sha256sum] = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +SRC_URI[cfg-if-1.0.0.sha256sum] = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +SRC_URI[clap-2.34.0.sha256sum] = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" +SRC_URI[crc-1.8.1.sha256sum] = "d663548de7f5cca343f1e0a48d14dcfb0e9eb4e079ec58883b7251539fa10aeb" +SRC_URI[difference-2.0.0.sha256sum] = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" +SRC_URI[escargot-0.3.1.sha256sum] = "19db1f7e74438642a5018cdf263bb1325b2e792f02dd0a3ca6d6c0f0d7b1d5a5" +SRC_URI[float-cmp-0.4.0.sha256sum] = "134a8fa843d80a51a5b77d36d42bc2def9edcb0262c914861d08129fd1926600" +SRC_URI[getrandom-0.2.3.sha256sum] = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" +SRC_URI[itoa-0.4.8.sha256sum] = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" +SRC_URI[libc-0.2.109.sha256sum] = "f98a04dce437184842841303488f70d0188c5f51437d2a834dc097eafa909a01" +SRC_URI[memchr-2.4.1.sha256sum] = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +SRC_URI[normalize-line-endings-0.2.2.sha256sum] = "2e0a1a39eab95caf4f5556da9289b9e68f0aafac901b2ce80daaf020d3b733a8" +SRC_URI[num-traits-0.2.14.sha256sum] = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +SRC_URI[ppv-lite86-0.2.15.sha256sum] = "ed0cfbc8191465bed66e1718596ee0b0b35d5ee1f41c5df2189d0fe8bde535ba" +SRC_URI[predicates-0.9.1.sha256sum] = "f31e7977fc111984fdac76b6ae3a4cb598008fc6fd02dfdca189bf180bd7be20" +SRC_URI[predicates-core-0.9.0.sha256sum] = "85f80bc390d1c02a4cdaa63f27f05c3c426679eb65433d8dd65d392147e4e5c5" +SRC_URI[predicates-tree-0.9.0.sha256sum] = "2e86df9b81bdcb0a5141aca9d2b9c5e0c558ef6626d3ae2c12912f5c9df740bd" +SRC_URI[proc-macro2-1.0.33.sha256sum] = "fb37d2df5df740e582f28f8560cf425f52bb267d872fe58358eadb554909f07a" +SRC_URI[quote-1.0.10.sha256sum] = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" +SRC_URI[rand-0.8.4.sha256sum] = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" +SRC_URI[rand_chacha-0.3.1.sha256sum] = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +SRC_URI[rand_core-0.6.3.sha256sum] = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +SRC_URI[rand_hc-0.3.1.sha256sum] = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" +SRC_URI[redox_syscall-0.2.10.sha256sum] = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" +SRC_URI[regex-1.5.4.sha256sum] = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" +SRC_URI[regex-syntax-0.6.25.sha256sum] = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +SRC_URI[remove_dir_all-0.5.3.sha256sum] = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" +SRC_URI[ryu-1.0.6.sha256sum] = "3c9613b5a66ab9ba26415184cfc41156594925a9cf3a2057e57f31ff145f6568" +SRC_URI[serde-1.0.130.sha256sum] = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913" +SRC_URI[serde_derive-1.0.130.sha256sum] = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" +SRC_URI[serde_json-1.0.72.sha256sum] = "d0ffa0837f2dfa6fb90868c2b5468cad482e175f7dad97e7421951e663f2b527" +SRC_URI[syn-1.0.82.sha256sum] = "8daf5dd0bb60cbd4137b1b587d2fc0ae729bc07cf01cd70b36a1ed5ade3b9d59" +SRC_URI[tempfile-3.2.0.sha256sum] = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" +SRC_URI[textwrap-0.11.0.sha256sum] = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +SRC_URI[treeline-0.1.0.sha256sum] = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41" +SRC_URI[unicode-width-0.1.9.sha256sum] = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" +SRC_URI[unicode-xid-0.2.2.sha256sum] = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" +SRC_URI[wasi-0.10.2+wasi-snapshot-preview1.sha256sum] = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" +SRC_URI[winapi-0.3.9.sha256sum] = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +SRC_URI[winapi-i686-pc-windows-gnu-0.4.0.sha256sum] = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +SRC_URI[winapi-x86_64-pc-windows-gnu-0.4.0.sha256sum] = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff --git a/meta/recipes-extended/rust-android-sparse/rust-android-sparse_0.6.0.bb b/meta/recipes-extended/rust-android-sparse/rust-android-sparse_0.6.0.bb new file mode 100644 index 000000000000..3cf8993fb614 --- /dev/null +++ b/meta/recipes-extended/rust-android-sparse/rust-android-sparse_0.6.0.bb @@ -0,0 +1,20 @@ +# Auto-Generated by cargo-bitbake 0.3.16 +# +inherit cargo cargo-update-recipe-crates + +# how to get android-sparse could be as easy as but default to a git checkout: +SRC_URI += "crate://crates.io/android-sparse/0.6.0" +S= "${CARGO_VENDORING_DIRECTORY}/android-sparse-${PV}" +SRC_URI[android-sparse-0.6.0.sha256sum] = "9c76c5759b0af9dea95a769ff5fe140cec5afb5fa65019817f3731b3232afe44" + +require rust-android-sparse-crates.inc + +LIC_FILES_CHKSUM = " \ + file://LICENSE;md5=0ffe68749328daf57dd85d5ca6ee981f \ +" + +SUMMARY = "An implementation of Android's sparse file format." +HOMEPAGE = "https://gitlab.com/ra_kete/android-sparse-rs" +LICENSE = "MIT" + +BBCLASSEXTEND += "native" From patchwork Tue Nov 14 21:04:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 34485 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A849EC4167D for ; Tue, 14 Nov 2023 21:04:24 +0000 (UTC) Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) by mx.groups.io with SMTP id smtpd.web11.4597.1699995862270197314 for ; Tue, 14 Nov 2023 13:04:22 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=JOMdOUbH; spf=pass (domain: linaro.org, ip: 209.85.208.178, mailfrom: dmitry.baryshkov@linaro.org) Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-2c503dbe50dso85371131fa.1 for ; Tue, 14 Nov 2023 13:04:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699995860; x=1700600660; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=lm1lj/HbJ+GPGg3O2A6WfmuawmO4eRr6jBLJ1zkFmXo=; b=JOMdOUbH/3U2qAiXuasqSoJqr36REYVzAhBZbxu0hLOEDheh6OpnQYFx9sKEAzadQm 9Vo1GS36gy6JHEXAG8Qcc32lddSGzHxovwmSAYoEfoWUz+4Nawd7NRBx9OLliehexWOG 6WP7H8GhKfC4DaVNsZoVqsizY8lgdB+49GplK//sytZ1an4EdgUSxbuNiok+watS0DzO JexkExX/jCR7xMNoOTZ96yN28HtbOLx5oncfulvOtwAbcmMrQ2jQVkcVNDCjeMuxjEBR On2HBC6WYkANcPTX2RWSvvtaelEeQu7olGYtmSWCuHQmNmXJFdVEQArE/RO3Q4HA0uc/ TnEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699995860; x=1700600660; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lm1lj/HbJ+GPGg3O2A6WfmuawmO4eRr6jBLJ1zkFmXo=; b=SNdNC4/Ted88kbn+OOT4irKzjXxExa2KnbCMKj7rJDpo/dAUOXk9jrXCAfctf2xxqC ibeLXCLeuNR+ub60XDCYSCjDQtwgCDbzOCIbOSg/+6sJ9LIYQ6la4AtX/6H4/tf9ZsdL EWjwE1HPzm7l/DKXYNYgxOZoIqoOiqTyTbW3N1LsHXlUHzkyBPAOuhGTBYwdABZthZ7Q IdvhEIKVUznec7YWP9aEw2/5alvjtfI+72p4pC8XEzLbhI+99PQ4nl+te+ptnZ0cb9QL FPehm6op6PHD85ZvrQI7qc1A+WSC7/o0MeA58Dycje8PtRMihitMfh/MG11ji6gZxvkZ ebyA== X-Gm-Message-State: AOJu0YyVAyws83t6o5ucpZKFu+ctQQAQx82d94IhA7Zh85h/qNMSoak7 Zlmx9WeEc28uDC50HB6WZN7WMN8R5mD4hvzWYTE= X-Google-Smtp-Source: AGHT+IE3u3K3mgInd7vvlEq35D5OFx9edJKJM8OE0K7c+hgxrewoGVOTWffolUC7L+j79J9PeWNuHQ== X-Received: by 2002:a05:651c:308:b0:2c5:724:fd64 with SMTP id a8-20020a05651c030800b002c50724fd64mr2508832ljp.46.1699995860388; Tue, 14 Nov 2023 13:04:20 -0800 (PST) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id a8-20020a05651c210800b002c001e57e1asm1437856ljq.73.2023.11.14.13.04.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 13:04:20 -0800 (PST) From: Dmitry Baryshkov To: openembedded-core@lists.openembedded.org Subject: [PATCH v2 2/2] image_types.bbclass: add support for sparse images Date: Wed, 15 Nov 2023 00:04:18 +0300 Message-Id: <20231114210418.1323819-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231114210418.1323819-1-dmitry.baryshkov@linaro.org> References: <20231114210418.1323819-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 14 Nov 2023 21:04:24 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/190521 Android-targeted devices support so called sparse image format. This is the raw filesystem image with dropped zero blocks. This way the image takes less space and the bootloaders and/or filesystem manipulation tools can flash it quicker (as they do not have to write useless sequences of zeroes). Add new image conversion type called 'sparse'to be able to generate filesystem images in the sparse format. Signed-off-by: Dmitry Baryshkov --- meta/classes-recipe/image_types.bbclass | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta/classes-recipe/image_types.bbclass b/meta/classes-recipe/image_types.bbclass index d615b41ed1ed..d0c9514b36a3 100644 --- a/meta/classes-recipe/image_types.bbclass +++ b/meta/classes-recipe/image_types.bbclass @@ -328,7 +328,7 @@ IMAGE_TYPES:append:x86-64 = " hddimg iso" # CONVERSION_CMD/DEPENDS. COMPRESSIONTYPES ?= "" -CONVERSIONTYPES = "gz bz2 lzma xz lz4 lzo zip 7zip zst sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum bmap u-boot vmdk vhd vhdx vdi qcow2 base64 gzsync zsync ${COMPRESSIONTYPES}" +CONVERSIONTYPES = "gz bz2 lzma xz lz4 lzo zip 7zip zst sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum bmap u-boot vmdk vhd vhdx vdi qcow2 base64 gzsync zsync sparse ${COMPRESSIONTYPES}" CONVERSION_CMD:lzma = "lzma -k -f -7 ${IMAGE_NAME}.${type}" CONVERSION_CMD:gz = "gzip -f -9 -n -c --rsyncable ${IMAGE_NAME}.${type} > ${IMAGE_NAME}.${type}.gz" CONVERSION_CMD:bz2 = "pbzip2 -f -k ${IMAGE_NAME}.${type}" @@ -355,6 +355,7 @@ CONVERSION_CMD:qcow2 = "qemu-img convert -O qcow2 ${IMAGE_NAME}.${type} ${IMAGE_ CONVERSION_CMD:base64 = "base64 ${IMAGE_NAME}.${type} > ${IMAGE_NAME}.${type}.base64" CONVERSION_CMD:zsync = "zsyncmake_curl ${IMAGE_NAME}.${type}" CONVERSION_CMD:gzsync = "zsyncmake_curl -z ${IMAGE_NAME}.${type}" +CONVERSION_CMD:sparse = "img2simg -c ${IMAGE_NAME}.${type} ${IMAGE_NAME}.${type}.sparse" CONVERSION_DEPENDS_lzma = "xz-native" CONVERSION_DEPENDS_gz = "pigz-native" CONVERSION_DEPENDS_bz2 = "pbzip2-native" @@ -375,6 +376,7 @@ CONVERSION_DEPENDS_vhdx = "qemu-system-native" CONVERSION_DEPENDS_vhd = "qemu-system-native" CONVERSION_DEPENDS_zsync = "zsync-curl-native" CONVERSION_DEPENDS_gzsync = "zsync-curl-native" +CONVERSION_DEPENDS_sparse = "rust-android-sparse-native" RUNNABLE_IMAGE_TYPES ?= "ext2 ext3 ext4" RUNNABLE_MACHINE_PATTERNS ?= "qemu"