public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "Maxim Yu. Osipov" <mosipov@ilbers.de>
To: Claudius Heine <claudius.heine.ext@siemens.com>,
	isar-users@googlegroups.com
Subject: Re: [PATCH 1/2] meta-isar: Separate images per MACHINE
Date: Fri, 15 Mar 2019 10:02:48 +0100	[thread overview]
Message-ID: <91c1cdc1-9e63-7833-1518-e64dd144f102@ilbers.de> (raw)
In-Reply-To: <7984d051-8bf0-dff1-804d-104ad2a17af7@siemens.com>

Hi Claudius,

Thank you for your fast feedback.

On 3/14/19 8:21 AM, Claudius Heine wrote:
> Hi Maxim,
> 
> On 13/03/2019 17.42, Maxim Yu. Osipov wrote:
>> Hi everybody,
>>
>> Any feedback on this patch?
>> This is a "fast track" patch as it fixes problem which delayed the 
>> release.
>>
>> Thanks,
>> Maxim.
>>
>> On 3/12/19 9:27 PM, Maxim Yu. Osipov wrote:
>>> Image directory gets overwritten when running for two targets
>>> with the same pair DISTRO and DISTRO_ARCH, resulting
>>> start_vm script failure.
>>>
>>> Note:
>>> This patch affects the bitbake multiconfig target calling syntax:
>>> PREVIOUS: "multiconfig:$MACHINE-$DISTRO:isar-image-base"
>>> NEW: "multiconfig:$MACHINE-$DISTRO:isar-image-base-$MACHINE"
>>>
>>> Suggested-by: Jan Kiszka <jan.kiszka@siemens.com>
>>> Signed-off-by: Maxim Yu. Osipov <mosipov@ilbers.de>
>>> ---
>>>   meta-isar/conf/conf-notes.txt                    |  6 ++--
>>>   meta-isar/recipes-core/images/isar-image-base.bb |  2 ++
>>>   meta-isar/recipes-core/images/isar-image-ubi.bb  |  2 ++
>>>   scripts/ci_build.sh                              | 40 
>>> ++++++++++++------------
>>>   scripts/start_vm                                 | 16 +++++-----
>>>   5 files changed, 35 insertions(+), 31 deletions(-)
>>>
>>> diff --git a/meta-isar/conf/conf-notes.txt 
>>> b/meta-isar/conf/conf-notes.txt
>>> index 87bd2dc..84049e1 100644
>>> --- a/meta-isar/conf/conf-notes.txt
>>> +++ b/meta-isar/conf/conf-notes.txt
>>> @@ -1,4 +1,4 @@
>>>   Common targets are:
>>> -    multiconfig:qemuarm-stretch:isar-image-base
>>> -    multiconfig:qemuamd64-stretch:isar-image-base
>>> -    multiconfig:rpi-jessie:isar-image-base
>>> +    multiconfig:qemuarm-stretch:isar-image-base-qemuarm
>>> +    multiconfig:qemuamd64-stretch:isar-image-base-qemuamd64
>>> +    multiconfig:rpi-jessie:isar-image-base-rpi
> 
> I am not a big fan of having to specify the machine when building a image.
> 
> Would it be possible to have virtual recipes?
> 
> IMO all isar-image-base-* would provide a isar-image-base.

Not sure that I got your point.
OK, let's add two line to isar-image-base.bb

PF .= "-${MACHINE}"
PROVIDES += "isar-image-base"

Let's call 'bitbake multiconfig:qemuarm-stretch:isar-image-base' - (UX 
is untouched - that's fine), but the problem that exactly 
'isar-image-base' directory will be created under 
"tmp/work/debian-stretch-armhf"
tmp/work/debian-stretch-armhf$ ls -l
total 52
drwxr-xr-x 4 myo myo 4096 Mar 15 09:53 buildchroot-host
drwxr-xr-x 4 myo myo 4096 Mar 15 09:55 buildchroot-target
drwxr-xr-x 4 myo myo 4096 Mar 15 09:59 enable-fsck-1.0-r0
drwxr-xr-x 6 myo myo 4096 Mar 15 09:59 example-module-armmp-1.0-r0
drwxr-xr-x 4 myo myo 4096 Mar 15 09:58 example-raw-0.3-r0
drwxr-xr-x 4 myo myo 4096 Mar 15 09:59 hello-isar-0.3-a18c14c-r0
drwxr-xr-x 3 myo myo 4096 Mar 15 09:51 isar-apt-1.0-r0
drwxr-xr-x 4 myo myo 4096 Mar 15 09:51 
isar-bootstrap-host-debian-stretch-amd64
drwxr-xr-x 4 myo myo 4096 Mar 15 09:51 isar-bootstrap-target
drwxr-xr-x 4 myo myo 4096 Mar 15 09:59 isar-cfg-localepurge-1.0-r0
drwxr-xr-x 4 myo myo 4096 Mar 15 09:59 isar-cfg-rootpw-1.0-r0
drwxr-xr-x 5 myo myo 4096 Mar 15 09:59 isar-image-base
drwxr-xr-x 4 myo myo 4096 Mar 15 09:58 libhello-0.1-98f2e41-r0
myo@tiberius:~/work/isar/src/isar/build/tmp/work/debian-stretch-armhf$


