[Buildroot] [git commit] utils/genrandconfig: add opensbi custom handling
Thomas Petazzoni
thomas.petazzoni at bootlin.com
Sat Aug 20 09:31:56 UTC 2022
commit: https://git.buildroot.net/buildroot/commit/?id=2d3d130bc129cc36b88ff82c4a87e53a77874a50
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
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 at gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
---
utils/genrandconfig | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/utils/genrandconfig b/utils/genrandconfig
index b8ca628724..c6b3123feb 100755
--- a/utils/genrandconfig
+++ b/utils/genrandconfig
@@ -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:
More information about the buildroot
mailing list