From: Uladzimir Bely <ubely@ilbers.de>
To: "xenomai@xenomai.org" <xenomai@xenomai.org>,
"Bezdeka, Florian" <florian.bezdeka@siemens.com>
Subject: Re: [xenomai-images] [PATCH 1/1] Changes to support sbuild-based Isar
Date: Thu, 09 Dec 2021 13:11:46 +0300 [thread overview]
Message-ID: <2120415.hkbZ0PkbqX@hp> (raw)
In-Reply-To: <a76324c5f3ce543c2e3626cb2b2a2adda8f55089.camel@siemens.com>
In mail from четверг, 9 декабря 2021 г. 12:42:44 +03 user Bezdeka, Florian
wrote:
> On Thu, 2021-12-09 at 08:36 +0100, Uladzimir Bely via Xenomai wrote:
>
> > These patch is required to build Isar from 'ubely/sbuild' branch,
> > e.g. refspec: 37a71e72c7b8e9ae7e9f6a402ecdc6ff66eab8c4
>
>
> We're using that, so why do we need to patch? Is that related to the
> new SBUILD feature in ISAR? No way to handle that without breaking many
> downstream layers?
>
>
> >
> > Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
> > ---
> >
> > recipes-kernel/linux/linux-xenomai.inc | 14 ++++++++------
> > recipes-xenomai/xenomai/xenomai.inc | 4 +---
> > 2 files changed, 9 insertions(+), 9 deletions(-)
> >
> >
> > diff --git a/recipes-kernel/linux/linux-xenomai.inc
> > b/recipes-kernel/linux/linux-xenomai.inc
index 1852bf6..d68c7a1 100644
> > --- a/recipes-kernel/linux/linux-xenomai.inc
> > +++ b/recipes-kernel/linux/linux-xenomai.inc
> > @@ -28,7 +28,7 @@ def get_commit(d):
> >
> >
> > LINUX_COMMIT ?= "${@get_commit(d)}"
> >
> >
> > -dpkg_runbuild_prepend() {
> > +dpkg_configure_kernel_append() {
> >
> > case ${DISTRO_ARCH} in
> > armhf)
> >
> > ARCH=arm
> >
> > @@ -46,9 +46,11 @@ dpkg_runbuild_prepend() {
> >
> > bbplain $(printf "linux-xenomai-%s: Building revision %.20s\n" \
> >
> > ${PV} ${LINUX_COMMIT})
> >
> >
> >
> > - ${BUILDCHROOT_DIR}/usr/src/xenomai-kernel-source/scripts/prepare-
kernel.
> > sh \
- --linux=${BUILDCHROOT_DIR}/${PP}/${PPS} --arch=$ARCH \
> > - --outpatch=${WORKDIR}/xenomai-kernel.patch
> > - patch -d ${BUILDCHROOT_DIR}/${PP}/${PPS} \
> > - -p1 -i ${WORKDIR}/xenomai-kernel.patch
> > + SBUILD_PREBUILD="${SBUILD_PREBUILD} && \
> > + touch /home/builder/${PN}/file.touch && \
>
>
> Where does this paths come from? Looks kas or even kas-container
> related.
>
It's coming from current 'sbuild' series.
The problem here is the following. We are building 'linux-xenomai` here and
relay on some '${BUILDCHROOT_DIR}/usr/src/xenomai-kernel-source/scripts/
prepare-kernel.sh' script that is not a part of 'linux-xenomai' recipe.
Buildchroot allows to do do that because it doesn't provide 'clean room' build
environment, so it is already 'polluted' by previously installed packages.
That's why we have this prepare-kernel.sh preinstalled and can run at any
moment.
With sbuild, package is compiled in clean environment, so we can't directly
reuse files belonging to other packages. To do that, we use SBUILD_PREBUILD
variable to keep command that should be passed later to sbuild compilation.
So, sbuild internally first install dependencies in clean environment and
executes this command at some internal stage.
>
> > + /usr/src/xenomai-kernel-source/scripts/prepare-kernel.sh \
> > + --linux=%p --arch=${ARCH} \
> > + --outpatch=/home/builder/${PN}/xenomai-kernel.patch && \
> > + patch -d %p -p1 -i /home/builder/${PN}/xenomai-kernel.patch \
> > + "
> >
> > }
> >
> > diff --git a/recipes-xenomai/xenomai/xenomai.inc
> > b/recipes-xenomai/xenomai/xenomai.inc
index 8f13767..454dd7b 100644
> > --- a/recipes-xenomai/xenomai/xenomai.inc
> > +++ b/recipes-xenomai/xenomai/xenomai.inc
> > @@ -41,7 +41,5 @@ do_prepare_build() {
> >
> > 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"
> > + SBUILD_PREBUILD="cd %p; scripts/bootstrap"
> >
> > }
>
>
--
Uladzimir Bely
Promwad Ltd.
External service provider of ilbers GmbH
Maria-Merian-Str. 8
85521 Ottobrunn, Germany
+49 (89) 122 67 24-0
Commercial register Munich, HRB 214197
General Manager: Baurzhan Ismagulov
prev parent reply other threads:[~2021-12-09 10:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-09 7:36 [xenomai-images] [PATCH 0/1] Upcoming sbuild in Isar support Uladzimir Bely
2021-12-09 7:36 ` [xenomai-images] [PATCH 1/1] Changes to support sbuild-based Isar Uladzimir Bely
2021-12-09 9:35 ` Jan Kiszka
2021-12-13 5:41 ` Uladzimir Bely
2021-12-13 7:44 ` Jan Kiszka
2021-12-09 9:42 ` Bezdeka, Florian
2021-12-09 9:43 ` Bezdeka, Florian
2021-12-09 9:48 ` Bezdeka, Florian
2021-12-09 10:11 ` Uladzimir Bely [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2120415.hkbZ0PkbqX@hp \
--to=ubely@ilbers.de \
--cc=florian.bezdeka@siemens.com \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.