[Buildroot] [PATCH v2 3/4] package/xenomai: allow to pull git revisions
Yann E. MORIN
yann.morin.1998 at free.fr
Sun Dec 29 21:40:08 UTC 2019
Jan, All,
On 2019-12-19 09:24 +0100, Jan Kiszka spake thusly:
> From: Jan Kiszka <jan.kiszka at siemens.com>
>
> Default remains the latest stable release, expressed by
> BR2_PACKAGE_XENOMAI_USE_RELEASE=y and an empty
> BR2_PACKAGE_XENOMAI_VERSION.
>
> Signed-off-by: Jan Kiszka <jan.kiszka at siemens.com>
So I'm coming back to this remaining patch in your series. Sorry it took
so long since last time I worked on the series...
> ---
> package/xenomai/Config.in | 23 ++++++++++++++++++++++-
> package/xenomai/xenomai.mk | 10 +++++++++-
> 2 files changed, 31 insertions(+), 2 deletions(-)
>
> diff --git a/package/xenomai/Config.in b/package/xenomai/Config.in
> index 0cb0b343de..f42c7c9c69 100644
> --- a/package/xenomai/Config.in
> +++ b/package/xenomai/Config.in
> @@ -41,8 +41,21 @@ config BR2_PACKAGE_XENOMAI
>
> if BR2_PACKAGE_XENOMAI
>
> +choice
> + prompt "Xenomai origin"
> + default BR2_PACKAGE_XENOMAI_USE_RELEASE
> +
> +config BR2_PACKAGE_XENOMAI_USE_RELEASE
> + bool "Release"
> +
> +config BR2_PACKAGE_XENOMAI_USE_GIT
> + bool "Git"
> +
> +endchoice
> +
> config BR2_PACKAGE_XENOMAI_VERSION
> - string "Custom Xenomai version"
> + string "Xenomai version"
> + depends on BR2_PACKAGE_XENOMAI_USE_RELEASE
> help
> Manually select Xenomai version. If left empty, the default
> version will be used.
> @@ -53,6 +66,14 @@ config BR2_PACKAGE_XENOMAI_VERSION
> BR2_LINUX_KERNEL_EXT_XENOMAI_ADEOS_PATCH, in the Linux
> Kernel -> Linux Kernel Extensions menu.
>
> +config BR2_PACKAGE_XENOMAI_GIT_REVISION
> + string "Xenomai Git revision"
> + depends on BR2_PACKAGE_XENOMAI_USE_GIT
> + help
> + This option allows Buildroot to get a custom revision from
> + the Xenomai Git repository. This can be a SHA, a tag, or
> + even a branch (floating revision).
So I know that you are (probably, hopefully) mimicking that construct
from other packages, but I don't see why the same symbol can't be used
for both a release version of a git reference; the telling-apart part is
the choice above anyway, so:
config BR2_PACKAGE_XENOMAI_VERSION
bool "Xenomai version"
help
If downloading a release, leave empty for the default version,
or specify a valid release version.
If downloading from git, this can be any commit-ish (e.g.
a tag, or a hash).
(Note that I explicitly dropped the reference to using a branch name:
that is not supported and should not be doocumented at all.)
> choice
> prompt "Xenomai core"
> default BR2_PACKAGE_XENOMAI_MERCURY
> diff --git a/package/xenomai/xenomai.mk b/package/xenomai/xenomai.mk
> index 3813af707d..df7ca69f45 100644
> --- a/package/xenomai/xenomai.mk
> +++ b/package/xenomai/xenomai.mk
> @@ -4,15 +4,23 @@
> #
> ################################################################################
>
> +ifeq ($(BR2_PACKAGE_XENOMAI_USE_GIT),y)
> +XENOMAI_REV = $(call qstrip,$(BR2_PACKAGE_XENOMAI_GIT_REVISION))
We really want that there *is* a variable named _VERSION because it is
used in a lot of places, like naming the build directory. It is also
dumped in the json generated by 'make show-info'.
And with the above comment, this can be rewrittent as:
XENOMAI_VERSION = $(call qstrip,$(BR2_PACKAGE_XENOMAI_VERSION))
XENOMAI_SOURCE = xenomai-$(XENOMAI_VERSION).tar.bz2
ifeq ($(BR2_PACKAGE_XENOMAI_USE_RELEASE),y)
ifeq ($(XENOMAI_VERSION),)
XENOMAI_VERSION = 3.0.10
else
BR_NO_CHECK_HASH_FOR += $(XENOMAI_SOURCE)
endif
XENOMAI_SITE = http://xenomai.org/downloads/xenomai/stable
else
XENOMAI_SITE = https://gitlab.denx.de/Xenomai/xenomai/-/archive/$(XENOMAI_VERSION)
BR_NO_CHECK_HASH_FOR += $(XENOMAI_SOURCE)
XENOMAI_AUTORECONF = YES
endif
Note that those are simply-expanded variable; that is, their values are
only final at the moment they are eventualyl expanded, so we can define
XENOMAI_VERSION after XENOMAI_SOURCE, even if the former is used to
define the latter.
Care to give that a spin and resubmit an updated patch, please?
Regards,
Yann E. MORIN.
> +XENOMAI_SITE = https://gitlab.denx.de/Xenomai/xenomai/-/archive/$(XENOMAI_REV)
> +XENOMAI_SOURCE = xenomai-$(XENOMAI_REV).tar.bz2
> +XENOMAI_AUTORECONF = YES
> +BR_NO_CHECK_HASH_FOR += $(XENOMAI_SOURCE)
> +else
> XENOMAI_VERSION = $(call qstrip,$(BR2_PACKAGE_XENOMAI_VERSION))
> ifeq ($(XENOMAI_VERSION),)
> XENOMAI_VERSION = 3.0.10
> else
> BR_NO_CHECK_HASH_FOR += $(XENOMAI_SOURCE)
> endif
> -
> XENOMAI_SITE = http://xenomai.org/downloads/xenomai/stable
> XENOMAI_SOURCE = xenomai-$(XENOMAI_VERSION).tar.bz2
> +endif
> +
> XENOMAI_LICENSE = GPL-2.0+ with exception (headers), LGPL-2.1+ (libraries), GPL-2.0+ (kernel), GFDL-1.2+ (docs), GPL-2.0 (ipipe patch, can driver)
> # GFDL is not included but refers to gnu.org
> XENOMAI_LICENSE_FILES = debian/copyright include/COPYING kernel/cobalt/COPYING \
> --
> 2.16.4
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
More information about the buildroot
mailing list