public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH v2 0/3] vmlinuz/initrd for the same MACHINE are overwritten
@ 2019-05-12 19:30 Maxim Yu. Osipov
  2019-05-12 19:30 ` [PATCH v2 1/3] meta/classes/image: Call transform_template after rootfs_install Maxim Yu. Osipov
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Maxim Yu. Osipov @ 2019-05-12 19:30 UTC (permalink / raw)
  To: isar-users

Hi everybody,

During testing of v1 patch series problem with the build of 
'multiconfig:nand-ubi-demo-buster:isar-image-ubi' target was discovered.

The first patch fixes the problem with build of multiconfig:nand-ubi-demo-buster:isar-image-ubi target.

The second patch fixes the issue #56. 

The problem with overwritten for the same MACHINE vmlinuz/initrd were detected by standard "overnight" CI. 

The third patch adds the test case to detect such kind of problems by "fast" CI.

Regards,
Maxim.

Maxim Yu. Osipov (3):
  meta/classes/image: Call transform_template after rootfs_install
  Revert "image.bbclass: make KERNEL_IMAGE & INITRD_IMAGE variable
    fixed"
  ci: Include qemuarm-buster into fast build/vm_smoke_test

 meta/classes/image.bbclass | 8 +++++---
 scripts/ci_build.sh        | 1 +
 scripts/vm_smoke_test      | 4 +---
 3 files changed, 7 insertions(+), 6 deletions(-)

-- 
2.11.0


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

* [PATCH v2 1/3] meta/classes/image: Call transform_template after rootfs_install
  2019-05-12 19:30 [PATCH v2 0/3] vmlinuz/initrd for the same MACHINE are overwritten Maxim Yu. Osipov
@ 2019-05-12 19:30 ` Maxim Yu. Osipov
  2019-05-12 19:30 ` [PATCH v2 2/3] Revert "image.bbclass: make KERNEL_IMAGE & INITRD_IMAGE variable fixed" Maxim Yu. Osipov
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 13+ messages in thread
From: Maxim Yu. Osipov @ 2019-05-12 19:30 UTC (permalink / raw)
  To: isar-users

mkimage fails in do_fit_image (in meta/classes/fit-img.bbclass)
as input fitimage.its file is generated too early by
transform_template when KERNEL_IMG isn't yet properly set.

Signed-off-by: Maxim Yu. Osipov <mosipov@ilbers.de>
---
 meta/classes/image.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index f9a3052..fb35a4c 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -169,7 +169,7 @@ do_copy_boot_files() {
         cp -f "$dtb" "${DEPLOY_DIR_IMAGE}/${DTB_FILE}"
     fi
 }
-addtask copy_boot_files before do_rootfs_postprocess after do_rootfs_install
+addtask copy_boot_files before do_rootfs_postprocess do_transform_template after do_rootfs_install
 
 python do_image_tools() {
     """Virtual task"""
-- 
2.11.0


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

* [PATCH v2 2/3] Revert "image.bbclass: make KERNEL_IMAGE & INITRD_IMAGE variable fixed"
  2019-05-12 19:30 [PATCH v2 0/3] vmlinuz/initrd for the same MACHINE are overwritten Maxim Yu. Osipov
  2019-05-12 19:30 ` [PATCH v2 1/3] meta/classes/image: Call transform_template after rootfs_install Maxim Yu. Osipov
@ 2019-05-12 19:30 ` Maxim Yu. Osipov
  2019-05-13  7:31   ` Claudius Heine
  2019-05-12 19:31 ` [PATCH v2 3/3] ci: Include qemuarm-buster into fast build/vm_smoke_test Maxim Yu. Osipov
  2019-05-14 17:24 ` [PATCH v2 0/3] vmlinuz/initrd for the same MACHINE are overwritten Maxim Yu. Osipov
  3 siblings, 1 reply; 13+ messages in thread
From: Maxim Yu. Osipov @ 2019-05-12 19:30 UTC (permalink / raw)
  To: isar-users

This reverts commit b92589c574596ac98f97cf14369cbf62872e6481.

vmlinuz and initrd are getting overwritten for the same machine
by other distros under deploy/images/${MACHINE}

Closes: #56
Signed-off-by: Maxim Yu. Osipov <mosipov@ilbers.de>
---
 meta/classes/image.bbclass | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index fb35a4c..8e6f2c9 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -13,8 +13,8 @@ IMAGE_INSTALL += "${@ ("linux-image-" + d.getVar("KERNEL_NAME", True)) if d.getV
 IMAGE_FULLNAME = "${PF}"
 
 # These variables are used by wic and start_vm
-KERNEL_IMAGE ?= "vmlinuz"
-INITRD_IMAGE ?= "initrd.img"
+KERNEL_IMAGE ?= "${@get_image_name(d, 'vmlinuz')[1]}"
+INITRD_IMAGE ?= "${@get_image_name(d, 'initrd.img')[1]}"
 
 # Useful variables for imager implementations:
 PP = "/home/builder/${PN}"
@@ -149,10 +149,12 @@ addtask rootfs_install before do_build after do_unpack
 
 do_copy_boot_files[dirs] = "${DEPLOY_DIR_IMAGE}"
 do_copy_boot_files() {
+    KERNEL_IMAGE=${@get_image_name(d, 'vmlinuz')[1]}
     if [ -n "${KERNEL_IMAGE}" ]; then
         cp -f ${IMAGE_ROOTFS}/boot/${@get_image_name(d, 'vmlinuz')[0]} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE}
     fi
 
+    INITRD_IMAGE=${@get_image_name(d, 'initrd.img')[1]}
     if [ -n "${INITRD_IMAGE}" ]; then
         sudo cp -f ${IMAGE_ROOTFS}/boot/${@get_image_name(d, 'initrd.img')[0]} ${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE}
     fi
-- 
2.11.0


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

* [PATCH v2 3/3] ci: Include qemuarm-buster into fast build/vm_smoke_test
  2019-05-12 19:30 [PATCH v2 0/3] vmlinuz/initrd for the same MACHINE are overwritten Maxim Yu. Osipov
  2019-05-12 19:30 ` [PATCH v2 1/3] meta/classes/image: Call transform_template after rootfs_install Maxim Yu. Osipov
  2019-05-12 19:30 ` [PATCH v2 2/3] Revert "image.bbclass: make KERNEL_IMAGE & INITRD_IMAGE variable fixed" Maxim Yu. Osipov
@ 2019-05-12 19:31 ` Maxim Yu. Osipov
  2019-05-14 17:24 ` [PATCH v2 0/3] vmlinuz/initrd for the same MACHINE are overwritten Maxim Yu. Osipov
  3 siblings, 0 replies; 13+ messages in thread
From: Maxim Yu. Osipov @ 2019-05-12 19:31 UTC (permalink / raw)
  To: isar-users

Signed-off-by: Maxim Yu. Osipov <mosipov@ilbers.de>
---
 scripts/ci_build.sh   | 1 +
 scripts/vm_smoke_test | 4 +---
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/scripts/ci_build.sh b/scripts/ci_build.sh
index df751d3..a38e2b7 100755
--- a/scripts/ci_build.sh
+++ b/scripts/ci_build.sh
@@ -83,6 +83,7 @@ do
         CROSS_BUILD="1"
         TARGETS_SET="\
                      multiconfig:qemuarm-stretch:isar-image-base \
+                     multiconfig:qemuarm-buster:isar-image-base \
                      multiconfig:qemuarm64-stretch:isar-image-base \
                      multiconfig:qemuamd64-stretch:isar-image-base \
                      multiconfig:rpi-stretch:isar-image-base"
diff --git a/scripts/vm_smoke_test b/scripts/vm_smoke_test
index 6e28d54..237205e 100755
--- a/scripts/vm_smoke_test
+++ b/scripts/vm_smoke_test
@@ -146,10 +146,8 @@ do
 done
 
 # ARM machine
-if [ -z "$FAST_BUILD" ]; then
-    run_test arm buster
-fi
 run_test arm stretch
+run_test arm buster
 
 # AMD64 machine
 if [ -z "$FAST_BUILD" ]; then
-- 
2.11.0


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

* Re: [PATCH v2 2/3] Revert "image.bbclass: make KERNEL_IMAGE & INITRD_IMAGE variable fixed"
  2019-05-12 19:30 ` [PATCH v2 2/3] Revert "image.bbclass: make KERNEL_IMAGE & INITRD_IMAGE variable fixed" Maxim Yu. Osipov
@ 2019-05-13  7:31   ` Claudius Heine
  2019-05-13  7:39     ` Maxim Yu. Osipov
  0 siblings, 1 reply; 13+ messages in thread
From: Claudius Heine @ 2019-05-13  7:31 UTC (permalink / raw)
  To: Maxim Yu. Osipov, isar-users

Hi Maxim,

On 12/05/2019 21.30, Maxim Yu. Osipov wrote:
> This reverts commit b92589c574596ac98f97cf14369cbf62872e6481.
> 
> vmlinuz and initrd are getting overwritten for the same machine
> by other distros under deploy/images/${MACHINE}

NACK. I don't see a patch that addresses the issue described in the 
commit message of that reverted patch in this patchset in a different 
way, so this is a regression.

regards,
Claudius

> 
> Closes: #56
> Signed-off-by: Maxim Yu. Osipov <mosipov@ilbers.de>
> ---
>   meta/classes/image.bbclass | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index fb35a4c..8e6f2c9 100644
> --- a/meta/classes/image.bbclass
> +++ b/meta/classes/image.bbclass
> @@ -13,8 +13,8 @@ IMAGE_INSTALL += "${@ ("linux-image-" + d.getVar("KERNEL_NAME", True)) if d.getV
>   IMAGE_FULLNAME = "${PF}"
>   
>   # These variables are used by wic and start_vm
> -KERNEL_IMAGE ?= "vmlinuz"
> -INITRD_IMAGE ?= "initrd.img"
> +KERNEL_IMAGE ?= "${@get_image_name(d, 'vmlinuz')[1]}"
> +INITRD_IMAGE ?= "${@get_image_name(d, 'initrd.img')[1]}"
>   
>   # Useful variables for imager implementations:
>   PP = "/home/builder/${PN}"
> @@ -149,10 +149,12 @@ addtask rootfs_install before do_build after do_unpack
>   
>   do_copy_boot_files[dirs] = "${DEPLOY_DIR_IMAGE}"
>   do_copy_boot_files() {
> +    KERNEL_IMAGE=${@get_image_name(d, 'vmlinuz')[1]}
>       if [ -n "${KERNEL_IMAGE}" ]; then
>           cp -f ${IMAGE_ROOTFS}/boot/${@get_image_name(d, 'vmlinuz')[0]} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE}
>       fi
>   
> +    INITRD_IMAGE=${@get_image_name(d, 'initrd.img')[1]}
>       if [ -n "${INITRD_IMAGE}" ]; then
>           sudo cp -f ${IMAGE_ROOTFS}/boot/${@get_image_name(d, 'initrd.img')[0]} ${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE}
>       fi
> 

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de

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

* Re: [PATCH v2 2/3] Revert "image.bbclass: make KERNEL_IMAGE & INITRD_IMAGE variable fixed"
  2019-05-13  7:31   ` Claudius Heine
@ 2019-05-13  7:39     ` Maxim Yu. Osipov
  2019-05-13  7:43       ` Maxim Yu. Osipov
  2019-05-13  8:11       ` Claudius Heine
  0 siblings, 2 replies; 13+ messages in thread
From: Maxim Yu. Osipov @ 2019-05-13  7:39 UTC (permalink / raw)
  To: Claudius Heine, isar-users

On 5/13/19 9:31 AM, Claudius Heine wrote:
> Hi Maxim,
> 
> On 12/05/2019 21.30, Maxim Yu. Osipov wrote:
>> This reverts commit b92589c574596ac98f97cf14369cbf62872e6481.
>>
>> vmlinuz and initrd are getting overwritten for the same machine
>> by other distros under deploy/images/${MACHINE}
> 
> NACK. I don't see a patch that addresses the issue described in the 
> commit message of that reverted patch in this patchset in a different 
> way, so this is a regression.


Do you confirm that issue #53 appeared after applying your series into 
the 'next'?

just look in
http://isar-build.org:8080/job/isar_next/ws/build/tmp/deploy/images/qemuarm/

vmlinuz/initrd for stretch was overwritten by subsequent build for buster.

Regards,
Maxim.

> regards,
> Claudius
> 
>>
>> Closes: #56
>> Signed-off-by: Maxim Yu. Osipov <mosipov@ilbers.de>
>> ---
>>   meta/classes/image.bbclass | 6 ++++--
>>   1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
>> index fb35a4c..8e6f2c9 100644
>> --- a/meta/classes/image.bbclass
>> +++ b/meta/classes/image.bbclass
>> @@ -13,8 +13,8 @@ IMAGE_INSTALL += "${@ ("linux-image-" + 
>> d.getVar("KERNEL_NAME", True)) if d.getV
>>   IMAGE_FULLNAME = "${PF}"
>>   # These variables are used by wic and start_vm
>> -KERNEL_IMAGE ?= "vmlinuz"
>> -INITRD_IMAGE ?= "initrd.img"
>> +KERNEL_IMAGE ?= "${@get_image_name(d, 'vmlinuz')[1]}"
>> +INITRD_IMAGE ?= "${@get_image_name(d, 'initrd.img')[1]}"
>>   # Useful variables for imager implementations:
>>   PP = "/home/builder/${PN}"
>> @@ -149,10 +149,12 @@ addtask rootfs_install before do_build after 
>> do_unpack
>>   do_copy_boot_files[dirs] = "${DEPLOY_DIR_IMAGE}"
>>   do_copy_boot_files() {
>> +    KERNEL_IMAGE=${@get_image_name(d, 'vmlinuz')[1]}
>>       if [ -n "${KERNEL_IMAGE}" ]; then
>>           cp -f ${IMAGE_ROOTFS}/boot/${@get_image_name(d, 
>> 'vmlinuz')[0]} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE}
>>       fi
>> +    INITRD_IMAGE=${@get_image_name(d, 'initrd.img')[1]}
>>       if [ -n "${INITRD_IMAGE}" ]; then
>>           sudo cp -f ${IMAGE_ROOTFS}/boot/${@get_image_name(d, 
>> 'initrd.img')[0]} ${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE}
>>       fi
>>
> 


-- 
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

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

* Re: [PATCH v2 2/3] Revert "image.bbclass: make KERNEL_IMAGE & INITRD_IMAGE variable fixed"
  2019-05-13  7:39     ` Maxim Yu. Osipov
@ 2019-05-13  7:43       ` Maxim Yu. Osipov
  2019-05-13  8:11       ` Claudius Heine
  1 sibling, 0 replies; 13+ messages in thread
From: Maxim Yu. Osipov @ 2019-05-13  7:43 UTC (permalink / raw)
  To: Claudius Heine, isar-users

On 5/13/19 9:39 AM, Maxim Yu. Osipov wrote:
> On 5/13/19 9:31 AM, Claudius Heine wrote:
>> Hi Maxim,
>>
>> On 12/05/2019 21.30, Maxim Yu. Osipov wrote:
>>> This reverts commit b92589c574596ac98f97cf14369cbf62872e6481.
>>>
>>> vmlinuz and initrd are getting overwritten for the same machine
>>> by other distros under deploy/images/${MACHINE}
>>
>> NACK. I don't see a patch that addresses the issue described in the 
>> commit message of that reverted patch in this patchset in a different 
>> way, so this is a regression.
> 
> 
> Do you confirm that issue #53 appeared after applying your series into 
> the 'next'?

Sorry for the misprint. Should be #56
https://github.com/ilbers/isar/issues/56



> just look in
> http://isar-build.org:8080/job/isar_next/ws/build/tmp/deploy/images/qemuarm/ 
> 
> 
> vmlinuz/initrd for stretch was overwritten by subsequent build for buster.
> 
> Regards,
> Maxim.
> 
>> regards,
>> Claudius
>>
>>>
>>> Closes: #56
>>> Signed-off-by: Maxim Yu. Osipov <mosipov@ilbers.de>
>>> ---
>>>   meta/classes/image.bbclass | 6 ++++--
>>>   1 file changed, 4 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
>>> index fb35a4c..8e6f2c9 100644
>>> --- a/meta/classes/image.bbclass
>>> +++ b/meta/classes/image.bbclass
>>> @@ -13,8 +13,8 @@ IMAGE_INSTALL += "${@ ("linux-image-" + 
>>> d.getVar("KERNEL_NAME", True)) if d.getV
>>>   IMAGE_FULLNAME = "${PF}"
>>>   # These variables are used by wic and start_vm
>>> -KERNEL_IMAGE ?= "vmlinuz"
>>> -INITRD_IMAGE ?= "initrd.img"
>>> +KERNEL_IMAGE ?= "${@get_image_name(d, 'vmlinuz')[1]}"
>>> +INITRD_IMAGE ?= "${@get_image_name(d, 'initrd.img')[1]}"
>>>   # Useful variables for imager implementations:
>>>   PP = "/home/builder/${PN}"
>>> @@ -149,10 +149,12 @@ addtask rootfs_install before do_build after 
>>> do_unpack
>>>   do_copy_boot_files[dirs] = "${DEPLOY_DIR_IMAGE}"
>>>   do_copy_boot_files() {
>>> +    KERNEL_IMAGE=${@get_image_name(d, 'vmlinuz')[1]}
>>>       if [ -n "${KERNEL_IMAGE}" ]; then
>>>           cp -f ${IMAGE_ROOTFS}/boot/${@get_image_name(d, 
>>> 'vmlinuz')[0]} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE}
>>>       fi
>>> +    INITRD_IMAGE=${@get_image_name(d, 'initrd.img')[1]}
>>>       if [ -n "${INITRD_IMAGE}" ]; then
>>>           sudo cp -f ${IMAGE_ROOTFS}/boot/${@get_image_name(d, 
>>> 'initrd.img')[0]} ${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE}
>>>       fi
>>>
>>
> 
> 


-- 
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

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

* Re: [PATCH v2 2/3] Revert "image.bbclass: make KERNEL_IMAGE & INITRD_IMAGE variable fixed"
  2019-05-13  7:39     ` Maxim Yu. Osipov
  2019-05-13  7:43       ` Maxim Yu. Osipov
@ 2019-05-13  8:11       ` Claudius Heine
  2019-05-13  9:01         ` Maxim Yu. Osipov
  1 sibling, 1 reply; 13+ messages in thread
From: Claudius Heine @ 2019-05-13  8:11 UTC (permalink / raw)
  To: Maxim Yu. Osipov, isar-users

Hi Maxim,

On 13/05/2019 09.39, Maxim Yu. Osipov wrote:
> On 5/13/19 9:31 AM, Claudius Heine wrote:
>> Hi Maxim,
>>
>> On 12/05/2019 21.30, Maxim Yu. Osipov wrote:
>>> This reverts commit b92589c574596ac98f97cf14369cbf62872e6481.
>>>
>>> vmlinuz and initrd are getting overwritten for the same machine
>>> by other distros under deploy/images/${MACHINE}
>>
>> NACK. I don't see a patch that addresses the issue described in the 
>> commit message of that reverted patch in this patchset in a different 
>> way, so this is a regression.
> 
> 
> Do you confirm that issue #53 appeared after applying your series into 
> the 'next'?
> 
> just look in
> http://isar-build.org:8080/job/isar_next/ws/build/tmp/deploy/images/qemuarm/ 
> 
> 
> vmlinuz/initrd for stretch was overwritten by subsequent build for buster.

So would not the fix for that be to add the DISTRO variable to the image 
deploy path or the the vmlinuz/initrd file name?

regards,
Claudius

> 
> Regards,
> Maxim.
> 
>> regards,
>> Claudius
>>
>>>
>>> Closes: #56
>>> Signed-off-by: Maxim Yu. Osipov <mosipov@ilbers.de>
>>> ---
>>>   meta/classes/image.bbclass | 6 ++++--
>>>   1 file changed, 4 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
>>> index fb35a4c..8e6f2c9 100644
>>> --- a/meta/classes/image.bbclass
>>> +++ b/meta/classes/image.bbclass
>>> @@ -13,8 +13,8 @@ IMAGE_INSTALL += "${@ ("linux-image-" + 
>>> d.getVar("KERNEL_NAME", True)) if d.getV
>>>   IMAGE_FULLNAME = "${PF}"
>>>   # These variables are used by wic and start_vm
>>> -KERNEL_IMAGE ?= "vmlinuz"
>>> -INITRD_IMAGE ?= "initrd.img"
>>> +KERNEL_IMAGE ?= "${@get_image_name(d, 'vmlinuz')[1]}"
>>> +INITRD_IMAGE ?= "${@get_image_name(d, 'initrd.img')[1]}"
>>>   # Useful variables for imager implementations:
>>>   PP = "/home/builder/${PN}"
>>> @@ -149,10 +149,12 @@ addtask rootfs_install before do_build after 
>>> do_unpack
>>>   do_copy_boot_files[dirs] = "${DEPLOY_DIR_IMAGE}"
>>>   do_copy_boot_files() {
>>> +    KERNEL_IMAGE=${@get_image_name(d, 'vmlinuz')[1]}
>>>       if [ -n "${KERNEL_IMAGE}" ]; then
>>>           cp -f ${IMAGE_ROOTFS}/boot/${@get_image_name(d, 
>>> 'vmlinuz')[0]} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE}
>>>       fi
>>> +    INITRD_IMAGE=${@get_image_name(d, 'initrd.img')[1]}
>>>       if [ -n "${INITRD_IMAGE}" ]; then
>>>           sudo cp -f ${IMAGE_ROOTFS}/boot/${@get_image_name(d, 
>>> 'initrd.img')[0]} ${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE}
>>>       fi
>>>
>>
> 
> 

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de

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

* Re: [PATCH v2 2/3] Revert "image.bbclass: make KERNEL_IMAGE & INITRD_IMAGE variable fixed"
  2019-05-13  8:11       ` Claudius Heine
@ 2019-05-13  9:01         ` Maxim Yu. Osipov
  2019-05-13 11:05           ` Claudius Heine
  0 siblings, 1 reply; 13+ messages in thread
From: Maxim Yu. Osipov @ 2019-05-13  9:01 UTC (permalink / raw)
  To: Claudius Heine, isar-users

On 5/13/19 10:11 AM, Claudius Heine wrote:
> Hi Maxim,
> 
> On 13/05/2019 09.39, Maxim Yu. Osipov wrote:
>> On 5/13/19 9:31 AM, Claudius Heine wrote:
>>> Hi Maxim,
>>>
>>> On 12/05/2019 21.30, Maxim Yu. Osipov wrote:
>>>> This reverts commit b92589c574596ac98f97cf14369cbf62872e6481.
>>>>
>>>> vmlinuz and initrd are getting overwritten for the same machine
>>>> by other distros under deploy/images/${MACHINE}
>>>
>>> NACK. I don't see a patch that addresses the issue described in the 
>>> commit message of that reverted patch in this patchset in a different 
>>> way, so this is a regression.
>>
>>
>> Do you confirm that issue #53 appeared after applying your series into 
>> the 'next'?
>>
>> just look in
>> http://isar-build.org:8080/job/isar_next/ws/build/tmp/deploy/images/qemuarm/ 
>>
>>
>> vmlinuz/initrd for stretch was overwritten by subsequent build for 
>> buster.
> 
> So would not the fix for that be to add the DISTRO variable to the image 
> deploy path or the the vmlinuz/initrd file name?

I agree with the intention of your patch b92589c5 "image.bbclass: make 
KERNEL_IMAGE & INITRD_IMAGE variable fixed"  - I also had headaches with 
variables KERNEL_IMAGE/INITRD_IMAGE when trying to use them. 
Unfortunately, this patch leads to the mentioned problem with 
overwriting vmlinuz/initrd images for the same MACHINE.

In my opinion the MACHINE deploy images w/o the patch use good naming 
scheme (see below).

1) The version of kernel is worth to see, not sure that one should add 
another directory DISTRO and distro name is included into vmlinuz/initrd.


http://isar-build.org:8080/job/isar_master/ws/build/tmp/deploy/images/qemuarm/

isar-image-base-debian-buster-qemuarm.ext4.img
isar-image-base-debian-buster-qemuarm.initrd.img-4.19.0-4-armmp
isar-image-base-debian-buster-qemuarm.vmlinuz-4.19.0-4-armmp
isar-image-base-debian-stretch-qemuarm.ext4.img
isar-image-base-debian-stretch-qemuarm.initrd.img-4.9.0-9-armmp
isar-image-base-debian-stretch-qemuarm.vmlinuz-4.9.0-9-armmp


2) Another point is the image name itself - just compare isar-image-base 
and isar-image-debug - it's also worth to add image name into 
vmlinuz/initrd, f.e.:

isar/build/tmp/deploy/images/qemuamd64:
isar-image-base-debian-stretch-qemuamd64.initrd.img-4.9.0-9-amd64
isar-image-base-debian-stretch-qemuamd64.wic.img 
isar-image-base-debian-stretch-qemuamd64.vmlinuz-4.9.0-9-amd64
isar-image-debug-debian-stretch-qemuamd64.vmlinuz-4.9.0-9-amd64
isar-image-debug-debian-stretch-qemuamd64.initrd.img-4.9.0-9-amd64 
isar-image-debug-debian-stretch-qemuamd64.wic.img

Reagrds,
Maxim.



> regards,
> Claudius
> 
>>
>> Regards,
>> Maxim.
>>
>>> regards,
>>> Claudius
>>>
>>>>
>>>> Closes: #56
>>>> Signed-off-by: Maxim Yu. Osipov <mosipov@ilbers.de>
>>>> ---
>>>>   meta/classes/image.bbclass | 6 ++++--
>>>>   1 file changed, 4 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
>>>> index fb35a4c..8e6f2c9 100644
>>>> --- a/meta/classes/image.bbclass
>>>> +++ b/meta/classes/image.bbclass
>>>> @@ -13,8 +13,8 @@ IMAGE_INSTALL += "${@ ("linux-image-" + 
>>>> d.getVar("KERNEL_NAME", True)) if d.getV
>>>>   IMAGE_FULLNAME = "${PF}"
>>>>   # These variables are used by wic and start_vm
>>>> -KERNEL_IMAGE ?= "vmlinuz"
>>>> -INITRD_IMAGE ?= "initrd.img"
>>>> +KERNEL_IMAGE ?= "${@get_image_name(d, 'vmlinuz')[1]}"
>>>> +INITRD_IMAGE ?= "${@get_image_name(d, 'initrd.img')[1]}"
>>>>   # Useful variables for imager implementations:
>>>>   PP = "/home/builder/${PN}"
>>>> @@ -149,10 +149,12 @@ addtask rootfs_install before do_build after 
>>>> do_unpack
>>>>   do_copy_boot_files[dirs] = "${DEPLOY_DIR_IMAGE}"
>>>>   do_copy_boot_files() {
>>>> +    KERNEL_IMAGE=${@get_image_name(d, 'vmlinuz')[1]}
>>>>       if [ -n "${KERNEL_IMAGE}" ]; then
>>>>           cp -f ${IMAGE_ROOTFS}/boot/${@get_image_name(d, 
>>>> 'vmlinuz')[0]} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE}
>>>>       fi
>>>> +    INITRD_IMAGE=${@get_image_name(d, 'initrd.img')[1]}
>>>>       if [ -n "${INITRD_IMAGE}" ]; then
>>>>           sudo cp -f ${IMAGE_ROOTFS}/boot/${@get_image_name(d, 
>>>> 'initrd.img')[0]} ${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE}
>>>>       fi
>>>>
>>>
>>
>>
> 


-- 
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

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

* Re: [PATCH v2 2/3] Revert "image.bbclass: make KERNEL_IMAGE & INITRD_IMAGE variable fixed"
  2019-05-13  9:01         ` Maxim Yu. Osipov
@ 2019-05-13 11:05           ` Claudius Heine
  2019-05-13 11:16             ` Maxim Yu. Osipov
  0 siblings, 1 reply; 13+ messages in thread
From: Claudius Heine @ 2019-05-13 11:05 UTC (permalink / raw)
  To: Maxim Yu. Osipov, isar-users

Hi Maxim,

On 13/05/2019 11.01, Maxim Yu. Osipov wrote:
> On 5/13/19 10:11 AM, Claudius Heine wrote:
>> Hi Maxim,
>>
>> On 13/05/2019 09.39, Maxim Yu. Osipov wrote:
>>> On 5/13/19 9:31 AM, Claudius Heine wrote:
>>>> Hi Maxim,
>>>>
>>>> On 12/05/2019 21.30, Maxim Yu. Osipov wrote:
>>>>> This reverts commit b92589c574596ac98f97cf14369cbf62872e6481.
>>>>>
>>>>> vmlinuz and initrd are getting overwritten for the same machine
>>>>> by other distros under deploy/images/${MACHINE}
>>>>
>>>> NACK. I don't see a patch that addresses the issue described in the 
>>>> commit message of that reverted patch in this patchset in a 
>>>> different way, so this is a regression.
>>>
>>>
>>> Do you confirm that issue #53 appeared after applying your series 
>>> into the 'next'?
>>>
>>> just look in
>>> http://isar-build.org:8080/job/isar_next/ws/build/tmp/deploy/images/qemuarm/ 
>>>
>>>
>>> vmlinuz/initrd for stretch was overwritten by subsequent build for 
>>> buster.
>>
>> So would not the fix for that be to add the DISTRO variable to the 
>> image deploy path or the the vmlinuz/initrd file name?
> 
> I agree with the intention of your patch b92589c5 "image.bbclass: make 
> KERNEL_IMAGE & INITRD_IMAGE variable fixed"  - I also had headaches with 
> variables KERNEL_IMAGE/INITRD_IMAGE when trying to use them. 
> Unfortunately, this patch leads to the mentioned problem with 
> overwriting vmlinuz/initrd images for the same MACHINE. >
> In my opinion the MACHINE deploy images w/o the patch use good naming 
> scheme (see below).
> 
> 1) The version of kernel is worth to see,

I disagree, since the version of the kernel/initrd makes the file names 
in the deploy directory unpredictable, which is difficult to write 
documentation and scripts for.

Have you tried something like this?

   KERNEL_IMAGE ?= "${PF}.vmlinuz"
   INITRD_IMAGE ?= "${PF}.initrd.img"

regards,
Claudius

> not sure that one should add 
> another directory DISTRO and distro name is included into vmlinuz/initrd.
> 
> 
> http://isar-build.org:8080/job/isar_master/ws/build/tmp/deploy/images/qemuarm/ 
> 
> 
> isar-image-base-debian-buster-qemuarm.ext4.img
> isar-image-base-debian-buster-qemuarm.initrd.img-4.19.0-4-armmp
> isar-image-base-debian-buster-qemuarm.vmlinuz-4.19.0-4-armmp
> isar-image-base-debian-stretch-qemuarm.ext4.img
> isar-image-base-debian-stretch-qemuarm.initrd.img-4.9.0-9-armmp
> isar-image-base-debian-stretch-qemuarm.vmlinuz-4.9.0-9-armmp
> 
> 
> 2) Another point is the image name itself - just compare isar-image-base 
> and isar-image-debug - it's also worth to add image name into 
> vmlinuz/initrd, f.e.:
> 
> isar/build/tmp/deploy/images/qemuamd64:
> isar-image-base-debian-stretch-qemuamd64.initrd.img-4.9.0-9-amd64
> isar-image-base-debian-stretch-qemuamd64.wic.img 
> isar-image-base-debian-stretch-qemuamd64.vmlinuz-4.9.0-9-amd64
> isar-image-debug-debian-stretch-qemuamd64.vmlinuz-4.9.0-9-amd64
> isar-image-debug-debian-stretch-qemuamd64.initrd.img-4.9.0-9-amd64 
> isar-image-debug-debian-stretch-qemuamd64.wic.img

Your concerns are valid. We need to figure out a good system for the 
file names and paths.

> 
> Reagrds,
> Maxim.
> 
> 
> 
>> regards,
>> Claudius
>>
>>>
>>> Regards,
>>> Maxim.
>>>
>>>> regards,
>>>> Claudius
>>>>
>>>>>
>>>>> Closes: #56
>>>>> Signed-off-by: Maxim Yu. Osipov <mosipov@ilbers.de>
>>>>> ---
>>>>>   meta/classes/image.bbclass | 6 ++++--
>>>>>   1 file changed, 4 insertions(+), 2 deletions(-)
>>>>>
>>>>> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
>>>>> index fb35a4c..8e6f2c9 100644
>>>>> --- a/meta/classes/image.bbclass
>>>>> +++ b/meta/classes/image.bbclass
>>>>> @@ -13,8 +13,8 @@ IMAGE_INSTALL += "${@ ("linux-image-" + 
>>>>> d.getVar("KERNEL_NAME", True)) if d.getV
>>>>>   IMAGE_FULLNAME = "${PF}"
>>>>>   # These variables are used by wic and start_vm
>>>>> -KERNEL_IMAGE ?= "vmlinuz"
>>>>> -INITRD_IMAGE ?= "initrd.img"
>>>>> +KERNEL_IMAGE ?= "${@get_image_name(d, 'vmlinuz')[1]}"
>>>>> +INITRD_IMAGE ?= "${@get_image_name(d, 'initrd.img')[1]}"
>>>>>   # Useful variables for imager implementations:
>>>>>   PP = "/home/builder/${PN}"
>>>>> @@ -149,10 +149,12 @@ addtask rootfs_install before do_build after 
>>>>> do_unpack
>>>>>   do_copy_boot_files[dirs] = "${DEPLOY_DIR_IMAGE}"
>>>>>   do_copy_boot_files() {
>>>>> +    KERNEL_IMAGE=${@get_image_name(d, 'vmlinuz')[1]}
>>>>>       if [ -n "${KERNEL_IMAGE}" ]; then
>>>>>           cp -f ${IMAGE_ROOTFS}/boot/${@get_image_name(d, 
>>>>> 'vmlinuz')[0]} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE}
>>>>>       fi
>>>>> +    INITRD_IMAGE=${@get_image_name(d, 'initrd.img')[1]}
>>>>>       if [ -n "${INITRD_IMAGE}" ]; then
>>>>>           sudo cp -f ${IMAGE_ROOTFS}/boot/${@get_image_name(d, 
>>>>> 'initrd.img')[0]} ${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE}
>>>>>       fi
>>>>>
>>>>
>>>
>>>
>>
> 
> 

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de

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

* Re: [PATCH v2 2/3] Revert "image.bbclass: make KERNEL_IMAGE & INITRD_IMAGE variable fixed"
  2019-05-13 11:05           ` Claudius Heine
@ 2019-05-13 11:16             ` Maxim Yu. Osipov
  2019-05-14 14:41               ` Maxim Yu. Osipov
  0 siblings, 1 reply; 13+ messages in thread
From: Maxim Yu. Osipov @ 2019-05-13 11:16 UTC (permalink / raw)
  To: Claudius Heine, isar-users

On 5/13/19 1:05 PM, Claudius Heine wrote:
> Hi Maxim,
> 
> On 13/05/2019 11.01, Maxim Yu. Osipov wrote:
>> On 5/13/19 10:11 AM, Claudius Heine wrote:
>>> Hi Maxim,
>>>
>>> On 13/05/2019 09.39, Maxim Yu. Osipov wrote:
>>>> On 5/13/19 9:31 AM, Claudius Heine wrote:
>>>>> Hi Maxim,
>>>>>
>>>>> On 12/05/2019 21.30, Maxim Yu. Osipov wrote:
>>>>>> This reverts commit b92589c574596ac98f97cf14369cbf62872e6481.
>>>>>>
>>>>>> vmlinuz and initrd are getting overwritten for the same machine
>>>>>> by other distros under deploy/images/${MACHINE}
>>>>>
>>>>> NACK. I don't see a patch that addresses the issue described in the 
>>>>> commit message of that reverted patch in this patchset in a 
>>>>> different way, so this is a regression.
>>>>
>>>>
>>>> Do you confirm that issue #53 appeared after applying your series 
>>>> into the 'next'?
>>>>
>>>> just look in
>>>> http://isar-build.org:8080/job/isar_next/ws/build/tmp/deploy/images/qemuarm/ 
>>>>
>>>>
>>>> vmlinuz/initrd for stretch was overwritten by subsequent build for 
>>>> buster.
>>>
>>> So would not the fix for that be to add the DISTRO variable to the 
>>> image deploy path or the the vmlinuz/initrd file name?
>>
>> I agree with the intention of your patch b92589c5 "image.bbclass: make 
>> KERNEL_IMAGE & INITRD_IMAGE variable fixed"  - I also had headaches 
>> with variables KERNEL_IMAGE/INITRD_IMAGE when trying to use them. 
>> Unfortunately, this patch leads to the mentioned problem with 
>> overwriting vmlinuz/initrd images for the same MACHINE. >
>> In my opinion the MACHINE deploy images w/o the patch use good naming 
>> scheme (see below).
>>
>> 1) The version of kernel is worth to see,
> 
> I disagree, since the version of the kernel/initrd makes the file names 
> in the deploy directory unpredictable, which is difficult to write 
> documentation and scripts for.

 From developer's point of view yes, from user's perspective these names 
are OK.

> Have you tried something like this?
> 
>    KERNEL_IMAGE ?= "${PF}.vmlinuz"
>    INITRD_IMAGE ?= "${PF}.initrd.img"

No, I've not tried.

If you have your proposal regarding the issue #56 fix - your patches are 
always welcome.

The problem that the 'next' branch has serious bug for a long time and 
this has to be fixed ASAP.

Regards,
Maxim.

> regards,
> Claudius
> 
>> not sure that one should add another directory DISTRO and distro name 
>> is included into vmlinuz/initrd.
>>
>>
>> http://isar-build.org:8080/job/isar_master/ws/build/tmp/deploy/images/qemuarm/ 
>>
>>
>> isar-image-base-debian-buster-qemuarm.ext4.img
>> isar-image-base-debian-buster-qemuarm.initrd.img-4.19.0-4-armmp
>> isar-image-base-debian-buster-qemuarm.vmlinuz-4.19.0-4-armmp
>> isar-image-base-debian-stretch-qemuarm.ext4.img
>> isar-image-base-debian-stretch-qemuarm.initrd.img-4.9.0-9-armmp
>> isar-image-base-debian-stretch-qemuarm.vmlinuz-4.9.0-9-armmp
>>
>>
>> 2) Another point is the image name itself - just compare 
>> isar-image-base and isar-image-debug - it's also worth to add image 
>> name into vmlinuz/initrd, f.e.:
>>
>> isar/build/tmp/deploy/images/qemuamd64:
>> isar-image-base-debian-stretch-qemuamd64.initrd.img-4.9.0-9-amd64
>> isar-image-base-debian-stretch-qemuamd64.wic.img 
>> isar-image-base-debian-stretch-qemuamd64.vmlinuz-4.9.0-9-amd64
>> isar-image-debug-debian-stretch-qemuamd64.vmlinuz-4.9.0-9-amd64
>> isar-image-debug-debian-stretch-qemuamd64.initrd.img-4.9.0-9-amd64 
>> isar-image-debug-debian-stretch-qemuamd64.wic.img
> 
> Your concerns are valid. We need to figure out a good system for the 
> file names and paths.
> 
>>
>> Reagrds,
>> Maxim.
>>
>>
>>
>>> regards,
>>> Claudius
>>>
>>>>
>>>> Regards,
>>>> Maxim.
>>>>
>>>>> regards,
>>>>> Claudius
>>>>>
>>>>>>
>>>>>> Closes: #56
>>>>>> Signed-off-by: Maxim Yu. Osipov <mosipov@ilbers.de>
>>>>>> ---
>>>>>>   meta/classes/image.bbclass | 6 ++++--
>>>>>>   1 file changed, 4 insertions(+), 2 deletions(-)
>>>>>>
>>>>>> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
>>>>>> index fb35a4c..8e6f2c9 100644
>>>>>> --- a/meta/classes/image.bbclass
>>>>>> +++ b/meta/classes/image.bbclass
>>>>>> @@ -13,8 +13,8 @@ IMAGE_INSTALL += "${@ ("linux-image-" + 
>>>>>> d.getVar("KERNEL_NAME", True)) if d.getV
>>>>>>   IMAGE_FULLNAME = "${PF}"
>>>>>>   # These variables are used by wic and start_vm
>>>>>> -KERNEL_IMAGE ?= "vmlinuz"
>>>>>> -INITRD_IMAGE ?= "initrd.img"
>>>>>> +KERNEL_IMAGE ?= "${@get_image_name(d, 'vmlinuz')[1]}"
>>>>>> +INITRD_IMAGE ?= "${@get_image_name(d, 'initrd.img')[1]}"
>>>>>>   # Useful variables for imager implementations:
>>>>>>   PP = "/home/builder/${PN}"
>>>>>> @@ -149,10 +149,12 @@ addtask rootfs_install before do_build after 
>>>>>> do_unpack
>>>>>>   do_copy_boot_files[dirs] = "${DEPLOY_DIR_IMAGE}"
>>>>>>   do_copy_boot_files() {
>>>>>> +    KERNEL_IMAGE=${@get_image_name(d, 'vmlinuz')[1]}
>>>>>>       if [ -n "${KERNEL_IMAGE}" ]; then
>>>>>>           cp -f ${IMAGE_ROOTFS}/boot/${@get_image_name(d, 
>>>>>> 'vmlinuz')[0]} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE}
>>>>>>       fi
>>>>>> +    INITRD_IMAGE=${@get_image_name(d, 'initrd.img')[1]}
>>>>>>       if [ -n "${INITRD_IMAGE}" ]; then
>>>>>>           sudo cp -f ${IMAGE_ROOTFS}/boot/${@get_image_name(d, 
>>>>>> 'initrd.img')[0]} ${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE}
>>>>>>       fi
>>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>>
> 


-- 
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

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

* Re: [PATCH v2 2/3] Revert "image.bbclass: make KERNEL_IMAGE & INITRD_IMAGE variable fixed"
  2019-05-13 11:16             ` Maxim Yu. Osipov
@ 2019-05-14 14:41               ` Maxim Yu. Osipov
  0 siblings, 0 replies; 13+ messages in thread
From: Maxim Yu. Osipov @ 2019-05-14 14:41 UTC (permalink / raw)
  To: Claudius Heine, isar-users

Hi Claudius,

Do you plan to send your version of patch fixing #56?

If not, I'll apply now my v2 series "vmlinuz/initrd for the same MACHINE 
are overwritten" as the problem exists in the 'next' since 16th of April.

Regards,
Maxim.


On 5/13/19 1:16 PM, Maxim Yu. Osipov wrote:
> On 5/13/19 1:05 PM, Claudius Heine wrote:
>> Hi Maxim,
>>
>> On 13/05/2019 11.01, Maxim Yu. Osipov wrote:
>>> On 5/13/19 10:11 AM, Claudius Heine wrote:
>>>> Hi Maxim,
>>>>
>>>> On 13/05/2019 09.39, Maxim Yu. Osipov wrote:
>>>>> On 5/13/19 9:31 AM, Claudius Heine wrote:
>>>>>> Hi Maxim,
>>>>>>
>>>>>> On 12/05/2019 21.30, Maxim Yu. Osipov wrote:
>>>>>>> This reverts commit b92589c574596ac98f97cf14369cbf62872e6481.
>>>>>>>
>>>>>>> vmlinuz and initrd are getting overwritten for the same machine
>>>>>>> by other distros under deploy/images/${MACHINE}
>>>>>>
>>>>>> NACK. I don't see a patch that addresses the issue described in 
>>>>>> the commit message of that reverted patch in this patchset in a 
>>>>>> different way, so this is a regression.
>>>>>
>>>>>
>>>>> Do you confirm that issue #53 appeared after applying your series 
>>>>> into the 'next'?
>>>>>
>>>>> just look in
>>>>> http://isar-build.org:8080/job/isar_next/ws/build/tmp/deploy/images/qemuarm/ 
>>>>>
>>>>>
>>>>> vmlinuz/initrd for stretch was overwritten by subsequent build for 
>>>>> buster.
>>>>
>>>> So would not the fix for that be to add the DISTRO variable to the 
>>>> image deploy path or the the vmlinuz/initrd file name?
>>>
>>> I agree with the intention of your patch b92589c5 "image.bbclass: 
>>> make KERNEL_IMAGE & INITRD_IMAGE variable fixed"  - I also had 
>>> headaches with variables KERNEL_IMAGE/INITRD_IMAGE when trying to use 
>>> them. Unfortunately, this patch leads to the mentioned problem with 
>>> overwriting vmlinuz/initrd images for the same MACHINE. >
>>> In my opinion the MACHINE deploy images w/o the patch use good naming 
>>> scheme (see below).
>>>
>>> 1) The version of kernel is worth to see,
>>
>> I disagree, since the version of the kernel/initrd makes the file 
>> names in the deploy directory unpredictable, which is difficult to 
>> write documentation and scripts for.
> 
>  From developer's point of view yes, from user's perspective these names 
> are OK.
> 
>> Have you tried something like this?
>>
>>    KERNEL_IMAGE ?= "${PF}.vmlinuz"
>>    INITRD_IMAGE ?= "${PF}.initrd.img"
> 
> No, I've not tried.
> 
> If you have your proposal regarding the issue #56 fix - your patches are 
> always welcome.
> 
> The problem that the 'next' branch has serious bug for a long time and 
> this has to be fixed ASAP.
> 
> Regards,
> Maxim.
> 
>> regards,
>> Claudius
>>
>>> not sure that one should add another directory DISTRO and distro name 
>>> is included into vmlinuz/initrd.
>>>
>>>
>>> http://isar-build.org:8080/job/isar_master/ws/build/tmp/deploy/images/qemuarm/ 
>>>
>>>
>>> isar-image-base-debian-buster-qemuarm.ext4.img
>>> isar-image-base-debian-buster-qemuarm.initrd.img-4.19.0-4-armmp
>>> isar-image-base-debian-buster-qemuarm.vmlinuz-4.19.0-4-armmp
>>> isar-image-base-debian-stretch-qemuarm.ext4.img
>>> isar-image-base-debian-stretch-qemuarm.initrd.img-4.9.0-9-armmp
>>> isar-image-base-debian-stretch-qemuarm.vmlinuz-4.9.0-9-armmp
>>>
>>>
>>> 2) Another point is the image name itself - just compare 
>>> isar-image-base and isar-image-debug - it's also worth to add image 
>>> name into vmlinuz/initrd, f.e.:
>>>
>>> isar/build/tmp/deploy/images/qemuamd64:
>>> isar-image-base-debian-stretch-qemuamd64.initrd.img-4.9.0-9-amd64
>>> isar-image-base-debian-stretch-qemuamd64.wic.img 
>>> isar-image-base-debian-stretch-qemuamd64.vmlinuz-4.9.0-9-amd64
>>> isar-image-debug-debian-stretch-qemuamd64.vmlinuz-4.9.0-9-amd64
>>> isar-image-debug-debian-stretch-qemuamd64.initrd.img-4.9.0-9-amd64 
>>> isar-image-debug-debian-stretch-qemuamd64.wic.img
>>
>> Your concerns are valid. We need to figure out a good system for the 
>> file names and paths.
>>
>>>
>>> Reagrds,
>>> Maxim.
>>>
>>>
>>>
>>>> regards,
>>>> Claudius
>>>>
>>>>>
>>>>> Regards,
>>>>> Maxim.
>>>>>
>>>>>> regards,
>>>>>> Claudius
>>>>>>
>>>>>>>
>>>>>>> Closes: #56
>>>>>>> Signed-off-by: Maxim Yu. Osipov <mosipov@ilbers.de>
>>>>>>> ---
>>>>>>>   meta/classes/image.bbclass | 6 ++++--
>>>>>>>   1 file changed, 4 insertions(+), 2 deletions(-)
>>>>>>>
>>>>>>> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
>>>>>>> index fb35a4c..8e6f2c9 100644
>>>>>>> --- a/meta/classes/image.bbclass
>>>>>>> +++ b/meta/classes/image.bbclass
>>>>>>> @@ -13,8 +13,8 @@ IMAGE_INSTALL += "${@ ("linux-image-" + 
>>>>>>> d.getVar("KERNEL_NAME", True)) if d.getV
>>>>>>>   IMAGE_FULLNAME = "${PF}"
>>>>>>>   # These variables are used by wic and start_vm
>>>>>>> -KERNEL_IMAGE ?= "vmlinuz"
>>>>>>> -INITRD_IMAGE ?= "initrd.img"
>>>>>>> +KERNEL_IMAGE ?= "${@get_image_name(d, 'vmlinuz')[1]}"
>>>>>>> +INITRD_IMAGE ?= "${@get_image_name(d, 'initrd.img')[1]}"
>>>>>>>   # Useful variables for imager implementations:
>>>>>>>   PP = "/home/builder/${PN}"
>>>>>>> @@ -149,10 +149,12 @@ addtask rootfs_install before do_build 
>>>>>>> after do_unpack
>>>>>>>   do_copy_boot_files[dirs] = "${DEPLOY_DIR_IMAGE}"
>>>>>>>   do_copy_boot_files() {
>>>>>>> +    KERNEL_IMAGE=${@get_image_name(d, 'vmlinuz')[1]}
>>>>>>>       if [ -n "${KERNEL_IMAGE}" ]; then
>>>>>>>           cp -f ${IMAGE_ROOTFS}/boot/${@get_image_name(d, 
>>>>>>> 'vmlinuz')[0]} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE}
>>>>>>>       fi
>>>>>>> +    INITRD_IMAGE=${@get_image_name(d, 'initrd.img')[1]}
>>>>>>>       if [ -n "${INITRD_IMAGE}" ]; then
>>>>>>>           sudo cp -f ${IMAGE_ROOTFS}/boot/${@get_image_name(d, 
>>>>>>> 'initrd.img')[0]} ${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE}
>>>>>>>       fi
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>
> 
> 


-- 
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

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

* Re: [PATCH v2 0/3] vmlinuz/initrd for the same MACHINE are overwritten
  2019-05-12 19:30 [PATCH v2 0/3] vmlinuz/initrd for the same MACHINE are overwritten Maxim Yu. Osipov
                   ` (2 preceding siblings ...)
  2019-05-12 19:31 ` [PATCH v2 3/3] ci: Include qemuarm-buster into fast build/vm_smoke_test Maxim Yu. Osipov
@ 2019-05-14 17:24 ` Maxim Yu. Osipov
  3 siblings, 0 replies; 13+ messages in thread
