diff mbox series

[v5,11/14] configs: fu540: Add config options for U-boot SPL

Message ID 20200311070320.21323-12-pragnesh.patel@sifive.com
State Superseded
Delegated to: Andes
Headers show
Series RISC-V SiFive FU540 support SPL | expand

Commit Message

Pragnesh Patel March 11, 2020, 7:03 a.m. UTC
With sifive_fu540_defconfig:

User can use FSBL or u-boot-spl.bin anyone at a time.

For FSBL,
fsbl->fw_payload.bin(opensbi+u-boot)

For u-boot-spl.bin,
u-boot-spl.bin->FIT image(opensbi+u-boot+dtb)

U-Boot SPL will be loaded by ZSBL from SD card (replace fsbl.bin with
u-boot-spl.bin) and runs in L2 LIM in machine mode and then load FIT
image u-boot.itb from 1st partition of SD card (replace fw_payload.bin
with u-boot.itb) into RAM.

U-boot SPL expects u-boot.itb FIT image in the 1st partition of SD
card irrespective of GUID

Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
---
 configs/sifive_fu540_defconfig | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Bin Meng March 13, 2020, 8:48 a.m. UTC | #1
On Wed, Mar 11, 2020 at 3:04 PM Pragnesh Patel
<pragnesh.patel@sifive.com> wrote:
>
> With sifive_fu540_defconfig:

Please use "U-Boot" in the commit title

>
> User can use FSBL or u-boot-spl.bin anyone at a time.
>
> For FSBL,
> fsbl->fw_payload.bin(opensbi+u-boot)
>
> For u-boot-spl.bin,
> u-boot-spl.bin->FIT image(opensbi+u-boot+dtb)
>
> U-Boot SPL will be loaded by ZSBL from SD card (replace fsbl.bin with
> u-boot-spl.bin) and runs in L2 LIM in machine mode and then load FIT
> image u-boot.itb from 1st partition of SD card (replace fw_payload.bin
> with u-boot.itb) into RAM.
>
> U-boot SPL expects u-boot.itb FIT image in the 1st partition of SD

U-Boot

> card irrespective of GUID
>
> Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
> ---
>  configs/sifive_fu540_defconfig | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/configs/sifive_fu540_defconfig b/configs/sifive_fu540_defconfig
> index 6d61e6c960..1b33c81be4 100644
> --- a/configs/sifive_fu540_defconfig
> +++ b/configs/sifive_fu540_defconfig
> @@ -12,3 +12,14 @@ CONFIG_DISPLAY_BOARDINFO=y
>  CONFIG_DEFAULT_DEVICE_TREE="hifive-unleashed-a00"
>  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
>  CONFIG_DM_MTD=y
> +CONFIG_SPL_SEPARATE_BSS=y
> +CONFIG_SPL=y
> +CONFIG_SPL_MMC_SUPPORT=y
> +CONFIG_SPL_SPI_SUPPORT=y
> +CONFIG_SPL_YMODEM_SUPPORT=y
> +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION=y
> +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION=1
> +CONFIG_SPL_CLK=y
> +CONFIG_SPL_PAYLOAD="u-boot.itb"
> +CONFIG_SYS_MALLOC_F_LEN=0x3000
> +CONFIG_SIFIVE_FU540_DDR=y
> --

Please make sure this is exactly the same as:

$ make sifive_fu540_defconfig
$ make savedefconfig

Compare the generated defconfig with sifive_fu540_defconfig

Regards,
Bin
Pragnesh Patel March 17, 2020, 2:45 p.m. UTC | #2
Hi Bin,

>-----Original Message-----
>From: Bin Meng <bmeng.cn@gmail.com>
>Sent: 13 March 2020 14:19
>To: Pragnesh Patel <pragnesh.patel@sifive.com>
>Cc: U-Boot Mailing List <u-boot@lists.denx.de>; Atish Patra
><atish.patra@wdc.com>; Palmer Dabbelt <palmerdabbelt@google.com>; Paul
>Walmsley <paul.walmsley@sifive.com>; Jagan Teki
><jagan@amarulasolutions.com>; Troy Benjegerdes
><troy.benjegerdes@sifive.com>; Anup Patel <anup.patel@wdc.com>; Sagar
>Kadam <sagar.kadam@sifive.com>; Rick Chen <rick@andestech.com>; Palmer
>Dabbelt <palmer@dabbelt.com>
>Subject: Re: [PATCH v5 11/14] configs: fu540: Add config options for U-boot
>SPL
>
>On Wed, Mar 11, 2020 at 3:04 PM Pragnesh Patel
><pragnesh.patel@sifive.com> wrote:
>>
>> With sifive_fu540_defconfig:
>
>Please use "U-Boot" in the commit title

Will update.

>
>>
>> User can use FSBL or u-boot-spl.bin anyone at a time.
>>
>> For FSBL,
>> fsbl->fw_payload.bin(opensbi+u-boot)
>>
>> For u-boot-spl.bin,
>> u-boot-spl.bin->FIT image(opensbi+u-boot+dtb)
>>
>> U-Boot SPL will be loaded by ZSBL from SD card (replace fsbl.bin with
>> u-boot-spl.bin) and runs in L2 LIM in machine mode and then load FIT
>> image u-boot.itb from 1st partition of SD card (replace fw_payload.bin
>> with u-boot.itb) into RAM.
>>
>> U-boot SPL expects u-boot.itb FIT image in the 1st partition of SD
>
>U-Boot

Will update

>
>> card irrespective of GUID
>>
>> Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
>> ---
>>  configs/sifive_fu540_defconfig | 11 +++++++++++
>>  1 file changed, 11 insertions(+)
>>
>> diff --git a/configs/sifive_fu540_defconfig
>> b/configs/sifive_fu540_defconfig index 6d61e6c960..1b33c81be4 100644
>> --- a/configs/sifive_fu540_defconfig
>> +++ b/configs/sifive_fu540_defconfig
>> @@ -12,3 +12,14 @@ CONFIG_DISPLAY_BOARDINFO=y
>> CONFIG_DEFAULT_DEVICE_TREE="hifive-unleashed-a00"
>>  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
>>  CONFIG_DM_MTD=y
>> +CONFIG_SPL_SEPARATE_BSS=y
>> +CONFIG_SPL=y
>> +CONFIG_SPL_MMC_SUPPORT=y
>> +CONFIG_SPL_SPI_SUPPORT=y
>> +CONFIG_SPL_YMODEM_SUPPORT=y
>> +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION=y
>> +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION=1
>> +CONFIG_SPL_CLK=y
>> +CONFIG_SPL_PAYLOAD="u-boot.itb"
>> +CONFIG_SYS_MALLOC_F_LEN=0x3000
>> +CONFIG_SIFIVE_FU540_DDR=y
>> --
>
>Please make sure this is exactly the same as:
>
>$ make sifive_fu540_defconfig
>$ make savedefconfig
>
>Compare the generated defconfig with sifive_fu540_defconfig

There is only 1 difference.
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION=1

CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION is 1 by default, so remove it from configs/sifive_fu540_defconfig

>
>Regards,
>Bin
diff mbox series

Patch

diff --git a/configs/sifive_fu540_defconfig b/configs/sifive_fu540_defconfig
index 6d61e6c960..1b33c81be4 100644
--- a/configs/sifive_fu540_defconfig
+++ b/configs/sifive_fu540_defconfig
@@ -12,3 +12,14 @@  CONFIG_DISPLAY_BOARDINFO=y
 CONFIG_DEFAULT_DEVICE_TREE="hifive-unleashed-a00"
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM_MTD=y
+CONFIG_SPL_SEPARATE_BSS=y
+CONFIG_SPL=y
+CONFIG_SPL_MMC_SUPPORT=y
+CONFIG_SPL_SPI_SUPPORT=y
+CONFIG_SPL_YMODEM_SUPPORT=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION=1
+CONFIG_SPL_CLK=y
+CONFIG_SPL_PAYLOAD="u-boot.itb"
+CONFIG_SYS_MALLOC_F_LEN=0x3000
+CONFIG_SIFIVE_FU540_DDR=y