[PATCH 3/3] arm: mvebu: clearfog: Add defconfigs for eMMC booting

Stefan Roese sr at denx.de
Mon Oct 16 10:37:44 CEST 2023


Hi Josua,

On 10/8/23 14:46, Josua Mayer wrote:
> Armada 388 can boot from either eMMC data, boot0 or boot1 partitions.
> 
> data partition requires booting from LBA-4096 to avoid conflict with
> MBR. When booting from boot0/boot1 environment should be stored there
> respectively, too.
> 
> Add 3 new defconfigs, for each eMMC partition:
> - clearfog_emmcboot0_defconfig
> - clearfog_emmcboot1_defconfig
> - clearfog_emmcdata_defconfig

Do we really need new, separate defconfig files for those very similar
configurations? Or is there a way to detect this at runtime or if not
possible to include a common defconfig file?

Just checking...

Thanks,
Stefan

> Signed-off-by: Josua Mayer <josua at solid-run.com>
> ---
>   configs/clearfog_emmcboot0_defconfig | 82 ++++++++++++++++++++++++++++
>   configs/clearfog_emmcboot1_defconfig | 82 ++++++++++++++++++++++++++++
>   configs/clearfog_emmcdata_defconfig  | 82 ++++++++++++++++++++++++++++
>   3 files changed, 246 insertions(+)
>   create mode 100644 configs/clearfog_emmcboot0_defconfig
>   create mode 100644 configs/clearfog_emmcboot1_defconfig
>   create mode 100644 configs/clearfog_emmcdata_defconfig
> 
> diff --git a/configs/clearfog_emmcboot0_defconfig b/configs/clearfog_emmcboot0_defconfig
> new file mode 100644
> index 00000000000..215b7708a0d
> --- /dev/null
> +++ b/configs/clearfog_emmcboot0_defconfig
> @@ -0,0 +1,82 @@
> +CONFIG_ARM=y
> +CONFIG_ARCH_CPU_INIT=y
> +CONFIG_SYS_THUMB_BUILD=y
> +CONFIG_ARCH_MVEBU=y
> +CONFIG_TEXT_BASE=0x00800000
> +CONFIG_SPL_LIBCOMMON_SUPPORT=y
> +CONFIG_SPL_LIBGENERIC_SUPPORT=y
> +CONFIG_NR_DRAM_BANKS=2
> +CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
> +CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xff0000
> +CONFIG_TARGET_CLEARFOG=y
> +CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC=y
> +CONFIG_DEFAULT_DEVICE_TREE="armada-388-clearfog"
> +CONFIG_SPL_TEXT_BASE=0x40000030
> +CONFIG_SPL_SERIAL=y
> +CONFIG_SPL_STACK=0x4002c000
> +CONFIG_SPL=y
> +CONFIG_DEBUG_UART_BASE=0xf1012000
> +CONFIG_DEBUG_UART_CLOCK=250000000
> +CONFIG_SYS_LOAD_ADDR=0x800000
> +CONFIG_PCI=y
> +CONFIG_DEBUG_UART=y
> +CONFIG_AHCI=y
> +CONFIG_DISTRO_DEFAULTS=y
> +CONFIG_BOOTDELAY=3
> +CONFIG_USE_PREBOOT=y
> +CONFIG_SYS_CONSOLE_INFO_QUIET=y
> +# CONFIG_DISPLAY_BOARDINFO is not set
> +CONFIG_DISPLAY_BOARDINFO_LATE=y
> +CONFIG_SPL_MAX_SIZE=0x22fd0
> +CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
> +CONFIG_SPL_BSS_START_ADDR=0x40023000
> +CONFIG_SPL_BSS_MAX_SIZE=0x4000
> +CONFIG_SPL_SYS_MALLOC_SIMPLE=y
> +# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
> +CONFIG_SPL_I2C=y
> +CONFIG_SYS_MAXARGS=32
> +CONFIG_CMD_TLV_EEPROM=y
> +CONFIG_SPL_CMD_TLV_EEPROM=y
> +# CONFIG_CMD_FLASH is not set
> +CONFIG_CMD_GPIO=y
> +CONFIG_CMD_I2C=y
> +CONFIG_CMD_MMC=y
> +CONFIG_CMD_PCI=y
> +CONFIG_CMD_SPI=y
> +CONFIG_CMD_USB=y
> +CONFIG_CMD_TFTPPUT=y
> +CONFIG_CMD_CACHE=y
> +CONFIG_CMD_TIME=y
> +CONFIG_ENV_OVERWRITE=y
> +CONFIG_ENV_MIN_ENTRIES=128
> +CONFIG_SYS_MMC_ENV_PART=1
> +CONFIG_ARP_TIMEOUT=200
> +CONFIG_NET_RETRY_COUNT=50
> +CONFIG_NET_RANDOM_ETHADDR=y
> +CONFIG_SPL_OF_TRANSLATE=y
> +CONFIG_AHCI_MVEBU=y
> +CONFIG_DM_PCA953X=y
> +CONFIG_DM_I2C=y
> +CONFIG_SYS_I2C_MVTWSI=y
> +CONFIG_I2C_EEPROM=y
> +CONFIG_SPL_I2C_EEPROM=y
> +CONFIG_MMC_SDHCI=y
> +CONFIG_MMC_SDHCI_SDMA=y
> +CONFIG_MMC_SDHCI_MV=y
> +CONFIG_MTD=y
> +CONFIG_SF_DEFAULT_BUS=1
> +CONFIG_SPI_FLASH_WINBOND=y
> +CONFIG_SPI_FLASH_MTD=y
> +CONFIG_PHY_MARVELL=y
> +CONFIG_PHY_GIGE=y
> +CONFIG_MVNETA=y
> +CONFIG_MII=y
> +CONFIG_MVMDIO=y
> +CONFIG_PCI_MVEBU=y
> +CONFIG_SCSI=y
> +CONFIG_SPL_DEBUG_UART_BASE=0xd0012000
> +CONFIG_DEBUG_UART_SHIFT=2
> +CONFIG_SYS_NS16550=y
> +CONFIG_KIRKWOOD_SPI=y
> +CONFIG_USB=y
> +CONFIG_USB_XHCI_HCD=y
> diff --git a/configs/clearfog_emmcboot1_defconfig b/configs/clearfog_emmcboot1_defconfig
> new file mode 100644
> index 00000000000..59f88c64a2e
> --- /dev/null
> +++ b/configs/clearfog_emmcboot1_defconfig
> @@ -0,0 +1,82 @@
> +CONFIG_ARM=y
> +CONFIG_ARCH_CPU_INIT=y
> +CONFIG_SYS_THUMB_BUILD=y
> +CONFIG_ARCH_MVEBU=y
> +CONFIG_TEXT_BASE=0x00800000
> +CONFIG_SPL_LIBCOMMON_SUPPORT=y
> +CONFIG_SPL_LIBGENERIC_SUPPORT=y
> +CONFIG_NR_DRAM_BANKS=2
> +CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
> +CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xff0000
> +CONFIG_TARGET_CLEARFOG=y
> +CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC=y
> +CONFIG_DEFAULT_DEVICE_TREE="armada-388-clearfog"
> +CONFIG_SPL_TEXT_BASE=0x40000030
> +CONFIG_SPL_SERIAL=y
> +CONFIG_SPL_STACK=0x4002c000
> +CONFIG_SPL=y
> +CONFIG_DEBUG_UART_BASE=0xf1012000
> +CONFIG_DEBUG_UART_CLOCK=250000000
> +CONFIG_SYS_LOAD_ADDR=0x800000
> +CONFIG_PCI=y
> +CONFIG_DEBUG_UART=y
> +CONFIG_AHCI=y
> +CONFIG_DISTRO_DEFAULTS=y
> +CONFIG_BOOTDELAY=3
> +CONFIG_USE_PREBOOT=y
> +CONFIG_SYS_CONSOLE_INFO_QUIET=y
> +# CONFIG_DISPLAY_BOARDINFO is not set
> +CONFIG_DISPLAY_BOARDINFO_LATE=y
> +CONFIG_SPL_MAX_SIZE=0x22fd0
> +CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
> +CONFIG_SPL_BSS_START_ADDR=0x40023000
> +CONFIG_SPL_BSS_MAX_SIZE=0x4000
> +CONFIG_SPL_SYS_MALLOC_SIMPLE=y
> +# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
> +CONFIG_SPL_I2C=y
> +CONFIG_SYS_MAXARGS=32
> +CONFIG_CMD_TLV_EEPROM=y
> +CONFIG_SPL_CMD_TLV_EEPROM=y
> +# CONFIG_CMD_FLASH is not set
> +CONFIG_CMD_GPIO=y
> +CONFIG_CMD_I2C=y
> +CONFIG_CMD_MMC=y
> +CONFIG_CMD_PCI=y
> +CONFIG_CMD_SPI=y
> +CONFIG_CMD_USB=y
> +CONFIG_CMD_TFTPPUT=y
> +CONFIG_CMD_CACHE=y
> +CONFIG_CMD_TIME=y
> +CONFIG_ENV_OVERWRITE=y
> +CONFIG_ENV_MIN_ENTRIES=128
> +CONFIG_SYS_MMC_ENV_PART=2
> +CONFIG_ARP_TIMEOUT=200
> +CONFIG_NET_RETRY_COUNT=50
> +CONFIG_NET_RANDOM_ETHADDR=y
> +CONFIG_SPL_OF_TRANSLATE=y
> +CONFIG_AHCI_MVEBU=y
> +CONFIG_DM_PCA953X=y
> +CONFIG_DM_I2C=y
> +CONFIG_SYS_I2C_MVTWSI=y
> +CONFIG_I2C_EEPROM=y
> +CONFIG_SPL_I2C_EEPROM=y
> +CONFIG_MMC_SDHCI=y
> +CONFIG_MMC_SDHCI_SDMA=y
> +CONFIG_MMC_SDHCI_MV=y
> +CONFIG_MTD=y
> +CONFIG_SF_DEFAULT_BUS=1
> +CONFIG_SPI_FLASH_WINBOND=y
> +CONFIG_SPI_FLASH_MTD=y
> +CONFIG_PHY_MARVELL=y
> +CONFIG_PHY_GIGE=y
> +CONFIG_MVNETA=y
> +CONFIG_MII=y
> +CONFIG_MVMDIO=y
> +CONFIG_PCI_MVEBU=y
> +CONFIG_SCSI=y
> +CONFIG_SPL_DEBUG_UART_BASE=0xd0012000
> +CONFIG_DEBUG_UART_SHIFT=2
> +CONFIG_SYS_NS16550=y
> +CONFIG_KIRKWOOD_SPI=y
> +CONFIG_USB=y
> +CONFIG_USB_XHCI_HCD=y
> diff --git a/configs/clearfog_emmcdata_defconfig b/configs/clearfog_emmcdata_defconfig
> new file mode 100644
> index 00000000000..335b50e3c48
> --- /dev/null
> +++ b/configs/clearfog_emmcdata_defconfig
> @@ -0,0 +1,82 @@
> +CONFIG_ARM=y
> +CONFIG_ARCH_CPU_INIT=y
> +CONFIG_SYS_THUMB_BUILD=y
> +CONFIG_ARCH_MVEBU=y
> +CONFIG_TEXT_BASE=0x00800000
> +CONFIG_SPL_LIBCOMMON_SUPPORT=y
> +CONFIG_SPL_LIBGENERIC_SUPPORT=y
> +CONFIG_NR_DRAM_BANKS=2
> +CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
> +CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xff0000
> +CONFIG_TARGET_CLEARFOG=y
> +CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC=y
> +CONFIG_DEFAULT_DEVICE_TREE="armada-388-clearfog"
> +CONFIG_SPL_TEXT_BASE=0x40000030
> +CONFIG_SPL_SERIAL=y
> +CONFIG_SPL_STACK=0x4002c000
> +CONFIG_SPL=y
> +CONFIG_DEBUG_UART_BASE=0xf1012000
> +CONFIG_DEBUG_UART_CLOCK=250000000
> +CONFIG_SYS_LOAD_ADDR=0x800000
> +CONFIG_PCI=y
> +CONFIG_DEBUG_UART=y
> +CONFIG_AHCI=y
> +CONFIG_DISTRO_DEFAULTS=y
> +CONFIG_BOOTDELAY=3
> +CONFIG_USE_PREBOOT=y
> +CONFIG_SYS_CONSOLE_INFO_QUIET=y
> +# CONFIG_DISPLAY_BOARDINFO is not set
> +CONFIG_DISPLAY_BOARDINFO_LATE=y
> +CONFIG_SPL_MAX_SIZE=0x22fd0
> +CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
> +CONFIG_SPL_BSS_START_ADDR=0x40023000
> +CONFIG_SPL_BSS_MAX_SIZE=0x4000
> +CONFIG_SPL_SYS_MALLOC_SIMPLE=y
> +# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
> +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_DATA_PART_OFFSET=0x1000
> +CONFIG_SPL_I2C=y
> +CONFIG_SYS_MAXARGS=32
> +CONFIG_CMD_TLV_EEPROM=y
> +CONFIG_SPL_CMD_TLV_EEPROM=y
> +# CONFIG_CMD_FLASH is not set
> +CONFIG_CMD_GPIO=y
> +CONFIG_CMD_I2C=y
> +CONFIG_CMD_MMC=y
> +CONFIG_CMD_PCI=y
> +CONFIG_CMD_SPI=y
> +CONFIG_CMD_USB=y
> +CONFIG_CMD_TFTPPUT=y
> +CONFIG_CMD_CACHE=y
> +CONFIG_CMD_TIME=y
> +CONFIG_ENV_OVERWRITE=y
> +CONFIG_ENV_MIN_ENTRIES=128
> +CONFIG_ARP_TIMEOUT=200
> +CONFIG_NET_RETRY_COUNT=50
> +CONFIG_NET_RANDOM_ETHADDR=y
> +CONFIG_SPL_OF_TRANSLATE=y
> +CONFIG_AHCI_MVEBU=y
> +CONFIG_DM_PCA953X=y
> +CONFIG_DM_I2C=y
> +CONFIG_SYS_I2C_MVTWSI=y
> +CONFIG_I2C_EEPROM=y
> +CONFIG_SPL_I2C_EEPROM=y
> +CONFIG_MMC_SDHCI=y
> +CONFIG_MMC_SDHCI_SDMA=y
> +CONFIG_MMC_SDHCI_MV=y
> +CONFIG_MTD=y
> +CONFIG_SF_DEFAULT_BUS=1
> +CONFIG_SPI_FLASH_WINBOND=y
> +CONFIG_SPI_FLASH_MTD=y
> +CONFIG_PHY_MARVELL=y
> +CONFIG_PHY_GIGE=y
> +CONFIG_MVNETA=y
> +CONFIG_MII=y
> +CONFIG_MVMDIO=y
> +CONFIG_PCI_MVEBU=y
> +CONFIG_SCSI=y
> +CONFIG_SPL_DEBUG_UART_BASE=0xd0012000
> +CONFIG_DEBUG_UART_SHIFT=2
> +CONFIG_SYS_NS16550=y
> +CONFIG_KIRKWOOD_SPI=y
> +CONFIG_USB=y
> +CONFIG_USB_XHCI_HCD=y

Viele Grüße,
Stefan Roese

-- 
DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de


More information about the U-Boot mailing list