From patchwork Fri Aug 16 12:06:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 1973230 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WlghZ6jB5z20Bh for ; Fri, 16 Aug 2024 22:06:54 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 6D46A60E3F; Fri, 16 Aug 2024 12:06:52 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id mqO5_yUG4vK8; Fri, 16 Aug 2024 12:06:51 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 3EE166074E Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 3EE166074E; Fri, 16 Aug 2024 12:06:51 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 91CE31BF37E for ; Fri, 16 Aug 2024 12:06:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 7D45A40576 for ; Fri, 16 Aug 2024 12:06:46 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id YCgE1ZvI-Alb for ; Fri, 16 Aug 2024 12:06:45 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2001:4b98:dc4:8::225; helo=relay5-d.mail.gandi.net; envelope-from=thomas.petazzoni@bootlin.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 95B7C40567 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 95B7C40567 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::225]) by smtp2.osuosl.org (Postfix) with ESMTPS id 95B7C40567 for ; Fri, 16 Aug 2024 12:06:43 +0000 (UTC) Received: by mail.gandi.net (Postfix) with ESMTPA id F1FF31C0007; Fri, 16 Aug 2024 12:06:41 +0000 (UTC) To: "Yann E. MORIN" , James Hilliard Date: Fri, 16 Aug 2024 14:06:28 +0200 Message-ID: <20240816120635.606346-2-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240816120635.606346-1-thomas.petazzoni@bootlin.com> References: <20240816120635.606346-1-thomas.petazzoni@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: thomas.petazzoni@bootlin.com X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1723810002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qFlWOzMjWvvaHLKhahuPutkYD8ZbZa3wH2pZSPzzPRA=; b=JVQOlpS1jobdX2X3z6bJB9YoyVLeHXpXfwDPbgozQq8P6BmqiL2tTBoAavPV9yYMdxSc9l fH9Eo/OuHtpB9yPgEq/rqqPiWiLYw4KakCrtKFpFT7K9XloMp5G+3v5Up8D7iwbWOW3e1S /HkE5GJmVJq8SC+BxrgewlGyIlZrqxdQYO12Pgdp9oe1/vlJx8i5MJmXM4kPq4tktiW9xY iNniW3qtxI3JrD3lP4+f3fxhBeokBJqm5QuDN1ZyPaW5TdM6YmskemXcZXa/8rj2jN/Dgy DezxdIA4LNLYEOOLBPJq92+Kom8CGWL2SDgmeDjOxR37k1BSmFZFjf/FNJ75fQ== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=gm1 header.b=JVQOlpS1 Subject: [Buildroot] [PATCH 1/5] utils/genrandconfig: remove fixups related to untested CT-NG toolchains X-BeenThere: buildroot@buildroot.org 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: , X-Patchwork-Original-From: Thomas Petazzoni via buildroot From: Thomas Petazzoni Reply-To: Thomas Petazzoni Cc: Thomas Petazzoni , Buildroot List Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" We have accumulated a whole bunch of very old fixups to avoid issues with super old CT-NG toolchains, which we are not testing anymore, so remove those fixups. Signed-off-by: Thomas Petazzoni --- utils/genrandconfig | 69 --------------------------------------------- 1 file changed, 69 deletions(-) diff --git a/utils/genrandconfig b/utils/genrandconfig index 216e733799..cefc3dca12 100755 --- a/utils/genrandconfig +++ b/utils/genrandconfig @@ -181,43 +181,8 @@ async def fixup_config(sysinfo, configfile): ROOTFS_SIZE = '5G' - BR2_TOOLCHAIN_EXTERNAL_URL = 'BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/' - if "BR2_NEEDS_HOST_JAVA=y\n" in configlines and not await sysinfo.has("java"): return False - # The ctng toolchain is affected by PR58854 - if 'BR2_PACKAGE_LTTNG_TOOLS=y\n' in configlines and \ - BR2_TOOLCHAIN_EXTERNAL_URL + 'armv5-ctng-linux-gnueabi.tar.xz"\n' in configlines: - return False - # The ctng toolchain tigger an assembler error with guile package when compiled with -Os (same issue as for CS ARM 2014.05-29) - if 'BR2_PACKAGE_GUILE=y\n' in configlines and \ - 'BR2_OPTIMIZE_S=y\n' in configlines and \ - BR2_TOOLCHAIN_EXTERNAL_URL + 'armv5-ctng-linux-gnueabi.tar.xz"\n' in configlines: - return False - # The ctng toolchain is affected by PR58854 - if 'BR2_PACKAGE_LTTNG_TOOLS=y\n' in configlines and \ - BR2_TOOLCHAIN_EXTERNAL_URL + 'armv6-ctng-linux-uclibcgnueabi.tar.xz"\n' in configlines: - return False - # The ctng toolchain is affected by PR58854 - if 'BR2_PACKAGE_LTTNG_TOOLS=y\n' in configlines and \ - BR2_TOOLCHAIN_EXTERNAL_URL + 'armv7-ctng-linux-gnueabihf.tar.xz"\n' in configlines: - return False - # The ctng toolchain is affected by PR60155 - if 'BR2_PACKAGE_SDL=y\n' in configlines and \ - BR2_TOOLCHAIN_EXTERNAL_URL + 'powerpc-ctng-linux-uclibc.tar.xz"\n' in configlines: - return False - # The ctng toolchain is affected by PR60155 - if 'BR2_PACKAGE_LIBMPEG2=y\n' in configlines and \ - BR2_TOOLCHAIN_EXTERNAL_URL + 'powerpc-ctng-linux-uclibc.tar.xz"\n' in configlines: - return False - # This MIPS toolchain uses eglibc-2.18 which lacks SYS_getdents64 - if 'BR2_PACKAGE_STRONGSWAN=y\n' in configlines and \ - BR2_TOOLCHAIN_EXTERNAL_URL + 'mips64el-ctng_n64-linux-gnu.tar.xz"\n' in configlines: - return False - # This MIPS toolchain uses eglibc-2.18 which lacks SYS_getdents64 - if 'BR2_PACKAGE_PYTHON3=y\n' in configlines and \ - BR2_TOOLCHAIN_EXTERNAL_URL + 'mips64el-ctng_n64-linux-gnu.tar.xz"\n' in configlines: - return False # libffi not available on ARMv7-M, but propagating libffi arch # dependencies in Buildroot is really too much work, so we handle # this here. @@ -232,40 +197,6 @@ async def fixup_config(sysinfo, configfile): if 'BR2_PACKAGE_SUNXI_BOARDS=y\n' in configlines: configlines.remove('BR2_PACKAGE_SUNXI_BOARDS_FEX_FILE=""\n') configlines.append('BR2_PACKAGE_SUNXI_BOARDS_FEX_FILE="a10/hackberry.fex"\n') - # This MIPS uClibc toolchain fails to build the gdb package - if 'BR2_PACKAGE_GDB=y\n' in configlines and \ - BR2_TOOLCHAIN_EXTERNAL_URL + 'mipsel-ctng-linux-uclibc.tar.xz"\n' in configlines: - return False - # This MIPS uClibc toolchain fails to build the rt-tests package - if 'BR2_PACKAGE_RT_TESTS=y\n' in configlines and \ - BR2_TOOLCHAIN_EXTERNAL_URL + 'mipsel-ctng-linux-uclibc.tar.xz"\n' in configlines: - return False - # This MIPS uClibc toolchain fails to build the civetweb package - if 'BR2_PACKAGE_CIVETWEB=y\n' in configlines and \ - BR2_TOOLCHAIN_EXTERNAL_URL + 'mipsel-ctng-linux-uclibc.tar.xz"\n' in configlines: - return False - # This MIPS ctng toolchain fails to build the python3 package - if 'BR2_PACKAGE_PYTHON3=y\n' in configlines and \ - BR2_TOOLCHAIN_EXTERNAL_URL + 'mips64el-ctng_n64-linux-gnu.tar.xz"\n' in configlines: - return False - # This MIPS uClibc toolchain fails to build the strace package - if 'BR2_PACKAGE_STRACE=y\n' in configlines and \ - BR2_TOOLCHAIN_EXTERNAL_URL + 'mipsel-ctng-linux-uclibc.tar.xz"\n' in configlines: - return False - # This MIPS uClibc toolchain fails to build the cdrkit package - if 'BR2_PACKAGE_CDRKIT=y\n' in configlines and \ - 'BR2_STATIC_LIBS=y\n' in configlines and \ - BR2_TOOLCHAIN_EXTERNAL_URL + 'mipsel-ctng-linux-uclibc.tar.xz"\n' in configlines: - return False - # uClibc vfork static linking issue - if 'BR2_PACKAGE_ALSA_LIB=y\n' in configlines and \ - 'BR2_STATIC_LIBS=y\n' in configlines and \ - BR2_TOOLCHAIN_EXTERNAL_URL + 'i486-ctng-linux-uclibc.tar.xz"\n' in configlines: - return False - # This MIPS uClibc toolchain fails to build the weston package - if 'BR2_PACKAGE_WESTON=y\n' in configlines and \ - BR2_TOOLCHAIN_EXTERNAL_URL + 'mipsel-ctng-linux-uclibc.tar.xz"\n' in configlines: - return False # No C library for internal toolchain if 'BR2_TOOLCHAIN_BUILDROOT_NONE=y\n' in configlines: return False From patchwork Fri Aug 16 12:06:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 1973231 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wlghd4ZdCz20Bh for ; Fri, 16 Aug 2024 22:06:57 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id C409F60E35; Fri, 16 Aug 2024 12:06:55 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id Yn03wYi9dhqP; Fri, 16 Aug 2024 12:06:54 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org C988660752 Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id C988660752; Fri, 16 Aug 2024 12:06:53 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 2440E1BF37E for ; Fri, 16 Aug 2024 12:06:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 1208840567 for ; Fri, 16 Aug 2024 12:06:47 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id w5Trvo_jNT2i for ; Fri, 16 Aug 2024 12:06:46 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=217.70.183.197; helo=relay5-d.mail.gandi.net; envelope-from=thomas.petazzoni@bootlin.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 9405A40129 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 9405A40129 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by smtp2.osuosl.org (Postfix) with ESMTPS id 9405A40129 for ; Fri, 16 Aug 2024 12:06:45 +0000 (UTC) Received: by mail.gandi.net (Postfix) with ESMTPA id 191611C000B; Fri, 16 Aug 2024 12:06:43 +0000 (UTC) To: "Yann E. MORIN" , James Hilliard Date: Fri, 16 Aug 2024 14:06:29 +0200 Message-ID: <20240816120635.606346-3-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240816120635.606346-1-thomas.petazzoni@bootlin.com> References: <20240816120635.606346-1-thomas.petazzoni@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: thomas.petazzoni@bootlin.com X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1723810003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kFUrhiEMqgMzs8vkZxutwRmvT31N9GsvVLxQaMqF4E4=; b=W83Jr8S2aledLk6mC+9fvdMAOW2DTua48IZASZ9w5Uw6lCOa3qsdd2grPM05WlKA4nqKUA nM6cjNv5Py+qlcsxqE1g+0p6ePnV4fP9rZO+9c5u5bXPnnC+dLfcR9mN/VMInGuWeJvBMo kBXwJ9ejJXi0s/6RqueB+U4Zv3F702+zq+r71DG1ijP872QxhIrLB42xus3Ac24z7ocPQ1 cOm4B2I2jmU4Ed02qW1AGKiI3TPglE+YMPx4ma9MjX1vh9D/uHx3QDRXQ8PmQlymvRcpEr Qne9s3tOBRREPDJuHYejPBolg5VrTvixLhGNG9Lc+UsgnRj/4pRpV/OB6aQy0w== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=gm1 header.b=W83Jr8S2 Subject: [Buildroot] [PATCH 2/5] utils/genrandconfig: remove support for toolchain CSV X-BeenThere: buildroot@buildroot.org 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: , X-Patchwork-Original-From: Thomas Petazzoni via buildroot From: Thomas Petazzoni Reply-To: Thomas Petazzoni Cc: Thomas Petazzoni , Buildroot List Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Now that the support for generating a fully random configuration has been well-tested, the whole mechanism based on a toolchain CSV isn't really useful anymore, so let's drop it to simplify the logic. Signed-off-by: Thomas Petazzoni --- utils/genrandconfig | 99 +-------------------------------------------- 1 file changed, 2 insertions(+), 97 deletions(-) diff --git a/utils/genrandconfig b/utils/genrandconfig index cefc3dca12..ee094824fd 100755 --- a/utils/genrandconfig +++ b/utils/genrandconfig @@ -20,7 +20,6 @@ from binascii import hexlify import asyncio -import csv import os from random import randint import sys @@ -100,73 +99,6 @@ class SystemInfo: return not missing_requirements -def get_toolchain_configs(toolchains_csv, buildrootdir): - """Fetch and return the possible toolchain configurations - - This function returns an array of toolchain configurations. Each - toolchain configuration is itself an array of lines of the defconfig. - """ - - with open(toolchains_csv) as r: - # filter empty lines and comments - lines = [t for t in r.readlines() if len(t.strip()) > 0 and t[0] != '#'] - toolchains = lines - configs = [] - - (_, _, _, _, hostarch) = os.uname() - # ~2015 distros report x86 when on a 32bit install - if hostarch == 'i686' or hostarch == 'i386' or hostarch == 'x86': - hostarch = 'x86' - - for row in csv.reader(toolchains): - config = {} - configfile = row[0] - config_hostarch = row[1] - keep = False - - # Keep all toolchain configs that work regardless of the host - # architecture - if config_hostarch == "any": - keep = True - - # Keep all toolchain configs that can work on the current host - # architecture - if hostarch == config_hostarch: - keep = True - - # Assume that x86 32 bits toolchains work on x86_64 build - # machines - if hostarch == 'x86_64' and config_hostarch == "x86": - keep = True - - if not keep: - continue - - if not os.path.isabs(configfile): - configfile = os.path.join(buildrootdir, configfile) - - with open(configfile) as r: - config = r.readlines() - configs.append(config) - return configs - - -async def is_toolchain_usable(configfile, config): - """Check if the toolchain is actually usable.""" - - with open(configfile) as configf: - configlines = configf.readlines() - - # Check that the toolchain configuration is still present - for toolchainline in config: - if toolchainline not in configlines: - print("WARN: toolchain can't be used", file=sys.stderr) - print(" Missing: %s" % toolchainline.strip(), file=sys.stderr) - return False - - return True - - async def fixup_config(sysinfo, configfile): """Finalize the configuration and reject any problematic combinations @@ -581,24 +513,11 @@ async def fixup_config(sysinfo, configfile): async def gen_config(args): """Generate a new random configuration - - This function generates the configuration, by choosing a random - toolchain configuration and then generating a random selection of - packages. """ sysinfo = SystemInfo() - if args.toolchains_csv: - # Select a random toolchain configuration - configs = get_toolchain_configs(args.toolchains_csv, args.buildrootdir) - - i = randint(0, len(configs) - 1) - toolchainconfig = configs[i] - else: - toolchainconfig = [] - - configlines = list(toolchainconfig) + configlines = list() # Combine with the minimal configuration minimalconfigfile = os.path.join(args.buildrootdir, @@ -658,9 +577,6 @@ async def gen_config(args): if ret: return ret - if not await is_toolchain_usable(configfile, toolchainconfig): - return 2 - # Now, generate the random selection of packages, and fixup # things if needed. # Safe-guard, in case we can not quickly come to a valid @@ -676,7 +592,7 @@ async def gen_config(args): "make", "O=%s" % args.outputdir, "-C", args.buildrootdir, "KCONFIG_SEED=0x%s" % hexlify(os.urandom(4)).decode("ascii").upper(), "KCONFIG_PROBABILITY=%d" % randint(1, 20), - "randpackageconfig" if args.toolchains_csv else "randconfig") + "randconfig") ret = await proc.wait() if ret: return ret @@ -711,17 +627,6 @@ if __name__ == '__main__': help="Buildroot directory (relative to current directory)", type=str, default='.') - toolchains_csv = parser.add_mutually_exclusive_group(required=False) - toolchains_csv.add_argument("--toolchains-csv", - dest="toolchains_csv", - help="Path of the toolchain configuration file", - type=str) - toolchains_csv.add_argument("--no-toolchains-csv", - dest="toolchains_csv", - help="Generate random toolchain configuration", - action='store_false') - parser.set_defaults(toolchains_csv="support/config-fragments/autobuild/toolchain-configs.csv") - args = parser.parse_args() # We need the absolute path to use with O=, because the relative From patchwork Fri Aug 16 12:06:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 1973232 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wlghk2Zbrz20Bh for ; Fri, 16 Aug 2024 22:07:02 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 74CE660E24; Fri, 16 Aug 2024 12:07:00 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id eoJnJiS0W8uK; Fri, 16 Aug 2024 12:06:58 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 588CE60E3B Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 588CE60E3B; Fri, 16 Aug 2024 12:06:57 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 069F81BF37E for ; Fri, 16 Aug 2024 12:06:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id E71B88415E for ; Fri, 16 Aug 2024 12:06:47 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 5WJ9Lk1KA577 for ; Fri, 16 Aug 2024 12:06:47 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2001:4b98:dc4:8::225; helo=relay5-d.mail.gandi.net; envelope-from=thomas.petazzoni@bootlin.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org C8F0484144 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org C8F0484144 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::225]) by smtp1.osuosl.org (Postfix) with ESMTPS id C8F0484144 for ; Fri, 16 Aug 2024 12:06:46 +0000 (UTC) Received: by mail.gandi.net (Postfix) with ESMTPA id 63B2E1C0005; Fri, 16 Aug 2024 12:06:44 +0000 (UTC) To: "Yann E. MORIN" , James Hilliard Date: Fri, 16 Aug 2024 14:06:30 +0200 Message-ID: <20240816120635.606346-4-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240816120635.606346-1-thomas.petazzoni@bootlin.com> References: <20240816120635.606346-1-thomas.petazzoni@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: thomas.petazzoni@bootlin.com X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1723810005; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=V7n3wcXD0g+ABV6Rr0m/xCGvs5lkHVDzuk3oYvuv9vY=; b=HG/v+sINSkC3AZXw1oamwCqV+lvALvErhBhcUCM3XclAJTVgK3ot2PdlYD5mtjsN4KBpXN doM3TA637YpfI4gfngCagxxaNzghyk4/VYfSe8Xur4JgwZ1xs3M5u4EEbvIjQorkNt8mKN iR46Z3URFiZNfBU5MafXFidf/KsmCEe06jYPxZHAzkJeVZdexAePYzY0VoRkmvDR7wPXSN 4S6eVN+p3oUTJctCyYgPF1qI1g7Dg+uNObbw+FDxpn5NpULaNlJiC0qdf5LnEix0bsq11q hVFW3EAYNjPIOT0l6YWHyzv9W2BD614W0yp8nTE/BpQ3AMsNNG9/3pMV79NRpg== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=gm1 header.b=HG/v+sIN Subject: [Buildroot] [PATCH 3/5] utils/genrandconfig: rework fine-tuning logic X-BeenThere: buildroot@buildroot.org 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: , X-Patchwork-Original-From: Thomas Petazzoni via buildroot From: Thomas Petazzoni Reply-To: Thomas Petazzoni Cc: Thomas Petazzoni , Buildroot List Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Before calling randpackageconfig/randconfig, we were pre-generating a snippet of .config with: (1) minimal.config (2) BR2_CURL/BR2_WGET settings (3) some random selection of init system, debug, runtime debug, etc (4) enabling BR2_REPRODUCIBLE=y when diffoscope was found Now that we only use randconfig, this whole fine-tuning is completely irrelevant, as it gets overridden by "make randconfig". (1) and (3) above are useless, as randconfig does all the randomization that is needed. However, we want to preserve (2) and (4) above, so we re-implement those fixups, but *after* randconfig has done its job. Signed-off-by: Thomas Petazzoni --- utils/genrandconfig | 71 ++++++++++++--------------------------------- 1 file changed, 18 insertions(+), 53 deletions(-) diff --git a/utils/genrandconfig b/utils/genrandconfig index ee094824fd..7dc50682c9 100755 --- a/utils/genrandconfig +++ b/utils/genrandconfig @@ -517,65 +517,15 @@ async def gen_config(args): sysinfo = SystemInfo() - configlines = list() - - # Combine with the minimal configuration - minimalconfigfile = os.path.join(args.buildrootdir, - 'support/config-fragments/minimal.config') - with open(minimalconfigfile) as minimalf: - configlines += minimalf.readlines() - - # Allow hosts with old certificates to download over https - configlines.append("BR2_WGET=\"wget -nd -t 3 --no-check-certificate\"\n") - configlines.append("BR2_CURL=\"curl --ftp-pasv --retry 3 --insecure\"\n") - - # Per-package folder - if randint(0, 15) == 0: - configlines.append("BR2_PER_PACKAGE_DIRECTORIES=y\n") - - # Amend the configuration with a few things. - if randint(0, 20) == 0: - configlines.append("BR2_ENABLE_DEBUG=y\n") - if randint(0, 20) == 0: - configlines.append("BR2_ENABLE_RUNTIME_DEBUG=y\n") - if randint(0, 1) == 0: - configlines.append("BR2_INIT_BUSYBOX=y\n") - elif randint(0, 15) == 0: - configlines.append("BR2_INIT_SYSTEMD=y\n") - elif randint(0, 10) == 0: - configlines.append("BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y\n") - if randint(0, 20) == 0: - configlines.append("BR2_STATIC_LIBS=y\n") - if randint(0, 20) == 0: - configlines.append("BR2_PACKAGE_PYTHON3_PY_ONLY=y\n") - if randint(0, 5) == 0: - configlines.append("BR2_OPTIMIZE_2=y\n") - if randint(0, 4) == 0: - configlines.append("BR2_SYSTEM_ENABLE_NLS=y\n") - if randint(0, 4) == 0: - configlines.append("BR2_FORTIFY_SOURCE_2=y\n") - - # Randomly enable BR2_REPRODUCIBLE 10% of times - # also enable tar filesystem images for testing - if await sysinfo.has("diffoscope") and randint(0, 10) == 0: - configlines.append("BR2_REPRODUCIBLE=y\n") - configlines.append("BR2_TARGET_ROOTFS_TAR=y\n") - - # Write out the configuration file + # Create output directory if not os.path.exists(args.outputdir): os.makedirs(args.outputdir) + + # Calculate path to config file if args.outputdir == os.path.abspath(os.path.join(args.buildrootdir, "output")): configfile = os.path.join(args.buildrootdir, ".config") else: configfile = os.path.join(args.outputdir, ".config") - with open(configfile, "w+") as configf: - configf.writelines(configlines) - - proc = await asyncio.create_subprocess_exec( - "make", "O=%s" % args.outputdir, "-C", args.buildrootdir, "olddefconfig") - ret = await proc.wait() - if ret: - return ret # Now, generate the random selection of packages, and fixup # things if needed. @@ -600,6 +550,21 @@ async def gen_config(args): if await fixup_config(sysinfo, configfile): break + configlines = list() + + # Allow hosts with old certificates to download over https + configlines.append("BR2_WGET=\"wget -nd -t 3 --no-check-certificate\"\n") + configlines.append("BR2_CURL=\"curl --ftp-pasv --retry 3 --insecure\"\n") + + # Randomly enable BR2_REPRODUCIBLE 10% of times + # also enable tar filesystem images for testing + if await sysinfo.has("diffoscope") and randint(0, 10) == 0: + configlines.append("BR2_REPRODUCIBLE=y\n") + configlines.append("BR2_TARGET_ROOTFS_TAR=y\n") + + with open(configfile, "w+") as configf: + configf.writelines(configlines) + proc = await asyncio.create_subprocess_exec( "make", "O=%s" % args.outputdir, "-C", args.buildrootdir, "olddefconfig") ret = await proc.wait() From patchwork Fri Aug 16 12:06:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 1973233 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wlghm6c9pz20Bh for ; Fri, 16 Aug 2024 22:07:04 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 2ED8560DCB; Fri, 16 Aug 2024 12:07:03 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id Li4a_B64pDN3; Fri, 16 Aug 2024 12:07:02 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 97DE860752 Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 97DE860752; Fri, 16 Aug 2024 12:07:01 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id E6F4E1BF37E for ; Fri, 16 Aug 2024 12:06:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id DE78B4032C for ; Fri, 16 Aug 2024 12:06:48 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 8zY97VmWWCZq for ; Fri, 16 Aug 2024 12:06:48 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=217.70.183.197; helo=relay5-d.mail.gandi.net; envelope-from=thomas.petazzoni@bootlin.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org C84604026A DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org C84604026A Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by smtp4.osuosl.org (Postfix) with ESMTPS id C84604026A for ; Fri, 16 Aug 2024 12:06:47 +0000 (UTC) Received: by mail.gandi.net (Postfix) with ESMTPA id B61991C0007; Fri, 16 Aug 2024 12:06:45 +0000 (UTC) To: "Yann E. MORIN" , James Hilliard Date: Fri, 16 Aug 2024 14:06:31 +0200 Message-ID: <20240816120635.606346-5-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240816120635.606346-1-thomas.petazzoni@bootlin.com> References: <20240816120635.606346-1-thomas.petazzoni@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: thomas.petazzoni@bootlin.com X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1723810006; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hSjJGpJK5FMfAf612kjtkiE6mj58/mwurVMYMNb5+Yk=; b=hUagxGNCS37qca3XwpIDcZdnRLbRNTXFH5wJgFu+rtRgzwKkN6WbmSZNHxogR0aLuF+qoV VAvJ5BmhjfpavzZN09I6mYg1u0zwNEmHXBYCAii8wDqlNwS5vRG7QdSLPnnD3bp6WZQ3nN +d/AFQNjuIX65SumQUyLjmAqu/qEHJEXTgNiETuN0TvJPcw5/hvzFpoC//cIt8koTMz+8b AQruQKLHPambrix0oZ2+eu+ozl6ujO/bEl8SQnX8qJmq5nx4f1Ck48vkM/CTRXiSKJxkL9 WUzNxJGcX+WG9SOwc5Ehbrtxc5A1npXYiNr66c1KGRwPSuGy1P6yZ4h73Y1+yg== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=gm1 header.b=hUagxGNC Subject: [Buildroot] [PATCH 4/5] utils/genrandconfig: do not use BR2_BACKUP_SITE for some builds X-BeenThere: buildroot@buildroot.org 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: , X-Patchwork-Original-From: Thomas Petazzoni via buildroot From: Thomas Petazzoni Reply-To: Thomas Petazzoni Cc: Thomas Petazzoni , Buildroot List Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" In order to test that upstream sites are still working, we need to NOT fallback to sources.buildroot.net for some builds. As there is anyway a local cache in the autobuilder instances, we need to do quite a lot of builds without any BR2_BACKUP_SITE configured to have a chance to catch issues, which is why a 50% chance is used to unset BR2_BACKUP_SITE. Signed-off-by: Thomas Petazzoni --- utils/genrandconfig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/utils/genrandconfig b/utils/genrandconfig index 7dc50682c9..7118807e9b 100755 --- a/utils/genrandconfig +++ b/utils/genrandconfig @@ -562,6 +562,11 @@ async def gen_config(args): configlines.append("BR2_REPRODUCIBLE=y\n") configlines.append("BR2_TARGET_ROOTFS_TAR=y\n") + # From time to time, ignore sources.buildroot.net to really fetch + # from upstream + if randint(0, 1) == 0: + configlines.append("""BR2_BACKUP_SITE=""\n""") + with open(configfile, "w+") as configf: configf.writelines(configlines) From patchwork Fri Aug 16 12:06:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 1973234 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wlghr2D8hz20Bh for ; Fri, 16 Aug 2024 22:07:08 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id C705660E4E; Fri, 16 Aug 2024 12:07:06 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 7ifE-gQtzVT2; Fri, 16 Aug 2024 12:07:05 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 7975960ED0 Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 7975960ED0; Fri, 16 Aug 2024 12:07:05 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 0E8CB1BF37E for ; Fri, 16 Aug 2024 12:06:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id EFC6C4026A for ; Fri, 16 Aug 2024 12:06:49 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id m-XraT0uRpTb for ; Fri, 16 Aug 2024 12:06:48 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=217.70.183.197; helo=relay5-d.mail.gandi.net; envelope-from=thomas.petazzoni@bootlin.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 48FA540296 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 48FA540296 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by smtp4.osuosl.org (Postfix) with ESMTPS id 48FA540296 for ; Fri, 16 Aug 2024 12:06:48 +0000 (UTC) Received: by mail.gandi.net (Postfix) with ESMTPA id 948EF1C0009; Fri, 16 Aug 2024 12:06:46 +0000 (UTC) To: "Yann E. MORIN" , James Hilliard Date: Fri, 16 Aug 2024 14:06:32 +0200 Message-ID: <20240816120635.606346-6-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240816120635.606346-1-thomas.petazzoni@bootlin.com> References: <20240816120635.606346-1-thomas.petazzoni@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: thomas.petazzoni@bootlin.com X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1723810006; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KTBIVRc8JTiLMES8OyO1V4+Fn4nv2qFbwNMN3v4rR1o=; b=GMQjLYa25BFF0ccgrvjZ8wHI0KzqAKLSilwj4GfNT35/MB0AZbihZY5PmBwUwGWwB/0Hfa hBr4acfZijHIRC9Yrj5MOBJLtSIK//kCsQlBQJF8FfcAF5DMrPe6j8K3lcG59aM65qbyex T2ENNR/bDy0aQZD+aFduZZe3yetXzybI+Z3MRjjRMjnkOUsWJisAeX+GLmcaPK2TsjtBE5 4ntTg/LU1eE5UoWoDUiWb+Cdj0NPBG8Z0bNBmbZxi2s8NxJsidtr0rdSoPk9awvQ2pt7f3 RnRrFq+qEgzHvMABp9PSi5rgbIekgfcz6jsdG+yswcxi3m9LwBEtNHQM5Bf0hA== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=gm1 header.b=GMQjLYa2 Subject: [Buildroot] [PATCH 5/5] utils/genrandconfig: improve logging X-BeenThere: buildroot@buildroot.org 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: , X-Patchwork-Original-From: Thomas Petazzoni via buildroot From: Thomas Petazzoni Reply-To: Thomas Petazzoni Cc: Thomas Petazzoni , Buildroot List Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Right now, genrandconfig just spits out the random messages from the different make invocations, which isn't terribly useful. Instead, let's redirect the output of make invocations to oblivion, and add some more high level logging. As part of this logging, we're interested to see how many iterations were needed to find a valid configuration, so changed the loop logic to count from 0 to 100 instead of from 100 to 0 so that we can easily show the iteration number. Signed-off-by: Thomas Petazzoni --- utils/genrandconfig | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/utils/genrandconfig b/utils/genrandconfig index 7118807e9b..36a0381b64 100755 --- a/utils/genrandconfig +++ b/utils/genrandconfig @@ -531,23 +531,27 @@ async def gen_config(args): # things if needed. # Safe-guard, in case we can not quickly come to a valid # configuration: allow at most 100 (arbitrary) iterations. - bounded_loop = 100 + loop = 0 while True: - if bounded_loop == 0: + if loop == 100: print("ERROR: cannot generate random configuration after 100 iterations", file=sys.stderr) return 1 - bounded_loop -= 1 + print("Generating configuration, loop %d" % loop) + loop += 1 proc = await asyncio.create_subprocess_exec( "make", "O=%s" % args.outputdir, "-C", args.buildrootdir, "KCONFIG_SEED=0x%s" % hexlify(os.urandom(4)).decode("ascii").upper(), "KCONFIG_PROBABILITY=%d" % randint(1, 20), - "randconfig") + "randconfig", + stdout=asyncio.subprocess.DEVNULL, + stderr=asyncio.subprocess.DEVNULL) ret = await proc.wait() if ret: return ret if await fixup_config(sysinfo, configfile): + print(" configuration valid") break configlines = list() @@ -570,20 +574,30 @@ async def gen_config(args): with open(configfile, "w+") as configf: configf.writelines(configlines) + print(" olddefconfig") proc = await asyncio.create_subprocess_exec( - "make", "O=%s" % args.outputdir, "-C", args.buildrootdir, "olddefconfig") + "make", "O=%s" % args.outputdir, "-C", args.buildrootdir, "olddefconfig", + stdout=asyncio.subprocess.DEVNULL, + stderr=asyncio.subprocess.DEVNULL) ret = await proc.wait() if ret: return ret + print(" savedefconfig") proc = await asyncio.create_subprocess_exec( - "make", "O=%s" % args.outputdir, "-C", args.buildrootdir, "savedefconfig") + "make", "O=%s" % args.outputdir, "-C", args.buildrootdir, "savedefconfig", + stdout=asyncio.subprocess.DEVNULL, + stderr=asyncio.subprocess.DEVNULL) + ret = await proc.wait() if ret: return ret + print(" dependencies") proc = await asyncio.create_subprocess_exec( - "make", "O=%s" % args.outputdir, "-C", args.buildrootdir, "dependencies") + "make", "O=%s" % args.outputdir, "-C", args.buildrootdir, "dependencies", + stdout=asyncio.subprocess.DEVNULL, + stderr=asyncio.subprocess.DEVNULL) return await proc.wait()