From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49578C433F5 for ; Sat, 25 Sep 2021 13:03:54 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 37716610EA for ; Sat, 25 Sep 2021 13:03:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 37716610EA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AA3E48353B; Sat, 25 Sep 2021 15:03:49 +0200 (CEST) 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="SLwqkKqZ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1A53383521; Sat, 25 Sep 2021 15:03:45 +0200 (CEST) Received: from mail-ot1-x336.google.com (mail-ot1-x336.google.com [IPv6:2607:f8b0:4864:20::336]) (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 16F42834FA for ; Sat, 25 Sep 2021 15:03:40 +0200 (CEST) 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-ot1-x336.google.com with SMTP id s36-20020a05683043a400b0054d4c88353dso6231629otv.0 for ; Sat, 25 Sep 2021 06:03:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=w3V0JtmaCq2u//zrD7tB6oRRNzRQvllwDVNWUkTyGtM=; b=SLwqkKqZndh0WTBnuF3FT4GCXTwmJIPq9Xkzk4I6dBeA/0m1bp2Aludt9lJKyFo55v 8Kjb08NMcux8VnpseW5DfS2iySD1X+donToOba3T8w/Y3F7D9Ll/pN61jmB490+uKc4H Ea2PCGjrHrGkml8KNo5RTp/Yfd0Sxv+fS3IlE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=w3V0JtmaCq2u//zrD7tB6oRRNzRQvllwDVNWUkTyGtM=; b=2CSA4ThpZ+xOtMImukFJZ9+wvu8fHXvznmXWNDzT0pngo79//EMfltu8+kNUGJ+neW zmvlsLDTtLF1iyPisJ4OZUy6zK0rhVoOPjBYHkPe4jNS3/BdgVl9McF1M0Eln8X5BH6Z /RpDnAzLnSqBxk1hAP25c0RPD95QINdeeLZrsq7eNUqRdDA0N9sjoOaqN87fzG+U9+dM mWuhzvMJWN0w8aR7xSpN+Nc+inyx6Ab6rXpUT4qt/+hWfJXdiarGEc5s8TQTsqz8cVIt MW7L0TmVS8zif5KLWuIKitOw9l0u0ieF7NP0kMBwSHVVbmcpeQcRxSbknJKr0kLdc3Ff 1d1g== X-Gm-Message-State: AOAM5335xDonKpKpL0tNy5hXE8ZQwMPs1/16ONuAlSlq7dQ937yNKcFy iIsJ/YumHpBnqIZjjQmxwySvynga9f0aZg== X-Google-Smtp-Source: ABdhPJzvOwvozEF7XTUfeSYk9gmH6V/3HEXGjSPw7fIgHgRpTClO0YjQiqZXOrkA9CZTFUl7jPe3lQ== X-Received: by 2002:a05:6830:24a3:: with SMTP id v3mr8924750ots.74.1632575018153; Sat, 25 Sep 2021 06:03:38 -0700 (PDT) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id f61sm2770018otf.73.2021.09.25.06.03.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Sep 2021 06:03:37 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Heinrich Schuchardt , Alexandru Gagniuc , Bin Meng , Tom Rini , Simon Glass , Joe Hershberger , Marek Vasut , T Karthik Reddy Subject: [PATCH v4 00/15] image: A partial series for the image clean-up Date: Sat, 25 Sep 2021 07:03:05 -0600 Message-Id: <20210925130320.7824-1-sjg@chromium.org> X-Mailer: git-send-email 2.33.0.685.g46640cef36-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Now that the competing image clean-up has landed and the smoke has cleared, we can come back to this one. This series includes about a third of the original patches, mostly the ones that apply cleanly. It does not reduce the #idefs by as much, but it does make some small code improvements. Further patches can be pulled in once these ones have been reviewed and land. Build here: https://source.denx.de/u-boot/custodians/u-boot-dm/-/pipelines/9251 Changes in v4: - Rebase to master Changes in v3: - Pick up only the first part of the original v2 series Changes in v2: - Add a patch to introduce a memdup() function - Add new abuf_init_set() function - Update abuf_realloc() to return after every case - Use const for abuf_data() and abuf_size() - Make use of memdup() - Add abuf_init_move() - Add comments about the assumptions made by lib_test_abuf_realloc() - Add better comments about why some tests are skipped at present - Correct 'hose' typo Simon Glass (15): lib: Add memdup() Add support for an owned buffer compiler: Add a comment to host_build() zstd: Create a function for use from U-Boot btrfs: Use U-Boot API for decompression image: Avoid switch default in image_decomp() image: Update zstd to avoid reporting error twice gzip: Avoid use of u64 image: Update image_decomp() to avoid ifdefs image: Split board code out into its own file image: Fix up checkpatch warnings in image-board.c image: Split host code out into its own file image: Create a function to do manual relocation image: Avoid #ifdefs for manual relocation image: Remove ifdefs around image_setup_linux() el at common/Makefile | 2 +- common/bootm.c | 16 +- common/image-board.c | 939 +++++++++++++++++++++++++++++ common/image-host.c | 27 + common/image-sig.c | 40 +- common/image.c | 1177 +++---------------------------------- configs/sandbox_defconfig | 1 + fs/btrfs/compression.c | 51 +- include/abuf.h | 159 +++++ include/compiler.h | 8 + include/gzip.h | 8 +- include/linux/string.h | 13 + include/linux/zstd.h | 11 + include/relocate.h | 30 +- lib/Makefile | 1 + lib/abuf.c | 109 ++++ lib/gunzip.c | 28 +- lib/string.c | 13 + lib/zstd/Makefile | 2 +- lib/zstd/zstd.c | 64 ++ test/lib/Makefile | 1 + test/lib/abuf.c | 344 +++++++++++ test/lib/string.c | 32 + tools/Makefile | 1 + 24 files changed, 1887 insertions(+), 1190 deletions(-) create mode 100644 common/image-board.c create mode 100644 common/image-host.c create mode 100644 include/abuf.h create mode 100644 lib/abuf.c create mode 100644 lib/zstd/zstd.c create mode 100644 test/lib/abuf.c -- 2.33.0.685.g46640cef36-goog