Re: [U-Boot] [PATCH v2 3/7] stm32: stm32f7: add spl build support

2017-08-19 Thread Bo Shen

Hi Vikas,


On 08/18/2017 02:28 PM, Vikas MANOCHA wrote:

I'd suggest to add a follow-up patch to move all the
selected SPL related configuration from "arch/arm/mach-stm32/Kconfig" under 
STM32F7 to default configuration file (stm32f746-
disco_defconfig). Then if the people want just boot up u-boot itself, what they need to 
do is just run "make menuconfig" and then de-
select "Activate Falcon Mode"
(SPL_OS_BOOT). Then everything will be fine.

Yes, Agree. How about using "imply" instead of "select" for SPL_OS_BOOT to make 
it configurable.


I don't realize this option before. For sure, it's a great option. I'd 
like it. :)


Thanks.

Best Regards,
Bo Shen
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v2 3/7] stm32: stm32f7: add spl build support

2017-08-18 Thread Vikas MANOCHA
Hi,

> On Aug 18, 2017, at 6:31 PM, Robert Nelson <robertcnel...@gmail.com> wrote:
> 
>> On Fri, Aug 18, 2017 at 4:28 PM, Vikas MANOCHA <vikas.mano...@st.com> wrote:
>> Hi Bo,
>> 
>>> -Original Message-
>>> From: Bo Shen [mailto:voice.s...@gmail.com]
>>> Sent: Thursday, August 17, 2017 10:07 PM
>>> To: Robert Nelson <robertcnel...@gmail.com>; Vikas MANOCHA 
>>> <vikas.mano...@st.com>
>>> Cc: U-Boot-Denx <u-boot@lists.denx.de>; Christophe PRIOUZEAU 
>>> <christophe.priouz...@st.com>; Alexandre TORGUE
>>> <alexandre.tor...@st.com>
>>> Subject: Re: [U-Boot] [PATCH v2 3/7] stm32: stm32f7: add spl build support
>>> 
>>> 
>>> Hi Vikas,
>>>   Try to remove this magic (press 'c' on the keyboard when at the boot 
>>> time),
>> 
>> It helps to select between U-Boot or OS booting.
>> 
>>> I'd suggest to add a follow-up patch to move all the
>>> selected SPL related configuration from "arch/arm/mach-stm32/Kconfig" under 
>>> STM32F7 to default configuration file (stm32f746-
>>> disco_defconfig). Then if the people want just boot up u-boot itself, what 
>>> they need to do is just run "make menuconfig" and then de-
>>> select "Activate Falcon Mode"
>>> (SPL_OS_BOOT). Then everything will be fine.
>> 
>> Yes, Agree. How about using "imply" instead of "select" for SPL_OS_BOOT to 
>> make it configurable.
> 
> Well, we really need a /doc/README.stm32 that explains this
> "different" default..  It's definitely different then
> omap/imx/tegra/atmel in this tree. But the processor is also more
> handicapped, so not wasting time in normal u-boot just booting the
> kernel via spl/falcon more makes sense.

That's the current configuration with one additional key entry check which is 
insignificant in terms of any overhead.

Making SPL_OS_BOOT configurable is also adding option to compile spl to boot 
UBoot directly without any overhead.

Cheers,
Vikas 

> 
> Regards,
> 
> -- 
> Robert Nelson
> https://rcn-ee.com/
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v2 3/7] stm32: stm32f7: add spl build support

2017-08-18 Thread Robert Nelson
On Fri, Aug 18, 2017 at 4:28 PM, Vikas MANOCHA <vikas.mano...@st.com> wrote:
> Hi Bo,
>
>> -Original Message-
>> From: Bo Shen [mailto:voice.s...@gmail.com]
>> Sent: Thursday, August 17, 2017 10:07 PM
>> To: Robert Nelson <robertcnel...@gmail.com>; Vikas MANOCHA 
>> <vikas.mano...@st.com>
>> Cc: U-Boot-Denx <u-boot@lists.denx.de>; Christophe PRIOUZEAU 
>> <christophe.priouz...@st.com>; Alexandre TORGUE
>> <alexandre.tor...@st.com>
>> Subject: Re: [U-Boot] [PATCH v2 3/7] stm32: stm32f7: add spl build support
>>
>>
>> Hi Vikas,
>>Try to remove this magic (press 'c' on the keyboard when at the boot 
>> time),
>
> It helps to select between U-Boot or OS booting.
>
>> I'd suggest to add a follow-up patch to move all the
>> selected SPL related configuration from "arch/arm/mach-stm32/Kconfig" under 
>> STM32F7 to default configuration file (stm32f746-
>> disco_defconfig). Then if the people want just boot up u-boot itself, what 
>> they need to do is just run "make menuconfig" and then de-
>> select "Activate Falcon Mode"
>> (SPL_OS_BOOT). Then everything will be fine.
>
> Yes, Agree. How about using "imply" instead of "select" for SPL_OS_BOOT to 
> make it configurable.