From: Maxim Yu. Osipov @ 2019-05-14 17:24 UTC (permalink / raw)
  To: isar-users

On 5/12/19 9:30 PM, Maxim Yu. Osipov wrote:
> Hi everybody,
> 
> During testing of v1 patch series problem with the build of
> 'multiconfig:nand-ubi-demo-buster:isar-image-ubi' target was discovered.
> 
> The first patch fixes the problem with build of multiconfig:nand-ubi-demo-buster:isar-image-ubi target.
> 
> The second patch fixes the issue #56.
> 
> The problem with overwritten for the same MACHINE vmlinuz/initrd were detected by standard "overnight" CI.
> 
> The third patch adds the test case to detect such kind of problems by "fast" CI.
> 
> Regards,
> Maxim.

Applied to the 'next'.


> Maxim Yu. Osipov (3):
>    meta/classes/image: Call transform_template after rootfs_install
>    Revert "image.bbclass: make KERNEL_IMAGE & INITRD_IMAGE variable
>      fixed"
>    ci: Include qemuarm-buster into fast build/vm_smoke_test
> 
>   meta/classes/image.bbclass | 8 +++++---
>   scripts/ci_build.sh        | 1 +
>   scripts/vm_smoke_test      | 4 +---
>   3 files changed, 7 insertions(+), 6 deletions(-)
> 


-- 
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

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

end of thread, other threads:[~2019-05-14 17:24 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-12 19:30 [PATCH v2 0/3] vmlinuz/initrd for the same MACHINE are overwritten Maxim Yu. Osipov
2019-05-12 19:30 ` [PATCH v2 1/3] meta/classes/image: Call transform_template after rootfs_install Maxim Yu. Osipov
2019-05-12 19:30 ` [PATCH v2 2/3] Revert "image.bbclass: make KERNEL_IMAGE & INITRD_IMAGE variable fixed" Maxim Yu. Osipov
2019-05-13  7:31   ` Claudius Heine
2019-05-13  7:39     ` Maxim Yu. Osipov
2019-05-13  7:43       ` Maxim Yu. Osipov
2019-05-13  8:11       ` Claudius Heine
2019-05-13  9:01         ` Maxim Yu. Osipov
2019-05-13 11:05           ` Claudius Heine
2019-05-13 11:16             ` Maxim Yu. Osipov
2019-05-14 14:41               ` Maxim Yu. Osipov
2019-05-12 19:31 ` [PATCH v2 3/3] ci: Include qemuarm-buster into fast build/vm_smoke_test Maxim Yu. Osipov
2019-05-14 17:24 ` [PATCH v2 0/3] vmlinuz/initrd for the same MACHINE are overwritten Maxim Yu. Osipov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox