[U-Boot] [PATCH v3 1/3] spl: add RAM boot device only if it is actually defined

Simon Glass sjg at chromium.org
Sat Nov 19 14:48:19 CET 2016


Hi Stefan,

On 17 November 2016 at 18:27, Stefan Agner <stefan at agner.ch> wrote:
> On 2016-11-17 17:14, Simon Glass wrote:
>> Hi Stefan,
>>
>> On 15 November 2016 at 14:02, Stefan Agner <stefan at agner.ch> wrote:
>>> From: Stefan Agner <stefan.agner at toradex.com>
>>>
>>> Some devices (e.g. dra7xx) support loading to RAM using DFU without
>>> having direct boot from RAM support. Make sure the linker list
>>> does not contain BOOT_DEVICE_RAM if CONFIG_SPL_RAM_SUPPORT is not
>>> enabled.
>>>
>>> Fixes: 98136b2f26fa ("spl: Convert spl_ram_load_image() to use linker list")
>>>
>>> Signed-off-by: Stefan Agner <stefan.agner at toradex.com>
>>> ---
>>>
>>> Changes in v3: None
>>> Changes in v2:
>>> - Use CONFIG_SPL_RAM_SUPPORT to descide whether to compile the
>>>   function in first place.
>>>
>>>  common/spl/spl.c | 4 +++-
>>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/common/spl/spl.c b/common/spl/spl.c
>>> index bdb165a..ef17619 100644
>>> --- a/common/spl/spl.c
>>> +++ b/common/spl/spl.c
>>> @@ -174,7 +174,7 @@ __weak void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
>>>  # define CONFIG_SPL_LOAD_FIT_ADDRESS   0
>>>  #endif
>>>
>>> -#if defined(CONFIG_SPL_RAM_DEVICE) || defined(CONFIG_SPL_DFU_SUPPORT)
>>> +#if defined(CONFIG_SPL_RAM_SUPPORT) || defined(CONFIG_SPL_DFU_SUPPORT)
>
> I just realized that this patch is wrong, the config option is currently
> named "CONFIG_SPL_RAM_DEVICE". I will send a v4.
>
>
>
>>>  static ulong spl_ram_load_read(struct spl_load_info *load, ulong sector,
>>>                                ulong count, void *buf)
>>
>> Can this be moved into its own file?
>>
>
> Hm, we discussed that on v2:
> https://www.mail-archive.com/u-boot@lists.denx.de/msg230689.html
>
> I planned to post a separate patch for that.
>
> For the separate patch, how should I do this? CONFIG_SPL_RAM_DEVICE is
> still old config, so I guess I would first have to move that to Kconfig.

Yes that would be good.

>
> What is CONFIG_SPL_RAM_DEVICE actually doing? I think it means that the
> image to boot is already there? (loaded by boot ROM?)

Yes I guess so.

>
>
> CONFIG_SPL_RAM_SUPPORT "Enable booting directly from RAM"
> CONFIG_SPL_RAM_DEVICE depends on CONFIG_SPL_RAM_SUPPORT "Image preloaded
> by ROM"
> CONFIG_SPL_DFU_SUPPORT depends on CONFIG_SPL_RAM_SUPPORT "Load image via
> DFU"
>

Regards,
Simon


More information about the U-Boot mailing list