[U-Boot] [PATCH] blk: Rework guard around part_init call

Simon Glass sjg at chromium.org
Wed Dec 5 13:55:36 UTC 2018


On Wed, 5 Dec 2018 at 06:23, Tom Rini <trini at konsulko.com> wrote:
>
> The function part_init() will only be built when we have both
> CONFIG_PARTITIONS and CONFIG_HAVE_BLOCK_DEVICE set.  Protect the call to
> this function with both of these tests now.
>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
> Cc: Michal Simek <michal.simek at xilinx.com>
> Cc: York Sun <york.sun at nxp.com>
> Cc: Prabhakar Kushwaha <prabhakar.kushwaha at nxp.com>
> Cc: Mingkai Hu <mingkai.hu at nxp.com>
> Cc: Stefan Roese <sr at denx.de>
> Cc: Marek BehĂșn <marek.behun at nic.cz>
> Cc: Vanessa Maegima <vanessa.maegima at nxp.com>
> Cc: Eugen Hristev <eugen.hristev at microchip.com>
> Cc: Adam Ford <aford173 at gmail.com>
> Cc: Jagan Teki <jagan at amarulasolutions.com>
> Cc: Tom Warren <twarren at nvidia.com>
> Cc: Stephen Warren <swarren at nvidia.com>
> Cc: Vitaly Andrianov <vitalya at ti.com>
> Signed-off-by: Tom Rini <trini at konsulko.com>
> ---
> Changes in v2:
> - rockchip: evb-rk3036 and kylin-rk3036 are both targets that do not use
>   CONFIG_SPL_FRAMEWORK but also do not fall into the legacy PowerPC SPL
>   case.  In order to avoid fail to builds on these platforms they must
>   now turn off CONFIG_SPL_BLK, which they weren't using before, it was
>   being discarded at link time.
> - Re-work common/spl/Kconfig and then various Makefiles to slightly
>   clear up the logic of when we do and don't need both disk/part.o and
>   drivers/block/blk-uclass.o.  This is in fact not the greatest but it's
>   all I could come up with to cover all the cases we have today.
> - Because of the above, add a note to the CONFIG_BLK migration to note
>   that once we are complete there we need to revisit the symbols I used
>   above as once that migration is done we should be able to rely on just
>   BLK and maybe PARTITIONS.

Indeed.

> - Actually build-test the world and confirm the overall results are
>   fairly sane.  This results in pushing a few platforms that are using
>   SPL and DM into using SPL_BLK now.
> - This also results in a number of 64bit rockchip, nxp and zynqmp
>   platforms that have been enabling CONFIG_SPL_DOS_PARTITION /
>   CONFIG_SPL_ISO_PARTITION now linking it.
> - On the 32bit ARM side, some Marvell, i.MX, ateml, TI, Tegra, zynq and
>   rockchip platforms do the same.
>
> The full build log can be seen at:
> https://gist.github.com/trini/e3e73afec629bbda2625102120c2a9db
> ---
>  common/spl/Kconfig             | 3 +++
>  configs/evb-rk3036_defconfig   | 1 +
>  configs/kylin-rk3036_defconfig | 1 +
>  doc/driver-model/MIGRATION.txt | 4 +++-
>  drivers/Makefile               | 3 +--
>  drivers/block/Makefile         | 2 ++
>  drivers/block/blk-uclass.c     | 2 +-
>  scripts/Makefile.spl           | 4 +++-
>  8 files changed, 15 insertions(+), 5 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list