From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8CA57C433F5 for ; Fri, 17 Dec 2021 23:02:56 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E5DB0837C5; Sat, 18 Dec 2021 00:02:27 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=boundarydevices.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=boundarydevices.com header.i=@boundarydevices.com header.b="aoo1CQOz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5EE198370D; Sat, 18 Dec 2021 00:02:16 +0100 (CET) Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E608683781 for ; Sat, 18 Dec 2021 00:02:07 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=boundarydevices.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=troy.kisky@boundarydevices.com Received: by mail-pj1-x1035.google.com with SMTP id b1-20020a17090a990100b001b14bd47532so3704847pjp.0 for ; Fri, 17 Dec 2021 15:02:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=boundarydevices.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rWfBmcxyLK94FkU25CtB9dUjymhUBA0txDbs+T0jN1c=; b=aoo1CQOzkzm/xex4vNpqboVvbWzg6wS/Q30R08+hBqt6bA/0c5Knx38lOc8gHo0ISe u/UKtlJSJHLXt89URsU0xFKujROJ8Jtr7ekJyeKMOQhSehgRheqJ1fd08Sg5e9RDwkAL 6a2eOVZR74WI6Pe2Po2gh6rKaPR5ZOJ36mL1Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rWfBmcxyLK94FkU25CtB9dUjymhUBA0txDbs+T0jN1c=; b=6itcjfujxJQvcvoRn2XSCTTfOU8lo9MmJskKnp+/4I/4L8JCmQiaTHtX6EdUvUQH/l WLTSUaYrivDAHWT/n2PQZkYuOE11W2oCLLC7UJQVbjOL13XQIKbjq5/Bqg41hdVPvncY HS7O/+LDywIdUwfm6u9IHLCrs9ogjSO9YOBmE0CPBY6zJyltA7hMF3GYRQRIpfnLmGM4 I7TLC9U9faMw015wTPMBgdBINElBECvJPQ9Zt3FHkFE5Y2qob2M53vrYiHU0ZeT5bdcc HEoeoMJnP0T73kg+m0tkWwIOcKZEe1EsQfaDaQrpGjnlj0cubxQoN6NJL10mtEXxaAmh jwmw== X-Gm-Message-State: AOAM531amRXSbUgHE2tnwHSwCyy91CxaP9LxZ5OlK642uhkQwKUz/9TY opJyj4Au8x6O0KBMYiG8SHeVzA== X-Google-Smtp-Source: ABdhPJz1XWxQr+Zo+ewvqryQTIRJWXli5yxaUYa2yCncGFEhUibNTPyunbYzKewFI4DQNDZIOWaBfg== X-Received: by 2002:a17:902:b18d:b0:148:dcd8:79e with SMTP id s13-20020a170902b18d00b00148dcd8079emr4743185plr.74.1639782126346; Fri, 17 Dec 2021 15:02:06 -0800 (PST) Received: from OS2.boundarydevices.com. (wsip-72-200-236-186.oc.oc.cox.net. [72.200.236.186]) by smtp.googlemail.com with ESMTPSA id f7sm11130388pfj.41.2021.12.17.15.02.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Dec 2021 15:02:05 -0800 (PST) From: Troy Kisky To: sjg@chromium.org, trini@konsulko.com Cc: fabio.estevam@nxp.com, u-boot@lists.denx.de, Troy Kisky Subject: [PATCH v1 4/5] genboardcfg: allow defconfigs in board directory Date: Fri, 17 Dec 2021 15:01:30 -0800 Message-Id: <20211217230131.2715940-5-troy.kisky@boundarydevices.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211217230131.2715940-1-troy.kisky@boundarydevices.com> References: <20211217230131.2715940-1-troy.kisky@boundarydevices.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean The adds boards whose defconfigs are in the board's directory. Signed-off-by: Troy Kisky --- tools/genboardscfg.py | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/tools/genboardscfg.py b/tools/genboardscfg.py index 4ee7aa1f891..60e2fe5cf3e 100755 --- a/tools/genboardscfg.py +++ b/tools/genboardscfg.py @@ -37,6 +37,13 @@ COMMENT_BLOCK = '''# ''' % __file__ ### helper functions ### +def find_defconfig_in_board_subdir(f): + for (dirpath, dirnames, filenames) in os.walk('board'): + for filename in filenames: + if filename == f: + return True + return False + def try_remove(f): """Remove a file ignoring 'No such file or directory' error.""" try: @@ -76,6 +83,14 @@ def output_is_new(output): if ctime < os.path.getctime(filepath): return False + for (dirpath, dirnames, filenames) in os.walk('board'): + for filename in fnmatch.filter(filenames, '*'): + if fnmatch.fnmatch(filename, '.*'): + continue + filepath = os.path.join(dirpath, filename) + if ctime < os.path.getctime(filepath): + return False + for (dirpath, dirnames, filenames) in os.walk('.'): for filename in filenames: if (fnmatch.fnmatch(filename, '*~') or @@ -94,7 +109,8 @@ def output_is_new(output): continue defconfig = line.split()[6] + '_defconfig' if not os.path.exists(os.path.join(CONFIG_DIR, defconfig)): - return False + if not find_defconfig_in_board_subdir(defconfig): + return False return True @@ -231,6 +247,12 @@ def scan_defconfigs(jobs=1): continue all_defconfigs.append(os.path.join(dirpath, filename)) + for (dirpath, dirnames, filenames) in os.walk('board'): + for filename in fnmatch.filter(filenames, '*_defconfig'): + if fnmatch.fnmatch(filename, '.*'): + continue + all_defconfigs.append(os.path.join(dirpath, filename)) + total_boards = len(all_defconfigs) processes = [] queues = [] @@ -346,6 +368,19 @@ class MaintainersDatabase: targets = [] maintainers = [] status = '-' + + front, match, rear = file.partition('board/') + if match: + front, match, rear = file.partition('/MAINTAINERS') + if front: + for (dirpath, dirnames, filenames) in os.walk(front): + for filename in fnmatch.filter(filenames, '*_defconfig'): + if fnmatch.fnmatch(filename, '.*'): + continue + front, match, rear = filename.rpartition('_defconfig') + if match and not rear: + targets.append(front) + if targets: for target in targets: self.database[target] = (status, maintainers) -- 2.32.0