Re: undefined symbol in tests

2020-02-14 Thread Antoine Hoarau via Xenomai
I just built the debians:
debchange -v 3.1 Release 3.1
debuild -uc -us


Le ven. 14 févr. 2020 à 14:52, Jan Kiszka  a écrit :

> On 14.02.20 14:46, Antoine Hoarau wrote:
> > I generated the debian then installed them in the "xenomai computer"
> > Maybe something is wrong in the debian script.
> > The computer is an IPC127e.
>
> We are testing on 227e, which is very close, without that issue. Were
> you using xenomai-images for the generation or did you just build the
> debian packages?
>
> Jan
>
> >
> > Le ven. 14 févr. 2020 à 10:53, Jan Kiszka  > > a écrit :
> >
> > On 14.02.20 10:48, Antoine Hoarau via Xenomai wrote:
> >  > If I run xeno tests I get :
> >  > symbol lookup error: /usr/lib/libalchemy.so.0: undefined symbol:
> > __real_free
> >  > /usr/lib/xenomai/testsuite/smokey: test dlopen failed: Unknown
> > error -127
> >  > child 1458 returned: exited with status 1
> >  >
> >  > Tests on 3.1 release.
> >  >
> >
> > As this ran through our testlab here, there must be some local
> > deviation
> > in your build. Can you provide more details on how and for what you
> > built?
> >
> > Jan
> >
> > --
> > Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> > Corporate Competence Center Embedded Linux
> >
>
> --
> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> Corporate Competence Center Embedded Linux
>


Re: undefined symbol in tests

2020-02-14 Thread Jan Kiszka via Xenomai

On 14.02.20 14:46, Antoine Hoarau wrote:

I generated the debian then installed them in the "xenomai computer"
Maybe something is wrong in the debian script.
The computer is an IPC127e.


We are testing on 227e, which is very close, without that issue. Were 
you using xenomai-images for the generation or did you just build the 
debian packages?


Jan



Le ven. 14 févr. 2020 à 10:53, Jan Kiszka > a écrit :


On 14.02.20 10:48, Antoine Hoarau via Xenomai wrote:
 > If I run xeno tests I get :
 > symbol lookup error: /usr/lib/libalchemy.so.0: undefined symbol:
__real_free
 > /usr/lib/xenomai/testsuite/smokey: test dlopen failed: Unknown
error -127
 > child 1458 returned: exited with status 1
 >
 > Tests on 3.1 release.
 >

As this ran through our testlab here, there must be some local
deviation
in your build. Can you provide more details on how and for what you
built?

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE

Corporate Competence Center Embedded Linux



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



Re: undefined symbol in tests

2020-02-14 Thread Antoine Hoarau via Xenomai
I generated the debian then installed them in the "xenomai computer"
Maybe something is wrong in the debian script.
The computer is an IPC127e.

Le ven. 14 févr. 2020 à 10:53, Jan Kiszka  a écrit :

> On 14.02.20 10:48, Antoine Hoarau via Xenomai wrote:
> > If I run xeno tests I get :
> > symbol lookup error: /usr/lib/libalchemy.so.0: undefined symbol:
> __real_free
> > /usr/lib/xenomai/testsuite/smokey: test dlopen failed: Unknown error -127
> > child 1458 returned: exited with status 1
> >
> > Tests on 3.1 release.
> >
>
> As this ran through our testlab here, there must be some local deviation
> in your build. Can you provide more details on how and for what you built?
>
> Jan
>
> --
> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> Corporate Competence Center Embedded Linux
>


[xenomai-images PATCH v2 3/9] scripts: Allow other layers to reuse scripts

2020-02-14 Thread Q. Gylstorff via Xenomai
From: Quirin Gylstorff 

- add ssh identity file
- add support for local build
- add variables for IMAGE and DISTRO_NAME to deploy from derived layers
- use sed instead eval to replace placeholders for clarity

Signed-off-by: Quirin Gylstorff 
---
 .gitlab-ci.yml|  5 +++-
 scripts/deploy_for_testing.sh | 40 ++
 scripts/run-lava-tests.sh | 53 +++
 3 files changed, 55 insertions(+), 43 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4b3f970..fdc24e1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -20,6 +20,9 @@ variables:
   no_proxy: "$NO_PROXY"
   XENOMAI_BUILD_OPTION: ":opt-xenomai-next.yml"
   LINUX_BUILD_OPTION: ":opt-linux-latest.yml"
+  ISAR_IMAGE: demo-image
+  ISAR_DISTRIBUTION: xenomai-demo
+
 default:
   image: kasproject/kas-isar:latest
 
@@ -28,8 +31,8 @@ default:
 .add-lava-ssh-config:
   before_script:
 - mkdir -p -m=700 ~/.ssh
-- echo "$LAVA_SSH_UPLOAD_KEY" | tr -d '\r' > ~/.ssh/id_rsa && chmod 600 
~/.ssh/id_rsa
 - echo "ProxyCommand socat - PROXY:$(echo $https_proxy | sed 
's|.*://\([^:]*\).*|\1|'):%h:%p,proxyport=$(echo $https_proxy | sed 
's|.*:\([0-9]*\)$|\1|')" >> ~/.ssh/config && chmod 600 ~/.ssh/config
+- echo "$LAVA_SSH_UPLOAD_KEY" | tr -d '\r' > ~/.ssh/lava_id_rsa && chmod 
600 ~/.ssh/lava_id_rsa
 - echo "$LAVA_SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts && chmod 644 
~/.ssh/known_hosts
 
 .build:
diff --git a/scripts/deploy_for_testing.sh b/scripts/deploy_for_testing.sh
index f8f71e3..db19e5f 100755
--- a/scripts/deploy_for_testing.sh
+++ b/scripts/deploy_for_testing.sh
@@ -11,37 +11,41 @@
 # SPDX-License-Identifier: MIT
 #
 set -e
-TARGET="$1"
+target="$1"
 
-if [ -z "${TARGET}" ]; then
+if [ -z "${target}" ]; then
 exit -1
 fi
-IMAGES_DIR=build/tmp/deploy/images
+images_dir=build/tmp/deploy/images
 
 if [ -z "${LAVA_SSH_USER}" ] || [ -z "${LAVA_SSH_HOST}" ]  || [ -z 
"${LAVA_SSH_PORT}" ]; then
 echo "Lava environment not available or incomplete - do not deploy"
 exit 0
 fi
 
-LAVA_SSH_DESTINATION="${LAVA_SSH_USER}@${LAVA_SSH_HOST}"
+lava_ssh_destination="${LAVA_SSH_USER}@${LAVA_SSH_HOST}"
 
-LAVA_DEPLOY_DIR=${LAVA_DEPLOY_DIR:-"/var/lib/lava/artifacts"}
-DEPLOY_DIR="${LAVA_DEPLOY_DIR}/${CI_PIPELINE_ID}"
-ssh -p ${LAVA_SSH_PORT} ${LAVA_SSH_DESTINATION} 'install -d -m 755 
"'${DEPLOY_DIR}'"'
+isar_base_name="${ISAR_IMAGE}-${ISAR_DISTRIBUTION}-${target}"
+lava_deploy_dir="${LAVA_DEPLOY_DIR:-/var/lib/lava/artifacts}"
+deploy_dir="${lava_deploy_dir}/${CI_PIPELINE_ID}"
+lava_identity="-i ${LAVA_SSH_KEY_PATH:-~/.ssh/lava_id_rsa}"
+if [ -n "${CI_PIPELINE_ID}" ]; then
+ssh -p ${LAVA_SSH_PORT} ${lava_identity} ${lava_ssh_destination} 'install 
-d -m 755 "'${deploy_dir}'"'
+fi
 #KERNEL
-scp -P ${LAVA_SSH_PORT} 
${IMAGES_DIR}/${TARGET}/demo-image-xenomai-demo-${TARGET}-vmlinuz \
-${LAVA_SSH_DESTINATION}:${DEPLOY_DIR}
+scp -P ${LAVA_SSH_PORT} ${lava_identity} 
${images_dir}/${target}/${isar_base_name}-vmlinuz \
+${lava_ssh_destination}:${deploy_dir}
 # INITRD
-scp -P ${LAVA_SSH_PORT} 
${IMAGES_DIR}/${TARGET}/demo-image-xenomai-demo-${TARGET}-initrd.img \
-${LAVA_SSH_DESTINATION}:${DEPLOY_DIR}
+scp -P ${LAVA_SSH_PORT} ${lava_identity} 
${images_dir}/${target}/${isar_base_name}-initrd.img \
+${lava_ssh_destination}:${deploy_dir}
 # ROOTFS
-if [ -n ${IMAGES_DIR}/${TARGET}/demo-image-xenomai-demo-${TARGET}.*.gz  ]; then
-gzip ${IMAGES_DIR}/${TARGET}/demo-image-xenomai-demo-${TARGET}.*
+if [ -n ${images_dir}/${target}/${isar_base_name}.*.gz  ]; then
+gzip ${images_dir}/${target}/${isar_base_name}.*
 fi
-scp -P ${LAVA_SSH_PORT} 
${IMAGES_DIR}/${TARGET}/demo-image-xenomai-demo-${TARGET}.* \
-${LAVA_SSH_DESTINATION}:${DEPLOY_DIR}
+scp -P ${LAVA_SSH_PORT} ${lava_identity} 
${images_dir}/${target}/${isar_base_name}.* \
+${lava_ssh_destination}:${deploy_dir}
 # DTB
-DTB="${IMAGES_DIR}/${TARGET}/*.dtb"
-if [ -e ${DTB} ]; then
-scp -P ${LAVA_SSH_PORT} ${DTB} ${LAVA_SSH_DESTINATION}:${DEPLOY_DIR}
+dtb="${images_dir}/${target}/*.dtb"
+if [ -e ${dtb} ]; then
+scp -P ${LAVA_SSH_PORT} ${lava_identity} ${dtb} 
${lava_ssh_destination}:${deploy_dir}
 fi
diff --git a/scripts/run-lava-tests.sh b/scripts/run-lava-tests.sh
index 03119f1..59cf14e 100755
--- a/scripts/run-lava-tests.sh
+++ b/scripts/run-lava-tests.sh
@@ -11,48 +11,53 @@
 #
 set -e
 TARGET=$1
+if [ -z "${TARGET}" ]; then
+echo "no target was given"
+exit -1
+fi
 
-LAVA_MASTER_PORT=28080
+lava_master_port="${LAVA_MASTER_PORT:-28080}"
 if [ -n "${LAVA_SSH_PORT}" ]; then
-LAVA_SSH_PORT="-p ${LAVA_SSH_PORT}"
+lava_ssh_port="-p ${LAVA_SSH_PORT}"
 fi
-LAVA_SSH_DESTINATION="${LAVA_SSH_USER}@${LAVA_SSH_HOST}"
+lava_identity="-i ${LAVA_SSH_KEY_PATH:-~/.ssh/lava_id_rsa}"
+lava_ssh_destination="${LAVA_SSH_USER}@${LAVA_SSH_HOST}"
 # open connection for ssh port forwarding
-ssh -N ${LAVA_SSH_PORT} -o 'LocalForward localhost:'${LAVA_MASTER_PORT}' 
localhost:80' ${LAVA_SSH_DESTINATION} &

[xenomai-images PATCH v2 2/9] ci: Use gitlab extends instead of YAML Anchors

2020-02-14 Thread Q. Gylstorff via Xenomai
From: Quirin Gylstorff 

Gitlab uses extends as an alternative to YAML Anchors since 11.3.

Signed-off-by: Quirin Gylstorff 
---
 .gitlab-ci.yml | 35 ++-
 1 file changed, 18 insertions(+), 17 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e5dd3c1..4b3f970 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -25,22 +25,23 @@ default:
 
 # add lavacli to the container and install the ssh keys
 # for the test infrastructure
-.add-lava-ssh-config: 
+.add-lava-ssh-config:
   before_script:
 - mkdir -p -m=700 ~/.ssh
 - echo "$LAVA_SSH_UPLOAD_KEY" | tr -d '\r' > ~/.ssh/id_rsa && chmod 600 
~/.ssh/id_rsa
 - echo "ProxyCommand socat - PROXY:$(echo $https_proxy | sed 
's|.*://\([^:]*\).*|\1|'):%h:%p,proxyport=$(echo $https_proxy | sed 
's|.*:\([0-9]*\)$|\1|')" >> ~/.ssh/config && chmod 600 ~/.ssh/config
 - echo "$LAVA_SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts && chmod 644 
~/.ssh/known_hosts
 
-.build: 
-  <<: *lava-ssh-key
+.build:
+  extends: .add-lava-ssh-config
   stage: build
   script:
 - kas build 
kas.yml:board-${TARGET}.yml${XENOMAI_BUILD_OPTION}${LINUX_BUILD_OPTION}${BUILD_OPTIONS}
 - scripts/deploy_for_testing.sh ${TARGET}
 
-.test: 
-  <<: *lava-ssh-key
+.test:
+  extends: .add-lava-ssh-config
+  image: kasproject/kas-isar:latest
   stage: lava-test
   script:
 - scripts/install-lavacli.sh
@@ -51,51 +52,51 @@ default:
 
 
 build:qemu-amd64:
-  <<: *build-job
+  extends: .build
   variables:
 TARGET: qemu-amd64
 
 lava-test:qemu-amd64:
   needs: [ "build:qemu-amd64" ]
-  <<: *test-job
+  extends: .test
   variables:
 TARGET: qemu-amd64
 
 build:qemu-armhf:
-  <<: *build-job
+  extends: .build
   variables:
 TARGET: qemu-armhf
 
 lava-test:qemu-armhf:
   needs: [ "build:qemu-armhf" ]
-  <<: *test-job
+  extends: .test
   variables:
 TARGET: qemu-armhf
 
 build:qemu-arm64:
-  <<: *build-job
+  extends: .build
   variables:
 TARGET: qemu-arm64
 
 lava-test:qemu-arm64:
   needs: [ "build:qemu-arm64" ]
-  <<: *test-job
+  extends: .test
   variables:
 TARGET: qemu-arm64
 
 build:board-hikey:
-  <<: *build-job
+  extends: .build
   variables:
 TARGET: hikey
 BUILD_OPTIONS: ":opt-lava-test.yml"
 lava-test:board-hikey:
   needs: [ "build:board-hikey" ]
-  <<: *test-job
+  extends: .test
   variables:
 TARGET: hikey
 
 build:board-beaglebone:
-  <<: *build-job
+  extends: .build
   variables:
 TARGET: beagle-bone-black
 BUILD_OPTIONS: ":opt-lava-test.yml"
@@ -103,18 +104,18 @@ build:board-beaglebone:
 
 lava-test:board-beaglebone:
   needs: [ "build:board-beaglebone" ]
-  <<: *test-job
+  extends: .test
   variables:
 TARGET: beaglebone
 
 build:board-x86-64-efi:
-  <<: *build-job
+  extends: .build
   variables:
 TARGET: x86-64-efi
 BUILD_OPTIONS: ":opt-lava-test.yml"
 
 lava-test:board-x86-64-efi:
   needs: [ "build:board-x86-64-efi" ]
-  <<: *test-job
+  extends: .test
   variables:
 TARGET: x86-64
-- 
2.20.1




[xenomai-images PATCH v2 9/9] recipes-xenomai/xenomai.inc: add exception handling

2020-02-14 Thread Q. Gylstorff via Xenomai
From: Quirin Gylstorff 

If SRCREV is not available for given DISTRO_ARCH and xenomai version
get_srcrev raise a FetchError exception. Avoid a build error be
catching the exception.

Signed-off-by: Quirin Gylstorff 
---
 recipes-xenomai/xenomai/xenomai.inc | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/recipes-xenomai/xenomai/xenomai.inc 
b/recipes-xenomai/xenomai/xenomai.inc
index 3df635c..0a082a4 100644
--- a/recipes-xenomai/xenomai/xenomai.inc
+++ b/recipes-xenomai/xenomai/xenomai.inc
@@ -13,7 +13,13 @@ inherit dpkg
 
 PROVIDES += "xenomai-kernel-source xenomai-runtime xenomai-runtime-dbgsym 
libxenomai1 libxenomai-dev libxenomai1-dbgsym"
 # use bitbake get_srcrev to get the current commit id
-COMMIT="${@bb.fetch2.get_srcrev(d).strip('AUTOINC+')}"
+def get_commit(d):
+try:
+return bb.fetch2.get_srcrev(d).strip('AUTOINC+')
+except bb.fetch2.FetchError:
+return ""
+
+COMMIT="${@get_commit(d)}"
 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
-- 
2.20.1




[xenomai-images PATCH v2 5/9] ci: Add testing of xenomai 3.0.x

2020-02-14 Thread Q. Gylstorff via Xenomai
From: Quirin Gylstorff 

Add a new CI variable DEPLOY_DIR_EXTENSION to differ
between kernel builds for the same target as the kernel
version is not visibly before bootup

Signed-off-by: Quirin Gylstorff 
---
 .gitlab-ci.yml| 32 +++-
 scripts/deploy_for_testing.sh |  4 ++--
 scripts/run-lava-tests.sh |  4 ++--
 3 files changed, 35 insertions(+), 5 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index fdc24e1..b5300db 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,7 +1,7 @@
 #
 # Xenomai Real-Time System
 #
-# Copyright (c) Siemens AG, 2020
+# Copyright (c) Siemens AG, 2019 - 2020
 #
 # Authors:
 #  Quirin Gylstorff 
@@ -122,3 +122,33 @@ lava-test:board-x86-64-efi:
   extends: .test
   variables:
 TARGET: x86-64
+
+build:board-beaglebone:xenomai-3.0.x:
+  extends: .build
+  variables:
+TARGET: beagle-bone-black
+XENOMAI_BUILD_OPTION: ":opt-xenomai-3.0.x.yml"
+BUILD_OPTIONS: ":opt-lava-test.yml"
+DEPLOY_DIR_EXTENSION: "xenomai-3.0.x"
+
+lava-test:board-beaglebone:xenomai-3.0.x:
+  needs: [ "build:board-beaglebone:xenomai-3.0.x" ]
+  extends: .test
+  variables:
+TARGET: beaglebone
+DEPLOY_DIR_EXTENSION: "xenomai-3.0.x"
+
+build:board-x86-64-efi:xenomai-3.0.x:
+  extends: .build
+  variables:
+TARGET: x86-64-efi
+XENOMAI_BUILD_OPTION: ":opt-xenomai-3.0.x.yml"
+BUILD_OPTIONS: ":opt-lava-test.yml"
+DEPLOY_DIR_EXTENSION: "xenomai-3.0.x"
+
+lava-test:board-x86-64-efi:xenomai-3.0.x:
+  needs: [ "build:board-x86-64-efi:xenomai-3.0.x" ]
+  extends: .test
+  variables:
+TARGET: x86-64
+DEPLOY_DIR_EXTENSION: "xenomai-3.0.x"
diff --git a/scripts/deploy_for_testing.sh b/scripts/deploy_for_testing.sh
index db19e5f..b3d565f 100755
--- a/scripts/deploy_for_testing.sh
+++ b/scripts/deploy_for_testing.sh
@@ -3,7 +3,7 @@
 #
 # Xenomai Real-Time System
 #
-# Copyright (c) Siemens AG, 2019
+# Copyright (c) Siemens AG, 2019-2020
 #
 # Authors:
 #  Quirin Gylstorff 
@@ -27,7 +27,7 @@ lava_ssh_destination="${LAVA_SSH_USER}@${LAVA_SSH_HOST}"
 
 isar_base_name="${ISAR_IMAGE}-${ISAR_DISTRIBUTION}-${target}"
 lava_deploy_dir="${LAVA_DEPLOY_DIR:-/var/lib/lava/artifacts}"
-deploy_dir="${lava_deploy_dir}/${CI_PIPELINE_ID}"
+deploy_dir="${lava_deploy_dir}/${CI_PIPELINE_ID}/${DEPLOY_DIR_EXTENSION}"
 lava_identity="-i ${LAVA_SSH_KEY_PATH:-~/.ssh/lava_id_rsa}"
 if [ -n "${CI_PIPELINE_ID}" ]; then
 ssh -p ${LAVA_SSH_PORT} ${lava_identity} ${lava_ssh_destination} 'install 
-d -m 755 "'${deploy_dir}'"'
diff --git a/scripts/run-lava-tests.sh b/scripts/run-lava-tests.sh
index 59cf14e..e02385a 100755
--- a/scripts/run-lava-tests.sh
+++ b/scripts/run-lava-tests.sh
@@ -2,7 +2,7 @@
 #
 # Xenomai Real-Time System
 #
-# Copyright (c) Siemens AG, 2019
+# Copyright (c) Siemens AG, 2019-2020
 #
 # Authors:
 #  Quirin Gylstorff 
@@ -43,7 +43,7 @@ lava_master_uri=http://localhost:${lava_master_port}
 lavacli identities add --token ${LAVA_MASTER_TOKEN} --uri ${lava_master_uri} 
--username ${LAVA_MASTER_ACCOUNT} default
 #generate lava job description from template
 artifact_url="${LAVA_ARTIFACTS_URL:-http://localhost/artifacts};
-DEPLOY_URL="${artifact_url}/${CI_PIPELINE_ID}"
+DEPLOY_URL="${artifact_url}/${CI_PIPELINE_ID}/${DEPLOY_DIR_EXTENSION}"
 job_template_path="${JOB_TEMPLATE_PATH:-tests/jobs/xenomai}"
 tmp_dir=$(mktemp -d)
 template=${tmp_dir}/job_${TARGET}_${CI_PIPELINE_ID}.yml
-- 
2.20.1




[xenomai-images PATCH v2 8/9] recipes-xenomai/xenomai.inc: Add missing libxenomai-dev

2020-02-14 Thread Q. Gylstorff via Xenomai
From: Quirin Gylstorff 

To build against libxenomai headers are necessary.

Signed-off-by: Quirin Gylstorff 
---
 recipes-xenomai/xenomai/xenomai.inc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/recipes-xenomai/xenomai/xenomai.inc 
b/recipes-xenomai/xenomai/xenomai.inc
index bd07347..3df635c 100644
--- a/recipes-xenomai/xenomai/xenomai.inc
+++ b/recipes-xenomai/xenomai/xenomai.inc
@@ -11,8 +11,7 @@
 
 inherit dpkg
 
-PROVIDES += "xenomai-kernel-source xenomai-runtime xenomai-runtime-dbgsym 
libxenomai1-dbgsym"
-
+PROVIDES += "xenomai-kernel-source xenomai-runtime xenomai-runtime-dbgsym 
libxenomai1 libxenomai-dev libxenomai1-dbgsym"
 # use bitbake get_srcrev to get the current commit id
 COMMIT="${@bb.fetch2.get_srcrev(d).strip('AUTOINC+')}"
 do_prepare_build() {
-- 
2.20.1




[xenomai-images PATCH v2 6/9] ci: Add target ipc227e for testing xenomai-3.0.x

2020-02-14 Thread Q. Gylstorff via Xenomai
From: Quirin Gylstorff 

Signed-off-by: Quirin Gylstorff 
---
 .gitlab-ci.yml |  2 +-
 recipes-kernel/linux/files/amd64_defconfig |  3 +-
 scripts/run-lava-tests.sh  |  1 +
 tests/jobs/xenomai-ipc227e.yml | 74 ++
 4 files changed, 78 insertions(+), 2 deletions(-)
 create mode 100644 tests/jobs/xenomai-ipc227e.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b5300db..3f0dcfd 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -150,5 +150,5 @@ lava-test:board-x86-64-efi:xenomai-3.0.x:
   needs: [ "build:board-x86-64-efi:xenomai-3.0.x" ]
   extends: .test
   variables:
-TARGET: x86-64
+TARGET: ipc227e
 DEPLOY_DIR_EXTENSION: "xenomai-3.0.x"
diff --git a/recipes-kernel/linux/files/amd64_defconfig 
b/recipes-kernel/linux/files/amd64_defconfig
index 9faed52..bc5cd0b 100644
--- a/recipes-kernel/linux/files/amd64_defconfig
+++ b/recipes-kernel/linux/files/amd64_defconfig
@@ -1891,7 +1891,8 @@ CONFIG_NET_VENDOR_INTEL=y
 CONFIG_E1000=y
 CONFIG_E1000E=y
 CONFIG_E1000E_HWTS=y
-# CONFIG_IGB is not set
+CONFIG_IGB=y
+CONFIG_IGB_HWMON=y
 # CONFIG_IGBVF is not set
 # CONFIG_IXGB is not set
 # CONFIG_IXGBE is not set
diff --git a/scripts/run-lava-tests.sh b/scripts/run-lava-tests.sh
index e02385a..1f502c4 100755
--- a/scripts/run-lava-tests.sh
+++ b/scripts/run-lava-tests.sh
@@ -49,6 +49,7 @@ tmp_dir=$(mktemp -d)
 template=${tmp_dir}/job_${TARGET}_${CI_PIPELINE_ID}.yml
 cp ${job_template_path}-${TARGET}.yml ${template}
 sed -i "s|\${TARGET}|${TARGET}|g" $template
+sed -i "s|\${BUILD_ARCH}|${BUILD_ARCH}|g" $template
 sed -i "s|\${DEPLOY_URL}|${DEPLOY_URL}|g" $template
 sed -i "s|\${ISAR_IMAGE}|${ISAR_IMAGE}|g" $template
 sed -i "s|\${ISAR_DISTRIBUTION}|${ISAR_DISTRIBUTION}|g" $template
diff --git a/tests/jobs/xenomai-ipc227e.yml b/tests/jobs/xenomai-ipc227e.yml
new file mode 100644
index 000..e5a2f35
--- /dev/null
+++ b/tests/jobs/xenomai-ipc227e.yml
@@ -0,0 +1,74 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2019
+#
+# Authors:
+#  Quirin Gylstorff 
+#
+# SPDX-License-Identifier: MIT
+#
+job_name: xenomai-test-suite
+device_type: ipc227e
+
+timeouts:
+  job:
+minutes: 30
+  action:
+minutes: 20
+  connection:
+minutes: 2
+priority: medium
+visibility: public
+
+metadata:
+  # please change these fields when modifying this job for your own tests.
+  docs-source: xenomai-cof
+  docs-filename: pipeline-xenomai-cof
+# ACTION_BLOCK
+actions:
+- deploy:
+timeout:
+  minutes: 5
+to: tftp
+kernel:
+  url: ${DEPLOY_URL}/demo-image-xenomai-demo-x86-64-efi-vmlinuz
+  type: bzimage
+ramdisk:
+  url: ${DEPLOY_URL}/demo-image-xenomai-demo-x86-64-efi-initrd.img
+  compression: gz
+nfsrootfs:
+  url: ${DEPLOY_URL}/demo-image-xenomai-demo-x86-64-efi.tar.gz
+  compression: gz
+# BOOT_BLOCK
+- boot:
+timeout:
+  minutes: 5
+method: ipxe
+commands: nfs
+prompts: ["root@demo:"]
+auto_login:
+  login_prompt: 'demo login:'
+  username: root
+  password_prompt: 'Password:'
+  password: root
+
+- test:
+timeout:
+  minutes: 30
+definitions:
+- repository: http://git.linaro.org/lava-team/lava-functional-tests.git
+  from: git
+  path: lava-test-shell/smoke-tests-basic.yaml
+  name: smoke-tests
+- repository:
+metadata:
+  format: Lava-Test Test Definition 1.0
+  name: xenomai-test-suite
+  description: "runs the xenomai test suite"
+run:
+  steps:
+- lava-test-case xenomai-test --shell xeno-test -k -l \"dohell -m 
/tmp 300\" -p 1000
+  from: inline
+  path: inline/xenomai-test-suite.yaml
+  name: xenomai-test-suite
-- 
2.20.1




[xenomai-images PATCH v2 0/9] Add testing for xenomai-3.0.x

2020-02-14 Thread Q. Gylstorff via Xenomai
From: Quirin Gylstorff 

- Add testing for Xenomai 3.0.x.
- Clean up the ci scripts to avoid code duplications.
- Add new target ipc227e for xenomai 3.0.x testing.
- Add missing export of libxenomai-dev
- Add missing exception handling for xenomai revision extraction.
  Linux xenomai already contains this changes

Changes in V2:
 - remove extra build and test of linux 4.4.
   Linux 4.4 is only supported by xenomai-3.0.x and therefore
   already part of the xenomai-3.0.x build and test.
 - remove 4.19 option
 - readd proxy settings. The proxycommand is only added if
   https_proxy is set.
 - change patch order


Quirin Gylstorff (9):
  ci: remove code duplications
  ci: Use gitlab extends instead of YAML Anchors
  scripts: Allow other layers to reuse scripts
  Add kas option for 4.4
  ci: Add testing of xenomai 3.0.x
  ci: Add target ipc227e for testing xenomai-3.0.x
  ci: Make proxycommand conditional
  recipes-xenomai/xenomai.inc: Add missing libxenomai-dev
  recipes-xenomai/xenomai.inc:  add exception handling

 .gitlab-ci.yml | 174 +++--
 opt-linux-4.4.yml  |  17 ++
 recipes-kernel/linux/files/amd64_defconfig |   3 +-
 recipes-xenomai/xenomai/xenomai.inc|  11 +-
 scripts/deploy_for_testing.sh  |  42 ++---
 scripts/run-lava-tests.sh  |  58 ---
 tests/jobs/xenomai-ipc227e.yml |  74 +
 7 files changed, 250 insertions(+), 129 deletions(-)
 create mode 100644 opt-linux-4.4.yml
 create mode 100644 tests/jobs/xenomai-ipc227e.yml

-- 
2.20.1




[xenomai-images PATCH v2 7/9] ci: Make proxycommand conditional

2020-02-14 Thread Q. Gylstorff via Xenomai
From: Quirin Gylstorff 

To execute the ci in environments with and without proxy check
if https_proxy is set.

Signed-off-by: Quirin Gylstorff 
---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3f0dcfd..cda9f5b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -31,7 +31,7 @@ default:
 .add-lava-ssh-config:
   before_script:
 - mkdir -p -m=700 ~/.ssh
-- echo "ProxyCommand socat - PROXY:$(echo $https_proxy | sed 
's|.*://\([^:]*\).*|\1|'):%h:%p,proxyport=$(echo $https_proxy | sed 
's|.*:\([0-9]*\)$|\1|')" >> ~/.ssh/config && chmod 600 ~/.ssh/config
+- if [ -n "$https_proxy" ]; then echo "ProxyCommand socat - PROXY:$(echo 
$https_proxy | sed 's|.*://\([^:]*\).*|\1|'):%h:%p,proxyport=$(echo 
$https_proxy | sed 's|.*:\([0-9]*\)$|\1|')" >> ~/.ssh/config && chmod 600 
~/.ssh/config; fi;
 - echo "$LAVA_SSH_UPLOAD_KEY" | tr -d '\r' > ~/.ssh/lava_id_rsa && chmod 
600 ~/.ssh/lava_id_rsa
 - echo "$LAVA_SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts && chmod 644 
~/.ssh/known_hosts
 
-- 
2.20.1




[xenomai-images PATCH v2 4/9] Add kas option for 4.4

2020-02-14 Thread Q. Gylstorff via Xenomai
From: Quirin Gylstorff 

Signed-off-by: Quirin Gylstorff 
---
 opt-linux-4.4.yml | 17 +
 1 file changed, 17 insertions(+)
 create mode 100644 opt-linux-4.4.yml

diff --git a/opt-linux-4.4.yml b/opt-linux-4.4.yml
new file mode 100644
index 000..bb24a04
--- /dev/null
+++ b/opt-linux-4.4.yml
@@ -0,0 +1,17 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2020
+#
+# Authors:
+#  Quirin Gylstorff 
+#
+# SPDX-License-Identifier: MIT
+#
+
+header:
+  version: 8
+
+local_conf_header:
+  linux-xenomai-latest: |
+PREFERRED_VERSION_linux-xenomai = "4.4%"
-- 
2.20.1




[xenomai-images PATCH v2 1/9] ci: remove code duplications

2020-02-14 Thread Q. Gylstorff via Xenomai
From: Quirin Gylstorff 

Signed-off-by: Quirin Gylstorff 
---
 .gitlab-ci.yml | 130 +
 1 file changed, 55 insertions(+), 75 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 33f97ec..e5dd3c1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,7 +1,7 @@
 #
 # Xenomai Real-Time System
 #
-# Copyright (c) Siemens AG, 2019
+# Copyright (c) Siemens AG, 2020
 #
 # Authors:
 #  Quirin Gylstorff 
@@ -18,7 +18,8 @@ variables:
   https_proxy: "$HTTPS_PROXY"
   ftp_proxy: "$FTP_PROXY"
   no_proxy: "$NO_PROXY"
-  BUILD_OPTIONS: ":opt-xenomai-next.yml:opt-linux-latest.yml"
+  XENOMAI_BUILD_OPTION: ":opt-xenomai-next.yml"
+  LINUX_BUILD_OPTION: ":opt-linux-latest.yml"
 default:
   image: kasproject/kas-isar:latest
 
@@ -30,111 +31,90 @@ default:
 - echo "$LAVA_SSH_UPLOAD_KEY" | tr -d '\r' > ~/.ssh/id_rsa && chmod 600 
~/.ssh/id_rsa
 - echo "ProxyCommand socat - PROXY:$(echo $https_proxy | sed 
's|.*://\([^:]*\).*|\1|'):%h:%p,proxyport=$(echo $https_proxy | sed 
's|.*:\([0-9]*\)$|\1|')" >> ~/.ssh/config && chmod 600 ~/.ssh/config
 - echo "$LAVA_SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts && chmod 644 
~/.ssh/known_hosts
-build:qemu-amd64:
+
+.build: 
   <<: *lava-ssh-key
   stage: build
   script:
-- kas build kas.yml:board-qemu-amd64.yml${BUILD_OPTIONS}
-- scripts/deploy_for_testing.sh qemu-amd64
+- kas build 
kas.yml:board-${TARGET}.yml${XENOMAI_BUILD_OPTION}${LINUX_BUILD_OPTION}${BUILD_OPTIONS}
+- scripts/deploy_for_testing.sh ${TARGET}
 
-lava-test:qemu-amd64:
+.test: 
   <<: *lava-ssh-key
   stage: lava-test
   script:
 - scripts/install-lavacli.sh
-- scripts/run-lava-tests.sh qemu-amd64
-  needs: [ "build:qemu-amd64" ]
+- scripts/run-lava-tests.sh ${TARGET}
   only:
 variables:
   - $LAVA_SSH_USER
 
+
+build:qemu-amd64:
+  <<: *build-job
+  variables:
+TARGET: qemu-amd64
+
+lava-test:qemu-amd64:
+  needs: [ "build:qemu-amd64" ]
+  <<: *test-job
+  variables:
+TARGET: qemu-amd64
+
 build:qemu-armhf:
-  <<: *lava-ssh-key
-  stage: build
-  script:
-- kas build kas.yml:board-qemu-armhf.yml${BUILD_OPTIONS}
-- scripts/deploy_for_testing.sh qemu-armhf
+  <<: *build-job
+  variables:
+TARGET: qemu-armhf
 
 lava-test:qemu-armhf:
-  <<: *lava-ssh-key
-  stage: lava-test
-  script:
-- scripts/install-lavacli.sh
-- scripts/run-lava-tests.sh qemu-armhf
   needs: [ "build:qemu-armhf" ]
-  only:
-variables:
-  - $LAVA_SSH_USER
+  <<: *test-job
+  variables:
+TARGET: qemu-armhf
 
 build:qemu-arm64:
-  <<: *lava-ssh-key
-  stage: build
-  script:
-- kas build kas.yml:board-qemu-arm64.yml${BUILD_OPTIONS}
-- scripts/deploy_for_testing.sh qemu-arm64
+  <<: *build-job
+  variables:
+TARGET: qemu-arm64
 
 lava-test:qemu-arm64:
-  <<: *lava-ssh-key
-  stage: lava-test
-  script:
-- scripts/install-lavacli.sh
-- scripts/run-lava-tests.sh qemu-arm64
   needs: [ "build:qemu-arm64" ]
-  only:
-variables:
-  - $LAVA_SSH_USER
+  <<: *test-job
+  variables:
+TARGET: qemu-arm64
 
 build:board-hikey:
-  <<: *lava-ssh-key
-  stage: build
-  script:
-- kas build kas.yml:board-hikey.yml:opt-lava-test.yml${BUILD_OPTIONS}
-- scripts/deploy_for_testing.sh hikey
-
+  <<: *build-job
+  variables:
+TARGET: hikey
+BUILD_OPTIONS: ":opt-lava-test.yml"
 lava-test:board-hikey:
-  <<: *lava-ssh-key
-  stage: lava-test
-  script:
-- scripts/install-lavacli.sh
-- scripts/run-lava-tests.sh hikey
   needs: [ "build:board-hikey" ]
-  only:
-variables:
-  - $LAVA_SSH_USER
-
+  <<: *test-job
+  variables:
+TARGET: hikey
 
 build:board-beaglebone:
-  <<: *lava-ssh-key
-  stage: build
-  script:
-- kas build 
kas.yml:board-beagle-bone-black.yml:opt-lava-test.yml${BUILD_OPTIONS}
-- scripts/deploy_for_testing.sh beagle-bone-black
+  <<: *build-job
+  variables:
+TARGET: beagle-bone-black
+BUILD_OPTIONS: ":opt-lava-test.yml"
+
 
 lava-test:board-beaglebone:
-  <<: *lava-ssh-key
-  stage: lava-test
-  script:
-- scripts/install-lavacli.sh
-- scripts/run-lava-tests.sh beaglebone
   needs: [ "build:board-beaglebone" ]
-  only:
-variables:
-  - $LAVA_SSH_USER
+  <<: *test-job
+  variables:
+TARGET: beaglebone
 
 build:board-x86-64-efi:
-  <<: *lava-ssh-key
-  stage: build
-  script:
-- kas build kas.yml:board-x86-64-efi.yml:opt-lava-test.yml${BUILD_OPTIONS}
-- scripts/deploy_for_testing.sh x86-64-efi
+  <<: *build-job
+  variables:
+TARGET: x86-64-efi
+BUILD_OPTIONS: ":opt-lava-test.yml"
 
 lava-test:board-x86-64-efi:
-  <<: *lava-ssh-key
-  stage: lava-test
-  script:
-- scripts/install-lavacli.sh
-- scripts/run-lava-tests.sh x86-64
   needs: [ "build:board-x86-64-efi" ]
-  only:
-variables:
-  - $LAVA_SSH_USER
+  <<: *test-job
+  variables:
+TARGET: x86-64
-- 
2.20.1




Re: undefined symbol in tests

2020-02-14 Thread Jan Kiszka via Xenomai

On 14.02.20 10:48, Antoine Hoarau via Xenomai wrote:

If I run xeno tests I get :
symbol lookup error: /usr/lib/libalchemy.so.0: undefined symbol: __real_free
/usr/lib/xenomai/testsuite/smokey: test dlopen failed: Unknown error -127
child 1458 returned: exited with status 1

Tests on 3.1 release.



As this ran through our testlab here, there must be some local deviation 
in your build. Can you provide more details on how and for what you built?


Jan

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



undefined symbol in tests

2020-02-14 Thread Antoine Hoarau via Xenomai
If I run xeno tests I get :
symbol lookup error: /usr/lib/libalchemy.so.0: undefined symbol: __real_free
/usr/lib/xenomai/testsuite/smokey: test dlopen failed: Unknown error -127
child 1458 returned: exited with status 1

Tests on 3.1 release.


Re: [xenomai-images PATCH 07/11] ci: Remove proxy settings

2020-02-14 Thread Gylstorff Quirin via Xenomai




On 2/14/20 9:47 AM, Jan Kiszka wrote:

On 14.02.20 08:32, Q. Gylstorff wrote:

From: Quirin Gylstorff 

Signed-off-by: Quirin Gylstorff 
---
  .gitlab-ci.yml | 8 ++--
  1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b8dbbc5..54542b1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -14,10 +14,6 @@ stages:
  variables:
    GIT_STRATEGY: clone
-  http_proxy: "$HTTP_PROXY"
-  https_proxy: "$HTTPS_PROXY"
-  ftp_proxy: "$FTP_PROXY"
-  no_proxy: "$NO_PROXY"


Even if we no longer need it, let's keep this as pattern

Sure



    XENOMAI_BUILD_OPTION: ":opt-xenomai-next.yml"
    LINUX_BUILD_OPTION: ":opt-linux-latest.yml"
    ISAR_IMAGE: demo-image
@@ -31,13 +27,13 @@ default:
  .add-lava-ssh-config:
    before_script:
  - mkdir -p -m=700 ~/.ssh
-    - echo "ProxyCommand socat - PROXY:$(echo $https_proxy | sed 
's|.*://\([^:]*\).*|\1|'):%h:%p,proxyport=$(echo $https_proxy | sed 
's|.*:\([0-9]*\)$|\1|')" >> ~/.ssh/config && chmod 600 ~/.ssh/config


This should likely be fixed to take empty proxies into account. Then it 
can stay.


That will be a long line in the ci file, but the alternative to use a 
extra script is IHMO not much better.


Quirin


  - echo "$LAVA_SSH_UPLOAD_KEY" | tr -d '\r' > ~/.ssh/lava_id_rsa 
&& chmod 600 ~/.ssh/lava_id_rsa
  - echo "$LAVA_SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts && chmod 
644 ~/.ssh/known_hosts

  .build:
    extends: .add-lava-ssh-config
    stage: build
+  image: kasproject/kas-isar:latest


Unrelated - and incorrect - change.


    script:
  - kas build 
kas.yml:board-${TARGET}.yml${XENOMAI_BUILD_OPTION}${LINUX_BUILD_OPTION}${BUILD_OPTIONS} 


  - scripts/deploy_for_testing.sh ${TARGET}
@@ -92,6 +88,7 @@ build:board-hikey:
    variables:
  TARGET: hikey
  BUILD_OPTIONS: ":opt-lava-test.yml"
+
  lava-test:board-hikey:
    needs: [ "build:board-hikey" ]
    extends: .test
@@ -104,7 +101,6 @@ build:board-beaglebone:
  TARGET: beagle-bone-black
  BUILD_OPTIONS: ":opt-lava-test.yml"
-
  lava-test:board-beaglebone:
    needs: [ "build:board-beaglebone" ]
    extends: .test



Unrelated changes.

Jan






Re: [xenomai-images PATCH 08/11] ci: add new build options

2020-02-14 Thread Gylstorff Quirin via Xenomai




On 2/14/20 9:48 AM, Jan Kiszka wrote:

On 14.02.20 08:32, Q. Gylstorff wrote:

From: Quirin Gylstorff 

Signed-off-by: Quirin Gylstorff 
---
  .gitlab-ci.yml | 30 ++
  1 file changed, 30 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 54542b1..608d5db 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -147,3 +147,33 @@ lava-test:board-x86-64-efi:linux-4.4:
    variables:
  TARGET: x86-64
  DEPLOY_DIR_EXTENSION: "4.4"
+
+build:board-beaglebone:xenomai-3.0.x:
+  extends: .build
+  variables:
+    TARGET: beagle-bone-black
+    XENOMAI_BUILD_OPTION: ":opt-xenomai-3.0.x.yml"
+    BUILD_OPTIONS: ":opt-lava-test.yml"
+    DEPLOY_DIR_EXTENSION: "xenomai-3.0.x"
+
+lava-test:board-beaglebone:xenomai-3.0.x:
+  needs: [ "build:board-beaglebone:xenomai-3.0.x" ]
+  extends: .test
+  variables:
+    TARGET: beaglebone
+    DEPLOY_DIR_EXTENSION: "xenomai-3.0.x"
+
+build:board-x86-64-efi:xenomai-3.0.x:
+  extends: .build
+  variables:
+    TARGET: x86-64-efi
+    XENOMAI_BUILD_OPTION: ":opt-xenomai-3.0.x.yml"
+    BUILD_OPTIONS: ":opt-lava-test.yml"
+    DEPLOY_DIR_EXTENSION: "xenomai-3.0.x"
+
+lava-test:board-x86-64-efi:xenomai-3.0.x:
+  needs: [ "build:board-x86-64-efi:xenomai-3.0.x" ]
+  extends: .test
+  variables:
+    TARGET: x86-64
+    DEPLOY_DIR_EXTENSION: "xenomai-3.0.x"



See my comment on the other patch: A set of xenomai-3.0.x/linux-latest 
for x86 and arm would be good enough for now


Jan



I will remove 4.4 and let xenomai-3.0.x stay. v2 will be posted as soon
as the tests are run.

Quirin




Re: [xenomai-images PATCH 10/11] recipes-xenomai/xenomai.inc: add exception handling

2020-02-14 Thread Jan Kiszka via Xenomai

On 14.02.20 09:28, Q. Gylstorff wrote:

From: Quirin Gylstorff 

If SRCREV is not available for given DISTRO_ARCH and xenomai version
get_srcrev raise a FetchError exception. Avoid a build error be
catching the exception.

Signed-off-by: Quirin Gylstorff 
---
  recipes-xenomai/xenomai/xenomai.inc | 8 +++-
  1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/recipes-xenomai/xenomai/xenomai.inc 
b/recipes-xenomai/xenomai/xenomai.inc
index 3df635c..0a082a4 100644
--- a/recipes-xenomai/xenomai/xenomai.inc
+++ b/recipes-xenomai/xenomai/xenomai.inc
@@ -13,7 +13,13 @@ inherit dpkg
  
  PROVIDES += "xenomai-kernel-source xenomai-runtime xenomai-runtime-dbgsym libxenomai1 libxenomai-dev libxenomai1-dbgsym"

  # use bitbake get_srcrev to get the current commit id
-COMMIT="${@bb.fetch2.get_srcrev(d).strip('AUTOINC+')}"
+def get_commit(d):
+try:
+return bb.fetch2.get_srcrev(d).strip('AUTOINC+')
+except bb.fetch2.FetchError:
+return ""
+
+COMMIT="${@get_commit(d)}"
  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



We have the same pattern in the linux-latest recipe. Should it be 
adjusted as well?


Jan

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



Re: [xenomai-images PATCH 08/11] ci: add new build options

2020-02-14 Thread Jan Kiszka via Xenomai

On 14.02.20 08:32, Q. Gylstorff wrote:

From: Quirin Gylstorff 

Signed-off-by: Quirin Gylstorff 
---
  .gitlab-ci.yml | 30 ++
  1 file changed, 30 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 54542b1..608d5db 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -147,3 +147,33 @@ lava-test:board-x86-64-efi:linux-4.4:
variables:
  TARGET: x86-64
  DEPLOY_DIR_EXTENSION: "4.4"
+
+build:board-beaglebone:xenomai-3.0.x:
+  extends: .build
+  variables:
+TARGET: beagle-bone-black
+XENOMAI_BUILD_OPTION: ":opt-xenomai-3.0.x.yml"
+BUILD_OPTIONS: ":opt-lava-test.yml"
+DEPLOY_DIR_EXTENSION: "xenomai-3.0.x"
+
+lava-test:board-beaglebone:xenomai-3.0.x:
+  needs: [ "build:board-beaglebone:xenomai-3.0.x" ]
+  extends: .test
+  variables:
+TARGET: beaglebone
+DEPLOY_DIR_EXTENSION: "xenomai-3.0.x"
+
+build:board-x86-64-efi:xenomai-3.0.x:
+  extends: .build
+  variables:
+TARGET: x86-64-efi
+XENOMAI_BUILD_OPTION: ":opt-xenomai-3.0.x.yml"
+BUILD_OPTIONS: ":opt-lava-test.yml"
+DEPLOY_DIR_EXTENSION: "xenomai-3.0.x"
+
+lava-test:board-x86-64-efi:xenomai-3.0.x:
+  needs: [ "build:board-x86-64-efi:xenomai-3.0.x" ]
+  extends: .test
+  variables:
+TARGET: x86-64
+DEPLOY_DIR_EXTENSION: "xenomai-3.0.x"



See my comment on the other patch: A set of xenomai-3.0.x/linux-latest 
for x86 and arm would be good enough for now


Jan

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



Re: [xenomai-images PATCH 07/11] ci: Remove proxy settings

2020-02-14 Thread Jan Kiszka via Xenomai

On 14.02.20 08:32, Q. Gylstorff wrote:

From: Quirin Gylstorff 

Signed-off-by: Quirin Gylstorff 
---
  .gitlab-ci.yml | 8 ++--
  1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b8dbbc5..54542b1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -14,10 +14,6 @@ stages:
  
  variables:

GIT_STRATEGY: clone
-  http_proxy: "$HTTP_PROXY"
-  https_proxy: "$HTTPS_PROXY"
-  ftp_proxy: "$FTP_PROXY"
-  no_proxy: "$NO_PROXY"


Even if we no longer need it, let's keep this as pattern


XENOMAI_BUILD_OPTION: ":opt-xenomai-next.yml"
LINUX_BUILD_OPTION: ":opt-linux-latest.yml"
ISAR_IMAGE: demo-image
@@ -31,13 +27,13 @@ default:
  .add-lava-ssh-config:
before_script:
  - mkdir -p -m=700 ~/.ssh
-- echo "ProxyCommand socat - PROXY:$(echo $https_proxy | sed 
's|.*://\([^:]*\).*|\1|'):%h:%p,proxyport=$(echo $https_proxy | sed 's|.*:\([0-9]*\)$|\1|')" 
>> ~/.ssh/config && chmod 600 ~/.ssh/config


This should likely be fixed to take empty proxies into account. Then it 
can stay.



  - echo "$LAVA_SSH_UPLOAD_KEY" | tr -d '\r' > ~/.ssh/lava_id_rsa && chmod 
600 ~/.ssh/lava_id_rsa
  - echo "$LAVA_SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts && chmod 644 
~/.ssh/known_hosts
  
  .build:

extends: .add-lava-ssh-config
stage: build
+  image: kasproject/kas-isar:latest


Unrelated - and incorrect - change.


script:
  - kas build 
kas.yml:board-${TARGET}.yml${XENOMAI_BUILD_OPTION}${LINUX_BUILD_OPTION}${BUILD_OPTIONS}
  - scripts/deploy_for_testing.sh ${TARGET}
@@ -92,6 +88,7 @@ build:board-hikey:
variables:
  TARGET: hikey
  BUILD_OPTIONS: ":opt-lava-test.yml"
+
  lava-test:board-hikey:
needs: [ "build:board-hikey" ]
extends: .test
@@ -104,7 +101,6 @@ build:board-beaglebone:
  TARGET: beagle-bone-black
  BUILD_OPTIONS: ":opt-lava-test.yml"
  
-

  lava-test:board-beaglebone:
needs: [ "build:board-beaglebone" ]
extends: .test



Unrelated changes.

Jan

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



Re: [xenomai-images PATCH 06/11] ci: add option for 4.19

2020-02-14 Thread Jan Kiszka via Xenomai

On 14.02.20 08:32, Q. Gylstorff wrote:

From: Quirin Gylstorff 

Signed-off-by: Quirin Gylstorff 
---
  opt-linux-4.19.yml | 17 +
  1 file changed, 17 insertions(+)
  create mode 100644 opt-linux-4.19.yml

diff --git a/opt-linux-4.19.yml b/opt-linux-4.19.yml
new file mode 100644
index 000..1613e1c
--- /dev/null
+++ b/opt-linux-4.19.yml
@@ -0,0 +1,17 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2020
+#
+# Authors:
+#  Quirin Gylstorff 
+#
+# SPDX-License-Identifier: MIT
+#
+
+header:
+  version: 8
+
+local_conf_header:
+  linux-xenomai-latest: |
+PREFERRED_VERSION_linux-xenomai = "4.19%"



What for, at this point? 3.1 uses 4.19 already, 3.0 does not support it. 
Let's add that when there is actually a use case.


Jan

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



Re: [xenomai-images PATCH 05/11] ci: Add linux-4.4 build and tests

2020-02-14 Thread Jan Kiszka via Xenomai

On 14.02.20 08:32, Q. Gylstorff wrote:

From: Quirin Gylstorff 

Add a new CI variable DEPLOY_DIR_EXTENSION to differ
between kernel builds for the same target as the kernel
version is not visibly before bootup

Signed-off-by: Quirin Gylstorff 
---
  .gitlab-ci.yml| 31 ++-
  scripts/deploy_for_testing.sh |  4 ++--
  scripts/run-lava-tests.sh |  4 ++--
  3 files changed, 34 insertions(+), 5 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index fdc24e1..b8dbbc5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,7 +1,7 @@
  #
  # Xenomai Real-Time System
  #
-# Copyright (c) Siemens AG, 2020
+# Copyright (c) Siemens AG, 2019 - 2020
  #
  # Authors:
  #  Quirin Gylstorff 
@@ -122,3 +122,32 @@ lava-test:board-x86-64-efi:
extends: .test
variables:
  TARGET: x86-64
+
+build:qemu-amd64:linux-4.4:
+  extends: .build
+  variables:
+TARGET: qemu-amd64
+LINUX_BUILD_OPTION: ":opt-linux-4.4.yml"


I would prefer having opt-xenomai-3.0.x.yml:opt-linux-latest.yml for the 
4.4 test. Our test matrix explodes if we also check latest Xenomai 
against oldest maintained kernel.


Jan


+DEPLOY_DIR_EXTENSION: "4.4"
+
+lava-test:qemu-amd64:linux-4.4:
+  needs: [ "build:qemu-amd64:linux-4.4" ]
+  extends: .test
+  variables:
+TARGET: qemu-amd64
+DEPLOY_DIR_EXTENSION: "4.4"
+
+build:board-x86-64-efi:linux-4.4:
+  extends: .build
+  variables:
+TARGET: x86-64-efi
+BUILD_OPTIONS: ":opt-lava-test.yml"
+LINUX_BUILD_OPTION: ":opt-linux-4.4.yml"
+DEPLOY_DIR_EXTENSION: "4.4"
+
+lava-test:board-x86-64-efi:linux-4.4:
+  needs: [ "build:board-x86-64-efi:linux-4.4" ]
+  extends: .test
+  variables:
+TARGET: x86-64
+DEPLOY_DIR_EXTENSION: "4.4"
diff --git a/scripts/deploy_for_testing.sh b/scripts/deploy_for_testing.sh
index db19e5f..b3d565f 100755
--- a/scripts/deploy_for_testing.sh
+++ b/scripts/deploy_for_testing.sh
@@ -3,7 +3,7 @@
  #
  # Xenomai Real-Time System
  #
-# Copyright (c) Siemens AG, 2019
+# Copyright (c) Siemens AG, 2019-2020
  #
  # Authors:
  #  Quirin Gylstorff 
@@ -27,7 +27,7 @@ lava_ssh_destination="${LAVA_SSH_USER}@${LAVA_SSH_HOST}"
  
  isar_base_name="${ISAR_IMAGE}-${ISAR_DISTRIBUTION}-${target}"

  lava_deploy_dir="${LAVA_DEPLOY_DIR:-/var/lib/lava/artifacts}"
-deploy_dir="${lava_deploy_dir}/${CI_PIPELINE_ID}"
+deploy_dir="${lava_deploy_dir}/${CI_PIPELINE_ID}/${DEPLOY_DIR_EXTENSION}"
  lava_identity="-i ${LAVA_SSH_KEY_PATH:-~/.ssh/lava_id_rsa}"
  if [ -n "${CI_PIPELINE_ID}" ]; then
  ssh -p ${LAVA_SSH_PORT} ${lava_identity} ${lava_ssh_destination} 'install -d -m 755 
"'${deploy_dir}'"'
diff --git a/scripts/run-lava-tests.sh b/scripts/run-lava-tests.sh
index 59cf14e..e02385a 100755
--- a/scripts/run-lava-tests.sh
+++ b/scripts/run-lava-tests.sh
@@ -2,7 +2,7 @@
  #
  # Xenomai Real-Time System
  #
-# Copyright (c) Siemens AG, 2019
+# Copyright (c) Siemens AG, 2019-2020
  #
  # Authors:
  #  Quirin Gylstorff 
@@ -43,7 +43,7 @@ lava_master_uri=http://localhost:${lava_master_port}
  lavacli identities add --token ${LAVA_MASTER_TOKEN} --uri ${lava_master_uri} 
--username ${LAVA_MASTER_ACCOUNT} default
  #generate lava job description from template
  artifact_url="${LAVA_ARTIFACTS_URL:-http://localhost/artifacts};
-DEPLOY_URL="${artifact_url}/${CI_PIPELINE_ID}"
+DEPLOY_URL="${artifact_url}/${CI_PIPELINE_ID}/${DEPLOY_DIR_EXTENSION}"
  job_template_path="${JOB_TEMPLATE_PATH:-tests/jobs/xenomai}"
  tmp_dir=$(mktemp -d)
  template=${tmp_dir}/job_${TARGET}_${CI_PIPELINE_ID}.yml



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



Re: [xenomai-images PATCH 04/11] recipes-kernel/linux: Add 4.4

2020-02-14 Thread Jan Kiszka via Xenomai

On 14.02.20 08:32, Q. Gylstorff wrote:

From: Quirin Gylstorff 

Add recipe for linux 4.4.

Signed-off-by: Quirin Gylstorff 
---
  opt-linux-4.4.yml | 17 +
  1 file changed, 17 insertions(+)
  create mode 100644 opt-linux-4.4.yml

diff --git a/opt-linux-4.4.yml b/opt-linux-4.4.yml
new file mode 100644
index 000..bb24a04
--- /dev/null
+++ b/opt-linux-4.4.yml
@@ -0,0 +1,17 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2020
+#
+# Authors:
+#  Quirin Gylstorff 
+#
+# SPDX-License-Identifier: MIT
+#
+
+header:
+  version: 8
+
+local_conf_header:
+  linux-xenomai-latest: |
+PREFERRED_VERSION_linux-xenomai = "4.4%"



Subject and content no longer matches. This is just allowing to select a 
4.4 release, the recipe is already there (in next).


Jan

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



[xenomai-images PATCH 1/2] recipes-kernel/linux-xenomai: Add support for DISTRO_ARCH i386

2020-02-14 Thread Q. Gylstorff via Xenomai
From: Quirin Gylstorff 

Signed-off-by: Quirin Gylstorff 
---
 recipes-kernel/linux/linux-xenomai.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/recipes-kernel/linux/linux-xenomai.inc 
b/recipes-kernel/linux/linux-xenomai.inc
index ad3629b..3407b82 100644
--- a/recipes-kernel/linux/linux-xenomai.inc
+++ b/recipes-kernel/linux/linux-xenomai.inc
@@ -34,7 +34,7 @@ dpkg_runbuild_prepend() {
arm64)
ARCH=arm64
;;
-   amd64)
+   amd64|i386)
ARCH=x86
;;
*)
-- 
2.20.1




[xenomai-images PATCH 0/2] Add support for x86(32bit)

2020-02-14 Thread Q. Gylstorff via Xenomai
From: Quirin Gylstorff 

Add missing entry for x86 32 build. Allow overwrite of derived
isar layers. Patch is send upstream to isar.

Quirin Gylstorff (2):
  recipes-kernel/linux-xenomai: Add support for DISTRO_ARCH i386
  recipes-kernel/linux: Allow overwrite of KERNEL_DEFCONFIG

 kas.yml   |  4 +++
 ...inux-Weak-KERNEL_DEFCONFIG-to-allow-.patch | 29 +++
 recipes-kernel/linux/linux-xenomai.inc|  4 +--
 3 files changed, 35 insertions(+), 2 deletions(-)
 create mode 100644 
patches/0001-recipes-kernel-linux-Weak-KERNEL_DEFCONFIG-to-allow-.patch

-- 
2.20.1




[xenomai-images PATCH 2/2] recipes-kernel/linux: Allow overwrite of KERNEL_DEFCONFIG

2020-02-14 Thread Q. Gylstorff via Xenomai
From: Quirin Gylstorff 

Signed-off-by: Quirin Gylstorff 
---
 kas.yml   |  4 +++
 ...inux-Weak-KERNEL_DEFCONFIG-to-allow-.patch | 29 +++
 recipes-kernel/linux/linux-xenomai.inc|  2 +-
 3 files changed, 34 insertions(+), 1 deletion(-)
 create mode 100644 
patches/0001-recipes-kernel-linux-Weak-KERNEL_DEFCONFIG-to-allow-.patch

diff --git a/kas.yml b/kas.yml
index d04b9c3..52c81e3 100644
--- a/kas.yml
+++ b/kas.yml
@@ -23,6 +23,10 @@ repos:
 refspec: 18b3e9a15d1f054f5d1e697c66a8f1f9befc0537
 layers:
   meta:
+patches:
+  weak-kernel-config:
+path: 
patches/0001-recipes-kernel-linux-Weak-KERNEL_DEFCONFIG-to-allow-.patch
+repo: xenomai
 
 bblayers_conf_header:
   standard: |
diff --git 
a/patches/0001-recipes-kernel-linux-Weak-KERNEL_DEFCONFIG-to-allow-.patch 
b/patches/0001-recipes-kernel-linux-Weak-KERNEL_DEFCONFIG-to-allow-.patch
new file mode 100644
index 000..6b68473
--- /dev/null
+++ b/patches/0001-recipes-kernel-linux-Weak-KERNEL_DEFCONFIG-to-allow-.patch
@@ -0,0 +1,29 @@
+From 8fe37bbc21ae24ae628fdbe64316fd3753385f4c Mon Sep 17 00:00:00 2001
+From: Quirin Gylstorff 
+Date: Wed, 15 Jan 2020 15:24:43 +0100
+Subject: [PATCH] recipes-kernel/linux: Weak KERNEL_DEFCONFIG to allow
+ overwrites
+To: isar-us...@googlegroups.com
+Cc: Jan Kiszka 
+
+Signed-off-by: Quirin Gylstorff 
+---
+ meta/recipes-kernel/linux/linux-custom.inc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meta/recipes-kernel/linux/linux-custom.inc 
b/meta/recipes-kernel/linux/linux-custom.inc
+index d31da3b..4fb7ca2 100644
+--- a/meta/recipes-kernel/linux/linux-custom.inc
 b/meta/recipes-kernel/linux/linux-custom.inc
+@@ -39,7 +39,7 @@ KERNEL_LIBC_DEV_DEPLOY ?= "0"
+ 
+ LINUX_VERSION_EXTENSION ?= ""
+ 
+-KERNEL_DEFCONFIG ?= ""
++KERNEL_DEFCONFIG ??= ""
+ 
+ # Add our template meta-data to the sources
+ FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/files:"
+-- 
+2.20.1
+
diff --git a/recipes-kernel/linux/linux-xenomai.inc 
b/recipes-kernel/linux/linux-xenomai.inc
index 3407b82..185b60b 100644
--- a/recipes-kernel/linux/linux-xenomai.inc
+++ b/recipes-kernel/linux/linux-xenomai.inc
@@ -11,7 +11,7 @@
 
 require recipes-kernel/linux/linux-custom.inc
 
-KERNEL_DEFCONFIG = "${DISTRO_ARCH}_defconfig"
+KERNEL_DEFCONFIG ?= "${DISTRO_ARCH}_defconfig"
 
 SRC_URI += "file://${KERNEL_DEFCONFIG}"
 
-- 
2.20.1




[xenomai-images PATCH 11/11] ci: Add target ipc227e for testing 4.4

2020-02-14 Thread Q. Gylstorff via Xenomai
From: Quirin Gylstorff 

Signed-off-by: Quirin Gylstorff 
---
 .gitlab-ci.yml |  4 +-
 recipes-kernel/linux/files/amd64_defconfig |  3 +-
 scripts/run-lava-tests.sh  |  1 +
 tests/jobs/xenomai-ipc227e.yml | 74 ++
 4 files changed, 79 insertions(+), 3 deletions(-)
 create mode 100644 tests/jobs/xenomai-ipc227e.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 608d5db..a783a6b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -145,7 +145,7 @@ lava-test:board-x86-64-efi:linux-4.4:
   needs: [ "build:board-x86-64-efi:linux-4.4" ]
   extends: .test
   variables:
-TARGET: x86-64
+TARGET: ipc227e
 DEPLOY_DIR_EXTENSION: "4.4"
 
 build:board-beaglebone:xenomai-3.0.x:
@@ -175,5 +175,5 @@ lava-test:board-x86-64-efi:xenomai-3.0.x:
   needs: [ "build:board-x86-64-efi:xenomai-3.0.x" ]
   extends: .test
   variables:
-TARGET: x86-64
+TARGET: ipc227e
 DEPLOY_DIR_EXTENSION: "xenomai-3.0.x"
diff --git a/recipes-kernel/linux/files/amd64_defconfig 
b/recipes-kernel/linux/files/amd64_defconfig
index 9faed52..bc5cd0b 100644
--- a/recipes-kernel/linux/files/amd64_defconfig
+++ b/recipes-kernel/linux/files/amd64_defconfig
@@ -1891,7 +1891,8 @@ CONFIG_NET_VENDOR_INTEL=y
 CONFIG_E1000=y
 CONFIG_E1000E=y
 CONFIG_E1000E_HWTS=y
-# CONFIG_IGB is not set
+CONFIG_IGB=y
+CONFIG_IGB_HWMON=y
 # CONFIG_IGBVF is not set
 # CONFIG_IXGB is not set
 # CONFIG_IXGBE is not set
diff --git a/scripts/run-lava-tests.sh b/scripts/run-lava-tests.sh
index e02385a..1f502c4 100755
--- a/scripts/run-lava-tests.sh
+++ b/scripts/run-lava-tests.sh
@@ -49,6 +49,7 @@ tmp_dir=$(mktemp -d)
 template=${tmp_dir}/job_${TARGET}_${CI_PIPELINE_ID}.yml
 cp ${job_template_path}-${TARGET}.yml ${template}
 sed -i "s|\${TARGET}|${TARGET}|g" $template
+sed -i "s|\${BUILD_ARCH}|${BUILD_ARCH}|g" $template
 sed -i "s|\${DEPLOY_URL}|${DEPLOY_URL}|g" $template
 sed -i "s|\${ISAR_IMAGE}|${ISAR_IMAGE}|g" $template
 sed -i "s|\${ISAR_DISTRIBUTION}|${ISAR_DISTRIBUTION}|g" $template
diff --git a/tests/jobs/xenomai-ipc227e.yml b/tests/jobs/xenomai-ipc227e.yml
new file mode 100644
index 000..e5a2f35
--- /dev/null
+++ b/tests/jobs/xenomai-ipc227e.yml
@@ -0,0 +1,74 @@
+#
+# Xenomai Real-Time System
+#
+# Copyright (c) Siemens AG, 2019
+#
+# Authors:
+#  Quirin Gylstorff 
+#
+# SPDX-License-Identifier: MIT
+#
+job_name: xenomai-test-suite
+device_type: ipc227e
+
+timeouts:
+  job:
+minutes: 30
+  action:
+minutes: 20
+  connection:
+minutes: 2
+priority: medium
+visibility: public
+
+metadata:
+  # please change these fields when modifying this job for your own tests.
+  docs-source: xenomai-cof
+  docs-filename: pipeline-xenomai-cof
+# ACTION_BLOCK
+actions:
+- deploy:
+timeout:
+  minutes: 5
+to: tftp
+kernel:
+  url: ${DEPLOY_URL}/demo-image-xenomai-demo-x86-64-efi-vmlinuz
+  type: bzimage
+ramdisk:
+  url: ${DEPLOY_URL}/demo-image-xenomai-demo-x86-64-efi-initrd.img
+  compression: gz
+nfsrootfs:
+  url: ${DEPLOY_URL}/demo-image-xenomai-demo-x86-64-efi.tar.gz
+  compression: gz
+# BOOT_BLOCK
+- boot:
+timeout:
+  minutes: 5
+method: ipxe
+commands: nfs
+prompts: ["root@demo:"]
+auto_login:
+  login_prompt: 'demo login:'
+  username: root
+  password_prompt: 'Password:'
+  password: root
+
+- test:
+timeout:
+  minutes: 30
+definitions:
+- repository: http://git.linaro.org/lava-team/lava-functional-tests.git
+  from: git
+  path: lava-test-shell/smoke-tests-basic.yaml
+  name: smoke-tests
+- repository:
+metadata:
+  format: Lava-Test Test Definition 1.0
+  name: xenomai-test-suite
+  description: "runs the xenomai test suite"
+run:
+  steps:
+- lava-test-case xenomai-test --shell xeno-test -k -l \"dohell -m 
/tmp 300\" -p 1000
+  from: inline
+  path: inline/xenomai-test-suite.yaml
+  name: xenomai-test-suite
-- 
2.20.1




[xenomai-images PATCH 10/11] recipes-xenomai/xenomai.inc: add exception handling

2020-02-14 Thread Q. Gylstorff via Xenomai
From: Quirin Gylstorff 

If SRCREV is not available for given DISTRO_ARCH and xenomai version
get_srcrev raise a FetchError exception. Avoid a build error be
catching the exception.

Signed-off-by: Quirin Gylstorff 
---
 recipes-xenomai/xenomai/xenomai.inc | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/recipes-xenomai/xenomai/xenomai.inc 
b/recipes-xenomai/xenomai/xenomai.inc
index 3df635c..0a082a4 100644
--- a/recipes-xenomai/xenomai/xenomai.inc
+++ b/recipes-xenomai/xenomai/xenomai.inc
@@ -13,7 +13,13 @@ inherit dpkg
 
 PROVIDES += "xenomai-kernel-source xenomai-runtime xenomai-runtime-dbgsym 
libxenomai1 libxenomai-dev libxenomai1-dbgsym"
 # use bitbake get_srcrev to get the current commit id
-COMMIT="${@bb.fetch2.get_srcrev(d).strip('AUTOINC+')}"
+def get_commit(d):
+try:
+return bb.fetch2.get_srcrev(d).strip('AUTOINC+')
+except bb.fetch2.FetchError:
+return ""
+
+COMMIT="${@get_commit(d)}"
 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
-- 
2.20.1