[U-Boot] [PATCH v1 0/2] spl: move SPL_OS_BOOT and SYS_OS_BASE to Kconfig

Heiko Schocher hs at denx.de
Fri Oct 7 07:26:14 CEST 2016


Hello Andrew,

Am 06.10.2016 um 18:29 schrieb Andrew F. Davis:
> On 10/06/2016 12:55 AM, Heiko Schocher wrote:
>> This 2 patches move SPL_OS_BOOT and SYS_OS_BASE
>> to Kconfig. Checked with tbot testcase:
>> https://github.com/hsdenx/tbot/blob/master/src/tc/uboot/tc_uboot_check_kconfig.py
>>
>> result:
>>
>> Boards      : 1213
>> compile err : 13
>> not checked : 1
>> U-Boot good : 1185 bad 14
>> SPL good    : 1199 bad 0
>>
>> Boards not checked, as they had compile errors:
>> ['adp-ag101p', 'bf533-stamp', 'cm-bf527', 'colibri_pxa270', 'omap4_sdp4430', 'openrisc-generic', 'qemu-x86_efi_payload64', 'sandbox', 'sandbox_noblk', 'sandbox_spl', 'smdk5250', 'snow', 'spring']
>>
>> Boards not checked, as no toolchain:
>> ['xtfpga']
>>
>> Boards which have differences in the resulting U-Boot bin:
>> ['am335x_baltos', 'am335x_evm_spiboot', 'am335x_igep0033', 'cm_t335', 'cm_t43', 'cm_t54', 'duovero', 'k2e_evm', 'k2g_evm', 'k2hk_evm', 'k2l_evm', 'omap3_pandora', 'omap3_zoom1', 'pepper']
>>
>> I looked into the Boards with differences in the resulting U-Boot bin,
>> but could not find the reason, why they are different :-(
>>
>> for example am335x_baltos:
>>
>> $ make am335x_baltos_defconfig
>> $ cp .config config_org
>> $ make mrproper
>> - applied the 2 patches
>> $ make am335x_baltos_defconfig
>> $ diff -pruN config_org .config > gnlmpf
>> $ cat gnlmpf
>>
>> --- config_org  2016-10-06 06:58:01.636514195 +0200
>> +++ .config     2016-10-06 06:58:36.459726538 +0200
>> @@ -270,6 +270,7 @@ CONFIG_SPL_MTD_SUPPORT=y
>>   # CONFIG_SPL_NO_CPU_SUPPORT is not set
>>   # CONFIG_SPL_NOR_SUPPORT is not set
>>   # CONFIG_SPL_ONENAND_SUPPORT is not set
>> +# CONFIG_SPL_OS_BOOT is not set
>>   # CONFIG_SPL_POST_MEM_SUPPORT is not set
>>   # CONFIG_SPL_SATA_SUPPORT is not set
>>   # CONFIG_SPL_USBETH_SUPPORT is not set
>>
>> change in this patchserie for this board:
>> diff --git a/include/configs/baltos.h b/include/configs/baltos.h
>> index 58df571..e69c1b6 100644
>> --- a/include/configs/baltos.h
>> +++ b/include/configs/baltos.h
>> @@ -54,7 +54,6 @@
>>   #undef CONFIG_SYS_OMAP24_I2C_SPEED
>>   #define CONFIG_SYS_OMAP24_I2C_SPEED 1000
>>
>> -#undef CONFIG_SPL_OS_BOOT
>>   #ifdef CONFIG_NAND
>>   #define CONFIG_SYS_NAND_U_BOOT_OFFS    0x00080000
>>   #ifdef CONFIG_SPL_OS_BOOT
>>
>> Seems Ok to me, but I get a different md5sum for the U-Boot bin ...
>>
>> Or for example the omap3_pandora board:
>> $ make omap3_pandora_defconfig
>> $ cp .config config_org
>> $ make mrproper
>> - applied the 2 patches
>> $ make omap3_pandora_defconfig
>> $ diff -pruN config_org .config > gnlmpf
>> $ cat gnlmpf
>> $
>>
>> No difference in the .config before and after this patch,
>> but a difference in the resulting binary ... ?
>>
>> Seems to me SPL_OS_BOOT, which is a SPL config option
>> has somewhere an influence to the U-Boot binary ...
>>
>> Any ideas whats going on here?
>>
>
> No idea, all I know is that some config headers with long histories are
> full of hacky ifdef tricks and bugs. IMHO the best thing we can do is to
> quickly move everything to Kconfig and sort it out then, instead of
> battling the config logic in the header files with every change as we go.

Yes, full ack. I do not understand how a SPL config symbol can change the
U-Boot binary! ... all SPL bins have no problem with this move, so I
tend to say, the patch is Ok ...

> I will try to help test these changes with the boards I have, but  I
> haven't been able to get any of my omap3 boards to boot correctly in a
> while :(. I'll see if anyone else here has one working they can test this.

Thanks!

<promotion on>
I vote for setting up more "virtual labs" with boards in it, which
we can use for automated testing with tbot [1] and present the results
on a webpage [2] ;-)
<promotion off>

bye,
Heiko
[1] https://github.com/hsdenx/tbot
[2] http://xeidos.ddns.net/tests/test_db_auslesen.php
>
> Thanks,
> Andrew
>
>> Hmm... looking into ".config" after an "make omap3_pandora_defconfig"
>> There are a lot of CONFIG_SPL symbols defined, but:
>>   #
>>   # SPL / TPL
>>   #
>>   CONFIG_SUPPORT_SPL=y
>>   # CONFIG_SPL is not set
>>
>> This seems bogus to me! SPL support is deactivated, but
>> a lot of CONFIG_SPL_* symbols are activated! For example
>> I find in .config:
>> CONFIG_SPL_GPIO_SUPPORT=y
>> CONFIG_SPL_LIBCOMMON_SUPPORT=y
>> CONFIG_SPL_LIBGENERIC_SUPPORT=y
>>
>> Does currently the omap3_pandora board boot with
>> "Prepare v2016.11-rc1" ?
>>
>>
>>
>> Heiko Schocher (2):
>>    spl: move SPL_OS_BOOT to Kconfig
>>    spl: move SYS_OS_BASE to Kconfig
>>
>>   common/spl/Kconfig                               | 18 ++++++++++++++++++
>>   configs/a3m071_defconfig                         |  2 ++
>>   configs/a4m2k_defconfig                          |  1 +
>>   configs/am335x_boneblack_defconfig               |  3 ++-
>>   configs/am335x_boneblack_vboot_defconfig         |  3 ++-
>>   configs/am335x_evm_defconfig                     |  1 +
>>   configs/am335x_evm_nor_defconfig                 |  1 +
>>   configs/am335x_evm_usbspl_defconfig              |  1 +
>>   configs/am335x_shc_defconfig                     |  3 ++-
>>   configs/am335x_shc_ict_defconfig                 |  3 ++-
>>   configs/am335x_shc_netboot_defconfig             |  3 ++-
>>   configs/am335x_shc_prompt_defconfig              |  3 ++-
>>   configs/am335x_shc_sdboot_defconfig              |  3 ++-
>>   configs/am335x_shc_sdboot_prompt_defconfig       |  3 ++-
>>   configs/am335x_sl50_defconfig                    |  3 ++-
>>   configs/am43xx_evm_defconfig                     |  1 +
>>   configs/am43xx_evm_ethboot_defconfig             |  1 +
>>   configs/am43xx_evm_usbhost_boot_defconfig        |  1 +
>>   configs/am57xx_evm_defconfig                     |  1 +
>>   configs/am57xx_evm_nodt_defconfig                |  1 +
>>   configs/birdland_bav335a_defconfig               |  3 ++-
>>   configs/birdland_bav335b_defconfig               |  3 ++-
>>   configs/cairo_defconfig                          |  1 +
>>   configs/devkit8000_defconfig                     |  1 +
>>   configs/dra7xx_evm_defconfig                     |  1 +
>>   configs/gwventana_defconfig                      |  1 +
>>   configs/igep0020_defconfig                       |  1 +
>>   configs/igep0030_defconfig                       |  1 +
>>   configs/igep0030_nand_defconfig                  |  1 +
>>   configs/igep0032_defconfig                       |  1 +
>>   configs/ipam390_defconfig                        |  1 +
>>   configs/microblaze-generic_defconfig             |  2 ++
>>   configs/omap3_beagle_defconfig                   |  1 +
>>   configs/omap3_logic_defconfig                    |  1 +
>>   configs/omap3_overo_defconfig                    |  1 +
>>   configs/omap4_panda_defconfig                    |  1 +
>>   configs/omap4_sdp4430_defconfig                  |  1 +
>>   configs/omap5_uevm_defconfig                     |  1 +
>>   configs/pcm051_rev1_defconfig                    |  3 ++-
>>   configs/pcm051_rev3_defconfig                    |  3 ++-
>>   configs/pengwyn_defconfig                        |  3 ++-
>>   configs/twister_defconfig                        |  1 +
>>   configs/xilinx_zynqmp_ep_defconfig               |  1 +
>>   configs/xilinx_zynqmp_zc1751_xm015_dc1_defconfig |  1 +
>>   configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig |  1 +
>>   configs/xilinx_zynqmp_zc1751_xm018_dc4_defconfig |  1 +
>>   configs/xilinx_zynqmp_zc1751_xm019_dc5_defconfig |  1 +
>>   configs/xilinx_zynqmp_zcu102_defconfig           |  1 +
>>   configs/xilinx_zynqmp_zcu102_revB_defconfig      |  1 +
>>   configs/zynq_microzed_defconfig                  |  1 +
>>   configs/zynq_picozed_defconfig                   |  1 +
>>   configs/zynq_zc702_defconfig                     |  1 +
>>   configs/zynq_zc706_defconfig                     |  1 +
>>   configs/zynq_zc770_xm010_defconfig               |  1 +
>>   configs/zynq_zc770_xm011_defconfig               |  1 +
>>   configs/zynq_zc770_xm012_defconfig               |  1 +
>>   configs/zynq_zc770_xm013_defconfig               |  1 +
>>   configs/zynq_zed_defconfig                       |  1 +
>>   configs/zynq_zybo_defconfig                      |  1 +
>>   include/configs/a3m071.h                         |  2 --
>>   include/configs/am335x_evm.h                     |  1 -
>>   include/configs/am335x_igep0033.h                |  1 -
>>   include/configs/baltos.h                         |  1 -
>>   include/configs/bav335x.h                        |  1 -
>>   include/configs/brppt1.h                         |  1 -
>>   include/configs/cm_t335.h                        |  1 -
>>   include/configs/cm_t43.h                         |  1 -
>>   include/configs/cm_t54.h                         |  2 --
>>   include/configs/duovero.h                        |  1 -
>>   include/configs/gw_ventana.h                     |  1 -
>>   include/configs/ipam390.h                        |  1 -
>>   include/configs/microblaze-generic.h             |  3 ---
>>   include/configs/omap3_zoom1.h                    |  1 -
>>   include/configs/pepper.h                         |  1 -
>>   include/configs/smartweb.h                       |  1 -
>>   include/configs/taurus.h                         |  1 -
>>   include/configs/ti_armv7_common.h                |  3 ---
>>   include/configs/ti_armv7_keystone2.h             |  1 -
>>   include/configs/twister.h                        |  1 -
>>   include/configs/xilinx_zynqmp.h                  |  1 -
>>   include/configs/zynq-common.h                    |  1 -
>>   81 files changed, 92 insertions(+), 42 deletions(-)
>>
>

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany


More information about the U-Boot mailing list