Re: [U-Boot] [PATCH v4 0/4] configs: rk3288: Tinker Board SPL file must fit into 32 KiB

2019-04-22 Thread Simon Goldschmidt



On 22.04.19 21:29, Tom Rini wrote:

On Mon, Apr 22, 2019 at 08:40:52PM +0200, Simon Goldschmidt wrote:

Am 22.04.2019 um 16:36 schrieb Tom Rini:

On Thu, Apr 18, 2019 at 10:12:36PM +0200, Simon Goldschmidt wrote:

Heinrich,

On 02.04.19 19:19, Heinrich Schuchardt wrote:

The SPL image for the Tinker Board has to fit into 32 KiB. This includes
up to 2 KiB for the file header.

A new configuration variable CONFIG_SPL_SIZE_LIMIT is introduced to define
the board specific limit.

A common Makefile function is used for this test and the test against
CONFIG_BOARD_SIZE_LIMIT.

Move the board size check from arch/arm/mach-imx/Makefile to Makefile.


Has anything from this series been applied? I now have a working patch that
applies on top of this and adds a full SPL SRAM size check (including HEAP,
GD and stack; via a host tool) which works for socfpga (as an example of a
platform where SPL binary is loaded to limited SRAM).

Actually, my patch would replace your patch 3/4 but build on 1/4 (2/4 and
4/4 are arch-specific).

How should we proceed here? I could send a series including your 1/4, or I
could send a series completely building on this series, at the downside of
more or less reverting your 2/4.


What I would like to see is i.MX (and rockchip) converted to use your
new test as well (also, yay!  Thanks for following up on that!) and we
drop the existing check here.


Ok, so while I cannot really help on i.MX and rockchip, why don't you accept
this series from Heinrich and I'll send my patch as followup? Then we can
discuss this with i.MX and rockchip maintainers.


Can you post your series now, and we can move from there?  Thanks!


Did that:
https://patchwork.ozlabs.org/patch/1088865/
[Depends on this series from Heinrich]

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


Re: [U-Boot] [PATCH v4 0/4] configs: rk3288: Tinker Board SPL file must fit into 32 KiB

2019-04-22 Thread Tom Rini
On Mon, Apr 22, 2019 at 08:40:52PM +0200, Simon Goldschmidt wrote:
> Am 22.04.2019 um 16:36 schrieb Tom Rini:
> >On Thu, Apr 18, 2019 at 10:12:36PM +0200, Simon Goldschmidt wrote:
> >>Heinrich,
> >>
> >>On 02.04.19 19:19, Heinrich Schuchardt wrote:
> >>>The SPL image for the Tinker Board has to fit into 32 KiB. This includes
> >>>up to 2 KiB for the file header.
> >>>
> >>>A new configuration variable CONFIG_SPL_SIZE_LIMIT is introduced to define
> >>>the board specific limit.
> >>>
> >>>A common Makefile function is used for this test and the test against
> >>>CONFIG_BOARD_SIZE_LIMIT.
> >>>
> >>>Move the board size check from arch/arm/mach-imx/Makefile to Makefile.
> >>
> >>Has anything from this series been applied? I now have a working patch that
> >>applies on top of this and adds a full SPL SRAM size check (including HEAP,
> >>GD and stack; via a host tool) which works for socfpga (as an example of a
> >>platform where SPL binary is loaded to limited SRAM).
> >>
> >>Actually, my patch would replace your patch 3/4 but build on 1/4 (2/4 and
> >>4/4 are arch-specific).
> >>
> >>How should we proceed here? I could send a series including your 1/4, or I
> >>could send a series completely building on this series, at the downside of
> >>more or less reverting your 2/4.
> >
> >What I would like to see is i.MX (and rockchip) converted to use your
> >new test as well (also, yay!  Thanks for following up on that!) and we
> >drop the existing check here.
> 
> Ok, so while I cannot really help on i.MX and rockchip, why don't you accept
> this series from Heinrich and I'll send my patch as followup? Then we can
> discuss this with i.MX and rockchip maintainers.

Can you post your series now, and we can move from there?  Thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH v4 0/4] configs: rk3288: Tinker Board SPL file must fit into 32 KiB

2019-04-22 Thread Simon Goldschmidt

Am 22.04.2019 um 16:36 schrieb Tom Rini:

On Thu, Apr 18, 2019 at 10:12:36PM +0200, Simon Goldschmidt wrote:

Heinrich,

On 02.04.19 19:19, Heinrich Schuchardt wrote:

The SPL image for the Tinker Board has to fit into 32 KiB. This includes
up to 2 KiB for the file header.

A new configuration variable CONFIG_SPL_SIZE_LIMIT is introduced to define
the board specific limit.

A common Makefile function is used for this test and the test against
CONFIG_BOARD_SIZE_LIMIT.

Move the board size check from arch/arm/mach-imx/Makefile to Makefile.


Has anything from this series been applied? I now have a working patch that
applies on top of this and adds a full SPL SRAM size check (including HEAP,
GD and stack; via a host tool) which works for socfpga (as an example of a
platform where SPL binary is loaded to limited SRAM).

Actually, my patch would replace your patch 3/4 but build on 1/4 (2/4 and
4/4 are arch-specific).

How should we proceed here? I could send a series including your 1/4, or I
could send a series completely building on this series, at the downside of
more or less reverting your 2/4.


What I would like to see is i.MX (and rockchip) converted to use your
new test as well (also, yay!  Thanks for following up on that!) and we
drop the existing check here.



Ok, so while I cannot really help on i.MX and rockchip, why don't you 
accept this series from Heinrich and I'll send my patch as followup? 
Then we can discuss this with i.MX and rockchip maintainers.


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


Re: [U-Boot] [PATCH v4 0/4] configs: rk3288: Tinker Board SPL file must fit into 32 KiB

2019-04-22 Thread Tom Rini
On Thu, Apr 18, 2019 at 10:12:36PM +0200, Simon Goldschmidt wrote:
> Heinrich,
> 
> On 02.04.19 19:19, Heinrich Schuchardt wrote:
> >The SPL image for the Tinker Board has to fit into 32 KiB. This includes
> >up to 2 KiB for the file header.
> >
> >A new configuration variable CONFIG_SPL_SIZE_LIMIT is introduced to define
> >the board specific limit.
> >
> >A common Makefile function is used for this test and the test against
> >CONFIG_BOARD_SIZE_LIMIT.
> >
> >Move the board size check from arch/arm/mach-imx/Makefile to Makefile.
> 
> Has anything from this series been applied? I now have a working patch that
> applies on top of this and adds a full SPL SRAM size check (including HEAP,
> GD and stack; via a host tool) which works for socfpga (as an example of a
> platform where SPL binary is loaded to limited SRAM).
> 
> Actually, my patch would replace your patch 3/4 but build on 1/4 (2/4 and
> 4/4 are arch-specific).
> 
> How should we proceed here? I could send a series including your 1/4, or I
> could send a series completely building on this series, at the downside of
> more or less reverting your 2/4.

What I would like to see is i.MX (and rockchip) converted to use your
new test as well (also, yay!  Thanks for following up on that!) and we
drop the existing check here.

-- 
Tom


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


Re: [U-Boot] [PATCH v4 0/4] configs: rk3288: Tinker Board SPL file must fit into 32 KiB

2019-04-18 Thread Simon Goldschmidt

Heinrich,

On 02.04.19 19:19, Heinrich Schuchardt wrote:

The SPL image for the Tinker Board has to fit into 32 KiB. This includes
up to 2 KiB for the file header.

A new configuration variable CONFIG_SPL_SIZE_LIMIT is introduced to define
the board specific limit.

A common Makefile function is used for this test and the test against
CONFIG_BOARD_SIZE_LIMIT.

Move the board size check from arch/arm/mach-imx/Makefile to Makefile.


Has anything from this series been applied? I now have a working patch 
that applies on top of this and adds a full SPL SRAM size check 
(including HEAP, GD and stack; via a host tool) which works for socfpga 
(as an example of a platform where SPL binary is loaded to limited SRAM).


Actually, my patch would replace your patch 3/4 but build on 1/4 (2/4 
and 4/4 are arch-specific).


How should we proceed here? I could send a series including your 1/4, or 
I could send a series completely building on this series, at the 
downside of more or less reverting your 2/4.