Well, we really need a /doc/README.stm32 that explains this
"different" default..  It's definitely different then
omap/imx/tegra/atmel in this tree. But the processor is also more
handicapped, so not wasting time in normal u-boot just booting the
kernel via spl/falcon more makes sense.

Regards,

-- 
Robert Nelson
https://rcn-ee.com/
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v2 3/7] stm32: stm32f7: add spl build support

2017-08-18 Thread Vikas MANOCHA
Hi Bo,

> -Original Message-
> From: Bo Shen [mailto:voice.s...@gmail.com]
> Sent: Thursday, August 17, 2017 10:07 PM
> To: Robert Nelson <robertcnel...@gmail.com>; Vikas MANOCHA 
> <vikas.mano...@st.com>
> Cc: U-Boot-Denx <u-boot@lists.denx.de>; Christophe PRIOUZEAU 
> <christophe.priouz...@st.com>; Alexandre TORGUE
> <alexandre.tor...@st.com>
> Subject: Re: [U-Boot] [PATCH v2 3/7] stm32: stm32f7: add spl build support
> 
> 
> Hi Vikas,
>Try to remove this magic (press 'c' on the keyboard when at the boot time),

It helps to select between U-Boot or OS booting.

> I'd suggest to add a follow-up patch to move all the
> selected SPL related configuration from "arch/arm/mach-stm32/Kconfig" under 
> STM32F7 to default configuration file (stm32f746-
> disco_defconfig). Then if the people want just boot up u-boot itself, what 
> they need to do is just run "make menuconfig" and then de-
> select "Activate Falcon Mode"
> (SPL_OS_BOOT). Then everything will be fine.

Yes, Agree. How about using "imply" instead of "select" for SPL_OS_BOOT to make 
it configurable.

Cheers,
Vikas

> 
>Thanks.
> 
> Best Regards,
> Bo Shen
> 
> On 08/10/2017 11:36 AM, Robert Nelson wrote:
> > On Thu, Aug 10, 2017 at 1:10 PM, Vikas Manocha <vikas.mano...@st.com> wrote:
> >> One other point,
> >>
> >> On 08/10/2017 11:07 AM, Vikas Manocha wrote:
> >>> Hi Robert,
> >>>
> >>> On 08/10/2017 11:03 AM, Robert Nelson wrote:
> >>>> Hi Vikas,
> >>>>
> >>>> On Sun, May 28, 2017 at 2:55 PM, Vikas Manocha <vikas.mano...@st.com> 
> >>>> wrote:
> >>>>> This commit supports booting from stm32 internal nor flash. spl
> >>>>> U-Boot initializes the sdram memory, copies next image (e.g.
> >>>>> standard U-Boot) to sdram & then jumps to entry point.
> >>>>>
> >>>>> Here are the flash memory addresses for U-Boot-spl & standard U-Boot:
> >>>>>  - spl U-Boot: 0x0800_
> >>>>>  - standard U-Boot   : 0x0800_8000
> >>>> Is there another patchset missing on mainline for booting via spl?
> >>> No, you just need to flash spl & next image at above mentioned addresses. 
> >>> By default spl expects kernel image.
> >>>
> >>> To boot u-boot, press keyboard character 'c'.
> >>> you might need to keep on pressing 'c' it for some time as the keyboard 
> >>> entry acceptance & detection window is very small.
> >>>
> >>> Cheers,
> >>> Vikas
> >>>
> >>>> on mainline with the stm32f746-disco board:
> >>>>
> >>>> U-Boot SPL 2017.09-rc1-00177-gd529124fdc (Aug 10 2017 - 12:33:35)
> >>>> Trying to boot from XIP Hard fault
> >>>> pc : 08008008lr : 08000adbxPSR : 2100
> >>>> r12 : 2004f338   r3 : 0005r2 : 081c
> >>>> r1 : ff9ar0 : 
> >>>> Resetting CPU ...
> >>>>
> >>>> resetting ...
> >>>>
> >>>> I'm using openocd to program
> >>>>
> >>>> openocd -f board/stm32f7discovery.cfg \
> >>>>-c "init" \
> >>>>-c "reset init" \
> >>>>-c "flash probe 0" \
> >>>>-c "flash write_image erase ./spl/u-boot-spl.bin 0x0800" \
> >>>>-c "flash write_image erase ./u-boot.img 0x08008000" \
> >> it should be u-boot-dtb.bin.
> > Bingo!
> >
> > Thanks Vikas!!
> >
> > U-Boot SPL 2017.09-rc1-00177-gd529124fdc (Aug 10 2017 - 12:33:35)
> > Trying to boot from XIP
> >
> >
> > U-Boot 2017.09-rc1-00177-gd529124fdc (Aug 10 2017 - 12:33:35 -0500)
> >
> > Model: STMicroelectronics STM32F746-DISCO board
> > DRAM:  8 MiB
> > Flash: 1 MiB
> > Using default environment
> >
> > In:serial@40011000
> > Out:   serial@40011000
> > Err:   serial@40011000
> > usr button is at LOW LEVEL
> > Net:
> > Warning: ethernet@40028000 (eth0) using random MAC address -
> > 02:4a:de:c3:c8:80
> > eth0: ethernet@40028000
> > Hit SPACE in 3 seconds to stop autoboot.
> > U-Boot >
> >
> > Regards,
> >

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v2 3/7] stm32: stm32f7: add spl build support

