* [Buildroot] [PATCH 1/2] boot/uboot: add a setlocalversion rsync hook when overriding srcdir
@ 2023-02-09 1:53 Charles Hardin
2023-02-09 1:53 ` [Buildroot] [PATCH 2/2] linux: " Charles Hardin
0 siblings, 1 reply; 3+ messages in thread
From: Charles Hardin @ 2023-02-09 1:53 UTC (permalink / raw)
To: buildroot; +Cc: Charles Hardin, Charles Hardin
From: Charles Hardin <ckhardin@gmail.com>
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 <ckhardin@gmail.com>
Signed-off-by: Charles Hardin <charles.hardin@chargepoint.com>
---
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
--
2.37.1 (Apple Git-137.1)
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH 2/2] linux: add a setlocalversion rsync hook when overriding srcdir
2023-02-09 1:53 [Buildroot] [PATCH 1/2] boot/uboot: add a setlocalversion rsync hook when overriding srcdir Charles Hardin
@ 2023-02-09 1:53 ` Charles Hardin
0 siblings, 0 replies; 3+ messages in thread
From: Charles Hardin @ 2023-02-09 1:53 UTC (permalink / raw)
To: buildroot; +Cc: Charles Hardin, Charles Hardin
From: Charles Hardin <ckhardin@gmail.com>
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 <ckhardin@gmail.com>
Signed-off-by: Charles Hardin <charles.hardin@chargepoint.com>
---
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
--
2.37.1 (Apple Git-137.1)
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH 1/2] boot/uboot: add a setlocalversion rsync hook when overriding srcdir
@ 2023-02-09 3:04 Charles Hardin
0 siblings, 0 replies; 3+ messages in thread
From: Charles Hardin @ 2023-02-09 3:04 UTC (permalink / raw)
To: buildroot; +Cc: Charles Hardin
From: Charles Hardin <ckhardin@gmail.com>
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 <ckhardin@gmail.com>
---
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
--
2.37.1 (Apple Git-137.1)
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-09 3:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-09 1:53 [Buildroot] [PATCH 1/2] boot/uboot: add a setlocalversion rsync hook when overriding srcdir Charles Hardin
2023-02-09 1:53 ` [Buildroot] [PATCH 2/2] linux: " Charles Hardin
2023-02-09 3:04 [Buildroot] [PATCH 1/2] boot/uboot: " Charles Hardin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.