From: Ahmad Fatoum <a.fat...@barebox.org> The existing "full" MLO image supports multiple boot media at once, but the newcomer SD/MMC only image has the advantage of doing so in the same build alongside barebox second stage.
This makes for easier integration in BSPs, so provide it as extra image if CONFIG_OMAP_BUILD_IFT is disabled. Signed-off-by: Ahmad Fatoum <a.fat...@pengutronix.de> --- arch/arm/boards/beaglebone/lowlevel.c | 10 ++++++---- arch/arm/mach-omap/Kconfig | 8 ++++++-- images/Makefile.am33xx | 4 ++++ 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/arch/arm/boards/beaglebone/lowlevel.c b/arch/arm/boards/beaglebone/lowlevel.c index fec4f177781c..05764fc9138b 100644 --- a/arch/arm/boards/beaglebone/lowlevel.c +++ b/arch/arm/boards/beaglebone/lowlevel.c @@ -16,6 +16,7 @@ #include <mach/omap/syslib.h> #include <mach/omap/am33xx-mux.h> #include <mach/omap/am33xx-generic.h> +#include <mach/omap/xload.h> #include "beaglebone.h" @@ -116,9 +117,6 @@ static void __udelay(int us) static noinline int beaglebone_sram_init(void) { uint32_t sdram_size; - void *fdt; - - fdt = __dtb_z_am335x_bone_common_start; if (is_beaglebone_black()) sdram_size = SZ_512M; @@ -150,7 +148,11 @@ static noinline int beaglebone_sram_init(void) */ __udelay(3000); - barebox_arm_entry(OMAP_DRAM_ADDR_SPACE_START, sdram_size, fdt); + if (IS_ENABLED(CONFIG_OMAP_BUILD_IFT)) + barebox_arm_entry(OMAP_DRAM_ADDR_SPACE_START, sdram_size, + __dtb_z_am335x_bone_common_start); + else + am33xx_hsmmc_start_image(); } ENTRY_FUNCTION(start_am33xx_beaglebone_sram, bootinfo, r1, r2) diff --git a/arch/arm/mach-omap/Kconfig b/arch/arm/mach-omap/Kconfig index e7a9b331125d..bf2ab75eaf68 100644 --- a/arch/arm/mach-omap/Kconfig +++ b/arch/arm/mach-omap/Kconfig @@ -60,12 +60,15 @@ config OMAP_GPMC NAND, OneNAND etc. config OMAP_BUILD_IFT - prompt "build ift binary (MLO)" + prompt "build ift binaries (MLO) only" bool help - Say Y here if you want to build an MLO binary. On TI SoCs, this + Say Y here if you want to build only MLO binaries. On TI SoCs, this binary is loaded to SRAM. It is responsible for initializing the SDRAM and possibly chainloading a full-featured barebox. + If you say n here, barebox may still generate extra MLO binaries + alongside second stage barebox binaries, but these are currently + limited to only specific bootmedia as indicated in their file name. config OMAP_BUILD_SPI prompt "build SPI binary" @@ -153,6 +156,7 @@ config MACH_BEAGLE config MACH_BEAGLEBONE bool "Texas Instrument's Beagle Bone" select ARCH_AM33XX + select MCI_OMAP_HSMMC_PBL help Say Y here if you are using Beagle Bone diff --git a/images/Makefile.am33xx b/images/Makefile.am33xx index a63def771ed3..2a1cf3a0c40b 100644 --- a/images/Makefile.am33xx +++ b/images/Makefile.am33xx @@ -132,6 +132,10 @@ pblb-$(CONFIG_MACH_BEAGLEBONE) += start_am33xx_beaglebone_sdram FILE_barebox-am33xx-beaglebone.img = start_am33xx_beaglebone_sdram.pblb am33xx-barebox-$(CONFIG_MACH_BEAGLEBONE) += barebox-am33xx-beaglebone.img +pblb-$(CONFIG_MACH_BEAGLEBONE) += start_am33xx_beaglebone_sram +FILE_barebox-am33xx-beaglebone-mlo.mmc.img = start_am33xx_beaglebone_sram.pblb.mlo +am33xx-barebox-$(CONFIG_MACH_BEAGLEBONE) += barebox-am33xx-beaglebone-mlo.mmc.img + pblb-$(CONFIG_MACH_BEAGLEBONE) += start_am33xx_beaglebone_sram FILE_barebox-am33xx-beaglebone-mlo.img = start_am33xx_beaglebone_sram.pblb.mlo am33xx-mlo-$(CONFIG_MACH_BEAGLEBONE) += barebox-am33xx-beaglebone-mlo.img -- 2.39.5