Regards,
Simon



v4:
use a common function for all size checks in the Makefiles

Heinrich Schuchardt (4):
   Makefile: reusable function for BOARD_SIZE_CHECK
   imx: move BOARD_SIZE_CHECK to main Makefile
   configs: define CONFIG_SPL_SIZE_LIMIT
   configs: rk3288: Tinker Board SPL file must fit into 32 KiB

  Kconfig |  8 
  Makefile| 33 +++--
  arch/arm/mach-imx/Makefile  | 16 
  configs/tinker-rk3288_defconfig |  1 +
  4 files changed, 32 insertions(+), 26 deletions(-)

--
2.20.1


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


Re: [U-Boot] [PATCH v4 0/4] configs: rk3288: Tinker Board SPL file must fit into 32 KiB

2019-04-03 Thread Benoît Thébaudeau
Hi Heinrich,

On Wed, Apr 3, 2019 at 8:20 AM Heinrich Schuchardt  wrote:
>
> On 4/3/19 2:59 AM, Kever Yang wrote:
> > Hi Heinrich,
> >
> >
> > On 04/03/2019 01:19 AM, Heinrich Schuchardt wrote:
> >> The SPL image for the Tinker Board has to fit into 32 KiB. This includes
> >> up to 2 KiB for the file header.
> >
> > 32KB is the limit of SPL size, not SPL image size, does not include 2KB
> > header.
> >>
> >> A new configuration variable CONFIG_SPL_SIZE_LIMIT is introduced to define
> >> the board specific limit.
> >
> > There is already CONFIG_SPL_MAX_SIZE for the SPL size limit, isn't it?
> > I don't understand  why we need new variable.
>
> SPL_MAX_SIZE is used to set CONFIG_SPL_PAD_TO if CONFIG_SPL_PAD_TO is
> not defined. If CONFIG_SPL_PAD_TO is defined it specifies the maximum
> value of CONFIG_SPL_PAD_TO.

If CONFIG_SPL_PAD_TO is defined and non-zero, CONFIG_SPL_MAX_SIZE
specifies the _minimum_ value of CONFIG_SPL_PAD_TO.

> So in case CONFIG_SPL_PAD_TO is not defined
> SPL_MAX_SIZE does not specify a maximum size but a minimum one.

CONFIG_SPL_MAX_SIZE specifies a minimum value for CONFIG_SPL_PAD_TO,
but a maximum size for the SPL.

> It is unclear to me why Benoît in 6113d3f27ca ("Makefile: Change
> CONFIG_SPL_PAD_TO to image offset") chose this design. Entangling the
> variables in this way does not provide a clean design.

Everything is explained in this thread:
https://lists.denx.de/pipermail/u-boot/2013-February/146851.html

These two variables coexisted before this change. They have different
purposes, but they are related, so they cannot take any values
independently of each other.

The purpose of CONFIG_SPL_MAX_SIZE is not to define default or minimum
values for CONFIG_SPL_PAD_TO, but only what its name says, i.e. to
define the maximum SPL size.

After the SPL, there may be a gap, then a payload appended to the
image. The purpose of CONFIG_SPL_PAD_TO is to define the image offset
of the payload, if any. CONFIG_SPL_PAD_TO can be 0 if the payload can
always be appended to the SPL without any gap.

Therefore, the SPL must fit inside CONFIG_SPL_MAX_SIZE, and
CONFIG_SPL_MAX_SIZE must fit inside CONFIG_SPL_PAD_TO if the latter is
non-zero.

[...]

Best regards,
Benoît

On Wed, Apr 3, 2019 at 8:20 AM Heinrich Schuchardt  wrote:
>
> On 4/3/19 2:59 AM, Kever Yang wrote:
> > Hi Heinrich,
> >
> >
> > On 04/03/2019 01:19 AM, Heinrich Schuchardt wrote:
> >> The SPL image for the Tinker Board has to fit into 32 KiB. This includes
> >> up to 2 KiB for the file header.
> >
> > 32KB is the limit of SPL size, not SPL image size, does not include 2KB
> > header.
> >>
> >> A new configuration variable CONFIG_SPL_SIZE_LIMIT is introduced to define
> >> the board specific limit.
> >
> > There is already CONFIG_SPL_MAX_SIZE for the SPL size limit, isn't it?
> > I don't understand  why we need new variable.
>
> SPL_MAX_SIZE is used to set CONFIG_SPL_PAD_TO if CONFIG_SPL_PAD_TO is
> not defined. If CONFIG_SPL_PAD_TO is defined it specifies the maximum
> value of CONFIG_SPL_PAD_TO. So in case CONFIG_SPL_PAD_TO is not defined
> SPL_MAX_SIZE does not specify a maximum size but a minimum one.
>
> It is unclear to me why Benoît in 6113d3f27ca ("Makefile: Change
> CONFIG_SPL_PAD_TO to image offset") chose this design. Entangling the
> variables in this way does not provide a clean design.
>
> The check
>
> #if defined(IMAGE_MAX_SIZE)
> ASSERT(__image_copy_end - __image_copy_start < (IMAGE_MAX_SIZE), \
> "SPL image too big");
> #endif
>
> in arch/arm/cpu/u-boot-spl.lds neither considers the size of the device
> tree nor of the BSS section. So at least for Rockchip SOCs it is
> checking a measure that is not directly related to the image size
> created by `mkimage -T rksd`.
>
> Best regards
>
> Heinrich
>
> >
> > Thanks,
> > - Kever
> >> A common Makefile function is used for this test and the test against
> >> CONFIG_BOARD_SIZE_LIMIT.
> >>
> >> Move the board size check from arch/arm/mach-imx/Makefile to Makefile.
> >>
> >> v4:
> >>  use a common function for all size checks in the Makefiles
> >>
> >> Heinrich Schuchardt (4):
> >>   Makefile: reusable function for BOARD_SIZE_CHECK
> >>   imx: move BOARD_SIZE_CHECK to main Makefile
> >>   configs: define CONFIG_SPL_SIZE_LIMIT
> >>   configs: rk3288: Tinker Board SPL file must fit into 32 KiB
> >>
> >>  Kconfig |  8 
> >>  Makefile| 33 +++--
> >>  arch/arm/mach-imx/Makefile  | 16 
> >>  configs/tinker-rk3288_defconfig |  1 +
> >>  4 files changed, 32 insertions(+), 26 deletions(-)
> >>
> >> --
> >> 2.20.1
> ___
> U-Boot mailing list
> U-Boot@lists.denx.de
> https://lists.denx.de/listinfo/u-boot
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v4 0/4] configs: rk3288: Tinker Board SPL file must fit into 32 KiB

2019-04-03 Thread Heinrich Schuchardt
On 4/3/19 2:59 AM, Kever Yang wrote:
> Hi Heinrich,
>
>
> On 04/03/2019 01:19 AM, Heinrich Schuchardt wrote:
>> The SPL image for the Tinker Board has to fit into 32 KiB. This includes
>> up to 2 KiB for the file header.
>
> 32KB is the limit of SPL size, not SPL image size, does not include 2KB
> header.
>>
>> A new configuration variable CONFIG_SPL_SIZE_LIMIT is introduced to define
>> the board specific limit.
>
> There is already CONFIG_SPL_MAX_SIZE for the SPL size limit, isn't it?
> I don't understand  why we need new variable.

SPL_MAX_SIZE is used to set CONFIG_SPL_PAD_TO if CONFIG_SPL_PAD_TO is
not defined. If CONFIG_SPL_PAD_TO is defined it specifies the maximum
value of CONFIG_SPL_PAD_TO. So in case CONFIG_SPL_PAD_TO is not defined
SPL_MAX_SIZE does not specify a maximum size but a minimum one.

It is unclear to me why Benoît in 6113d3f27ca ("Makefile: Change
CONFIG_SPL_PAD_TO to image offset") chose this design. Entangling the
variables in this way does not provide a clean design.

The check

#if defined(IMAGE_MAX_SIZE)
ASSERT(__image_copy_end - __image_copy_start < (IMAGE_MAX_SIZE), \
"SPL image too big");
#endif

in arch/arm/cpu/u-boot-spl.lds neither considers the size of the device
tree nor of the BSS section. So at least for Rockchip SOCs it is
checking a measure that is not directly related to the image size
created by `mkimage -T rksd`.

Best regards

Heinrich

>
> Thanks,
> - Kever
>> A common Makefile function is used for this test and the test against
>> CONFIG_BOARD_SIZE_LIMIT.
>>
>> Move the board size check from arch/arm/mach-imx/Makefile to Makefile.
>>
>> v4:
>>  use a common function for all size checks in the Makefiles
>>
>> Heinrich Schuchardt (4):
>>   Makefile: reusable function for BOARD_SIZE_CHECK
>>   imx: move BOARD_SIZE_CHECK to main Makefile
>>   configs: define CONFIG_SPL_SIZE_LIMIT
>>   configs: rk3288: Tinker Board SPL file must fit into 32 KiB
>>
>>  Kconfig |  8 
>>  Makefile| 33 +++--
>>  arch/arm/mach-imx/Makefile  | 16 
>>  configs/tinker-rk3288_defconfig |  1 +
>>  4 files changed, 32 insertions(+), 26 deletions(-)
>>
>> --
>> 2.20.1
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v4 0/4] configs: rk3288: Tinker Board SPL file must fit into 32 KiB

2019-04-02 Thread Kever Yang
Hi Heinrich,


On 04/03/2019 01:19 AM, Heinrich Schuchardt wrote:
> The SPL image for the Tinker Board has to fit into 32 KiB. This includes
> up to 2 KiB for the file header.

32KB is the limit of SPL size, not SPL image size, does not include 2KB
header.
>
> A new configuration variable CONFIG_SPL_SIZE_LIMIT is introduced to define
> the board specific limit.

There is already CONFIG_SPL_MAX_SIZE for the SPL size limit, isn't it?
I don't understand  why we need new variable.

Thanks,
- Kever
> A common Makefile function is used for this test and the test against
> CONFIG_BOARD_SIZE_LIMIT.
>
> Move the board size check from arch/arm/mach-imx/Makefile to Makefile.
>
> v4:
>   use a common function for all size checks in the Makefiles
>
> Heinrich Schuchardt (4):
>   Makefile: reusable function for BOARD_SIZE_CHECK
>   imx: move BOARD_SIZE_CHECK to main Makefile
>   configs: define CONFIG_SPL_SIZE_LIMIT
>   configs: rk3288: Tinker Board SPL file must fit into 32 KiB
>
>  Kconfig |  8 
>  Makefile| 33 +++--
>  arch/arm/mach-imx/Makefile  | 16 
>  configs/tinker-rk3288_defconfig |  1 +
>  4 files changed, 32 insertions(+), 26 deletions(-)
>
> --
> 2.20.1
>



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


Re: [U-Boot] [PATCH v4 0/4] configs: rk3288: Tinker Board SPL file must fit into 32 KiB

2019-04-02 Thread Heinrich Schuchardt
On 4/2/19 7:47 PM, Tom Rini wrote:
> On Tue, Apr 02, 2019 at 07:33:42PM +0200, Heinrich Schuchardt wrote:
>> On 4/2/19 7:29 PM, Tom Rini wrote:
>>> On Tue, Apr 02, 2019 at 07:19:03PM +0200, Heinrich Schuchardt wrote:
>>>
 The SPL image for the Tinker Board has to fit into 32 KiB. This includes
 up to 2 KiB for the file header.

 A new configuration variable CONFIG_SPL_SIZE_LIMIT is introduced to define
 the board specific limit.

 A common Makefile function is used for this test and the test against
 CONFIG_BOARD_SIZE_LIMIT.

 Move the board size check from arch/arm/mach-imx/Makefile to Makefile.
>>>
>>> I'm sorry you weren't Cc'd on Simon's thread where we're trying to
>>> improve the size check stuff to be generic enough to use everywhere.  We
>>> can't generically use a shell script as we need to know some processed
>>> values too.  I don't know if Simon got to the point of writing a C based
>>> helper to use or not.
>>>
>>
>> Hello Tom,
>>
>> could you, please, provide a link to the thread.
> 
> https://patchwork.ozlabs.org/patch/1050465/ (and no, I didn't apply it,
> I forgot to delete my email before I sent out that batch of applieds).
> 
>> Is the test prior to my patch incorrect? Or do you want to imply that
>> after my patch we get different results?
> 
> The problem is that I don't want to make wider use of the shell checking
> notion.  It's not as complete as we'd like and can't be used on as many
> platforms as need it either, due to needing cpp to actually determine
> values in some cases.
> 

Yes, the patch by Simon G. is similiar to my patch series. What his
patch does not address is the duplicate coding for checking *.imx files.
My idea has been to put all tests into the main Makefile to avoid
problems with variable substitutions.

It is unclear to me what you mean by: "It's not as complete as we'd
like" and where you see a need for "cpp to actually determine values".

I would not be able to provide a better patch without understanding your
view on the requirements.

Best regards

Heinrich



signature.asc
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v4 0/4] configs: rk3288: Tinker Board SPL file must fit into 32 KiB

2019-04-02 Thread Simon Goldschmidt



On 02.04.19 19:33, Heinrich Schuchardt wrote:

On 4/2/19 7:29 PM, Tom Rini wrote:

On Tue, Apr 02, 2019 at 07:19:03PM +0200, Heinrich Schuchardt wrote:


The SPL image for the Tinker Board has to fit into 32 KiB. This includes
up to 2 KiB for the file header.

A new configuration variable CONFIG_SPL_SIZE_LIMIT is introduced to define
the board specific limit.

A common Makefile function is used for this test and the test against
CONFIG_BOARD_SIZE_LIMIT.

Move the board size check from arch/arm/mach-imx/Makefile to Makefile.


I'm sorry you weren't Cc'd on Simon's thread where we're trying to
improve the size check stuff to be generic enough to use everywhere.  We
can't generically use a shell script as we need to know some processed
values too.  I don't know if Simon got to the point of writing a C based
helper to use or not.


