All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: "Marek Behún" <marek.behun@nic.cz>,
	u-boot@lists.denx.de, "Chris Packham" <judge.packham@gmail.com>,
	"Baruch Siach" <baruch@tkos.co.il>,
	"Dirk Eibach" <dirk.eibach@gdsys.cc>,
	"Chris Packham" <chris.packham@alliedtelesis.co.nz>
Cc: Dennis Gilmore <dgilmore@redhat.com>,
	Mario Six <mario.six@gdsys.cc>, Jon Nettleton <jon@solid-run.com>
Subject: Re: [PATCH u-boot-mvebu v2 00/41] kwboot / kwbimage improvements reducing image size
Date: Thu, 22 Jul 2021 09:35:30 +0200	[thread overview]
Message-ID: <72fc23c5-039e-c58b-f4c1-d0dfebe11abd@denx.de> (raw)
In-Reply-To: <20210719122104.29698-1-marek.behun@nic.cz>

Hi Marek & Pali,

while building this series via Azure CI I noticed this problem for
controlcenterdc_defconfig:

arm-linux-gnueabi-ld.bfd: common/spl/spl.o: in function `board_init_r':
common/spl/spl.c:702: undefined reference to `spl_board_init'

Could you please fix this? And make sure that all boards (not only
Marvell) compile clean?

And I also had merge issues (patches did not apply) with these patches,
which I needed to fix manually:

[PATCH u-boot-mvebu v2 19/41] tools: kwbimage: Do not hide usage of 
secure header under CONFIG_ARMADA_38X
[PATCH u-boot-mvebu v2 37/41] tools: kwbimage: Remove v1 kwbimage SPL 
padding to CONFIG_SYS_U_BOOT_OFFS bytes

Please fix this as well while working on v3.

Thanks,
Stefan

On 19.07.21 14:20, Marek Behún wrote:
> Hi Stefan and others,
> 
> this is v2 of the series of improvements to kwboot, kwbimage and mvebu,
> with main motivation the reduction of KWB image size.
> 
> Changes since v1:
> - change of cover letter message + information about boot times added
> - some additional small fix patches are added
> - we do not remove the SPL code for loading U-Boot, but add the option to
>    make BootROM do it. By default SPL code is used to load main U-Boot
>    binary, since it seems to be faster than BootROM (at least on Turris
>    Omnia). If users want to use BootROM for this, they need to disable
>    the necessary media (SPI NOR / NAND / SATA) support in SPL
> 
> This series makes correct usage of BootROM's code for loading U-Boot
> from NOR / NAND: currently, only SPL is read by BootROM and the main
> U-Boot is read by SPL.
> 
> We can use BootROM to also load main U-Boot. This reduces the size of
> the u-boot-spl.bin by about ~7 KiB, since it does not need to contain
> code for reading NOR / NAND. This patch series makes it possible to
> use BootROM for this, but since SPL code may read the main U-Boot
> binary faster, we leave it to board maintainers to decide whether they
> want to use BootROM or SPL code to load the main U-Boot binary. (The
> rule of thumb, I guess, is to use SPL if you have enough space, and
> BootROM if you need the additional 7 KiB.)
> 
> This patch series also reduces the size of the u-boot-spl.kwb binary
> by addutuibak ~29 KiB (depending on board, this is on Turris Omnia),
> by getting rid of the offseting of main U-Boot binary to a specific
> point on the boot device, and instead using information from the
> kwbimage header to find main U-Boot binary.
> 
> On Turris Omnia, the size differences and boot time differences are:
>                    before     after      after with booting via BootROM
>    u-boot-spl.kwb  901632 B   872960 B   864768 B
>    u-boot-spl.bin  115526 B   115898 B   107994 B
>    boot time         2426 ms    2411 ms    3283 ms
> 
> As can be seen, after this patch series, when still loading main U-Boot
> binary via SPL code, the boot time is on Turris Omnia reduced from
> 2426 ms to 2411 ms. When booting via BootROM is preferred, the boot time
> increases to 3283 ms, but we save additional 7 KiB in the u-boot-spl.kwb
> binary.
> 
> Before merging, this series should be tested on as many relevant
> boards as possible. The affected boards are:
> - clearfog
> - controlcenterdc
> - db-88f6720
> - db-88f6820-amc
> - db-88f6820-gp
> - db-mv784mp-gp
> - ds414
> - helios4
> - theadorable_debug
> - turris_omnia
> - x530
> 
> Marek Behún (2):
>    tools: kwbimage: Add constant for SDIO bootfrom
>    tools: kwbimage: Cosmetic fix - remove redundant space character
> 
> Pali Rohár (39):
>    tools: kwbimage: Fix compilation without CONFIG_SYS_U_BOOT_OFFS
>    tools: kwbimage: Simplify aligning and calculating checksum
>    tools: kwbimage: Align SPI and NAND images to 256 bytes
>    tools: kwbimage: Fix generation of SATA, SDIO and PCIe images
>    tools: kwbimage: Don't crash when binary file name does not contain
>      '/'
>    tools: kwbimage: Fix check for v0 extended header checksum
>    tools: kwbimage: Validate extended headers of v1 images
>    tools: kwbimage: Validate data checksum of v1 images
>    tools: kwbimage: Print size of binary header in
>      kwbimage_print_header()
>    tools: kwbimage: Use -a parameter (load address) for v1 images
>    tools: kwbimage: Change maximum number of arguments in binary header
>      to 256
>    tools: kwbimage: Fix calculating size of binary header
>    tools: kwbimage: Add support for more BINARY headers
>    tools: kwbimage: Don't parse PAYLOAD keyword
>    tools: kwbimage: Add support for DATA command also for v1 images
>    tools: kwbimage: Add support for a new DATA_DELAY command
>    tools: kwbimage: Do not hide usage of secure header under
>      CONFIG_ARMADA_38X
>    tools: kwbimage: Mark all BootROM structures __packed
>    tools: dumpimage: Fix crashing when trying to extract data from
>      kwbimage
>    tools: dumpimage: Show error message when trying to extract data from
>      kwbimage
>    tools: kwboot: Fix wrong parameter passed to read()
>    tools: kwboot: Fix restoring terminal
>    tools: kwboot: Print trailing newline after terminal is terminated
>    tools: kwboot: Cosmetic fix - add missing curly brackets
>    tools: kwboot: Check for v1 header size
>    tools: kwboot: Fix checking image header version
>    arm: mvebu: Fix return_to_bootrom()
>    arm: mvebu: Mark return_to_bootrom() as a noreturn function
>    arm: mvebu: Implement return_to_bootrom() via U-Boot's SPL framework
>    arm: mvebu: Use U-Boot's SPL BootROM framework for booting from
>      NAND/UART
>    SPL: Add support for specifying offset between header and image
>    SPL: Add support for parsing board / BootROM specific image types
>    arm: mvebu: Load main U-Boot binary in SPL code based on kwbimage
>      header
>    arm: mvebu: Remove legacy U-Boot header from kwbimage v1 files
>    tools: kwbimage: Remove v1 kwbimage SPL padding to
>      CONFIG_SYS_U_BOOT_OFFS bytes
>    arm: mvebu: Remove unused macro CONFIG_SYS_U_BOOT_OFFS
>    arm: mvebu: gdsys: Remove custom spl_board_init()
>    kwbimage: Add support for extracting images via dumpimage tool
>    kwbimage: Update help message about how to extract from an existing
>      image
> 
>   Makefile                               |   2 +-
>   arch/arm/mach-mvebu/Kconfig            |  26 +-
>   arch/arm/mach-mvebu/include/mach/cpu.h |   2 +-
>   arch/arm/mach-mvebu/lowlevel_spl.S     |   3 +-
>   arch/arm/mach-mvebu/spl.c              | 248 ++++++++++++--
>   board/gdsys/a38x/Makefile              |   2 +-
>   board/gdsys/a38x/spl.c                 |  20 --
>   board/kobol/helios4/Kconfig            |   5 -
>   board/solidrun/clearfog/Kconfig        |   5 -
>   common/spl/Kconfig                     |   4 +-
>   common/spl/spl.c                       |   9 +
>   common/spl/spl_mmc.c                   |  16 +-
>   common/spl/spl_sata.c                  |  12 +-
>   common/spl/spl_spi.c                   |   2 +-
>   configs/clearfog_defconfig             |   1 -
>   configs/controlcenterdc_defconfig      |   1 -
>   configs/db-88f6720_defconfig           |   1 -
>   configs/db-88f6820-amc_defconfig       |   1 -
>   configs/db-88f6820-gp_defconfig        |   2 -
>   configs/db-mv784mp-gp_defconfig        |   1 -
>   configs/ds414_defconfig                |   1 -
>   configs/helios4_defconfig              |   1 -
>   configs/maxbcm_defconfig               |   1 -
>   configs/theadorable_debug_defconfig    |   1 -
>   configs/turris_omnia_defconfig         |   1 -
>   configs/x530_defconfig                 |   1 -
>   include/configs/clearfog.h             |   7 +-
>   include/configs/controlcenterdc.h      |   9 -
>   include/configs/db-88f6720.h           |   3 -
>   include/configs/db-88f6820-amc.h       |   5 -
>   include/configs/db-88f6820-gp.h        |   7 -
>   include/configs/db-mv784mp-gp.h        |   3 -
>   include/configs/ds414.h                |   5 -
>   include/configs/helios4.h              |   7 +-
>   include/configs/theadorable.h          |   3 -
>   include/configs/turris_omnia.h         |   7 -
>   include/configs/x530.h                 |   3 -
>   include/spl.h                          |   1 +
>   scripts/config_whitelist.txt           |   1 -
>   tools/Makefile                         |   8 -
>   tools/kwbimage.c                       | 437 ++++++++++++++++++-------
>   tools/kwbimage.h                       |  54 ++-
>   tools/kwboot.c                         |  24 +-
>   43 files changed, 651 insertions(+), 302 deletions(-)
>   delete mode 100644 board/gdsys/a38x/spl.c
> 


Viele Grüße,
Stefan

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de

      parent reply	other threads:[~2021-07-22  7:35 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-19 12:20 [PATCH u-boot-mvebu v2 00/41] kwboot / kwbimage improvements reducing image size Marek Behún
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 01/41] tools: kwbimage: Fix compilation without CONFIG_SYS_U_BOOT_OFFS Marek Behún
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 02/41] tools: kwbimage: Simplify aligning and calculating checksum Marek Behún
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 03/41] tools: kwbimage: Align SPI and NAND images to 256 bytes Marek Behún
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 04/41] tools: kwbimage: Add constant for SDIO bootfrom Marek Behún
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 05/41] tools: kwbimage: Fix generation of SATA, SDIO and PCIe images Marek Behún
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 06/41] tools: kwbimage: Don't crash when binary file name does not contain '/' Marek Behún
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 07/41] tools: kwbimage: Fix check for v0 extended header checksum Marek Behún
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 08/41] tools: kwbimage: Validate extended headers of v1 images Marek Behún
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 09/41] tools: kwbimage: Validate data checksum " Marek Behún
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 10/41] tools: kwbimage: Print size of binary header in kwbimage_print_header() Marek Behún
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 11/41] tools: kwbimage: Cosmetic fix - remove redundant space character Marek Behún
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 12/41] tools: kwbimage: Use -a parameter (load address) for v1 images Marek Behún
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 13/41] tools: kwbimage: Change maximum number of arguments in binary header to 256 Marek Behún
2021-07-21  9:31   ` Stefan Roese
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 14/41] tools: kwbimage: Fix calculating size of binary header Marek Behún
2021-07-21  9:32   ` Stefan Roese
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 15/41] tools: kwbimage: Add support for more BINARY headers Marek Behún
2021-07-21  9:32   ` Stefan Roese
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 16/41] tools: kwbimage: Don't parse PAYLOAD keyword Marek Behún
2021-07-21  9:33   ` Stefan Roese
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 17/41] tools: kwbimage: Add support for DATA command also for v1 images Marek Behún
2021-07-21  9:35   ` Stefan Roese
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 18/41] tools: kwbimage: Add support for a new DATA_DELAY command Marek Behún
2021-07-21  9:35   ` Stefan Roese
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 19/41] tools: kwbimage: Do not hide usage of secure header under CONFIG_ARMADA_38X Marek Behún
2021-07-19 12:50   ` Marek Behún
2021-07-19 12:52     ` Stefan Roese
2021-07-21  9:36   ` Stefan Roese
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 20/41] tools: kwbimage: Mark all BootROM structures __packed Marek Behún
2021-07-21  9:38   ` Stefan Roese
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 21/41] tools: dumpimage: Fix crashing when trying to extract data from kwbimage Marek Behún
2021-07-21  9:38   ` Stefan Roese
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 22/41] tools: dumpimage: Show error message " Marek Behún
2021-07-21  9:39   ` Stefan Roese
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 23/41] tools: kwboot: Fix wrong parameter passed to read() Marek Behún
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 24/41] tools: kwboot: Fix restoring terminal Marek Behún
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 25/41] tools: kwboot: Print trailing newline after terminal is terminated Marek Behún
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 26/41] tools: kwboot: Cosmetic fix - add missing curly brackets Marek Behún
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 27/41] tools: kwboot: Check for v1 header size Marek Behún
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 28/41] tools: kwboot: Fix checking image header version Marek Behún
2021-07-21  9:40   ` Stefan Roese
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 29/41] arm: mvebu: Fix return_to_bootrom() Marek Behún
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 30/41] arm: mvebu: Mark return_to_bootrom() as a noreturn function Marek Behún
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 31/41] arm: mvebu: Implement return_to_bootrom() via U-Boot's SPL framework Marek Behún
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 32/41] arm: mvebu: Use U-Boot's SPL BootROM framework for booting from NAND/UART Marek Behún
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 33/41] SPL: Add support for specifying offset between header and image Marek Behún
2021-07-21 10:29   ` Stefan Roese
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 34/41] SPL: Add support for parsing board / BootROM specific image types Marek Behún
2021-07-22  8:50   ` Stefan Roese
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 35/41] arm: mvebu: Load main U-Boot binary in SPL code based on kwbimage header Marek Behún
2021-07-22  8:51   ` Stefan Roese
2021-07-19 12:20 ` [PATCH u-boot-mvebu v2 36/41] arm: mvebu: Remove legacy U-Boot header from kwbimage v1 files Marek Behún
2021-07-22  8:52   ` Stefan Roese
2021-07-19 12:21 ` [PATCH u-boot-mvebu v2 37/41] tools: kwbimage: Remove v1 kwbimage SPL padding to CONFIG_SYS_U_BOOT_OFFS bytes Marek Behún
2021-07-22  8:52   ` Stefan Roese
2021-07-19 12:21 ` [PATCH u-boot-mvebu v2 38/41] arm: mvebu: Remove unused macro CONFIG_SYS_U_BOOT_OFFS Marek Behún
2021-07-22  8:53   ` Stefan Roese
2021-07-19 12:21 ` [PATCH u-boot-mvebu v2 39/41] arm: mvebu: gdsys: Remove custom spl_board_init() Marek Behún
2021-07-22  8:55   ` Stefan Roese
2021-07-19 12:21 ` [PATCH u-boot-mvebu v2 40/41] kwbimage: Add support for extracting images via dumpimage tool Marek Behún
2021-07-22  8:55   ` Stefan Roese
2021-07-19 12:21 ` [PATCH u-boot-mvebu v2 41/41] kwbimage: Update help message about how to extract from an existing image Marek Behún
2021-07-22  8:56   ` Stefan Roese
2021-07-22  7:35 ` Stefan Roese [this message]

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=72fc23c5-039e-c58b-f4c1-d0dfebe11abd@denx.de \
    --to=sr@denx.de \
    --cc=baruch@tkos.co.il \
    --cc=chris.packham@alliedtelesis.co.nz \
    --cc=dgilmore@redhat.com \
    --cc=dirk.eibach@gdsys.cc \
    --cc=jon@solid-run.com \
    --cc=judge.packham@gmail.com \
    --cc=marek.behun@nic.cz \
    --cc=mario.six@gdsys.cc \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.