From 99f3204130b5d9f77717f67c1fa08e9e06f003e5 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sat, 19 Aug 2023 14:33:37 +0100 Subject: [PATCH] Raspberry Pi standard boot --- rpi-Convert-to-standard-boot.patch | 892 +++++++++++++++++++++++++++++ uboot-tools.spec | 6 +- 2 files changed, 897 insertions(+), 1 deletion(-) create mode 100644 rpi-Convert-to-standard-boot.patch diff --git a/rpi-Convert-to-standard-boot.patch b/rpi-Convert-to-standard-boot.patch new file mode 100644 index 0000000..de02728 --- /dev/null +++ b/rpi-Convert-to-standard-boot.patch @@ -0,0 +1,892 @@ +From patchwork Thu Jul 27 21:54:28 2023 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: Simon Glass +X-Patchwork-Id: 1813968 +X-Patchwork-Delegate: pbrobinson@gmail.com +Return-Path: +X-Original-To: incoming@patchwork.ozlabs.org +Delivered-To: patchwork-incoming@legolas.ozlabs.org +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=) +Authentication-Results: legolas.ozlabs.org; + dkim=pass (1024-bit key; + unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 + header.s=google header.b=N1JBl/Ip; + dkim-atps=neutral +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 (P-384)) + (No client certificate requested) + by legolas.ozlabs.org (Postfix) with ESMTPS id 4RBl1V3MSFz1yZb + for ; Fri, 28 Jul 2023 07:55:10 +1000 (AEST) +Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) + by phobos.denx.de (Postfix) with ESMTP id 29D6686883; + Thu, 27 Jul 2023 23:54:50 +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="N1JBl/Ip"; + dkim-atps=neutral +Received: by phobos.denx.de (Postfix, from userid 109) + id BFC74863EE; Thu, 27 Jul 2023 23:54: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,DKIMWL_WL_HIGH, + DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, + SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no + version=3.4.2 +Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com + [IPv6:2607:f8b0:4864:20::12d]) + (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 A9CE3867A8 + for ; Thu, 27 Jul 2023 23:54:41 +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-il1-x12d.google.com with SMTP id + e9e14a558f8ab-3466725f0beso6233385ab.1 + for ; Thu, 27 Jul 2023 14:54:41 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=chromium.org; s=google; t=1690494880; x=1691099680; + 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=PfW4qtLSfZ+bnC9lQwrjMDVmboUSfVp8v4ohkW8rjNg=; + b=N1JBl/IpuUO0bR2jxCF4K6S6GW+xv1r7HlydRFhGC+Y0jR6zVXjPOQITlZBrwEARlk + THRvjpw5qRIedk0NNo/pQCKKQqruScbjKPYX1OBI4dK8j/HkC/GExnZkrzqJlvtCNqRi + vd32bzFnA0G7Sw/tWm/fMJuxGDvemFLzoLQgg= +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20221208; t=1690494880; x=1691099680; + 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=PfW4qtLSfZ+bnC9lQwrjMDVmboUSfVp8v4ohkW8rjNg=; + b=htLAMKMTT/T5aB5rrz1DwCj312u/yXPKNVhy1hUQl0xUxGmuV261y4snpFJIp92LWY + bPTp84aFfLtyyJhH6BRikYrtWYDX1XpPE35ADFLtlQMM5GIU9q0hkifkPd7abPqf9CjN + 34tE1/jfbEQ9DVjGSSH+XObnLtGLjO2UX0/c9ws1veWcDD9e9lre0Tr0FdMyy+r4RdCC + V39BVGSWBW9Mr3+y6MVHLCblg21I+/bjRp2nviWmZbeJhx4cKepnzFGfm5KjWnIujj0D + Y86K9+ZBDN2NRnIyfK6oPrQqLMSObWKrzxurO93MsbUXmBc8FJqZwyN2XUixqo8t6Kso + pNvg== +X-Gm-Message-State: ABy/qLb0K45Zq6AUJT2FpWarTb3YBaFoeytG1lXRxYdhcArX6FKSUhG7 + DkuKoL8etDw0hNEDFIyMz2KF4qEO37wmml3Qc3M= +X-Google-Smtp-Source: + APBJJlG54VUHOmyZVhkSmMpIiz5S/hblBzg2zwJFl+9fxJRZJWQN2zHspMrpRxc36G3YPyvYcXHJ4A== +X-Received: by 2002:a05:6e02:1ba5:b0:347:6f47:bb2 with SMTP id + n5-20020a056e021ba500b003476f470bb2mr889940ili.19.1690494880268; + Thu, 27 Jul 2023 14:54:40 -0700 (PDT) +Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) + by smtp.gmail.com with ESMTPSA id + n28-20020a02cc1c000000b00430245071ddsm679215jap.176.2023.07.27.14.54.39 + (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); + Thu, 27 Jul 2023 14:54:40 -0700 (PDT) +From: Simon Glass +To: U-Boot Mailing List +Cc: Tom Rini , Peter Robinson , + Simon Glass , Albert Aribaud , + Matthias Brugger , Stephen Warren , + Stephen Warren +Subject: [RESEND PATCH v3 1/3] arm: rpi: Switch to standard boot +Date: Thu, 27 Jul 2023 15:54:28 -0600 +Message-ID: <20230727215433.578830-2-sjg@chromium.org> +X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog +In-Reply-To: <20230727215433.578830-1-sjg@chromium.org> +References: <20230727215433.578830-1-sjg@chromium.org> +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 + +Drop use of the distro scripts and use standard boot instead. + +We don't need to specify the mmc devices individually, since they are +used in order from 0 to 2, and standard boot uses that order anyway. + +Signed-off-by: Simon Glass +--- + +Changes in v3: +- Rebase to -master + +Changes in v2: +- Rebase to -next + + configs/rpi_0_w_defconfig | 1 + + configs/rpi_2_defconfig | 1 + + configs/rpi_3_32b_defconfig | 1 + + configs/rpi_3_b_plus_defconfig | 1 + + configs/rpi_3_defconfig | 1 + + configs/rpi_4_32b_defconfig | 1 + + configs/rpi_4_defconfig | 1 + + configs/rpi_arm64_defconfig | 1 + + configs/rpi_defconfig | 1 + + include/configs/rpi.h | 38 ++-------------------------------- + 10 files changed, 11 insertions(+), 36 deletions(-) + +diff --git a/configs/rpi_0_w_defconfig b/configs/rpi_0_w_defconfig +index 5da334a8bcf9..7554e671e2ca 100644 +--- a/configs/rpi_0_w_defconfig ++++ b/configs/rpi_0_w_defconfig +@@ -12,6 +12,7 @@ CONFIG_DEFAULT_DEVICE_TREE="bcm2835-rpi-zero-w" + CONFIG_SYS_PROMPT="U-Boot> " + CONFIG_OF_LIBFDT_OVERLAY=y + CONFIG_SYS_LOAD_ADDR=0x1000000 ++CONFIG_BOOTSTD_DEFAULTS=y + CONFIG_OF_BOARD_SETUP=y + CONFIG_DISTRO_DEFAULTS=y + CONFIG_USE_PREBOOT=y +diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig +index 990862160712..653f78bec1e8 100644 +--- a/configs/rpi_2_defconfig ++++ b/configs/rpi_2_defconfig +@@ -13,6 +13,7 @@ CONFIG_DEFAULT_DEVICE_TREE="bcm2836-rpi-2-b" + CONFIG_SYS_PROMPT="U-Boot> " + CONFIG_OF_LIBFDT_OVERLAY=y + CONFIG_SYS_LOAD_ADDR=0x1000000 ++CONFIG_BOOTSTD_DEFAULTS=y + CONFIG_OF_BOARD_SETUP=y + CONFIG_DISTRO_DEFAULTS=y + CONFIG_USE_PREBOOT=y +diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig +index 80885aa9488d..305f1dacfd46 100644 +--- a/configs/rpi_3_32b_defconfig ++++ b/configs/rpi_3_32b_defconfig +@@ -12,6 +12,7 @@ CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b" + CONFIG_SYS_PROMPT="U-Boot> " + CONFIG_OF_LIBFDT_OVERLAY=y + CONFIG_SYS_LOAD_ADDR=0x1000000 ++CONFIG_BOOTSTD_DEFAULTS=y + CONFIG_OF_BOARD_SETUP=y + CONFIG_DISTRO_DEFAULTS=y + CONFIG_USE_PREBOOT=y +diff --git a/configs/rpi_3_b_plus_defconfig b/configs/rpi_3_b_plus_defconfig +index 0acce8b883f8..f36f1258aa6d 100644 +--- a/configs/rpi_3_b_plus_defconfig ++++ b/configs/rpi_3_b_plus_defconfig +@@ -11,6 +11,7 @@ CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b-plus" + CONFIG_SYS_PROMPT="U-Boot> " + CONFIG_OF_LIBFDT_OVERLAY=y + CONFIG_SYS_LOAD_ADDR=0x1000000 ++CONFIG_BOOTSTD_DEFAULTS=y + CONFIG_OF_BOARD_SETUP=y + CONFIG_DISTRO_DEFAULTS=y + CONFIG_USE_PREBOOT=y +diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig +index bb6fe128061b..a0d8be42537f 100644 +--- a/configs/rpi_3_defconfig ++++ b/configs/rpi_3_defconfig +@@ -11,6 +11,7 @@ CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b" + CONFIG_SYS_PROMPT="U-Boot> " + CONFIG_OF_LIBFDT_OVERLAY=y + CONFIG_SYS_LOAD_ADDR=0x1000000 ++CONFIG_BOOTSTD_DEFAULTS=y + CONFIG_OF_BOARD_SETUP=y + CONFIG_DISTRO_DEFAULTS=y + CONFIG_USE_PREBOOT=y +diff --git a/configs/rpi_4_32b_defconfig b/configs/rpi_4_32b_defconfig +index f6213340971e..71f61c52e52d 100644 +--- a/configs/rpi_4_32b_defconfig ++++ b/configs/rpi_4_32b_defconfig +@@ -10,6 +10,7 @@ CONFIG_SYS_PROMPT="U-Boot> " + CONFIG_OF_LIBFDT_OVERLAY=y + CONFIG_DM_RESET=y + CONFIG_SYS_LOAD_ADDR=0x1000000 ++CONFIG_BOOTSTD_DEFAULTS=y + CONFIG_PCI=y + CONFIG_OF_BOARD_SETUP=y + CONFIG_DISTRO_DEFAULTS=y +diff --git a/configs/rpi_4_defconfig b/configs/rpi_4_defconfig +index bbc0fd6c649a..fa2c05da21e8 100644 +--- a/configs/rpi_4_defconfig ++++ b/configs/rpi_4_defconfig +@@ -10,6 +10,7 @@ CONFIG_SYS_PROMPT="U-Boot> " + CONFIG_OF_LIBFDT_OVERLAY=y + CONFIG_DM_RESET=y + CONFIG_SYS_LOAD_ADDR=0x1000000 ++CONFIG_BOOTSTD_DEFAULTS=y + CONFIG_PCI=y + CONFIG_OF_BOARD_SETUP=y + CONFIG_DISTRO_DEFAULTS=y +diff --git a/configs/rpi_arm64_defconfig b/configs/rpi_arm64_defconfig +index 5d9a273cb920..3e64573b70b1 100644 +--- a/configs/rpi_arm64_defconfig ++++ b/configs/rpi_arm64_defconfig +@@ -10,6 +10,7 @@ CONFIG_SYS_PROMPT="U-Boot> " + CONFIG_OF_LIBFDT_OVERLAY=y + CONFIG_DM_RESET=y + CONFIG_SYS_LOAD_ADDR=0x1000000 ++CONFIG_BOOTSTD_DEFAULTS=y + CONFIG_PCI=y + CONFIG_OF_BOARD_SETUP=y + CONFIG_DISTRO_DEFAULTS=y +diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig +index 550b8dcb9587..4b8e402c89d4 100644 +--- a/configs/rpi_defconfig ++++ b/configs/rpi_defconfig +@@ -12,6 +12,7 @@ CONFIG_DEFAULT_DEVICE_TREE="bcm2835-rpi-b" + CONFIG_SYS_PROMPT="U-Boot> " + CONFIG_OF_LIBFDT_OVERLAY=y + CONFIG_SYS_LOAD_ADDR=0x1000000 ++CONFIG_BOOTSTD_DEFAULTS=y + CONFIG_OF_BOARD_SETUP=y + CONFIG_DISTRO_DEFAULTS=y + CONFIG_USE_PREBOOT=y +diff --git a/include/configs/rpi.h b/include/configs/rpi.h +index 4da982f73578..4160db2d8e14 100644 +--- a/include/configs/rpi.h ++++ b/include/configs/rpi.h +@@ -122,47 +122,13 @@ + "fdt_addr_r=0x02600000\0" \ + "ramdisk_addr_r=0x02700000\0" + +-#if IS_ENABLED(CONFIG_CMD_MMC) +- #define BOOT_TARGET_MMC(func) \ +- func(MMC, mmc, 0) \ +- func(MMC, mmc, 1) \ +- func(MMC, mmc, 2) +-#else +- #define BOOT_TARGET_MMC(func) +-#endif +- +-#if IS_ENABLED(CONFIG_CMD_USB) +- #define BOOT_TARGET_USB(func) func(USB, usb, 0) +-#else +- #define BOOT_TARGET_USB(func) +-#endif +- +-#if CONFIG_IS_ENABLED(CMD_PXE) +- #define BOOT_TARGET_PXE(func) func(PXE, pxe, na) +-#else +- #define BOOT_TARGET_PXE(func) +-#endif +- +-#if CONFIG_IS_ENABLED(CMD_DHCP) +- #define BOOT_TARGET_DHCP(func) func(DHCP, dhcp, na) +-#else +- #define BOOT_TARGET_DHCP(func) +-#endif +- +-#define BOOT_TARGET_DEVICES(func) \ +- BOOT_TARGET_MMC(func) \ +- BOOT_TARGET_USB(func) \ +- BOOT_TARGET_PXE(func) \ +- BOOT_TARGET_DHCP(func) +- +-#include ++#define BOOT_TARGETS "mmc usb pxe dhcp" + + #define CFG_EXTRA_ENV_SETTINGS \ + "dhcpuboot=usb start; dhcp u-boot.uimg; bootm\0" \ + ENV_DEVICE_SETTINGS \ + ENV_DFU_SETTINGS \ + ENV_MEM_LAYOUT_SETTINGS \ +- BOOTENV +- ++ "boot_targets=" BOOT_TARGETS "\0" + + #endif + +From patchwork Thu Jul 27 21:54:29 2023 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: Simon Glass +X-Patchwork-Id: 1813969 +X-Patchwork-Delegate: pbrobinson@gmail.com +Return-Path: +X-Original-To: incoming@patchwork.ozlabs.org +Delivered-To: patchwork-incoming@legolas.ozlabs.org +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=) +Authentication-Results: legolas.ozlabs.org; + dkim=pass (1024-bit key; + unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 + header.s=google header.b=nzf25ZVl; + dkim-atps=neutral +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 (P-384) server-digest SHA384) + (No client certificate requested) + by legolas.ozlabs.org (Postfix) with ESMTPS id 4RBl1p1S1xz1yZb + for ; Fri, 28 Jul 2023 07:55:26 +1000 (AEST) +Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) + by phobos.denx.de (Postfix) with ESMTP id CEB4186898; + Thu, 27 Jul 2023 23:55:12 +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="nzf25ZVl"; + dkim-atps=neutral +Received: by phobos.denx.de (Postfix, from userid 109) + id A550186437; Thu, 27 Jul 2023 23:54: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,DKIMWL_WL_HIGH, + DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, + SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no + version=3.4.2 +Received: from mail-io1-xd35.google.com (mail-io1-xd35.google.com + [IPv6:2607:f8b0:4864:20::d35]) + (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 848728687F + for ; Thu, 27 Jul 2023 23:54:42 +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-io1-xd35.google.com with SMTP id + ca18e2360f4ac-7906614bc90so37744039f.3 + for ; Thu, 27 Jul 2023 14:54:42 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=chromium.org; s=google; t=1690494881; x=1691099681; + 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=rvJFSxuX2uR5MvGPMP0r8JMhRHphT9SXIfCxnVxNK0U=; + b=nzf25ZVlr+TPb8i9KPe94q+xnslw0eiim8ufkD20J+REgYqV1+bfKhPYKo45AkO/Cs + 4b6fZA33NLf5U7qgGo7v+urHNiAPER6YN1bXI9hJSNAEtM13z2v621IsEFffyVMcM85C + 4AMfUiBclfET9Wn0oQnsQ5JK94HV4jlQugZzQ= +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20221208; t=1690494881; x=1691099681; + 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=rvJFSxuX2uR5MvGPMP0r8JMhRHphT9SXIfCxnVxNK0U=; + b=SWZg15tnmLFbQbK+nDA8NsoxsfTOrSK/kUZE8JUBjXnb/EfYfPfZWjBXdTlOT0hTzs + Do1oyQ0GpF9az6Cx1cJaNL+6/ndCRmpmhbQqCvSRgBsAKnQp00cgnet2sm4yVWfiF5PX + 2qaBEeb9gg636lDes6X4aWDvc+t+OzxAlyoh09leqtoNsYaZ9IaM0yoiS8fr0BiqJMrg + MSYnMIsBLMm+jhgQFf2e8ur5tdy7JpF2W9IWlzTu24aMYaDO7jzv2OPLE4yabyZoUIxZ + VGKiZBQssS0Xb/sjea7V65wIws1WhJUfrh088lrlqAdsj+ZlnkWnVhBhlZPR+tkRHWJZ + HcHw== +X-Gm-Message-State: ABy/qLaVdYCT7tOkUReGBSdg/9KznV2sYfo8iTdWbZcW3wegZxOZfpEX + rfBbszTe7MI5Zzj4HA69r3jTlgsxblkKBaKi4I0= +X-Google-Smtp-Source: + APBJJlGWO4DcArS83mKgiEVe92ZPEk/c3kJN6Gj7ZAwNVPMXoPhbtveScu/4+gTrfnrjCxTkZP9a3g== +X-Received: by 2002:a05:6602:682:b0:787:1d53:e6cc with SMTP id + dp2-20020a056602068200b007871d53e6ccmr874039iob.21.1690494881076; + Thu, 27 Jul 2023 14:54:41 -0700 (PDT) +Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) + by smtp.gmail.com with ESMTPSA id + n28-20020a02cc1c000000b00430245071ddsm679215jap.176.2023.07.27.14.54.40 + (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); + Thu, 27 Jul 2023 14:54:40 -0700 (PDT) +From: Simon Glass +To: U-Boot Mailing List +Cc: Tom Rini , Peter Robinson , + Simon Glass , Matthias Brugger , + Stephen Warren , Stephen Warren +Subject: [RESEND PATCH v3 2/3] rpi: Disable DISTRO_DEFAULTS +Date: Thu, 27 Jul 2023 15:54:29 -0600 +Message-ID: <20230727215433.578830-3-sjg@chromium.org> +X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog +In-Reply-To: <20230727215433.578830-1-sjg@chromium.org> +References: <20230727215433.578830-1-sjg@chromium.org> +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 + +Disable this option to reclaim some space, since bootstd requires less +functionality to operate (e.g. hush parser). + +Signed-off-by: Simon Glass +--- + +(no changes since v2) + +Changes in v2: +- Add new patch to disable DISTRO_DEFAULTS + + configs/rpi_0_w_defconfig | 1 - + configs/rpi_2_defconfig | 1 - + configs/rpi_3_32b_defconfig | 1 - + configs/rpi_3_b_plus_defconfig | 1 - + configs/rpi_3_defconfig | 1 - + configs/rpi_4_32b_defconfig | 1 - + configs/rpi_4_defconfig | 1 - + configs/rpi_arm64_defconfig | 1 - + configs/rpi_defconfig | 1 - + 9 files changed, 9 deletions(-) + +diff --git a/configs/rpi_0_w_defconfig b/configs/rpi_0_w_defconfig +index 7554e671e2ca..3167bfbe48f7 100644 +--- a/configs/rpi_0_w_defconfig ++++ b/configs/rpi_0_w_defconfig +@@ -14,7 +14,6 @@ CONFIG_OF_LIBFDT_OVERLAY=y + CONFIG_SYS_LOAD_ADDR=0x1000000 + CONFIG_BOOTSTD_DEFAULTS=y + CONFIG_OF_BOARD_SETUP=y +-CONFIG_DISTRO_DEFAULTS=y + CONFIG_USE_PREBOOT=y + # CONFIG_DISPLAY_CPUINFO is not set + # CONFIG_DISPLAY_BOARDINFO is not set +diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig +index 653f78bec1e8..883dab161702 100644 +--- a/configs/rpi_2_defconfig ++++ b/configs/rpi_2_defconfig +@@ -15,7 +15,6 @@ CONFIG_OF_LIBFDT_OVERLAY=y + CONFIG_SYS_LOAD_ADDR=0x1000000 + CONFIG_BOOTSTD_DEFAULTS=y + CONFIG_OF_BOARD_SETUP=y +-CONFIG_DISTRO_DEFAULTS=y + CONFIG_USE_PREBOOT=y + # CONFIG_DISPLAY_CPUINFO is not set + # CONFIG_DISPLAY_BOARDINFO is not set +diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig +index 305f1dacfd46..5ff7d987a431 100644 +--- a/configs/rpi_3_32b_defconfig ++++ b/configs/rpi_3_32b_defconfig +@@ -14,7 +14,6 @@ CONFIG_OF_LIBFDT_OVERLAY=y + CONFIG_SYS_LOAD_ADDR=0x1000000 + CONFIG_BOOTSTD_DEFAULTS=y + CONFIG_OF_BOARD_SETUP=y +-CONFIG_DISTRO_DEFAULTS=y + CONFIG_USE_PREBOOT=y + # CONFIG_DISPLAY_CPUINFO is not set + # CONFIG_DISPLAY_BOARDINFO is not set +diff --git a/configs/rpi_3_b_plus_defconfig b/configs/rpi_3_b_plus_defconfig +index f36f1258aa6d..31f2a6eb310c 100644 +--- a/configs/rpi_3_b_plus_defconfig ++++ b/configs/rpi_3_b_plus_defconfig +@@ -13,7 +13,6 @@ CONFIG_OF_LIBFDT_OVERLAY=y + CONFIG_SYS_LOAD_ADDR=0x1000000 + CONFIG_BOOTSTD_DEFAULTS=y + CONFIG_OF_BOARD_SETUP=y +-CONFIG_DISTRO_DEFAULTS=y + CONFIG_USE_PREBOOT=y + # CONFIG_DISPLAY_CPUINFO is not set + # CONFIG_DISPLAY_BOARDINFO is not set +diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig +index a0d8be42537f..fa6e1507d640 100644 +--- a/configs/rpi_3_defconfig ++++ b/configs/rpi_3_defconfig +@@ -13,7 +13,6 @@ CONFIG_OF_LIBFDT_OVERLAY=y + CONFIG_SYS_LOAD_ADDR=0x1000000 + CONFIG_BOOTSTD_DEFAULTS=y + CONFIG_OF_BOARD_SETUP=y +-CONFIG_DISTRO_DEFAULTS=y + CONFIG_USE_PREBOOT=y + # CONFIG_DISPLAY_CPUINFO is not set + # CONFIG_DISPLAY_BOARDINFO is not set +diff --git a/configs/rpi_4_32b_defconfig b/configs/rpi_4_32b_defconfig +index 71f61c52e52d..55bf6c0770f0 100644 +--- a/configs/rpi_4_32b_defconfig ++++ b/configs/rpi_4_32b_defconfig +@@ -13,7 +13,6 @@ CONFIG_SYS_LOAD_ADDR=0x1000000 + CONFIG_BOOTSTD_DEFAULTS=y + CONFIG_PCI=y + CONFIG_OF_BOARD_SETUP=y +-CONFIG_DISTRO_DEFAULTS=y + CONFIG_USE_PREBOOT=y + CONFIG_PREBOOT="pci enum; usb start;" + # CONFIG_DISPLAY_CPUINFO is not set +diff --git a/configs/rpi_4_defconfig b/configs/rpi_4_defconfig +index fa2c05da21e8..6679cce9a165 100644 +--- a/configs/rpi_4_defconfig ++++ b/configs/rpi_4_defconfig +@@ -13,7 +13,6 @@ CONFIG_SYS_LOAD_ADDR=0x1000000 + CONFIG_BOOTSTD_DEFAULTS=y + CONFIG_PCI=y + CONFIG_OF_BOARD_SETUP=y +-CONFIG_DISTRO_DEFAULTS=y + CONFIG_USE_PREBOOT=y + CONFIG_PREBOOT="pci enum; usb start;" + # CONFIG_DISPLAY_CPUINFO is not set +diff --git a/configs/rpi_arm64_defconfig b/configs/rpi_arm64_defconfig +index 3e64573b70b1..26e29ffb5a1f 100644 +--- a/configs/rpi_arm64_defconfig ++++ b/configs/rpi_arm64_defconfig +@@ -13,7 +13,6 @@ CONFIG_SYS_LOAD_ADDR=0x1000000 + CONFIG_BOOTSTD_DEFAULTS=y + CONFIG_PCI=y + CONFIG_OF_BOARD_SETUP=y +-CONFIG_DISTRO_DEFAULTS=y + CONFIG_USE_PREBOOT=y + CONFIG_PREBOOT="pci enum; usb start;" + # CONFIG_DISPLAY_CPUINFO is not set +diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig +index 4b8e402c89d4..0ac5efec717b 100644 +--- a/configs/rpi_defconfig ++++ b/configs/rpi_defconfig +@@ -14,7 +14,6 @@ CONFIG_OF_LIBFDT_OVERLAY=y + CONFIG_SYS_LOAD_ADDR=0x1000000 + CONFIG_BOOTSTD_DEFAULTS=y + CONFIG_OF_BOARD_SETUP=y +-CONFIG_DISTRO_DEFAULTS=y + CONFIG_USE_PREBOOT=y + # CONFIG_DISPLAY_CPUINFO is not set + # CONFIG_DISPLAY_BOARDINFO is not set + +From patchwork Thu Jul 27 21:54:30 2023 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: Simon Glass +X-Patchwork-Id: 1813970 +X-Patchwork-Delegate: pbrobinson@gmail.com +Return-Path: +X-Original-To: incoming@patchwork.ozlabs.org +Delivered-To: patchwork-incoming@legolas.ozlabs.org +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=) +Authentication-Results: legolas.ozlabs.org; + dkim=pass (1024-bit key; + unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 + header.s=google header.b=mBws8fys; + dkim-atps=neutral +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 (P-384)) + (No client certificate requested) + by legolas.ozlabs.org (Postfix) with ESMTPS id 4RBl220N1zz1yZb + for ; Fri, 28 Jul 2023 07:55:38 +1000 (AEST) +Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) + by phobos.denx.de (Postfix) with ESMTP id 7E187868A9; + Thu, 27 Jul 2023 23:55:29 +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="mBws8fys"; + dkim-atps=neutral +Received: by phobos.denx.de (Postfix, from userid 109) + id 7F3798687F; Thu, 27 Jul 2023 23:54:47 +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,DKIMWL_WL_HIGH, + DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, + SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no + version=3.4.2 +Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com + [IPv6:2607:f8b0:4864:20::d31]) + (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 6FD6A86883 + for ; Thu, 27 Jul 2023 23:54:43 +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-io1-xd31.google.com with SMTP id + ca18e2360f4ac-7878e573827so57883239f.1 + for ; Thu, 27 Jul 2023 14:54:43 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=chromium.org; s=google; t=1690494882; x=1691099682; + 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=YMeq2z0BceWJEeXZ+KPCl2/DO9snM/APf71IQJ8+EHM=; + b=mBws8fysMfDnws5xSckJmwYoFnbO4f08B6wlUEznhDpb/FVohJO+FmfQbnHUDUDsSy + Ee6d5JuG8wVUQSapqqsi2JXsNwfvnzsA0e7QaUoJptoauwkl1oKG+AZ91ThkEcjXdL6O + RK775AhnEeLE5jMuVBfe9uFq6Re05aeM+vdsU= +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20221208; t=1690494882; x=1691099682; + 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=YMeq2z0BceWJEeXZ+KPCl2/DO9snM/APf71IQJ8+EHM=; + b=JCEGP9SG2bCGvzpYyon4ZvzAorqfIf8zfk2pJUGBNzjUUgshrJ61sNPKq511ECI9Iq + 4yxAoqYQDXgSv32IWK7fI0cGnv7QlyXjPSVE42G6W+gO2BZAnd0nUhwVSoV4Llz1vwx5 + RVOUfXyUZVtm/98JYyMavbvbNvnFy2RmefMLDz3Q3ES8eb7l8KclgtnPTpvsNdO4pw4W + MVzDzaNyuZq1tfHjYJz1UTC7G5rfiqkgThZbvc0VAa3wEnxtT4xxFIfebHKkyqbLqQ/6 + CfuFspsQDYnNZ4pVUaM9P6SWPzRKLIFCThE3AZDKEjW9hb9O1MOTzablkioHKNFipH2v + 8aPw== +X-Gm-Message-State: ABy/qLbiMvFNCnHAWkxWhayqbqcbzPbE/txTwyh8SaP8/5b7BdEzsSap + DdDHhSzoDCe+X4IQmkeApNsbmjJmALrfhBJBa1E= +X-Google-Smtp-Source: + APBJJlE+7X+YHtsSdv0glv6+7e+JF2c+SP9bOM3kvNRjEtcpLydgTQTDsxizlaaU3s5ZzSPXDsW9LQ== +X-Received: by 2002:a6b:d902:0:b0:786:cd9b:1ccd with SMTP id + r2-20020a6bd902000000b00786cd9b1ccdmr812254ioc.0.1690494881976; + Thu, 27 Jul 2023 14:54:41 -0700 (PDT) +Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) + by smtp.gmail.com with ESMTPSA id + n28-20020a02cc1c000000b00430245071ddsm679215jap.176.2023.07.27.14.54.41 + (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); + Thu, 27 Jul 2023 14:54:41 -0700 (PDT) +From: Simon Glass +To: U-Boot Mailing List +Cc: Tom Rini , Peter Robinson , + Simon Glass , Albert Aribaud , + Matthias Brugger , Stephen Warren , + Stephen Warren +Subject: [RESEND PATCH v3 3/3] arm: rpi: Switch to a text environment +Date: Thu, 27 Jul 2023 15:54:30 -0600 +Message-ID: <20230727215433.578830-4-sjg@chromium.org> +X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog +In-Reply-To: <20230727215433.578830-1-sjg@chromium.org> +References: <20230727215433.578830-1-sjg@chromium.org> +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 + +Use the new environment format so we can drop most of the config.h file. + +Signed-off-by: Simon Glass +--- + +(no changes since v1) + + board/raspberrypi/rpi/rpi.env | 77 ++++++++++++++++++++++++++ + include/configs/rpi.h | 100 ---------------------------------- + 2 files changed, 77 insertions(+), 100 deletions(-) + create mode 100644 board/raspberrypi/rpi/rpi.env + +diff --git a/board/raspberrypi/rpi/rpi.env b/board/raspberrypi/rpi/rpi.env +new file mode 100644 +index 000000000000..30228285edde +--- /dev/null ++++ b/board/raspberrypi/rpi/rpi.env +@@ -0,0 +1,77 @@ ++/* SPDX-License-Identifier: GPL-2.0+ */ ++ ++/* environment for Raspberry Pi boards */ ++ ++dhcpuboot=usb start; dhcp u-boot.uimg; bootm ++ ++/* Environment */ ++stdin=serial,usbkbd ++stdout=serial,vidconsole ++stderr=serial,vidconsole ++ ++/* DFU over USB/UDC */ ++#ifdef CONFIG_CMD_DFU ++dfu_alt_info=u-boot.bin fat 0 1;uboot.env fat 0 1; ++ config.txt fat 0 1; ++#ifdef CONFIG_ARM64 ++dfu_alt_info+=Image fat 0 1 ++#else ++dfu_alt_info+=zImage fat 0 1 ++#endif ++#endif /* CONFIG_CMD_DFU */ ++ ++/* ++ * Memory layout for where various images get loaded by boot scripts: ++ * ++ * I suspect address 0 is used as the SMP pen on the RPi2, so avoid this. ++ * ++ * Older versions of the boot firmware place the firmware-loaded DTB at 0x100, ++ * newer versions place it in high memory. So prevent U-Boot from doing its own ++ * DTB + initrd relocation so that we won't accidentally relocate the initrd ++ * over the firmware-loaded DTB and generally try to lay out things starting ++ * from the bottom of RAM. ++ * ++ * kernel_addr_r has different constraints on ARM and Aarch64. For 32-bit ARM, ++ * it must be within the first 128M of RAM in order for the kernel's ++ * CONFIG_AUTO_ZRELADDR option to work. The kernel itself will be decompressed ++ * to 0x8000 but the decompressor clobbers 0x4000-0x8000 as well. The ++ * decompressor also likes to relocate itself to right past the end of the ++ * decompressed kernel, so in total the sum of the compressed and ++ * decompressed kernel needs to be reserved. ++ * ++ * For Aarch64, the kernel image is uncompressed and must be loaded at ++ * text_offset bytes (specified in the header of the Image) into a 2MB ++ * boundary. The 'booti' command relocates the image if necessary. Linux uses ++ * a default text_offset of 0x80000. In summary, loading at 0x80000 ++ * satisfies all these constraints and reserving memory up to 0x02400000 ++ * permits fairly large (roughly 36M) kernels. ++ * ++ * scriptaddr and pxefile_addr_r can be pretty much anywhere that doesn't ++ * conflict with something else. Reserving 1M for each of them at ++ * 0x02400000-0x02500000 and 0x02500000-0x02600000 should be plenty. ++ * ++ * On ARM, both the DTB and any possible initrd must be loaded such that they ++ * fit inside the lowmem mapping in Linux. In practice, this usually means not ++ * more than ~700M away from the start of the kernel image but this number can ++ * be larger OR smaller depending on e.g. the 'vmalloc=xxxM' command line ++ * parameter given to the kernel. So reserving memory from low to high ++ * satisfies this constraint again. Reserving 1M at 0x02600000-0x02700000 for ++ * the DTB leaves rest of the free RAM to the initrd starting at 0x02700000. ++ * Even with the smallest possible CPU-GPU memory split of the CPU getting ++ * only 64M, the remaining 25M starting at 0x02700000 should allow quite ++ * large initrds before they start colliding with U-Boot. ++ */ ++#ifdef CONFIG_ARM64 ++fdt_high=ffffffffffffffff ++initrd_high=ffffffffffffffff ++#else ++fdt_high=ffffffff ++initrd_high=ffffffff ++#endif ++kernel_addr_r=0x00080000 ++scriptaddr=0x02400000 ++pxefile_addr_r=0x02500000 ++fdt_addr_r=0x02600000 ++ramdisk_addr_r=0x02700000 ++ ++boot_targets=mmc usb pxe dhcp +diff --git a/include/configs/rpi.h b/include/configs/rpi.h +index 4160db2d8e14..8e56bdc84a89 100644 +--- a/include/configs/rpi.h ++++ b/include/configs/rpi.h +@@ -13,8 +13,6 @@ + #include + #endif + +-/* Architecture, CPU, etc.*/ +- + /* Use SoC timer for AArch32, but architected timer for AArch64 */ + #ifndef CONFIG_ARM64 + #define CFG_SYS_TIMER_RATE 1000000 +@@ -33,102 +31,4 @@ + */ + #define CFG_SYS_SDRAM_SIZE SZ_128M + +-/* Devices */ +-/* LCD */ +- +-/* DFU over USB/UDC */ +-#ifdef CONFIG_CMD_DFU +-#ifdef CONFIG_ARM64 +-#define KERNEL_FILENAME "Image" +-#else +-#define KERNEL_FILENAME "zImage" +-#endif +- +-#define ENV_DFU_SETTINGS \ +- "dfu_alt_info=u-boot.bin fat 0 1;uboot.env fat 0 1;" \ +- "config.txt fat 0 1;" \ +- KERNEL_FILENAME " fat 0 1\0" +-#else +-#define ENV_DFU_SETTINGS "" +-#endif +- +-/* Console configuration */ +- +-/* Environment */ +- +-/* Shell */ +- +-/* Environment */ +-#define ENV_DEVICE_SETTINGS \ +- "stdin=serial,usbkbd\0" \ +- "stdout=serial,vidconsole\0" \ +- "stderr=serial,vidconsole\0" +- +-#ifdef CONFIG_ARM64 +-#define FDT_HIGH "ffffffffffffffff" +-#define INITRD_HIGH "ffffffffffffffff" +-#else +-#define FDT_HIGH "ffffffff" +-#define INITRD_HIGH "ffffffff" +-#endif +- +-/* +- * Memory layout for where various images get loaded by boot scripts: +- * +- * I suspect address 0 is used as the SMP pen on the RPi2, so avoid this. +- * +- * Older versions of the boot firmware place the firmware-loaded DTB at 0x100, +- * newer versions place it in high memory. So prevent U-Boot from doing its own +- * DTB + initrd relocation so that we won't accidentally relocate the initrd +- * over the firmware-loaded DTB and generally try to lay out things starting +- * from the bottom of RAM. +- * +- * kernel_addr_r has different constraints on ARM and Aarch64. For 32-bit ARM, +- * it must be within the first 128M of RAM in order for the kernel's +- * CONFIG_AUTO_ZRELADDR option to work. The kernel itself will be decompressed +- * to 0x8000 but the decompressor clobbers 0x4000-0x8000 as well. The +- * decompressor also likes to relocate itself to right past the end of the +- * decompressed kernel, so in total the sum of the compressed and and +- * decompressed kernel needs to be reserved. +- * +- * For Aarch64, the kernel image is uncompressed and must be loaded at +- * text_offset bytes (specified in the header of the Image) into a 2MB +- * boundary. The 'booti' command relocates the image if necessary. Linux uses +- * a default text_offset of 0x80000. In summary, loading at 0x80000 +- * satisfies all these constraints and reserving memory up to 0x02400000 +- * permits fairly large (roughly 36M) kernels. +- * +- * scriptaddr and pxefile_addr_r can be pretty much anywhere that doesn't +- * conflict with something else. Reserving 1M for each of them at +- * 0x02400000-0x02500000 and 0x02500000-0x02600000 should be plenty. +- * +- * On ARM, both the DTB and any possible initrd must be loaded such that they +- * fit inside the lowmem mapping in Linux. In practice, this usually means not +- * more than ~700M away from the start of the kernel image but this number can +- * be larger OR smaller depending on e.g. the 'vmalloc=xxxM' command line +- * parameter given to the kernel. So reserving memory from low to high +- * satisfies this constraint again. Reserving 1M at 0x02600000-0x02700000 for +- * the DTB leaves rest of the free RAM to the initrd starting at 0x02700000. +- * Even with the smallest possible CPU-GPU memory split of the CPU getting +- * only 64M, the remaining 25M starting at 0x02700000 should allow quite +- * large initrds before they start colliding with U-Boot. +- */ +-#define ENV_MEM_LAYOUT_SETTINGS \ +- "fdt_high=" FDT_HIGH "\0" \ +- "initrd_high=" INITRD_HIGH "\0" \ +- "kernel_addr_r=0x00080000\0" \ +- "scriptaddr=0x02400000\0" \ +- "pxefile_addr_r=0x02500000\0" \ +- "fdt_addr_r=0x02600000\0" \ +- "ramdisk_addr_r=0x02700000\0" +- +-#define BOOT_TARGETS "mmc usb pxe dhcp" +- +-#define CFG_EXTRA_ENV_SETTINGS \ +- "dhcpuboot=usb start; dhcp u-boot.uimg; bootm\0" \ +- ENV_DEVICE_SETTINGS \ +- ENV_DFU_SETTINGS \ +- ENV_MEM_LAYOUT_SETTINGS \ +- "boot_targets=" BOOT_TARGETS "\0" +- + #endif diff --git a/uboot-tools.spec b/uboot-tools.spec index 5774bc2..bd19b50 100644 --- a/uboot-tools.spec +++ b/uboot-tools.spec @@ -7,7 +7,7 @@ Name: uboot-tools Version: 2023.10 -Release: 0.1%{?candidate:.%{candidate}}%{?dist} +Release: 0.2%{?candidate:.%{candidate}}%{?dist} Summary: U-Boot utilities License: GPLv2+ BSD LGPL-2.1+ LGPL-2.0+ URL: http://www.denx.de/wiki/U-Boot @@ -30,6 +30,7 @@ Patch5: rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch Patch6: rockchip-Add-initial-support-for-the-PinePhone-Pro.patch Patch7: rock64-small-fixes.patch #Patch7: 0001-Revert-rockchip-rockpro64-Build-u-boot-rockchip-spi..patch +Patch8: rpi-Convert-to-standard-boot.patch BuildRequires: bc BuildRequires: bison @@ -214,6 +215,9 @@ cp -p board/sunxi/README.nand builds/docs/README.sunxi-nand %endif %changelog +* Sat Aug 19 2023 Peter Robinson - 2023.10-0.2.rc2 +- Add patch for Raspberry Pi boot + * Fri Aug 18 2023 Peter Robinson - 2023.10-0.1.rc2 - Update to 2023.10 RC2