2017-08-17 Thread Bo Shen


Hi Vikas,
  Try to remove this magic (press 'c' on the keyboard when at the boot 
time), I'd suggest to add a follow-up patch to move all the selected SPL 
related configuration from "arch/arm/mach-stm32/Kconfig" under STM32F7 
to default configuration file (stm32f746-disco_defconfig). Then if the 
people want just boot up u-boot itself, what they need to do is just run 
"make menuconfig" and then de-select "Activate Falcon Mode" 
(SPL_OS_BOOT). Then everything will be fine.


  Thanks.

Best Regards,
Bo Shen

On 08/10/2017 11:36 AM, Robert Nelson wrote:

On Thu, Aug 10, 2017 at 1:10 PM, Vikas Manocha  wrote:

One other point,

On 08/10/2017 11:07 AM, Vikas Manocha wrote:

Hi Robert,

On 08/10/2017 11:03 AM, Robert Nelson wrote:

Hi Vikas,

On Sun, May 28, 2017 at 2:55 PM, Vikas Manocha  wrote:

This commit supports booting from stm32 internal nor flash. spl U-Boot
initializes the sdram memory, copies next image (e.g. standard U-Boot)
to sdram & then jumps to entry point.

Here are the flash memory addresses for U-Boot-spl & standard U-Boot:
 - spl U-Boot: 0x0800_
 - standard U-Boot   : 0x0800_8000

Is there another patchset missing on mainline for booting via spl?

No, you just need to flash spl & next image at above mentioned addresses. By 
default spl expects kernel image.

To boot u-boot, press keyboard character 'c'.
you might need to keep on pressing 'c' it for some time as the keyboard entry 
acceptance & detection window is very small.

Cheers,
Vikas


on mainline with the stm32f746-disco board:

U-Boot SPL 2017.09-rc1-00177-gd529124fdc (Aug 10 2017 - 12:33:35)
Trying to boot from XIP
Hard fault
pc : 08008008lr : 08000adbxPSR : 2100
r12 : 2004f338   r3 : 0005r2 : 081c
r1 : ff9ar0 : 
Resetting CPU ...

resetting ...

I'm using openocd to program

openocd -f board/stm32f7discovery.cfg \
   -c "init" \
   -c "reset init" \
   -c "flash probe 0" \
   -c "flash write_image erase ./spl/u-boot-spl.bin 0x0800" \
   -c "flash write_image erase ./u-boot.img 0x08008000" \

it should be u-boot-dtb.bin.

Bingo!

Thanks Vikas!!

U-Boot SPL 2017.09-rc1-00177-gd529124fdc (Aug 10 2017 - 12:33:35)
Trying to boot from XIP


U-Boot 2017.09-rc1-00177-gd529124fdc (Aug 10 2017 - 12:33:35 -0500)

Model: STMicroelectronics STM32F746-DISCO board
DRAM:  8 MiB
Flash: 1 MiB
Using default environment

In:serial@40011000
Out:   serial@40011000
Err:   serial@40011000
usr button is at LOW LEVEL
Net:
Warning: ethernet@40028000 (eth0) using random MAC address - 02:4a:de:c3:c8:80
eth0: ethernet@40028000
Hit SPACE in 3 seconds to stop autoboot.
U-Boot >

Regards,



___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v2 3/7] stm32: stm32f7: add spl build support

2017-08-10 Thread Robert Nelson
On Thu, Aug 10, 2017 at 1:10 PM, Vikas Manocha  wrote:
> One other point,
>
> On 08/10/2017 11:07 AM, Vikas Manocha wrote:
>> Hi Robert,
>>
>> On 08/10/2017 11:03 AM, Robert Nelson wrote:
>>> Hi Vikas,
>>>
>>> On Sun, May 28, 2017 at 2:55 PM, Vikas Manocha  wrote:
 This commit supports booting from stm32 internal nor flash. spl U-Boot
 initializes the sdram memory, copies next image (e.g. standard U-Boot)
 to sdram & then jumps to entry point.

 Here are the flash memory addresses for U-Boot-spl & standard U-Boot:
 - spl U-Boot: 0x0800_
 - standard U-Boot   : 0x0800_8000
>>>
>>> Is there another patchset missing on mainline for booting via spl?
>>
>> No, you just need to flash spl & next image at above mentioned addresses. By 
>> default spl expects kernel image.
>>
>> To boot u-boot, press keyboard character 'c'.
>> you might need to keep on pressing 'c' it for some time as the keyboard 
>> entry acceptance & detection window is very small.
>>
>> Cheers,
>> Vikas
>>
>>>
>>> on mainline with the stm32f746-disco board:
>>>
>>> U-Boot SPL 2017.09-rc1-00177-gd529124fdc (Aug 10 2017 - 12:33:35)
>>> Trying to boot from XIP
>>> Hard fault
>>> pc : 08008008lr : 08000adbxPSR : 2100
>>> r12 : 2004f338   r3 : 0005r2 : 081c
>>> r1 : ff9ar0 : 
>>> Resetting CPU ...
>>>
>>> resetting ...
>>>
>>> I'm using openocd to program
>>>
>>> openocd -f board/stm32f7discovery.cfg \
>>>   -c "init" \
>>>   -c "reset init" \
>>>   -c "flash probe 0" \
>>>   -c "flash write_image erase ./spl/u-boot-spl.bin 0x0800" \
>>>   -c "flash write_image erase ./u-boot.img 0x08008000" \
>
> it should be u-boot-dtb.bin.

Bingo!

Thanks Vikas!!

U-Boot SPL 2017.09-rc1-00177-gd529124fdc (Aug 10 2017 - 12:33:35)
Trying to boot from XIP


U-Boot 2017.09-rc1-00177-gd529124fdc (Aug 10 2017 - 12:33:35 -0500)

Model: STMicroelectronics STM32F746-DISCO board
DRAM:  8 MiB
Flash: 1 MiB
Using default environment

In:serial@40011000
Out:   serial@40011000
Err:   serial@40011000
usr button is at LOW LEVEL
Net:
Warning: ethernet@40028000 (eth0) using random MAC address - 02:4a:de:c3:c8:80
eth0: ethernet@40028000
Hit SPACE in 3 seconds to stop autoboot.
U-Boot >

Regards,

-- 
Robert Nelson
https://rcn-ee.com/
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v2 3/7] stm32: stm32f7: add spl build support

2017-08-10 Thread Vikas Manocha
One other point,

On 08/10/2017 11:07 AM, Vikas Manocha wrote:
> Hi Robert,
> 
> On 08/10/2017 11:03 AM, Robert Nelson wrote:
>> Hi Vikas,
>>
>> On Sun, May 28, 2017 at 2:55 PM, Vikas Manocha  wrote:
>>> This commit supports booting from stm32 internal nor flash. spl U-Boot
>>> initializes the sdram memory, copies next image (e.g. standard U-Boot)
>>> to sdram & then jumps to entry point.
>>>
>>> Here are the flash memory addresses for U-Boot-spl & standard U-Boot:
>>> - spl U-Boot: 0x0800_
>>> - standard U-Boot   : 0x0800_8000
>>
>> Is there another patchset missing on mainline for booting via spl?
> 
> No, you just need to flash spl & next image at above mentioned addresses. By 
> default spl expects kernel image. 
> 
> To boot u-boot, press keyboard character 'c'.
> you might need to keep on pressing 'c' it for some time as the keyboard entry 
> acceptance & detection window is very small.
> 
> Cheers,
> Vikas
> 
>>
>> on mainline with the stm32f746-disco board:
>>
>> U-Boot SPL 2017.09-rc1-00177-gd529124fdc (Aug 10 2017 - 12:33:35)
>> Trying to boot from XIP
>> Hard fault
>> pc : 08008008lr : 08000adbxPSR : 2100
>> r12 : 2004f338   r3 : 0005r2 : 081c
>> r1 : ff9ar0 : 
>> Resetting CPU ...
>>
>> resetting ...
>>
>> I'm using openocd to program
>>
>> openocd -f board/stm32f7discovery.cfg \
>>   -c "init" \
>>   -c "reset init" \
>>   -c "flash probe 0" \
>>   -c "flash write_image erase ./spl/u-boot-spl.bin 0x0800" \
>>   -c "flash write_image erase ./u-boot.img 0x08008000" \

