[Buildroot] [PATCH 1/1] utils/genrandconfig: only fixup host uboot tools source when empty

Arnout Vandecappelle arnout at mind.be
Tue May 3 20:28:02 UTC 2022



On 03/05/2022 03:50, James Hilliard wrote:
> If the kconfig values being replaced are not empty we should not
> try to fix them.
> 
> Signed-off-by: James Hilliard <james.hilliard1 at gmail.com>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
>   utils/genrandconfig | 7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/utils/genrandconfig b/utils/genrandconfig
> index 70af84f002..cdd781c6c2 100755
> --- a/utils/genrandconfig
> +++ b/utils/genrandconfig
> @@ -298,7 +298,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")
> @@ -307,7 +309,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")



More information about the buildroot mailing list