U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Maxim Uvarov <maxim.uvarov@linaro.org>
Cc: Peter Robinson <pbrobinson@gmail.com>,
	u-boot@lists.denx.de, ilias.apalodimas@linaro.org,
	goldsimon@gmx.de
Subject: Re: [PATHv11 33/43] configs/am335x_evm_defconfig: inc SPL size
Date: Tue, 28 Nov 2023 10:07:55 -0500	[thread overview]
Message-ID: <20231128150755.GY2513409@bill-the-cat> (raw)
In-Reply-To: <CAD8XO3YyzGz3MFPoBu1SZyC1rA7u2y_vB8Y9XCry5bTvwdjoiw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4259 bytes --]

On Tue, Nov 28, 2023 at 03:35:00PM +0600, Maxim Uvarov wrote:
> On Mon, 27 Nov 2023 at 22:31, Tom Rini <trini@konsulko.com> wrote:
> 
> > On Mon, Nov 27, 2023 at 03:52:50PM +0000, Peter Robinson wrote:
> > > On Mon, Nov 27, 2023 at 3:32 PM Maxim Uvarov <maxim.uvarov@linaro.org>
> > wrote:
> > > >
> > > >
> > > >
> > > > On Mon, 27 Nov 2023 at 20:08, Tom Rini <trini@konsulko.com> wrote:
> > > >>
> > > >> On Mon, Nov 27, 2023 at 08:06:23PM +0600, Maxim Uvarov wrote:
> > > >> > On Mon, 27 Nov 2023 at 19:08, Tom Rini <trini@konsulko.com> wrote:
> > > >> >
> > > >> > > On Mon, Nov 27, 2023 at 06:57:16PM +0600, Maxim Uvarov wrote:
> > > >> > >
> > > >> > > > Increase allowed binary size to fit lwip code.
> > > >> > > >
> > > >> > > > Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
> > > >> > > > ---
> > > >> > > >  configs/am335x_evm_defconfig | 1 +
> > > >> > > >  1 file changed, 1 insertion(+)
> > > >> > > >
> > > >> > > > diff --git a/configs/am335x_evm_defconfig
> > b/configs/am335x_evm_defconfig
> > > >> > > > index f048e60f7f..9fd608bd76 100644
> > > >> > > > --- a/configs/am335x_evm_defconfig
> > > >> > > > +++ b/configs/am335x_evm_defconfig
> > > >> > > > @@ -124,3 +124,4 @@ CONFIG_WDT=y
> > > >> > > >  CONFIG_DYNAMIC_CRC_TABLE=y
> > > >> > > >  CONFIG_RSA=y
> > > >> > > >  CONFIG_LZO=y
> > > >> > > > +CONFIG_SPL_MAX_SIZE=0x29000
> > > >> > >
> > > >> > > As probably a problem for other platforms you made this change on
> > too,
> > > >> > > you can't do this. The link limit is here because that's the
> > limit the
> > > >> > > hardware (and ROM) imposes.
> > > >> > >
> > > >> > > You might need to either:
> > > >> > > - Figure out how to make lwip even tinier for the SPL case
> > > >> > > - Limit the old network stack to just for SPL, and a later task
> > is to
> > > >> > >   reduce what's in the old stack to just what's also needed
> > within SPL.
> > > >> > >
> > > >> > >
> > > >> > Thanks Tom. All these size changes need to be reviewed.  Some of
> > them are
> > > >> > ok, I think like for x86 or qemu virt, but some of them might not
> > work.
> > > >> >
> > > >> > Question - Do we need networking inside SPL rather than in the main
> > binary?
> > > >> > Is it a real use case?
> > > >>
> > > >> Yes, the device supports loading SPL, and then SPL loading U-Boot both
> > > >> over USB RNDIS as well as regular physical ethernet.
> > > >>
> > > >> --
> > > >> Tom
> > > >
> > > >
> > > > That looks like not a production use case. USB + NET + drivers + EXT4
> > + NAND + MTD and everything else and trying to fit into SPL.
> > > > With enabling LTO I still need 4k (without dropping current code).
> > From one point it's too synthetic use case here and might be a historical
> > > > limitation which we will not see on future boards. From the other
> > point it will be good to not break it somehow....
> > >
> > > Does this still include the old network code?
> > >
> > > Also I wonder if we can have a paired down SPL_LWIP option that
> > > removes things like PXE and HTTP/wget because none of those would be
> > > used in the SPL use case as they're all brand new.
> >
> > To be clear, I am fine with either "old network stack only for SPL" or
> > "figure out how to pair down lwip to just SPL features". In fact having
> > said that, the first thing I would suggest is to turn off LTO as it
> > makes reading the linker map file harder, increase the size limit for
> > this platform, and take a look at what's being linked in and not
> > discarded in SPL, for networking, in spl/u-boot-spl.map. Maybe the
> > answer is that we just need to be more careful about using
> > IS_ENABLED/CONFIG_IS_ENABLED (and obj-$(CONFIG_$(SPL_)FOO)) in the lwip
> > series.
> >
> > --
> > Tom
> >
> 
> Yea. If I disable TCP then we get the right size for this board. So for SPL
> I think to build without TCP so that ping, dhcp and tftp will still work.
> For normal binary TCP will be enabled. For other boards with limits I think
> also to disable TCP for now.

