From patchwork Thu Feb 9 23:15:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Hardin X-Patchwork-Id: 1740181 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::137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PCXlp6KBgz23fc for ; Fri, 10 Feb 2023 10:15:32 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id B08CA417C9; Thu, 9 Feb 2023 23:15:29 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org B08CA417C9 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ob2M65th-wUV; Thu, 9 Feb 2023 23:15:28 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id AA066417A9; Thu, 9 Feb 2023 23:15:27 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org AA066417A9 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 F12901BF842 for ; Thu, 9 Feb 2023 23:15:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id D844F417A9 for ; Thu, 9 Feb 2023 23:15:25 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org D844F417A9 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QUWqAuxwSF7Y for ; Thu, 9 Feb 2023 23:15:25 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org EAB8D4179E Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by smtp4.osuosl.org (Postfix) with ESMTPS id EAB8D4179E for ; Thu, 9 Feb 2023 23:15:24 +0000 (UTC) Received: by mail-pj1-x102b.google.com with SMTP id d2so3513536pjd.5 for ; Thu, 09 Feb 2023 15:15:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=j+mDgSqOetJ8op4ecWqRpB9pNOopJmtHcXvS0VXLJ20=; b=QHJHpGwXG6laV49arrUw/WP4MxAXpW6yjw3Wtj5lDAFJgvIvtRhXT3+8SAxBc106BF bc1zMu0FIhOPU6XthibChU+wC1whSj5jBUCYheTA7A0S4txwxY08QwuVUm9lZAN6ePQU HsPxLNrB7VHb0YGlUYbL/XoGZw5YueEThk3fDyUyylVFfs1zMLdsJnlGC1E7gqvaE5zB eXYj3EMlmnooJXkrl1fhc54dFXcKSCXQPiS0o0mFSuYkKL3G5cj/UCB6jNA7ayXNrnZd lcdsecVP5HS8SlnisgNMQwejC5LbbpFqKxO+JuwNJLNT/ATfUVEm3TNQWBxNq38CUygK 7+Ow== X-Gm-Message-State: AO0yUKXFacD8YYFnUHX2Fb1QOF16O6KFoiPwquIXWh18gV2UyUChYQBi 4pgjK5UVpB1NHT0EpMVFVZ8hrWB4VE8= X-Google-Smtp-Source: AK7set/X/aNce0gPkAdMLQMnW1MdQ8eU0H6KB9+R23gHLxRlVeS091HfvrQJsgnSBeni7yphd3RPJg== X-Received: by 2002:a05:6a21:6210:b0:ae:47a6:e6d9 with SMTP id wm16-20020a056a21621000b000ae47a6e6d9mr10634243pzb.6.1675984523933; Thu, 09 Feb 2023 15:15:23 -0800 (PST) Received: from localhost.localdomain ([12.125.190.90]) by smtp.gmail.com with ESMTPSA id c4-20020aa781c4000000b005905d2fe760sm1970067pfn.155.2023.02.09.15.15.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 09 Feb 2023 15:15:23 -0800 (PST) From: ckhardin@gmail.com To: buildroot@buildroot.org Date: Thu, 9 Feb 2023 15:15:15 -0800 Message-Id: <20230209231518.9458-1-ckhardin@gmail.com> X-Mailer: git-send-email 2.37.1 (Apple Git-137.1) MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=j+mDgSqOetJ8op4ecWqRpB9pNOopJmtHcXvS0VXLJ20=; b=GrpzYMopsEjjof/qE7dSP74v2cWSP3QcH3f2SsmoM7n7ihLuE0ZKwsAC8xKDmK/r7s sYu0TNlYj8hQK9oreywK7pqWmbfN5parBne5nvNcQlWT2eUlfXkPNJQ1m0Cz5KRvN/Ob j0cqCQQ62YFDTlUyDreKy8eQyJyYIEy+me6tWqfZzc7r3Y8TgOyHIzihdldM/YhY9CtZ WXLI+t2X948RDvQSHpUR61LkJpkpabfBU/BvcS6XSE+EAZW+3kTRDMNPmoqKQ/mEQx7I wD76sUcaKxxW7MacdNzSKgTmo9+NL3AxqIb5tp5M00FyqnGXx3j+L/RLXkOqym0QcXhd ZQ7g== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=GrpzYMop Subject: [Buildroot] [PATCH 1/4] linux: create a scmversion file based on the custom repo variables 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: , Cc: Charles Hardin Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" From: Charles Hardin When using the custom repositories, the archive creation will omit the source history to get reproducible hashes. This has the side effect of making the setlocalversion scripts within the builds to not create the tracking information as expected. So, just generate a .scmversion so that kernels will be labelled with where buildroot referenced them. For example (line wrapped) #define UTS_RELEASE "5.4.70-repo-version-" \ "92c23d10d0031e0a13244a1a97e7530d3b53fc6e" Signed-off-by: Charles Hardin --- linux/linux.mk | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/linux/linux.mk b/linux/linux.mk index 7645b5f507..0b27c8dee2 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -596,6 +596,20 @@ endif ifeq ($(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_REPO_URL)),) $(error No custom repo URL set. Check your BR2_LINUX_KERNEL_CUSTOM_REPO_URL setting) endif + +# Create a custom scm version file to reflect the source version since the +# archive will omit source directories like .git to maintain reproducible +# hashes for the archives +LINUX_CUSTOM_REPO_SCMVERSION = \ + "-repo-version-$(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION))" +define LINUX_CUSTOM_REPO_SCMVERSION_HOOK + (cd $(@D); \ + if [ ! -f .scmversion ]; then \ + echo $(LINUX_CUSTOM_REPO_SCMVERSION) > .scmversion; \ + fi) +endef + +LINUX_POST_EXTRACT_HOOKS += LINUX_CUSTOM_REPO_SCMVERSION_HOOK endif ifeq ($(BR_BUILDING),y) From patchwork Thu Feb 9 23:15:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Hardin X-Patchwork-Id: 1740182 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::137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PCXm24sjxz23fc for ; Fri, 10 Feb 2023 10:15:46 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 5E20B418A7; Thu, 9 Feb 2023 23:15:44 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 5E20B418A7 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tJqw0CBdrN9X; Thu, 9 Feb 2023 23:15:43 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 278754180D; Thu, 9 Feb 2023 23:15:42 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 278754180D 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 EC77B1BF842 for ; Thu, 9 Feb 2023 23:15:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id C61E94180D for ; Thu, 9 Feb 2023 23:15:33 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org C61E94180D X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EdproeTnB_AE for ; Thu, 9 Feb 2023 23:15:33 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org EC8A5417A9 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by smtp4.osuosl.org (Postfix) with ESMTPS id EC8A5417A9 for ; Thu, 9 Feb 2023 23:15:32 +0000 (UTC) Received: by mail-pg1-x52d.google.com with SMTP id n2so2618656pgb.2 for ; Thu, 09 Feb 2023 15:15:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7vABbMRfwqF9rp+uPeyv4Gtvn9PwUunBYUSjL30ctfQ=; b=QyxgR4R/T2/Zdoh2zDqv0aweimmWCtf9x+LRFZ7P1uuUtdnoS+XJqAqnvekahAs57y if0d021ziuHQJ5aP2EtWktSK9memzbWVKn/qzpj1DddVyYysFn1wXX4IXHUsl0GyBUA7 yUwURBBZ8jkuNnXJGwOOZw9IqVnXekMwrCTbZfLrZ4t5JSKxkEGEyqmzOtpSw2uWENgF PYqgAgJjcA9FVIkLeSdUAJoOFiJDxUDU5AJPT35vFtM7fdR4hGRhmycNtf+/42D7yRIt Sab4qeVzfTDLFVpeHxQb0JB46DLI9Uoep3ijCmEZM6GW21dEGJYGE0Bh/T3sxM59FwDz wnBQ== X-Gm-Message-State: AO0yUKVEyEyqf+EMGJ7qIoiVOblH9kJNzQlSMWhumVzgKb68Sq/ewaKA n6VzvOm9+Mm8C+ZjTPc/SDwZUfYst7E= X-Google-Smtp-Source: AK7set/ibvnqEuz5r3RFxCb49ERaZf6SEJf4ke5c05r5CriQTGuUtT6BCQF71aQ6LwdUz/6rSYISFA== X-Received: by 2002:aa7:9d07:0:b0:5a8:52d5:3bc8 with SMTP id k7-20020aa79d07000000b005a852d53bc8mr3519651pfp.4.1675984531839; Thu, 09 Feb 2023 15:15:31 -0800 (PST) Received: from localhost.localdomain ([12.125.190.90]) by smtp.gmail.com with ESMTPSA id c4-20020aa781c4000000b005905d2fe760sm1970067pfn.155.2023.02.09.15.15.30 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 09 Feb 2023 15:15:31 -0800 (PST) From: ckhardin@gmail.com To: buildroot@buildroot.org Date: Thu, 9 Feb 2023 15:15:16 -0800 Message-Id: <20230209231518.9458-2-ckhardin@gmail.com> X-Mailer: git-send-email 2.37.1 (Apple Git-137.1) In-Reply-To: <20230209231518.9458-1-ckhardin@gmail.com> References: <20230209231518.9458-1-ckhardin@gmail.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7vABbMRfwqF9rp+uPeyv4Gtvn9PwUunBYUSjL30ctfQ=; b=jTkDz4uRf8ofiL2EV9w4+DzZ2zLEG8K+laCWSC+6h+nUOg4lyTgEO/SLPC5K6UnsBG MeYxpFQMCnk6W5BRmbV9hTFzdi3tNUbHh8q6A6hr2CEPVJ02CKNP0BwvYhcJaMAU3Ljz wBf/PoGO4ZCQTeSrfOdQNfZjJ8H0w24UUtVJ3LzZYh4pUeJp5zItDSPNZCz/ciV52BUC 45RYfKtfbCtcuDKQSSLQ2zQCYYRitWWf+rxXrVBqxRgN9f1cfUvn7yRa0YaqRH3qmQJh XNHW4oafJyGkU6glRpGMujWnxj/avAwZbRajLiJ7/eodLDgwxx4no9Ue6LZKVw6YUL7V tUFw== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=jTkDz4uR Subject: [Buildroot] [PATCH 2/4] boot/uboot: create a scmversion file based on the custom repo variables 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: , Cc: Charles Hardin Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" From: Charles Hardin When using the custom repositories, the archive creation will omit the source history to get reproducible hashes. This has the side effect of making the setlocalversion scripts within the builds to not create the tracking information as expected. So, just generate a .scmversion so that kernels will be labelled with where buildroot referenced them. Example (line wrapped) #define PLAIN_VERSION "2018.03-repo-version-" \ "d72b9d0908364a64718b652b75e4cac9b85cf0c3" Signed-off-by: Charles Hardin --- boot/uboot/uboot.mk | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk index 4eae8e95c3..d735b47326 100644 --- a/boot/uboot/uboot.mk +++ b/boot/uboot/uboot.mk @@ -526,12 +526,25 @@ endif # BR2_TARGET_UBOOT_CUSTOM_TARBALL ifeq ($(BR2_TARGET_UBOOT_CUSTOM_GIT)$(BR2_TARGET_UBOOT_CUSTOM_HG),y) ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_URL)),) $(error No custom U-Boot repository URL specified. Check your BR2_TARGET_UBOOT_CUSTOM_REPO_URL setting) -endif # qstrip BR2_TARGET_UBOOT_CUSTOM_CUSTOM_REPO_URL +endif # qstrip BR2_TARGET_UBOOT_CUSTOM_REPO_URL ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION)),) $(error No custom U-Boot repository version specified. Check your BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION setting) -endif # qstrip BR2_TARGET_UBOOT_CUSTOM_CUSTOM_REPO_VERSION +endif # qstrip BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION endif # BR2_TARGET_UBOOT_CUSTOM_GIT || BR2_TARGET_UBOOT_CUSTOM_HG +# Create a custom scm version file to reflect the source version since the +# archive will omit source directories like .git to maintain reproducible +# hashes for the archives +UBOOT_CUSTOM_REPO_SCMVERSION = \ + "-repo-version-$(call qstrip,$(BR2_UBOOT_TARGET_CUSTOM_REPO_VERSION))" +define UBOOT_CUSTOM_REPO_SCMVERSION_HOOK + (cd $(@D); \ + if [ ! -f .scmversion ]; then \ + echo $(UBOOT_CUSTOM_REPO_SCMVERSION) > .scmversion; \ + fi) +endef + +UBOOT_POST_EXTRACT_HOOKS += UBOOT_CUSTOM_REPO_SCMVERSION_HOOK endif # BR2_TARGET_UBOOT && BR_BUILDING ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY),y) From patchwork Thu Feb 9 23:15:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Hardin X-Patchwork-Id: 1740183 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.137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PCXmH73RGz23fc for ; Fri, 10 Feb 2023 10:15:59 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 3348C4185F; Thu, 9 Feb 2023 23:15:58 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 3348C4185F X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LTTFRGQgRsaK; Thu, 9 Feb 2023 23:15:57 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id F08A241819; Thu, 9 Feb 2023 23:15:55 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org F08A241819 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id CC05E1BF842 for ; Thu, 9 Feb 2023 23:15:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 3074660E19 for ; Thu, 9 Feb 2023 23:15:38 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 3074660E19 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 99mjPV5QIxFO for ; Thu, 9 Feb 2023 23:15:35 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 3753A6059C Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by smtp3.osuosl.org (Postfix) with ESMTPS id 3753A6059C for ; Thu, 9 Feb 2023 23:15:35 +0000 (UTC) Received: by mail-pj1-x102c.google.com with SMTP id v6-20020a17090ad58600b00229eec90a7fso7341743pju.0 for ; Thu, 09 Feb 2023 15:15:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/ZmetyC3AP7yXLSGaX82rttoOs79pp79qjcb4MHe864=; b=nVY3lDKq23M7yehs3nraLJTmO8KDIHh6LsQlQiHtm8e0J3khQu/egouUoRwv0mGVlr GSflTVzBk1IhmJvj1QanAJlFg8eO40Xq97Xow66By5IPYZLrzBxf6OH5KG+vtl6x9rCZ JnKzCNYnpbLV7WSWE0KOjHpRUTsZku/jK7pkAb+taQD5V6p37uM8vVlcU2z3sVeZp6kD I5F32pEoaldCg68cxc11kkyl/nEF2Jr75FvlDL67P8QQpCdjvgDqBQ7HGfMaWNQmBduF wOpD6M6gWRvQIRzOyoUYIQJgS70VzplaF5FqJco/+RePFKtYlz9nyiWP186vB6LWjf6z Li9Q== X-Gm-Message-State: AO0yUKWwYDxIrjDcuffUMyj0X0BP5ldQdh8n+uIsaDHKdAWEs0AY5crn qnwEzowkuPv6XWxh3Z89vNLy03mO4dY= X-Google-Smtp-Source: AK7set+r2/wFbpb63xAhtjjRbRe6PCmLxWFQTS/Lq1A5BWV/qH0jKldMWrYjQQ4by61X5ZC/Qkwsug== X-Received: by 2002:a05:6a20:7d95:b0:bc:5f20:140d with SMTP id v21-20020a056a207d9500b000bc5f20140dmr15196006pzj.30.1675984534241; Thu, 09 Feb 2023 15:15:34 -0800 (PST) Received: from localhost.localdomain ([12.125.190.90]) by smtp.gmail.com with ESMTPSA id c4-20020aa781c4000000b005905d2fe760sm1970067pfn.155.2023.02.09.15.15.33 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 09 Feb 2023 15:15:33 -0800 (PST) From: ckhardin@gmail.com To: buildroot@buildroot.org Date: Thu, 9 Feb 2023 15:15:17 -0800 Message-Id: <20230209231518.9458-3-ckhardin@gmail.com> X-Mailer: git-send-email 2.37.1 (Apple Git-137.1) In-Reply-To: <20230209231518.9458-1-ckhardin@gmail.com> References: <20230209231518.9458-1-ckhardin@gmail.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/ZmetyC3AP7yXLSGaX82rttoOs79pp79qjcb4MHe864=; b=ZCHZvLvRmmEt5iN0bP5R0AIEJGohwdXZYXUWhRcTSUbn5bB+bRvlK5m6iTzhLjfkS9 kcImuSOpZJOVPJqtlq8+AK9eOW6PKqmu06ECiWyW2jK/eDuvNUNdk+XTxtcdFedgwhan Rpb86uSv3u1eRHekAsTP+4H6v9oLdxggQo6ZLg4paRobv17T1NoiWtBW88X+K5Oj9avG CMRqzNCdxSVEkUvZ7cpmKyRd0ArwYzOHVjbcAx082yoiSStUlbxX8wM/gldc64BCcAYp ViI4iOiZU/icDQG4OY3Hn9Wp6TBj9RSWEaTjY4TV6yzaoNEN6UIubDcIdQPzFyO185KC SL9w== X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=ZCHZvLvR Subject: [Buildroot] [PATCH 3/4] boot/uboot: add a setlocalversion rsync hook when overriding srcdir 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: , Cc: Charles Hardin Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" From: Charles Hardin During development the override srcdir is often used with a local git repo and branch. To help track the builds used in those flows it is useful to have the scm version available as part of the info. With this hook, the auto generated version include will include the example. #define PLAIN_VERSION "2018.03-01358-gbda75d6a8b" #define U_BOOT_VERSION "U-Boot " PLAIN_VERSION Signed-off-by: Charles Hardin --- boot/uboot/uboot.mk | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk index d735b47326..3f8479e623 100644 --- a/boot/uboot/uboot.mk +++ b/boot/uboot/uboot.mk @@ -40,6 +40,18 @@ UBOOT_SITE = https://ftp.denx.de/pub/u-boot UBOOT_SOURCE = u-boot-$(UBOOT_VERSION).tar.bz2 endif +ifneq ($(UBOOT_OVERRIDE_SRCDIR),) +define UBOOT_OVERRIDE_SRCDIR_SETLOCALVERSION + (cd $(@D); \ + if [ -x ./scripts/setlocalversion ]; then \ + ./scripts/setlocalversion --save-scmversion \ + $(abspath $(UBOOT_OVERRIDE_SRCDIR)) ||:; \ + fi) +endef + +UBOOT_POST_RSYNC_HOOKS += UBOOT_OVERRIDE_SRCDIR_SETLOCALVERSION +endif + ifeq ($(BR2_TARGET_UBOOT)$(BR2_TARGET_UBOOT_LATEST_VERSION),y) BR_NO_CHECK_HASH_FOR += $(UBOOT_SOURCE) endif From patchwork Thu Feb 9 23:15:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Hardin X-Patchwork-Id: 1740184 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::137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PCXmZ3fb8z23fc for ; Fri, 10 Feb 2023 10:16:14 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id AE325417C9; Thu, 9 Feb 2023 23:16:12 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org AE325417C9 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Nmb962ls9Bvu; Thu, 9 Feb 2023 23:16:11 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 9853A418DB; Thu, 9 Feb 2023 23:16:10 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 9853A418DB 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 9F23A1BF842 for ; Thu, 9 Feb 2023 23:15:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 7923382249 for ; Thu, 9 Feb 2023 23:15:39 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 7923382249 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CKL3IQ75o3qZ for ; Thu, 9 Feb 2023 23:15:37 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 5F0F382248 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by smtp1.osuosl.org (Postfix) with ESMTPS id 5F0F382248 for ; Thu, 9 Feb 2023 23:15:37 +0000 (UTC) Received: by mail-pj1-x1032.google.com with SMTP id j1so3590864pjd.0 for ; Thu, 09 Feb 2023 15:15:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bep+Ub6vovuiNuTjYO7d1zFgcxJ7RRUYVRDzziXkZso=; b=qr02CZ0P6s2yN0/tQ2kdkxferUIVwnAlBJb8h2qTwXrdKqGAzRp4eUKEgNeOImdaVo MoGCvz/tRbs/7zy68FvuOwn1bqR1/vZCJYjA+WbstRorRsovm7WPpKYUBQchaidKyu4x msLOkCVcmw3pfct4jqXIA2gArD5FDkcR3cg2+8votVWuzKYtunzvaEkqzidFMCNfaH5l wmWJTxCYuI93zeCYGyVBXRcMcuO6c4umaThLx0NluMH7Gp5VGOWTK1okykF5ex6MDM8D ekeikk5pObkjhHKoAmW6SPfn9fOIm87ZcV45jEiaV5s35qcj0yZ/NIuKywdmX8UxNQ0D wJzA== X-Gm-Message-State: AO0yUKX1KxKULlVRO99tNIasq+rZWKhrZtkdp6T7XKupm+logsm8iA+/ cM1lMCdFWRr/1KacBTpv7Ro+kBNfow4= X-Google-Smtp-Source: AK7set+OlPuk6iYBAn/aUUIQf0jpIa+k8FkOz8VOza/lhPS4pRJCKXQJwxqhhm8Sr3x+bF0SWGGlkA== X-Received: by 2002:a05:6a20:5484:b0:b6:157d:bf48 with SMTP id i4-20020a056a20548400b000b6157dbf48mr16089762pzk.43.1675984536359; Thu, 09 Feb 2023 15:15:36 -0800 (PST) Received: from localhost.localdomain ([12.125.190.90]) by smtp.gmail.com with ESMTPSA id c4-20020aa781c4000000b005905d2fe760sm1970067pfn.155.2023.02.09.15.15.35 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 09 Feb 2023 15:15:35 -0800 (PST) From: ckhardin@gmail.com To: buildroot@buildroot.org Date: Thu, 9 Feb 2023 15:15:18 -0800 Message-Id: <20230209231518.9458-4-ckhardin@gmail.com> X-Mailer: git-send-email 2.37.1 (Apple Git-137.1) In-Reply-To: <20230209231518.9458-1-ckhardin@gmail.com> References: <20230209231518.9458-1-ckhardin@gmail.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bep+Ub6vovuiNuTjYO7d1zFgcxJ7RRUYVRDzziXkZso=; b=E9A793M6kxH4G3Pm1tXTByQQjHFZu293wB9aSpJYF+wG8LkENtPf1fMxqUnNSIexWj mfu+hv8fnc6t8z5qtkmbnhSswRdK75atzkimoUDkBHBuXr7Weh6vHqtkT9M9KtTZxhOf eZ55ALdZMbEHMtg8K4Oo1gZB2+P9ufjVQV1zqiiIqEEN2+EnG/CBZPP9gwg+jyu6BB6S o8gGOekCE6r4L7lJyUAx5yvpZJLs/QfgMlanufcUas+8FBpJJRpGNAsQ9WlNEUNVNjK2 G02Lt/3fLvuTT5MTtdku5PxtHN/yg/DgqUQPsRZRrEalweg4yOLQ2cObExTAcNnkPZJT 1QLw== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=E9A793M6 Subject: [Buildroot] [PATCH 4/4] linux: add a setlocalversion rsync hook when overriding srcdir 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: , Cc: Charles Hardin Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" From: Charles Hardin During development the override srcdir is often used with a local git repo and branch. To help track the builds used in those flows it is useful to have the scm version available as part of the info. With this hook, the auto generated version include will include the example. #define UTS_RELEASE "5.4.70-00031-g92c23d10d003" Signed-off-by: Charles Hardin --- linux/linux.mk | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/linux/linux.mk b/linux/linux.mk index 0b27c8dee2..3ef8e555c5 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -46,6 +46,18 @@ LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v$(firstword $(subst ., ,$(LINUX_ endif endif +ifneq ($(LINUX_OVERRIDE_SRCDIR),) +define LINUX_OVERRIDE_SRCDIR_SETLOCALVERSION + (cd $(@D); \ + if [ -x ./scripts/setlocalversion ]; then \ + ./scripts/setlocalversion --save-scmversion \ + $(abspath $(LINUX_OVERRIDE_SRCDIR)) ||:; \ + fi) +endef + +LINUX_POST_RSYNC_HOOKS += LINUX_OVERRIDE_SRCDIR_SETLOCALVERSION +endif + ifeq ($(BR2_LINUX_KERNEL)$(BR2_LINUX_KERNEL_LATEST_VERSION),y) BR_NO_CHECK_HASH_FOR += $(LINUX_SOURCE) endif