utils/genrandconfig: add opensbi custom handling
Add custom cases to make sure that a random configuration with an empty git, tarball location or version for opensbi doesn't fail. It reverts to BR2_TARGET_OPENSBI_LATEST_VERSION in that case. Fixes: - http://autobuild.buildroot.org/results/b31882b1a7119b2b590cc6dfed44fe515a63a6b8 - http://autobuild.buildroot.org/results/61866e8941741c9746dcb2c60b6db3b0e5b9a47b Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
parent
b826fba77c
commit
2d3d130bc1
@ -535,6 +535,27 @@ def fixup_config(sysinfo, configfile):
|
||||
if 'BR2_ARCH_HAS_NO_TOOLCHAIN_BUILDROOT=y\n' in configlines:
|
||||
return False
|
||||
|
||||
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:
|
||||
configlines.remove('BR2_TARGET_OPENSBI_CUSTOM_GIT=y\n')
|
||||
configlines.append('BR2_TARGET_OPENSBI_LATEST_VERSION=y\n')
|
||||
configlines.remove('BR2_TARGET_OPENSBI_CUSTOM_REPO_URL=""\n')
|
||||
|
||||
if 'BR2_TARGET_OPENSBI=y\n' in configlines and \
|
||||
'BR2_TARGET_OPENSBI_CUSTOM_TARBALL=y\n' in configlines and \
|
||||
'BR2_TARGET_OPENSBI_CUSTOM_TARBALL_LOCATION=""\n' in configlines:
|
||||
configlines.remove('BR2_TARGET_OPENSBI_CUSTOM_TARBALL=y\n')
|
||||
configlines.append('BR2_TARGET_OPENSBI_LATEST_VERSION=y\n')
|
||||
configlines.remove('BR2_TARGET_OPENSBI_CUSTOM_TARBALL_LOCATION=""\n')
|
||||
|
||||
if 'BR2_TARGET_OPENSBI=y\n' in configlines and \
|
||||
'BR2_TARGET_OPENSBI_CUSTOM_VERSION=y\n' in configlines and \
|
||||
'BR2_TARGET_OPENSBI_CUSTOM_VERSION_VALUE=""\n' in configlines:
|
||||
configlines.remove('BR2_TARGET_OPENSBI_CUSTOM_VERSION=y\n')
|
||||
configlines.append('BR2_TARGET_OPENSBI_LATEST_VERSION=y\n')
|
||||
configlines.remove('BR2_TARGET_OPENSBI_CUSTOM_VERSION_VALUE=""\n')
|
||||
|
||||
if 'BR2_PACKAGE_REFPOLICY=y\n' in configlines and \
|
||||
'BR2_PACKAGE_REFPOLICY_CUSTOM_GIT=y\n' in configlines and \
|
||||
'BR2_PACKAGE_REFPOLICY_CUSTOM_REPO_URL=""\n' in configlines:
|
||||
|
Loading…
Reference in New Issue
Block a user