From patchwork Thu Feb 9 01:53: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: 1739754 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::138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (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 4PC0Jq630tz23jH for ; Thu, 9 Feb 2023 12:53:46 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 8489D81242; Thu, 9 Feb 2023 01:53:40 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 8489D81242 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 NohtLvmwkvzR; Thu, 9 Feb 2023 01:53:39 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 3F87C811F8; Thu, 9 Feb 2023 01:53:38 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 3F87C811F8 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 D03FC1BF963 for ; Thu, 9 Feb 2023 01:53:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id A32FC61033 for ; Thu, 9 Feb 2023 01:53:36 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org A32FC61033 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 r58pdIya2uee for ; Thu, 9 Feb 2023 01:53:35 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 5075760D79 Received: from mail-ot1-x331.google.com (mail-ot1-x331.google.com [IPv6:2607:f8b0:4864:20::331]) by smtp3.osuosl.org (Postfix) with ESMTPS id 5075760D79 for ; Thu, 9 Feb 2023 01:53:35 +0000 (UTC) Received: by mail-ot1-x331.google.com with SMTP id x26-20020a056830115a00b0068bbc0ee3eeso159993otq.0 for ; Wed, 08 Feb 2023 17:53: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:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=u9mhvRljObWln69Q44hkgUxxxAEVADd2VSOCTlFFsqI=; b=0J9DyAO8bGBbJ3+miFVUw7JB7YXQJNESPhebMMgZe64E37EASmnu2bUBqTt4xhSq4o 92Abs+Yn7zEQLhw+qY4ysmBPRUC52kclb/IbuazAyzwz+qqyWtaZCdKm+TeSvXVeh7b7 j3pG0G4hT0O3Uslq7SUCD4WqppATiRdl6Pk6rUoJvjw1P4LxdHnh3a12x7HpL5rM+ZOv 6xObr8OPkf5u6/SILVhiBuDqRlWZqxXEYL5TGiti9Z+T23NRr2plWamo2jP0Ni8Q80vf 3RyZiAnFp8480lqN9ZcOgxTAkWSqgJoA2JmaTPGGe9UqW/wkUCkcmV9rwH9VNCyxgteQ yIWg== X-Gm-Message-State: AO0yUKX+KGuUqCy8cVGVj+cLIWoHUXIHnlaEo6wxZaEOjqFeoqyRdLkD KgfqxPqBnpe3/zloZ8nmJZdI0lLaIxE= X-Google-Smtp-Source: AK7set+CxMM+b8nAZRDIMz2elw1/FO20x5kfHNSCrCdxESZV5y260nJPO6XX8WVhujjYFZv3pF4osA== X-Received: by 2002:a9d:4c6:0:b0:68d:5a31:af3b with SMTP id 64-20020a9d04c6000000b0068d5a31af3bmr181564otm.14.1675907613991; Wed, 08 Feb 2023 17:53:33 -0800 (PST) Received: from nowhere.attlocal.net ([2600:1700:65a0:14f0:dce0:30dc:b696:f26]) by smtp.gmail.com with ESMTPSA id d25-20020a9d5e19000000b00684e55f4541sm426oti.70.2023.02.08.17.53.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 08 Feb 2023 17:53:33 -0800 (PST) From: Charles Hardin X-Google-Original-From: Charles Hardin To: buildroot@buildroot.org Date: Wed, 8 Feb 2023 17:53:18 -0800 Message-Id: <20230209015319.28176-1-charles.hardin@chargepoint.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=u9mhvRljObWln69Q44hkgUxxxAEVADd2VSOCTlFFsqI=; b=QDcJAZO7i4r6/k9L6u/Dz1XDRdHKnBryv2xNC2aKASVbUaDiFjsL9G6rD1OuPpRwQa gSGcp8U1qjX4J2nHVnLNofmVd0Xf9jss9TduGkc83lypS9YFemtC6w+xvKvW5p/RWiVZ QYxBflzvN5z9mILeI6ADpJzBK80Be5kxDAiVEH322k10169D5PZ2DDZ5GkOk13RXBz3B 896GhFCQ2YkvOZZepE/qawR3Kxv+eeVf1mNLZunIZGHHkVz9lp+MDQK6zcY1ZO1xnDNm zNfli+1X4sDFTor6RKNPyUJlY0w6dg3uCW3jd+sBnegTyJziq4rvUaX3wOnIMm9P4vnG Q/1w== 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=QDcJAZO7 Subject: [Buildroot] [PATCH 1/2] 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 , 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 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 4eae8e95c3..e340d2cf11 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 01:53:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Hardin X-Patchwork-Id: 1739755 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::133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (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 4PC0Jz3pvvz23jH for ; Thu, 9 Feb 2023 12:53:55 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id F12704051D; Thu, 9 Feb 2023 01:53:52 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org F12704051D X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ecjqkk_erRwq; Thu, 9 Feb 2023 01:53:52 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id 34D7E40393; Thu, 9 Feb 2023 01:53:51 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 34D7E40393 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 CEB6B1BF963 for ; Thu, 9 Feb 2023 01:53:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id B5AC18127D for ; Thu, 9 Feb 2023 01:53:39 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org B5AC18127D 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 MxpptbqB2mwZ for ; Thu, 9 Feb 2023 01:53:39 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org D286181242 Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by smtp1.osuosl.org (Postfix) with ESMTPS id D286181242 for ; Thu, 9 Feb 2023 01:53:38 +0000 (UTC) Received: by mail-oi1-x22c.google.com with SMTP id c15so475438oic.8 for ; Wed, 08 Feb 2023 17:53:38 -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=ci8hfX2AyisEF+wOmPmcZ/gFDTTtuSVj9metqb1uE48=; b=HrgplA4MdepU4mk/BPY4Oc1Lv6Fg5yx/i2uzNUUMLd1iiBd0lQavcxcg2h6gKoRCCc ckHT10UdH/v4yAHh0Spmji8b4uzqneHd9Mg3X1nfnGi6vTtp4FKLs5CUw3qkFm4/zc6h TUazbGUX5hcNaLmVmQJw3+HRa2Ba0VNXI7xBVVvtXkHduBwTP5gHskD7r6z3p/rF2c0I nxwjPyw4K/qvA7tFvGEXXmibt90Ms4oPbDoyGB7xmM4nlCfFCK5hT1MtjVCHzQlOq7gW l/47XhGZe7LKpRjVi9ym/D4rHg7AUG2RZveq+wn1PdskfvQoUvcqm/ql2MxFVxdwFdkd 8hdw== X-Gm-Message-State: AO0yUKUj0TL4GG3Lhau3eEN/ch7xULNpyoyevMyzaWbq4XhOK1UWYo96 INvhlQnphA9oL6eTL/p0dbtC5K+keAc= X-Google-Smtp-Source: AK7set/Jzpfx8Q90Idvl41alCx9SLFI6rtpyU6P19FVIK+X//i1tp62ZM5p+STSGWDDBxGpW/xExHg== X-Received: by 2002:aca:210f:0:b0:364:5bef:87a5 with SMTP id 15-20020aca210f000000b003645bef87a5mr4932476oiz.26.1675907617382; Wed, 08 Feb 2023 17:53:37 -0800 (PST) Received: from nowhere.attlocal.net ([2600:1700:65a0:14f0:dce0:30dc:b696:f26]) by smtp.gmail.com with ESMTPSA id d25-20020a9d5e19000000b00684e55f4541sm426oti.70.2023.02.08.17.53.36 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 08 Feb 2023 17:53:36 -0800 (PST) From: Charles Hardin X-Google-Original-From: Charles Hardin To: buildroot@buildroot.org Date: Wed, 8 Feb 2023 17:53:19 -0800 Message-Id: <20230209015319.28176-2-charles.hardin@chargepoint.com> X-Mailer: git-send-email 2.37.1 (Apple Git-137.1) In-Reply-To: <20230209015319.28176-1-charles.hardin@chargepoint.com> References: <20230209015319.28176-1-charles.hardin@chargepoint.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=ci8hfX2AyisEF+wOmPmcZ/gFDTTtuSVj9metqb1uE48=; b=VXDsyFq2y5ya03m8dje/Hfh7lUOmAGgwTFLMHlF1Mz8vuIqJNaCgOLAJlqh5iRDMXY A5iVRjGoHZsYfw8clT8ApscrzFIG99i95vNr75Gdxo4AZkRvS9jN8FeziLiF+Vn/6BUl f7DXik6QTJNBXl8FrWhblpHljmYncDPn+gYQHnpu3DBRNKDj0cwy86iOxcnfrx/TPHrn uJBU0lty05n1ciB7BwTPuTuLG0UQ7JA+rcszrX0I0UJYgHxKD5siBTfBmDS6IRABH1Vh zmlEQiJiGsX+m+MMmubQO1vggNzc9RqCEHBOKMNANjdk2l/1aPSnWQi5Y3tNoNdH2Yu6 c22A== 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=VXDsyFq2 Subject: [Buildroot] [PATCH 2/2] 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 , 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 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 7645b5f507..e88856d71e 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