All of lore.kernel.org
 help / color / mirror / Atom feed
* [xenomai-images][PATCH] recipes-xenomai: Add recipes for all major branches
@ 2019-08-12 12:46 Q. Gylstorff
  2019-08-12 12:57 ` Jan Kiszka
  2019-08-13 11:43 ` [xenomai-images][PATCH v2] " Q. Gylstorff
  0 siblings, 2 replies; 9+ messages in thread
From: Q. Gylstorff @ 2019-08-12 12:46 UTC (permalink / raw)
  To: xenomai; +Cc: Quirin Gylstorff, Jan Kiszka

From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

For testing it should be possible to switch between different
xenomai versions. Select the version by adding the
following line to kas.yml with:
  xenomai-version: |
    PREFERRED_VERSION_xenomai = "<version>"
 e.g. the latest master branch with:
  xenomai-version: |
    PREFERRED_VERSION_xenomai = "master-AUTOINC"

The directory build/tmp must be deleted between versions.  

Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
 kas.yml                                   |  3 +++
 recipes-xenomai/xenomai/xenomai_3.0.9.bb  | 32 +++++++++++++++++++++++
 recipes-xenomai/xenomai/xenomai_master.bb | 26 ++++++++++++++++++
 recipes-xenomai/xenomai/xenomai_next.bb   |  4 +--
 recipes-xenomai/xenomai/xenomai_stable.bb | 31 ++++++++++++++++++++++
 5 files changed, 94 insertions(+), 2 deletions(-)
 create mode 100644 recipes-xenomai/xenomai/xenomai_3.0.9.bb
 create mode 100644 recipes-xenomai/xenomai/xenomai_master.bb
 create mode 100644 recipes-xenomai/xenomai/xenomai_stable.bb

diff --git a/kas.yml b/kas.yml
index 3694bcc..506f1f4 100644
--- a/kas.yml
+++ b/kas.yml
@@ -35,3 +35,6 @@ local_conf_header:
     CONF_VERSION = "1"
   cross: |
     ISAR_CROSS_COMPILE = "1"
+  xenomai-version: |
+    PREFERRED_VERSION_xenomai = "stable-AUTOINC"
+    
diff --git a/recipes-xenomai/xenomai/xenomai_3.0.9.bb b/recipes-xenomai/xenomai/xenomai_3.0.9.bb
new file mode 100644
index 0000000..2db26a1
--- /dev/null
+++ b/recipes-xenomai/xenomai/xenomai_3.0.9.bb
@@ -0,0 +1,32 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2019
+#
+# Authors:
+#  Quirin Gylstorff <quirin.gylstorff@siemens.com>
+#
+# SPDX-License-Identifier: MIT
+#
+
+require xenomai.inc
+
+SRC_URI = " \
+    git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=stable/v3.0.x;tag=v${PV}"
+
+S = "${WORKDIR}/git"
+
+do_prepare_build_append() {
+# The xenomai-kernel-source package is supposed to contain the config
+# directory. But the rules files does not copy the folder to /usr/src
+	sudo sed -i 's/cp -a kernel include scripts/cp -a config kernel include scripts/' ${S}/debian/rules
+}
+
+dpkg_runbuild_prepend() {
+    bbplain $(printf "xenomai-v${PV}: Building revision %.12s\n" \
+                     $(cat ${S}/.git/refs/tags/v{PV}))
+
+
+    sudo chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \
+        sh -c "cd ${PP}/${PPS}; scripts/bootstrap"
+}
diff --git a/recipes-xenomai/xenomai/xenomai_master.bb b/recipes-xenomai/xenomai/xenomai_master.bb
new file mode 100644
index 0000000..c058aa0
--- /dev/null
+++ b/recipes-xenomai/xenomai/xenomai_master.bb
@@ -0,0 +1,26 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2019
+#
+# Authors:
+#  Quirin Gylstorff <quirin.gylstorff@siemens.com>
+#
+# SPDX-License-Identifier: MIT
+#
+
+require xenomai.inc
+
+SRC_URI = " \
+    git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=master"
+SRCREV = "${AUTOREV}"
+PV = "master-${SRCREV}"
+S = "${WORKDIR}/git"
+
+dpkg_runbuild_prepend() {
+    bbplain $(printf "xenomai-master: Building revision %.12s\n" \
+                     $(cat ${S}/.git/refs/heads/master))
+
+    sudo chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \
+        sh -c "cd ${PP}/${PPS}; scripts/bootstrap"
+}
diff --git a/recipes-xenomai/xenomai/xenomai_next.bb b/recipes-xenomai/xenomai/xenomai_next.bb
index 72e5758..2efbd3f 100644
--- a/recipes-xenomai/xenomai/xenomai_next.bb
+++ b/recipes-xenomai/xenomai/xenomai_next.bb
@@ -13,8 +13,8 @@ require xenomai.inc
 
 SRC_URI = " \
     git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=next"
-SRCREV = "next"
-PV = "9999-next"
+SRCREV = "${AUTOREV}" 
+PV = "next-${SRCREV}"
 
 S = "${WORKDIR}/git"
 
diff --git a/recipes-xenomai/xenomai/xenomai_stable.bb b/recipes-xenomai/xenomai/xenomai_stable.bb
new file mode 100644
index 0000000..3c408a3
--- /dev/null
+++ b/recipes-xenomai/xenomai/xenomai_stable.bb
@@ -0,0 +1,31 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2019
+#
+# Authors:
+#  Quirin Gylstorff <quirin.gylstorff@siemens.com>
+#
+# SPDX-License-Identifier: MIT
+#
+
+require xenomai.inc
+
+SRC_URI = " \
+    git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=stable/v3.0.x"
+SRCREV = "${AUTOREV}"
+PV = "stable-${SRCREV}"
+S = "${WORKDIR}/git"
+do_prepare_build_append() {
+# The xenomai-kernel-source package is supposed to contain the config
+# directory. But the rules files does not copy the folder to /usr/src
+	sudo sed -i 's/cp -a kernel include scripts/cp -a config kernel include scripts/' ${S}/debian/rules
+}
+
+dpkg_runbuild_prepend() {
+    bbplain $(printf "xenomai-stable: Building revision %.12s\n" \
+                     $(cat ${S}/.git/refs/heads/stable/v3.0.x))
+
+    sudo chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \
+        sh -c "cd ${PP}/${PPS}; scripts/bootstrap"
+}
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [xenomai-images][PATCH] recipes-xenomai: Add recipes for all major branches
  2019-08-12 12:46 [xenomai-images][PATCH] recipes-xenomai: Add recipes for all major branches Q. Gylstorff
@ 2019-08-12 12:57 ` Jan Kiszka
  2019-08-12 13:32   ` Quirin Gylstorff
  2019-08-13 11:43 ` [xenomai-images][PATCH v2] " Q. Gylstorff
  1 sibling, 1 reply; 9+ messages in thread
From: Jan Kiszka @ 2019-08-12 12:57 UTC (permalink / raw)
  To: Q. Gylstorff, xenomai

On 12.08.19 14:46, Q. Gylstorff wrote:
> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> 
> For testing it should be possible to switch between different
> xenomai versions. Select the version by adding the
> following line to kas.yml with:
>    xenomai-version: |
>      PREFERRED_VERSION_xenomai = "<version>"
>   e.g. the latest master branch with:
>    xenomai-version: |
>      PREFERRED_VERSION_xenomai = "master-AUTOINC"
> 
> The directory build/tmp must be deleted between versions.
> 
> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> ---
>   kas.yml                                   |  3 +++
>   recipes-xenomai/xenomai/xenomai_3.0.9.bb  | 32 +++++++++++++++++++++++
>   recipes-xenomai/xenomai/xenomai_master.bb | 26 ++++++++++++++++++
>   recipes-xenomai/xenomai/xenomai_next.bb   |  4 +--
>   recipes-xenomai/xenomai/xenomai_stable.bb | 31 ++++++++++++++++++++++
>   5 files changed, 94 insertions(+), 2 deletions(-)
>   create mode 100644 recipes-xenomai/xenomai/xenomai_3.0.9.bb
>   create mode 100644 recipes-xenomai/xenomai/xenomai_master.bb
>   create mode 100644 recipes-xenomai/xenomai/xenomai_stable.bb
> 
> diff --git a/kas.yml b/kas.yml
> index 3694bcc..506f1f4 100644
> --- a/kas.yml
> +++ b/kas.yml
> @@ -35,3 +35,6 @@ local_conf_header:
>       CONF_VERSION = "1"
>     cross: |
>       ISAR_CROSS_COMPILE = "1"
> +  xenomai-version: |
> +    PREFERRED_VERSION_xenomai = "stable-AUTOINC"
> +
> diff --git a/recipes-xenomai/xenomai/xenomai_3.0.9.bb b/recipes-xenomai/xenomai/xenomai_3.0.9.bb
> new file mode 100644
> index 0000000..2db26a1
> --- /dev/null
> +++ b/recipes-xenomai/xenomai/xenomai_3.0.9.bb
> @@ -0,0 +1,32 @@
> +#
> +# Xenomai Real-Time System
> +#
> +# Copyright (c) Siemens AG, 2019
> +#
> +# Authors:
> +#  Quirin Gylstorff <quirin.gylstorff@siemens.com>
> +#
> +# SPDX-License-Identifier: MIT
> +#
> +
> +require xenomai.inc
> +
> +SRC_URI = " \
> +    git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=stable/v3.0.x;tag=v${PV}"
> +
> +S = "${WORKDIR}/git"
> +
> +do_prepare_build_append() {
> +# The xenomai-kernel-source package is supposed to contain the config
> +# directory. But the rules files does not copy the folder to /usr/src

Indention.

> +	sudo sed -i 's/cp -a kernel include scripts/cp -a config kernel include scripts/' ${S}/debian/rules

Including "debian: Add config folder to xenomai-kernel-source" into stable would 
do that as well?

BTW, what about "debian: Enable SMP in userspace package" for stable?

> +}
> +
> +dpkg_runbuild_prepend() {
> +    bbplain $(printf "xenomai-v${PV}: Building revision %.12s\n" \
> +                     $(cat ${S}/.git/refs/tags/v{PV}))
> +
> +
> +    sudo chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \
> +        sh -c "cd ${PP}/${PPS}; scripts/bootstrap"
> +}

Can we put the common parts into xenomai.inc?

> diff --git a/recipes-xenomai/xenomai/xenomai_master.bb b/recipes-xenomai/xenomai/xenomai_master.bb
> new file mode 100644
> index 0000000..c058aa0
> --- /dev/null
> +++ b/recipes-xenomai/xenomai/xenomai_master.bb
> @@ -0,0 +1,26 @@
> +#
> +# Xenomai Real-Time System
> +#
> +# Copyright (c) Siemens AG, 2019
> +#
> +# Authors:
> +#  Quirin Gylstorff <quirin.gylstorff@siemens.com>
> +#
> +# SPDX-License-Identifier: MIT
> +#
> +
> +require xenomai.inc
> +
> +SRC_URI = " \
> +    git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=master"
> +SRCREV = "${AUTOREV}"
> +PV = "master-${SRCREV}"
> +S = "${WORKDIR}/git"
> +
> +dpkg_runbuild_prepend() {
> +    bbplain $(printf "xenomai-master: Building revision %.12s\n" \
> +                     $(cat ${S}/.git/refs/heads/master))
> +
> +    sudo chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \
> +        sh -c "cd ${PP}/${PPS}; scripts/bootstrap"
> +}
> diff --git a/recipes-xenomai/xenomai/xenomai_next.bb b/recipes-xenomai/xenomai/xenomai_next.bb
> index 72e5758..2efbd3f 100644
> --- a/recipes-xenomai/xenomai/xenomai_next.bb
> +++ b/recipes-xenomai/xenomai/xenomai_next.bb
> @@ -13,8 +13,8 @@ require xenomai.inc
>   
>   SRC_URI = " \
>       git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=next"
> -SRCREV = "next"
> -PV = "9999-next"
> +SRCREV = "${AUTOREV}"
> +PV = "next-${SRCREV}"
>   
>   S = "${WORKDIR}/git"
>   
> diff --git a/recipes-xenomai/xenomai/xenomai_stable.bb b/recipes-xenomai/xenomai/xenomai_stable.bb
> new file mode 100644
> index 0000000..3c408a3
> --- /dev/null
> +++ b/recipes-xenomai/xenomai/xenomai_stable.bb
> @@ -0,0 +1,31 @@
> +#
> +# Xenomai Real-Time System
> +#
> +# Copyright (c) Siemens AG, 2019
> +#
> +# Authors:
> +#  Quirin Gylstorff <quirin.gylstorff@siemens.com>
> +#
> +# SPDX-License-Identifier: MIT
> +#
> +
> +require xenomai.inc
> +
> +SRC_URI = " \
> +    git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=stable/v3.0.x"
> +SRCREV = "${AUTOREV}"
> +PV = "stable-${SRCREV}"
> +S = "${WORKDIR}/git"
> +do_prepare_build_append() {
> +# The xenomai-kernel-source package is supposed to contain the config
> +# directory. But the rules files does not copy the folder to /usr/src
> +	sudo sed -i 's/cp -a kernel include scripts/cp -a config kernel include scripts/' ${S}/debian/rules
> +}
> +
> +dpkg_runbuild_prepend() {
> +    bbplain $(printf "xenomai-stable: Building revision %.12s\n" \
> +                     $(cat ${S}/.git/refs/heads/stable/v3.0.x))
> +
> +    sudo chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \
> +        sh -c "cd ${PP}/${PPS}; scripts/bootstrap"
> +}
> 

Valuable enhancements!

Thanks,
Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [xenomai-images][PATCH] recipes-xenomai: Add recipes for all major branches
  2019-08-12 12:57 ` Jan Kiszka
@ 2019-08-12 13:32   ` Quirin Gylstorff
  2019-08-12 13:44     ` Jan Kiszka
  0 siblings, 1 reply; 9+ messages in thread
From: Quirin Gylstorff @ 2019-08-12 13:32 UTC (permalink / raw)
  To: Jan Kiszka, xenomai



On 8/12/19 2:57 PM, Jan Kiszka wrote:
> On 12.08.19 14:46, Q. Gylstorff wrote:
>> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>>
>> For testing it should be possible to switch between different
>> xenomai versions. Select the version by adding the
>> following line to kas.yml with:
>>    xenomai-version: |
>>      PREFERRED_VERSION_xenomai = "<version>"
>>   e.g. the latest master branch with:
>>    xenomai-version: |
>>      PREFERRED_VERSION_xenomai = "master-AUTOINC"
>>
>> The directory build/tmp must be deleted between versions.
>>
>> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>> ---
>>   kas.yml                                   |  3 +++
>>   recipes-xenomai/xenomai/xenomai_3.0.9.bb  | 32 +++++++++++++++++++++++
>>   recipes-xenomai/xenomai/xenomai_master.bb | 26 ++++++++++++++++++
>>   recipes-xenomai/xenomai/xenomai_next.bb   |  4 +--
>>   recipes-xenomai/xenomai/xenomai_stable.bb | 31 ++++++++++++++++++++++
>>   5 files changed, 94 insertions(+), 2 deletions(-)
>>   create mode 100644 recipes-xenomai/xenomai/xenomai_3.0.9.bb
>>   create mode 100644 recipes-xenomai/xenomai/xenomai_master.bb
>>   create mode 100644 recipes-xenomai/xenomai/xenomai_stable.bb
>>
>> diff --git a/kas.yml b/kas.yml
>> index 3694bcc..506f1f4 100644
>> --- a/kas.yml
>> +++ b/kas.yml
>> @@ -35,3 +35,6 @@ local_conf_header:
>>       CONF_VERSION = "1"
>>     cross: |
>>       ISAR_CROSS_COMPILE = "1"
>> +  xenomai-version: |
>> +    PREFERRED_VERSION_xenomai = "stable-AUTOINC"
>> +
>> diff --git a/recipes-xenomai/xenomai/xenomai_3.0.9.bb 
>> b/recipes-xenomai/xenomai/xenomai_3.0.9.bb
>> new file mode 100644
>> index 0000000..2db26a1
>> --- /dev/null
>> +++ b/recipes-xenomai/xenomai/xenomai_3.0.9.bb
>> @@ -0,0 +1,32 @@
>> +#
>> +# Xenomai Real-Time System
>> +#
>> +# Copyright (c) Siemens AG, 2019
>> +#
>> +# Authors:
>> +#  Quirin Gylstorff <quirin.gylstorff@siemens.com>
>> +#
>> +# SPDX-License-Identifier: MIT
>> +#
>> +
>> +require xenomai.inc
>> +
>> +SRC_URI = " \
>> +    
>> git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=stable/v3.0.x;tag=v${PV}" 
>>
>> +
>> +S = "${WORKDIR}/git"
>> +
>> +do_prepare_build_append() {
>> +# The xenomai-kernel-source package is supposed to contain the config
>> +# directory. But the rules files does not copy the folder to /usr/src
> 
> Indention.
>

Will fix it.

>> +    sudo sed -i 's/cp -a kernel include scripts/cp -a config kernel 
>> include scripts/' ${S}/debian/rules
> 
> Including "debian: Add config folder to xenomai-kernel-source" into 
> stable would do that as well?

Yes, the patch would be sufficient in stable to compile it with ISAR.

> 
> BTW, what about "debian: Enable SMP in userspace package" for stable?

For building it would be not necessary, but for future testing it would 
be nice to have SMP available.

> 
>> +}
>> +
>> +dpkg_runbuild_prepend() {
>> +    bbplain $(printf "xenomai-v${PV}: Building revision %.12s\n" \
>> +                     $(cat ${S}/.git/refs/tags/v{PV}))
>> +
>> +
>> +    sudo chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \
>> +        sh -c "cd ${PP}/${PPS}; scripts/bootstrap"
>> +}
> 
> Can we put the common parts into xenomai.inc?


For the builds which are building the latest of each branch, yes for a 
tagged version another reference is used or I will add git rev-parse HEAD.

> 
>> diff --git a/recipes-xenomai/xenomai/xenomai_master.bb 
>> b/recipes-xenomai/xenomai/xenomai_master.bb
>> new file mode 100644
>> index 0000000..c058aa0
>> --- /dev/null
>> +++ b/recipes-xenomai/xenomai/xenomai_master.bb
>> @@ -0,0 +1,26 @@
>> +#
>> +# Xenomai Real-Time System
>> +#
>> +# Copyright (c) Siemens AG, 2019
>> +#
>> +# Authors:
>> +#  Quirin Gylstorff <quirin.gylstorff@siemens.com>
>> +#
>> +# SPDX-License-Identifier: MIT
>> +#
>> +
>> +require xenomai.inc
>> +
>> +SRC_URI = " \
>> +    
>> git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=master"
>> +SRCREV = "${AUTOREV}"
>> +PV = "master-${SRCREV}"
>> +S = "${WORKDIR}/git"
>> +
>> +dpkg_runbuild_prepend() {
>> +    bbplain $(printf "xenomai-master: Building revision %.12s\n" \
>> +                     $(cat ${S}/.git/refs/heads/master))
>> +
>> +    sudo chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \
>> +        sh -c "cd ${PP}/${PPS}; scripts/bootstrap"
>> +}
>> diff --git a/recipes-xenomai/xenomai/xenomai_next.bb 
>> b/recipes-xenomai/xenomai/xenomai_next.bb
>> index 72e5758..2efbd3f 100644
>> --- a/recipes-xenomai/xenomai/xenomai_next.bb
>> +++ b/recipes-xenomai/xenomai/xenomai_next.bb
>> @@ -13,8 +13,8 @@ require xenomai.inc
>>   SRC_URI = " \
>>       
>> git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=next"
>> -SRCREV = "next"
>> -PV = "9999-next"
>> +SRCREV = "${AUTOREV}"
>> +PV = "next-${SRCREV}"
>>   S = "${WORKDIR}/git"
>> diff --git a/recipes-xenomai/xenomai/xenomai_stable.bb 
>> b/recipes-xenomai/xenomai/xenomai_stable.bb
>> new file mode 100644
>> index 0000000..3c408a3
>> --- /dev/null
>> +++ b/recipes-xenomai/xenomai/xenomai_stable.bb
>> @@ -0,0 +1,31 @@
>> +#
>> +# Xenomai Real-Time System
>> +#
>> +# Copyright (c) Siemens AG, 2019
>> +#
>> +# Authors:
>> +#  Quirin Gylstorff <quirin.gylstorff@siemens.com>
>> +#
>> +# SPDX-License-Identifier: MIT
>> +#
>> +
>> +require xenomai.inc
>> +
>> +SRC_URI = " \
>> +    
>> git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=stable/v3.0.x" 
>>
>> +SRCREV = "${AUTOREV}"
>> +PV = "stable-${SRCREV}"
>> +S = "${WORKDIR}/git"
>> +do_prepare_build_append() {
>> +# The xenomai-kernel-source package is supposed to contain the config
>> +# directory. But the rules files does not copy the folder to /usr/src
>> +    sudo sed -i 's/cp -a kernel include scripts/cp -a config kernel 
>> include scripts/' ${S}/debian/rules
>> +}
>> +
>> +dpkg_runbuild_prepend() {
>> +    bbplain $(printf "xenomai-stable: Building revision %.12s\n" \
>> +                     $(cat ${S}/.git/refs/heads/stable/v3.0.x))
>> +
>> +    sudo chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \
>> +        sh -c "cd ${PP}/${PPS}; scripts/bootstrap"
>> +}
>>
> 
> Valuable enhancements!
> 
> Thanks,
> Jan
> 
Best regards,
Quirin


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [xenomai-images][PATCH] recipes-xenomai: Add recipes for all major branches
  2019-08-12 13:32   ` Quirin Gylstorff
@ 2019-08-12 13:44     ` Jan Kiszka
  0 siblings, 0 replies; 9+ messages in thread
From: Jan Kiszka @ 2019-08-12 13:44 UTC (permalink / raw)
  To: Quirin Gylstorff, xenomai

On 12.08.19 15:32, Quirin Gylstorff wrote:
> 
> 
> On 8/12/19 2:57 PM, Jan Kiszka wrote:
>> On 12.08.19 14:46, Q. Gylstorff wrote:
>>> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>>>
>>> For testing it should be possible to switch between different
>>> xenomai versions. Select the version by adding the
>>> following line to kas.yml with:
>>>    xenomai-version: |
>>>      PREFERRED_VERSION_xenomai = "<version>"
>>>   e.g. the latest master branch with:
>>>    xenomai-version: |
>>>      PREFERRED_VERSION_xenomai = "master-AUTOINC"
>>>
>>> The directory build/tmp must be deleted between versions.
>>>
>>> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>>> ---
>>>   kas.yml                                   |  3 +++
>>>   recipes-xenomai/xenomai/xenomai_3.0.9.bb  | 32 +++++++++++++++++++++++
>>>   recipes-xenomai/xenomai/xenomai_master.bb | 26 ++++++++++++++++++
>>>   recipes-xenomai/xenomai/xenomai_next.bb   |  4 +--
>>>   recipes-xenomai/xenomai/xenomai_stable.bb | 31 ++++++++++++++++++++++
>>>   5 files changed, 94 insertions(+), 2 deletions(-)
>>>   create mode 100644 recipes-xenomai/xenomai/xenomai_3.0.9.bb
>>>   create mode 100644 recipes-xenomai/xenomai/xenomai_master.bb
>>>   create mode 100644 recipes-xenomai/xenomai/xenomai_stable.bb
>>>
>>> diff --git a/kas.yml b/kas.yml
>>> index 3694bcc..506f1f4 100644
>>> --- a/kas.yml
>>> +++ b/kas.yml
>>> @@ -35,3 +35,6 @@ local_conf_header:
>>>       CONF_VERSION = "1"
>>>     cross: |
>>>       ISAR_CROSS_COMPILE = "1"
>>> +  xenomai-version: |
>>> +    PREFERRED_VERSION_xenomai = "stable-AUTOINC"
>>> +
>>> diff --git a/recipes-xenomai/xenomai/xenomai_3.0.9.bb 
>>> b/recipes-xenomai/xenomai/xenomai_3.0.9.bb
>>> new file mode 100644
>>> index 0000000..2db26a1
>>> --- /dev/null
>>> +++ b/recipes-xenomai/xenomai/xenomai_3.0.9.bb
>>> @@ -0,0 +1,32 @@
>>> +#
>>> +# Xenomai Real-Time System
>>> +#
>>> +# Copyright (c) Siemens AG, 2019
>>> +#
>>> +# Authors:
>>> +#  Quirin Gylstorff <quirin.gylstorff@siemens.com>
>>> +#
>>> +# SPDX-License-Identifier: MIT
>>> +#
>>> +
>>> +require xenomai.inc
>>> +
>>> +SRC_URI = " \
>>> + 
>>> git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=stable/v3.0.x;tag=v${PV}" 
>>>
>>> +
>>> +S = "${WORKDIR}/git"
>>> +
>>> +do_prepare_build_append() {
>>> +# The xenomai-kernel-source package is supposed to contain the config
>>> +# directory. But the rules files does not copy the folder to /usr/src
>>
>> Indention.
>>
> 
> Will fix it.
> 
>>> +    sudo sed -i 's/cp -a kernel include scripts/cp -a config kernel include 
>>> scripts/' ${S}/debian/rules
>>
>> Including "debian: Add config folder to xenomai-kernel-source" into stable 
>> would do that as well?
> 
> Yes, the patch would be sufficient in stable to compile it with ISAR.

Then let's carry the patch for 3.0.9, and I will merge it for the next 3.0 release.

> 
>>
>> BTW, what about "debian: Enable SMP in userspace package" for stable?
> 
> For building it would be not necessary, but for future testing it would be nice 
> to have SMP available.

Try running a non-smp userland on an SMP system, e.g. via start-qemu.sh...

> 
>>
>>> +}
>>> +
>>> +dpkg_runbuild_prepend() {
>>> +    bbplain $(printf "xenomai-v${PV}: Building revision %.12s\n" \
>>> +                     $(cat ${S}/.git/refs/tags/v{PV}))
>>> +
>>> +
>>> +    sudo chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \
>>> +        sh -c "cd ${PP}/${PPS}; scripts/bootstrap"
>>> +}
>>
>> Can we put the common parts into xenomai.inc?
> 
> 
> For the builds which are building the latest of each branch, yes for a tagged 
> version another reference is used or I will add git rev-parse HEAD.
> 

I'm sure even that could be abstracted away by a variable.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [xenomai-images][PATCH v2] recipes-xenomai: Add recipes for all major branches
  2019-08-12 12:46 [xenomai-images][PATCH] recipes-xenomai: Add recipes for all major branches Q. Gylstorff
  2019-08-12 12:57 ` Jan Kiszka
@ 2019-08-13 11:43 ` Q. Gylstorff
  2019-08-13 14:29   ` Jan Kiszka
  1 sibling, 1 reply; 9+ messages in thread
From: Q. Gylstorff @ 2019-08-13 11:43 UTC (permalink / raw)
  To: xenomai; +Cc: Quirin Gylstorff, Jan Kiszka

From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

For testing it should be possible to switch between different
xenomai versions. Select the version by adding the
following line to kas.yml with:
  xenomai-version: |
    PREFERRED_VERSION_xenomai = "<version>"
 e.g. the latest master branch with:
  xenomai-version: |
    PREFERRED_VERSION_xenomai = "master"

Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
Changes:
v2:
 - fix identation
 - move functions to xenomai.inc
 - use bitbake to get commitid
 - add enable-smp to stable
 - remove AUTOINC from version - feature is not yet available in ISAR 

 kas.yml                                   |  2 ++
 recipes-xenomai/xenomai/xenomai.inc       | 25 +++++++++++++++++++++++
 recipes-xenomai/xenomai/xenomai_3.0.9.bb  | 20 ++++++++++++++++++
 recipes-xenomai/xenomai/xenomai_master.bb | 19 +++++++++++++++++
 recipes-xenomai/xenomai/xenomai_next.bb   | 10 ++-------
 recipes-xenomai/xenomai/xenomai_stable.bb | 20 ++++++++++++++++++
 6 files changed, 88 insertions(+), 8 deletions(-)
 create mode 100644 recipes-xenomai/xenomai/xenomai_3.0.9.bb
 create mode 100644 recipes-xenomai/xenomai/xenomai_master.bb
 create mode 100644 recipes-xenomai/xenomai/xenomai_stable.bb

diff --git a/kas.yml b/kas.yml
index 3694bcc..2bf62d4 100644
--- a/kas.yml
+++ b/kas.yml
@@ -35,3 +35,5 @@ local_conf_header:
     CONF_VERSION = "1"
   cross: |
     ISAR_CROSS_COMPILE = "1"
+  xenomai-version: |
+    PREFERRED_VERSION_xenomai = "stable"
diff --git a/recipes-xenomai/xenomai/xenomai.inc b/recipes-xenomai/xenomai/xenomai.inc
index 5559829..e7a2901 100644
--- a/recipes-xenomai/xenomai/xenomai.inc
+++ b/recipes-xenomai/xenomai/xenomai.inc
@@ -13,6 +13,8 @@ inherit dpkg
 
 PROVIDES += "xenomai-kernel-source xenomai-runtime"
 
+# use bitbake get_srcrev to get the current commit id
+COMMIT="${@bb.fetch2.get_srcrev(d).strip('AUTOINC+')}"
 do_prepare_build() {
 	# The xenomai-kernel-source package is supposed to be generic, but we
 	# build it per architecture in Isar, and those packages happen to be
@@ -20,3 +22,26 @@ do_prepare_build() {
 	# target architecture to avoid conflicts.
 	sudo sed -i 's/Architecture: all/Architecture: any/' ${S}/debian/control
 }
+
+# this function is only necessary for stable as long as 
+# "debian: Add config folder to xenomai-kernel-source" and
+# "debian: Enable SMP in userspace package"
+# are not part of the stable branch
+do_prepare_stable_for_build() {
+    # Enable smp for userspace packages
+    sudo sed -i \
+    's/--with-testdir=\/usr\/lib\/xenomai\/testsuite/--with-testdir=\/usr\/lib\/xenomai\/testsuite \\\n\t    --enable-smp/' \
+    ${S}/debian/rules
+    # The xenomai-kernel-source package is supposed to contain the config
+    # directory. But the rules files does not copy the folder to /usr/src
+    sudo sed -i 's/cp -a kernel include scripts/cp -a config kernel include scripts/' ${S}/debian/rules
+}
+
+
+dpkg_runbuild_prepend() {
+    bbplain $(printf "xenomai-%s: Building revision %.20s\n" \
+                     ${PV} ${COMMIT})
+
+    sudo chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \
+        sh -c "cd ${PP}/${PPS}; scripts/bootstrap"
+}
\ No newline at end of file
diff --git a/recipes-xenomai/xenomai/xenomai_3.0.9.bb b/recipes-xenomai/xenomai/xenomai_3.0.9.bb
new file mode 100644
index 0000000..6fb3ff8
--- /dev/null
+++ b/recipes-xenomai/xenomai/xenomai_3.0.9.bb
@@ -0,0 +1,20 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2019
+#
+# Authors:
+#  Quirin Gylstorff <quirin.gylstorff@siemens.com>
+#
+# SPDX-License-Identifier: MIT
+#
+
+require xenomai.inc
+SRC_URI = " \
+    git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=stable/v3.0.x;tag=v${PV} \
+    "
+S = "${WORKDIR}/git"
+
+addtask prepare_stable_for_build before do_prepare_build after do_patch
+
+
diff --git a/recipes-xenomai/xenomai/xenomai_master.bb b/recipes-xenomai/xenomai/xenomai_master.bb
new file mode 100644
index 0000000..d95ede6
--- /dev/null
+++ b/recipes-xenomai/xenomai/xenomai_master.bb
@@ -0,0 +1,19 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2019
+#
+# Authors:
+#  Quirin Gylstorff <quirin.gylstorff@siemens.com>
+#
+# SPDX-License-Identifier: MIT
+#
+
+require xenomai.inc
+
+SRC_URI = " \
+    git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=master"
+SRCREV = "${AUTOREV}"
+PV = "master"
+S = "${WORKDIR}/git"
+
diff --git a/recipes-xenomai/xenomai/xenomai_next.bb b/recipes-xenomai/xenomai/xenomai_next.bb
index 72e5758..e216124 100644
--- a/recipes-xenomai/xenomai/xenomai_next.bb
+++ b/recipes-xenomai/xenomai/xenomai_next.bb
@@ -13,15 +13,9 @@ require xenomai.inc
 
 SRC_URI = " \
     git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=next"
-SRCREV = "next"
-PV = "9999-next"
+SRCREV = "${AUTOREV}" 
+PV = "next"
 
 S = "${WORKDIR}/git"
 
-dpkg_runbuild_prepend() {
-    bbplain $(printf "xenomai-next: Building revision %.12s\n" \
-                     $(cat ${S}/.git/refs/heads/next))
 
-    sudo chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \
-        sh -c "cd ${PP}/${PPS}; scripts/bootstrap"
-}
diff --git a/recipes-xenomai/xenomai/xenomai_stable.bb b/recipes-xenomai/xenomai/xenomai_stable.bb
new file mode 100644
index 0000000..bb77ec9
--- /dev/null
+++ b/recipes-xenomai/xenomai/xenomai_stable.bb
@@ -0,0 +1,20 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2019
+#
+# Authors:
+#  Quirin Gylstorff <quirin.gylstorff@siemens.com>
+#
+# SPDX-License-Identifier: MIT
+#
+
+require xenomai.inc
+
+SRC_URI = " \
+    git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=stable/v3.0.x"
+SRCREV = "${AUTOREV}"
+PV = "stable"
+S = "${WORKDIR}/git"
+
+addtask prepare_stable_for_build before do_prepare_build after do_patch
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [xenomai-images][PATCH v2] recipes-xenomai: Add recipes for all major branches
  2019-08-13 11:43 ` [xenomai-images][PATCH v2] " Q. Gylstorff
@ 2019-08-13 14:29   ` Jan Kiszka
  2019-08-13 15:28     ` [PATCH v3] " Q. Gylstorff
  0 siblings, 1 reply; 9+ messages in thread
From: Jan Kiszka @ 2019-08-13 14:29 UTC (permalink / raw)
  To: Q. Gylstorff, xenomai

On 13.08.19 13:43, Q. Gylstorff wrote:
> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> 
> For testing it should be possible to switch between different
> xenomai versions. Select the version by adding the
> following line to kas.yml with:
>    xenomai-version: |
>      PREFERRED_VERSION_xenomai = "<version>"
>   e.g. the latest master branch with:
>    xenomai-version: |
>      PREFERRED_VERSION_xenomai = "master"
> 
> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> ---
> Changes:
> v2:
>   - fix identation
>   - move functions to xenomai.inc
>   - use bitbake to get commitid
>   - add enable-smp to stable
>   - remove AUTOINC from version - feature is not yet available in ISAR
> 
>   kas.yml                                   |  2 ++
>   recipes-xenomai/xenomai/xenomai.inc       | 25 +++++++++++++++++++++++
>   recipes-xenomai/xenomai/xenomai_3.0.9.bb  | 20 ++++++++++++++++++
>   recipes-xenomai/xenomai/xenomai_master.bb | 19 +++++++++++++++++
>   recipes-xenomai/xenomai/xenomai_next.bb   | 10 ++-------
>   recipes-xenomai/xenomai/xenomai_stable.bb | 20 ++++++++++++++++++
>   6 files changed, 88 insertions(+), 8 deletions(-)
>   create mode 100644 recipes-xenomai/xenomai/xenomai_3.0.9.bb
>   create mode 100644 recipes-xenomai/xenomai/xenomai_master.bb
>   create mode 100644 recipes-xenomai/xenomai/xenomai_stable.bb
> 
> diff --git a/kas.yml b/kas.yml
> index 3694bcc..2bf62d4 100644
> --- a/kas.yml
> +++ b/kas.yml
> @@ -35,3 +35,5 @@ local_conf_header:
>       CONF_VERSION = "1"
>     cross: |
>       ISAR_CROSS_COMPILE = "1"
> +  xenomai-version: |
> +    PREFERRED_VERSION_xenomai = "stable"
> diff --git a/recipes-xenomai/xenomai/xenomai.inc b/recipes-xenomai/xenomai/xenomai.inc
> index 5559829..e7a2901 100644
> --- a/recipes-xenomai/xenomai/xenomai.inc
> +++ b/recipes-xenomai/xenomai/xenomai.inc
> @@ -13,6 +13,8 @@ inherit dpkg
>   
>   PROVIDES += "xenomai-kernel-source xenomai-runtime"
>   
> +# use bitbake get_srcrev to get the current commit id
> +COMMIT="${@bb.fetch2.get_srcrev(d).strip('AUTOINC+')}"
>   do_prepare_build() {
>   	# The xenomai-kernel-source package is supposed to be generic, but we
>   	# build it per architecture in Isar, and those packages happen to be
> @@ -20,3 +22,26 @@ do_prepare_build() {
>   	# target architecture to avoid conflicts.
>   	sudo sed -i 's/Architecture: all/Architecture: any/' ${S}/debian/control
>   }
> +
> +# this function is only necessary for stable as long as
> +# "debian: Add config folder to xenomai-kernel-source" and
> +# "debian: Enable SMP in userspace package"
> +# are not part of the stable branch
> +do_prepare_stable_for_build() {
> +    # Enable smp for userspace packages
> +    sudo sed -i \
> +    's/--with-testdir=\/usr\/lib\/xenomai\/testsuite/--with-testdir=\/usr\/lib\/xenomai\/testsuite \\\n\t    --enable-smp/' \
> +    ${S}/debian/rules
> +    # The xenomai-kernel-source package is supposed to contain the config
> +    # directory. But the rules files does not copy the folder to /usr/src
> +    sudo sed -i 's/cp -a kernel include scripts/cp -a config kernel include scripts/' ${S}/debian/rules
> +}

Why not carring the patch files instead? Both apply cleanly to stable. Will also 
push them soon.

> +
> +
> +dpkg_runbuild_prepend() {
> +    bbplain $(printf "xenomai-%s: Building revision %.20s\n" \
> +                     ${PV} ${COMMIT})
> +
> +    sudo chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \
> +        sh -c "cd ${PP}/${PPS}; scripts/bootstrap"
> +}
> \ No newline at end of file

Would be nice to have. You can take one from...

> diff --git a/recipes-xenomai/xenomai/xenomai_3.0.9.bb b/recipes-xenomai/xenomai/xenomai_3.0.9.bb
> new file mode 100644
> index 0000000..6fb3ff8
> --- /dev/null
> +++ b/recipes-xenomai/xenomai/xenomai_3.0.9.bb
> @@ -0,0 +1,20 @@
> +#
> +# Xenomai Real-Time System
> +#
> +# Copyright (c) Siemens AG, 2019
> +#
> +# Authors:
> +#  Quirin Gylstorff <quirin.gylstorff@siemens.com>
> +#
> +# SPDX-License-Identifier: MIT
> +#
> +
> +require xenomai.inc
> +SRC_URI = " \
> +    git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=stable/v3.0.x;tag=v${PV} \
> +    "
> +S = "${WORKDIR}/git"
> +
> +addtask prepare_stable_for_build before do_prepare_build after do_patch
> +
> +

...here where there are enough at the end. ;)

> diff --git a/recipes-xenomai/xenomai/xenomai_master.bb b/recipes-xenomai/xenomai/xenomai_master.bb
> new file mode 100644
> index 0000000..d95ede6
> --- /dev/null
> +++ b/recipes-xenomai/xenomai/xenomai_master.bb
> @@ -0,0 +1,19 @@
> +#
> +# Xenomai Real-Time System
> +#
> +# Copyright (c) Siemens AG, 2019
> +#
> +# Authors:
> +#  Quirin Gylstorff <quirin.gylstorff@siemens.com>
> +#
> +# SPDX-License-Identifier: MIT
> +#
> +
> +require xenomai.inc
> +
> +SRC_URI = " \
> +    git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=master"
> +SRCREV = "${AUTOREV}"
> +PV = "master"
> +S = "${WORKDIR}/git"
> +
> diff --git a/recipes-xenomai/xenomai/xenomai_next.bb b/recipes-xenomai/xenomai/xenomai_next.bb
> index 72e5758..e216124 100644
> --- a/recipes-xenomai/xenomai/xenomai_next.bb
> +++ b/recipes-xenomai/xenomai/xenomai_next.bb
> @@ -13,15 +13,9 @@ require xenomai.inc
>   
>   SRC_URI = " \
>       git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=next"
> -SRCREV = "next"
> -PV = "9999-next"
> +SRCREV = "${AUTOREV}"
> +PV = "next"
>   
>   S = "${WORKDIR}/git"
>   
> -dpkg_runbuild_prepend() {
> -    bbplain $(printf "xenomai-next: Building revision %.12s\n" \
> -                     $(cat ${S}/.git/refs/heads/next))
>   
> -    sudo chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \
> -        sh -c "cd ${PP}/${PPS}; scripts/bootstrap"
> -}
> diff --git a/recipes-xenomai/xenomai/xenomai_stable.bb b/recipes-xenomai/xenomai/xenomai_stable.bb
> new file mode 100644
> index 0000000..bb77ec9
> --- /dev/null
> +++ b/recipes-xenomai/xenomai/xenomai_stable.bb
> @@ -0,0 +1,20 @@
> +#
> +# Xenomai Real-Time System
> +#
> +# Copyright (c) Siemens AG, 2019
> +#
> +# Authors:
> +#  Quirin Gylstorff <quirin.gylstorff@siemens.com>
> +#
> +# SPDX-License-Identifier: MIT
> +#
> +
> +require xenomai.inc
> +
> +SRC_URI = " \
> +    git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=stable/v3.0.x"
> +SRCREV = "${AUTOREV}"
> +PV = "stable"
> +S = "${WORKDIR}/git"
> +
> +addtask prepare_stable_for_build before do_prepare_build after do_patch
> 

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v3] recipes-xenomai: Add recipes for all major branches
  2019-08-13 14:29   ` Jan Kiszka
@ 2019-08-13 15:28     ` Q. Gylstorff
  2019-08-14 11:21       ` Jan Kiszka
  0 siblings, 1 reply; 9+ messages in thread
From: Q. Gylstorff @ 2019-08-13 15:28 UTC (permalink / raw)
  To: xenomai; +Cc: Quirin Gylstorff, Jan Kiszka

From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

For testing it should be possible to switch between different
xenomai versions. Select the version by adding the
following line to kas.yml with:
  xenomai-version: |
    PREFERRED_VERSION_xenomai = "<version>"
 e.g. the latest master branch with:
  xenomai-version: |
    PREFERRED_VERSION_xenomai = "master"

Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
Changes:
v3:
 - fix newlines
 - use patches instead of sed
v2:
 - fix identation
 - move functions to xenomai.inc
 - use bitbake to get commitid
 - add enable-smp to stable
 - remove AUTOINC from version - feature is not yet available in ISAR 

 kas.yml                                       |  2 ++
 ...nfig-folder-to-xenomai-kernel-source.patch | 29 +++++++++++++++++
 ...bian-Enable-SMP-in-userspace-package.patch | 31 +++++++++++++++++++
 recipes-xenomai/xenomai/xenomai.inc           | 10 ++++++
 recipes-xenomai/xenomai/xenomai_3.0.9.bb      | 18 +++++++++++
 recipes-xenomai/xenomai/xenomai_master.bb     | 19 ++++++++++++
 recipes-xenomai/xenomai/xenomai_next.bb       | 10 ++----
 recipes-xenomai/xenomai/xenomai_stable.bb     | 22 +++++++++++++
 8 files changed, 133 insertions(+), 8 deletions(-)
 create mode 100644 recipes-xenomai/xenomai/files/0001-debian-Add-config-folder-to-xenomai-kernel-source.patch
 create mode 100644 recipes-xenomai/xenomai/files/0001-debian-Enable-SMP-in-userspace-package.patch
 create mode 100644 recipes-xenomai/xenomai/xenomai_3.0.9.bb
 create mode 100644 recipes-xenomai/xenomai/xenomai_master.bb
 create mode 100644 recipes-xenomai/xenomai/xenomai_stable.bb

diff --git a/kas.yml b/kas.yml
index 3694bcc..2bf62d4 100644
--- a/kas.yml
+++ b/kas.yml
@@ -35,3 +35,5 @@ local_conf_header:
     CONF_VERSION = "1"
   cross: |
     ISAR_CROSS_COMPILE = "1"
+  xenomai-version: |
+    PREFERRED_VERSION_xenomai = "stable"
diff --git a/recipes-xenomai/xenomai/files/0001-debian-Add-config-folder-to-xenomai-kernel-source.patch b/recipes-xenomai/xenomai/files/0001-debian-Add-config-folder-to-xenomai-kernel-source.patch
new file mode 100644
index 0000000..3be4fb3
--- /dev/null
+++ b/recipes-xenomai/xenomai/files/0001-debian-Add-config-folder-to-xenomai-kernel-source.patch
@@ -0,0 +1,29 @@
+From 07d87b9b2ca45f81024056720b28f6cdbcb3b9c7 Mon Sep 17 00:00:00 2001
+From: Jan Kiszka <jan.kiszka@siemens.com>
+Date: Tue, 6 Nov 2018 13:37:21 +0100
+Subject: [PATCH] debian: Add config folder to xenomai-kernel-source
+
+Meanwhile required for prepare-kernel.sh.
+
+Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
+Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
+---
+ debian/rules | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/debian/rules b/debian/rules
+index 8b871a488..99ed8982c 100755
+--- a/debian/rules
++++ b/debian/rules
+@@ -73,7 +73,7 @@ install: build
+ 	cp debian/libxenomai1.lintian $(CURDIR)/debian/libxenomai1/usr/share/lintian/overrides/libxenomai1
+ 	cp debian/libxenomai-dev.lintian $(CURDIR)/debian/libxenomai-dev/usr/share/lintian/overrides/libxenomai-dev
+ 	mkdir -p $(CURDIR)/debian/xenomai-kernel-source/usr/src/xenomai-kernel-source $(CURDIR)/debian/xenomai-kernel-source/usr/share/doc/xenomai-kernel-source
+-	cp -a kernel include scripts $(CURDIR)/debian/xenomai-kernel-source/usr/src/xenomai-kernel-source
++	cp -a config kernel include scripts $(CURDIR)/debian/xenomai-kernel-source/usr/src/xenomai-kernel-source
+ 
+ # Build architecture-independent files here.
+ binary-indep: build install
+-- 
+2.20.1
+
diff --git a/recipes-xenomai/xenomai/files/0001-debian-Enable-SMP-in-userspace-package.patch b/recipes-xenomai/xenomai/files/0001-debian-Enable-SMP-in-userspace-package.patch
new file mode 100644
index 0000000..6a63a92
--- /dev/null
+++ b/recipes-xenomai/xenomai/files/0001-debian-Enable-SMP-in-userspace-package.patch
@@ -0,0 +1,31 @@
+From a4ec3f654a4be50aaf268c3a540e8b110ad2ded3 Mon Sep 17 00:00:00 2001
+From: Jan Kiszka <jan.kiszka@siemens.com>
+Date: Tue, 6 Nov 2018 18:59:47 +0100
+Subject: [PATCH] debian: Enable SMP in userspace package
+
+Hard to find a UP target these days, and we definitely want to be
+generic with Debian packages.
+
+Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
+Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
+---
+ debian/rules | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/debian/rules b/debian/rules
+index 99ed8982c..883ae3ed8 100755
+--- a/debian/rules
++++ b/debian/rules
+@@ -16,7 +16,8 @@ DEB_BUILD_GNU_TYPE=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+ CONFIG_OPTS = --prefix=/usr \
+             --includedir=/usr/include/xenomai \
+             --mandir=/usr/share/man \
+-	    --with-testdir=/usr/lib/xenomai/testsuite
++            --with-testdir=/usr/lib/xenomai/testsuite \
++            --enable-smp
+ 
+ ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
+ 	CONFIG_OPTS += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
+-- 
+2.20.1
+
diff --git a/recipes-xenomai/xenomai/xenomai.inc b/recipes-xenomai/xenomai/xenomai.inc
index 5559829..aa53e57 100644
--- a/recipes-xenomai/xenomai/xenomai.inc
+++ b/recipes-xenomai/xenomai/xenomai.inc
@@ -13,6 +13,8 @@ inherit dpkg
 
 PROVIDES += "xenomai-kernel-source xenomai-runtime"
 
+# use bitbake get_srcrev to get the current commit id
+COMMIT="${@bb.fetch2.get_srcrev(d).strip('AUTOINC+')}"
 do_prepare_build() {
 	# The xenomai-kernel-source package is supposed to be generic, but we
 	# build it per architecture in Isar, and those packages happen to be
@@ -20,3 +22,11 @@ do_prepare_build() {
 	# target architecture to avoid conflicts.
 	sudo sed -i 's/Architecture: all/Architecture: any/' ${S}/debian/control
 }
+
+dpkg_runbuild_prepend() {
+    bbplain $(printf "xenomai-%s: Building revision %.20s\n" \
+                     ${PV} ${COMMIT})
+
+    sudo chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \
+        sh -c "cd ${PP}/${PPS}; scripts/bootstrap"
+}
diff --git a/recipes-xenomai/xenomai/xenomai_3.0.9.bb b/recipes-xenomai/xenomai/xenomai_3.0.9.bb
new file mode 100644
index 0000000..4f42020
--- /dev/null
+++ b/recipes-xenomai/xenomai/xenomai_3.0.9.bb
@@ -0,0 +1,18 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2019
+#
+# Authors:
+#  Quirin Gylstorff <quirin.gylstorff@siemens.com>
+#
+# SPDX-License-Identifier: MIT
+#
+
+require xenomai.inc
+SRC_URI = " \
+    git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=stable/v3.0.x;tag=v${PV} \
+file://0001-debian-Add-config-folder-to-xenomai-kernel-source.patch \
+file://0001-debian-Enable-SMP-in-userspace-package.patch \
+    "
+S = "${WORKDIR}/git"
diff --git a/recipes-xenomai/xenomai/xenomai_master.bb b/recipes-xenomai/xenomai/xenomai_master.bb
new file mode 100644
index 0000000..d95ede6
--- /dev/null
+++ b/recipes-xenomai/xenomai/xenomai_master.bb
@@ -0,0 +1,19 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2019
+#
+# Authors:
+#  Quirin Gylstorff <quirin.gylstorff@siemens.com>
+#
+# SPDX-License-Identifier: MIT
+#
+
+require xenomai.inc
+
+SRC_URI = " \
+    git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=master"
+SRCREV = "${AUTOREV}"
+PV = "master"
+S = "${WORKDIR}/git"
+
diff --git a/recipes-xenomai/xenomai/xenomai_next.bb b/recipes-xenomai/xenomai/xenomai_next.bb
index 72e5758..e216124 100644
--- a/recipes-xenomai/xenomai/xenomai_next.bb
+++ b/recipes-xenomai/xenomai/xenomai_next.bb
@@ -13,15 +13,9 @@ require xenomai.inc
 
 SRC_URI = " \
     git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=next"
-SRCREV = "next"
-PV = "9999-next"
+SRCREV = "${AUTOREV}" 
+PV = "next"
 
 S = "${WORKDIR}/git"
 
-dpkg_runbuild_prepend() {
-    bbplain $(printf "xenomai-next: Building revision %.12s\n" \
-                     $(cat ${S}/.git/refs/heads/next))
 
-    sudo chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \
-        sh -c "cd ${PP}/${PPS}; scripts/bootstrap"
-}
diff --git a/recipes-xenomai/xenomai/xenomai_stable.bb b/recipes-xenomai/xenomai/xenomai_stable.bb
new file mode 100644
index 0000000..28e99bb
--- /dev/null
+++ b/recipes-xenomai/xenomai/xenomai_stable.bb
@@ -0,0 +1,22 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2019
+#
+# Authors:
+#  Quirin Gylstorff <quirin.gylstorff@siemens.com>
+#
+# SPDX-License-Identifier: MIT
+#
+
+require xenomai.inc
+
+SRC_URI = " \
+    git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=stable/v3.0.x \
+file://0001-debian-Add-config-folder-to-xenomai-kernel-source.patch \
+file://0001-debian-Enable-SMP-in-userspace-package.patch \
+"
+SRCREV = "${AUTOREV}"
+PV = "stable"
+S = "${WORKDIR}/git"
+
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v3] recipes-xenomai: Add recipes for all major branches
  2019-08-13 15:28     ` [PATCH v3] " Q. Gylstorff
@ 2019-08-14 11:21       ` Jan Kiszka
  2019-08-14 11:38         ` Jan Kiszka
  0 siblings, 1 reply; 9+ messages in thread
From: Jan Kiszka @ 2019-08-14 11:21 UTC (permalink / raw)
  To: Q. Gylstorff, xenomai

On 13.08.19 17:28, Q. Gylstorff wrote:
> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> 
> For testing it should be possible to switch between different
> xenomai versions. Select the version by adding the
> following line to kas.yml with:
>    xenomai-version: |
>      PREFERRED_VERSION_xenomai = "<version>"
>   e.g. the latest master branch with:
>    xenomai-version: |
>      PREFERRED_VERSION_xenomai = "master"
> 
> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> ---
> Changes:
> v3:
>   - fix newlines
>   - use patches instead of sed
> v2:
>   - fix identation
>   - move functions to xenomai.inc
>   - use bitbake to get commitid
>   - add enable-smp to stable
>   - remove AUTOINC from version - feature is not yet available in ISAR
> 
>   kas.yml                                       |  2 ++
>   ...nfig-folder-to-xenomai-kernel-source.patch | 29 +++++++++++++++++
>   ...bian-Enable-SMP-in-userspace-package.patch | 31 +++++++++++++++++++
>   recipes-xenomai/xenomai/xenomai.inc           | 10 ++++++
>   recipes-xenomai/xenomai/xenomai_3.0.9.bb      | 18 +++++++++++
>   recipes-xenomai/xenomai/xenomai_master.bb     | 19 ++++++++++++
>   recipes-xenomai/xenomai/xenomai_next.bb       | 10 ++----
>   recipes-xenomai/xenomai/xenomai_stable.bb     | 22 +++++++++++++
>   8 files changed, 133 insertions(+), 8 deletions(-)
>   create mode 100644 recipes-xenomai/xenomai/files/0001-debian-Add-config-folder-to-xenomai-kernel-source.patch
>   create mode 100644 recipes-xenomai/xenomai/files/0001-debian-Enable-SMP-in-userspace-package.patch
>   create mode 100644 recipes-xenomai/xenomai/xenomai_3.0.9.bb
>   create mode 100644 recipes-xenomai/xenomai/xenomai_master.bb
>   create mode 100644 recipes-xenomai/xenomai/xenomai_stable.bb
> 
> diff --git a/kas.yml b/kas.yml
> index 3694bcc..2bf62d4 100644
> --- a/kas.yml
> +++ b/kas.yml
> @@ -35,3 +35,5 @@ local_conf_header:
>       CONF_VERSION = "1"
>     cross: |
>       ISAR_CROSS_COMPILE = "1"
> +  xenomai-version: |
> +    PREFERRED_VERSION_xenomai = "stable"
> diff --git a/recipes-xenomai/xenomai/files/0001-debian-Add-config-folder-to-xenomai-kernel-source.patch b/recipes-xenomai/xenomai/files/0001-debian-Add-config-folder-to-xenomai-kernel-source.patch
> new file mode 100644
> index 0000000..3be4fb3
> --- /dev/null
> +++ b/recipes-xenomai/xenomai/files/0001-debian-Add-config-folder-to-xenomai-kernel-source.patch
> @@ -0,0 +1,29 @@
> +From 07d87b9b2ca45f81024056720b28f6cdbcb3b9c7 Mon Sep 17 00:00:00 2001
> +From: Jan Kiszka <jan.kiszka@siemens.com>
> +Date: Tue, 6 Nov 2018 13:37:21 +0100
> +Subject: [PATCH] debian: Add config folder to xenomai-kernel-source
> +
> +Meanwhile required for prepare-kernel.sh.
> +
> +Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> +Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> +---
> + debian/rules | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/debian/rules b/debian/rules
> +index 8b871a488..99ed8982c 100755
> +--- a/debian/rules
> ++++ b/debian/rules
> +@@ -73,7 +73,7 @@ install: build
> + 	cp debian/libxenomai1.lintian $(CURDIR)/debian/libxenomai1/usr/share/lintian/overrides/libxenomai1
> + 	cp debian/libxenomai-dev.lintian $(CURDIR)/debian/libxenomai-dev/usr/share/lintian/overrides/libxenomai-dev
> + 	mkdir -p $(CURDIR)/debian/xenomai-kernel-source/usr/src/xenomai-kernel-source $(CURDIR)/debian/xenomai-kernel-source/usr/share/doc/xenomai-kernel-source
> +-	cp -a kernel include scripts $(CURDIR)/debian/xenomai-kernel-source/usr/src/xenomai-kernel-source
> ++	cp -a config kernel include scripts $(CURDIR)/debian/xenomai-kernel-source/usr/src/xenomai-kernel-source
> +
> + # Build architecture-independent files here.
> + binary-indep: build install
> +--
> +2.20.1
> +
> diff --git a/recipes-xenomai/xenomai/files/0001-debian-Enable-SMP-in-userspace-package.patch b/recipes-xenomai/xenomai/files/0001-debian-Enable-SMP-in-userspace-package.patch
> new file mode 100644
> index 0000000..6a63a92
> --- /dev/null
> +++ b/recipes-xenomai/xenomai/files/0001-debian-Enable-SMP-in-userspace-package.patch
> @@ -0,0 +1,31 @@
> +From a4ec3f654a4be50aaf268c3a540e8b110ad2ded3 Mon Sep 17 00:00:00 2001
> +From: Jan Kiszka <jan.kiszka@siemens.com>
> +Date: Tue, 6 Nov 2018 18:59:47 +0100
> +Subject: [PATCH] debian: Enable SMP in userspace package
> +
> +Hard to find a UP target these days, and we definitely want to be
> +generic with Debian packages.
> +
> +Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> +Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> +---
> + debian/rules | 3 ++-
> + 1 file changed, 2 insertions(+), 1 deletion(-)
> +
> +diff --git a/debian/rules b/debian/rules
> +index 99ed8982c..883ae3ed8 100755
> +--- a/debian/rules
> ++++ b/debian/rules
> +@@ -16,7 +16,8 @@ DEB_BUILD_GNU_TYPE=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
> + CONFIG_OPTS = --prefix=/usr \
> +             --includedir=/usr/include/xenomai \
> +             --mandir=/usr/share/man \
> +-	    --with-testdir=/usr/lib/xenomai/testsuite
> ++            --with-testdir=/usr/lib/xenomai/testsuite \
> ++            --enable-smp
> +
> + ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
> + 	CONFIG_OPTS += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
> +--
> +2.20.1
> +
> diff --git a/recipes-xenomai/xenomai/xenomai.inc b/recipes-xenomai/xenomai/xenomai.inc
> index 5559829..aa53e57 100644
> --- a/recipes-xenomai/xenomai/xenomai.inc
> +++ b/recipes-xenomai/xenomai/xenomai.inc
> @@ -13,6 +13,8 @@ inherit dpkg
>   
>   PROVIDES += "xenomai-kernel-source xenomai-runtime"
>   
> +# use bitbake get_srcrev to get the current commit id
> +COMMIT="${@bb.fetch2.get_srcrev(d).strip('AUTOINC+')}"
>   do_prepare_build() {
>   	# The xenomai-kernel-source package is supposed to be generic, but we
>   	# build it per architecture in Isar, and those packages happen to be
> @@ -20,3 +22,11 @@ do_prepare_build() {
>   	# target architecture to avoid conflicts.
>   	sudo sed -i 's/Architecture: all/Architecture: any/' ${S}/debian/control
>   }
> +
> +dpkg_runbuild_prepend() {
> +    bbplain $(printf "xenomai-%s: Building revision %.20s\n" \
> +                     ${PV} ${COMMIT})
> +
> +    sudo chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \
> +        sh -c "cd ${PP}/${PPS}; scripts/bootstrap"
> +}
> diff --git a/recipes-xenomai/xenomai/xenomai_3.0.9.bb b/recipes-xenomai/xenomai/xenomai_3.0.9.bb
> new file mode 100644
> index 0000000..4f42020
> --- /dev/null
> +++ b/recipes-xenomai/xenomai/xenomai_3.0.9.bb
> @@ -0,0 +1,18 @@
> +#
> +# Xenomai Real-Time System
> +#
> +# Copyright (c) Siemens AG, 2019
> +#
> +# Authors:
> +#  Quirin Gylstorff <quirin.gylstorff@siemens.com>
> +#
> +# SPDX-License-Identifier: MIT
> +#
> +
> +require xenomai.inc
> +SRC_URI = " \
> +    git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=stable/v3.0.x;tag=v${PV} \
> +file://0001-debian-Add-config-folder-to-xenomai-kernel-source.patch \
> +file://0001-debian-Enable-SMP-in-userspace-package.patch \
> +    "
> +S = "${WORKDIR}/git"
> diff --git a/recipes-xenomai/xenomai/xenomai_master.bb b/recipes-xenomai/xenomai/xenomai_master.bb
> new file mode 100644
> index 0000000..d95ede6
> --- /dev/null
> +++ b/recipes-xenomai/xenomai/xenomai_master.bb
> @@ -0,0 +1,19 @@
> +#
> +# Xenomai Real-Time System
> +#
> +# Copyright (c) Siemens AG, 2019
> +#
> +# Authors:
> +#  Quirin Gylstorff <quirin.gylstorff@siemens.com>
> +#
> +# SPDX-License-Identifier: MIT
> +#
> +
> +require xenomai.inc
> +
> +SRC_URI = " \
> +    git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=master"
> +SRCREV = "${AUTOREV}"
> +PV = "master"
> +S = "${WORKDIR}/git"
> +
> diff --git a/recipes-xenomai/xenomai/xenomai_next.bb b/recipes-xenomai/xenomai/xenomai_next.bb
> index 72e5758..e216124 100644
> --- a/recipes-xenomai/xenomai/xenomai_next.bb
> +++ b/recipes-xenomai/xenomai/xenomai_next.bb
> @@ -13,15 +13,9 @@ require xenomai.inc
>   
>   SRC_URI = " \
>       git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=next"
> -SRCREV = "next"
> -PV = "9999-next"
> +SRCREV = "${AUTOREV}"
> +PV = "next"
>   
>   S = "${WORKDIR}/git"
>   
> -dpkg_runbuild_prepend() {
> -    bbplain $(printf "xenomai-next: Building revision %.12s\n" \
> -                     $(cat ${S}/.git/refs/heads/next))
>   
> -    sudo chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \
> -        sh -c "cd ${PP}/${PPS}; scripts/bootstrap"
> -}
> diff --git a/recipes-xenomai/xenomai/xenomai_stable.bb b/recipes-xenomai/xenomai/xenomai_stable.bb
> new file mode 100644
> index 0000000..28e99bb
> --- /dev/null
> +++ b/recipes-xenomai/xenomai/xenomai_stable.bb
> @@ -0,0 +1,22 @@
> +#
> +# Xenomai Real-Time System
> +#
> +# Copyright (c) Siemens AG, 2019
> +#
> +# Authors:
> +#  Quirin Gylstorff <quirin.gylstorff@siemens.com>
> +#
> +# SPDX-License-Identifier: MIT
> +#
> +
> +require xenomai.inc
> +
> +SRC_URI = " \
> +    git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=stable/v3.0.x \
> +file://0001-debian-Add-config-folder-to-xenomai-kernel-source.patch \
> +file://0001-debian-Enable-SMP-in-userspace-package.patch \
> +"
> +SRCREV = "${AUTOREV}"
> +PV = "stable"
> +S = "${WORKDIR}/git"
> +
> 

Thanks, applied.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v3] recipes-xenomai: Add recipes for all major branches
  2019-08-14 11:21       ` Jan Kiszka
@ 2019-08-14 11:38         ` Jan Kiszka
  0 siblings, 0 replies; 9+ messages in thread
From: Jan Kiszka @ 2019-08-14 11:38 UTC (permalink / raw)
  To: Q. Gylstorff, xenomai

On 14.08.19 13:21, Jan Kiszka via Xenomai wrote:
> On 13.08.19 17:28, Q. Gylstorff wrote:
>> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>>
>> For testing it should be possible to switch between different
>> xenomai versions. Select the version by adding the
>> following line to kas.yml with:
>>    xenomai-version: |
>>      PREFERRED_VERSION_xenomai = "<version>"
>>   e.g. the latest master branch with:
>>    xenomai-version: |
>>      PREFERRED_VERSION_xenomai = "master"
>>
>> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>> ---
>> Changes:
>> v3:
>>   - fix newlines
>>   - use patches instead of sed
>> v2:
>>   - fix identation
>>   - move functions to xenomai.inc
>>   - use bitbake to get commitid
>>   - add enable-smp to stable
>>   - remove AUTOINC from version - feature is not yet available in ISAR
>>
>>   kas.yml                                       |  2 ++
>>   ...nfig-folder-to-xenomai-kernel-source.patch | 29 +++++++++++++++++
>>   ...bian-Enable-SMP-in-userspace-package.patch | 31 +++++++++++++++++++
>>   recipes-xenomai/xenomai/xenomai.inc           | 10 ++++++
>>   recipes-xenomai/xenomai/xenomai_3.0.9.bb      | 18 +++++++++++
>>   recipes-xenomai/xenomai/xenomai_master.bb     | 19 ++++++++++++
>>   recipes-xenomai/xenomai/xenomai_next.bb       | 10 ++----
>>   recipes-xenomai/xenomai/xenomai_stable.bb     | 22 +++++++++++++
>>   8 files changed, 133 insertions(+), 8 deletions(-)
>>   create mode 100644 
>> recipes-xenomai/xenomai/files/0001-debian-Add-config-folder-to-xenomai-kernel-source.patch 
>>
>>   create mode 100644 
>> recipes-xenomai/xenomai/files/0001-debian-Enable-SMP-in-userspace-package.patch
>>   create mode 100644 recipes-xenomai/xenomai/xenomai_3.0.9.bb
>>   create mode 100644 recipes-xenomai/xenomai/xenomai_master.bb
>>   create mode 100644 recipes-xenomai/xenomai/xenomai_stable.bb
>>
>> diff --git a/kas.yml b/kas.yml
>> index 3694bcc..2bf62d4 100644
>> --- a/kas.yml
>> +++ b/kas.yml
>> @@ -35,3 +35,5 @@ local_conf_header:
>>       CONF_VERSION = "1"
>>     cross: |
>>       ISAR_CROSS_COMPILE = "1"
>> +  xenomai-version: |
>> +    PREFERRED_VERSION_xenomai = "stable"
>> diff --git 
>> a/recipes-xenomai/xenomai/files/0001-debian-Add-config-folder-to-xenomai-kernel-source.patch 
>> b/recipes-xenomai/xenomai/files/0001-debian-Add-config-folder-to-xenomai-kernel-source.patch 
>>
>> new file mode 100644
>> index 0000000..3be4fb3
>> --- /dev/null
>> +++ 
>> b/recipes-xenomai/xenomai/files/0001-debian-Add-config-folder-to-xenomai-kernel-source.patch 
>>
>> @@ -0,0 +1,29 @@
>> +From 07d87b9b2ca45f81024056720b28f6cdbcb3b9c7 Mon Sep 17 00:00:00 2001
>> +From: Jan Kiszka <jan.kiszka@siemens.com>
>> +Date: Tue, 6 Nov 2018 13:37:21 +0100
>> +Subject: [PATCH] debian: Add config folder to xenomai-kernel-source
>> +
>> +Meanwhile required for prepare-kernel.sh.
>> +
>> +Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> +Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>> +---
>> + debian/rules | 2 +-
>> + 1 file changed, 1 insertion(+), 1 deletion(-)
>> +
>> +diff --git a/debian/rules b/debian/rules
>> +index 8b871a488..99ed8982c 100755
>> +--- a/debian/rules
>> ++++ b/debian/rules
>> +@@ -73,7 +73,7 @@ install: build
>> +     cp debian/libxenomai1.lintian 
>> $(CURDIR)/debian/libxenomai1/usr/share/lintian/overrides/libxenomai1
>> +     cp debian/libxenomai-dev.lintian 
>> $(CURDIR)/debian/libxenomai-dev/usr/share/lintian/overrides/libxenomai-dev
>> +     mkdir -p 
>> $(CURDIR)/debian/xenomai-kernel-source/usr/src/xenomai-kernel-source 
>> $(CURDIR)/debian/xenomai-kernel-source/usr/share/doc/xenomai-kernel-source
>> +-    cp -a kernel include scripts 
>> $(CURDIR)/debian/xenomai-kernel-source/usr/src/xenomai-kernel-source
>> ++    cp -a config kernel include scripts 
>> $(CURDIR)/debian/xenomai-kernel-source/usr/src/xenomai-kernel-source
>> +
>> + # Build architecture-independent files here.
>> + binary-indep: build install
>> +--
>> +2.20.1
>> +
>> diff --git 
>> a/recipes-xenomai/xenomai/files/0001-debian-Enable-SMP-in-userspace-package.patch 
>> b/recipes-xenomai/xenomai/files/0001-debian-Enable-SMP-in-userspace-package.patch
>> new file mode 100644
>> index 0000000..6a63a92
>> --- /dev/null
>> +++ 
>> b/recipes-xenomai/xenomai/files/0001-debian-Enable-SMP-in-userspace-package.patch
>> @@ -0,0 +1,31 @@
>> +From a4ec3f654a4be50aaf268c3a540e8b110ad2ded3 Mon Sep 17 00:00:00 2001
>> +From: Jan Kiszka <jan.kiszka@siemens.com>
>> +Date: Tue, 6 Nov 2018 18:59:47 +0100
>> +Subject: [PATCH] debian: Enable SMP in userspace package
>> +
>> +Hard to find a UP target these days, and we definitely want to be
>> +generic with Debian packages.
>> +
>> +Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> +Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>> +---
>> + debian/rules | 3 ++-
>> + 1 file changed, 2 insertions(+), 1 deletion(-)
>> +
>> +diff --git a/debian/rules b/debian/rules
>> +index 99ed8982c..883ae3ed8 100755
>> +--- a/debian/rules
>> ++++ b/debian/rules
>> +@@ -16,7 +16,8 @@ DEB_BUILD_GNU_TYPE=$(shell dpkg-architecture 
>> -qDEB_BUILD_GNU_TYPE)
>> + CONFIG_OPTS = --prefix=/usr \
>> +             --includedir=/usr/include/xenomai \
>> +             --mandir=/usr/share/man \
>> +-        --with-testdir=/usr/lib/xenomai/testsuite
>> ++            --with-testdir=/usr/lib/xenomai/testsuite \
>> ++            --enable-smp
>> +
>> + ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
>> +     CONFIG_OPTS += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
>> +--
>> +2.20.1
>> +
>> diff --git a/recipes-xenomai/xenomai/xenomai.inc 
>> b/recipes-xenomai/xenomai/xenomai.inc
>> index 5559829..aa53e57 100644
>> --- a/recipes-xenomai/xenomai/xenomai.inc
>> +++ b/recipes-xenomai/xenomai/xenomai.inc
>> @@ -13,6 +13,8 @@ inherit dpkg
>>   PROVIDES += "xenomai-kernel-source xenomai-runtime"
>> +# use bitbake get_srcrev to get the current commit id
>> +COMMIT="${@bb.fetch2.get_srcrev(d).strip('AUTOINC+')}"
>>   do_prepare_build() {
>>       # The xenomai-kernel-source package is supposed to be generic, but we
>>       # build it per architecture in Isar, and those packages happen to be
>> @@ -20,3 +22,11 @@ do_prepare_build() {
>>       # target architecture to avoid conflicts.
>>       sudo sed -i 's/Architecture: all/Architecture: any/' ${S}/debian/control
>>   }
>> +
>> +dpkg_runbuild_prepend() {
>> +    bbplain $(printf "xenomai-%s: Building revision %.20s\n" \
>> +                     ${PV} ${COMMIT})
>> +
>> +    sudo chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \
>> +        sh -c "cd ${PP}/${PPS}; scripts/bootstrap"
>> +}
>> diff --git a/recipes-xenomai/xenomai/xenomai_3.0.9.bb 
>> b/recipes-xenomai/xenomai/xenomai_3.0.9.bb
>> new file mode 100644
>> index 0000000..4f42020
>> --- /dev/null
>> +++ b/recipes-xenomai/xenomai/xenomai_3.0.9.bb
>> @@ -0,0 +1,18 @@
>> +#
>> +# Xenomai Real-Time System
>> +#
>> +# Copyright (c) Siemens AG, 2019
>> +#
>> +# Authors:
>> +#  Quirin Gylstorff <quirin.gylstorff@siemens.com>
>> +#
>> +# SPDX-License-Identifier: MIT
>> +#
>> +
>> +require xenomai.inc
>> +SRC_URI = " \
>> +    
>> git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=stable/v3.0.x;tag=v${PV} 
>> \
>> +file://0001-debian-Add-config-folder-to-xenomai-kernel-source.patch \
>> +file://0001-debian-Enable-SMP-in-userspace-package.patch \
>> +    "
>> +S = "${WORKDIR}/git"
>> diff --git a/recipes-xenomai/xenomai/xenomai_master.bb 
>> b/recipes-xenomai/xenomai/xenomai_master.bb
>> new file mode 100644
>> index 0000000..d95ede6
>> --- /dev/null
>> +++ b/recipes-xenomai/xenomai/xenomai_master.bb
>> @@ -0,0 +1,19 @@
>> +#
>> +# Xenomai Real-Time System
>> +#
>> +# Copyright (c) Siemens AG, 2019
>> +#
>> +# Authors:
>> +#  Quirin Gylstorff <quirin.gylstorff@siemens.com>
>> +#
>> +# SPDX-License-Identifier: MIT
>> +#
>> +
>> +require xenomai.inc
>> +
>> +SRC_URI = " \
>> +    git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=master"
>> +SRCREV = "${AUTOREV}"
>> +PV = "master"
>> +S = "${WORKDIR}/git"
>> +
>> diff --git a/recipes-xenomai/xenomai/xenomai_next.bb 
>> b/recipes-xenomai/xenomai/xenomai_next.bb
>> index 72e5758..e216124 100644
>> --- a/recipes-xenomai/xenomai/xenomai_next.bb
>> +++ b/recipes-xenomai/xenomai/xenomai_next.bb
>> @@ -13,15 +13,9 @@ require xenomai.inc
>>   SRC_URI = " \
>>       git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=next"
>> -SRCREV = "next"
>> -PV = "9999-next"
>> +SRCREV = "${AUTOREV}"
>> +PV = "next"
>>   S = "${WORKDIR}/git"
>> -dpkg_runbuild_prepend() {
>> -    bbplain $(printf "xenomai-next: Building revision %.12s\n" \
>> -                     $(cat ${S}/.git/refs/heads/next))
>> -    sudo chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \
>> -        sh -c "cd ${PP}/${PPS}; scripts/bootstrap"
>> -}
>> diff --git a/recipes-xenomai/xenomai/xenomai_stable.bb 
>> b/recipes-xenomai/xenomai/xenomai_stable.bb
>> new file mode 100644
>> index 0000000..28e99bb
>> --- /dev/null
>> +++ b/recipes-xenomai/xenomai/xenomai_stable.bb
>> @@ -0,0 +1,22 @@
>> +#
>> +# Xenomai Real-Time System
>> +#
>> +# Copyright (c) Siemens AG, 2019
>> +#
>> +# Authors:
>> +#  Quirin Gylstorff <quirin.gylstorff@siemens.com>
>> +#
>> +# SPDX-License-Identifier: MIT
>> +#
>> +
>> +require xenomai.inc
>> +
>> +SRC_URI = " \
>> +    
>> git://gitlab.denx.de/Xenomai/xenomai.git;protocol=https;branch=stable/v3.0.x \
>> +file://0001-debian-Add-config-folder-to-xenomai-kernel-source.patch \
>> +file://0001-debian-Enable-SMP-in-userspace-package.patch \
>> +"
>> +SRCREV = "${AUTOREV}"
>> +PV = "stable"
>> +S = "${WORKDIR}/git"
>> +
>>
> 
> Thanks, applied.
> 
> Jan
> 

Oops, just pushed the two patches to stable/v3.0.x, so this no longer builds. 
Fixed up on merge.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-08-14 11:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-12 12:46 [xenomai-images][PATCH] recipes-xenomai: Add recipes for all major branches Q. Gylstorff
2019-08-12 12:57 ` Jan Kiszka
2019-08-12 13:32   ` Quirin Gylstorff
2019-08-12 13:44     ` Jan Kiszka
2019-08-13 11:43 ` [xenomai-images][PATCH v2] " Q. Gylstorff
2019-08-13 14:29   ` Jan Kiszka
2019-08-13 15:28     ` [PATCH v3] " Q. Gylstorff
2019-08-14 11:21       ` Jan Kiszka
2019-08-14 11:38         ` Jan Kiszka

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.