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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 09851C433F5 for ; Tue, 24 May 2022 04:31:43 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 57F458425C; Tue, 24 May 2022 06:31:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="l9eeeMn8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0BE9283AF6; Tue, 24 May 2022 06:31:27 +0200 (CEST) Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) (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 81D6D83AF6 for ; Tue, 24 May 2022 06:31:23 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bmeng.cn@gmail.com Received: by mail-pl1-x62a.google.com with SMTP id q4so14841365plr.11 for ; Mon, 23 May 2022 21:31:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=59OfBA7E9qG9DKbUsN44te0rsFRVxblVc2VKoRPZTus=; b=l9eeeMn851lqxuWVizAcw8M5RlB2cpOg7y0jt+076sXBhz0Ei6HgqNlwH3Pj2K4qA/ J5WO1zhq8NSmuDPQwNt6z4KQNQ/M5Vcwficn1GgT8J6cGJuQx/M3bPGgjysXCcyoX2Ee 4VYK/vik19TZh/z+uBVhH3htgHxk3Jvdg/OKRidQ7CoT/LYnV9K9BL37hHTrTyV95ZAr WyZACyuBd68g46cYFnuJQPgFFFZMH7yg8zHg5UlbPH43VyK8eTZjovKzKw9ZpYD2JZzt 3F4pbsXKBJLFTBv04EPbNxBmF6j8O9WYwkt21EwAI6voZktJpkDAIyi8dZqiQEph0a89 0jNA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=59OfBA7E9qG9DKbUsN44te0rsFRVxblVc2VKoRPZTus=; b=4DODTTwPt91LQbedxJWrFu7O1CHLSQlCiGpU3lpu2CLtG5QmlLWmiY4bNR3sfST4+Z c+RTJh3UuoLBJEAep+NZ0vb/XDjDDW7imcDcsP4zKCUhNhRoCS5ux0/bbTSlvXipY2hp HKkORfP+LAPZPiyoac2bT9OkgejGWmatBL99OVN9BpF85fAa+BO9A+F718ApBpLFL8La C+kIjMDclRxR+KDA5mrvc0eagEXSdpWDbY5HKkgt/ETrwWfHs89HEKIYgBsn9Jdx0D9t t506NxlwyRcqTz03crdYAugYJlt8S1Zp4Txm4ar2uwxeY4gqZGtVcrKMxdcpdiL/AZK5 Gtwg== X-Gm-Message-State: AOAM530VvLhEBjd/USeEye4SnKkv2XrHva+0m/6RhGLWANzcw3kNvn47 sE0U7k+26thvA3Iq2Rguf1U= X-Google-Smtp-Source: ABdhPJzNZSccUFrlfXhSdw/4De+y2KdnqijogczATk+KNw/fgzTCQ+xK30kNOpaBmBwE96Sjkeflmw== X-Received: by 2002:a17:902:6b03:b0:161:51d6:61b with SMTP id o3-20020a1709026b0300b0016151d6061bmr1722021plk.23.1653366681812; Mon, 23 May 2022 21:31:21 -0700 (PDT) Received: from ubuntu.. (144.168.56.201.16clouds.com. [144.168.56.201]) by smtp.gmail.com with ESMTPSA id c123-20020a621c81000000b0050dc7628202sm7938367pfc.220.2022.05.23.21.31.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 21:31:21 -0700 (PDT) From: Bin Meng To: Rick Chen , Leo Liang , U-Boot Mailing List Cc: Green Wan , Pragnesh Patel Subject: [PATCH 2/3] riscv: sifive: unleashed: Set kernel_comp_addr_r for compressed kernel Date: Tue, 24 May 2022 12:31:13 +0800 Message-Id: <20220524043114.45885-2-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220524043114.45885-1-bmeng.cn@gmail.com> References: <20220524043114.45885-1-bmeng.cn@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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.5 at phobos.denx.de X-Virus-Status: Clean Set kernel_comp_addr_r and kernel_comp_size for compressed kernel. Adjust existing addresses for ramdisk, so that kernel_comp_addr_r comes before the ramdisk image, since the decompressed kernel size is known to us. This way we can allow big ramdisk image to be loaded. Update unleashed.rst to remove the manual environment configuration for compressed kernel boot. Signed-off-by: Bin Meng --- doc/board/sifive/unleashed.rst | 2 -- include/configs/sifive-unleashed.h | 10 ++++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/board/sifive/unleashed.rst b/doc/board/sifive/unleashed.rst index c8a62068a7..ce38b701d7 100644 --- a/doc/board/sifive/unleashed.rst +++ b/doc/board/sifive/unleashed.rst @@ -216,8 +216,6 @@ Or if you want to use a compressed kernel image file such as Image.gz 1.2 MiB/s done Bytes transferred = 4809458 (4962f2 hex) - =>setenv kernel_comp_addr_r 0x90000000 - =>setenv kernel_comp_size 0x500000 By this time, correct kernel image is loaded and required environment variables are set. You can proceed to load the ramdisk and device tree from the tftp server diff --git a/include/configs/sifive-unleashed.h b/include/configs/sifive-unleashed.h index 920f3140f6..96e2eb6798 100644 --- a/include/configs/sifive-unleashed.h +++ b/include/configs/sifive-unleashed.h @@ -61,12 +61,14 @@ "fdt_high=0xffffffffffffffff\0" \ "initrd_high=0xffffffffffffffff\0" \ "kernel_addr_r=0x84000000\0" \ - "fdt_addr_r=0x88000000\0" \ - "scriptaddr=0x88100000\0" \ + "kernel_comp_addr_r=0x88000000\0" \ + "kernel_comp_size=0x4000000\0" \ + "fdt_addr_r=0x8c000000\0" \ + "scriptaddr=0x8c100000\0" \ "script_offset_f=0x1fff000\0" \ "script_size_f=0x1000\0" \ - "pxefile_addr_r=0x88200000\0" \ - "ramdisk_addr_r=0x88300000\0" \ + "pxefile_addr_r=0x8c200000\0" \ + "ramdisk_addr_r=0x8c300000\0" \ "type_guid_gpt_loader1=" TYPE_GUID_LOADER1 "\0" \ "type_guid_gpt_loader2=" TYPE_GUID_LOADER2 "\0" \ "type_guid_gpt_system=" TYPE_GUID_SYSTEM "\0" \ -- 2.34.1