From patchwork Sun Sep 10 18:24:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manoj Sai X-Patchwork-Id: 1832042 X-Patchwork-Delegate: ykai007@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=dLQ2HX+D; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RkJDW5HtJz1yhj for ; Mon, 11 Sep 2023 04:25:15 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3A88B86CD9; Sun, 10 Sep 2023 20:25:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com 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=amarulasolutions.com header.i=@amarulasolutions.com header.b="dLQ2HX+D"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DDE1086CD6; Sun, 10 Sep 2023 20:25:02 +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,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) (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 CF13186BFE for ; Sun, 10 Sep 2023 20:24:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=abbaraju.manojsai@amarulasolutions.com Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-68fb79ef55eso584002b3a.0 for ; Sun, 10 Sep 2023 11:24:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1694370298; x=1694975098; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8NFcFUftAGw4mATUlBHPwydw3iQqOBubNHFK1k/szH4=; b=dLQ2HX+DeEaI4jqlGuPAN1yE0E/LY+/jaQVLHIEBbj64mC2TI5Njr7PTB6ShZS7dJJ DrQL+K6qcy3cJWKVMiaHkiDo2yw5nEPDzd/wOYC8J2GM/hgrdrM4ldwhsfi8zxme8d+v sVLlrm9qOUNWHY0qpKN7IeAEhz8F3ofmKklm0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694370298; x=1694975098; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8NFcFUftAGw4mATUlBHPwydw3iQqOBubNHFK1k/szH4=; b=CDV833wkbY6suTQUd/dfzcPm3ekMDhCm3wJGx/8uoCj0ugX0/kwtEj4xw4+u2bXuYr 1Ot/+K5d5t0GO33f78QQL3qYt5bFOfwMuFTLcpwV1RXr4k2sgT8zZ+W8dgrdLFTjbYg8 EhF2cnukBAxZqyZiAcuoBLLQgqmte/Lyhbd32lKd561pbV3GdUg41Ly3Ah8gXQIFEOes lQAVLIH1Be44dWG4k203kWdNqhmfKi5+j6xGZS3GRcuidzN8vVSGqst0bMtLrhvZmAii DSs7bChy73zxcnmillw92yJapNuy45vR2ug9KFO4F6pFSGGbTAc6p2IDcucaCyUIvDpb w8cw== X-Gm-Message-State: AOJu0YzYQMLWVz9rr9vu3BAietW9aYxngc2cNx9I/tnypk1YFAwl6nrK yjdXZMe3261ezi/mqu5nBK2uIQ== X-Google-Smtp-Source: AGHT+IHgw9Gc37mXpaXwmlo3ct/JTbROj/8rUhbnxKG3QjBawdbpeNhsIeHlpf2swB8TZlaCXOAAuw== X-Received: by 2002:a05:6a00:2384:b0:68b:fcb9:74f9 with SMTP id f4-20020a056a00238400b0068bfcb974f9mr10159053pfc.33.1694370297987; Sun, 10 Sep 2023 11:24:57 -0700 (PDT) Received: from localhost.localdomain ([49.204.31.103]) by smtp.gmail.com with ESMTPSA id a5-20020a655c85000000b0055b61cd99a1sm3720593pgt.81.2023.09.10.11.24.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Sep 2023 11:24:57 -0700 (PDT) From: Manoj Sai To: Simon Glass , Philipp Tomsich , Kever Yang , u-boot@lists.denx.de Cc: dsx724 , Jagan Teki , Suniel Mahesh , Manoj Sai Subject: [PATCH v3 1/4] spl: fit: support for booting a GZIP-compressed U-boot binary Date: Sun, 10 Sep 2023 23:54:45 +0530 Message-Id: <20230910182448.285542-2-abbaraju.manojsai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230910182448.285542-1-abbaraju.manojsai@amarulasolutions.com> References: <20230725035101.281325-1-abbaraju.manojsai@amarulasolutions.com> <20230910182448.285542-1-abbaraju.manojsai@amarulasolutions.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean If GZIP Compression support is enabled, GZIP compressed U-Boot binary will be at a specified RAM location which is defined at CONFIG_SYS_LOAD_ADDR and will be assign it as the source address. gunzip function in spl_load_fit_image ,will decompress the GZIP compressed U-Boot binary which is placed at source address(CONFIG_SYS_LOAD_ADDR) to the default CONFIG_SYS_TEXT_BASE location. spl_load_fit_image function will load the decompressed U-Boot binary, which is placed at the CONFIG_SYS_TEXT_BASE location. Signed-off-by: Manoj Sai Signed-off-by: Suniel Mahesh Reviewed-by: Kever Yang Reviewed-by: Simon Glass --- Changes in v3: - Replaced spl_decompression_enabled() function instead of checking IS_ENABLED(CONFIG_SPL_GZIP). - Removed checking IS_ENABLED(CONFIG_SPL_LZMA) in spl_decompression_enabled() function. Changes in v2: - New patch for v2 common/spl/spl_fit.c | 9 ++++++--- include/spl.h | 10 ++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index 730639f756..eb97259f57 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -239,14 +239,14 @@ static int spl_load_fit_image(struct spl_load_info *info, ulong sector, bool external_data = false; if (IS_ENABLED(CONFIG_SPL_FPGA) || - (IS_ENABLED(CONFIG_SPL_OS_BOOT) && IS_ENABLED(CONFIG_SPL_GZIP))) { + (IS_ENABLED(CONFIG_SPL_OS_BOOT) && spl_decompression_enabled())) { if (fit_image_get_type(fit, node, &type)) puts("Cannot get image type.\n"); else debug("%s ", genimg_get_type_name(type)); } - if (IS_ENABLED(CONFIG_SPL_GZIP)) { + if (spl_decompression_enabled()) { fit_image_get_comp(fit, node, &image_comp); debug("%s ", genimg_get_comp_name(image_comp)); } @@ -281,7 +281,10 @@ static int spl_load_fit_image(struct spl_load_info *info, ulong sector, return 0; } - src_ptr = map_sysmem(ALIGN(load_addr, ARCH_DMA_MINALIGN), len); + if (spl_decompression_enabled() && image_comp == IH_COMP_GZIP) + src_ptr = map_sysmem(ALIGN(CONFIG_SYS_LOAD_ADDR, ARCH_DMA_MINALIGN), len); + else + src_ptr = map_sysmem(ALIGN(load_addr, ARCH_DMA_MINALIGN), len); length = len; overhead = get_aligned_image_overhead(info, offset); diff --git a/include/spl.h b/include/spl.h index 93e906431e..3a7e448cc7 100644 --- a/include/spl.h +++ b/include/spl.h @@ -897,4 +897,14 @@ struct legacy_img_hdr *spl_get_load_buffer(ssize_t offset, size_t size); void board_boot_order(u32 *spl_boot_list); void spl_save_restore_data(void); + +/* + * spl_decompression_enabled() - check decompression support is enabled for SPL build + * + * Returns true if decompression support is enabled, else False + */ +static inline bool spl_decompression_enabled(void) +{ + return IS_ENABLED(CONFIG_SPL_GZIP); +} #endif From patchwork Sun Sep 10 18:24:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manoj Sai X-Patchwork-Id: 1832043 X-Patchwork-Delegate: ykai007@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=cXkOKsde; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RkJDj5JK9z1ygM for ; Mon, 11 Sep 2023 04:25:25 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8A93986CD6; Sun, 10 Sep 2023 20:25:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com 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=amarulasolutions.com header.i=@amarulasolutions.com header.b="cXkOKsde"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3614686CEF; Sun, 10 Sep 2023 20:25:06 +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,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) (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 5524486BFE for ; Sun, 10 Sep 2023 20:25:03 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=abbaraju.manojsai@amarulasolutions.com Received: by mail-pg1-x534.google.com with SMTP id 41be03b00d2f7-565334377d0so3170337a12.2 for ; Sun, 10 Sep 2023 11:25:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1694370301; x=1694975101; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PTY2PKPjWjmmj46UtEpcqBPEeIUke5rhsaY+AjwO/nY=; b=cXkOKsdetfpxf4qxOD1uNlja8lIUuzH461qwXIINrcYLll3d1RVtX4Z0sl0xzdMQah gt+KQOzzXI7B2xHeSeOxNFAo4QXJaPGf/+iK2/YAG4QMe0gUraEOC3W1HFpizCb7yCc5 Jr6cC4YqDS84QCF5juw3aUpE8Eb57W5QubVys= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694370301; x=1694975101; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PTY2PKPjWjmmj46UtEpcqBPEeIUke5rhsaY+AjwO/nY=; b=ZNwhGaT3gDYu4lBgs+1UE4yAeQeR2gbhJAwpx0cZE7pSFifCwCZFUSvShSQWbI4BA4 Uf4kiMC9j1yK2PV0UNlPS8yeMFSrJ/7vP2fEb22k2zjvfiMgYXsuqrhdaAbxGBPiDtMJ Y6cfgtF0oe8QyIuieqwHIzwRo/G+HnvlmtVK5mI0oBEYwbQqG239wKsG0G2yI0hK8KVf ZJNf+ba+mATf5Az2PuUnFT2FNqV6FCB0bGKBR6aFNeQ776eBzF9tpwrOQF4XUwv/aP1G NrBZiYedyntsicbk+rXMo9UvNpXnANt0PeP5VjkjCC+hZFlkW6ZqekKFSJeOU6MOMYso 5NSg== X-Gm-Message-State: AOJu0YwymqywRErDhC4iEjyIgbBEtuquuqQm8OB9JqkwELkLshI3hGbD ux33k6HI8p9ofpbjCOhrikyDjA== X-Google-Smtp-Source: AGHT+IE4tgtyfs/n4XbM8r5QoWx181nAzNRpDKg1Vh+SlaT33EGG5prl6BMBb9ukhfAggf37KrOKpQ== X-Received: by 2002:a05:6a21:4982:b0:14b:ee48:85b4 with SMTP id ax2-20020a056a21498200b0014bee4885b4mr8112064pzc.60.1694370301517; Sun, 10 Sep 2023 11:25:01 -0700 (PDT) Received: from localhost.localdomain ([49.204.31.103]) by smtp.gmail.com with ESMTPSA id a5-20020a655c85000000b0055b61cd99a1sm3720593pgt.81.2023.09.10.11.24.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Sep 2023 11:25:01 -0700 (PDT) From: Manoj Sai To: Simon Glass , Philipp Tomsich , Kever Yang , u-boot@lists.denx.de Cc: dsx724 , Jagan Teki , Suniel Mahesh , Manoj Sai Subject: [PATCH v3 2/4] spl: fit: support for booting a LZMA-compressed U-boot binary Date: Sun, 10 Sep 2023 23:54:46 +0530 Message-Id: <20230910182448.285542-3-abbaraju.manojsai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230910182448.285542-1-abbaraju.manojsai@amarulasolutions.com> References: <20230725035101.281325-1-abbaraju.manojsai@amarulasolutions.com> <20230910182448.285542-1-abbaraju.manojsai@amarulasolutions.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean If LZMA Compression support is enabled, LZMA compressed U-Boot binary will be placed at a specified RAM location which is defined at CONFIG_SYS_LOAD_ADDR and will be assigned as the source address. image_decomp() function, will decompress the LZMA compressed U-Boot binary which is placed at source address(CONFIG_SYS_LOAD_ADDR) to the default CONFIG_SYS_TEXT_BASE location. spl_load_fit_image function will load the decompressed U-Boot binary, which is placed at the CONFIG_SYS_TEXT_BASE location. Signed-off-by: Manoj Sai Signed-off-by: Suniel Mahesh Reviewed-by: Simon Glass Reviewed-by: Kever Yang --- Changes in v3: - added IS_ENABLED(CONFIG_SPL_LZMA) to spl_decompression_enabled() function. - Removed extra parentheses. Changes in v2: - New patch for v2 common/spl/spl_fit.c | 13 ++++++++++++- include/spl.h | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index eb97259f57..75895ef15c 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -281,7 +281,8 @@ static int spl_load_fit_image(struct spl_load_info *info, ulong sector, return 0; } - if (spl_decompression_enabled() && image_comp == IH_COMP_GZIP) + if (spl_decompression_enabled() && + (image_comp == IH_COMP_GZIP || image_comp == IH_COMP_LZMA)) src_ptr = map_sysmem(ALIGN(CONFIG_SYS_LOAD_ADDR, ARCH_DMA_MINALIGN), len); else src_ptr = map_sysmem(ALIGN(load_addr, ARCH_DMA_MINALIGN), len); @@ -329,6 +330,16 @@ static int spl_load_fit_image(struct spl_load_info *info, ulong sector, return -EIO; } length = size; + } else if (IS_ENABLED(CONFIG_SPL_LZMA) && image_comp == IH_COMP_LZMA) { + size = CONFIG_SYS_BOOTM_LEN; + ulong loadEnd; + + if (image_decomp(IH_COMP_LZMA, CONFIG_SYS_LOAD_ADDR, 0, 0, + load_ptr, src, length, size, &loadEnd)) { + puts("Uncompressing error\n"); + return -EIO; + } + length = loadEnd - CONFIG_SYS_LOAD_ADDR; } else { memcpy(load_ptr, src, length); } diff --git a/include/spl.h b/include/spl.h index 3a7e448cc7..9de93a34cd 100644 --- a/include/spl.h +++ b/include/spl.h @@ -905,6 +905,6 @@ void spl_save_restore_data(void); */ static inline bool spl_decompression_enabled(void) { - return IS_ENABLED(CONFIG_SPL_GZIP); + return IS_ENABLED(CONFIG_SPL_GZIP) || IS_ENABLED(CONFIG_SPL_LZMA); } #endif From patchwork Sun Sep 10 18:24:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manoj Sai X-Patchwork-Id: 1832044 X-Patchwork-Delegate: ykai007@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=Fx38bjZm; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RkJDw38K1z1ygM for ; Mon, 11 Sep 2023 04:25:36 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DCF4F86CD7; Sun, 10 Sep 2023 20:25:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com 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=amarulasolutions.com header.i=@amarulasolutions.com header.b="Fx38bjZm"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 39F5586BFF; Sun, 10 Sep 2023 20:25:09 +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,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-oi1-x22b.google.com (mail-oi1-x22b.google.com [IPv6:2607:f8b0:4864:20::22b]) (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 DCBEA86CEE for ; Sun, 10 Sep 2023 20:25:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=abbaraju.manojsai@amarulasolutions.com Received: by mail-oi1-x22b.google.com with SMTP id 5614622812f47-3aa1446066aso2666295b6e.1 for ; Sun, 10 Sep 2023 11:25:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1694370304; x=1694975104; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YludUDClnB7NiU9lKL4p9hbZieK2S4U9NN5JPvjKYso=; b=Fx38bjZmbjjl4n+2WH8/p3RAM0s1M6PHH2Vq0zO1nDrl4MfsrMM9wQD4jm+5bHyj+z hD+JT64ACLXZ80X2PCn0GrlDWMjM8TnoY1BWJJHAqjZRglE42eLlulT4vJhzO7S4zmYm sqV5+bp3t+CToXNfR+5kWm2FEB0PTIo6WIvlQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694370304; x=1694975104; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YludUDClnB7NiU9lKL4p9hbZieK2S4U9NN5JPvjKYso=; b=kQNZSflD7WVbI4uZj2osQ6/ViXz6ZQXXppVdY/dUdIbp86H7CGi3cIyJM/oWwPxXed p7uSCOXzPUOoOvN1M5XuBs3MSYnN91o4pHG5zPh2GYALYeF+lNSAQvT5AHyO/dUDysEn i5KzKpM56vGOyFJIgkH+2urtMOz+aXWWZJmbJTjfXJVUOCRUGoluUdpsdbsXgbnUKq82 4MspfvsuQyrEbiX32szatYr3vCsnuTAZQ4u9L0uk6A3XHRN5o2WiWnUb9zSBHN3rFXWw TuAS2WnH+KMr7g6fWtW+cOUt0rDsIoIYtZQP2lDO5Gzxl3Tee5zYtm65YgGjAbuhF3zZ t4xA== X-Gm-Message-State: AOJu0Yx0DY8ccHRsw4nF7gNv+k/Vi2SNCSVOuLd4Q6vmbDgamVWyWVyb UEm4KtKqGK6YWjC2jYa0B7mt4A== X-Google-Smtp-Source: AGHT+IHJdGbppb/Ek/HZQ+ulSPdkw9SRQ7dMmHcVpUBGTvGmueraeaoQTou+bbkPFik5LN8CiNYypA== X-Received: by 2002:a05:6808:144c:b0:3a1:f237:ec62 with SMTP id x12-20020a056808144c00b003a1f237ec62mr11892553oiv.48.1694370304660; Sun, 10 Sep 2023 11:25:04 -0700 (PDT) Received: from localhost.localdomain ([49.204.31.103]) by smtp.gmail.com with ESMTPSA id a5-20020a655c85000000b0055b61cd99a1sm3720593pgt.81.2023.09.10.11.25.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Sep 2023 11:25:04 -0700 (PDT) From: Manoj Sai To: Simon Glass , Philipp Tomsich , Kever Yang , u-boot@lists.denx.de Cc: dsx724 , Jagan Teki , Suniel Mahesh , Manoj Sai Subject: [PATCH v3 3/4] rockchip: Add support to generate GZIP compressed U-boot binary Date: Sun, 10 Sep 2023 23:54:47 +0530 Message-Id: <20230910182448.285542-4-abbaraju.manojsai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230910182448.285542-1-abbaraju.manojsai@amarulasolutions.com> References: <20230725035101.281325-1-abbaraju.manojsai@amarulasolutions.com> <20230910182448.285542-1-abbaraju.manojsai@amarulasolutions.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean Add support for generating a GZIP-compressed U-boot binary with the help of binman, if CONFIG_SPL_GZIP is selected. Signed-off-by: Manoj Sai Reviewed-by: Simon Glass Reviewed-by: Kever Yang --- Changes in v3: - None Changes in v2: - New patch for v2 arch/arm/dts/rockchip-u-boot.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/dts/rockchip-u-boot.dtsi b/arch/arm/dts/rockchip-u-boot.dtsi index be2658e8ef..8f248f941f 100644 --- a/arch/arm/dts/rockchip-u-boot.dtsi +++ b/arch/arm/dts/rockchip-u-boot.dtsi @@ -56,10 +56,17 @@ #else arch = "arm"; #endif +#if defined(CONFIG_SPL_GZIP) + compression = "gzip"; +#else compression = "none"; +#endif load = ; entry = ; u-boot-nodtb { +#if defined(CONFIG_SPL_GZIP) + compress = "gzip"; +#endif }; #ifdef CONFIG_SPL_FIT_SIGNATURE hash { From patchwork Sun Sep 10 18:24:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manoj Sai X-Patchwork-Id: 1832045 X-Patchwork-Delegate: ykai007@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=Az6jTFaD; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RkJF814w3z1ygM for ; Mon, 11 Sep 2023 04:25:48 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 33FC486CEB; Sun, 10 Sep 2023 20:25:13 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com 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=amarulasolutions.com header.i=@amarulasolutions.com header.b="Az6jTFaD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7547B86CEB; Sun, 10 Sep 2023 20:25:11 +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,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-oi1-x22b.google.com (mail-oi1-x22b.google.com [IPv6:2607:f8b0:4864:20::22b]) (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 B07FE86CF3 for ; Sun, 10 Sep 2023 20:25:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=abbaraju.manojsai@amarulasolutions.com Received: by mail-oi1-x22b.google.com with SMTP id 5614622812f47-3a9f87adfe1so2971831b6e.1 for ; Sun, 10 Sep 2023 11:25:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1694370307; x=1694975107; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UMKD00v3SvGytGxeXJ+8xcW77YWBFMkm0BWwKHOWhe4=; b=Az6jTFaDMbmav8KjX7+jCbmn6wNiyuDRa+ZuEnokIZtFjBDIj0RABfFBVRfkIShzCv o8DBmzFAjL/Ye4Hb910QdC/aVXUx5PopIUQckLiQJ2zjpmFDpIhobjZRB3b2XGWveX6C nX4nWbCKKE89P9ndvReCNSqVglYHIqYz8ntyg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694370307; x=1694975107; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UMKD00v3SvGytGxeXJ+8xcW77YWBFMkm0BWwKHOWhe4=; b=bXb5qkNQzEATL4eSO7wEXzStkxMqkBH8IwIw4dtBdHnM/Ra+bBghXZqiT7kBp8HIkT s7QZbZkyH3yZUK+IwIWaRPEhKvm+LsFbbX5BsFwrtJ4VvtiiFIvS8qTWWbacZfi4xuJB b8iRQb8ZbDHHfpo5ZHAWnGF+bDDOiwekBDeuOe/5XFN7kAvm13Fl4uoxr9FrRctAbsO3 AYXYvstfcheoY5fP2+Zc474SfeAkxFF6AMhsZHwiQhoThJEQ6VFUYrChN6nrmNAUxJqb qBtQzhXcldvuFFfaGAce1BkcoEbZi650yX2kTQfMjAbEel6EiZ5SdXhKUD/xYbWw1Ctl WgPw== X-Gm-Message-State: AOJu0YwMo+gdaelLS1VTr77FYUWE2pNWjchPFwG6u1+UhVzXsCdAygR6 aM5VQ5CTZBC4WPXOZ3hkRmRxcA== X-Google-Smtp-Source: AGHT+IFaUFWGRVvPgLoYI467zmT7YzJ6DEYHI9OwTXsLO44ZxzBTFyaCFvzFoLIVu7MzwkemSfrhsw== X-Received: by 2002:a05:6870:5a3:b0:1d5:1a99:538f with SMTP id m35-20020a05687005a300b001d51a99538fmr10474658oap.15.1694370307417; Sun, 10 Sep 2023 11:25:07 -0700 (PDT) Received: from localhost.localdomain ([49.204.31.103]) by smtp.gmail.com with ESMTPSA id a5-20020a655c85000000b0055b61cd99a1sm3720593pgt.81.2023.09.10.11.25.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Sep 2023 11:25:07 -0700 (PDT) From: Manoj Sai To: Simon Glass , Philipp Tomsich , Kever Yang , u-boot@lists.denx.de Cc: dsx724 , Jagan Teki , Suniel Mahesh , Manoj Sai Subject: [PATCH v3 4/4] rockchip: Add support to generate LZMA compressed U-boot binary Date: Sun, 10 Sep 2023 23:54:48 +0530 Message-Id: <20230910182448.285542-5-abbaraju.manojsai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230910182448.285542-1-abbaraju.manojsai@amarulasolutions.com> References: <20230725035101.281325-1-abbaraju.manojsai@amarulasolutions.com> <20230910182448.285542-1-abbaraju.manojsai@amarulasolutions.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean Add support for generating a LZMA-compressed U-boot binary with the help of binman, if CONFIG_SPL_LZMA is selected. Signed-off-by: Manoj Sai Reviewed-by: Simon Glass Reviewed-by: Kever Yang --- Changes in v3: - None Changes in v2: - New patch for v2 arch/arm/dts/rockchip-u-boot.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/dts/rockchip-u-boot.dtsi b/arch/arm/dts/rockchip-u-boot.dtsi index 8f248f941f..c8c928c7e5 100644 --- a/arch/arm/dts/rockchip-u-boot.dtsi +++ b/arch/arm/dts/rockchip-u-boot.dtsi @@ -58,6 +58,8 @@ #endif #if defined(CONFIG_SPL_GZIP) compression = "gzip"; +#elif defined(CONFIG_SPL_LZMA) + compression = "lzma"; #else compression = "none"; #endif @@ -66,6 +68,8 @@ u-boot-nodtb { #if defined(CONFIG_SPL_GZIP) compress = "gzip"; +#elif defined(CONFIG_SPL_LZMA) + compress = "lzma"; #endif }; #ifdef CONFIG_SPL_FIT_SIGNATURE