From patchwork Thu Sep 24 19:29:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Weber X-Patchwork-Id: 1370843 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=rockwellcollins.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=rockwellcollins.com header.i=@rockwellcollins.com header.a=rsa-sha256 header.s=hrcrc2020 header.b=UX8rnoXU; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4By4qV5gx9z9sSn for ; Fri, 25 Sep 2020 05:29:26 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 22A7686BB0; Thu, 24 Sep 2020 19:29:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id F4mD3QxBkmiI; Thu, 24 Sep 2020 19:29:23 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id ED00386B5C; Thu, 24 Sep 2020 19:29:22 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id CB8181BF3C6 for ; Thu, 24 Sep 2020 19:29:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id C8A298739B for ; Thu, 24 Sep 2020 19:29:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id f28HUAONK4XV for ; Thu, 24 Sep 2020 19:29:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from secvs05.rockwellcollins.com (secvs05.rockwellcollins.com [205.175.225.131]) by hemlock.osuosl.org (Postfix) with ESMTPS id 2EA0B873C2 for ; Thu, 24 Sep 2020 19:29:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rockwellcollins.com; s=hrcrc2020; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=07gi1yGbFGGs5PB332J2JzSHddM43I9K2JoNYbGfAJE=; b=UX8rnoXUmvN2GstNf63p5ZZrQr9KUB8754mG1BKbiO+fgiPuqaZ1Z5R2 pvDJdz5lTCqTS+bxilX7cjnXeS43vQBdjfWy/Aacrs67ap+nXxYo9Jngj FghAbQvZqEx2VEI59mhMEY1YJ3wGmMg3xEmv+c9tF7UERM41bUJmUUabu bm9LqF6dLs4xYfDjzJ826WDolVCnLfot65SYwGzQjlgGk9R0LsNC5VWvC QQbUL6r5kQ0zvxvGFGRUyFLMmqnToXXJyPjbTh21tXfqP6xaQKhtjYO8E J21DbfG0BIT8wHK+4GH2GUSLD3gEQ6gz7XWrlIBRC14gy2EEwwjTEPOPU w==; IronPort-SDR: PP+YflP13f8/T4hHi5eCFIxWnvp6eUCu/X04TteC1RyUSPNqTYSRqu5yMZXy7HOCu07sp2wdsx TkDciYyofF6C1wv9y8Zh3XxYiS8ZSkDrxNXNNA5BP8WMqYEToukQTF9xorXFu57w4ihI6uqUfg gDU/WxD6GvrZhxt0dUqSBBkVS9c2+SoV6FA/kwXxFTPMsvSMsisAR7wMt/75AonvFX2vloDptf Wpxjf/D/7CqcJ5PRtN1PgjvXGPhFOS22rw0w7AxGuw7eRR40nrgfrpQfb2SNqCWUyhnpNtuouf JBI= Received: from ofwgwc03.rockwellcollins.com (HELO ciulimr01.rockwellcollins.com) ([205.175.225.12]) by secvs05.rockwellcollins.com with ESMTP; 24 Sep 2020 14:29:14 -0500 X-Received: from biscuits.rockwellcollins.com (biscuits.rockwellcollins.lab [10.148.119.137]) by ciulimr01.rockwellcollins.com (Postfix) with ESMTP id 38FB060349; Thu, 24 Sep 2020 14:29:14 -0500 (CDT) From: Matt Weber To: buildroot@buildroot.org Date: Thu, 24 Sep 2020 14:29:12 -0500 Message-Id: <20200924192912.51913-4-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200924192912.51913-1-matthew.weber@rockwellcollins.com> References: <20200924192912.51913-1-matthew.weber@rockwellcollins.com> Subject: [Buildroot] [PATCH v2 3/3] genrandconfig: uboot-tools env/scr creation test files X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Matt Weber MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Normally the kconfig stings would end up empty and cause a build error. This patch provides test files to allow testing the creation of uboot environment and script bin files from user provided txt files. Cc: Arnout Vandecappelle Signed-off-by: Matthew Weber --- utils/genrandconfig | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/utils/genrandconfig b/utils/genrandconfig index 63ff32cbfb..93dc6d898b 100755 --- a/utils/genrandconfig +++ b/utils/genrandconfig @@ -301,6 +301,22 @@ 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: + bootenv = os.path.join(args.outputdir, "boot_env.txt") + with open(bootenv, "w+") as bootenvf: + bootenvf.write("prop=value") + configlines.remove('BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SOURCE=""\n') + configlines.append('BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SOURCE="%s"\n' % bootenv) + 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: + bootscr = os.path.join(args.outputdir, "boot_script.txt") + with open(bootscr, "w+") as bootscrf: + bootscrf.write("prop=value") + configlines.remove('BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE=""\n') + configlines.append('BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="%s"\n' % bootscr) + with open(configfile, "w+") as configf: configf.writelines(configlines)