From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B8F3C30C105 for ; Fri, 19 Sep 2025 12:25:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758284744; cv=none; b=srO921fRYWsZUqTQucPSVUdUXRjvC7SGhDFk2aSfL5vZQ0EKPLdUObjHRiwftcYHUmDslbTy59cDmpNDwDI2Pn3EO9kA103z+x0nebYgbbpLkTJpUDLgBbbmvfhQg7egpP8DZWmLJcoiL3NT2aRz77m1o8/V0a+PsiFq8qZ7Wac= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758284744; c=relaxed/simple; bh=h5xAolJvBJkCNjmnGF2cnn7c/5X7yu4Ydbe8cTEF92U=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=MDHYBULcJSkNKfnwRgXlaOiSalHSw1Qqt0KFVs1LbT3A2fE738hWZESXybeRh0JsTGxyLzj5ASmXlwblIfPz/PgT+zETyAYuyIxYaQf4HgAfPKrP550nnYiLAJMRtRhXjEZm9ELL7b0y9vuIPQcCL7yUi6kQCJDVBEsAyPEEu4A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=k47XxKmU; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="k47XxKmU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 81084C4CEF9; Fri, 19 Sep 2025 12:25:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1758284744; bh=h5xAolJvBJkCNjmnGF2cnn7c/5X7yu4Ydbe8cTEF92U=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=k47XxKmUp/eAwy5urTaXC0QcZST/ExN7y/9YBLZnBe4ewQapg3aSxlBHA1B0wEhia HadRtV9b2Q6WoPdyy7A05aYelrlIwJh7fZTMKDLMYxgjd9Jrwu8mwlgjOkiT2gcQKw +p+Mo5OzgavkVtvexcjMmHw8Uzv6uQAUnQkqxmWA8bUOuOwi6SItxRGg8HwFhmM8b4 dXRkkD4ytCJc4xFZ4uzBbDwiWTB6Ei7wEUAABz05ojKrzhQ7b/s/X+nHr+XBwnXZci wkZy2jrImE3SfbAud0v7FDd6c3k7FNaW6E3Z3SvaHwl8IwQ/VTbT9SW2H4YwouNPH2 XX0iaI/Ng2J/g== From: Daniel Gomez Date: Fri, 19 Sep 2025 14:25:10 +0200 Subject: [PATCH v2 4/4] workflows: bootlinux: add clean builds configuration option Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20250919-kernel-fragment-support-v2-4-8d2b7b8cb4e4@samsung.com> References: <20250919-kernel-fragment-support-v2-0-8d2b7b8cb4e4@samsung.com> In-Reply-To: <20250919-kernel-fragment-support-v2-0-8d2b7b8cb4e4@samsung.com> To: Luis Chamberlain , Chuck Lever Cc: kdevops@lists.linux.dev, Daniel Gomez X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=3950; i=da.gomez@samsung.com; h=from:subject:message-id; bh=v1T9WCV7GMGG0P8Y3JeEvdgK7no0yJFF/BeiNAYOEPg=; b=owEBbQKS/ZANAwAIAUCeo8QfGVH7AcsmYgBozUu/dVIwTyj6Dse1fRmiUPrZQ7k9JDwlapTYj j08Vlj60IKJAjMEAAEIAB0WIQTvdRrhHw9z4bnGPFNAnqPEHxlR+wUCaM1LvwAKCRBAnqPEHxlR +wyLD/0brdEmPlkH6CLSrYrSDrbiktQa4sDsilA+QGwTUjpSmkcsZ1OVssoyvzmm9O5pFjDH4nS TmrmaH4jcxDVMYYhWxthp8apoMRLwAZVFIOb4MoXSMpbn1BpgxasQ7mGBeo/rPgB9Y4cq3+bdxk HFD58ochmhuDFbvnMKAdGhL0qYH11BuyiOcEXvj6/RkrgsNwVdGrdZRAz8Lw2AKQHh+quXQZ5WW JXy17jgKiT757l2CULglNstG6sfAVD/4WnqRSvwXO8uV1Z30Aw97nbc1tJZXN5E7C+ALO2trsAZ 6kgIGs76M2Mq5VHn9PW56dIFE45KL8kugpITZEDjk9N9/D5hVW5+S3VBXApvlmFJf6dHJRcA0Ri mMMPhVOMLevysA9fFe4CIRMb6rjKxaDGvuYqwr8uXBPCTWaBlKyQjCyfbcvaTc4CFVBY885VhpW VxlA67DSjSutppUjwrMCU8I7GRwSRMfK7fhexPQ5LefD/97oWVXWawLwl0zIUc+rqAzxN1UHoPe 7dgV49O+CFSu2G1+iOyM4YzfRuqHjsoKFYgJ1zpnREHRrCcrm/FDJ4xPjJ+w4sOxwCqTnIjW5eS JMldCpryd+WwqCdSEDrKkyqXwgpk1oZxkuue4eLXUQZqqB2fxjw+SUjfkSbC8jQUMRYTnPx3d51 D7KVHACjvUofa0Q== X-Developer-Key: i=da.gomez@samsung.com; a=openpgp; fpr=B2A7A9CFDD03B540FF58B27185F56EA4E9E8138F From: Daniel Gomez Add CONFIG_BOOTLINUX_CLEAN_BEFORE_BUILD option to enable clean builds for both fragment and monolithic configurations via configurable mrproper execution. Changes: - Add CONFIG_BOOTLINUX_CLEAN_BEFORE_BUILD Kconfig option (default: n) - Add global mrproper task in config.yml for non-9P builds - Add mrproper task in 9P build workflow for localhost builds - Conditional execution based on bootlinux_clean_before_build variable This provides deterministic builds when needed while preserving incremental build performance by default. The mrproper task runs before configuration to ensure pristine source state. Features: - Works with both monolithic and fragment configurations - Separate handling for 9P vs target builds - Clear documentation of trade-offs (clean vs incremental builds) - Maintains existing workflow compatibility Generated-by: Claude AI Signed-off-by: Daniel Gomez --- playbooks/roles/bootlinux/tasks/build/9p.yml | 9 +++++++++ playbooks/roles/bootlinux/tasks/config.yml | 8 ++++++++ workflows/linux/Kconfig | 22 ++++++++++++++++++++++ 3 files changed, 39 insertions(+) diff --git a/playbooks/roles/bootlinux/tasks/build/9p.yml b/playbooks/roles/bootlinux/tasks/build/9p.yml index 08512c90..f390f028 100644 --- a/playbooks/roles/bootlinux/tasks/build/9p.yml +++ b/playbooks/roles/bootlinux/tasks/build/9p.yml @@ -109,6 +109,15 @@ $ {{ ansible_callback_diy.result.output.cmd | join(' ') }} {{ ansible_callback_diy.result.output.stdout | default('') }} +- name: Clean kernel source before configuration (make mrproper) on the control node + community.general.make: + chdir: "{{ bootlinux_9p_host_path }}" + target: "mrproper" + when: bootlinux_clean_before_build|default(false)|bool + run_once: true + delegate_to: localhost + tags: ["build-linux"] + - name: Copy configuration for Linux {{ target_linux_tree }} on the control node ansible.builtin.template: src: "{{ linux_config }}" diff --git a/playbooks/roles/bootlinux/tasks/config.yml b/playbooks/roles/bootlinux/tasks/config.yml index c1ecbaed..66442ad2 100644 --- a/playbooks/roles/bootlinux/tasks/config.yml +++ b/playbooks/roles/bootlinux/tasks/config.yml @@ -31,6 +31,14 @@ when: - linux_next_configs.matched > 0 +- name: Clean kernel source before configuration (make mrproper) for non-9P builds + community.general.make: + chdir: "{{ target_linux_dir_path }}" + target: "mrproper" + when: + - bootlinux_clean_before_build|default(false)|bool + - not bootlinux_9p|bool + - name: Set the .config file for building the test kernel ansible.builtin.set_fact: linux_config: "{{ item | basename }}" diff --git a/workflows/linux/Kconfig b/workflows/linux/Kconfig index cae82382..c0534ae4 100644 --- a/workflows/linux/Kconfig +++ b/workflows/linux/Kconfig @@ -188,6 +188,28 @@ config BOOTLINUX_REPRODUCIBLE_BUILDS Recommended for CI/CD environments and when build reproducibility is required. Compatible with both GCC and Clang toolchains. +config BOOTLINUX_CLEAN_BEFORE_BUILD + bool "Clean kernel source before building (make mrproper)" + output yaml + default n + help + If enabled, run 'make mrproper' before kernel configuration and + building. This ensures a completely clean build from pristine + source code by removing all configuration files, build artifacts, + and generated files. + + Enable this for: + - Deterministic, reproducible builds + - Debugging configuration issues + - Ensuring no stale artifacts interfere + + Disable this for: + - Faster incremental builds during development + - Preserving existing .config when not using fragments + + Note: This adds significant build time as all objects must be + rebuilt from scratch. + menu "ccache configuration" config BOOTLINUX_CCACHE -- 2.50.1