[U-Boot] [RFC PATCH 1/5] armv7: move boot hook before '_start'

Marek Vasut marex at denx.de
Tue Jun 13 08:42:06 UTC 2017


On 06/13/2017 03:51 AM, Kever Yang wrote:
> Hi Marek,

Hi,

> On 06/07/2017 02:28 PM, Marek Vasut wrote:
>> On 06/07/2017 04:28 AM, Kever Yang wrote:
>>> Hi Andre, Steve, Marek,
>>>
>>>      Could you help to check how to make it work with this patch on
>>> sunxi, bcm and socfpga platform?
>> The socfpga expects the hook at that exact position (0x40 I think) , so
>> if you moved it somewhere, you broke socfpga.
> 
> I know this break socfpga, and that's why I cc you for help, could you
> help the take a look if we can have a solution on socfpga to "make it
> work with this patch"?

Can you generate the same u-boot binary with this patch ? If so, then it
will work on socfpga. SoCFPGA expects that small piece of stuff at
offset 0x40 , so if you move this boot0 hook, it will break. HTH

> Comments from Philipp[0] show that its reasonable for this patch set,
> I don't know how the boot0-hook works in socfpga and also sunxi and bcm,
> could you help me to fix the hook content upon this patch?
> 
> Thanks,
> - Kever
> [0]https://www.mail-archive.com/u-boot@lists.denx.de/msg252823.html
>>
>>> Thanks,
>>> - Kever
>>> On 05/31/2017 06:50 PM, Kever Yang wrote:
>>>> The boot0 hook suppose to add some data before the SPL data,
>>>> let's move it at very begining and before '_start'.
>>>>
>>>> Signed-off-by: Kever Yang <kever.yang at rock-chips.com>
>>>> ---
>>>>
>>>>    arch/arm/lib/vectors.S | 19 ++++++++++---------
>>>>    1 file changed, 10 insertions(+), 9 deletions(-)
>>>>
>>>> diff --git a/arch/arm/lib/vectors.S b/arch/arm/lib/vectors.S
>>>> index f53b1e9..b4cd825 100644
>>>> --- a/arch/arm/lib/vectors.S
>>>> +++ b/arch/arm/lib/vectors.S
>>>> @@ -35,6 +35,16 @@
>>>>          .section ".vectors", "ax"
>>>>    +#ifdef CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK
>>>> +/*
>>>> + * Various SoCs need something special and SoC-specific up front in
>>>> + * order to boot, allow them to set that in their boot0.h file and
>>>> then
>>>> + * use it here.
>>>> + */
>>>> +#include <asm/arch/boot0.h>
>>>> +
>>>> +#endif
>>>> +
>>>>    /*
>>>>   
>>>> *************************************************************************
>>>>
>>>>     *
>>>> @@ -60,15 +70,6 @@ _start:
>>>>        ldr    pc, _irq
>>>>        ldr    pc, _fiq
>>>>    -#ifdef CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK
>>>> -/*
>>>> - * Various SoCs need something special and SoC-specific up front in
>>>> - * order to boot, allow them to set that in their boot0.h file and
>>>> then
>>>> - * use it here.
>>>> - */
>>>> -#include <asm/arch/boot0.h>
>>>> -#endif
>>>> -
>>>>    /*
>>>>   
>>>> *************************************************************************
>>>>
>>>>     *
>>>
>>
> 
> 


-- 
Best regards,
Marek Vasut


More information about the U-Boot mailing list