From patchwork Thu Feb 9 03:04:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Hardin X-Patchwork-Id: 1739767 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 4PC1tt2bcyz23kw for ; Thu, 9 Feb 2023 14:04:54 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 6766A820CA; Thu, 9 Feb 2023 03:04:52 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 6766A820CA 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 x8E7M0U_qCr8; Thu, 9 Feb 2023 03:04:51 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id AA573820B8; Thu, 9 Feb 2023 03:04:50 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org AA573820B8 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 A14741BF4E5 for ; Thu, 9 Feb 2023 03:04:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 79CA0820B8 for ; Thu, 9 Feb 2023 03:04:49 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 79CA0820B8 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 X3-pLh_NhSV2 for ; Thu, 9 Feb 2023 03:04:48 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 7F86C820AB Received: from mail-oa1-x34.google.com (mail-oa1-x34.google.com [IPv6:2001:4860:4864:20::34]) by smtp1.osuosl.org (Postfix) with ESMTPS id 7F86C820AB for ; Thu, 9 Feb 2023 03:04:48 +0000 (UTC) Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-16a291b16bfso995162fac.7 for ; Wed, 08 Feb 2023 19:04:48 -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=j+mDgSqOetJ8op4ecWqRpB9pNOopJmtHcXvS0VXLJ20=; b=GS9gGQBVPX+cCUyykpytgIcgTtSIIhthQ0SyWbr25+okn0MBCgG/OYniec6drBE7vx pazQuKgC/h0xskB8x1IgvFogpmkmtIxiqL4oxq8NzKHuXkCiLtCez9gAOIE3mP+Amklj +zkYuvOE9KqT1pNsclJt38rYfxhIiUecyZnN9Qn9Igr+TBvsTrigj/ATj4qTX3hwufO+ U/ywNskcUoQWmjtU278i5zxiK0+mxXtMSbQO5JlO0qFcx6JkG/VBvgMeU3UQ+b7NG+jn KJrdMxRrzOeZW/SVfGvFXzIQczcr2leGsnwHTdy9vtknOU+M8A4lx/YdLNSqpOzgAZF2 d74A== X-Gm-Message-State: AO0yUKXGpxonvWsJGqEE894jd0Edy8uFK09iTk2CJOZ3H3PXBGuLAoLt 1HygfOtPFp+E9Blf10WCX8QFMkhVnjw= X-Google-Smtp-Source: AK7set85EHb6xkyRZJxPUJAf0RwdeL5Dd4qgwr+esJOxRYLoH34QuCHWHU9TyiYNhC989T5tG9tlFA== X-Received: by 2002:a05:6871:713:b0:163:aade:5e01 with SMTP id f19-20020a056871071300b00163aade5e01mr2216234oap.26.1675911882998; Wed, 08 Feb 2023 19:04:42 -0800 (PST) Received: from nowhere.attlocal.net ([2600:1700:65a0:14f0:dce0:30dc:b696:f26]) by smtp.gmail.com with ESMTPSA id m5-20020a056870a10500b0014fe4867dc7sm108383oae.56.2023.02.08.19.04.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 08 Feb 2023 19:04:30 -0800 (PST) From: Charles Hardin X-Google-Original-From: Charles Hardin To: buildroot@buildroot.org Date: Wed, 8 Feb 2023 19:04:03 -0800 Message-Id: <20230209030405.33574-2-charles.hardin@chargepoint.com> X-Mailer: git-send-email 2.37.1 (Apple Git-137.1) In-Reply-To: <20230209030405.33574-1-charles.hardin@chargepoint.com> References: <20230209030405.33574-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=j+mDgSqOetJ8op4ecWqRpB9pNOopJmtHcXvS0VXLJ20=; b=A1i8uiMKIkixt4gJHqXlrY/od6zer3NFEe5GlMTcVcqTVDjhL+53B1eIEG5EwTgwYf pawgL/OO7WZUHZQZJxPMIhUiiIQ28YwRJ+CgTwjhH3OlHh8v9oDfXBTG9ILPfWsSEtNj OMU1BQqXwVsi7uy4WTsxVOMerqah9i+qYHbN1KknJanUXWzo+J3U4+hTz1AtSZNxHTpz 6uDZ6d32mDhjh8+uwx80m6w21QqAWyAmPf5jEEQjH/SLR/ctCAV1H3jedw6rsUyyDcKf as9lNL/wFRD8TWsZtqADI7i63Bpji8/wIYkEtlCJFXrg5qu7/8tyPTpqXRPCRvL1oXjE Mgag== 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=A1i8uiMK Subject: [Buildroot] [PATCH 1/2] 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 03:07:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Hardin X-Patchwork-Id: 1739771 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.138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.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 4PC1y82J5kz23hX for ; Thu, 9 Feb 2023 14:07:44 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 35E85820D9; Thu, 9 Feb 2023 03:07:42 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 35E85820D9 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 i_-L_XGXWkLT; Thu, 9 Feb 2023 03:07:41 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 2C63D820D6; Thu, 9 Feb 2023 03:07:40 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 2C63D820D6 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 BA0F11BF4E5 for ; Thu, 9 Feb 2023 03:07:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 98CA040993 for ; Thu, 9 Feb 2023 03:07:17 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 98CA040993 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 wSKW_eQ-uDiP for ; Thu, 9 Feb 2023 03:07:16 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org A06114098F Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) by smtp4.osuosl.org (Postfix) with ESMTPS id A06114098F for ; Thu, 9 Feb 2023 03:07:16 +0000 (UTC) Received: by mail-ot1-x333.google.com with SMTP id g15-20020a9d6b0f000000b0068db1940216so186338otp.5 for ; Wed, 08 Feb 2023 19:07:16 -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=BL5YFz9DprB50E8UJX6mqg6RwY569PvORv97tjz+6jE=; b=Pd1ilmbEsI/ckMvrJvmsbcIF6UhYhCpTY3UfW1f8XdLJ61IhvkcD797ofV871y23Rn A9+0ZCUMFwx0s+MExk5H5Pp/TjYJ/ZvNYLXV/ADJ0QXrtAcsqmH3Gl32lnFcCEL8IMjD 4R1JqZ3P4udhxyNR20c2Mo00Oq9LNduCziD0Uj5DFtm8ivy/Fj1ZYsu6AGApSGSxphXO K3EVcD4QDMOYI/xGyyCP4sekgnvENhOftJiGsPYzzPHLGCoNSPMEdLF0aUMlaVvBV79J +DlklVwPMMx+4h+3iaPZ6L1dm86hoOb1Gt19KqLneVQtaWgKtXYOwamuw4QQELehJszd Peew== X-Gm-Message-State: AO0yUKW9A4mM2vp7Esk8iGB0PI/zILCHSm1//VMLxaUKmU2CWneNgulE PjprqWIhlJDnM8bebRLbct3AZv66bXc= X-Google-Smtp-Source: AK7set9IODbMBMQRX6N5RA/KDt6nn3IdnLCBdXbtguw9VSbSQZEAkoHZgCyseirF4OfTCMX7Ast7Hg== X-Received: by 2002:a9d:84a:0:b0:68b:bb10:ce6d with SMTP id 68-20020a9d084a000000b0068bbb10ce6dmr4456769oty.23.1675912034946; Wed, 08 Feb 2023 19:07:14 -0800 (PST) Received: from nowhere.attlocal.net ([2600:1700:65a0:14f0:dce0:30dc:b696:f26]) by smtp.gmail.com with ESMTPSA id d8-20020a05683018e800b00670679748f9sm83631otf.49.2023.02.08.19.07.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 08 Feb 2023 19:07:13 -0800 (PST) From: Charles Hardin X-Google-Original-From: Charles Hardin To: buildroot@buildroot.org Date: Wed, 8 Feb 2023 19:07:06 -0800 Message-Id: <20230209030706.33870-2-charles.hardin@chargepoint.com> X-Mailer: git-send-email 2.37.1 (Apple Git-137.1) In-Reply-To: <20230209030706.33870-1-charles.hardin@chargepoint.com> References: <20230209030706.33870-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=BL5YFz9DprB50E8UJX6mqg6RwY569PvORv97tjz+6jE=; b=bshezAqbY6EYhetAGRnDY5pYV/G85o4r3xnv3RCXHVK/fro485shjhYspcxPs6/Ger yCj4WWrB5ry9cm8ZSQ7lRalnIjRkwym/XljLEeTvSpAnyvSOu3BhnMQOrs1YW1ETCmhe pT6VuYKb0KtDNgRm/DvO5w/SdgStPS0llSTgRglDxswhP1BYL1TMnlF28Zp3MV5U/TAD oUFkNZzJKfeIwhCCfi7aGS5Y5gHaydGqmKtpfNfh1weEW57LvAZiserlpbbn9taPYH0T CnAJCfkkuYnn4tJ/u0esuqCrqvVUYHuZaNIGJEOOAPrLUGysfA8gJF0aRJfhAU1R6RRu RXVQ== 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=bshezAqb Subject: [Buildroot] [PATCH 2/2] 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 , 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 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..65bb7669c8 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_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)