so this doesn't help to fix the problem.



> 
>>> diff --git a/meta-isar/recipes-core/images/isar-image-base.bb 
>>> b/meta-isar/recipes-core/images/isar-image-base.bb
>>> index c86e63b..0ac0c44 100644
>>> --- a/meta-isar/recipes-core/images/isar-image-base.bb
>>> +++ b/meta-isar/recipes-core/images/isar-image-base.bb
>>> @@ -11,3 +11,5 @@ LIC_FILES_CHKSUM = 
>>> "file://${LAYERDIR_core}/licenses/COPYING.GPLv2;md5=751419260
>>>   PV = "1.0"
>>>   inherit isar-image
>>> +
>>> +PN .= "-${MACHINE}"
>>> diff --git a/meta-isar/recipes-core/images/isar-image-ubi.bb 
>>> b/meta-isar/recipes-core/images/isar-image-ubi.bb
>>> index 4b7e109..8059105 100644
>>> --- a/meta-isar/recipes-core/images/isar-image-ubi.bb
>>> +++ b/meta-isar/recipes-core/images/isar-image-ubi.bb
>>> @@ -12,6 +12,8 @@ LIC_FILES_CHKSUM = 
>>> "file://${LAYERDIR_core}/licenses/COPYING.GPLv2;md5=751419260
>>>   inherit isar-image
>>> +PN .= "-${MACHINE}"
>>> +
>>>   SRC_URI += "file://ubinize.cfg.tmpl \
>>>               file://fitimage.its.tmpl"
>>> diff --git a/scripts/ci_build.sh b/scripts/ci_build.sh
>>> index bcc7545..b4df70e 100755
>>> --- a/scripts/ci_build.sh
>>> +++ b/scripts/ci_build.sh
>>> @@ -1,7 +1,7 @@
>>>   # Script for CI system build
>>>   #
>>>   # Alexander Smirnov <asmirnov@ilbers.de>
>>> -# Copyright (c) 2016-2018 ilbers GmbH
>>> +# Copyright (c) 2016-2019 ilbers GmbH
>>>   #!/bin/sh
>>> @@ -21,21 +21,21 @@ BUILD_DIR=./build
>>>   BB_ARGS="-v"
>>>   TARGETS_SET="\
>>> -            multiconfig:qemuarm-jessie:isar-image-base \
>>> -            multiconfig:qemuarm-stretch:isar-image-base \
>>> -            multiconfig:qemuarm-buster:isar-image-base \
>>> -            multiconfig:qemuarm64-stretch:isar-image-base \
>>> -            multiconfig:qemui386-jessie:isar-image-base \
>>> -            multiconfig:qemui386-stretch:isar-image-base \
>>> -            multiconfig:qemui386-buster:isar-image-base \
>>> -            multiconfig:qemuamd64-jessie:isar-image-base \
>>> -            multiconfig:qemuamd64-stretch:isar-image-base \
>>> -            multiconfig:qemuamd64-buster:isar-image-base \
>>> -            multiconfig:qemuamd64-buster-tgz:isar-image-base \
>>> -            multiconfig:nand-ubi-demo-buster:isar-image-ubi \
>>> -            multiconfig:rpi-jessie:isar-image-base"
>>> +            multiconfig:qemuarm-jessie:isar-image-base-qemuarm \
>>> +            multiconfig:qemuarm-stretch:isar-image-base-qemuarm \
>>> +            multiconfig:qemuarm-buster:isar-image-base-qemuarm \
>>> +            multiconfig:qemuarm64-stretch:isar-image-base-qemuarm64 \
>>> +            multiconfig:qemui386-jessie:isar-image-base-qemui386 \
>>> +            multiconfig:qemui386-stretch:isar-image-base-qemui386 \
>>> +            multiconfig:qemui386-buster:isar-image-base-qemui386 \
>>> +            multiconfig:qemuamd64-jessie:isar-image-base-qemuamd64 \
>>> +            multiconfig:qemuamd64-stretch:isar-image-base-qemuamd64 \
>>> +            multiconfig:qemuamd64-buster:isar-image-base-qemuamd64 \
>>> +            
>>> multiconfig:qemuamd64-buster-tgz:isar-image-base-qemuamd64 \
>>> + multiconfig:nand-ubi-demo-buster:isar-image-ubi-nand-ubi-demo \
>>> +            multiconfig:rpi-jessie:isar-image-base-rpi"
>>>             # qemu-user-static of <= buster too old to build that
>>> -          # multiconfig:qemuarm64-buster:isar-image-base
>>> +          # multiconfig:qemuarm64-buster:isar-image-base-qemuarm64
>>>   show_help() {
>>> @@ -85,9 +85,9 @@ do
>>>           FAST_BUILD="1"
>>>           CROSS_BUILD="1"
>>>           TARGETS_SET="\
>>> -                     multiconfig:qemuarm-stretch:isar-image-base \
>>> -                     multiconfig:qemuarm64-stretch:isar-image-base \
>>> -                     multiconfig:qemuamd64-stretch:isar-image-base"
>>> + multiconfig:qemuarm-stretch:isar-image-base-qemuarm \
>>> + multiconfig:qemuarm64-stretch:isar-image-base-qemuarm64 \
>>> + multiconfig:qemuamd64-stretch:isar-image-base-qemuamd64 "
>>>           ;;
>>>       -q|--quiet)
>>>           BB_ARGS=""
>>> @@ -129,12 +129,12 @@ bitbake $BB_ARGS $TARGETS_SET
>>>   # parallel build with the same target arch (armhf) fails.
>>>   # The problem is being investigated
>>>   if [ -n "$FAST_BUILD" ]; then
>>> -    bitbake $BB_ARGS multiconfig:de0-nano-soc-stretch:isar-image-base
>>> +    bitbake $BB_ARGS 
>>> multiconfig:de0-nano-soc-stretch:isar-image-base-de0-nano-soc
>>>   fi
>>>   cp -a "${ISARROOT}/meta/classes/dpkg-base.bbclass" 
>>> "${ISARROOT}/meta/classes/dpkg-base.bbclass.ci-backup"
>>>   echo -e "do_fetch_append() {\n\n}" >> 
>>> "${ISARROOT}/meta/classes/dpkg-base.bbclass"
>>> -bitbake $BB_ARGS multiconfig:qemuamd64-stretch:isar-image-base
>>> +bitbake $BB_ARGS 
>>> multiconfig:qemuamd64-stretch:isar-image-base-qemuamd64
>>>   mv "${ISARROOT}/meta/classes/dpkg-base.bbclass.ci-backup" 
>>> "${ISARROOT}/meta/classes/dpkg-base.bbclass"
>>> diff --git a/scripts/start_vm b/scripts/start_vm
>>> index 1da0742..0c007bf 100755
>>> --- a/scripts/start_vm
>>> +++ b/scripts/start_vm
>>> @@ -1,7 +1,7 @@
>>>   #!/bin/sh
>>>   #
>>>   # This software is a part of ISAR.
>>> -# Copyright (C) 2015-2017 ilbers GmbH
>>> +# Copyright (C) 2015-2019 ilbers GmbH
>>>   set -e
>>> @@ -46,7 +46,7 @@ show_help() {
>>>       echo "                          Supported: arm, i386, amd64, 
>>> arm64."
>>>       echo "    -b, --build BUILD     set path to build directory."
>>>       echo "    -d, --distro DISTRO   set isar Debian distribution."
>>> -    echo "                          Supported: jessie, stretch."
>>> +    echo "                          Supported: jessie, stretch, buster"
> 
> Well that change together with the copyright update should be moved in a 
> different patch. It has nothing to do with 'Separate images per MACHINE' 
> IMO.

Well...formally you are right, but in my opinion such "copyright" 
commits just litter the patch queue.

Thanks,
Maxim.

> regards,
> Claudius
> 
>>>       echo "    -o, --out FILE        Route QEMU console output to"
>>>       echo "                          specified file."
>>>       echo "    -p, --pid FILE        Store QEMU pid to file."
>>> @@ -101,7 +101,7 @@ do
>>>       shift
>>>   done
>>> -eval $(bitbake -e multiconfig:qemu$ARCH-$DISTRO:isar-image-base | 
>>> grep "^DEPLOY_DIR_IMAGE=")
>>> +eval $(bitbake -e 
>>> multiconfig:qemu$ARCH-$DISTRO:isar-image-base-qemu$ARCH | grep 
>>> "^DEPLOY_DIR_IMAGE=")
>>>   readonly IMAGE_DIR=$DEPLOY_DIR_IMAGE
>>>   readonly ISARROOT="$(dirname "$0")"/..
>>> @@ -112,13 +112,13 @@ eval "$(egrep 'MACHINE_SERIAL' $MACHINE_CONF 
>>> |bb2sh)"
>>>   readonly 
>>> CONFIG_CONF=$ISARROOT/meta-isar/conf/multiconfig/qemu$ARCH-$DISTRO.conf
>>>   eval "$(egrep 'QEMU_' $CONFIG_CONF |bb2sh)"
>>> -eval $(bitbake -e multiconfig:qemu$ARCH-$DISTRO:isar-image-base | 
>>> grep "^IMAGE_TYPE=")
>>> +eval $(bitbake -e 
>>> multiconfig:qemu$ARCH-$DISTRO:isar-image-base-qemu$ARCH | grep 
>>> "^IMAGE_TYPE=")
>>>   case "$IMAGE_TYPE" in
>>>       ext4-img)
>>> -    readonly 
>>> ROOTFS_IMAGE=isar-image-base-debian-$DISTRO-qemu$ARCH.ext4.img
>>> +    readonly 
>>> ROOTFS_IMAGE=isar-image-base-qemu$ARCH-debian-$DISTRO-qemu$ARCH.ext4.img
>>> -    eval $(bitbake -e multiconfig:qemu$ARCH-$DISTRO:isar-image-base 
>>> | grep "^KERNEL_IMAGE=")
>>> -    eval $(bitbake -e multiconfig:qemu$ARCH-$DISTRO:isar-image-base 
>>> | grep "^INITRD_IMAGE=")
>>> +    eval $(bitbake -e 
>>> multiconfig:qemu$ARCH-$DISTRO:isar-image-base-qemu$ARCH | grep 
>>> "^KERNEL_IMAGE=")
>>> +    eval $(bitbake -e 
>>> multiconfig:qemu$ARCH-$DISTRO:isar-image-base-qemu$ARCH | grep 
>>> "^INITRD_IMAGE=")
>>>       QKERNEL=$IMAGE_DIR/${KERNEL_IMAGE}
>>>       QINITRD=/dev/null
>>>       [ -n "$INITRD_IMAGE" ] && QINITRD=$IMAGE_DIR/${INITRD_IMAGE}
>>> @@ -128,7 +128,7 @@ case "$IMAGE_TYPE" in
>>>       KARGS="console=$MACHINE_SERIAL root=/dev/$QEMU_ROOTFS_DEV rw"
>>>       ;;
>>>       wic-img)
>>> -    readonly 
>>> ROOTFS_IMAGE=isar-image-base-debian-$DISTRO-qemu$ARCH.wic.img
>>> +    readonly 
>>> ROOTFS_IMAGE=isar-image-base-qemu$ARCH-debian-$DISTRO-qemu$ARCH.wic.img
>>>       EXTRA_ARGS="$EXTRA_ARGS -snapshot"
>>>       ;;
>>>       *)
>>>
>>
>>
> 


-- 
Maxim Osipov
ilbers GmbH
Maria-Merian-Str. 8
85521 Ottobrunn
Germany
+49 (151) 6517 6917
mosipov@ilbers.de
http://ilbers.de/
Commercial register Munich, HRB 214197
General Manager: Baurzhan Ismagulov

  parent reply	other threads:[~2019-03-15  9:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-12 20:27 Maxim Yu. Osipov
2019-03-12 20:27 ` [PATCH 2/2] doc/user_manual: Update after images per machine separation Maxim Yu. Osipov
2019-03-14  7:14   ` Jan Kiszka
2019-03-14 11:31     ` Baurzhan Ismagulov
2019-03-14 12:08       ` Jan Kiszka
2019-03-13 16:42 ` [PATCH 1/2] meta-isar: Separate images per MACHINE Maxim Yu. Osipov
2019-03-14  7:15   ` Jan Kiszka
2019-03-14  7:21   ` Claudius Heine
2019-03-14  7:28     ` Jan Kiszka
2019-03-14  8:07       ` Claudius Heine
2019-03-14  8:20         ` Claudius Heine
2019-03-14 12:22           ` Claudius Heine
2019-03-15  9:02     ` Maxim Yu. Osipov [this message]
2019-03-15 10:25       ` Claudius Heine
2019-03-15 11:22         ` Maxim Yu. Osipov
2019-03-15 14:28         ` Baurzhan Ismagulov

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=91c1cdc1-9e63-7833-1518-e64dd144f102@ilbers.de \
    --to=mosipov@ilbers.de \
    --cc=claudius.heine.ext@siemens.com \
    --cc=isar-users@googlegroups.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox