From patchwork Fri Oct 20 11:45:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Eckert X-Patchwork-Id: 1852503 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=elHvsw5l; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (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 4SBjXm544Xz23kP for ; Fri, 20 Oct 2023 22:48:55 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=SzAWEF0wy22VrY34BdbuDIbIvsHJ4EMKn/Gcr1w1UZ0=; b=elHvsw5lvbFX/A 7g6/QyePPNMBStEgdMQUXUmkAsEbrZ4worE9cLM+uS5ohhLuSqKEmg3uFEcjtdJHMbWQCM/WJ3Svi JZEnQSDNAvY4L+mKkHROZiewo4UwnD/T1mdSJqMsTEtrN1SrxuOfN+cfkR2WwJDeRa0YYTv9ogTY9 r2lm+exNb5nRVIrZRedb4eNDUVuZYx/BrmlYXaZwrFiEpj0DjzStIBiKpQyAaz2GfV3qn2296qVgh hTQgLrCyR/hmbD2L1PhIQIq5NSIV2rZ3pZ7MP4vspGvTPXdS2rbwA9/evX3er2vbVcIWAOZnz6D5Z K1dmAyFcNNt/HPwdWVSQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qtnwo-002Asd-0I; Fri, 20 Oct 2023 11:45:46 +0000 Received: from mxout70.expurgate.net ([194.37.255.70]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qtnwj-002Arr-3A for openwrt-devel@lists.openwrt.org; Fri, 20 Oct 2023 11:45:43 +0000 Received: from [127.0.0.1] (helo=localhost) by relay.expurgate.net with smtp (Exim 4.92) (envelope-from ) id 1qtnwa-00Gfqe-UZ; Fri, 20 Oct 2023 13:45:32 +0200 Received: from [195.243.126.94] (helo=securemail.tdt.de) by relay.expurgate.net with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qtnwa-00AN0m-Ct; Fri, 20 Oct 2023 13:45:32 +0200 Received: from securemail.tdt.de (localhost [127.0.0.1]) by securemail.tdt.de (Postfix) with ESMTP id EC306240049; Fri, 20 Oct 2023 13:45:31 +0200 (CEST) Received: from mail.dev.tdt.de (unknown [10.2.4.42]) by securemail.tdt.de (Postfix) with ESMTP id 8A786240040; Fri, 20 Oct 2023 13:45:31 +0200 (CEST) Received: from localhost.localdomain (unknown [10.2.3.40]) by mail.dev.tdt.de (Postfix) with ESMTPSA id C088021261; Fri, 20 Oct 2023 13:45:30 +0200 (CEST) From: Florian Eckert To: Eckert.Florian@googlemail.com, mail@aparcar.org, hauke@hauke-m.de Cc: openwrt-devel@lists.openwrt.org Subject: [PATCH] imagebuilder: add check if target is sourced from a feed Date: Fri, 20 Oct 2023 13:45:27 +0200 Message-ID: <20231020114527.3586387-1-fe@dev.tdt.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.dev.tdt.de X-purgate-ID: 151534::1697802332-6E8D6018-F15E4F64/0/0 X-purgate-type: clean X-purgate: clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231020_044542_165694_0DDD96C2 X-CRM114-Status: GOOD ( 13.80 ) X-Spam-Score: -0.7 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: If a target is not upstream because it is still under development, it can still be added to the openwrt via a feed and can be build. Although the build is successful, no new images can be build with t [...] Content analysis details: (-0.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [194.37.255.70 listed in list.dnswl.org] X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org If a target is not upstream because it is still under development, it can still be added to the openwrt via a feed and can be build. Although the build is successful, no new images can be build with the new board, because it cannot find them. To fix this issue add a check to the imagebuilder and test if the target is located in the feed directory. Signed-off-by: Florian Eckert Tested-by: Thomas Richard --- The problem occurred when we started using the new LGM target from MXL in Openwrt. target/imagebuilder/files/Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile index 78ec7e2e94..0466fc7dcc 100644 --- a/target/imagebuilder/files/Makefile +++ b/target/imagebuilder/files/Makefile @@ -205,8 +205,13 @@ build_image: FORCE @echo @echo Building images... rm -rf $(BUILD_DIR)/json_info_files/ - $(NO_TRACE_MAKE) -C target/linux/$(BOARD)/image install TARGET_BUILD=1 IB=1 EXTRA_IMAGE_NAME="$(EXTRA_IMAGE_NAME)" \ - $(if $(USER_PROFILE),PROFILE="$(USER_PROFILE)") + if [ -d "target/linux/feeds/$(BOARD)" ]; then \ + $(NO_TRACE_MAKE) -C target/linux/feeds/$(BOARD)/image install TARGET_BUILD=1 IB=1 EXTRA_IMAGE_NAME="$(EXTRA_IMAGE_NAME)" \ + $(if $(USER_PROFILE),PROFILE="$(USER_PROFILE)"); \ + else \ + $(NO_TRACE_MAKE) -C target/linux/$(BOARD)/image install TARGET_BUILD=1 IB=1 EXTRA_IMAGE_NAME="$(EXTRA_IMAGE_NAME)" \ + $(if $(USER_PROFILE),PROFILE="$(USER_PROFILE)"); \ + fi $(BIN_DIR)/profiles.json: FORCE $(if $(CONFIG_JSON_OVERVIEW_IMAGE_INFO), \