From 485aa2d6914c0ddb91d832c349c29e2037aa2a34 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Thu, 25 Aug 2022 00:14:24 +0200 Subject: [PATCH] utils/genrandconfig: add mxs-bootlets custom handling Add custom cases to make sure that a random configuration with an empty git or tarball location for mxs-bootlets doesn't fail. It reverts to BR2_TARGET_MXS_BOOTLETS_FREESCALE in that case. Fixes: - http://autobuild.buildroot.org/results/dcbeb73d152c79c18b1fa3bef3b4fa07635d7b36 - http://autobuild.buildroot.org/results/f61cf3fc58db9ded5ec42ebf4a9847584700698d Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle --- utils/genrandconfig | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/utils/genrandconfig b/utils/genrandconfig index 54146a99de..7fd17239c5 100755 --- a/utils/genrandconfig +++ b/utils/genrandconfig @@ -543,6 +543,20 @@ def fixup_config(sysinfo, configfile): if 'BR2_ARCH_HAS_NO_TOOLCHAIN_BUILDROOT=y\n' in configlines: return False + if 'BR2_TARGET_MXS_BOOTLETS=y\n' in configlines and \ + 'BR2_TARGET_MXS_BOOTLETS_CUSTOM_GIT=y\n' in configlines and \ + 'BR2_TARGET_MXS_BOOTLETS_CUSTOM_GIT_URL=""\n' in configlines: + configlines.remove('BR2_TARGET_MXS_BOOTLETS_CUSTOM_GIT=y\n') + configlines.append('BR2_TARGET_MXS_BOOTLETS_FREESCALE=y\n') + configlines.remove('BR2_TARGET_MXS_BOOTLETS_CUSTOM_GIT_URL=""\n') + + if 'BR2_TARGET_MXS_BOOTLETS=y\n' in configlines and \ + 'BR2_TARGET_MXS_BOOTLETS_CUSTOM_TARBALL=y\n' in configlines and \ + 'BR2_TARGET_MXS_BOOTLETS_CUSTOM_TARBALL_URL=""\n' in configlines: + configlines.remove('BR2_TARGET_MXS_BOOTLETS_CUSTOM_TARBALL=y\n') + configlines.append('BR2_TARGET_MXS_BOOTLETS_FREESCALE=y\n') + configlines.remove('BR2_TARGET_MXS_BOOTLETS_CUSTOM_TARBALL_URL=""\n') + if 'BR2_TARGET_OPENSBI=y\n' in configlines and \ 'BR2_TARGET_OPENSBI_CUSTOM_GIT=y\n' in configlines and \ 'BR2_TARGET_OPENSBI_CUSTOM_REPO_URL=""\n' in configlines: