From patchwork Sun Sep 17 19:26:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manoj Sai X-Patchwork-Id: 1835756 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=esVYhcVP; 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 4RpdGX13m1z1yfd for ; Mon, 18 Sep 2023 05:27:00 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D16FF86785; Sun, 17 Sep 2023 21:26:45 +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="esVYhcVP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5FE978654B; Sun, 17 Sep 2023 21:26:44 +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-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) (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 D39CD863E5 for ; Sun, 17 Sep 2023 21:26:41 +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-pl1-x631.google.com with SMTP id d9443c01a7336-1c0c6d4d650so34792475ad.0 for ; Sun, 17 Sep 2023 12:26:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1694978800; x=1695583600; 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=rwLYS4ljijtQyrK66wwZh+ZPMUA7Vw5GskhBFeBiClI=; b=esVYhcVPDKryX4EesIi8643avWyqhlDD+qbVeTwpJS6dxk0PbGDr/Jro07Q/THNWiN ZZhZVv7Yg1VkaTOWYJFLImrPVvZ10ouM0q8spFHUlXqA03a+a9rpJCKJziI2AixhXt0Q ++Czjpae0FFZ0ZlQ5a9eqAhjAhtrTd8wZ7VFQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694978800; x=1695583600; 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=rwLYS4ljijtQyrK66wwZh+ZPMUA7Vw5GskhBFeBiClI=; b=ffomuc4V56QT7Zmi1OtVKu+8mxaHiprh6EkxteIhia131wRxjju6WK2JfcrPF8/ZKq 8N5qFIUFfZfMjGNDrPAnykbz3Dxs/4oV7/k7KNfIuKJ1lT4PPIm0ou5qcUE6GJuk2WYa HSe8Lz+d8vO7IrNE+SFucw8aaOwUT1CjwkVVPfSStJ3a83Kj1jnSxWaDJ9DmzhFJZRzs +uz1uGKy5IZz0J0YlT2LTJO0Z4VSRsSFoBQsJAQGwmakN1MmpFcNzVmxqPh4+sX3yVxe Brug3OFNSmNC6489tJQa1qzsv3CLSf/KDGDnYrm6uoVCL4j0N1DItn/ERJsBWpNjx0lw ogXQ== X-Gm-Message-State: AOJu0YzaXwiUgL426pUSXaVoaVUB6ZiCg6mj1+vFDj6c6HLTKTbcy5Tx UDrgZuBSfQlhv4AHRcJRwTzMcWu8MNqIOOd2ukN9zw== X-Google-Smtp-Source: AGHT+IFSdnJBQ7qtpfbO5e0HNlUrxuT1jwtR0hCPFmuEvvirwu6WdBfKz7LuXZuvUIHK1Sggs1QDlQ== X-Received: by 2002:a17:903:124c:b0:1bd:e998:ec0a with SMTP id u12-20020a170903124c00b001bde998ec0amr9956346plh.67.1694978800026; Sun, 17 Sep 2023 12:26:40 -0700 (PDT) Received: from localhost.localdomain ([49.204.31.54]) by smtp.gmail.com with ESMTPSA id iw7-20020a170903044700b001b83e624eecsm6976991plb.81.2023.09.17.12.26.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Sep 2023 12:26:39 -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 v4 1/4] spl: fit: support for booting a GZIP-compressed U-boot binary Date: Mon, 18 Sep 2023 00:56:25 +0530 Message-Id: <20230917192628.363502-2-abbaraju.manojsai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230917192628.363502-1-abbaraju.manojsai@amarulasolutions.com> References: <20230910182448.285542-1-abbaraju.manojsai@amarulasolutions.com> <20230917192628.363502-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 Reviewed-by: Tom Rini --- Changes in v4: - None 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 17 19:26:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manoj Sai X-Patchwork-Id: 1835757 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=hDx/j2I7; 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)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RpdGg21zbz1yfd for ; Mon, 18 Sep 2023 05:27:07 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3422E8689A; Sun, 17 Sep 2023 21:26:48 +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="hDx/j2I7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A54EF86828; Sun, 17 Sep 2023 21:26:46 +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-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) (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 73E05863E5 for ; Sun, 17 Sep 2023 21:26:44 +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-pl1-x62c.google.com with SMTP id d9443c01a7336-1bf5c314a57so26730875ad.1 for ; Sun, 17 Sep 2023 12:26:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1694978803; x=1695583603; 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=cj81afFQT9PjWhuyVuCqKYUPdiMXwjg/z05RU2PO3EY=; b=hDx/j2I79gXsFizGLGbmEPusjkzAGsMGofCk0mcJEbQeEREejM4+20txOr0Gn+jAx4 78M9d7ai5IzUag40nSDLGD3TTk29eDcrWWOtjMasfecN/GRQlN6zZ2iWyjrxIqvA00ox tILknO3+8pNANTYmrH+XbrZWd2lNehENVBnTs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694978803; x=1695583603; 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=cj81afFQT9PjWhuyVuCqKYUPdiMXwjg/z05RU2PO3EY=; b=PpsN4utKEhf9c1I9h6MSRw8qZZd6voaBs1yfbdoHRoepaY/zyN2R2iSEHI/fDCOhYI 8sYbQqxlf/yeSIzrK7GUNwIfUT9xODfwb8TJVgg1e3k26R48xRtKynDiP3z9V5trXkpi D45WtWskhSBaWq2Dbehg4ZlBdfIIxaz83YAjbEWnX58jxQVBoGMm0tYAK1bq6eBDxJzm 2gG+MhRQUzTttXOHimNRky1JVWRACFVzSOxyIcVZt1mvfHWtxK7SXHX/TGOHPTiaLnLg tpJignf10CN3TsrZ8Wbvtk9nbhcINHp/cm4/j3AFdNr5IwFXoDzzIbpZ6NS9gji7BbCd +2Xg== X-Gm-Message-State: AOJu0YxRi8C7oLryxmXWsqgIOZw/L1n78c1KPPKSceY3bOjSrnad9J3N gWOPKL+GnNQYV6KTvQ3wGjB5kg== X-Google-Smtp-Source: AGHT+IGpf2uI8plE7rYWRd2rIAOnn3+kzOy9G77zeUEBfsSslCBwusmZJYPe2AtWqmdr8yNuEg2/eQ== X-Received: by 2002:a17:902:aa08:b0:1c5:6157:f068 with SMTP id be8-20020a170902aa0800b001c56157f068mr843042plb.69.1694978802743; Sun, 17 Sep 2023 12:26:42 -0700 (PDT) Received: from localhost.localdomain ([49.204.31.54]) by smtp.gmail.com with ESMTPSA id iw7-20020a170903044700b001b83e624eecsm6976991plb.81.2023.09.17.12.26.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Sep 2023 12:26:42 -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 v4 2/4] spl: fit: support for booting a LZMA-compressed U-boot binary Date: Mon, 18 Sep 2023 00:56:26 +0530 Message-Id: <20230917192628.363502-3-abbaraju.manojsai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230917192628.363502-1-abbaraju.manojsai@amarulasolutions.com> References: <20230910182448.285542-1-abbaraju.manojsai@amarulasolutions.com> <20230917192628.363502-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 Reviewed-by: Tom Rini --- Changes in v4: - None 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 17 19:26:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manoj Sai X-Patchwork-Id: 1835758 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=A9LhsPCj; 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 4RpdGs6nYCz1yhR for ; Mon, 18 Sep 2023 05:27:17 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 821DD86587; Sun, 17 Sep 2023 21:26:51 +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="A9LhsPCj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 415D5863E5; Sun, 17 Sep 2023 21:26:50 +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-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) (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 18BE586587 for ; Sun, 17 Sep 2023 21:26:48 +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-pl1-x62c.google.com with SMTP id d9443c01a7336-1c3d6d88231so30115045ad.0 for ; Sun, 17 Sep 2023 12:26:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1694978806; x=1695583606; 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=pvyMBJzPKZ0xddSXreBoBpborn/z50Nb5qwAv3hf+zc=; b=A9LhsPCjdjIR3LhNKDhN+pSTyR+Gc7aCSKO7j1I+SXxzUua4tB0/1BjeaEL5qfkOwI /Gm2WxdCkwmRcA7ojXsQJQNgXQUZTQzVnHhF9J4OCV9FXiORWJ6aJWEcjSUE8yrDtX+/ k/lMchqE6EVVa+vX8+/s1/xR8oKzcRept72w4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694978806; x=1695583606; 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=pvyMBJzPKZ0xddSXreBoBpborn/z50Nb5qwAv3hf+zc=; b=XsPKJoIhBHD4AtJjgfmchG7MJvzjFCOxjA5p4yoqMf1v8Y8m6O5YEXhUsQMNGDW3Gs CSOcQrWSqnQxIwdLau0kUhA4mipWL6xm67XS+iyh1Tpe8WnMD86JI6+VC065bK5FdJru oG+0084s3nuc3zDvcq2ipi6m9MW6e1wwLxNSV0cWjDe2lKf3kRuT1jRZxu9LShP7H3Qo iNgYXfPGTZmgQpr+7VV6uWlcnxgkqqt9y04NtfgEBHqQPleH9G2i+dVuLfoje6o8W59D KMJPdTh+0kNodVlE7FkGIeAdXSSSejDS/Pr56bThkLzhg237HDW/qcoUUuNiQZcBuM9g BEZg== X-Gm-Message-State: AOJu0YyFM6bPBmyl4/ppJin2yA95NTKjPjthdh0k2d2NH1eUHORuPbeZ bUi4Cie8KpHEgSIBfOf5v7G4dg== X-Google-Smtp-Source: AGHT+IE6XiLpvKQJO3JEhCiFquf1OUqpLAZXJvhn4JGvdoOqhWzgQ8pS9YlHkdDh1Er7wV86nmykaA== X-Received: by 2002:a17:902:e9d5:b0:1c1:f1db:e86d with SMTP id 21-20020a170902e9d500b001c1f1dbe86dmr5115475plk.7.1694978806464; Sun, 17 Sep 2023 12:26:46 -0700 (PDT) Received: from localhost.localdomain ([49.204.31.54]) by smtp.gmail.com with ESMTPSA id iw7-20020a170903044700b001b83e624eecsm6976991plb.81.2023.09.17.12.26.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Sep 2023 12:26:46 -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 v4 3/4] rockchip: Add support to generate GZIP compressed U-boot binary Date: Mon, 18 Sep 2023 00:56:27 +0530 Message-Id: <20230917192628.363502-4-abbaraju.manojsai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230917192628.363502-1-abbaraju.manojsai@amarulasolutions.com> References: <20230910182448.285542-1-abbaraju.manojsai@amarulasolutions.com> <20230917192628.363502-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 v4: - None 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 17 19:26:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manoj Sai X-Patchwork-Id: 1835759 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=gT8W0RyV; 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)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RpdH436Sxz1yfd for ; Mon, 18 Sep 2023 05:27:28 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D62E086545; Sun, 17 Sep 2023 21:26:54 +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="gT8W0RyV"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D00B78654B; Sun, 17 Sep 2023 21:26:53 +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-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) (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 B043A86758 for ; Sun, 17 Sep 2023 21:26:51 +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-pl1-x62d.google.com with SMTP id d9443c01a7336-1c43b4b02c1so12806565ad.3 for ; Sun, 17 Sep 2023 12:26:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1694978810; x=1695583610; 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=y0f2I7WwiAlncznTiAR0FCDCIMo+PQqiVyW2A56fHXI=; b=gT8W0RyVyarZFHiy68JkBA8ZrofEtajWWtsuTHdLvNVjF7wuK4n34r+ueu4C5tpHga yTAtg9O3fBz9gi9ziJn4qnof0YjNGWNoMPnydP30BQKGcqWCHEwaD5NbcWgsvSvu2Akx dJtsejvQTaip/ISo0yUaMtjKFqL+CQ2nE1IVQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694978810; x=1695583610; 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=y0f2I7WwiAlncznTiAR0FCDCIMo+PQqiVyW2A56fHXI=; b=O2USIQ9v21MWzXoUPDLsE/SuCnlpNKK35bTWfQgGOY+6QOf3UAcJen4Mkpq5siBhcu 8FBRb2DQGYh2rlEG9bsIe5zMXiXM/5+FoESF+eUl7t2zAmKr02bbFXwgR8+8yRxTyCjJ eig9X0QOT00HToNeJYfEKcuatMhK31/d+PKI84+vkUmL2E6Q+CyEk9jnReqwSM09Ti+a BS4CCbn5WDYCLX9ozjn6QV0I93Rlgju5LaBD9CDfibTBriyAGtLoeq66NjtypIbN+sE5 s0+5Us+44LOzPdHeDtU6odpgF8yfXL6Fwwlg58CRQxr1Q4BCbjv8m3fz2y/x5vg9EWGI PIxw== X-Gm-Message-State: AOJu0YyT7ppdpcTOcFqyj92v/enH59aPKAuU2Df/q8jYPghe+hJ0p2FQ j+mjGab+p42Ka0SZ4eKTqN3I0w== X-Google-Smtp-Source: AGHT+IGcC4V8TiX5EjHFedH2uWmm2APM7teevZfT1XgrryB9AWUkGHE+dyH3T00nlTd0huddISr6bw== X-Received: by 2002:a17:903:24f:b0:1c3:52ed:18f9 with SMTP id j15-20020a170903024f00b001c352ed18f9mr6560899plh.62.1694978810110; Sun, 17 Sep 2023 12:26:50 -0700 (PDT) Received: from localhost.localdomain ([49.204.31.54]) by smtp.gmail.com with ESMTPSA id iw7-20020a170903044700b001b83e624eecsm6976991plb.81.2023.09.17.12.26.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Sep 2023 12:26:49 -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 v4 4/4] rockchip: Add support to generate LZMA compressed U-boot binary Date: Mon, 18 Sep 2023 00:56:28 +0530 Message-Id: <20230917192628.363502-5-abbaraju.manojsai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230917192628.363502-1-abbaraju.manojsai@amarulasolutions.com> References: <20230910182448.285542-1-abbaraju.manojsai@amarulasolutions.com> <20230917192628.363502-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 v4: - None 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