Right, I should have included you, Heinrich, sorry.

No, unfortunately, I haven't found the time to work on the C based 
approach, yet.


To sum it up, Heinrich, the issue was that for socfpga gen5, we're 
approaching the 64KiB total limit for SPL. That includes all regions we 
can check via CONFIG_SPL_MAX_FOOTPRINT (e.g. text, data, bss) plus 
devicetree, early malloc, global data and initial stack.


My approach would have been much like your check (which by the way is 
better than mine in that the check stays in main Makefile), but the size 
limit needs to include those items I've mentioned above. So while I 
could add a Kconfig based total size, I would need to subtract gd, 
malloc area and reserved stack size to get the SPL_SIZE_LIMIT value.


The problem I see here is that this is a different size limit to the one 
you want to check. I need "SRAM_SIZE - x - y - z" while you need 
"LOAD_LIMIT", which is constant.


Maybe we could start with your limit and then add bool config options 
like "SPL_SIZE_LIMIT_SUBTRACT_GD", "SPL_SIZE_LIMIT_SUBTRACT_MALLOC_F" 
and "SPL_SIZE_LIMIT_SUBTRACT_STACK_SIZE" that could then be used by a C 
program to help the size check.


Regards,
Simon





Hello Tom,

could you, please, provide a link to the thread.

Is the test prior to my patch incorrect? Or do you want to imply that
after my patch we get different results?

Best regards

Heinrich


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


Re: [U-Boot] [PATCH v4 0/4] configs: rk3288: Tinker Board SPL file must fit into 32 KiB

2019-04-02 Thread Tom Rini
On Tue, Apr 02, 2019 at 07:33:42PM +0200, Heinrich Schuchardt wrote:
> On 4/2/19 7:29 PM, Tom Rini wrote:
> > On Tue, Apr 02, 2019 at 07:19:03PM +0200, Heinrich Schuchardt wrote:
> > 
> >> The SPL image for the Tinker Board has to fit into 32 KiB. This includes
> >> up to 2 KiB for the file header.
> >>
> >> A new configuration variable CONFIG_SPL_SIZE_LIMIT is introduced to define
> >> the board specific limit.
> >>
> >> A common Makefile function is used for this test and the test against
> >> CONFIG_BOARD_SIZE_LIMIT.
> >>
> >> Move the board size check from arch/arm/mach-imx/Makefile to Makefile.
> > 
> > I'm sorry you weren't Cc'd on Simon's thread where we're trying to
> > improve the size check stuff to be generic enough to use everywhere.  We
> > can't generically use a shell script as we need to know some processed
> > values too.  I don't know if Simon got to the point of writing a C based
> > helper to use or not.
> > 
> 
> Hello Tom,
> 
> could you, please, provide a link to the thread.

https://patchwork.ozlabs.org/patch/1050465/ (and no, I didn't apply it,
I forgot to delete my email before I sent out that batch of applieds).

> Is the test prior to my patch incorrect? Or do you want to imply that
> after my patch we get different results?

The problem is that I don't want to make wider use of the shell checking
notion.  It's not as complete as we'd like and can't be used on as many
platforms as need it either, due to needing cpp to actually determine
values in some cases.

-- 
Tom


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


Re: [U-Boot] [PATCH v4 0/4] configs: rk3288: Tinker Board SPL file must fit into 32 KiB

2019-04-02 Thread Heinrich Schuchardt
On 4/2/19 7:29 PM, Tom Rini wrote:
> On Tue, Apr 02, 2019 at 07:19:03PM +0200, Heinrich Schuchardt wrote:
> 
>> The SPL image for the Tinker Board has to fit into 32 KiB. This includes
>> up to 2 KiB for the file header.
>>
>> A new configuration variable CONFIG_SPL_SIZE_LIMIT is introduced to define
>> the board specific limit.
>>
>> A common Makefile function is used for this test and the test against
>> CONFIG_BOARD_SIZE_LIMIT.
>>
>> Move the board size check from arch/arm/mach-imx/Makefile to Makefile.
> 
> I'm sorry you weren't Cc'd on Simon's thread where we're trying to
> improve the size check stuff to be generic enough to use everywhere.  We
> can't generically use a shell script as we need to know some processed
> values too.  I don't know if Simon got to the point of writing a C based
> helper to use or not.
> 

Hello Tom,

could you, please, provide a link to the thread.

Is the test prior to my patch incorrect? Or do you want to imply that
after my patch we get different results?

Best regards

Heinrich



signature.asc
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v4 0/4] configs: rk3288: Tinker Board SPL file must fit into 32 KiB

2019-04-02 Thread Tom Rini
On Tue, Apr 02, 2019 at 07:19:03PM +0200, Heinrich Schuchardt wrote:

> The SPL image for the Tinker Board has to fit into 32 KiB. This includes
> up to 2 KiB for the file header.
> 
> A new configuration variable CONFIG_SPL_SIZE_LIMIT is introduced to define
> the board specific limit.
> 
> A common Makefile function is used for this test and the test against
> CONFIG_BOARD_SIZE_LIMIT.
> 
> Move the board size check from arch/arm/mach-imx/Makefile to Makefile.

I'm sorry you weren't Cc'd on Simon's thread where we're trying to
improve the size check stuff to be generic enough to use everywhere.  We
can't generically use a shell script as we need to know some processed
values too.  I don't know if Simon got to the point of writing a C based
helper to use or not.

-- 
Tom


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


[U-Boot] [PATCH v4 0/4] configs: rk3288: Tinker Board SPL file must fit into 32 KiB

2019-04-02 Thread Heinrich Schuchardt
The SPL image for the Tinker Board has to fit into 32 KiB. This includes
up to 2 KiB for the file header.

A new configuration variable CONFIG_SPL_SIZE_LIMIT is introduced to define
the board specific limit.

A common Makefile function is used for this test and the test against
CONFIG_BOARD_SIZE_LIMIT.

Move the board size check from arch/arm/mach-imx/Makefile to Makefile.

v4:
use a common function for all size checks in the Makefiles

Heinrich Schuchardt (4):
  Makefile: reusable function for BOARD_SIZE_CHECK
  imx: move BOARD_SIZE_CHECK to main Makefile
  configs: define CONFIG_SPL_SIZE_LIMIT
  configs: rk3288: Tinker Board SPL file must fit into 32 KiB

 Kconfig |  8 
 Makefile| 33 +++--
 arch/arm/mach-imx/Makefile  | 16 
 configs/tinker-rk3288_defconfig |  1 +
 4 files changed, 32 insertions(+), 26 deletions(-)

--
2.20.1

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