public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 0/4] configs: rk3288: Tinker Board SPL file must fit into 32 KiB
Date: Tue, 2 Apr 2019 20:08:54 +0200	[thread overview]
Message-ID: <ca03c731-c70a-c563-e6de-46a092f1d430@gmail.com> (raw)
In-Reply-To: <34f2f8ec-04a3-9309-5478-f691ab2f5a6f@gmx.de>



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
> 

  parent reply	other threads:[~2019-04-02 18:08 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-02 17:19 [U-Boot] [PATCH v4 0/4] configs: rk3288: Tinker Board SPL file must fit into 32 KiB Heinrich Schuchardt
2019-04-02 17:19 ` [U-Boot] [PATCH v4 1/4] Makefile: reusable function for BOARD_SIZE_CHECK Heinrich Schuchardt
2019-06-07 22:04   ` Tom Rini
2019-04-02 17:19 ` [U-Boot] [PATCH v4 2/4] imx: move BOARD_SIZE_CHECK to main Makefile Heinrich Schuchardt
2019-04-04 20:53   ` Heinrich Schuchardt
2019-04-05 13:05   ` Fabio Estevam
2019-04-07 21:10     ` Heinrich Schuchardt
2019-06-07 22:04   ` Tom Rini
2019-04-02 17:19 ` [U-Boot] [PATCH v4 3/4] configs: define CONFIG_SPL_SIZE_LIMIT Heinrich Schuchardt
2019-06-07 22:05   ` Tom Rini
2019-06-07 22:13     ` Fabio Estevam
2019-06-08  0:38       ` Tom Rini
2019-04-02 17:19 ` [U-Boot] [PATCH v4 4/4] configs: rk3288: Tinker Board SPL file must fit into 32 KiB Heinrich Schuchardt
2019-06-07 22:05   ` Tom Rini
2019-04-02 17:29 ` [U-Boot] [PATCH v4 0/4] " Tom Rini
2019-04-02 17:33   ` Heinrich Schuchardt
2019-04-02 17:47     ` Tom Rini
2019-04-02 18:17       ` Heinrich Schuchardt
2019-04-02 18:08     ` Simon Goldschmidt [this message]
2019-04-03  0:59 ` Kever Yang
2019-04-03  6:19   ` Heinrich Schuchardt
2019-04-03 20:50     ` Benoît Thébaudeau
2019-04-18 20:12 ` Simon Goldschmidt
2019-04-22 14:36   ` Tom Rini
2019-04-22 18:40     ` Simon Goldschmidt
2019-04-22 19:29       ` Tom Rini
2019-04-22 19:50         ` Simon Goldschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ca03c731-c70a-c563-e6de-46a092f1d430@gmail.com \
    --to=simon.k.r.goldschmidt@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox