mbox series

[0/7] disk: don't compile in partition support for spl/tpl if not really necessary

Message ID 20220419010158.47034-1-takahiro.akashi@linaro.org
Headers show
Series disk: don't compile in partition support for spl/tpl if not really necessary | expand

Message

AKASHI Takahiro April 19, 2022, 1:01 a.m. UTC
This is a reworked version of my RFC[1].
When my patch[2] is applied, the size of SPL code on some platform might
exceed the limit of ROM size due to partition support code (disk/*) being
built in even if none of partition table types (CONFIG_*_PARTITION) is
enabled on that particular platform.

This is generally inconvenient and should be fixed.
The patch#7 is a core part to fix the issue and the rest of patches
are to fix related build errors revealed/caused by this change.

[1] https://lists.denx.de/pipermail/u-boot/2022-April/481531.html
[2] https://lists.denx.de/pipermail/u-boot/2022-April/481532.html

Test:
=====
* Azure CI passed[3]

[3] https://dev.azure.com/u-boot/u-boot/_build/results?buildId=4092&view=results


Change history:
===============
v1 (Apr, 18, 2022)
* split the original RFC into a set of patches
* remove hunks against CMD_PART and cortina_presidio-asic-emmc_defconfig
  which are no longer needed.
* use 'imply' rather than 'select' for dependency of PARTITION_UUIDS
  at EFI_LOADER, dropping DOS_PARTITON (patch#5)
* compile efi_disk.c even if BLK without PARTITION (patch#6)

RFC (Apr 15, 2021)
* initial RFC

AKASHI Takahiro (7):
  disk: include errno.h explicitly in part.h
  disk: enable function prototypes in part.h for SPL/TPL
  disk: define nullified functions for !PARTITIONS
  sandbox: move a function prototype
  efi_loader: PARTITION_UUIDS should be optional
  efi_loader: disk: compile efi_disk when CONFIG_BLK
  disk: don't compile in partition support for spl/tpl if not really
    necessary

 disk/Kconfig                     | 37 ++++++++++++++++----------------
 include/part.h                   | 15 ++++++++++---
 include/sandboxblockdev.h        |  2 ++
 lib/efi_loader/Kconfig           |  2 +-
 lib/efi_loader/Makefile          |  2 +-
 lib/efi_loader/efi_device_path.c | 11 +++++++++-
 6 files changed, 45 insertions(+), 24 deletions(-)