[U-Boot] [PATCH v4 0/4] configs: rk3288: Tinker Board SPL file must fit into 32 KiB
xypron.glpk at gmx.de
Wed Apr 3 06:19:57 UTC 2019
On 4/3/19 2:59 AM, Kever Yang wrote:
> Hi Heinrich,
> On 04/03/2019 01:19 AM, Heinrich Schuchardt wrote:
>> The SPL image for the Tinker Board has to fit into 32 KiB. This includes
>> up to 2 KiB for the file header.
> 32KB is the limit of SPL size, not SPL image size, does not include 2KB
>> A new configuration variable CONFIG_SPL_SIZE_LIMIT is introduced to define
>> the board specific limit.
> There is already CONFIG_SPL_MAX_SIZE for the SPL size limit, isn't it?
> I don't understand why we need new variable.
SPL_MAX_SIZE is used to set CONFIG_SPL_PAD_TO if CONFIG_SPL_PAD_TO is
not defined. If CONFIG_SPL_PAD_TO is defined it specifies the maximum
value of CONFIG_SPL_PAD_TO. So in case CONFIG_SPL_PAD_TO is not defined
SPL_MAX_SIZE does not specify a maximum size but a minimum one.
It is unclear to me why Benoît in 6113d3f27ca ("Makefile: Change
CONFIG_SPL_PAD_TO to image offset") chose this design. Entangling the
variables in this way does not provide a clean design.
ASSERT(__image_copy_end - __image_copy_start < (IMAGE_MAX_SIZE), \
"SPL image too big");
in arch/arm/cpu/u-boot-spl.lds neither considers the size of the device
tree nor of the BSS section. So at least for Rockchip SOCs it is
checking a measure that is not directly related to the image size
created by `mkimage -T rksd`.
> - Kever
>> A common Makefile function is used for this test and the test against
>> Move the board size check from arch/arm/mach-imx/Makefile to Makefile.
>> use a common function for all size checks in the Makefiles
>> Heinrich Schuchardt (4):
>> Makefile: reusable function for BOARD_SIZE_CHECK
>> imx: move BOARD_SIZE_CHECK to main Makefile
>> configs: define CONFIG_SPL_SIZE_LIMIT
>> configs: rk3288: Tinker Board SPL file must fit into 32 KiB
>> Kconfig | 8 ++++++++
>> Makefile | 33 +++++++++++++++++++++++----------
>> arch/arm/mach-imx/Makefile | 16 ----------------
>> configs/tinker-rk3288_defconfig | 1 +
>> 4 files changed, 32 insertions(+), 26 deletions(-)
More information about the U-Boot