Skip to content

RFC U-Boot LTO (Sandbox + ARM Nokia RX-51)

Tom Rini u-boot 1 version New

Get series with b4
b4 am 20210304161701.GX1310@bill-the-cat

Versions newest first

  1. v1 RFC Latest1 of 12 patches 0 repliesNew

1 of 12 patches is in this archive. The cover letter announces 12.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12build: use thin archives instead of incremental linking+0 -01 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH u-boot 00/12] U-Boot LTO (Sandbox + ARM Nokia RX-51)
Quoted 61 lines · Marek Behun
Quoted 51 lines · On Thu, 4 Mar 2021 09:07:33 -0600 Adam Ford <[email protected]> wrote:
Quoted 20 lines · Tom Rini
Quoted 18 lines · Adam Ford
Quoted 16 lines · Marek Behun
Quoted 5 lines · On Wed, 3 Mar 2021 16:36:05 -0500 Tom Rini <[email protected]> wrote:

So, as I start testing things locally with two additional changes (1. LTO by default 2. No ffunction/data-sections with LTO) we see:
https://gist.github.com/trini/350ab850c42293563228b8d68a1bb89a
as the detailed size reduction. This also shows that with LTO we want to turn off -ffunction-sections/etc as it's not useful now.

Tom, I have pushed another version to github PR to trigger CI, and am still working on clang. You can look at the github PR if you want to try yourself. I have also added patch that disables -ffunction-section/fdata-section on arm.

After I manage to make it all work in CI I will send v2 to mailing list.

Quoted 8 lines
Quoted 6 lines

I tested this with the imx6q_logic board. I only tested the U-Boot portion, but it appeared to work and it booted the kernel. The U-Boot size reduced -7182 bytes (about 3% smaller).

I haven't been able to successfully boot the OMAP3 boards I have yet. I'm still looking into this.

It boots (and pytest runs) on my Beagleboard xM, fwiw.

Interesting. with LTO enabled, the DRAM reports 7.2 GB and hangs. Without LTO, U-Boot boots fine.

LTO:
OMAP3630/3730-GP ES1.2, CPU-OPP2, L3-200MHz, Max CPU Clock 1 GHz
Model: LogicPD Zoom DM3730 Torpedo + Wireless Development Kit Logic DM37x/OMAP35x reference board + LPDDR/NAND
DRAM: 7.2 GiB
<hang>

Without LTO:
OMAP3630/3730-GP ES1.2, CPU-OPP2, L3-200MHz, Max CPU Clock 1 GHz
Model: LogicPD Zoom DM3730 Torpedo + Wireless Development Kit Logic DM37x/OMAP35x reference board + LPDDR/NAND

DRAM:  256 MiB
NAND:  512 MiB
MMC:   OMAP SD/MMC: 0
Loading Environment from NAND... OK
OMAP die ID: 619e00029ff800000168300f1502501f
Net:   smc911x-0
Hit any key to stop autoboot:  0
Quoted 6 lines

OMAP Logic #

adam

Quoted 3 lines

--
Tom

Quoted 8 lines

Tom, I think this means it would take some time to make it stable enough to enable it by default on all ARM boards.

But I would really like to make it work ASAP at least for Nokia N900, because otherwise my mtd patches make the binary ~200 bytes too big for Nokia N900 and CI fails.

Or would you be willing to accept mtd patches even with CI failing?

You've posted this for about a day now, so I hope we can sort things out in time to merge for v2021.07 :) CI does need to pass, but we also need these savings for a variety of reasons, so lets see what needs to get tweaked to make it work.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210304/81e84bc0/attachment.sig>