Yes, that sounds right and also like you need to integrate lwIP more
with our Kconfig symbols, PROT_TCP is already there and needs to be
obeyed.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2023-11-28 15:08 UTC|newest]

Thread overview: 117+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-27 12:56 [PATHv11 00/43] net/lwip: add lwip library for the network stack Maxim Uvarov
2023-11-27 12:56 ` [PATHv11 01/43] submodule: add lwIP as git submodule Maxim Uvarov
2023-11-27 18:16   ` Tom Rini
2023-11-30  2:45     ` Simon Glass
2023-11-30 11:43       ` Michal Suchánek
2023-11-27 12:56 ` [PATHv11 02/43] net/lwip: add doc/develop/net_lwip.rst Maxim Uvarov
2023-11-27 12:56 ` [PATHv11 03/43] net/lwip: integrate lwIP library Maxim Uvarov
2023-11-27 12:56 ` [PATHv11 04/43] net/lwip: implement dns cmd Maxim Uvarov
2023-11-27 18:27   ` Tom Rini
2023-11-27 12:56 ` [PATHv11 05/43] net/lwip: implement dhcp cmd Maxim Uvarov
2023-11-27 12:56 ` [PATHv11 06/43] net/lwip: implement tftp cmd Maxim Uvarov
2023-11-28 16:34   ` neil.armstrong
2023-11-28 19:09     ` Maxim Uvarov
2023-11-29  9:24   ` neil.armstrong
2023-11-27 12:56 ` [PATHv11 07/43] net/lwip: implement wget cmd Maxim Uvarov
2023-11-28 11:32   ` Fabio Estevam
2023-11-28 19:07     ` Maxim Uvarov
2023-11-28 19:12       ` Fabio Estevam
2023-11-28 20:41         ` Tim Harvey
2023-11-28 20:43           ` Tom Rini
2023-11-29  7:18             ` Maxim Uvarov
2023-11-27 12:56 ` [PATHv11 08/43] net/lwip: implement ping cmd Maxim Uvarov
2023-11-27 12:56 ` [PATHv11 09/43] net/lwip: add lwIP configuration Maxim Uvarov
2023-11-27 12:56 ` [PATHv11 10/43] net/lwip: implement lwIP port to U-Boot Maxim Uvarov
2023-11-27 18:31   ` Tom Rini
2023-11-27 12:56 ` [PATHv11 11/43] net/lwip: update .gitignore with lwIP Maxim Uvarov
2023-11-27 12:56 ` [PATHv11 12/43] net/lwip: connection between cmd and lwip apps Maxim Uvarov
2023-11-27 12:56 ` [PATHv11 13/43] net/lwip: replace original net commands with lwip Maxim Uvarov
2023-11-27 12:56 ` [PATHv11 14/43] net/lwip: split net.h to net.h, arp.h and eth.h Maxim Uvarov
2023-11-27 12:56 ` [PATHv11 15/43] test_efi_loader.py: use $filesize var Maxim Uvarov
2023-11-27 18:18   ` Tom Rini
2023-11-28 11:05     ` neil.armstrong
2023-11-27 12:56 ` [PATHv11 16/43] test_net: print out net list Maxim Uvarov
2023-11-27 12:57 ` [PATHv11 17/43] net: sandbox: fix NULL pointer derefences Maxim Uvarov
2023-11-27 18:19   ` Tom Rini
2023-12-02 18:33     ` Simon Glass
2023-12-02 19:04       ` Tom Rini
2023-11-27 12:57 ` [PATHv11 18/43] net/smc911x: fix return from smc911x_send Maxim Uvarov
2023-11-27 18:20   ` Tom Rini
2023-11-27 12:57 ` [PATHv11 19/43] sandbox: eth-raw-os: successful return code is 0 Maxim Uvarov
2023-11-30  2:45   ` Simon Glass
2023-11-27 12:57 ` [PATHv11 20/43] driver/net/rtl8139: remove debug print Maxim Uvarov
2023-11-27 18:33   ` Tom Rini
2023-11-27 12:57 ` [PATHv11 21/43] mach-socfpga: do not overlap defines with lwip Maxim Uvarov
2023-11-27 18:35   ` Tom Rini
2023-11-27 12:57 ` [PATHv11 22/43] bcm_ns3: fix overlap define " Maxim Uvarov
2023-11-27 18:36   ` Tom Rini
2023-11-27 12:57 ` [PATHv11 23/43] rcar3_salvator-x_defconfig: increase binary size limit Maxim Uvarov
2023-11-27 12:57 ` [PATHv11 24/43] lwip: omap3: rename mem_init Maxim Uvarov
2023-11-27 13:12   ` Tom Rini
2023-11-27 12:57 ` [PATHv11 25/43] configs/turris_omnia_defconfig set limit to 0xf6000 Maxim Uvarov
2023-11-27 12:57 ` [PATHv11 26/43] configs/tbs2910_defconfig inc limit Maxim Uvarov
2023-11-27 13:11   ` Tom Rini
2023-11-27 21:20     ` Soeren Moch
2023-11-28  7:09       ` Maxim Uvarov
2023-12-05 13:15         ` Maxim Uvarov
2023-12-05 15:49           ` Soeren Moch
2023-12-05 16:25             ` Maxim Uvarov
2023-12-05 18:25               ` Soeren Moch
2023-12-05 20:00                 ` Maxim Uvarov
2023-12-06  7:06                   ` Soeren Moch
2023-12-06 10:40                     ` Maxim Uvarov
2023-12-07 11:10                       ` Sören Moch
2023-12-09 20:32                 ` Tom Rini
2023-12-09 20:21             ` Tom Rini
2023-11-27 12:57 ` [PATHv11 27/43] configs/socfpga_secu1_defconfig: enable LTO Maxim Uvarov
2023-11-27 12:57 ` [PATHv11 28/43] configs/turris_omnia_defconfig: " Maxim Uvarov
2023-11-27 15:59   ` marek.behun
2023-12-19  9:38   ` Marek Behún
2023-12-19 14:37     ` Marek Behún
2023-11-27 12:57 ` [PATHv11 29/43] configs/am335x_boneblack_vboot_defconfig: enable LTO and increase SPL size Maxim Uvarov
2023-11-27 12:57 ` [PATHv11 30/43] configs/sheevaplug_defconfig: enable LTO and inc size Maxim Uvarov
2023-11-27 12:57 ` [PATHv11 31/43] configs/lschlv2_defconfig: " Maxim Uvarov
2023-11-27 12:57 ` [PATHv11 32/43] configs/lsxhl_defconfig: LTO + size Maxim Uvarov
2023-11-27 12:57 ` [PATHv11 33/43] configs/am335x_evm_defconfig: inc SPL size Maxim Uvarov
2023-11-27 13:08   ` Tom Rini
2023-11-27 14:06     ` Maxim Uvarov
2023-11-27 14:08       ` Tom Rini
2023-11-27 15:31         ` Maxim Uvarov
2023-11-27 15:33           ` Tom Rini
2023-11-27 15:52           ` Peter Robinson
2023-11-27 16:31             ` Tom Rini
2023-11-28  9:35               ` Maxim Uvarov
2023-11-28 15:07                 ` Tom Rini [this message]
2023-11-27 14:06     ` Peter Robinson
2023-11-27 12:57 ` [PATHv11 34/43] configs/bk4r1_defconfig: inc size Maxim Uvarov
2023-11-27 12:57 ` [PATHv11 35/43] configs/linkit-smart-7688_defconfig: increse size Maxim Uvarov
2023-11-27 12:57 ` [PATHv11 36/43] configs/gardena-smart-gateway-mt7688_defconfig: increase size Maxim Uvarov
2023-11-27 12:57 ` [PATHv11 37/43] configs/rcar3_ulcb_defconfig: " Maxim Uvarov
2023-11-27 12:57 ` [PATHv11 38/43] configs/qemu-x86_64_defconfig: increase ROM size Maxim Uvarov
2023-11-27 12:57 ` [PATHv11 39/43] Makefile: add dtbs to clean Maxim Uvarov
2023-11-27 18:17   ` Tom Rini
2023-11-27 12:57 ` [PATHv11 40/43] .azure-pipelines: init submodules Maxim Uvarov
2023-11-27 12:57 ` [PATHv11 41/43] mach-mtmips: inc SPL size limit Maxim Uvarov
2023-11-27 12:57 ` [PATHv11 42/43] configs/linkit-smart-7688_defconfig: increase board limit Maxim Uvarov
2023-11-27 12:57 ` [PATHv11 43/43] .gitlab-ci.yml: change ownership of the git files Maxim Uvarov
2023-11-27 18:37 ` [PATHv11 00/43] net/lwip: add lwip library for the network stack Tom Rini
2023-11-27 18:59 ` Tom Rini
2023-11-28 10:37 ` neil.armstrong
2023-11-28 19:13   ` Maxim Uvarov
2023-11-28 23:05 ` Tim Harvey
2023-11-28 23:21   ` Fabio Estevam
2023-11-29  0:10     ` Tim Harvey
2023-11-29  0:16       ` Fabio Estevam
2023-11-30  8:39         ` Maxim Uvarov
2023-11-30 13:00           ` Fabio Estevam
2023-11-30 13:14             ` Maxim Uvarov
2023-11-30 13:18               ` Fabio Estevam
2023-11-30 11:09 ` Peter Robinson
2023-11-30 13:05   ` Maxim Uvarov
2023-12-19 10:12 ` Alexander Dahl
2024-01-02 17:30   ` Maxim Uvarov
2024-01-03 14:30     ` Fabio Estevam
2024-01-04 15:02       ` Maxim Uvarov
2024-01-04 20:45         ` Fabio Estevam
2024-01-08  8:41           ` Maxim Uvarov
2024-01-08 11:39             ` Fabio Estevam

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=20231128150755.GY2513409@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=goldsimon@gmx.de \
    --cc=ilias.apalodimas@linaro.org \
    --cc=maxim.uvarov@linaro.org \
    --cc=pbrobinson@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