diff mbox series

[u-boot,v2019.04-aspeed-openbmc,05/11] config: ast2600: Enable common eMMC SPL loader

Message ID 20210413080755.73572-6-joel@jms.id.au
State New
Headers show
Series Use HACE to | expand

Commit Message

Joel Stanley April 13, 2021, 8:07 a.m. UTC
Notabily the link address changes, as this is used as the load address
by the loader.

Given the Aspeed loaders are linking u-boot at 0x10000 but running it
from RAM, the u-boot relocation code must be fine with this setup.

Signed-off-by: Joel Stanley <joel@jms.id.au>
---
 configs/ast2600_openbmc_spl_emmc_defconfig | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Klaus Heinrich Kiwi April 13, 2021, 8:47 p.m. UTC | #1
On 4/13/2021 5:07 AM, Joel Stanley wrote:
> Notabily the link address changes, as this is used as the load address
> by the loader.
> 
> Given the Aspeed loaders are linking u-boot at 0x10000 but running it
> from RAM, the u-boot relocation code must be fine with this setup.
> 
> Signed-off-by: Joel Stanley <joel@jms.id.au>
> ---
>   configs/ast2600_openbmc_spl_emmc_defconfig | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/configs/ast2600_openbmc_spl_emmc_defconfig b/configs/ast2600_openbmc_spl_emmc_defconfig
> index 6daf6343478b..e59d3595ebf0 100644
> --- a/configs/ast2600_openbmc_spl_emmc_defconfig
> +++ b/configs/ast2600_openbmc_spl_emmc_defconfig
> @@ -7,7 +7,7 @@ CONFIG_SYS_THUMB_BUILD=y
>   # CONFIG_SPL_USE_ARCH_MEMSET is not set
>   CONFIG_SPL_LDSCRIPT="arch/$(ARCH)/mach-aspeed/ast2600/u-boot-spl.lds"
>   CONFIG_ARCH_ASPEED=y
> -CONFIG_SYS_TEXT_BASE=0x10000
> +CONFIG_SYS_TEXT_BASE=0x81000000
>   CONFIG_ASPEED_AST2600=y
>   CONFIG_ASPEED_UBOOT_SPI_BASE=0x10000
>   CONFIG_ASPEED_UBOOT_SPI_SIZE=0xd0000
> @@ -47,11 +47,12 @@ CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y
>   CONFIG_DISPLAY_BOARDINFO_LATE=y
>   CONFIG_ARCH_EARLY_INIT_R=y
>   CONFIG_BOARD_EARLY_INIT_F=y
> -# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
Guess this is unrelated?
But still, isn't this required for booting from UART? I had
the impression that the SPL ymodem boot would not work with
fitImages.


>   # CONFIG_SPL_LEGACY_IMAGE_SUPPORT is not set
>   CONFIG_SPL_SYS_MALLOC_SIMPLE=y
>   CONFIG_SPL_STACK_R=y
>   CONFIG_SPL_SEPARATE_BSS=y
> +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
> +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x80
>   CONFIG_SPL_FIT_IMAGE_TINY=y
>   CONFIG_SPL_DM_RESET=y
>   CONFIG_SPL_RAM_SUPPORT=y
>
Joel Stanley April 13, 2021, 11:48 p.m. UTC | #2
On Tue, 13 Apr 2021 at 20:47, Klaus Heinrich Kiwi
<klaus@linux.vnet.ibm.com> wrote:
>
>
>
> On 4/13/2021 5:07 AM, Joel Stanley wrote:
> > Notabily the link address changes, as this is used as the load address
> > by the loader.
> >
> > Given the Aspeed loaders are linking u-boot at 0x10000 but running it
> > from RAM, the u-boot relocation code must be fine with this setup.
> >
> > Signed-off-by: Joel Stanley <joel@jms.id.au>
> > ---
> >   configs/ast2600_openbmc_spl_emmc_defconfig | 5 +++--
> >   1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/configs/ast2600_openbmc_spl_emmc_defconfig b/configs/ast2600_openbmc_spl_emmc_defconfig
> > index 6daf6343478b..e59d3595ebf0 100644
> > --- a/configs/ast2600_openbmc_spl_emmc_defconfig
> > +++ b/configs/ast2600_openbmc_spl_emmc_defconfig
> > @@ -7,7 +7,7 @@ CONFIG_SYS_THUMB_BUILD=y
> >   # CONFIG_SPL_USE_ARCH_MEMSET is not set
> >   CONFIG_SPL_LDSCRIPT="arch/$(ARCH)/mach-aspeed/ast2600/u-boot-spl.lds"
> >   CONFIG_ARCH_ASPEED=y
> > -CONFIG_SYS_TEXT_BASE=0x10000
> > +CONFIG_SYS_TEXT_BASE=0x81000000
> >   CONFIG_ASPEED_AST2600=y
> >   CONFIG_ASPEED_UBOOT_SPI_BASE=0x10000
> >   CONFIG_ASPEED_UBOOT_SPI_SIZE=0xd0000
> > @@ -47,11 +47,12 @@ CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y
> >   CONFIG_DISPLAY_BOARDINFO_LATE=y
> >   CONFIG_ARCH_EARLY_INIT_R=y
> >   CONFIG_BOARD_EARLY_INIT_F=y
> > -# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
> Guess this is unrelated?
> But still, isn't this required for booting from UART? I had
> the impression that the SPL ymodem boot would not work with
> fitImages.

The common spl code that we're now using the boot the system has
support for parsing the fit. See ymodem_read_fit in
common/spl/spl_ymodem.c.

You were correct that the aspeed spl code did not support fit.

Cheers,

Joel
diff mbox series

Patch

diff --git a/configs/ast2600_openbmc_spl_emmc_defconfig b/configs/ast2600_openbmc_spl_emmc_defconfig
index 6daf6343478b..e59d3595ebf0 100644
--- a/configs/ast2600_openbmc_spl_emmc_defconfig
+++ b/configs/ast2600_openbmc_spl_emmc_defconfig
@@ -7,7 +7,7 @@  CONFIG_SYS_THUMB_BUILD=y
 # CONFIG_SPL_USE_ARCH_MEMSET is not set
 CONFIG_SPL_LDSCRIPT="arch/$(ARCH)/mach-aspeed/ast2600/u-boot-spl.lds"
 CONFIG_ARCH_ASPEED=y
-CONFIG_SYS_TEXT_BASE=0x10000
+CONFIG_SYS_TEXT_BASE=0x81000000
 CONFIG_ASPEED_AST2600=y
 CONFIG_ASPEED_UBOOT_SPI_BASE=0x10000
 CONFIG_ASPEED_UBOOT_SPI_SIZE=0xd0000
@@ -47,11 +47,12 @@  CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 CONFIG_ARCH_EARLY_INIT_R=y
 CONFIG_BOARD_EARLY_INIT_F=y
-# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
 # CONFIG_SPL_LEGACY_IMAGE_SUPPORT is not set
 CONFIG_SPL_SYS_MALLOC_SIMPLE=y
 CONFIG_SPL_STACK_R=y
 CONFIG_SPL_SEPARATE_BSS=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x80
 CONFIG_SPL_FIT_IMAGE_TINY=y
 CONFIG_SPL_DM_RESET=y
 CONFIG_SPL_RAM_SUPPORT=y