utils/genrandconfig: add ubi handling

Add a custom case to make sure that a random configuration with an empty
configuration file for ubi doesn't fail.

ubinize: error!: no sections found the ini-file "/home/buildroot/autobuild/instance-2/output-1/build/ubinize.cfg"

Fixes:
 - http://autobuild.buildroot.org/results/f678c17cc4df06fb2737467e769cd8f72a3ea420

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
master
Fabrice Fontaine 2023-02-21 15:45:05 +01:00 committed by Thomas Petazzoni
parent 0a5bb69982
commit 283e6859f1
1 changed files with 6 additions and 0 deletions

View File

@ -526,6 +526,12 @@ def fixup_config(sysinfo, configfile):
configlines.remove('BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT=2048\n')
configlines.append('BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT=41610\n')
if 'BR2_TARGET_ROOTFS_UBI=y\n' in configlines and \
'BR2_TARGET_ROOTFS_UBI_USE_CUSTOM_CONFIG=y\n' in configlines and \
'BR2_TARGET_ROOTFS_UBI_CUSTOM_CONFIG_FILE=""\n' in configlines:
configlines.remove('BR2_TARGET_ROOTFS_UBI_USE_CUSTOM_CONFIG=y\n')
configlines.remove('BR2_TARGET_ROOTFS_UBI_CUSTOM_CONFIG_FILE=""\n')
if 'BR2_TARGET_S500_BOOTLOADER=y\n' in configlines and \
'BR2_TARGET_S500_BOOTLOADER_BOARD=""\n' in configlines:
configlines.remove('BR2_TARGET_S500_BOOTLOADER=y\n')