it should be u-boot-dtb.bin.

Cheers,
Vikas

>>   -c "reset run" \
>>   -c "shutdown"
>>
>> Regards,
>>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v2 3/7] stm32: stm32f7: add spl build support

2017-08-10 Thread Vikas Manocha
Hi Robert,

On 08/10/2017 11:03 AM, Robert Nelson wrote:
> Hi Vikas,
> 
> On Sun, May 28, 2017 at 2:55 PM, Vikas Manocha  wrote:
>> This commit supports booting from stm32 internal nor flash. spl U-Boot
>> initializes the sdram memory, copies next image (e.g. standard U-Boot)
>> to sdram & then jumps to entry point.
>>
>> Here are the flash memory addresses for U-Boot-spl & standard U-Boot:
>> - spl U-Boot: 0x0800_
>> - standard U-Boot   : 0x0800_8000
> 
> Is there another patchset missing on mainline for booting via spl?

No, you just need to flash spl & next image at above mentioned addresses. By 
default spl expects kernel image. 

To boot u-boot, press keyboard character 'c'.
you might need to keep on pressing 'c' it for some time as the keyboard entry 
acceptance & detection window is very small.

Cheers,
Vikas

> 
> on mainline with the stm32f746-disco board:
> 
> U-Boot SPL 2017.09-rc1-00177-gd529124fdc (Aug 10 2017 - 12:33:35)
> Trying to boot from XIP
> Hard fault
> pc : 08008008lr : 08000adbxPSR : 2100
> r12 : 2004f338   r3 : 0005r2 : 081c
> r1 : ff9ar0 : 
> Resetting CPU ...
> 
> resetting ...
> 
> I'm using openocd to program
> 
> openocd -f board/stm32f7discovery.cfg \
>   -c "init" \
>   -c "reset init" \
>   -c "flash probe 0" \
>   -c "flash write_image erase ./spl/u-boot-spl.bin 0x0800" \
>   -c "flash write_image erase ./u-boot.img 0x08008000" \
>   -c "reset run" \
>   -c "shutdown"
> 
> Regards,
> 
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v2 3/7] stm32: stm32f7: add spl build support

2017-08-10 Thread Robert Nelson
Hi Vikas,

On Sun, May 28, 2017 at 2:55 PM, Vikas Manocha  wrote:
> This commit supports booting from stm32 internal nor flash. spl U-Boot
> initializes the sdram memory, copies next image (e.g. standard U-Boot)
> to sdram & then jumps to entry point.
>
> Here are the flash memory addresses for U-Boot-spl & standard U-Boot:
> - spl U-Boot: 0x0800_
> - standard U-Boot   : 0x0800_8000

Is there another patchset missing on mainline for booting via spl?

on mainline with the stm32f746-disco board:

U-Boot SPL 2017.09-rc1-00177-gd529124fdc (Aug 10 2017 - 12:33:35)
Trying to boot from XIP
Hard fault
pc : 08008008lr : 08000adbxPSR : 2100
r12 : 2004f338   r3 : 0005r2 : 081c
r1 : ff9ar0 : 
Resetting CPU ...

resetting ...

I'm using openocd to program

openocd -f board/stm32f7discovery.cfg \
  -c "init" \
  -c "reset init" \
  -c "flash probe 0" \
  -c "flash write_image erase ./spl/u-boot-spl.bin 0x0800" \
  -c "flash write_image erase ./u-boot.img 0x08008000" \
  -c "reset run" \
  -c "shutdown"

Regards,

-- 
Robert Nelson
https://rcn-ee.com/
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot