bootstd: sunxi: Migrate to standard boot
Subsystems (4)
v3 cover bootstd: sunxi: Migrate to standard boot
This series attempts to migrate all sunxi boards to use standard boot, along with a text environment.
Changes in v3:
- Drop wip (work-in-progress) comment in commit
- Fix 'supressed' typo
- Use backquotes to highlight DEFAULT_DEVICE_TREE
Changes in v2:
- Add new patch to resolve BOOTSTD->BLK recursion with Kconfig
- Put the FEL bootmeth before all other global bootmeths
- Convert the other DISTRO_DEFAULTS in the Kconfig too
- Keep BOOTCMD_SUNXI_COMPAT
- Keep bootcmd_sunxi_compat if OLD_SUNXI_KERNEL_COMPAT is enabled
Simon Glass (8):
blk: Make functions available unconditionally
bootstd: Avoid calling unavailable block functions
bootstd: Avoid depending on BLK
sunxi: Add a bootmeth for FEL
sunxi: Move to bootstd
sunxi: Drop old distro boot variables
env: Provide a work-around for unquoting fdtfile
sunxi: Move to text environment
Makefile | 1 + arch/arm/Kconfig | 10 +- board/sunxi/sunxi.env | 152 +++++++++++ boot/Kconfig | 16 +- boot/Makefile | 1 + boot/bootdev-uclass.c | 3 + boot/bootmeth_fel.c | 81 ++++++ .../gardena-smart-gateway-mt7688_defconfig | 1 + doc/usage/environment.rst | 12 + include/blk.h | 9 +- include/configs/sunxi-common.h | 238 ------------------ 11 files changed, 278 insertions(+), 246 deletions(-) create mode 100644 board/sunxi/sunxi.env create mode 100644 boot/bootmeth_fel.c
Signature · 1 line
2.34.1
PATCH v3 1/8 blk: Make functions available unconditionally
Some boards still don't enable BLK but we want to be able to at least compile the code which relies on this. For example, bootstd includes calls to blk_...() functions, albeit with a check for BLK so that the code is eliminated by the compiler.
Reduce the scope of the BLK #ifdef to help with this.
---
(no changes since v1)
include/blk.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
include/blk.h +7 -2
@@ -197,7 +197,6 @@ static inline void blkcache_free(void) {}#endif -#if CONFIG_IS_ENABLED (BLK )struct udevice ;/* Operations on block devices */
@@ -278,6 +277,8 @@ struct blk_ops {#endif /* CONFIG_BOUNCE_BUFFER */ }; +#if CONFIG_IS_ENABLED (BLK ) +/* * These functions should take struct udevice instead of struct blk_desc, * but this is convenient for migration to driver model. Add a 'd' prefix
@@ -291,6 +292,8 @@ unsigned long blk_dwrite(struct blk_desc *block_dev, lbaint_t start,unsigned long blk_derase (struct blk_desc *block_dev,lbaint_t start,lbaint_t blkcnt); +#endif /* BLK */ +/** * blk_read() - Read from a block device *
@@ -528,8 +531,10 @@ struct blk_desc *blk_get_by_device(struct udevice *dev);*/ int blk_get_desc (enum uclass_id uclass_id,int devnum,struct blk_desc **descp); -#else +#if !CONFIG_IS_ENABLED (BLK ) +#include <errno.h> +/* * These functions should take struct udevice instead of struct blk_desc, * but this is convenient for migration to driver model. Add a 'd' prefix
Signature · 1 line
2.34.1
Re: [PATCH v3 1/8] blk: Make functions available unconditionally
Some boards still don't enable BLK but we want to be able to at least compile the code which relies on this. For example, bootstd includes calls to blk_...() functions, albeit with a check for BLK so that the code is eliminated by the compiler.
Reduce the scope of the BLK #ifdef to help with this.
---
(no changes since v1)
include/blk.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
Applied to u-boot-dm, thanks!
PATCH v3 2/8 bootstd: Avoid calling unavailable block functions
In reply to Simon GlassWhen BLK is not enabled but BOOTSTD is, some features of standard boot become unavailable. Add a check for this in the only site that is currently apparent.
---
(no changes since v1)
boot/bootdev-uclass.c | 3 +++ 1 file changed, 3 insertions(+)
boot/bootdev-uclass.c +3 -0
@@ -434,6 +434,9 @@ int bootdev_find_by_label(const char *label, struct udevice **devp,struct uclass *uc;enum uclass_id id; +if (!CONFIG_IS_ENABLED (BLK )) +return -ENOSYS ; + ret =label_to_uclass (label, &seq, &method_flags);if (ret <0 )return log_msg_ret ("uc" , ret);
Signature · 1 line
2.34.1
Re: [PATCH v3 2/8] bootstd: Avoid calling unavailable block functions
When BLK is not enabled but BOOTSTD is, some features of standard boot become unavailable. Add a check for this in the only site that is currently apparent.
---
(no changes since v1)
boot/bootdev-uclass.c | 3 +++ 1 file changed, 3 insertions(+)
Applied to u-boot-dm, thanks!
PATCH v3 3/8 bootstd: Avoid depending on BLK
In reply to Simon GlassIn principle bootstd can work without block devices, even if it does require driver model to be enabled in that case.
The use of a 'depends on BLK' for BOOTSTD conflicts with the way 'BLK' is now defined, producing recursive errors through multiple different paths, one of which is this (with Linksprite_pcDuino3 and BOOTSTD_DEFAULTS enabled):
arch/arm/Kconfig:7:error: recursive dependency detected! arch/arm/Kconfig:7: symbol ARM64 is selected by ARCH_UNIPHIER_V8_MULTI arch/arm/mach-uniphier/Kconfig:17: symbol ARCH_UNIPHIER_V8_MULTI is
part of choice <choice>
arch/arm/mach-uniphier/Kconfig:6: choice <choice> contains symbol
ARCH_UNIPHIER_V8_MULTI
arch/arm/mach-uniphier/Kconfig:17: symbol ARCH_UNIPHIER_V8_MULTI is
part of choice SPL
arch/arm/mach-stm32mp/Kconfig:3: symbol SPL depends on SUPPORT_SPL common/spl/Kconfig:1: symbol SUPPORT_SPL is selected by ASPEED_AST2600 arch/arm/mach-aspeed/Kconfig:26: symbol ASPEED_AST2600 is part of
choice <choice>
arch/arm/mach-aspeed/Kconfig:12: choice <choice> contains symbol
ASPEED_AST2500
arch/arm/mach-aspeed/Kconfig:17: symbol ASPEED_AST2500 is part of
choice DM_RESET
arch/arm/mach-renesas/Kconfig.rcar3:197: symbol DM_RESET is selected
by CLK_RCAR_GEN3
drivers/clk/renesas/Kconfig:53: symbol CLK_RCAR_GEN3 depends on
CLK_RENESAS
drivers/clk/renesas/Kconfig:1: symbol CLK_RENESAS depends on CLK
drivers/clk/Kconfig:3: symbol CLK is selected by IMX8M_POWER_DOMAIN
drivers/power/domain/Kconfig:35: symbol IMX8M_POWER_DOMAIN depends on
POWER_DOMAIN
drivers/power/domain/Kconfig:3: symbol POWER_DOMAIN is selected by
BCM6318_USBH_PHY drivers/phy/Kconfig:83: symbol BCM6318_USBH_PHY depends on PHY drivers/phy/Kconfig:4: symbol PHY is selected by USB_EHCI_MX7 drivers/usb/host/Kconfig:211: symbol USB_EHCI_MX7 depends on USB drivers/usb/Kconfig:1: symbol USB is selected by BOOTSTD_DEFAULTS boot/Kconfig:455: symbol BOOTSTD_DEFAULTS depends on BOOTSTD boot/Kconfig:398: symbol BOOTSTD depends on BLK drivers/block/Kconfig:1: symbol BLK is selected by PVBLOCK drivers/xen/Kconfig:1: symbol PVBLOCK depends on XEN Kconfig:176: symbol XEN depends on ARM64
We don't want to revert the change to BLK, which has been in place for a year now. We don't want to select BLK in BOOTSTD since it should support booting without block devices. The only realistic option is to remove BOOTSTD's dependency on BLK.
Disable standard boot on the one board which fails.
---
Changes in v3:
- Drop wip (work-in-progress) comment in commit
Changes in v2:
- Add new patch to resolve BOOTSTD->BLK recursion with Kconfig
boot/Kconfig | 2 +- configs/gardena-smart-gateway-mt7688_defconfig | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
boot/Kconfig +1 -1
@@ -398,7 +398,7 @@ config BOOT_DEFAULTS menuconfig BOOTSTD bool "Standard boot" default y - depends on DM && OF_CONTROL && BLK + depends on DM && OF_CONTROL help U-Boot supports a standard way of locating something to boot, typically an Operating System such as Linux, provided by a distro such
configs/gardena-smart-gateway-mt7688_defconfig +1 -0
@@ -30,6 +30,7 @@ CONFIG_HAS_BOARD_SIZE_LIMIT=y CONFIG_BOARD_SIZE_LIMIT=655360 CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y +# CONFIG_BOOTSTD is not set CONFIG_LEGACY_IMAGE_FORMAT=y CONFIG_AUTOBOOT_KEYED=y CONFIG_AUTOBOOT_STOP_STR="x"
Signature · 1 line
2.34.1
Re: [PATCH v3 3/8] bootstd: Avoid depending on BLK
In principle bootstd can work without block devices, even if it does require driver model to be enabled in that case.
The use of a 'depends on BLK' for BOOTSTD conflicts with the way 'BLK' is now defined, producing recursive errors through multiple different paths, one of which is this (with Linksprite_pcDuino3 and BOOTSTD_DEFAULTS enabled):
arch/arm/Kconfig:7:error: recursive dependency detected! arch/arm/Kconfig:7: symbol ARM64 is selected by ARCH_UNIPHIER_V8_MULTI arch/arm/mach-uniphier/Kconfig:17: symbol ARCH_UNIPHIER_V8_MULTI is
part of choice <choice>
arch/arm/mach-uniphier/Kconfig:6: choice <choice> contains symbol
ARCH_UNIPHIER_V8_MULTI
arch/arm/mach-uniphier/Kconfig:17: symbol ARCH_UNIPHIER_V8_MULTI is
part of choice SPL
arch/arm/mach-stm32mp/Kconfig:3: symbol SPL depends on SUPPORT_SPL common/spl/Kconfig:1: symbol SUPPORT_SPL is selected by ASPEED_AST2600 arch/arm/mach-aspeed/Kconfig:26: symbol ASPEED_AST2600 is part of
choice <choice>
arch/arm/mach-aspeed/Kconfig:12: choice <choice> contains symbol
ASPEED_AST2500
arch/arm/mach-aspeed/Kconfig:17: symbol ASPEED_AST2500 is part of
choice DM_RESET
arch/arm/mach-renesas/Kconfig.rcar3:197: symbol DM_RESET is selected
by CLK_RCAR_GEN3
drivers/clk/renesas/Kconfig:53: symbol CLK_RCAR_GEN3 depends on
CLK_RENESAS
drivers/clk/renesas/Kconfig:1: symbol CLK_RENESAS depends on CLK
drivers/clk/Kconfig:3: symbol CLK is selected by IMX8M_POWER_DOMAIN
drivers/power/domain/Kconfig:35: symbol IMX8M_POWER_DOMAIN depends on
POWER_DOMAIN
drivers/power/domain/Kconfig:3: symbol POWER_DOMAIN is selected by
BCM6318_USBH_PHY drivers/phy/Kconfig:83: symbol BCM6318_USBH_PHY depends on PHY drivers/phy/Kconfig:4: symbol PHY is selected by USB_EHCI_MX7 drivers/usb/host/Kconfig:211: symbol USB_EHCI_MX7 depends on USB drivers/usb/Kconfig:1: symbol USB is selected by BOOTSTD_DEFAULTS boot/Kconfig:455: symbol BOOTSTD_DEFAULTS depends on BOOTSTD boot/Kconfig:398: symbol BOOTSTD depends on BLK drivers/block/Kconfig:1: symbol BLK is selected by PVBLOCK drivers/xen/Kconfig:1: symbol PVBLOCK depends on XEN Kconfig:176: symbol XEN depends on ARM64
We don't want to revert the change to BLK, which has been in place for a year now. We don't want to select BLK in BOOTSTD since it should support booting without block devices. The only realistic option is to remove BOOTSTD's dependency on BLK.
Disable standard boot on the one board which fails.
---
Changes in v3:
- Drop wip (work-in-progress) comment in commit
Changes in v2:
- Add new patch to resolve BOOTSTD->BLK recursion with Kconfig
boot/Kconfig | 2 +- configs/gardena-smart-gateway-mt7688_defconfig | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
Applied to u-boot-dm, thanks!
Re: [PATCH v3 3/8] bootstd: Avoid depending on BLK
Quoted 57 lines · Simon Glass
In principle bootstd can work without block devices, even if it does require driver model to be enabled in that case.
The use of a 'depends on BLK' for BOOTSTD conflicts with the way 'BLK' is now defined, producing recursive errors through multiple different paths, one of which is this (with
Linksprite_pcDuino3andBOOTSTD_DEFAULTSenabled):arch/arm/Kconfig:7:error: recursive dependency detected!
arch/arm/Kconfig:7: symbol ARM64 is selected byARCH_UNIPHIER_V8_MULTIarch/arm/mach-uniphier/Kconfig:17: symbolARCH_UNIPHIER_V8_MULTIis
part of choice <choice>
arch/arm/mach-uniphier/Kconfig:6: choice <choice> contains symbol
ARCH_UNIPHIER_V8_MULTI
arch/arm/mach-uniphier/Kconfig:17: symbolARCH_UNIPHIER_V8_MULTIis
part of choice SPL
arch/arm/mach-stm32mp/Kconfig:3: symbol SPL depends onSUPPORT_SPLcommon/spl/Kconfig:1: symbolSUPPORT_SPLis selected byASPEED_AST2600arch/arm/mach-aspeed/Kconfig:26: symbolASPEED_AST2600is part of
choice <choice>
arch/arm/mach-aspeed/Kconfig:12: choice <choice> contains symbolASPEED_AST2500 arch/arm/mach-aspeed/Kconfig:17: symbol ASPEED_AST2500 is part of choice DM_RESET arch/arm/mach-renesas/Kconfig.rcar3:197: symbol DM_RESET is selected by CLK_RCAR_GEN3 drivers/clk/renesas/Kconfig:53: symbol CLK_RCAR_GEN3 depends on CLK_RENESAS drivers/clk/renesas/Kconfig:1: symbol CLK_RENESAS depends on CLK drivers/clk/Kconfig:3: symbol CLK is selected by IMX8M_POWER_DOMAIN drivers/power/domain/Kconfig:35: symbol IMX8M_POWER_DOMAIN depends on POWER_DOMAIN drivers/power/domain/Kconfig:3: symbol POWER_DOMAIN is selected by BCM6318_USBH_PHY
drivers/phy/Kconfig:83: symbolBCM6318_USBH_PHYdepends on PHYdrivers/phy/Kconfig:4: symbol PHY is selected byUSB_EHCI_MX7drivers/usb/host/Kconfig:211: symbolUSB_EHCI_MX7depends on USBdrivers/usb/Kconfig:1: symbol USB is selected byBOOTSTD_DEFAULTSboot/Kconfig:455: symbolBOOTSTD_DEFAULTSdepends on BOOTSTD boot/Kconfig:398: symbol BOOTSTD depends on BLKdrivers/block/Kconfig:1: symbol BLK is selected by PVBLOCKdrivers/xen/Kconfig:1: symbol PVBLOCK depends on XEN Kconfig:176: symbol XEN depends on ARM64We don't want to revert the change to BLK, which has been in place for a year now. We don't want to select BLK in BOOTSTD since it should support booting without block devices. The only realistic option is to remove BOOTSTD's dependency on BLK.
Disable standard boot on the one board which fails.
Signed-off-by Simon Glass <[email protected]>---
Changes in v3:
- Drop wip (work-in-progress) comment in commit
Quoted 8 lines
Changes in v2:
- Add new patch to resolveBOOTSTD->BLKrecursion withKconfigboot/Kconfig | 2 +- configs/gardena-smart-gateway-mt7688_defconfig | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)Applied to u-boot-dm, thanks!
No, this is wrong, it's pulling in BOOTSTD on a ton of platforms that didn't have it before.
Signature · 1 line
Tom
Re: [PATCH v3 3/8] bootstd: Avoid depending on BLK
Hi Tom,
Quoted 63 lines · Tom Rini
Quoted 60 lines · Simon Glass
In principle bootstd can work without block devices, even if it does require driver model to be enabled in that case.
The use of a 'depends on BLK' for BOOTSTD conflicts with the way 'BLK' is now defined, producing recursive errors through multiple different paths, one of which is this (with
Linksprite_pcDuino3andBOOTSTD_DEFAULTSenabled):arch/arm/Kconfig:7:error: recursive dependency detected!
arch/arm/Kconfig:7: symbol ARM64 is selected byARCH_UNIPHIER_V8_MULTIarch/arm/mach-uniphier/Kconfig:17: symbolARCH_UNIPHIER_V8_MULTIis
part of choice <choice>
arch/arm/mach-uniphier/Kconfig:6: choice <choice> contains symbol
ARCH_UNIPHIER_V8_MULTI
arch/arm/mach-uniphier/Kconfig:17: symbolARCH_UNIPHIER_V8_MULTIis
part of choice SPL
arch/arm/mach-stm32mp/Kconfig:3: symbol SPL depends onSUPPORT_SPLcommon/spl/Kconfig:1: symbolSUPPORT_SPLis selected byASPEED_AST2600arch/arm/mach-aspeed/Kconfig:26: symbolASPEED_AST2600is part of
choice <choice>
arch/arm/mach-aspeed/Kconfig:12: choice <choice> contains symbolASPEED_AST2500 arch/arm/mach-aspeed/Kconfig:17: symbol ASPEED_AST2500 is part of choice DM_RESET arch/arm/mach-renesas/Kconfig.rcar3:197: symbol DM_RESET is selected by CLK_RCAR_GEN3 drivers/clk/renesas/Kconfig:53: symbol CLK_RCAR_GEN3 depends on CLK_RENESAS drivers/clk/renesas/Kconfig:1: symbol CLK_RENESAS depends on CLK drivers/clk/Kconfig:3: symbol CLK is selected by IMX8M_POWER_DOMAIN drivers/power/domain/Kconfig:35: symbol IMX8M_POWER_DOMAIN depends on POWER_DOMAIN drivers/power/domain/Kconfig:3: symbol POWER_DOMAIN is selected by BCM6318_USBH_PHY
drivers/phy/Kconfig:83: symbolBCM6318_USBH_PHYdepends on PHYdrivers/phy/Kconfig:4: symbol PHY is selected byUSB_EHCI_MX7drivers/usb/host/Kconfig:211: symbolUSB_EHCI_MX7depends on USBdrivers/usb/Kconfig:1: symbol USB is selected byBOOTSTD_DEFAULTSboot/Kconfig:455: symbolBOOTSTD_DEFAULTSdepends on BOOTSTD boot/Kconfig:398: symbol BOOTSTD depends on BLKdrivers/block/Kconfig:1: symbol BLK is selected by PVBLOCKdrivers/xen/Kconfig:1: symbol PVBLOCK depends on XEN Kconfig:176: symbol XEN depends on ARM64We don't want to revert the change to BLK, which has been in place for a year now. We don't want to select BLK in BOOTSTD since it should support booting without block devices. The only realistic option is to remove BOOTSTD's dependency on BLK.
Disable standard boot on the one board which fails.
Signed-off-by Simon Glass <[email protected]>---
Changes in v3:
- Drop wip (work-in-progress) comment in commitChanges in v2:
- Add new patch to resolveBOOTSTD->BLKrecursion withKconfig
Quoted 8 lines
Quoted 5 lines
boot/Kconfig | 2 +- configs/gardena-smart-gateway-mt7688_defconfig | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)Applied to u-boot-dm, thanks!
No, this is wrong, it's pulling in BOOTSTD on a ton of platforms that didn't have it before.
This affects 103 boards and the size growth is considerable:
aarch64: (for 22/22 boards) all +15697.0 bss +26.2 data +710.9
rodata +1822.1 text +13137.8
arc: (for 4/4 boards) all +15338.0 bss +4.0 data +526.0 rodata
+2096.0 text +12712.0
arm: (for 26/26 boards) all +18882.8 data +619.2 rodata +1998.8
text +16264.8
m68k: (for 17/17 boards) all +23859.9 bss +3.5 data +1595.8
rodata +1722.8 text +20537.8
microblaze: (for 1/1 boards) all +24713.0 bss -88.0 data +1248.0
rodata +2288.0 text +21265.0
mips: (for 23/23 boards) all +21659.1 bss +39.5 data +746.6
rodata +2155.7 text +18717.4
nios2: (for 2/2 boards) all +24856.0 bss +4.0 data +704.0 text +24148.0 powerpc: (for 13/13 boards) all +21746.6 data +836.3 rodata +807.2
text +20103.2
Added options are:
+ all: CONFIG_BOOTDEV_ETH=1 CONFIG_BOOTMETH_EXTLINUX=1CONFIG_BOOTMETH_GLOBAL=1 CONFIG_BOOTMETH_VBE=1 CONFIG_BOOTMETH_VBE_REQUEST=1 CONFIG_BOOTMETH_VBE_SIMPLE=1 CONFIG_BOOTMETH_VBE_SIMPLE_OS=1 CONFIG_BOOTSTD=1 CONFIG_BOOTSTD_BOOTCOMMAND=1 CONFIG_CMD_BOOTFLOW=1 CONFIG_MENU=1 CONFIG_PXE_UTILS=1
Should I manually disable it on those platforms? I've reached the point where bootstd needs to be available when BLK is not enabled, so need some sort of solution.
Regards,
Simon
Re: [PATCH v3 3/8] bootstd: Avoid depending on BLK
Quoted 102 lines · Simon Glass
Hi Tom,
Quoted 63 lines · Tom Rini
Quoted 60 lines · Simon Glass
In principle bootstd can work without block devices, even if it does require driver model to be enabled in that case.
The use of a 'depends on BLK' for BOOTSTD conflicts with the way 'BLK' is now defined, producing recursive errors through multiple different paths, one of which is this (with
Linksprite_pcDuino3andBOOTSTD_DEFAULTSenabled):arch/arm/Kconfig:7:error: recursive dependency detected!
arch/arm/Kconfig:7: symbol ARM64 is selected byARCH_UNIPHIER_V8_MULTIarch/arm/mach-uniphier/Kconfig:17: symbolARCH_UNIPHIER_V8_MULTIis
part of choice <choice>
arch/arm/mach-uniphier/Kconfig:6: choice <choice> contains symbol
ARCH_UNIPHIER_V8_MULTI
arch/arm/mach-uniphier/Kconfig:17: symbolARCH_UNIPHIER_V8_MULTIis
part of choice SPL
arch/arm/mach-stm32mp/Kconfig:3: symbol SPL depends onSUPPORT_SPLcommon/spl/Kconfig:1: symbolSUPPORT_SPLis selected byASPEED_AST2600arch/arm/mach-aspeed/Kconfig:26: symbolASPEED_AST2600is part of
choice <choice>
arch/arm/mach-aspeed/Kconfig:12: choice <choice> contains symbolASPEED_AST2500 arch/arm/mach-aspeed/Kconfig:17: symbol ASPEED_AST2500 is part of choice DM_RESET arch/arm/mach-renesas/Kconfig.rcar3:197: symbol DM_RESET is selected by CLK_RCAR_GEN3 drivers/clk/renesas/Kconfig:53: symbol CLK_RCAR_GEN3 depends on CLK_RENESAS drivers/clk/renesas/Kconfig:1: symbol CLK_RENESAS depends on CLK drivers/clk/Kconfig:3: symbol CLK is selected by IMX8M_POWER_DOMAIN drivers/power/domain/Kconfig:35: symbol IMX8M_POWER_DOMAIN depends on POWER_DOMAIN drivers/power/domain/Kconfig:3: symbol POWER_DOMAIN is selected by BCM6318_USBH_PHY
drivers/phy/Kconfig:83: symbolBCM6318_USBH_PHYdepends on PHYdrivers/phy/Kconfig:4: symbol PHY is selected byUSB_EHCI_MX7drivers/usb/host/Kconfig:211: symbolUSB_EHCI_MX7depends on USBdrivers/usb/Kconfig:1: symbol USB is selected byBOOTSTD_DEFAULTSboot/Kconfig:455: symbolBOOTSTD_DEFAULTSdepends on BOOTSTD boot/Kconfig:398: symbol BOOTSTD depends on BLKdrivers/block/Kconfig:1: symbol BLK is selected by PVBLOCKdrivers/xen/Kconfig:1: symbol PVBLOCK depends on XEN Kconfig:176: symbol XEN depends on ARM64We don't want to revert the change to BLK, which has been in place for a year now. We don't want to select BLK in BOOTSTD since it should support booting without block devices. The only realistic option is to remove BOOTSTD's dependency on BLK.
Disable standard boot on the one board which fails.
Signed-off-by Simon Glass <[email protected]>---
Changes in v3:
- Drop wip (work-in-progress) comment in commitChanges in v2:
- Add new patch to resolveBOOTSTD->BLKrecursion withKconfigQuoted 8 lines
Quoted 5 lines
boot/Kconfig | 2 +- configs/gardena-smart-gateway-mt7688_defconfig | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)Applied to u-boot-dm, thanks!
No, this is wrong, it's pulling in BOOTSTD on a ton of platforms that didn't have it before.
This affects 103 boards and the size growth is considerable:
aarch64: (for 22/22 boards) all +15697.0 bss +26.2 data +710.9 rodata +1822.1 text +13137.8 arc: (for 4/4 boards) all +15338.0 bss +4.0 data +526.0 rodata +2096.0 text +12712.0 arm: (for 26/26 boards) all +18882.8 data +619.2 rodata +1998.8 text +16264.8 m68k: (for 17/17 boards) all +23859.9 bss +3.5 data +1595.8 rodata +1722.8 text +20537.8 microblaze: (for 1/1 boards) all +24713.0 bss -88.0 data +1248.0 rodata +2288.0 text +21265.0 mips: (for 23/23 boards) all +21659.1 bss +39.5 data +746.6 rodata +2155.7 text +18717.4 nios2: (for 2/2 boards) all +24856.0 bss +4.0 data +704.0 text +24148.0powerpc: (for 13/13 boards) all +21746.6 data +836.3 rodata +807.2
text +20103.2Added options are:
+ all:
CONFIG_BOOTDEV_ETH=1CONFIG_BOOTMETH_EXTLINUX=1CONFIG_BOOTMETH_GLOBAL=1CONFIG_BOOTMETH_VBE=1CONFIG_BOOTMETH_VBE_REQUEST=1CONFIG_BOOTMETH_VBE_SIMPLE=1CONFIG_BOOTMETH_VBE_SIMPLE_OS=1CONFIG_BOOTSTD=1CONFIG_BOOTSTD_BOOTCOMMAND=1CONFIG_CMD_BOOTFLOW=1CONFIG_MENU=1CONFIG_PXE_UTILS=1
Quoted 3 lines
Should I manually disable it on those platforms? I've reached the point where bootstd needs to be available when BLK is not enabled, so need some sort of solution.
What is the use case for needing all of this, without BLK being set? I'm not sure which platforms that grew here also need bootstd?
Signature · 1 line
Tom
Re: [PATCH v3 3/8] bootstd: Avoid depending on BLK
Hi Tom,
Quoted 104 lines · Tom Rini
Quoted 102 lines · Simon Glass
Hi Tom,
Quoted 63 lines · Tom Rini
Quoted 60 lines · Simon Glass
In principle bootstd can work without block devices, even if it does require driver model to be enabled in that case.
The use of a 'depends on BLK' for BOOTSTD conflicts with the way 'BLK' is now defined, producing recursive errors through multiple different paths, one of which is this (with
Linksprite_pcDuino3andBOOTSTD_DEFAULTSenabled):arch/arm/Kconfig:7:error: recursive dependency detected!
arch/arm/Kconfig:7: symbol ARM64 is selected byARCH_UNIPHIER_V8_MULTIarch/arm/mach-uniphier/Kconfig:17: symbolARCH_UNIPHIER_V8_MULTIis
part of choice <choice>
arch/arm/mach-uniphier/Kconfig:6: choice <choice> contains symbol
ARCH_UNIPHIER_V8_MULTI
arch/arm/mach-uniphier/Kconfig:17: symbolARCH_UNIPHIER_V8_MULTIis
part of choice SPL
arch/arm/mach-stm32mp/Kconfig:3: symbol SPL depends onSUPPORT_SPLcommon/spl/Kconfig:1: symbolSUPPORT_SPLis selected byASPEED_AST2600arch/arm/mach-aspeed/Kconfig:26: symbolASPEED_AST2600is part of
choice <choice>
arch/arm/mach-aspeed/Kconfig:12: choice <choice> contains symbolASPEED_AST2500 arch/arm/mach-aspeed/Kconfig:17: symbol ASPEED_AST2500 is part of choice DM_RESET arch/arm/mach-renesas/Kconfig.rcar3:197: symbol DM_RESET is selected by CLK_RCAR_GEN3 drivers/clk/renesas/Kconfig:53: symbol CLK_RCAR_GEN3 depends on CLK_RENESAS drivers/clk/renesas/Kconfig:1: symbol CLK_RENESAS depends on CLK drivers/clk/Kconfig:3: symbol CLK is selected by IMX8M_POWER_DOMAIN drivers/power/domain/Kconfig:35: symbol IMX8M_POWER_DOMAIN depends on POWER_DOMAIN drivers/power/domain/Kconfig:3: symbol POWER_DOMAIN is selected by BCM6318_USBH_PHY
drivers/phy/Kconfig:83: symbolBCM6318_USBH_PHYdepends on PHYdrivers/phy/Kconfig:4: symbol PHY is selected byUSB_EHCI_MX7drivers/usb/host/Kconfig:211: symbolUSB_EHCI_MX7depends on USBdrivers/usb/Kconfig:1: symbol USB is selected byBOOTSTD_DEFAULTSboot/Kconfig:455: symbolBOOTSTD_DEFAULTSdepends on BOOTSTD boot/Kconfig:398: symbol BOOTSTD depends on BLKdrivers/block/Kconfig:1: symbol BLK is selected by PVBLOCKdrivers/xen/Kconfig:1: symbol PVBLOCK depends on XEN Kconfig:176: symbol XEN depends on ARM64We don't want to revert the change to BLK, which has been in place for a year now. We don't want to select BLK in BOOTSTD since it should support booting without block devices. The only realistic option is to remove BOOTSTD's dependency on BLK.
Disable standard boot on the one board which fails.
Signed-off-by Simon Glass <[email protected]>---
Changes in v3:
- Drop wip (work-in-progress) comment in commitChanges in v2:
- Add new patch to resolveBOOTSTD->BLKrecursion withKconfigQuoted 8 lines
Quoted 5 lines
boot/Kconfig | 2 +- configs/gardena-smart-gateway-mt7688_defconfig | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)Applied to u-boot-dm, thanks!
No, this is wrong, it's pulling in BOOTSTD on a ton of platforms that didn't have it before.
This affects 103 boards and the size growth is considerable:
aarch64: (for 22/22 boards) all +15697.0 bss +26.2 data +710.9 rodata +1822.1 text +13137.8 arc: (for 4/4 boards) all +15338.0 bss +4.0 data +526.0 rodata +2096.0 text +12712.0 arm: (for 26/26 boards) all +18882.8 data +619.2 rodata +1998.8 text +16264.8 m68k: (for 17/17 boards) all +23859.9 bss +3.5 data +1595.8 rodata +1722.8 text +20537.8 microblaze: (for 1/1 boards) all +24713.0 bss -88.0 data +1248.0 rodata +2288.0 text +21265.0 mips: (for 23/23 boards) all +21659.1 bss +39.5 data +746.6 rodata +2155.7 text +18717.4 nios2: (for 2/2 boards) all +24856.0 bss +4.0 data +704.0 text +24148.0powerpc: (for 13/13 boards) all +21746.6 data +836.3 rodata +807.2
text +20103.2Added options are:
+ all:
CONFIG_BOOTDEV_ETH=1CONFIG_BOOTMETH_EXTLINUX=1CONFIG_BOOTMETH_GLOBAL=1CONFIG_BOOTMETH_VBE=1CONFIG_BOOTMETH_VBE_REQUEST=1CONFIG_BOOTMETH_VBE_SIMPLE=1CONFIG_BOOTMETH_VBE_SIMPLE_OS=1CONFIG_BOOTSTD=1CONFIG_BOOTSTD_BOOTCOMMAND=1CONFIG_CMD_BOOTFLOW=1CONFIG_MENU=1CONFIG_PXE_UTILS=1
Quoted 6 lines
Quoted 3 lines
Should I manually disable it on those platforms? I've reached the point where bootstd needs to be available when BLK is not enabled, so need some sort of solution.
What is the use case for needing all of this, without BLK being set? I'm not sure which platforms that grew here also need bootstd?
It is just that some XPL (I can say that now) platforms don't enable BLK but do need to read from a device, e.g. MMC.
Regards,
Simon
Re: [PATCH v3 3/8] bootstd: Avoid depending on BLK
Quoted 111 lines · Simon Glass
Hi Tom,
Quoted 108 lines · Tom Rini
Quoted 105 lines · Simon Glass
Hi Tom,
Quoted 63 lines · Tom Rini
Quoted 60 lines · Simon Glass
In principle bootstd can work without block devices, even if it does require driver model to be enabled in that case.
The use of a 'depends on BLK' for BOOTSTD conflicts with the way 'BLK' is now defined, producing recursive errors through multiple different paths, one of which is this (with
Linksprite_pcDuino3andBOOTSTD_DEFAULTSenabled):arch/arm/Kconfig:7:error: recursive dependency detected!
arch/arm/Kconfig:7: symbol ARM64 is selected byARCH_UNIPHIER_V8_MULTIarch/arm/mach-uniphier/Kconfig:17: symbolARCH_UNIPHIER_V8_MULTIis
part of choice <choice>
arch/arm/mach-uniphier/Kconfig:6: choice <choice> contains symbol
ARCH_UNIPHIER_V8_MULTI
arch/arm/mach-uniphier/Kconfig:17: symbolARCH_UNIPHIER_V8_MULTIis
part of choice SPL
arch/arm/mach-stm32mp/Kconfig:3: symbol SPL depends onSUPPORT_SPLcommon/spl/Kconfig:1: symbolSUPPORT_SPLis selected byASPEED_AST2600arch/arm/mach-aspeed/Kconfig:26: symbolASPEED_AST2600is part of
choice <choice>
arch/arm/mach-aspeed/Kconfig:12: choice <choice> contains symbolASPEED_AST2500 arch/arm/mach-aspeed/Kconfig:17: symbol ASPEED_AST2500 is part of choice DM_RESET arch/arm/mach-renesas/Kconfig.rcar3:197: symbol DM_RESET is selected by CLK_RCAR_GEN3 drivers/clk/renesas/Kconfig:53: symbol CLK_RCAR_GEN3 depends on CLK_RENESAS drivers/clk/renesas/Kconfig:1: symbol CLK_RENESAS depends on CLK drivers/clk/Kconfig:3: symbol CLK is selected by IMX8M_POWER_DOMAIN drivers/power/domain/Kconfig:35: symbol IMX8M_POWER_DOMAIN depends on POWER_DOMAIN drivers/power/domain/Kconfig:3: symbol POWER_DOMAIN is selected by BCM6318_USBH_PHY
drivers/phy/Kconfig:83: symbolBCM6318_USBH_PHYdepends on PHYdrivers/phy/Kconfig:4: symbol PHY is selected byUSB_EHCI_MX7drivers/usb/host/Kconfig:211: symbolUSB_EHCI_MX7depends on USBdrivers/usb/Kconfig:1: symbol USB is selected byBOOTSTD_DEFAULTSboot/Kconfig:455: symbolBOOTSTD_DEFAULTSdepends on BOOTSTD boot/Kconfig:398: symbol BOOTSTD depends on BLKdrivers/block/Kconfig:1: symbol BLK is selected by PVBLOCKdrivers/xen/Kconfig:1: symbol PVBLOCK depends on XEN Kconfig:176: symbol XEN depends on ARM64We don't want to revert the change to BLK, which has been in place for a year now. We don't want to select BLK in BOOTSTD since it should support booting without block devices. The only realistic option is to remove BOOTSTD's dependency on BLK.
Disable standard boot on the one board which fails.
Signed-off-by Simon Glass <[email protected]>---
Changes in v3:
- Drop wip (work-in-progress) comment in commitChanges in v2:
- Add new patch to resolveBOOTSTD->BLKrecursion withKconfigQuoted 8 lines
Quoted 5 lines
boot/Kconfig | 2 +- configs/gardena-smart-gateway-mt7688_defconfig | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)Applied to u-boot-dm, thanks!
No, this is wrong, it's pulling in BOOTSTD on a ton of platforms that didn't have it before.
This affects 103 boards and the size growth is considerable:
aarch64: (for 22/22 boards) all +15697.0 bss +26.2 data +710.9 rodata +1822.1 text +13137.8 arc: (for 4/4 boards) all +15338.0 bss +4.0 data +526.0 rodata +2096.0 text +12712.0 arm: (for 26/26 boards) all +18882.8 data +619.2 rodata +1998.8 text +16264.8 m68k: (for 17/17 boards) all +23859.9 bss +3.5 data +1595.8 rodata +1722.8 text +20537.8 microblaze: (for 1/1 boards) all +24713.0 bss -88.0 data +1248.0 rodata +2288.0 text +21265.0 mips: (for 23/23 boards) all +21659.1 bss +39.5 data +746.6 rodata +2155.7 text +18717.4 nios2: (for 2/2 boards) all +24856.0 bss +4.0 data +704.0 text +24148.0powerpc: (for 13/13 boards) all +21746.6 data +836.3 rodata +807.2
text +20103.2Added options are:
+ all:
CONFIG_BOOTDEV_ETH=1CONFIG_BOOTMETH_EXTLINUX=1CONFIG_BOOTMETH_GLOBAL=1CONFIG_BOOTMETH_VBE=1CONFIG_BOOTMETH_VBE_REQUEST=1CONFIG_BOOTMETH_VBE_SIMPLE=1CONFIG_BOOTMETH_VBE_SIMPLE_OS=1CONFIG_BOOTSTD=1CONFIG_BOOTSTD_BOOTCOMMAND=1CONFIG_CMD_BOOTFLOW=1CONFIG_MENU=1CONFIG_PXE_UTILS=1Should I manually disable it on those platforms? I've reached the point where bootstd needs to be available when BLK is not enabled, so need some sort of solution.
Quoted 5 lines
Quoted 2 lines
What is the use case for needing all of this, without BLK being set? I'm not sure which platforms that grew here also need bootstd?
It is just that some XPL (I can say that now) platforms don't enable BLK but do need to read from a device, e.g. MMC.
Er, how is that an issue for any of the XPL phases? We have {SPL,TPL,VPL}_BLK symbols. And BLK itself is def_bool'd on DM and MMC, etc. And all boards enable DM now.
Signature · 1 line
Tom
Re: [PATCH v3 3/8] bootstd: Avoid depending on BLK
Hi Tom,
Quoted 116 lines · Tom Rini
Quoted 114 lines · Simon Glass
Hi Tom,
Quoted 110 lines · Tom Rini
Quoted 102 lines · Simon Glass
Hi Tom,
Quoted 63 lines · Tom Rini
Quoted 60 lines · Simon Glass
In principle bootstd can work without block devices, even if it does require driver model to be enabled in that case.
The use of a 'depends on BLK' for BOOTSTD conflicts with the way 'BLK' is now defined, producing recursive errors through multiple different paths, one of which is this (with
Linksprite_pcDuino3andBOOTSTD_DEFAULTSenabled):arch/arm/Kconfig:7:error: recursive dependency detected!
arch/arm/Kconfig:7: symbol ARM64 is selected byARCH_UNIPHIER_V8_MULTIarch/arm/mach-uniphier/Kconfig:17: symbolARCH_UNIPHIER_V8_MULTIis
part of choice <choice>
arch/arm/mach-uniphier/Kconfig:6: choice <choice> contains symbol
ARCH_UNIPHIER_V8_MULTI
arch/arm/mach-uniphier/Kconfig:17: symbolARCH_UNIPHIER_V8_MULTIis
part of choice SPL
arch/arm/mach-stm32mp/Kconfig:3: symbol SPL depends onSUPPORT_SPLcommon/spl/Kconfig:1: symbolSUPPORT_SPLis selected byASPEED_AST2600arch/arm/mach-aspeed/Kconfig:26: symbolASPEED_AST2600is part of
choice <choice>
arch/arm/mach-aspeed/Kconfig:12: choice <choice> contains symbolASPEED_AST2500 arch/arm/mach-aspeed/Kconfig:17: symbol ASPEED_AST2500 is part of choice DM_RESET arch/arm/mach-renesas/Kconfig.rcar3:197: symbol DM_RESET is selected by CLK_RCAR_GEN3 drivers/clk/renesas/Kconfig:53: symbol CLK_RCAR_GEN3 depends on CLK_RENESAS drivers/clk/renesas/Kconfig:1: symbol CLK_RENESAS depends on CLK drivers/clk/Kconfig:3: symbol CLK is selected by IMX8M_POWER_DOMAIN drivers/power/domain/Kconfig:35: symbol IMX8M_POWER_DOMAIN depends on POWER_DOMAIN drivers/power/domain/Kconfig:3: symbol POWER_DOMAIN is selected by BCM6318_USBH_PHY
drivers/phy/Kconfig:83: symbolBCM6318_USBH_PHYdepends on PHYdrivers/phy/Kconfig:4: symbol PHY is selected byUSB_EHCI_MX7drivers/usb/host/Kconfig:211: symbolUSB_EHCI_MX7depends on USBdrivers/usb/Kconfig:1: symbol USB is selected byBOOTSTD_DEFAULTSboot/Kconfig:455: symbolBOOTSTD_DEFAULTSdepends on BOOTSTD boot/Kconfig:398: symbol BOOTSTD depends on BLKdrivers/block/Kconfig:1: symbol BLK is selected by PVBLOCKdrivers/xen/Kconfig:1: symbol PVBLOCK depends on XEN Kconfig:176: symbol XEN depends on ARM64We don't want to revert the change to BLK, which has been in place for a year now. We don't want to select BLK in BOOTSTD since it should support booting without block devices. The only realistic option is to remove BOOTSTD's dependency on BLK.
Disable standard boot on the one board which fails.
Signed-off-by Simon Glass <[email protected]>---
Changes in v3:
- Drop wip (work-in-progress) comment in commitChanges in v2:
- Add new patch to resolveBOOTSTD->BLKrecursion withKconfigQuoted 8 lines
Quoted 5 lines
boot/Kconfig | 2 +- configs/gardena-smart-gateway-mt7688_defconfig | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)Applied to u-boot-dm, thanks!
No, this is wrong, it's pulling in BOOTSTD on a ton of platforms that didn't have it before.
This affects 103 boards and the size growth is considerable:
aarch64: (for 22/22 boards) all +15697.0 bss +26.2 data +710.9 rodata +1822.1 text +13137.8 arc: (for 4/4 boards) all +15338.0 bss +4.0 data +526.0 rodata +2096.0 text +12712.0 arm: (for 26/26 boards) all +18882.8 data +619.2 rodata +1998.8 text +16264.8 m68k: (for 17/17 boards) all +23859.9 bss +3.5 data +1595.8 rodata +1722.8 text +20537.8 microblaze: (for 1/1 boards) all +24713.0 bss -88.0 data +1248.0 rodata +2288.0 text +21265.0 mips: (for 23/23 boards) all +21659.1 bss +39.5 data +746.6 rodata +2155.7 text +18717.4 nios2: (for 2/2 boards) all +24856.0 bss +4.0 data +704.0 text +24148.0powerpc: (for 13/13 boards) all +21746.6 data +836.3 rodata +807.2
text +20103.2Added options are:
+ all:
CONFIG_BOOTDEV_ETH=1CONFIG_BOOTMETH_EXTLINUX=1CONFIG_BOOTMETH_GLOBAL=1CONFIG_BOOTMETH_VBE=1CONFIG_BOOTMETH_VBE_REQUEST=1CONFIG_BOOTMETH_VBE_SIMPLE=1CONFIG_BOOTMETH_VBE_SIMPLE_OS=1CONFIG_BOOTSTD=1CONFIG_BOOTSTD_BOOTCOMMAND=1CONFIG_CMD_BOOTFLOW=1CONFIG_MENU=1CONFIG_PXE_UTILS=1Quoted 3 lines
Should I manually disable it on those platforms? I've reached the point where bootstd needs to be available when BLK is not enabled, so need some sort of solution.
What is the use case for needing all of this, without BLK being set? I'm not sure which platforms that grew here also need bootstd?
Quoted 6 lines
Quoted 2 lines
It is just that some XPL (I can say that now) platforms don't enable BLK but do need to read from a device, e.g. MMC.
Er, how is that an issue for any of the XPL phases? We have {SPL,TPL,VPL}_BLK symbols. And BLK itself is def_bool'd on DM and MMC, etc. And all boards enable DM now.
I was using MMC_TINY... I still have one more series for rk3399...so if things build OK I can perhaps just drop this patch and figure this out later?
Regards,
Simon
Re: [PATCH v3 3/8] bootstd: Avoid depending on BLK
Quoted 122 lines · Simon Glass
Hi Tom,
Quoted 119 lines · Tom Rini
Quoted 116 lines · Simon Glass
Hi Tom,
Quoted 104 lines · Tom Rini
Quoted 102 lines · Simon Glass
Hi Tom,
Quoted 63 lines · Tom Rini
Quoted 60 lines · Simon Glass
In principle bootstd can work without block devices, even if it does require driver model to be enabled in that case.
The use of a 'depends on BLK' for BOOTSTD conflicts with the way 'BLK' is now defined, producing recursive errors through multiple different paths, one of which is this (with
Linksprite_pcDuino3andBOOTSTD_DEFAULTSenabled):arch/arm/Kconfig:7:error: recursive dependency detected!
arch/arm/Kconfig:7: symbol ARM64 is selected byARCH_UNIPHIER_V8_MULTIarch/arm/mach-uniphier/Kconfig:17: symbolARCH_UNIPHIER_V8_MULTIis
part of choice <choice>
arch/arm/mach-uniphier/Kconfig:6: choice <choice> contains symbol
ARCH_UNIPHIER_V8_MULTI
arch/arm/mach-uniphier/Kconfig:17: symbolARCH_UNIPHIER_V8_MULTIis
part of choice SPL
arch/arm/mach-stm32mp/Kconfig:3: symbol SPL depends onSUPPORT_SPLcommon/spl/Kconfig:1: symbolSUPPORT_SPLis selected byASPEED_AST2600arch/arm/mach-aspeed/Kconfig:26: symbolASPEED_AST2600is part of
choice <choice>
arch/arm/mach-aspeed/Kconfig:12: choice <choice> contains symbolASPEED_AST2500 arch/arm/mach-aspeed/Kconfig:17: symbol ASPEED_AST2500 is part of choice DM_RESET arch/arm/mach-renesas/Kconfig.rcar3:197: symbol DM_RESET is selected by CLK_RCAR_GEN3 drivers/clk/renesas/Kconfig:53: symbol CLK_RCAR_GEN3 depends on CLK_RENESAS drivers/clk/renesas/Kconfig:1: symbol CLK_RENESAS depends on CLK drivers/clk/Kconfig:3: symbol CLK is selected by IMX8M_POWER_DOMAIN drivers/power/domain/Kconfig:35: symbol IMX8M_POWER_DOMAIN depends on POWER_DOMAIN drivers/power/domain/Kconfig:3: symbol POWER_DOMAIN is selected by BCM6318_USBH_PHY
drivers/phy/Kconfig:83: symbolBCM6318_USBH_PHYdepends on PHYdrivers/phy/Kconfig:4: symbol PHY is selected byUSB_EHCI_MX7drivers/usb/host/Kconfig:211: symbolUSB_EHCI_MX7depends on USBdrivers/usb/Kconfig:1: symbol USB is selected byBOOTSTD_DEFAULTSboot/Kconfig:455: symbolBOOTSTD_DEFAULTSdepends on BOOTSTD boot/Kconfig:398: symbol BOOTSTD depends on BLKdrivers/block/Kconfig:1: symbol BLK is selected by PVBLOCKdrivers/xen/Kconfig:1: symbol PVBLOCK depends on XEN Kconfig:176: symbol XEN depends on ARM64We don't want to revert the change to BLK, which has been in place for a year now. We don't want to select BLK in BOOTSTD since it should support booting without block devices. The only realistic option is to remove BOOTSTD's dependency on BLK.
Disable standard boot on the one board which fails.
Signed-off-by Simon Glass <[email protected]>---
Changes in v3:
- Drop wip (work-in-progress) comment in commitChanges in v2:
- Add new patch to resolveBOOTSTD->BLKrecursion withKconfigQuoted 8 lines
Quoted 5 lines
boot/Kconfig | 2 +- configs/gardena-smart-gateway-mt7688_defconfig | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)Applied to u-boot-dm, thanks!
No, this is wrong, it's pulling in BOOTSTD on a ton of platforms that didn't have it before.
This affects 103 boards and the size growth is considerable:
aarch64: (for 22/22 boards) all +15697.0 bss +26.2 data +710.9 rodata +1822.1 text +13137.8 arc: (for 4/4 boards) all +15338.0 bss +4.0 data +526.0 rodata +2096.0 text +12712.0 arm: (for 26/26 boards) all +18882.8 data +619.2 rodata +1998.8 text +16264.8 m68k: (for 17/17 boards) all +23859.9 bss +3.5 data +1595.8 rodata +1722.8 text +20537.8 microblaze: (for 1/1 boards) all +24713.0 bss -88.0 data +1248.0 rodata +2288.0 text +21265.0 mips: (for 23/23 boards) all +21659.1 bss +39.5 data +746.6 rodata +2155.7 text +18717.4 nios2: (for 2/2 boards) all +24856.0 bss +4.0 data +704.0 text +24148.0powerpc: (for 13/13 boards) all +21746.6 data +836.3 rodata +807.2
text +20103.2Added options are:
+ all:
CONFIG_BOOTDEV_ETH=1CONFIG_BOOTMETH_EXTLINUX=1CONFIG_BOOTMETH_GLOBAL=1CONFIG_BOOTMETH_VBE=1CONFIG_BOOTMETH_VBE_REQUEST=1CONFIG_BOOTMETH_VBE_SIMPLE=1CONFIG_BOOTMETH_VBE_SIMPLE_OS=1CONFIG_BOOTSTD=1CONFIG_BOOTSTD_BOOTCOMMAND=1CONFIG_CMD_BOOTFLOW=1CONFIG_MENU=1CONFIG_PXE_UTILS=1Quoted 6 lines
Quoted 3 lines
Should I manually disable it on those platforms? I've reached the point where bootstd needs to be available when BLK is not enabled, so need some sort of solution.
What is the use case for needing all of this, without BLK being set? I'm not sure which platforms that grew here also need bootstd?
It is just that some XPL (I can say that now) platforms don't enable BLK but do need to read from a device, e.g. MMC.
Quoted 7 lines
Quoted 3 lines
Er, how is that an issue for any of the XPL phases? We have {SPL,TPL,VPL}_BLK symbols. And BLK itself is def_bool'd on DM and MMC, etc. And all boards enable DM now.
I was using
MMC_TINY... I still have one more series for rk3399...so if things build OK I can perhaps just drop this patch and figure this out later?
Yeah, please drop this for now and re-visit things. MMC_TINY is only for SPL (but tested as CONFIG_IS_ENABLED(MMC_TINY) because maybe it makes sense in the TPL sense? But it's distinctly not BLK and DM, iirc).
Signature · 1 line
Tom
Re: [PATCH v3 3/8] bootstd: Avoid depending on BLK
Hi Tom,
Quoted 128 lines · Tom Rini
Quoted 126 lines · Simon Glass
Hi Tom,
Quoted 122 lines · Tom Rini
Quoted 111 lines · Simon Glass
Hi Tom,
Quoted 108 lines · Tom Rini
Quoted 105 lines · Simon Glass
Hi Tom,
Quoted 63 lines · Tom Rini
Quoted 60 lines · Simon Glass
In principle bootstd can work without block devices, even if it does require driver model to be enabled in that case.
The use of a 'depends on BLK' for BOOTSTD conflicts with the way 'BLK' is now defined, producing recursive errors through multiple different paths, one of which is this (with
Linksprite_pcDuino3andBOOTSTD_DEFAULTSenabled):arch/arm/Kconfig:7:error: recursive dependency detected!
arch/arm/Kconfig:7: symbol ARM64 is selected byARCH_UNIPHIER_V8_MULTIarch/arm/mach-uniphier/Kconfig:17: symbolARCH_UNIPHIER_V8_MULTIis
part of choice <choice>
arch/arm/mach-uniphier/Kconfig:6: choice <choice> contains symbol
ARCH_UNIPHIER_V8_MULTI
arch/arm/mach-uniphier/Kconfig:17: symbolARCH_UNIPHIER_V8_MULTIis
part of choice SPL
arch/arm/mach-stm32mp/Kconfig:3: symbol SPL depends onSUPPORT_SPLcommon/spl/Kconfig:1: symbolSUPPORT_SPLis selected byASPEED_AST2600arch/arm/mach-aspeed/Kconfig:26: symbolASPEED_AST2600is part of
choice <choice>
arch/arm/mach-aspeed/Kconfig:12: choice <choice> contains symbolASPEED_AST2500 arch/arm/mach-aspeed/Kconfig:17: symbol ASPEED_AST2500 is part of choice DM_RESET arch/arm/mach-renesas/Kconfig.rcar3:197: symbol DM_RESET is selected by CLK_RCAR_GEN3 drivers/clk/renesas/Kconfig:53: symbol CLK_RCAR_GEN3 depends on CLK_RENESAS drivers/clk/renesas/Kconfig:1: symbol CLK_RENESAS depends on CLK drivers/clk/Kconfig:3: symbol CLK is selected by IMX8M_POWER_DOMAIN drivers/power/domain/Kconfig:35: symbol IMX8M_POWER_DOMAIN depends on POWER_DOMAIN drivers/power/domain/Kconfig:3: symbol POWER_DOMAIN is selected by BCM6318_USBH_PHY
drivers/phy/Kconfig:83: symbolBCM6318_USBH_PHYdepends on PHYdrivers/phy/Kconfig:4: symbol PHY is selected byUSB_EHCI_MX7drivers/usb/host/Kconfig:211: symbolUSB_EHCI_MX7depends on USBdrivers/usb/Kconfig:1: symbol USB is selected byBOOTSTD_DEFAULTSboot/Kconfig:455: symbolBOOTSTD_DEFAULTSdepends on BOOTSTD boot/Kconfig:398: symbol BOOTSTD depends on BLKdrivers/block/Kconfig:1: symbol BLK is selected by PVBLOCKdrivers/xen/Kconfig:1: symbol PVBLOCK depends on XEN Kconfig:176: symbol XEN depends on ARM64We don't want to revert the change to BLK, which has been in place for a year now. We don't want to select BLK in BOOTSTD since it should support booting without block devices. The only realistic option is to remove BOOTSTD's dependency on BLK.
Disable standard boot on the one board which fails.
Signed-off-by Simon Glass <[email protected]>---
Changes in v3:
- Drop wip (work-in-progress) comment in commitChanges in v2:
- Add new patch to resolveBOOTSTD->BLKrecursion withKconfigQuoted 8 lines
Quoted 5 lines
boot/Kconfig | 2 +- configs/gardena-smart-gateway-mt7688_defconfig | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)Applied to u-boot-dm, thanks!
No, this is wrong, it's pulling in BOOTSTD on a ton of platforms that didn't have it before.
This affects 103 boards and the size growth is considerable:
aarch64: (for 22/22 boards) all +15697.0 bss +26.2 data +710.9 rodata +1822.1 text +13137.8 arc: (for 4/4 boards) all +15338.0 bss +4.0 data +526.0 rodata +2096.0 text +12712.0 arm: (for 26/26 boards) all +18882.8 data +619.2 rodata +1998.8 text +16264.8 m68k: (for 17/17 boards) all +23859.9 bss +3.5 data +1595.8 rodata +1722.8 text +20537.8 microblaze: (for 1/1 boards) all +24713.0 bss -88.0 data +1248.0 rodata +2288.0 text +21265.0 mips: (for 23/23 boards) all +21659.1 bss +39.5 data +746.6 rodata +2155.7 text +18717.4 nios2: (for 2/2 boards) all +24856.0 bss +4.0 data +704.0 text +24148.0powerpc: (for 13/13 boards) all +21746.6 data +836.3 rodata +807.2
text +20103.2Added options are:
+ all:
CONFIG_BOOTDEV_ETH=1CONFIG_BOOTMETH_EXTLINUX=1CONFIG_BOOTMETH_GLOBAL=1CONFIG_BOOTMETH_VBE=1CONFIG_BOOTMETH_VBE_REQUEST=1CONFIG_BOOTMETH_VBE_SIMPLE=1CONFIG_BOOTMETH_VBE_SIMPLE_OS=1CONFIG_BOOTSTD=1CONFIG_BOOTSTD_BOOTCOMMAND=1CONFIG_CMD_BOOTFLOW=1CONFIG_MENU=1CONFIG_PXE_UTILS=1Should I manually disable it on those platforms? I've reached the point where bootstd needs to be available when BLK is not enabled, so need some sort of solution.
Quoted 5 lines
Quoted 2 lines
What is the use case for needing all of this, without BLK being set? I'm not sure which platforms that grew here also need bootstd?
It is just that some XPL (I can say that now) platforms don't enable BLK but do need to read from a device, e.g. MMC.
Er, how is that an issue for any of the XPL phases? We have {SPL,TPL,VPL}_BLK symbols. And BLK itself is def_bool'd on DM and MMC, etc. And all boards enable DM now.
Quoted 7 lines
Quoted 3 lines
I was using
MMC_TINY... I still have one more series for rk3399...so if things build OK I can perhaps just drop this patch and figure this out later?Yeah, please drop this for now and re-visit things.
MMC_TINYis only for SPL (but tested asCONFIG_IS_ENABLED(MMC_TINY)because maybe it makes sense in the TPL sense? But it's distinctly not BLK and DM, iirc).
Yes, I meant XPL_BLK, not BLK, oops.
Regards,
Simon
Re: [PATCH v3 3/8] bootstd: Avoid depending on BLK
Hi Tom,
Quoted 136 lines · Simon Glass
Hi Tom,
Quoted 132 lines · Tom Rini
Quoted 129 lines · Simon Glass
Hi Tom,
Quoted 116 lines · Tom Rini
Quoted 114 lines · Simon Glass
Hi Tom,
Quoted 110 lines · Tom Rini
Quoted 102 lines · Simon Glass
Hi Tom,
Quoted 63 lines · Tom Rini
Quoted 60 lines · Simon Glass
In principle bootstd can work without block devices, even if it does require driver model to be enabled in that case.
The use of a 'depends on BLK' for BOOTSTD conflicts with the way 'BLK' is now defined, producing recursive errors through multiple different paths, one of which is this (with
Linksprite_pcDuino3andBOOTSTD_DEFAULTSenabled):arch/arm/Kconfig:7:error: recursive dependency detected!
arch/arm/Kconfig:7: symbol ARM64 is selected byARCH_UNIPHIER_V8_MULTIarch/arm/mach-uniphier/Kconfig:17: symbolARCH_UNIPHIER_V8_MULTIis
part of choice <choice>
arch/arm/mach-uniphier/Kconfig:6: choice <choice> contains symbol
ARCH_UNIPHIER_V8_MULTI
arch/arm/mach-uniphier/Kconfig:17: symbolARCH_UNIPHIER_V8_MULTIis
part of choice SPL
arch/arm/mach-stm32mp/Kconfig:3: symbol SPL depends onSUPPORT_SPLcommon/spl/Kconfig:1: symbolSUPPORT_SPLis selected byASPEED_AST2600arch/arm/mach-aspeed/Kconfig:26: symbolASPEED_AST2600is part of
choice <choice>
arch/arm/mach-aspeed/Kconfig:12: choice <choice> contains symbolASPEED_AST2500 arch/arm/mach-aspeed/Kconfig:17: symbol ASPEED_AST2500 is part of choice DM_RESET arch/arm/mach-renesas/Kconfig.rcar3:197: symbol DM_RESET is selected by CLK_RCAR_GEN3 drivers/clk/renesas/Kconfig:53: symbol CLK_RCAR_GEN3 depends on CLK_RENESAS drivers/clk/renesas/Kconfig:1: symbol CLK_RENESAS depends on CLK drivers/clk/Kconfig:3: symbol CLK is selected by IMX8M_POWER_DOMAIN drivers/power/domain/Kconfig:35: symbol IMX8M_POWER_DOMAIN depends on POWER_DOMAIN drivers/power/domain/Kconfig:3: symbol POWER_DOMAIN is selected by BCM6318_USBH_PHY
drivers/phy/Kconfig:83: symbolBCM6318_USBH_PHYdepends on PHYdrivers/phy/Kconfig:4: symbol PHY is selected byUSB_EHCI_MX7drivers/usb/host/Kconfig:211: symbolUSB_EHCI_MX7depends on USBdrivers/usb/Kconfig:1: symbol USB is selected byBOOTSTD_DEFAULTSboot/Kconfig:455: symbolBOOTSTD_DEFAULTSdepends on BOOTSTD boot/Kconfig:398: symbol BOOTSTD depends on BLKdrivers/block/Kconfig:1: symbol BLK is selected by PVBLOCKdrivers/xen/Kconfig:1: symbol PVBLOCK depends on XEN Kconfig:176: symbol XEN depends on ARM64We don't want to revert the change to BLK, which has been in place for a year now. We don't want to select BLK in BOOTSTD since it should support booting without block devices. The only realistic option is to remove BOOTSTD's dependency on BLK.
Disable standard boot on the one board which fails.
Signed-off-by Simon Glass <[email protected]>---
Changes in v3:
- Drop wip (work-in-progress) comment in commitChanges in v2:
- Add new patch to resolveBOOTSTD->BLKrecursion withKconfigQuoted 8 lines
Quoted 5 lines
boot/Kconfig | 2 +- configs/gardena-smart-gateway-mt7688_defconfig | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)Applied to u-boot-dm, thanks!
No, this is wrong, it's pulling in BOOTSTD on a ton of platforms that didn't have it before.
This affects 103 boards and the size growth is considerable:
aarch64: (for 22/22 boards) all +15697.0 bss +26.2 data +710.9 rodata +1822.1 text +13137.8 arc: (for 4/4 boards) all +15338.0 bss +4.0 data +526.0 rodata +2096.0 text +12712.0 arm: (for 26/26 boards) all +18882.8 data +619.2 rodata +1998.8 text +16264.8 m68k: (for 17/17 boards) all +23859.9 bss +3.5 data +1595.8 rodata +1722.8 text +20537.8 microblaze: (for 1/1 boards) all +24713.0 bss -88.0 data +1248.0 rodata +2288.0 text +21265.0 mips: (for 23/23 boards) all +21659.1 bss +39.5 data +746.6 rodata +2155.7 text +18717.4 nios2: (for 2/2 boards) all +24856.0 bss +4.0 data +704.0 text +24148.0powerpc: (for 13/13 boards) all +21746.6 data +836.3 rodata +807.2
text +20103.2Added options are:
+ all:
CONFIG_BOOTDEV_ETH=1CONFIG_BOOTMETH_EXTLINUX=1CONFIG_BOOTMETH_GLOBAL=1CONFIG_BOOTMETH_VBE=1CONFIG_BOOTMETH_VBE_REQUEST=1CONFIG_BOOTMETH_VBE_SIMPLE=1CONFIG_BOOTMETH_VBE_SIMPLE_OS=1CONFIG_BOOTSTD=1CONFIG_BOOTSTD_BOOTCOMMAND=1CONFIG_CMD_BOOTFLOW=1CONFIG_MENU=1CONFIG_PXE_UTILS=1Quoted 3 lines
Should I manually disable it on those platforms? I've reached the point where bootstd needs to be available when BLK is not enabled, so need some sort of solution.
What is the use case for needing all of this, without BLK being set? I'm not sure which platforms that grew here also need bootstd?
Quoted 6 lines
Quoted 2 lines
It is just that some XPL (I can say that now) platforms don't enable BLK but do need to read from a device, e.g. MMC.
Er, how is that an issue for any of the XPL phases? We have {SPL,TPL,VPL}_BLK symbols. And BLK itself is def_bool'd on DM and MMC, etc. And all boards enable DM now.
I was using
MMC_TINY... I still have one more series for rk3399...so if things build OK I can perhaps just drop this patch and figure this out later?
Quoted 5 lines
Quoted 3 lines
Yeah, please drop this for now and re-visit things.
MMC_TINYis only for SPL (but tested asCONFIG_IS_ENABLED(MMC_TINY)because maybe it makes sense in the TPL sense? But it's distinctly not BLK and DM, iirc).Yes, I meant
XPL_BLK, not BLK, oops.
This objection is one of a few things blocking the sunxi bootstd conversion. If you want to see the problem for yourself, try building Linksprite_pcDuino3 with this series applied sans this patch.
The other thing blocking it is bootmgr, which we either need to disable for sunxi, or revert a patch which the author doesn't want reverted.
So for now I'll just send a v4 with patches for those two things and we can discuss it again.
Regards,
Simon
Re: [PATCH v3 3/8] bootstd: Avoid depending on BLK
Quoted 149 lines · Simon Glass
Hi Tom,
Quoted 136 lines · Simon Glass
Hi Tom,
Quoted 132 lines · Tom Rini
Quoted 129 lines · Simon Glass
Hi Tom,
Quoted 116 lines · Tom Rini
Quoted 114 lines · Simon Glass
Hi Tom,
Quoted 110 lines · Tom Rini
Quoted 102 lines · Simon Glass
Hi Tom,
Quoted 63 lines · Tom Rini
Quoted 60 lines · Simon Glass
In principle bootstd can work without block devices, even if it does require driver model to be enabled in that case.
The use of a 'depends on BLK' for BOOTSTD conflicts with the way 'BLK' is now defined, producing recursive errors through multiple different paths, one of which is this (with
Linksprite_pcDuino3andBOOTSTD_DEFAULTSenabled):arch/arm/Kconfig:7:error: recursive dependency detected!
arch/arm/Kconfig:7: symbol ARM64 is selected byARCH_UNIPHIER_V8_MULTIarch/arm/mach-uniphier/Kconfig:17: symbolARCH_UNIPHIER_V8_MULTIis
part of choice <choice>
arch/arm/mach-uniphier/Kconfig:6: choice <choice> contains symbol
ARCH_UNIPHIER_V8_MULTI
arch/arm/mach-uniphier/Kconfig:17: symbolARCH_UNIPHIER_V8_MULTIis
part of choice SPL
arch/arm/mach-stm32mp/Kconfig:3: symbol SPL depends onSUPPORT_SPLcommon/spl/Kconfig:1: symbolSUPPORT_SPLis selected byASPEED_AST2600arch/arm/mach-aspeed/Kconfig:26: symbolASPEED_AST2600is part of
choice <choice>
arch/arm/mach-aspeed/Kconfig:12: choice <choice> contains symbolASPEED_AST2500 arch/arm/mach-aspeed/Kconfig:17: symbol ASPEED_AST2500 is part of choice DM_RESET arch/arm/mach-renesas/Kconfig.rcar3:197: symbol DM_RESET is selected by CLK_RCAR_GEN3 drivers/clk/renesas/Kconfig:53: symbol CLK_RCAR_GEN3 depends on CLK_RENESAS drivers/clk/renesas/Kconfig:1: symbol CLK_RENESAS depends on CLK drivers/clk/Kconfig:3: symbol CLK is selected by IMX8M_POWER_DOMAIN drivers/power/domain/Kconfig:35: symbol IMX8M_POWER_DOMAIN depends on POWER_DOMAIN drivers/power/domain/Kconfig:3: symbol POWER_DOMAIN is selected by BCM6318_USBH_PHY
drivers/phy/Kconfig:83: symbolBCM6318_USBH_PHYdepends on PHYdrivers/phy/Kconfig:4: symbol PHY is selected byUSB_EHCI_MX7drivers/usb/host/Kconfig:211: symbolUSB_EHCI_MX7depends on USBdrivers/usb/Kconfig:1: symbol USB is selected byBOOTSTD_DEFAULTSboot/Kconfig:455: symbolBOOTSTD_DEFAULTSdepends on BOOTSTD boot/Kconfig:398: symbol BOOTSTD depends on BLKdrivers/block/Kconfig:1: symbol BLK is selected by PVBLOCKdrivers/xen/Kconfig:1: symbol PVBLOCK depends on XEN Kconfig:176: symbol XEN depends on ARM64We don't want to revert the change to BLK, which has been in place for a year now. We don't want to select BLK in BOOTSTD since it should support booting without block devices. The only realistic option is to remove BOOTSTD's dependency on BLK.
Disable standard boot on the one board which fails.
Signed-off-by Simon Glass <[email protected]>---
Changes in v3:
- Drop wip (work-in-progress) comment in commitChanges in v2:
- Add new patch to resolveBOOTSTD->BLKrecursion withKconfigQuoted 8 lines
Quoted 5 lines
boot/Kconfig | 2 +- configs/gardena-smart-gateway-mt7688_defconfig | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)Applied to u-boot-dm, thanks!
No, this is wrong, it's pulling in BOOTSTD on a ton of platforms that didn't have it before.
This affects 103 boards and the size growth is considerable:
aarch64: (for 22/22 boards) all +15697.0 bss +26.2 data +710.9 rodata +1822.1 text +13137.8 arc: (for 4/4 boards) all +15338.0 bss +4.0 data +526.0 rodata +2096.0 text +12712.0 arm: (for 26/26 boards) all +18882.8 data +619.2 rodata +1998.8 text +16264.8 m68k: (for 17/17 boards) all +23859.9 bss +3.5 data +1595.8 rodata +1722.8 text +20537.8 microblaze: (for 1/1 boards) all +24713.0 bss -88.0 data +1248.0 rodata +2288.0 text +21265.0 mips: (for 23/23 boards) all +21659.1 bss +39.5 data +746.6 rodata +2155.7 text +18717.4 nios2: (for 2/2 boards) all +24856.0 bss +4.0 data +704.0 text +24148.0powerpc: (for 13/13 boards) all +21746.6 data +836.3 rodata +807.2
text +20103.2Added options are:
+ all:
CONFIG_BOOTDEV_ETH=1CONFIG_BOOTMETH_EXTLINUX=1CONFIG_BOOTMETH_GLOBAL=1CONFIG_BOOTMETH_VBE=1CONFIG_BOOTMETH_VBE_REQUEST=1CONFIG_BOOTMETH_VBE_SIMPLE=1CONFIG_BOOTMETH_VBE_SIMPLE_OS=1CONFIG_BOOTSTD=1CONFIG_BOOTSTD_BOOTCOMMAND=1CONFIG_CMD_BOOTFLOW=1CONFIG_MENU=1CONFIG_PXE_UTILS=1Quoted 3 lines
Should I manually disable it on those platforms? I've reached the point where bootstd needs to be available when BLK is not enabled, so need some sort of solution.
What is the use case for needing all of this, without BLK being set? I'm not sure which platforms that grew here also need bootstd?
Quoted 6 lines
Quoted 2 lines
It is just that some XPL (I can say that now) platforms don't enable BLK but do need to read from a device, e.g. MMC.
Er, how is that an issue for any of the XPL phases? We have {SPL,TPL,VPL}_BLK symbols. And BLK itself is def_bool'd on DM and MMC, etc. And all boards enable DM now.
I was using
MMC_TINY... I still have one more series for rk3399...so if things build OK I can perhaps just drop this patch and figure this out later?Quoted 5 lines
Quoted 3 lines
Yeah, please drop this for now and re-visit things.
MMC_TINYis only for SPL (but tested asCONFIG_IS_ENABLED(MMC_TINY)because maybe it makes sense in the TPL sense? But it's distinctly not BLK and DM, iirc).Yes, I meant
XPL_BLK, not BLK, oops.This objection is one of a few things blocking the sunxi bootstd conversion. If you want to see the problem for yourself, try building
Linksprite_pcDuino3with this series applied sans this patch.
Quoted 6 lines
The other thing blocking it is bootmgr, which we either need to disable for sunxi, or revert a patch which the author doesn't want reverted.
So for now I'll just send a v4 with patches for those two things and we can discuss it again.
We're not going to get the sunxi series in for v2025.01, so we have time to think about this still and try and get the code to match up with the use cases.
Signature · 1 line
Tom
Re: [PATCH v3 3/8] bootstd: Avoid depending on BLK
Hi Tom,
Quoted 19 lines · Tom Rini
Quoted 17 lines · Simon Glass
Hi Tom,
Quoted 14 lines · Simon Glass
Hi Tom,
Quoted 10 lines · Tom Rini
Quoted 8 lines · Simon Glass
Hi Tom,
Quoted 5 lines · Tom Rini
Quoted 3 lines · Simon Glass
Hi Tom,
On Fri, 18 Oct 2024 at 09:11, Tom Rini <[email protected]>
Quoted 5 lines · wrote:
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines · Simon Glass
Quoted 3 lines
Hi Tom,
On Thu, 17 Oct 2024 at 22:39, Tom Rini <[email protected]>
Quoted 2 lines · wrote:
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
On Thu, Oct 17, 2024 at 04:12:02PM -0700, Simon Glass
Quoted 2 lines · wrote:
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
In principle bootstd can work without block devices,
even if it does
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
require driver model to be enabled in that case.
The use of a 'depends on BLK' for BOOTSTD conflicts
with the way 'BLK'
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
is now defined, producing recursive errors through
multiple different
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
paths, one of which is this (with
Linksprite_pcDuino3
and
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
BOOTSTD_DEFAULTSenabled):arch/arm/Kconfig:7:error: recursive dependency
detected!
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
arch/arm/Kconfig:7: symbol ARM64 is selected by
ARCH_UNIPHIER_V8_MULTI
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
arch/arm/mach-uniphier/Kconfig:17: symbol
ARCH_UNIPHIER_V8_MULTI is
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
part of choice <choice>
arch/arm/mach-uniphier/Kconfig:6: choice <choice>
contains symbol
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
ARCH_UNIPHIER_V8_MULTI
arch/arm/mach-uniphier/Kconfig:17: symbol
ARCH_UNIPHIER_V8_MULTI is
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
part of choice SPL
arch/arm/mach-stm32mp/Kconfig:3: symbol SPL depends
on SUPPORT_SPL
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
common/spl/Kconfig:1: symbol
SUPPORT_SPLis
selected by ASPEED_AST2600
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
arch/arm/mach-aspeed/Kconfig:26: symbol
ASPEED_AST2600 is part of
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
choice <choice>
arch/arm/mach-aspeed/Kconfig:12: choice <choice>
contains symbol
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
ASPEED_AST2500
arch/arm/mach-aspeed/Kconfig:17: symbol
ASPEED_AST2500 is part of
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
choice
DM_RESET
arch/arm/mach-renesas/Kconfig.rcar3:197: symbol
DM_RESET is selected
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
by
CLK_RCAR_GEN3
drivers/clk/renesas/Kconfig:53: symbol
CLK_RCAR_GEN3 depends on
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
CLK_RENESAS
drivers/clk/renesas/Kconfig:1: symbolCLK_RENESAS
depends on CLK
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/clk/Kconfig:3: symbol CLK is selected by
IMX8M_POWER_DOMAIN
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/power/domain/Kconfig:35: symbol
IMX8M_POWER_DOMAIN depends on
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
POWER_DOMAIN
drivers/power/domain/Kconfig:3: symbolPOWER_DOMAIN
is selected by
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
BCM6318_USBH_PHY
drivers/phy/Kconfig:83: symbolBCM6318_USBH_PHY
depends on PHY
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/phy/Kconfig:4: symbol PHY is selected by
USB_EHCI_MX7
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/usb/host/Kconfig:211: symbolUSB_EHCI_MX7
depends on USB
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
drivers/usb/Kconfig:1: symbol USB is selected by
BOOTSTD_DEFAULTS
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
boot/Kconfig:455: symbol
BOOTSTD_DEFAULTSdepends
on BOOTSTD
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
boot/Kconfig:398: symbol BOOTSTD depends on BLK
drivers/block/Kconfig:1: symbol BLK is selected by
PVBLOCK
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
drivers/xen/Kconfig:1: symbol PVBLOCK depends on XEN Kconfig:176: symbol XEN depends on ARM64We don't want to revert the change to BLK, which has
been in place for
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
a year now. We don't want to select BLK in BOOTSTD
since it should
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
support booting without block devices. The only
realistic option is to
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
remove BOOTSTD's dependency on BLK.
Disable standard boot on the one board which fails.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Signed-off-by Simon Glass <[email protected]>---
Changes in v3:
- Drop wip (work-in-progress) comment in commitChanges in v2:
- Add new patch to resolveBOOTSTD->BLKrecursion
with Kconfig
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
boot/Kconfig | 2 +- configs/gardena-smart-gateway-mt7688_defconfig | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)Applied to u-boot-dm, thanks!
No, this is wrong, it's pulling in BOOTSTD on a ton of
platforms that
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
didn't have it before.
This affects 103 boards and the size growth is
considerable:
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
aarch64: (for 22/22 boards) all +15697.0 bss +26.2
data +710.9
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
rodata +1822.1 text +13137.8
arc: (for 4/4 boards) all +15338.0 bss +4.0 data
+526.0 rodata
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
+2096.0 text +12712.0
arm: (for 26/26 boards) all +18882.8 data +619.2
rodata +1998.8
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
text +16264.8
m68k: (for 17/17 boards) all +23859.9 bss +3.5 data
+1595.8
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
rodata +1722.8 text +20537.8
microblaze: (for 1/1 boards) all +24713.0 bss -88.0 data
+1248.0
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
rodata +2288.0 text +21265.0
mips: (for 23/23 boards) all +21659.1 bss +39.5
data +746.6
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
rodata +2155.7 text +18717.4
nios2: (for 2/2 boards) all +24856.0 bss +4.0 data
+704.0 text +24148.0
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
powerpc: (for 13/13 boards) all +21746.6 data +836.3
rodata +807.2
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
text +20103.2
Added options are:
+ all:
CONFIG_BOOTDEV_ETH=1CONFIG_BOOTMETH_EXTLINUX=1CONFIG_BOOTMETH_GLOBAL=1CONFIG_BOOTMETH_VBE=1CONFIG_BOOTMETH_VBE_REQUEST=1CONFIG_BOOTMETH_VBE_SIMPLE=1CONFIG_BOOTMETH_VBE_SIMPLE_OS=1CONFIG_BOOTSTD=1CONFIG_BOOTSTD_BOOTCOMMAND=1CONFIG_CMD_BOOTFLOW=1
CONFIG_MENU=1
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
CONFIG_PXE_UTILS=1Should I manually disable it on those platforms? I've
reached the
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
point where bootstd needs to be available when BLK is not
enabled, so
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
need some sort of solution.
What is the use case for needing all of this, without BLK
being set? I'm
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
not sure which platforms that grew here also need bootstd?
It is just that some XPL (I can say that now) platforms don't
enable
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 1 line
BLK but do need to read from a device, e.g. MMC.
Er, how is that an issue for any of the XPL phases? We have {SPL,TPL,VPL}_BLK symbols. And BLK itself is def_bool'd on DM
and MMC,
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
etc. And all boards enable DM now.
I was using
MMC_TINY... I still have one more series for
rk3399...so
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
if things build OK I can perhaps just drop this patch and figure
this
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
out later?
Yeah, please drop this for now and re-visit things.
MMC_TINYis
only for
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
SPL (but tested as
CONFIG_IS_ENABLED(MMC_TINY)because maybe it
makes
Quoted 12 lines
Quoted 12 lines
Quoted 3 lines
Quoted 1 line
sense in the TPL sense? But it's distinctly not BLK and DM, iirc).
Yes, I meant
XPL_BLK, not BLK, oops.This objection is one of a few things blocking the sunxi bootstd conversion. If you want to see the problem for yourself, try building
Linksprite_pcDuino3with this series applied sans this patch.The other thing blocking it is bootmgr, which we either need to disable for sunxi, or revert a patch which the author doesn't want reverted.
Quoted 6 lines
Quoted 2 lines
So for now I'll just send a v4 with patches for those two things and we can discuss it again.
We're not going to get the sunxi series in for v2025.01, so we have time to think about this still and try and get the code to match up with the use cases.
That's quite unfortunate. This series was first sent 3 months ago.
Regards,
Simon
Re: [PATCH v3 3/8] bootstd: Avoid depending on BLK
Quoted 3 lines · Simon Glass
Hi Tom,
On Wed, 13 Nov 2024 at 08:24, Tom Rini <[email protected]> wrote:
[snip]
Quoted 5 lines
Quoted 3 lines
We're not going to get the sunxi series in for v2025.01, so we have time to think about this still and try and get the code to match up with the use cases.
That's quite unfortunate. This series was first sent 3 months ago.
And unfortunately it's not yet ready. The point of the migration was to find further real world challenges when used on a more wide variety of hardware, and in that regard it's been a wild success. So we need to make sure we don't get that wrong and have v2025.01 suddenly fail to work on some platforms.
Signature · 1 line
Tom
PATCH v3 4/8 sunxi: Add a bootmeth for FEL
In reply to Simon GlassAdd support for booting from a script loaded over FEL. This mirrors the bootcmd_fel provided by distro boot.
---
(no changes since v2)
Changes in v2:
- Put the FEL bootmeth before all other global bootmeths
boot/Kconfig | 14 ++++++++ boot/Makefile | 1 + boot/bootmeth_fel.c | 81 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 96 insertions(+) create mode 100644 boot/bootmeth_fel.c
boot/Kconfig +14 -0
@@ -585,6 +585,20 @@ config BOOTMETH_EFI_BOOTMGR the EFI binary to be launched is determined. To set the EFI variables use the eficonfig command. +config BOOTMETH_FEL + bool "Bootdev support for Sunxi FEL" + depends on ARCH_SUNXI + default y + help + Enables support for booting over USB on a Sunxi device. This uses + the FEL protocol and obtains the script address from the + 'fel_scriptaddr' environment variable. + + This method is only available if booting from FEL, i.e. the + 'fel_booted' environment variable is set. + + See https://linux-sunxi.org/FEL/Protocol for more information. + config BOOTMETH_QFW bool "Boot method using QEMU parameters" depends on QFW
boot/Makefile +1 -0
@@ -30,6 +30,7 @@ obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_EXTLINUX) += bootmeth_extlinux.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_EXTLINUX_PXE) += bootmeth_pxe.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_EFILOADER) += bootmeth_efi.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_CROS) += bootm.o bootm_os.o bootmeth_cros.o +obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_FEL) += bootmeth_fel.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_QFW) += bootmeth_qfw.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SANDBOX) += bootmeth_sandbox.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SCRIPT) += bootmeth_script.o
boot/bootmeth_fel.c new file +81 -0
81 lines not on this page · raw message
Signature · 1 line
2.34.1
Re: [PATCH v3 4/8] sunxi: Add a bootmeth for FEL
Hi Simon,
Quoted 24 lines · Simon Glass
Add support for booting from a script loaded over FEL. This mirrors the
bootcmd_felprovided by distro boot.Signed-off-by Simon Glass <[email protected]>Reviewed-by Mattijs Korpershoek <[email protected]>---
(no changes since v2)
Changes in v2:
- Put the FEL bootmeth before all other global bootmethsboot/Kconfig | 14 ++++++++ boot/Makefile | 1 + boot/bootmeth_fel.c | 81 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 96 insertions(+)create mode 100644
boot/bootmeth_fel.cboot/Kconfig +0
-0@@ -585,6 +585,20 @@ config BOOTMETH_EFI_BOOTMGR the EFI binary to be launched is determined. To set the EFI variables
boot/Kconfig config BOOTMETH_EFI_BOOTMGR · line 595
Quoted 10 lines
boot/Kconfig +8
-0use the eficonfig command. +config BOOTMETH_FEL + bool "Bootdev support for Sunxi FEL" + depends on ARCH_SUNXI + default y + help + Enables support for booting over USB on a Sunxi device. This uses + the FEL protocol and obtains the script address from the + 'fel_scriptaddr' environment variable.
This is not quite accurate, can you please change this to something like (feel free to amend):
=======
Enables support for executing an explicit boot script uploaded before via the USB FEL protocol. The 'fel_scriptaddr' environment variable holds the address of this script, taken from the SPL header.
=======
(The flow is: The sunxi-fel tool detects an mkimage script file among its command line parameters, and amends the uploaded SPL header to store its upload address. U-Boot proper will detect the address in the SPL header, and sets the fel_scriptaddr variable.)
The actual code looks alright, and it seems to work (TM).
Just one thing I noticed:
....
Hit any key to stop autoboot: 0
** Booting bootflow '<NULL>' with fel
Hello from FEL script!
Is this <NULL> expected? Shall there be anything better in there?
Cheers,
Andre
Quoted 108 lines
boot/Kconfig +6
-0+ + This method is only available if booting from FEL, i.e. the + 'fel_booted' environment variable is set. + + See https://linux-sunxi.org/FEL/Protocol for more information. + config BOOTMETH_QFW bool "Boot method using QEMU parameters" depends on QFWboot/Makefile +1
-0@@ -30,6 +30,7 @@ obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_EXTLINUX) += bootmeth_extlinux.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_EXTLINUX_PXE) += bootmeth_pxe.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_EFILOADER) += bootmeth_efi.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_CROS) += bootm.o bootm_os.o bootmeth_cros.o +obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_FEL) += bootmeth_fel.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_QFW) += bootmeth_qfw.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SANDBOX) += bootmeth_sandbox.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SCRIPT) += bootmeth_script.oboot/bootmeth_fel.c new file +81
-0@@ -0,0 +1,81 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* Bootmethod for sunxi FEL loading +* +* Copyright 2024 Google LLC +* Written by Simon Glass <[email protected]> +*/ + +#define LOG_CATEGORY UCLASS_BOOTSTD + +#include <bootdev.h> +#include <bootflow.h> +#include <bootmeth.h> +#include <command.h> +#include <dm.h> +#include <env.h> + +static int fel_check (struct udevice *dev,struct bootflow_iter *iter) +{ +return 0 ; +} + +static int fel_read_bootflow (struct udevice *dev,struct bootflow *bflow) +{ +if (!env_get ("fel_booted" ) || !env_get ("fel_scriptaddr" )) +return -ENOENT ; + + bflow->state =BOOTFLOWST_READY ; + +return 0 ; +} + +static int fel_read_file (struct udevice *dev,struct bootflow *bflow, +const char *file_path,ulong addr,ulong *sizep) +{ +return -ENOSYS ; +} + +static int fel_boot (struct udevice *dev,struct bootflow *bflow) +{ +ulong addr; +int ret; + + addr =env_get_hex ("fel_scriptaddr" ,0 ); + ret =cmd_source_script (addr,NULL ,NULL ); +if (ret) +return log_msg_ret ("boot" , ret); + +return 0 ; +} + +static int fel_bootmeth_bind (struct udevice *dev) +{ +struct bootmeth_uc_plat *plat =dev_get_uclass_plat (dev); + + plat->desc =IS_ENABLED (CONFIG_BOOTSTD_FULL ) ? +"Sunxi FEL boot over USB" :"FEL" ; + plat->flags =BOOTMETHF_GLOBAL ; + +return 0 ; +} + +static struct bootmeth_ops fel_bootmeth_ops = { + .check = fel_check, + .read_bootflow = fel_read_bootflow, + .read_file = fel_read_file, + .boot = fel_boot, +}; + +static const struct udevice_id fel_bootmeth_ids[] = { + { .compatible ="u-boot,fel-bootmeth" }, + { } +}; + +U_BOOT_DRIVER (bootmeth_2fel) = { + .name ="bootmeth_fel" , + .id =UCLASS_BOOTMETH , + .of_match = fel_bootmeth_ids, + .ops = &fel_bootmeth_ops, + .bind = fel_bootmeth_bind, +};
Re: [PATCH v3 4/8] sunxi: Add a bootmeth for FEL
Hi Andre,
Quoted 54 lines · Andre Przywara
Hi Simon,
Quoted 24 lines · Simon Glass
Add support for booting from a script loaded over FEL. This mirrors the
bootcmd_felprovided by distro boot.Signed-off-by Simon Glass <[email protected]>Reviewed-by Mattijs Korpershoek <[email protected]>---
(no changes since v2)
Changes in v2:
- Put the FEL bootmeth before all other global bootmethsboot/Kconfig | 14 ++++++++ boot/Makefile | 1 + boot/bootmeth_fel.c | 81 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 96 insertions(+)create mode 100644
boot/bootmeth_fel.cboot/Kconfig +0
-0@@ -585,6 +585,20 @@ config BOOTMETH_EFI_BOOTMGR the EFI binary to be launched is determined. To set the EFI variablesboot/Kconfig config BOOTMETH_EFI_BOOTMGR · line 595
Quoted 10 lines
boot/Kconfig +8
-0use the eficonfig command. +config BOOTMETH_FEL + bool "Bootdev support for Sunxi FEL" + depends on ARCH_SUNXI + default y + help + Enables support for booting over USB on a Sunxi device. This uses + the FEL protocol and obtains the script address from the + 'fel_scriptaddr' environment variable.This is not quite accurate, can you please change this to something like (feel free to amend):
=======
Enables support for executing an explicit boot script uploaded before via the USB FEL protocol. The 'fel_scriptaddr' environment variable holds the address of this script, taken from the SPL header.
=======(The flow is: The sunxi-fel tool detects an mkimage script file among its command line parameters, and amends the uploaded SPL header to store its upload address. U-Boot proper will detect the address in the SPL header, and sets the
fel_scriptaddrvariable.)The actual code looks alright, and it seems to work (TM).
Quoted 7 lines
Just one thing I noticed:
....
Hit any key to stop autoboot: 0
** Booting bootflow '<NULL>' with fel
Hello from FEL script!Is this <NULL> expected? Shall there be anything better in there?
Oh, I'll give it a name.
Thanks for reviewing.
Regards,
SImon
PATCH v3 5/8 sunxi: Move to bootstd
In reply to Simon GlassDrop support for distroboot and move to using bootstd instead.
---
(no changes since v2)
Changes in v2:
- Convert the other DISTRO_DEFAULTS in the Kconfig too
arch/arm/Kconfig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
arch/arm/Kconfig +5 -5
@@ -1147,7 +1147,7 @@ config ARCH_SUNXI select BINMAN select CMD_GPIO select CMD_MMC if MMC - select CMD_USB if DISTRO_DEFAULTS && USB_HOST + select CMD_USB if BOOTSTD_DEFAULTS && USB_HOST select CLK select DM select DM_GPIO
@@ -1169,9 +1169,9 @@ config ARCH_SUNXI select SUNXI_GPIO select SYS_NS16550 select SYS_THUMB_BUILD if !ARM64 - select USB if DISTRO_DEFAULTS - select USB_KEYBOARD if DISTRO_DEFAULTS && USB_HOST - select USB_STORAGE if DISTRO_DEFAULTS && USB_HOST + select USB if BOOTSTD_DEFAULTS + select USB_KEYBOARD if BOOTSTD_DEFAULTS && USB_HOST + select USB_STORAGE if BOOTSTD_DEFAULTS && USB_HOST select SPL_USE_TINY_PRINTF if SPL select USE_PREBOOT select SYS_RELOC_GD_ENV_ADDR
@@ -1179,7 +1179,7 @@ config ARCH_SUNXI imply CMD_DM imply CMD_GPT imply CMD_UBI if MTD_RAW_NAND - imply DISTRO_DEFAULTS + imply BOOTSTD_DEFAULTS imply DM_REGULATOR imply DM_REGULATOR_FIXED imply FAT_WRITE
Signature · 1 line
2.34.1
PATCH v3 6/8 sunxi: Drop old distro boot variables
In reply to Simon GlassThese are not needed as bootstd handles the boot now. Drop them.
Keep BOOTCMD_SUNXI_COMPAT for now since it does not relate to distro boot.
---
(no changes since v2)
Changes in v2:
- Keep BOOTCMD_SUNXI_COMPAT
include/configs/sunxi-common.h | 75 +--------------------------------- 1 file changed, 1 insertion(+), 74 deletions(-)
include/configs/sunxi-common.h +1 -74
@@ -156,76 +156,6 @@"fdt ram " FDT_ADDR_R " 0x100000;" \ "ramdisk ram " RAMDISK_ADDR_R " 0x4000000\0" -/**************************************************************************** -* definitions for the distro boot system * - ****************************************************************************/ -#ifdef CONFIG_MMC -#if CONFIG_MMC_SUNXI_SLOT_EXTRA !=-1 -#define BOOTENV_DEV_MMC_AUTO (devtypeu, devtypel, instance) \ - BOOTENV_DEV_MMC(MMC, mmc, 0) \ - BOOTENV_DEV_MMC(MMC, mmc, 1) \ - "bootcmd_mmc_auto=" \ - "if test ${mmc_bootdev} -eq 1; then " \ - "run bootcmd_mmc1; " \ - "run bootcmd_mmc0; " \ - "elif test ${mmc_bootdev} -eq 0; then " \ - "run bootcmd_mmc0; " \ - "run bootcmd_mmc1; " \ - "fi\0" - -#define BOOTENV_DEV_NAME_MMC_AUTO (devtypeu, devtypel, instance) \ - "mmc_auto " - -#define BOOT_TARGET_DEVICES_MMC (func) func(MMC_AUTO, mmc_auto, na) -#else -#define BOOT_TARGET_DEVICES_MMC (func) func(MMC, mmc, 0) -#endif -#else -#define BOOT_TARGET_DEVICES_MMC (func) -#endif - -#ifdef CONFIG_AHCI -#define BOOT_TARGET_DEVICES_SCSI (func) func(SCSI, scsi, 0) -#else -#define BOOT_TARGET_DEVICES_SCSI (func) -#endif - -#ifdef CONFIG_USB_STORAGE -#define BOOT_TARGET_DEVICES_USB (func) func(USB, usb, 0) -#else -#define BOOT_TARGET_DEVICES_USB (func) -#endif - -#ifdef CONFIG_CMD_PXE -#define BOOT_TARGET_DEVICES_PXE (func) func(PXE, pxe, na) -#else -#define BOOT_TARGET_DEVICES_PXE (func) -#endif - -#ifdef CONFIG_CMD_DHCP -#define BOOT_TARGET_DEVICES_DHCP (func) func(DHCP, dhcp, na) -#else -#define BOOT_TARGET_DEVICES_DHCP (func) -#endif - -/* FEL boot support, auto-execute boot.scr if a script address was provided */ -#define BOOTENV_DEV_FEL (devtypeu, devtypel, instance) \ - "bootcmd_fel=" \ - "if test -n ${fel_booted} && test -n ${fel_scriptaddr}; then " \ - "echo '(FEL boot)'; " \ - "source ${fel_scriptaddr}; " \ - "fi\0" -#define BOOTENV_DEV_NAME_FEL (devtypeu, devtypel, instance) \ - "fel " - -#define BOOT_TARGET_DEVICES (func) \ - func(FEL, fel, na) \ - BOOT_TARGET_DEVICES_MMC(func) \ - BOOT_TARGET_DEVICES_SCSI(func) \ - BOOT_TARGET_DEVICES_USB(func) \ - BOOT_TARGET_DEVICES_PXE(func) \ - BOOT_TARGET_DEVICES_DHCP(func) -#ifdef CONFIG_OLD_SUNXI_KERNEL_COMPAT #define BOOTCMD_SUNXI_COMPAT \ "bootcmd_sunxi_compat=" \
@@ -242,8 +172,6 @@#define BOOTCMD_SUNXI_COMPAT #endif -#include <config_distro_bootcmd.h> -#ifdef CONFIG_USB_KEYBOARD #define CONSOLE_STDIN_SETTINGS \ "stdin=serial,usbkbd\0"
@@ -296,7 +224,6 @@"uuid_gpt_esp=" UUID_GPT_ESP "\0" \"uuid_gpt_system=" UUID_GPT_SYSTEM "\0" \"partitions=" PARTS_DEFAULT "\0" \ -BOOTCMD_SUNXI_COMPAT \ - BOOTENV + BOOTCMD_SUNXI_COMPAT#endif /* _SUNXI_COMMON_CONFIG_H */
Signature · 1 line
2.34.1
PATCH v3 7/8 env: Provide a work-around for unquoting fdtfile
In reply to Simon GlassSome boards use a CONFIG option to specify the value of this variable. This is normally handled by efi_get_distro_fdt_name() but in the case of sunxi this does not work, since 'soc' is sunxi, but the files are in the allwinner directory.
Provide a work-around for this particular case.
---
Changes in v3:
- Fix 'supressed' typo
- Use backquotes to highlight DEFAULT_DEVICE_TREE
Makefile | 1 + doc/usage/environment.rst | 12 ++++++++++++ 2 files changed, 13 insertions(+)
Makefile +1 -0
@@ -1844,6 +1844,7 @@ quiet_cmd_gen_envp = ENVP $@ $(CPP) -P $(cpp_flags) -x assembler-with-cpp -undef \ -D__ASSEMBLY__ \ -D__UBOOT_CONFIG__ \ + -DDEFAULT_DEVICE_TREE=$(subst ",,$(CONFIG_DEFAULT_DEVICE_TREE)) \ -I . -I include -I $(srctree)/include \ -include linux/kconfig.h -include include/config.h \ -I$(srctree)/arch/$(ARCH)/include \
doc/usage/environment.rst +12 -0
@@ -87,6 +87,18 @@ settings. For example:: #include <env/ti/mmc.env> +Quotes are not suppressed, for example:: + + fdtfile=CONFIG_DEFAULT_DEVICE_TREE.dtb + # produces: fdtfile="sun7i-a20-pcduino3.dtb" + +For this particular issue you can use ``DEFAULT_DEVICE_TREE`` instead:: + + fdtfile=DEFAULT_DEVICE_TREE.dtb + # produces: fdtfile=sun7i-a20-pcduino3.dtb + +There is no general way to remove quotes. + If CONFIG_ENV_SOURCE_FILE is empty and the default filename is not present, then the old-style C environment is used instead. See below.
Signature · 1 line
2.34.1
PATCH v3 8/8 sunxi: Move to text environment
In reply to Simon GlassConvert these boards to use a text environment.
For the boards check, the only differences are extra spaces after the semicolons in 'dfu_alt_info_ram' and 'partitions', both of which are permitted.
Add in the special boot command for old kernels, dropping the unnecessary and confusing hex prefixes.
---
(no changes since v2)
Changes in v2:
- Keep bootcmd_sunxi_compat if OLD_SUNXI_KERNEL_COMPAT is enabled
board/sunxi/sunxi.env | 152 ++++++++++++++++++++++++++++++ include/configs/sunxi-common.h | 165 --------------------------------- 2 files changed, 152 insertions(+), 165 deletions(-) create mode 100644 board/sunxi/sunxi.env
board/sunxi/sunxi.env new file +152 -0
@@ -0,0 +1,152 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Common sunxi environment + * + * Copyright 2024 Google LLC + * Written by Simon Glass <[email protected]> + / + +/**************************************************************************** + * environment variables holding default load addresses * + ****************************************************************************/ +/* + * We cannot use expressions here, because expressions won't be evaluated in + * autoconf.mk. + */ +#ifdef CONFIG_ARM64 +/* + * Boards seem to come with at least 512MB of DRAM. + * The kernel should go at 512K, which is the default text offset (that will + * be adjusted at runtime if needed). + * There is no compression for arm64 kernels (yet), so leave some space + * for really big kernels, say 256MB for now. + * Scripts, PXE and DTBs should go afterwards, leaving the rest for the initrd. + */ +#define BOOTM_SIZE 0xa000000 +#define KERNEL_ADDR_R SDRAM_OFFSET(0080000) +#define KERNEL_COMP_ADDR_R SDRAM_OFFSET(4000000) +#define KERNEL_COMP_SIZE 0xb000000 +#define FDT_ADDR_R SDRAM_OFFSET(FA00000) +#define SCRIPT_ADDR_R SDRAM_OFFSET(FC00000) +#define PXEFILE_ADDR_R SDRAM_OFFSET(FD00000) +#define FDTOVERLAY_ADDR_R SDRAM_OFFSET(FE00000) +#define RAMDISK_ADDR_R SDRAM_OFFSET(FF00000) + +#elif (CONFIG_SUNXI_MINIMUM_DRAM_MB >= 256) +/* + * 160M RAM (256M minimum minus 64MB heap + 32MB for u-boot, stack, fb, etc. + * 32M uncompressed kernel, 16M compressed kernel, 1M fdt, + * 1M script, 1M pxe, 1M dt overlay and the ramdisk at the end. + */ +#define BOOTM_SIZE 0xa000000 +#define KERNEL_ADDR_R SDRAM_OFFSET(2000000) +#define FDT_ADDR_R SDRAM_OFFSET(3000000) +#define SCRIPT_ADDR_R SDRAM_OFFSET(3100000) +#define PXEFILE_ADDR_R SDRAM_OFFSET(3200000) +#define FDTOVERLAY_ADDR_R SDRAM_OFFSET(3300000) +#define RAMDISK_ADDR_R SDRAM_OFFSET(3400000) + +#elif (CONFIG_SUNXI_MINIMUM_DRAM_MB >= 64) +/* + * 64M RAM minus 2MB heap + 16MB for u-boot, stack, fb, etc. + * 16M uncompressed kernel, 8M compressed kernel, 1M fdt, + * 1M script, 1M pxe, 1M dt overlay and the ramdisk at the end. + */ +#define BOOTM_SIZE 0x2e00000 +#define KERNEL_ADDR_R SDRAM_OFFSET(1000000) +#define FDT_ADDR_R SDRAM_OFFSET(1800000) +#define SCRIPT_ADDR_R SDRAM_OFFSET(1900000) +#define PXEFILE_ADDR_R SDRAM_OFFSET(1A00000) +#define FDTOVERLAY_ADDR_R SDRAM_OFFSET(1B00000) +#define RAMDISK_ADDR_R SDRAM_OFFSET(1C00000) + +#elif (CONFIG_SUNXI_MINIMUM_DRAM_MB >= 32) +/* + * 32M RAM minus 2.5MB for u-boot, heap, stack, etc. + * 16M uncompressed kernel, 7M compressed kernel, 128K fdt, 64K script, + * 128K DT overlay, 128K PXE and the ramdisk in the rest (max. 5MB) + */ +#define BOOTM_SIZE 0x1700000 +#define KERNEL_ADDR_R SDRAM_OFFSET(1000000) +#define FDT_ADDR_R SDRAM_OFFSET(1d50000) +#define SCRIPT_ADDR_R SDRAM_OFFSET(1d40000) +#define PXEFILE_ADDR_R SDRAM_OFFSET(1d00000) +#define FDTOVERLAY_ADDR_R SDRAM_OFFSET(1d20000) +#define RAMDISK_ADDR_R SDRAM_OFFSET(1800000) + +#else +#error Need at least 32MB of DRAM. Please adjust load addresses. +#endif + +#define UUID_GPT_ESP "" + +#ifdef CONFIG_ARM64 +#define UUID_GPT_SYSTEM b921b045-1df0-41c3-af44-4c6f280d3fae +#else +#define UUID_GPT_SYSTEM 69dad710-2ce4-4e3c-b16c-21a1d49abed3 +#endif + +stdin=serial +#ifdef CONFIG_USB_KEYBOARD +stdin+=,usbkbd +#endif + +stdout=serial +stderr=serial +#ifdef CONFIG_VIDEO +stdout+=,vidconsole +stderr+=,vidconsole +#endif + +bootm_size=BOOTM_SIZE +kernel_addr_r=KERNEL_ADDR_R +fdt_addr_r=FDT_ADDR_R +scriptaddr=SCRIPT_ADDR_R +pxefile_addr_r=PXEFILE_ADDR_R +fdtoverlay_addr_r=FDTOVERLAY_ADDR_R +ramdisk_addr_r=RAMDISK_ADDR_R + +#ifdef CONFIG_ARM64 +kernel_comp_addr_r=KERNEL_COMP_ADDR_R +kernel_comp_size=KERNEL_COMP_SIZE +#endif + +dfu_alt_info_ram= + kernel ram KERNEL_ADDR_R 0x1000000; + fdt ram FDT_ADDR_R 0x100000; + ramdisk ram RAMDISK_ADDR_R 0x4000000 + +#ifdef CONFIG_ARM64 +fdtfile=allwinner/DEFAULT_DEVICE_TREE.dtb +#else +fdtfile=DEFAULT_DEVICE_TREE.dtb +#endif + +console=ttyS0,115200 + +uuid_gpt_esp=c12a7328-f81f-11d2-ba4b-00a0c93ec93b +#ifdef CONFIG_ARM64 +uuid_gpt_system=b921b045-1df0-41c3-af44-4c6f280d3fae +#else +uuid_gpt_system=69dad710-2ce4-4e3c-b16c-21a1d49abed3 +#endif + +partitions= + name=loader1,start=8k,size=32k,uuid=${uuid_gpt_loader1}; + name=loader2,size=984k,uuid=${uuid_gpt_loader2}; + name=esp,size=128M,bootable,uuid=${uuid_gpt_esp}; + name=system,size=-,uuid=${uuid_gpt_system}; + +/* support booting a very old kernel */ +#ifdef CONFIG_OLD_SUNXI_KERNEL_COMPAT +bootcmd_sunxi_compat= + setenv root /dev/mmcblk0p3 rootwait; + if ext2load mmc 0 44000000 uEnv.txt; then + "echo Loaded environment from uEnv.txt; + "env import -t 44000000 ${filesize}; + fi; + setenv bootargs console=${console} root=${root} ${extraargs}; + ext2load mmc 0 43000000 script.bin && + ext2load mmc 0 48000000 uImage && + bootm 48000000 +#endif
include/configs/sunxi-common.h +0 -165
169 lines not on this page · raw message
Signature · 1 line
2.34.1
Re: [PATCH v3 8/8] sunxi: Move to text environment
On Sun, 1 Sep 2024 16:27:34 -0600
Simon Glass <[email protected]> wrote:
Hi Simon,
Quoted 105 lines
Convert these boards to use a text environment.
For the boards check, the only differences are extra spaces after the semicolons in '
dfu_alt_info_ram' and 'partitions', both of which are permitted.Add in the special boot command for old kernels, dropping the unnecessary and confusing hex prefixes.
Signed-off-by Simon Glass <[email protected]>---
(no changes since v2)
Changes in v2:
- Keepbootcmd_sunxi_compatifOLD_SUNXI_KERNEL_COMPATis enabledboard/sunxi/sunxi.env | 152 ++++++++++++++++++++++++++++++ include/configs/sunxi-common.h | 165 --------------------------------- 2 files changed, 152 insertions(+), 165 deletions(-) create mode 100644 board/sunxi/sunxi.envboard/sunxi/sunxi.env new file +77
-0@@ -0,0 +1,152 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Common sunxi environment + * + * Copyright 2024 Google LLC + * Written by Simon Glass <[email protected]> + / + +/**************************************************************************** + * environment variables holding default load addresses * + ****************************************************************************/ +/* + * We cannot use expressions here, because expressions won't be evaluated in + * autoconf.mk. + */ +#ifdef CONFIG_ARM64 +/* + * Boards seem to come with at least 512MB of DRAM. + * The kernel should go at 512K, which is the default text offset (that will + * be adjusted at runtime if needed). + * There is no compression for arm64 kernels (yet), so leave some space + * for really big kernels, say 256MB for now. + * Scripts, PXE and DTBs should go afterwards, leaving the rest for the initrd. + */ +#define BOOTM_SIZE 0xa000000 +#define KERNEL_ADDR_R SDRAM_OFFSET(0080000) +#define KERNEL_COMP_ADDR_R SDRAM_OFFSET(4000000) +#define KERNEL_COMP_SIZE 0xb000000 +#define FDT_ADDR_R SDRAM_OFFSET(FA00000) +#define SCRIPT_ADDR_R SDRAM_OFFSET(FC00000) +#define PXEFILE_ADDR_R SDRAM_OFFSET(FD00000) +#define FDTOVERLAY_ADDR_R SDRAM_OFFSET(FE00000) +#define RAMDISK_ADDR_R SDRAM_OFFSET(FF00000) + +#elif (CONFIG_SUNXI_MINIMUM_DRAM_MB >= 256) +/* + * 160M RAM (256M minimum minus 64MB heap + 32MB for u-boot, stack, fb, etc. + * 32M uncompressed kernel, 16M compressed kernel, 1M fdt, + * 1M script, 1M pxe, 1M dt overlay and the ramdisk at the end. + */ +#define BOOTM_SIZE 0xa000000 +#define KERNEL_ADDR_R SDRAM_OFFSET(2000000) +#define FDT_ADDR_R SDRAM_OFFSET(3000000) +#define SCRIPT_ADDR_R SDRAM_OFFSET(3100000) +#define PXEFILE_ADDR_R SDRAM_OFFSET(3200000) +#define FDTOVERLAY_ADDR_R SDRAM_OFFSET(3300000) +#define RAMDISK_ADDR_R SDRAM_OFFSET(3400000) + +#elif (CONFIG_SUNXI_MINIMUM_DRAM_MB >= 64) +/* + * 64M RAM minus 2MB heap + 16MB for u-boot, stack, fb, etc. + * 16M uncompressed kernel, 8M compressed kernel, 1M fdt, + * 1M script, 1M pxe, 1M dt overlay and the ramdisk at the end. + */ +#define BOOTM_SIZE 0x2e00000 +#define KERNEL_ADDR_R SDRAM_OFFSET(1000000) +#define FDT_ADDR_R SDRAM_OFFSET(1800000) +#define SCRIPT_ADDR_R SDRAM_OFFSET(1900000) +#define PXEFILE_ADDR_R SDRAM_OFFSET(1A00000) +#define FDTOVERLAY_ADDR_R SDRAM_OFFSET(1B00000) +#define RAMDISK_ADDR_R SDRAM_OFFSET(1C00000) + +#elif (CONFIG_SUNXI_MINIMUM_DRAM_MB >= 32) +/* + * 32M RAM minus 2.5MB for u-boot, heap, stack, etc. + * 16M uncompressed kernel, 7M compressed kernel, 128K fdt, 64K script, + * 128K DT overlay, 128K PXE and the ramdisk in the rest (max. 5MB) + */ +#define BOOTM_SIZE 0x1700000 +#define KERNEL_ADDR_R SDRAM_OFFSET(1000000) +#define FDT_ADDR_R SDRAM_OFFSET(1d50000) +#define SCRIPT_ADDR_R SDRAM_OFFSET(1d40000) +#define PXEFILE_ADDR_R SDRAM_OFFSET(1d00000) +#define FDTOVERLAY_ADDR_R SDRAM_OFFSET(1d20000) +#define RAMDISK_ADDR_R SDRAM_OFFSET(1800000) + +#else
board/sunxi/sunxi.env line 87
Quoted 10 lines
board/sunxi/sunxi.env new file +10
-0+#error Need at least 32MB of DRAM. Please adjust load addresses. +#endif + +#define UUID_GPT_ESP "" + +#ifdef CONFIG_ARM64 +#define UUID_GPT_SYSTEM b921b045-1df0-41c3-af44-4c6f280d3fae +#else +#define UUID_GPT_SYSTEM 69dad710-2ce4-4e3c-b16c-21a1d49abed3 +#endif
Do we really need those definitions? In the header file those were later used in the actual (lower case) variable assignment, but here the UUIDs are assigned directly (below)?
Quoted 23 lines
board/sunxi/sunxi.env new file +23
-0+ +stdin=serial +#ifdef CONFIG_USB_KEYBOARD +stdin+=,usbkbd +#endif + +stdout=serial +stderr=serial +#ifdef CONFIG_VIDEO +stdout+=,vidconsole +stderr+=,vidconsole +#endif + +bootm_size=BOOTM_SIZE +kernel_addr_r=KERNEL_ADDR_R +fdt_addr_r=FDT_ADDR_R +scriptaddr=SCRIPT_ADDR_R +pxefile_addr_r=PXEFILE_ADDR_R +fdtoverlay_addr_r=FDTOVERLAY_ADDR_R +ramdisk_addr_r=RAMDISK_ADDR_R + +#ifdef CONFIG_ARM64 +kernel_comp_addr_r=KERNEL_COMP_ADDR_R
board/sunxi/sunxi.env line 120
Quoted 10 lines
board/sunxi/sunxi.env new file +10
-0+kernel_comp_size=KERNEL_COMP_SIZE +#endif + +dfu_alt_info_ram= + kernel ram KERNEL_ADDR_R 0x1000000; + fdt ram FDT_ADDR_R 0x100000; + ramdisk ram RAMDISK_ADDR_R 0x4000000 + +#ifdef CONFIG_ARM64 +fdtfile=allwinner/DEFAULT_DEVICE_TREE.dtb
I am confused, shouldn't that be CONFIG_DEFAULT_DEVICE_TREE? Or is there more magic involved? And it looks like something is prepending the directory name already:
(comparing the env between current master and after these patches) -fdtcontroladdr=fbf0b090 -fdtfile=allwinner/sun50i-h618-orangepi-zero3.dtb +fdtcontroladdr=fbf0aa30 +fdtfile=allwinner/allwinner/sun50i-h618-orangepi-zero3.dtb
(Or is this a problem with the switch to dts/upstream for the H616 I have in my tree already?)
Quoted 16 lines
board/sunxi/sunxi.env new file +16
-0+#else +fdtfile=DEFAULT_DEVICE_TREE.dtb +#endif + +console=ttyS0,115200 + +uuid_gpt_esp=c12a7328-f81f-11d2-ba4b-00a0c93ec93b +#ifdef CONFIG_ARM64 +uuid_gpt_system=b921b045-1df0-41c3-af44-4c6f280d3fae +#else +uuid_gpt_system=69dad710-2ce4-4e3c-b16c-21a1d49abed3 +#endif + +partitions= + name=loader1,start=8k,size=32k,uuid=${uuid_gpt_loader1}; + name=loader2,size=984k,uuid=${uuid_gpt_loader2};
board/sunxi/sunxi.env line 146
Quoted 10 lines
board/sunxi/sunxi.env new file +10
-0+ name=esp,size=128M,bootable,uuid=${uuid_gpt_esp}; + name=system,size=-,uuid=${uuid_gpt_system}; + +/* support booting a very old kernel */ +#ifdef CONFIG_OLD_SUNXI_KERNEL_COMPAT +bootcmd_sunxi_compat= + setenv root /dev/mmcblk0p3 rootwait; + if ext2load mmc 0 44000000 uEnv.txt; then + "echo Loaded environment from uEnv.txt; + "env import -t 44000000 ${filesize};
is the indentation and the initial quotation for those two lines a leftover from the old file?
The rest seems to be the same as before, effectively. Other than those nits I like the new way much better, didn't know we could now do this.
Cheers,
Andre
Quoted 180 lines
board/sunxi/sunxi.env new file +6
-0+ fi; + setenv bootargs console=${console} root=${root} ${extraargs}; + ext2load mmc 0 43000000 script.bin && + ext2load mmc 0 48000000 uImage && + bootm 48000000 +#endifinclude/configs/sunxi-common.h +0
-165@@ -61,169 +61,4 @@#define PHYS_SDRAM_0 CFG_SYS_SDRAM_BASE#define PHYS_SDRAM_0_SIZE 0x80000000/* 2 GiB */ -/**************************************************************************** -* environment variables holding default load addresses * -****************************************************************************/ -/* -* We cannot use expressions here, because expressions won't be evaluated in -* autoconf.mk. -*/ -#ifdef CONFIG_ARM64 -/* -* Boards seem to come with at least 512MB of DRAM. -* The kernel should go at 512K, which is the default text offset (that will -* be adjusted at runtime if needed). -* There is no compression for arm64 kernels (yet), so leave some space -* for really big kernels, say 256MB for now. -* Scripts, PXE and DTBs should go afterwards, leaving the rest for the initrd. -*/ -#define BOOTM_SIZE __stringify(0xa000000) -#define KERNEL_ADDR_R __stringify(SDRAM_OFFSET(0080000)) -#define KERNEL_COMP_ADDR_R __stringify(SDRAM_OFFSET(4000000)) -#define KERNEL_COMP_SIZE __stringify(0xb000000) -#define FDT_ADDR_R __stringify(SDRAM_OFFSET(FA00000)) -#define SCRIPT_ADDR_R __stringify(SDRAM_OFFSET(FC00000)) -#define PXEFILE_ADDR_R __stringify(SDRAM_OFFSET(FD00000)) -#define FDTOVERLAY_ADDR_R __stringify(SDRAM_OFFSET(FE00000)) -#define RAMDISK_ADDR_R __stringify(SDRAM_OFFSET(FF00000)) - -#elif (CONFIG_SUNXI_MINIMUM_DRAM_MB >=256 ) -/* -* 160M RAM (256M minimum minus 64MB heap + 32MB for u-boot, stack, fb, etc. -* 32M uncompressed kernel, 16M compressed kernel, 1M fdt, -* 1M script, 1M pxe, 1M dt overlay and the ramdisk at the end. -*/ -#define BOOTM_SIZE __stringify(0xa000000) -#define KERNEL_ADDR_R __stringify(SDRAM_OFFSET(2000000)) -#define FDT_ADDR_R __stringify(SDRAM_OFFSET(3000000)) -#define SCRIPT_ADDR_R __stringify(SDRAM_OFFSET(3100000)) -#define PXEFILE_ADDR_R __stringify(SDRAM_OFFSET(3200000)) -#define FDTOVERLAY_ADDR_R __stringify(SDRAM_OFFSET(3300000)) -#define RAMDISK_ADDR_R __stringify(SDRAM_OFFSET(3400000)) - -#elif (CONFIG_SUNXI_MINIMUM_DRAM_MB >=64 ) -/* -* 64M RAM minus 2MB heap + 16MB for u-boot, stack, fb, etc. -* 16M uncompressed kernel, 8M compressed kernel, 1M fdt, -* 1M script, 1M pxe, 1M dt overlay and the ramdisk at the end. -*/ -#define BOOTM_SIZE __stringify(0x2e00000) -#define KERNEL_ADDR_R __stringify(SDRAM_OFFSET(1000000)) -#define FDT_ADDR_R __stringify(SDRAM_OFFSET(1800000)) -#define SCRIPT_ADDR_R __stringify(SDRAM_OFFSET(1900000)) -#define PXEFILE_ADDR_R __stringify(SDRAM_OFFSET(1A00000)) -#define FDTOVERLAY_ADDR_R __stringify(SDRAM_OFFSET(1B00000)) -#define RAMDISK_ADDR_R __stringify(SDRAM_OFFSET(1C00000)) - -#elif (CONFIG_SUNXI_MINIMUM_DRAM_MB >=32 ) -/* -* 32M RAM minus 2.5MB for u-boot, heap, stack, etc. -* 16M uncompressed kernel, 7M compressed kernel, 128K fdt, 64K script, -* 128K DT overlay, 128K PXE and the ramdisk in the rest (max. 5MB) -*/ -#define BOOTM_SIZE __stringify(0x1700000) -#define KERNEL_ADDR_R __stringify(SDRAM_OFFSET(1000000)) -#define FDT_ADDR_R __stringify(SDRAM_OFFSET(1d50000)) -#define SCRIPT_ADDR_R __stringify(SDRAM_OFFSET(1d40000)) -#define PXEFILE_ADDR_R __stringify(SDRAM_OFFSET(1d00000)) -#define FDTOVERLAY_ADDR_R __stringify(SDRAM_OFFSET(1d20000)) -#define RAMDISK_ADDR_R __stringify(SDRAM_OFFSET(1800000)) - -#else -#error Need at least 32MB of DRAM. Please adjust load addresses. -#endif - -#define MEM_LAYOUT_ENV_SETTINGS \ - "bootm_size=" BOOTM_SIZE "\0" \ - "kernel_addr_r=" KERNEL_ADDR_R "\0" \ - "fdt_addr_r=" FDT_ADDR_R "\0" \ - "scriptaddr=" SCRIPT_ADDR_R "\0" \ - "pxefile_addr_r=" PXEFILE_ADDR_R "\0" \ - "fdtoverlay_addr_r=" FDTOVERLAY_ADDR_R "\0" \ - "ramdisk_addr_r=" RAMDISK_ADDR_R "\0" - -#ifdef CONFIG_ARM64 -#define MEM_LAYOUT_ENV_EXTRA_SETTINGS \ - "kernel_comp_addr_r=" KERNEL_COMP_ADDR_R "\0" \ - "kernel_comp_size=" KERNEL_COMP_SIZE "\0" -#else -#define MEM_LAYOUT_ENV_EXTRA_SETTINGS "" -#endif - -#define DFU_ALT_INFO_RAM \ - "dfu_alt_info_ram=" \ - "kernel ram " KERNEL_ADDR_R " 0x1000000;" \ - "fdt ram " FDT_ADDR_R " 0x100000;" \ - "ramdisk ram " RAMDISK_ADDR_R " 0x4000000\0" - -#ifdef CONFIG_OLD_SUNXI_KERNEL_COMPAT -#define BOOTCMD_SUNXI_COMPAT \ - "bootcmd_sunxi_compat=" \ - "setenv root /dev/mmcblk0p3 rootwait; " \ - "if ext2load mmc 0 0x44000000 uEnv.txt; then " \ - "echo Loaded environment from uEnv.txt; " \ - "env import -t 0x44000000 ${filesize}; " \ - "fi; " \ - "setenv bootargs console=${console} root=${root} ${extraargs}; " \ - "ext2load mmc 0 0x43000000 script.bin && " \ - "ext2load mmc 0 0x48000000 uImage && " \ - "bootm 0x48000000\0" -#else -#define BOOTCMD_SUNXI_COMPAT -#endif - -#ifdef CONFIG_USB_KEYBOARD -#define CONSOLE_STDIN_SETTINGS \ - "stdin=serial,usbkbd\0" -#else -#define CONSOLE_STDIN_SETTINGS \ - "stdin=serial\0" -#endif - -#ifdef CONFIG_VIDEO -#define CONSOLE_STDOUT_SETTINGS \ - "stdout=serial,vidconsole\0" \ - "stderr=serial,vidconsole\0" -#else -#define CONSOLE_STDOUT_SETTINGS \ - "stdout=serial\0" \ - "stderr=serial\0" -#endif - -#define PARTS_DEFAULT \ - "name=loader1,start=8k,size=32k,uuid=${uuid_gpt_loader1};" \ - "name=loader2,size=984k,uuid=${uuid_gpt_loader2};" \ - "name=esp,size=128M,bootable,uuid=${uuid_gpt_esp};" \ - "name=system,size=-,uuid=${uuid_gpt_system};" - -#define UUID_GPT_ESP "c12a7328-f81f-11d2-ba4b-00a0c93ec93b" - -#ifdef CONFIG_ARM64 -#define UUID_GPT_SYSTEM "b921b045-1df0-41c3-af44-4c6f280d3fae" -#else -#define UUID_GPT_SYSTEM "69dad710-2ce4-4e3c-b16c-21a1d49abed3" -#endif - -#define CONSOLE_ENV_SETTINGS \ - CONSOLE_STDIN_SETTINGS \ - CONSOLE_STDOUT_SETTINGS - -#ifdef CONFIG_ARM64 -#define FDTFILE "allwinner/" CONFIG_DEFAULT_DEVICE_TREE ".dtb" -#else -#define FDTFILE CONFIG_DEFAULT_DEVICE_TREE ".dtb" -#endif - -#define CFG_EXTRA_ENV_SETTINGS \ - CONSOLE_ENV_SETTINGS \ - MEM_LAYOUT_ENV_SETTINGS \ - MEM_LAYOUT_ENV_EXTRA_SETTINGS \ - DFU_ALT_INFO_RAM \ - "fdtfile=" FDTFILE "\0" \ - "console=ttyS0,115200\0" \ - "uuid_gpt_esp=" UUID_GPT_ESP "\0" \ - "uuid_gpt_system=" UUID_GPT_SYSTEM "\0" \ - "partitions=" PARTS_DEFAULT "\0" \ - BOOTCMD_SUNXI_COMPAT -#endif /* _SUNXI_COMMON_CONFIG_H */
Re: [PATCH v3 8/8] sunxi: Move to text environment
Hi Andre,
Quoted 117 lines · Andre Przywara
On Sun, 1 Sep 2024 16:27:34 -0600
Simon Glass <[email protected]> wrote:Hi Simon,
Quoted 111 lines
Convert these boards to use a text environment.
For the boards check, the only differences are extra spaces after the semicolons in '
dfu_alt_info_ram' and 'partitions', both of which are permitted.Add in the special boot command for old kernels, dropping the unnecessary and confusing hex prefixes.
Signed-off-by Simon Glass <[email protected]>---
(no changes since v2)
Changes in v2:
- Keepbootcmd_sunxi_compatifOLD_SUNXI_KERNEL_COMPATis enabledboard/sunxi/sunxi.env | 152 ++++++++++++++++++++++++++++++ include/configs/sunxi-common.h | 165 --------------------------------- 2 files changed, 152 insertions(+), 165 deletions(-) create mode 100644 board/sunxi/sunxi.envboard/sunxi/sunxi.env new file +83
-0@@ -0,0 +1,152 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Common sunxi environment + * + * Copyright 2024 Google LLC + * Written by Simon Glass <[email protected]> + / + +/**************************************************************************** + * environment variables holding default load addresses * + ****************************************************************************/ +/* + * We cannot use expressions here, because expressions won't be evaluated in + * autoconf.mk. + */ +#ifdef CONFIG_ARM64 +/* + * Boards seem to come with at least 512MB of DRAM. + * The kernel should go at 512K, which is the default text offset (that will + * be adjusted at runtime if needed). + * There is no compression for arm64 kernels (yet), so leave some space + * for really big kernels, say 256MB for now. + * Scripts, PXE and DTBs should go afterwards, leaving the rest for the initrd. + */ +#define BOOTM_SIZE 0xa000000 +#define KERNEL_ADDR_R SDRAM_OFFSET(0080000) +#define KERNEL_COMP_ADDR_R SDRAM_OFFSET(4000000) +#define KERNEL_COMP_SIZE 0xb000000 +#define FDT_ADDR_R SDRAM_OFFSET(FA00000) +#define SCRIPT_ADDR_R SDRAM_OFFSET(FC00000) +#define PXEFILE_ADDR_R SDRAM_OFFSET(FD00000) +#define FDTOVERLAY_ADDR_R SDRAM_OFFSET(FE00000) +#define RAMDISK_ADDR_R SDRAM_OFFSET(FF00000) + +#elif (CONFIG_SUNXI_MINIMUM_DRAM_MB >= 256) +/* + * 160M RAM (256M minimum minus 64MB heap + 32MB for u-boot, stack, fb, etc. + * 32M uncompressed kernel, 16M compressed kernel, 1M fdt, + * 1M script, 1M pxe, 1M dt overlay and the ramdisk at the end. + */ +#define BOOTM_SIZE 0xa000000 +#define KERNEL_ADDR_R SDRAM_OFFSET(2000000) +#define FDT_ADDR_R SDRAM_OFFSET(3000000) +#define SCRIPT_ADDR_R SDRAM_OFFSET(3100000) +#define PXEFILE_ADDR_R SDRAM_OFFSET(3200000) +#define FDTOVERLAY_ADDR_R SDRAM_OFFSET(3300000) +#define RAMDISK_ADDR_R SDRAM_OFFSET(3400000) + +#elif (CONFIG_SUNXI_MINIMUM_DRAM_MB >= 64) +/* + * 64M RAM minus 2MB heap + 16MB for u-boot, stack, fb, etc. + * 16M uncompressed kernel, 8M compressed kernel, 1M fdt, + * 1M script, 1M pxe, 1M dt overlay and the ramdisk at the end. + */ +#define BOOTM_SIZE 0x2e00000 +#define KERNEL_ADDR_R SDRAM_OFFSET(1000000) +#define FDT_ADDR_R SDRAM_OFFSET(1800000) +#define SCRIPT_ADDR_R SDRAM_OFFSET(1900000) +#define PXEFILE_ADDR_R SDRAM_OFFSET(1A00000) +#define FDTOVERLAY_ADDR_R SDRAM_OFFSET(1B00000) +#define RAMDISK_ADDR_R SDRAM_OFFSET(1C00000) + +#elif (CONFIG_SUNXI_MINIMUM_DRAM_MB >= 32) +/* + * 32M RAM minus 2.5MB for u-boot, heap, stack, etc. + * 16M uncompressed kernel, 7M compressed kernel, 128K fdt, 64K script, + * 128K DT overlay, 128K PXE and the ramdisk in the rest (max. 5MB) + */ +#define BOOTM_SIZE 0x1700000 +#define KERNEL_ADDR_R SDRAM_OFFSET(1000000) +#define FDT_ADDR_R SDRAM_OFFSET(1d50000) +#define SCRIPT_ADDR_R SDRAM_OFFSET(1d40000) +#define PXEFILE_ADDR_R SDRAM_OFFSET(1d00000) +#define FDTOVERLAY_ADDR_R SDRAM_OFFSET(1d20000) +#define RAMDISK_ADDR_R SDRAM_OFFSET(1800000) + +#else +#error Need at least 32MB of DRAM. Please adjust load addresses. +#endif + +#define UUID_GPT_ESP "" + +#ifdef CONFIG_ARM64
Quoted 8 lines
board/sunxi/sunxi.env line 87
Quoted 4 lines
board/sunxi/sunxi.env new file +4
-0+#define UUID_GPT_SYSTEM b921b045-1df0-41c3-af44-4c6f280d3fae +#else +#define UUID_GPT_SYSTEM 69dad710-2ce4-4e3c-b16c-21a1d49abed3 +#endifDo we really need those definitions? In the header file those were later used in the actual (lower case) variable assignment, but here the UUIDs are assigned directly (below)?
Yes I can drop them.
Quoted 39 lines
Quoted 24 lines
board/sunxi/sunxi.env new file +23
-0+ +stdin=serial +#ifdef CONFIG_USB_KEYBOARD +stdin+=,usbkbd +#endif + +stdout=serial +stderr=serial +#ifdef CONFIG_VIDEO +stdout+=,vidconsole +stderr+=,vidconsole +#endif + +bootm_size=BOOTM_SIZE +kernel_addr_r=KERNEL_ADDR_R +fdt_addr_r=FDT_ADDR_R +scriptaddr=SCRIPT_ADDR_R +pxefile_addr_r=PXEFILE_ADDR_R +fdtoverlay_addr_r=FDTOVERLAY_ADDR_R +ramdisk_addr_r=RAMDISK_ADDR_R + +#ifdef CONFIG_ARM64 +kernel_comp_addr_r=KERNEL_COMP_ADDR_Rboard/sunxi/sunxi.env line 120
Quoted 10 lines
board/sunxi/sunxi.env new file +10
-0+kernel_comp_size=KERNEL_COMP_SIZE +#endif + +dfu_alt_info_ram= + kernel ram KERNEL_ADDR_R 0x1000000; + fdt ram FDT_ADDR_R 0x100000; + ramdisk ram RAMDISK_ADDR_R 0x4000000 + +#ifdef CONFIG_ARM64 +fdtfile=allwinner/DEFAULT_DEVICE_TREE.dtbI am confused, shouldn't that be
CONFIG_DEFAULT_DEVICE_TREE? Or is there more magic involved? And it looks like something is prepending the directory name already:
(comparing the env between current master and after these patches)
Review
Quoted 4 lines
(quoted diff) +2
-2-fdtcontroladdr=fbf0b090 -fdtfile=allwinner/sun50i-h618-orangepi-zero3.dtb +fdtcontroladdr=fbf0aa30 +fdtfile=allwinner/allwinner/sun50i-h618-orangepi-zero3.dtb
It is the special case in the previous patch.
Quoted 3 lines
(Or is this a problem with the switch to dts/upstream for the H616 I have in my tree already?)
I'm not sure, but if you have both then I would hope that we can just drop this, which is what I'll do in v4.
Quoted 22 lines
Quoted 22 lines
board/sunxi/sunxi.env new file +21
-0+#else +fdtfile=DEFAULT_DEVICE_TREE.dtb +#endif + +console=ttyS0,115200 + +uuid_gpt_esp=c12a7328-f81f-11d2-ba4b-00a0c93ec93b +#ifdef CONFIG_ARM64 +uuid_gpt_system=b921b045-1df0-41c3-af44-4c6f280d3fae +#else +uuid_gpt_system=69dad710-2ce4-4e3c-b16c-21a1d49abed3 +#endif + +partitions= + name=loader1,start=8k,size=32k,uuid=${uuid_gpt_loader1}; + name=loader2,size=984k,uuid=${uuid_gpt_loader2}; + name=esp,size=128M,bootable,uuid=${uuid_gpt_esp}; + name=system,size=-,uuid=${uuid_gpt_system}; + +/* support booting a very old kernel */ +#ifdef CONFIG_OLD_SUNXI_KERNEL_COMPAT
Quoted 8 lines
board/sunxi/sunxi.env line 146
Quoted 5 lines
board/sunxi/sunxi.env new file +5
-0+bootcmd_sunxi_compat= + setenv root /dev/mmcblk0p3 rootwait; + if ext2load mmc 0 44000000 uEnv.txt; then + "echo Loaded environment from uEnv.txt; + "env import -t 44000000 ${filesize};is the indentation and the initial quotation for those two lines a leftover from the old file?
Yes, fixed.
Quoted 4 lines
The rest seems to be the same as before, effectively. Other than those nits I like the new way much better, didn't know we could now do this.
Yes it is a big improvement.
Regards,
Simon
Quoted 185 lines
Cheers,
AndreQuoted 180 lines
board/sunxi/sunxi.env new file +6
-0+ fi; + setenv bootargs console=${console} root=${root} ${extraargs}; + ext2load mmc 0 43000000 script.bin && + ext2load mmc 0 48000000 uImage && + bootm 48000000 +#endifinclude/configs/sunxi-common.h +0
-165@@ -61,169 +61,4 @@#define PHYS_SDRAM_0 CFG_SYS_SDRAM_BASE#define PHYS_SDRAM_0_SIZE 0x80000000/* 2 GiB */ -/**************************************************************************** -* environment variables holding default load addresses * -****************************************************************************/ -/* -* We cannot use expressions here, because expressions won't be evaluated in -* autoconf.mk. -*/ -#ifdef CONFIG_ARM64 -/* -* Boards seem to come with at least 512MB of DRAM. -* The kernel should go at 512K, which is the default text offset (that will -* be adjusted at runtime if needed). -* There is no compression for arm64 kernels (yet), so leave some space -* for really big kernels, say 256MB for now. -* Scripts, PXE and DTBs should go afterwards, leaving the rest for the initrd. -*/ -#define BOOTM_SIZE __stringify(0xa000000) -#define KERNEL_ADDR_R __stringify(SDRAM_OFFSET(0080000)) -#define KERNEL_COMP_ADDR_R __stringify(SDRAM_OFFSET(4000000)) -#define KERNEL_COMP_SIZE __stringify(0xb000000) -#define FDT_ADDR_R __stringify(SDRAM_OFFSET(FA00000)) -#define SCRIPT_ADDR_R __stringify(SDRAM_OFFSET(FC00000)) -#define PXEFILE_ADDR_R __stringify(SDRAM_OFFSET(FD00000)) -#define FDTOVERLAY_ADDR_R __stringify(SDRAM_OFFSET(FE00000)) -#define RAMDISK_ADDR_R __stringify(SDRAM_OFFSET(FF00000)) - -#elif (CONFIG_SUNXI_MINIMUM_DRAM_MB >=256 ) -/* -* 160M RAM (256M minimum minus 64MB heap + 32MB for u-boot, stack, fb, etc. -* 32M uncompressed kernel, 16M compressed kernel, 1M fdt, -* 1M script, 1M pxe, 1M dt overlay and the ramdisk at the end. -*/ -#define BOOTM_SIZE __stringify(0xa000000) -#define KERNEL_ADDR_R __stringify(SDRAM_OFFSET(2000000)) -#define FDT_ADDR_R __stringify(SDRAM_OFFSET(3000000)) -#define SCRIPT_ADDR_R __stringify(SDRAM_OFFSET(3100000)) -#define PXEFILE_ADDR_R __stringify(SDRAM_OFFSET(3200000)) -#define FDTOVERLAY_ADDR_R __stringify(SDRAM_OFFSET(3300000)) -#define RAMDISK_ADDR_R __stringify(SDRAM_OFFSET(3400000)) - -#elif (CONFIG_SUNXI_MINIMUM_DRAM_MB >=64 ) -/* -* 64M RAM minus 2MB heap + 16MB for u-boot, stack, fb, etc. -* 16M uncompressed kernel, 8M compressed kernel, 1M fdt, -* 1M script, 1M pxe, 1M dt overlay and the ramdisk at the end. -*/ -#define BOOTM_SIZE __stringify(0x2e00000) -#define KERNEL_ADDR_R __stringify(SDRAM_OFFSET(1000000)) -#define FDT_ADDR_R __stringify(SDRAM_OFFSET(1800000)) -#define SCRIPT_ADDR_R __stringify(SDRAM_OFFSET(1900000)) -#define PXEFILE_ADDR_R __stringify(SDRAM_OFFSET(1A00000)) -#define FDTOVERLAY_ADDR_R __stringify(SDRAM_OFFSET(1B00000)) -#define RAMDISK_ADDR_R __stringify(SDRAM_OFFSET(1C00000)) - -#elif (CONFIG_SUNXI_MINIMUM_DRAM_MB >=32 ) -/* -* 32M RAM minus 2.5MB for u-boot, heap, stack, etc. -* 16M uncompressed kernel, 7M compressed kernel, 128K fdt, 64K script, -* 128K DT overlay, 128K PXE and the ramdisk in the rest (max. 5MB) -*/ -#define BOOTM_SIZE __stringify(0x1700000) -#define KERNEL_ADDR_R __stringify(SDRAM_OFFSET(1000000)) -#define FDT_ADDR_R __stringify(SDRAM_OFFSET(1d50000)) -#define SCRIPT_ADDR_R __stringify(SDRAM_OFFSET(1d40000)) -#define PXEFILE_ADDR_R __stringify(SDRAM_OFFSET(1d00000)) -#define FDTOVERLAY_ADDR_R __stringify(SDRAM_OFFSET(1d20000)) -#define RAMDISK_ADDR_R __stringify(SDRAM_OFFSET(1800000)) - -#else -#error Need at least 32MB of DRAM. Please adjust load addresses. -#endif - -#define MEM_LAYOUT_ENV_SETTINGS \ - "bootm_size=" BOOTM_SIZE "\0" \ - "kernel_addr_r=" KERNEL_ADDR_R "\0" \ - "fdt_addr_r=" FDT_ADDR_R "\0" \ - "scriptaddr=" SCRIPT_ADDR_R "\0" \ - "pxefile_addr_r=" PXEFILE_ADDR_R "\0" \ - "fdtoverlay_addr_r=" FDTOVERLAY_ADDR_R "\0" \ - "ramdisk_addr_r=" RAMDISK_ADDR_R "\0" - -#ifdef CONFIG_ARM64 -#define MEM_LAYOUT_ENV_EXTRA_SETTINGS \ - "kernel_comp_addr_r=" KERNEL_COMP_ADDR_R "\0" \ - "kernel_comp_size=" KERNEL_COMP_SIZE "\0" -#else -#define MEM_LAYOUT_ENV_EXTRA_SETTINGS "" -#endif - -#define DFU_ALT_INFO_RAM \ - "dfu_alt_info_ram=" \ - "kernel ram " KERNEL_ADDR_R " 0x1000000;" \ - "fdt ram " FDT_ADDR_R " 0x100000;" \ - "ramdisk ram " RAMDISK_ADDR_R " 0x4000000\0" - -#ifdef CONFIG_OLD_SUNXI_KERNEL_COMPAT -#define BOOTCMD_SUNXI_COMPAT \ - "bootcmd_sunxi_compat=" \ - "setenv root /dev/mmcblk0p3 rootwait; " \ - "if ext2load mmc 0 0x44000000 uEnv.txt; then " \ - "echo Loaded environment from uEnv.txt; " \ - "env import -t 0x44000000 ${filesize}; " \ - "fi; " \ - "setenv bootargs console=${console} root=${root} ${extraargs}; " \ - "ext2load mmc 0 0x43000000 script.bin && " \ - "ext2load mmc 0 0x48000000 uImage && " \ - "bootm 0x48000000\0" -#else -#define BOOTCMD_SUNXI_COMPAT -#endif - -#ifdef CONFIG_USB_KEYBOARD -#define CONSOLE_STDIN_SETTINGS \ - "stdin=serial,usbkbd\0" -#else -#define CONSOLE_STDIN_SETTINGS \ - "stdin=serial\0" -#endif - -#ifdef CONFIG_VIDEO -#define CONSOLE_STDOUT_SETTINGS \ - "stdout=serial,vidconsole\0" \ - "stderr=serial,vidconsole\0" -#else -#define CONSOLE_STDOUT_SETTINGS \ - "stdout=serial\0" \ - "stderr=serial\0" -#endif - -#define PARTS_DEFAULT \ - "name=loader1,start=8k,size=32k,uuid=${uuid_gpt_loader1};" \ - "name=loader2,size=984k,uuid=${uuid_gpt_loader2};" \ - "name=esp,size=128M,bootable,uuid=${uuid_gpt_esp};" \ - "name=system,size=-,uuid=${uuid_gpt_system};" - -#define UUID_GPT_ESP "c12a7328-f81f-11d2-ba4b-00a0c93ec93b" - -#ifdef CONFIG_ARM64 -#define UUID_GPT_SYSTEM "b921b045-1df0-41c3-af44-4c6f280d3fae" -#else -#define UUID_GPT_SYSTEM "69dad710-2ce4-4e3c-b16c-21a1d49abed3" -#endif - -#define CONSOLE_ENV_SETTINGS \ - CONSOLE_STDIN_SETTINGS \ - CONSOLE_STDOUT_SETTINGS - -#ifdef CONFIG_ARM64 -#define FDTFILE "allwinner/" CONFIG_DEFAULT_DEVICE_TREE ".dtb" -#else -#define FDTFILE CONFIG_DEFAULT_DEVICE_TREE ".dtb" -#endif - -#define CFG_EXTRA_ENV_SETTINGS \ - CONSOLE_ENV_SETTINGS \ - MEM_LAYOUT_ENV_SETTINGS \ - MEM_LAYOUT_ENV_EXTRA_SETTINGS \ - DFU_ALT_INFO_RAM \ - "fdtfile=" FDTFILE "\0" \ - "console=ttyS0,115200\0" \ - "uuid_gpt_esp=" UUID_GPT_ESP "\0" \ - "uuid_gpt_system=" UUID_GPT_SYSTEM "\0" \ - "partitions=" PARTS_DEFAULT "\0" \ - BOOTCMD_SUNXI_COMPAT -#endif /* _SUNXI_COMMON_CONFIG_H */