From patchwork Mon Jan 5 18:30:15 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 88 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767637848; bh=tGLSY5CFB0kKfRSbt1hf7N6jKaijh9RmzRLhtPlVzNE=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=StwbmF1x2NEM2XzW8bZMbUF2K2Tk/FA7tXe5ux0rFjdcVCSOWiRRC8uneKdcHlptA z8zuEUECC5E4DMno8jCbuKvXlq2qFMyeFzGHYErWUhseyfPP009If0bIEKq/7hMRs7 FOh4JnAMitWptdClGm9rNphTLH5zFUaEHvLSwZKzak3yZJSnIsVPjjWcdn5vnI00gK hLEmAQMp8JJaRS7bCY6LsXR+R3mso54yqNZNDY82xoWEXG4+nYrPhpzRI2EgKikjEx SRL/RXdNJFERoeMw3VdoZgudJaLMzvwnNBUPRMXW3g+gaTCk6MQx/I3aqgNlBrtYYO dL8YfeZdPVG2Q== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B960469103 for ; Mon, 5 Jan 2026 11:30:48 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 2ihe-JfNhrz3 for ; Mon, 5 Jan 2026 11:30:48 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767637848; bh=tGLSY5CFB0kKfRSbt1hf7N6jKaijh9RmzRLhtPlVzNE=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=StwbmF1x2NEM2XzW8bZMbUF2K2Tk/FA7tXe5ux0rFjdcVCSOWiRRC8uneKdcHlptA z8zuEUECC5E4DMno8jCbuKvXlq2qFMyeFzGHYErWUhseyfPP009If0bIEKq/7hMRs7 FOh4JnAMitWptdClGm9rNphTLH5zFUaEHvLSwZKzak3yZJSnIsVPjjWcdn5vnI00gK hLEmAQMp8JJaRS7bCY6LsXR+R3mso54yqNZNDY82xoWEXG4+nYrPhpzRI2EgKikjEx SRL/RXdNJFERoeMw3VdoZgudJaLMzvwnNBUPRMXW3g+gaTCk6MQx/I3aqgNlBrtYYO dL8YfeZdPVG2Q== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A5C7E6910C for ; Mon, 5 Jan 2026 11:30:48 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767637846; bh=Udl7zetEgUqqoiEX21jB7yrB+ZUrXA1oIeB4+ZJIrhA=; h=From:To:Cc:Subject:Date:From; b=fX7+eHppfuShlBzYsqNeE/G5njBZF0PRy9Ba3u4WIQmfRgtA4v3yJYidAkuIvSCrE VErSAk9TvgGlo1U/5LEg1g9EPNvHKP+gXt66o7ltV0hhgq4Z7cWx1du6T/MiPhzvMA Hg3yb6CEGEKVPMbMNMSESpZJAi6qjLhZsj2bljPCbSxLEexGbGov5EZWQdpdRgnDUy XgD/Q2HrtZHbQgTwQwMNrXCCVPMORCnbVQFzE2W4g0fsydbzkNZoLdwV44DYk5I6cU F+f3BQOzJxsOnlhNth9E9V9ttMVViLRXrYhoL9vsnaTF7v61ngTKQqEdpmHq2oE8Tk p4Zdma4TxdMew== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 417E469045; Mon, 5 Jan 2026 11:30:46 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id MHfGNQCWzwCq; Mon, 5 Jan 2026 11:30:46 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767637842; bh=IuwOe+3QzDFiMjW2C0MkKMzp6s31n8NPxo96xHwffl0=; h=From:To:Cc:Subject:Date:From; b=ujDqbi44pbudvQLYj4Mt0z1g8mIv1Rg7BGgFH7yTkYrWI2fgTbBm3eiKjWtoDLCw0 aBCINPuQhipn+etuS3iTOQ5Vo7y7RretKObbhNYsbZjgX4ZW9zbBuVFKTTuWb0/IYI FE07WnTZwdGxn8/uLWiSsBJJA4TWfFYluP35qfBYZg2dX+kvwflc7jMpGZPJtm3mWT ntfoZRIOv6fhdnc3DnxUofvWVUOqPHd3phUquqZQZQGQNITe1Mwnz1EtXNgQ1/HePU ggnC+B5GnDf9H6TMZ2FbxPhHPeJ5fHIkIf6wIzFYQgy8TUb2ZwB8aRpUrFrOjsSrWa lGpQgyF8CGGhg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id C962569103; Mon, 5 Jan 2026 11:30:41 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Mon, 5 Jan 2026 11:30:15 -0700 Message-ID: <20260105183030.1487468-1-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Message-ID-Hash: 2KJZRPIZ6Z3ZTTAV24QGBWYIPTFBCIO5 X-Message-ID-Hash: 2KJZRPIZ6Z3ZTTAV24QGBWYIPTFBCIO5 X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 00/11] buildman: Refactor control and builderthread List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass This series refactors builderthread.py to improve code organisation and reduce complexity. The main changes are: - Fix pylint warnings in control.py and builderthread.py - Document the toolchain member in BuilderThread - Introduce RunRequest named tuple to group parameters that don't change during a job, reducing run_commit() from 11 to 7 parameters - Split _config_and_build() into three methods: _setup_build(), _reconfig_if_needed(), and _build_and_get_result() - Add BuildSetup named tuple for _setup_build() return value - Extract _do_build() from run_commit() - Extract _write_toolchain_result() and _process_elf_file() from _write_result() These changes make the code easier to understand and maintain without changing functionality. Simon Glass (11): buildman: Fix pylint warnings in control.py buildman: Fix some pylint warnings in builderthread.py buildman: Document toolchain member in BuilderThread buildman: Add RunRequest named tuple for run_commit() parameters buildman: Split _config_and_build() into three methods buildman: Add BuildSetup named tuple for _setup_build() return value buildman: Extract _do_build() from run_commit() buildman: Extract _write_toolchain_result() from _write_result() buildman: Extract _process_elf_file() from _write_toolchain_result() buildman: Silence too-many-arguments warnings buildman: Fix return type documentation in builderthread.py tools/buildman/builderthread.py | 548 ++++++++++++++++++++------------ tools/buildman/control.py | 94 +++--- 2 files changed, 391 insertions(+), 251 deletions(-)