From 57926b025bcdb477d69ee9c1474e6867f0e0a3b5 Mon Sep 17 00:00:00 2001 From: James Hilliard Date: Mon, 2 May 2022 19:50:39 -0600 Subject: [PATCH] utils/genrandconfig: only fixup host uboot tools source when empty If the kconfig values being replaced are not empty we should not try to fix them. Signed-off-by: James Hilliard Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- utils/genrandconfig | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/utils/genrandconfig b/utils/genrandconfig index 8ed2783a6d..89ad53ca4c 100755 --- a/utils/genrandconfig +++ b/utils/genrandconfig @@ -299,7 +299,9 @@ def fixup_config(sysinfo, configfile): 'BR2_PACKAGE_FLANN=y\n' in configlines: return False - if 'BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE=y\n' in configlines: + if 'BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE=y\n' in configlines and \ + 'BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SOURCE=""\n' in configlines and \ + 'BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SIZE=""\n' in configlines: bootenv = os.path.join(args.outputdir, "boot_env.txt") with open(bootenv, "w+") as bootenvf: bootenvf.write("prop=value") @@ -308,7 +310,8 @@ def fixup_config(sysinfo, configfile): configlines.remove('BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SIZE=""\n') configlines.append('BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SIZE="0x1000"\n') - if 'BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y\n' in configlines: + if 'BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y\n' in configlines and \ + 'BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE=""\n' in configlines: bootscr = os.path.join(args.outputdir, "boot_script.txt") with open(bootscr, "w+") as bootscrf: bootscrf.write("prop=value")