support/scripts: add check-dotconfig.py
Subsystems (2)
PATCH v2 1/12 support/scripts: add check-dotconfig.py
For the same reason as for 50b747f212be2c9c0f7cf10c674ed488d042715c, we need to check if the generated configuration file (.config) contains all symbols present in the defconfig file.
If not there is an issue with the defconfig.
This script will be used in .gitlab-ci.yml.
Inspired by is_toolchain_usable() function from genrandconfig:
https://git.busybox.net/buildroot/tree/utils/genrandconfig?h=2020.02#n164
---
v2: update with the improved patch suggested by Yann.
http://lists.busybox.net/pipermail/buildroot/2020-April/280679.html --- support/scripts/check-dotconfig.py | 44 ++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 support/scripts/check-dotconfig.py
support/scripts/check-dotconfig.py new file +44 -0
@@ -0,0 +1,44 @@ +#!/usr/bin/env python3 + +# This scripts check that all lines present in the defconfig are +# still present in the .config + +import sys + + +def main(): + if not (len(sys.argv) == 3): + print("Error: incorrect number of arguments") + print("""Usage: check-dotconfig <configfile> <defconfig>""") + sys.exit(1) + + configfile = sys.argv[1] + defconfig = sys.argv[2] + + # strip() to get rid of trailing \n + with open(configfile) as configf: + configlines = [l.strip() for l in configf.readlines()] + + defconfiglines = [] + with open(defconfig) as defconfigf: + for line in defconfigf.readlines(): + # strip() to get rid of trailing \n + line = line.strip() + if line.startswith("BR2_"): + defconfiglines.append(line) + elif line.startswith('# BR2_') and line.endswith(' is not set'): + defconfiglines.append(line) + + # Check that all the defconfig lines are still present + missing = [defconfigline.strip() for defconfigline in defconfiglines + if defconfigline not in configlines] + + if len(missing): + print("WARN: defconfig {} can't be used:".format(defconfig)) + for m in missing: + print(" Missing: {}".format(m)) + sys.exit(1 if len(missing) else 0) + + +if __name__ == "__main__": + main()
Signature · 1 line
2.25.3
PATCH v2 2/12 gitlab-ci: check generated config files
Use the script added by the previous patch to check generated config files.
Tested on gitlab:
https://gitlab.com/kubu93/buildroot/pipelines/137597966
--- .gitlab-ci.yml | 1 + .gitlab-ci.yml.in | 1 + 2 files changed, 2 insertions(+)
.gitlab-ci.yml +1 -0
@@ -47,6 +47,7 @@ check-package: script: - echo "Configure Buildroot for ${DEFCONFIG_NAME}" - make ${DEFCONFIG_NAME} + - ./support/scripts/check-dotconfig.py .config ./configs/${DEFCONFIG_NAME} - echo 'Build buildroot' - | make > >(tee build.log |grep '>>>') 2>&1 || {
.gitlab-ci.yml.in +1 -0
@@ -47,6 +47,7 @@ check-package: script: - echo "Configure Buildroot for ${DEFCONFIG_NAME}" - make ${DEFCONFIG_NAME} + - ./support/scripts/check-dotconfig.py .config ./configs/${DEFCONFIG_NAME} - echo 'Build buildroot' - | make > >(tee build.log |grep '>>>') 2>&1 || {
Signature · 1 line
2.25.3
PATCH v2 2/12 gitlab-ci: check generated config files
Quoted 8 lines · On Tue, 21 Apr 2020 19:26:36 +0200 Romain Naour <[email protected]> wrote:
Use the script added by the previous patch to check generated config files.
Tested on gitlab:
https://gitlab.com/kubu93/buildroot/pipelines/137597966Signed-off-by Romain Naour <[email protected]>Cc Thomas Petazzoni <[email protected]>
Having this patch at this step of the series would make Gitlab CI
unhappy: this patch should come *after* all defconfigs are fixed.
No need to resend just for that.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v2 2/12 gitlab-ci: check generated config files
In reply to Romain NaourRomain, All,
On 2020-04-21 19:26 +0200, Romain Naour spake thusly:
Quoted 18 lines
Use the script added by the previous patch to check generated config files.
Tested on gitlab:
https://gitlab.com/kubu93/buildroot/pipelines/137597966Signed-off-by Romain Naour <[email protected]>Cc Thomas Petazzoni <[email protected]>--- .gitlab-ci.yml | 1 + .gitlab-ci.yml.in | 1 + 2 files changed, 2 insertions(+).gitlab-ci.yml +0
-0
.gitlab-ci.yml check-package: · line 50
Quoted 4 lines
.gitlab-ci.yml +1
-0@@ -47,6 +47,7 @@ check-package: script: - echo "Configure Buildroot for ${DEFCONFIG_NAME}" - make ${DEFCONFIG_NAME} + - ./support/scripts/check-dotconfig.py .config ./configs/${DEFCONFIG_NAME}
We can't add the check in the pipelines before all the defconfigs are fixed, otherwise the failed checks would end the job in error on the spot, preventing the defconfig from building.
So, the defconfig fixes should come first (but Thomas is supposed to apply them as I write this! ;-) )
Regards,
Yann E. MORIN.
Quoted 22 lines
.gitlab-ci.yml +0
-0- echo 'Build buildroot' - | make > >(tee build.log |grep '>>>') 2>&1 || {.gitlab-ci.yml.in +1
-0@@ -47,6 +47,7 @@ check-package: script: - echo "Configure Buildroot for ${DEFCONFIG_NAME}" - make ${DEFCONFIG_NAME} + - ./support/scripts/check-dotconfig.py .config ./configs/${DEFCONFIG_NAME} - echo 'Build buildroot' - | make > >(tee build.log |grep '>>>') 2>&1 || {Signature · 6 lines
2.25.3 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v2 3/12 configs/amarula_a64_relic_defconfig: remove BR2_PACKAGE_HOST_ANDROID_TOOLS_FASTBOOT
In reply to Romain NaourThis option is lost while loading the defconfig with:
make amarula_a64_relic_defconfig
This fixes the new defconfig check.
---
If android tools is really required for this defconfig, BR2_PACKAGE_HOST_ANDROID_TOOLS must be selected first.
--- configs/amarula_a64_relic_defconfig | 1 - 1 file changed, 1 deletion(-)
configs/amarula_a64_relic_defconfig +0 -1
@@ -40,7 +40,6 @@ BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y BR2_TARGET_GENERIC_ISSUE="Welcome to Amarula A64-Relic" BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y -BR2_PACKAGE_HOST_ANDROID_TOOLS_FASTBOOT=y BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_MTOOLS=y
Signature · 1 line
2.25.3
PATCH v2 3/12 configs/amarula_a64_relic_defconfig: remove BR2_PACKAGE_HOST_ANDROID_TOOLS_FASTBOOT
Quoted 19 lines · On Tue, 21 Apr 2020 19:26:37 +0200 Romain Naour <[email protected]> wrote:
This option is lost while loading the defconfig with:
makeamarula_a64_relic_defconfigThis fixes the new defconfig check.
Signed-off-by Romain Naour <[email protected]>Cc Jagan Teki <[email protected]>---
If android tools is really required for this defconfig,BR2_PACKAGE_HOST_ANDROID_TOOLSmust be selected first.--- configs/amarula_a64_relic_defconfig | 1 - 1 file changed, 1 deletion(-)configs/amarula_a64_relic_defconfig +0
-0
configs/amarula_a64_relic_defconfig BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y · line 43
Quoted 4 lines
configs/amarula_a64_relic_defconfig +0
-1@@ -40,7 +40,6 @@ BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y BR2_TARGET_GENERIC_ISSUE="Welcome to Amarula A64-Relic" BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y -BR2_PACKAGE_HOST_ANDROID_TOOLS_FASTBOOT=y
The intention is to have android-tools for the host enabled, because board/amarula/a64-relic/readme.txt makes use of fastboot to reflash the board.
So the proper fix is to add:
BR2_PACKAGE_HOST_ANDROID_TOOLS=y
and of course adjust the commit log accordingly. No need to resend the whole series for that, we can fix when applying.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v2 3/12 configs/amarula_a64_relic_defconfig: remove BR2_PACKAGE_HOST_ANDROID_TOOLS_FASTBOOT
Hi Thomas,
Le 21/04/2020 ? 21:43, Thomas Petazzoni a ?crit?:
Quoted 6 lines
Quoted 3 lines · On Tue, 21 Apr 2020 19:26:37 +0200 Romain Naour <[email protected]> wrote:
This option is lost while loading the defconfig with:
makeamarula_a64_relic_defconfig
Quoted 8 lines
Quoted 8 lines
This fixes the new defconfig check.
Signed-off-by Romain Naour <[email protected]>Cc Jagan Teki <[email protected]>---
If android tools is really required for this defconfig,
BR2_PACKAGE_HOST_ANDROID_TOOLSmust be selected first.
(*)
Quoted 18 lines
configs/amarula_a64_relic_defconfig BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y · line 43
Quoted 13 lines
--- configs/amarula_a64_relic_defconfig | 1 - 1 file changed, 1 deletion(-)configs/amarula_a64_relic_defconfig +0
-1@@ -40,7 +40,6 @@ BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y BR2_TARGET_GENERIC_ISSUE="Welcome to Amarula A64-Relic" BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y -BR2_PACKAGE_HOST_ANDROID_TOOLS_FASTBOOT=yThe intention is to have android-tools for the host enabled, because
board/amarula/a64-relic/readme.txtmakes use of fastboot to reflash the board.
Quoted 6 lines
So the proper fix is to add:
BR2_PACKAGE_HOST_ANDROID_TOOLS=y
and of course adjust the commit log accordingly. No need to resend the whole series for that, we can fix when applying.
Thanks for the review, I was not 100% sure, see (*).
Best regards,
Romain
Quoted 5 lines
Best regards,
Thomas
PATCH v2 4/12 configs: fix typo BR2_TARGET_ROOTFS_EXT2_4
In reply to Romain NaourThe ext4 option is BR2_TARGET_ROOTFS_EXT2_4 notBR2_TARGET_ROOTFS_EXT_4.
This fixes the new defconfig check.
--- configs/freescale_imx28evk_defconfig | 2 +- configs/imx23evk_defconfig | 2 +- configs/olimex_imx233_olinuxino_defconfig | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
configs/freescale_imx28evk_defconfig +1 -1
@@ -25,7 +25,7 @@ BR2_TARGET_UBOOT_FORMAT_SD=y # Filesystem BR2_TARGET_ROOTFS_EXT2=y -BR2_TARGET_ROOTFS_EXT4=y +BR2_TARGET_ROOTFS_EXT2_4=y # To generate SD Image BR2_PACKAGE_HOST_DOSFSTOOLS=y
configs/imx23evk_defconfig +1 -1
@@ -25,7 +25,7 @@ BR2_TARGET_UBOOT_FORMAT_SD=y # Filesystem BR2_TARGET_ROOTFS_EXT2=y -BR2_TARGET_ROOTFS_EXT4=y +BR2_TARGET_ROOTFS_EXT2_4=y # To generate SD card image BR2_PACKAGE_HOST_DOSFSTOOLS=y
configs/olimex_imx233_olinuxino_defconfig +1 -1
@@ -33,7 +33,7 @@ BR2_PACKAGE_ZD1211_FIRMWARE=y # Filesystem BR2_TARGET_ROOTFS_EXT2=y -BR2_TARGET_ROOTFS_EXT4=y +BR2_TARGET_ROOTFS_EXT2_4=y # BR2_TARGET_ROOTFS_TAR is not set # U-Boot
Signature · 1 line
2.25.3
Fabio Estevam
reviewerPATCH v2 4/12 configs: fix typo BR2_TARGET_ROOTFS_EXT2_4
Quoted 8 lines · Romain Naour
The ext4 option is
BR2_TARGET_ROOTFS_EXT2_4notBR2_TARGET_ROOTFS_EXT_4.This fixes the new defconfig check.
Signed-off-by Romain Naour <[email protected]>Cc Fabio Estevam <[email protected]>
Thanks for the fix:
PATCH v2 5/12 configs:minnowboard_max-graphical_defconfig: re-enable GLX support
In reply to Romain NaourThis defconfig loses mesa3d-demo and glmark2 package since commit 5cb821d5635626b7327d5d704555c412e5ed5a1f that introduced an explicit option to enable GLX support.
This fixes the new defconfig check.
---
This patch should be backported to 2020.02.x and 2019.11.x.
--- configs/minnowboard_max-graphical_defconfig | 1 + 1 file changed, 1 insertion(+)
configs/minnowboard_max-graphical_defconfig +1 -0
@@ -42,6 +42,7 @@ BR2_PACKAGE_MESA3D_DEMOS=y BR2_PACKAGE_MESA3D=y BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST=y BR2_PACKAGE_MESA3D_DRI_DRIVER_I965=y +BR2_PACKAGE_MESA3D_OPENGL_GLX=y # Framebuffer (just for testing purposes) BR2_PACKAGE_FB_TEST_APP=y
Signature · 1 line
2.25.3
PATCH v2 5/12 configs:minnowboard_max-graphical_defconfig: re-enable GLX support
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Romain" == Romain Naour <[email protected]> writes:
This defconfig loses mesa3d-demo and glmark2 package since commit
5cb821d5635626b7327d5d704555c412e5ed5a1fthat introduced an explicit option to enable GLX support.
Quoted 6 lines
This fixes the new defconfig check.
Signed-off-by Romain Naour <[email protected]>Cc Peter Korsgaard <[email protected]>---
This patch should be backported to 2020.02.x and 2019.11.x.
2019.11.x is EOL, but committed to 2020.02.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 6/12 configs/nanopi_r1_defconfig: remove BR2_TARGET_UBOOT_BOARD_DEFCONFIG
In reply to Romain NaourThis defconfig use a custom defconfig file located in board/friendlyarm/nanopi-r1/uboot/nanopi_r1_defconfig.
BR2_TARGET_UBOOT_BOARD_DEFCONFIG is used to provide the name of a in-tree defconfig. Since a custom defconfig is used, this option is lost while loading the defconfig with:
make nanopi_r1_defconfig
This fixes the new defconfig check.
--- configs/nanopi_r1_defconfig | 1 - 1 file changed, 1 deletion(-)
configs/nanopi_r1_defconfig +0 -1
@@ -15,7 +15,6 @@ BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y BR2_TARGET_UBOOT_CUSTOM_VERSION=y BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.01" -BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nanopi_r1" BR2_TARGET_UBOOT_NEEDS_DTC=y BR2_TARGET_UBOOT_CUSTOM_DTS_PATH="board/friendlyarm/nanopi-r1/uboot/sun8i-h3-nanopi-r1.dts" BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
Signature · 1 line
2.25.3
PATCH v2 7/12 configs: remove BR2_PACKAGE_QT5BASE_LICENSE_APPROVED
In reply to Romain NaourThis option has been removed since 6836f2a70acd259a846c88968924d60afef8cc16.
This fixes the new defconfig check.
--- configs/engicam_imx6qdl_icore_qt5_defconfig | 1 - configs/imx6-sabresd_qt5_defconfig | 1 - 2 files changed, 2 deletions(-)
configs/engicam_imx6qdl_icore_qt5_defconfig +0 -1
@@ -51,7 +51,6 @@ BR2_TOOLCHAIN_BUILDROOT_CXX=y # qt5 BR2_PACKAGE_QT5=y -BR2_PACKAGE_QT5BASE_LICENSE_APPROVED=y BR2_PACKAGE_QT5BASE_OPENGL_LIB=y BR2_PACKAGE_QT5BASE_LINUXFB=y BR2_PACKAGE_QT5BASE_FONTCONFIG=y
configs/imx6-sabresd_qt5_defconfig +0 -1
@@ -70,7 +70,6 @@ BR2_PACKAGE_MESA3D_DEMOS=y # Qt5 BR2_PACKAGE_QT5=y -BR2_PACKAGE_QT5BASE_LICENSE_APPROVED=y BR2_PACKAGE_QT5BASE_OPENGL_LIB=y BR2_PACKAGE_QT5BASE_LINUXFB=y BR2_PACKAGE_QT5BASE_FONTCONFIG=y
Signature · 1 line
2.25.3
PATCH v2 7/12 configs: remove BR2_PACKAGE_QT5BASE_LICENSE_APPROVED
Romain, All,
On 2020-04-21 19:26 +0200, Romain Naour spake thusly:
Quoted 1 line
This option has been removed since
6836f2a70acd259a846c88968924d60afef8cc16.
I suppose this commit is the reason you pulled me in as Cc of this patch. ;-)
Damn... ;-)
Regards,
Yann E. MORIN.
Quoted 36 lines
This fixes the new defconfig check.
Signed-off-by Romain Naour <[email protected]>Cc Yann E. MORIN <[email protected]>--- configs/engicam_imx6qdl_icore_qt5_defconfig | 1 - configs/imx6-sabresd_qt5_defconfig | 1 - 2 files changed, 2 deletions(-)configs/engicam_imx6qdl_icore_qt5_defconfig +0
-1@@ -51,7 +51,6 @@ BR2_TOOLCHAIN_BUILDROOT_CXX=y # qt5 BR2_PACKAGE_QT5=y -BR2_PACKAGE_QT5BASE_LICENSE_APPROVED=y BR2_PACKAGE_QT5BASE_OPENGL_LIB=y BR2_PACKAGE_QT5BASE_LINUXFB=y BR2_PACKAGE_QT5BASE_FONTCONFIG=yconfigs/imx6-sabresd_qt5_defconfig +0
-1@@ -70,7 +70,6 @@ BR2_PACKAGE_MESA3D_DEMOS=y # Qt5 BR2_PACKAGE_QT5=y -BR2_PACKAGE_QT5BASE_LICENSE_APPROVED=y BR2_PACKAGE_QT5BASE_OPENGL_LIB=y BR2_PACKAGE_QT5BASE_LINUXFB=y BR2_PACKAGE_QT5BASE_FONTCONFIG=ySignature · 1 line
2.25.3
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v2 8/12 configs/engicam_imx6qdl_icore_qt5_defconfig: needs udev to select glmark2
In reply to Romain NaourThe BR2_PACKAGE_GLMARK2 is lost while loading the defconfig with:
make engicam_imx6qdl_icore_qt5_defconfig
In order to select gmark2 package, BR2_PACKAGE_GLMARK2_FLAVOR_ANY option must be set.
Based on the defconfig without X11 and wayland package, the only missing option to select BR2_PACKAGE_GLMARK2_FLAVOR_ANY is BR2_PACKAGE_HAS_UDEV. The only possible option is to enable one of the udev provider (eudev or systemd). Select eudev package for /dev management.
--- configs/engicam_imx6qdl_icore_qt5_defconfig | 1 + 1 file changed, 1 insertion(+)
configs/engicam_imx6qdl_icore_qt5_defconfig +1 -0
@@ -9,6 +9,7 @@ BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_13=y # System BR2_TARGET_GENERIC_GETTY_PORT="ttymxc3" +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y # Bootloader BR2_TARGET_UBOOT=y
Signature · 1 line
2.25.3
Fabio Estevam
reviewerPATCH v2 8/12 configs/engicam_imx6qdl_icore_qt5_defconfig: needs udev to select glmark2
Quoted 7 lines · Romain Naour
The
BR2_PACKAGE_GLMARK2is lost while loading the defconfig with:
makeengicam_imx6qdl_icore_qt5_defconfigIn order to select gmark2 package,
BR2_PACKAGE_GLMARK2_FLAVOR_ANYoption must be set.
Quoted 7 lines
Based on the defconfig without X11 and wayland package, the only missing option to select
BR2_PACKAGE_GLMARK2_FLAVOR_ANYisBR2_PACKAGE_HAS_UDEV. The only possible option is to enable one of the udev provider (eudev or systemd). Select eudev package for /dev management.Signed-off-by Romain Naour <[email protected]>Cc Fabio Estevam <[email protected]>
PATCH v2 9/12 configs/olimex_a20_olinuxino_lime{, 2}_defconfig: use a glibc toolchain
In reply to Romain NaourSince 2e71b396a171594d5b913d8b8c11079d376198ed, this defconfig needs a glibc toolchain to select sunxi-mali-mainline package.
--- configs/olimex_a20_olinuxino_lime2_defconfig | 4 ++++ configs/olimex_a20_olinuxino_lime_defconfig | 4 ++++ 2 files changed, 8 insertions(+)
configs/olimex_a20_olinuxino_lime2_defconfig +4 -0
@@ -6,6 +6,10 @@ BR2_ARM_EABIHF=y # Linux headers same as kernel, a 5.4 series BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y +# Toolchain +# glibc is needed for sunxi-mali-mainline-package. +BR2_TOOLCHAIN_BUILDROOT_GLIBC=y + # System configuration BR2_TARGET_GENERIC_HOSTNAME="a20-olinuxino" BR2_TARGET_GENERIC_ISSUE="Welcome to OLinuXino!"
configs/olimex_a20_olinuxino_lime_defconfig +4 -0
@@ -6,6 +6,10 @@ BR2_ARM_EABIHF=y # Linux headers same as kernel, a 5.4 series BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y +# Toolchain +# glibc is needed for sunxi-mali-mainline-package. +BR2_TOOLCHAIN_BUILDROOT_GLIBC=y + # System configuration BR2_TARGET_GENERIC_HOSTNAME="a20-olinuxino" BR2_TARGET_GENERIC_ISSUE="Welcome to OLinuXino!"
Signature · 1 line
2.25.3
PATCH v2 10/12 configs/qemu_ppc_virtex_ml507_defconfig: select BR2_POWERPC_SOFT_FLOAT
In reply to Romain NaourThe BR2_SOFT_FLOAT option is lost while loading the defconfig with:
make qemu_ppc_virtex_ml507_defconfig
On powerpc, BR2_POWERPC_SOFT_FLOAT must be used to enable soft floating point support.
--- configs/qemu_ppc_virtex_ml507_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
configs/qemu_ppc_virtex_ml507_defconfig +1 -1
@@ -14,7 +14,7 @@ BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y # Use soft float -BR2_SOFT_FLOAT=y +BR2_POWERPC_SOFT_FLOAT=y # Kernel BR2_LINUX_KERNEL=y
Signature · 1 line
2.25.3
PATCH v2 11/12 configs/qemu_riscv*: remove BR2_TARGET_OPENSBI_USE_PLAT
In reply to Romain NaourThis option never existed in opensbi package.
This fixes the new defconfig check.
--- configs/qemu_riscv32_virt_defconfig | 1 - configs/qemu_riscv64_virt_defconfig | 1 - 2 files changed, 2 deletions(-)
configs/qemu_riscv32_virt_defconfig +0 -1
@@ -27,7 +27,6 @@ BR2_LINUX_KERNEL_IMAGE=y # Bootloader BR2_TARGET_OPENSBI=y -BR2_TARGET_OPENSBI_USE_PLAT=y BR2_TARGET_OPENSBI_PLAT="qemu/virt" # host-qemu for gitlab testing
configs/qemu_riscv64_virt_defconfig +0 -1
@@ -26,7 +26,6 @@ BR2_LINUX_KERNEL_IMAGE=y # Bootloader BR2_TARGET_OPENSBI=y -BR2_TARGET_OPENSBI_USE_PLAT=y BR2_TARGET_OPENSBI_PLAT="qemu/virt" # host-qemu for gitlab testing
Signature · 1 line
2.25.3
PATCH v2 12/12 gitlab-ci: check all defconfigs on every push
In reply to Romain NaourA defconfig check has been introduced by a previous patch to test each defconfig before the building them. But those builds are done every week or more.
Checking a defconfig can be done on every push to the repository since it take few seconds for each.
This would allow to detect as soon as possible a problem in a defconfig and in particular Kconfig symbols that disapear from the generated .config file.
Although we could have used one job for each defconfig check, we need to limit the number of jobs since gitlab can limit the number of jobs in active pipelines. (500 by default [1]).
So, add a new job called defconfig_check that test all defconfig in one go.
The test curently take 3 minutes 31 seconds to run in a gitlab runner.
Tested:
https://gitlab.com/kubu93/buildroot/-/jobs/520646767
--- .gitlab-ci.yml | 13 +++++++++++++ .gitlab-ci.yml.in | 13 +++++++++++++ 2 files changed, 26 insertions(+)
.gitlab-ci.yml +13 -0
@@ -43,6 +43,19 @@ check-package: script: - make check-package +defconfig_check: + extends: .check_base + script: + - > + failed=0; + for defconfig in $(cd configs; ls *_defconfig); + do + echo "Configure Buildroot for ${defconfig}"; + make ${defconfig} 2>&1 >/dev/null; + ./support/scripts/check-dotconfig.py .config configs/${defconfig} || failed=1; + done; + exit ${failed}; + .defconfig_base: script: - echo "Configure Buildroot for ${DEFCONFIG_NAME}"
.gitlab-ci.yml.in +13 -0
@@ -43,6 +43,19 @@ check-package: script: - make check-package +defconfig_check: + extends: .check_base + script: + - > + failed=0; + for defconfig in $(cd configs; ls *_defconfig); + do + echo "Configure Buildroot for ${defconfig}"; + make ${defconfig} 2>&1 >/dev/null; + ./support/scripts/check-dotconfig.py .config configs/${defconfig} || failed=1; + done; + exit ${failed}; + .defconfig_base: script: - echo "Configure Buildroot for ${DEFCONFIG_NAME}"
Signature · 1 line
2.25.3
PATCH v2 12/12 gitlab-ci: check all defconfigs on every push
Romain, All,
On 2020-04-21 19:26 +0200, Romain Naour spake thusly:
Quoted 7 lines
A defconfig check has been introduced by a previous patch to test each defconfig before the building them. But those builds are done every week or more.
Checking a defconfig can be done on every push to the repository since it take few seconds for each.
Quoted 8 lines
This would allow to detect as soon as possible a problem in a defconfig and in particular
Kconfigsymbols that disapear from the generated .config file.Although we could have used one job for each defconfig check, we need to limit the number of jobs since gitlab can limit the number of jobs in active pipelines. (500 by default [1]).
So, how many jobs do we get at now?
But OK, I see the point.
Quoted 24 lines
So, add a new job called
defconfig_checkthat test all defconfig in one go.The test curently take 3 minutes 31 seconds to run in a gitlab runner.
Tested:
https://gitlab.com/kubu93/buildroot/-/jobs/520646767Signed-off-by Romain Naour <[email protected]>Cc Yann E. MORIN <[email protected]>Cc Thomas Petazzoni <[email protected]>--- .gitlab-ci.yml | 13 +++++++++++++ .gitlab-ci.yml.in | 13 +++++++++++++ 2 files changed, 26 insertions(+).gitlab-ci.yml +0
-0
.gitlab-ci.yml check-package: · line 50
Quoted 8 lines
.gitlab-ci.yml +5
-0@@ -43,6 +43,19 @@ check-package: script: - make check-package +defconfig_check: + extends: .check_base + script: + - > + failed=0;
success=true
No need for the trailing semi-colon.
.gitlab-ci.yml check-package: · line 53
Quoted 3 lines
.gitlab-ci.yml +3
-0+ for defconfig in $(cd configs; ls *_defconfig); + do + echo "Configure Buildroot for ${defconfig}";
No need for the trailing semi-colon.
.gitlab-ci.yml check-package: · line 54
Quoted 1 line
.gitlab-ci.yml +1
-0+ make ${defconfig} 2>&1 >/dev/null;
No need for the trailing semi-colon.
.gitlab-ci.yml check-package: · line 55
Quoted 1 line
.gitlab-ci.yml +1
-0+ ./support/scripts/check-dotconfig.py .config configs/${defconfig} || failed=1;
[...] || success=false
No need for the trailing semi-colon.
.gitlab-ci.yml check-package: · line 56
Quoted 1 line
.gitlab-ci.yml +1
-0+ done;
No need for the trailing semi-colon.
.gitlab-ci.yml check-package: · line 57
Quoted 1 line
.gitlab-ci.yml +1
-0+ exit ${failed};
${succes}
No need for the trailing semi-colon.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v2 1/12 support/scripts: add check-dotconfig.py
In reply to Romain NaourQuoted 14 lines · On Tue, 21 Apr 2020 19:26:35 +0200 Romain Naour <[email protected]> wrote:
For the same reason as for
50b747f212be2c9c0f7cf10c674ed488d042715c, we need to check if the generated configuration file (.config) contains all symbols present in the defconfig file.If not there is an issue with the defconfig.
This script will be used in .gitlab-ci.yml.
Inspired by
is_toolchain_usable()function from genrandconfig:
https://git.busybox.net/buildroot/tree/utils/genrandconfig?h=2020.02#n164Signed-off-by Romain Naour <[email protected]>Cc Thomas Petazzoni <[email protected]>Cc Yann E. MORIN <[email protected]>
Quoted 7 lines
---
v2: update with the improved patch suggested by Yann.http://lists.busybox.net/pipermail/buildroot/2020-April/280679.html --- support/scripts/check-dotconfig.py | 44 ++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 support/scripts/check-dotconfig.py
I have applied patches 3 to 11 in this series. For PATCH 03/11, I fixed up the android-tools selection, as I replied to the patch. All other patches were applied as-is. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com