From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6688556415067357184 X-Received: by 2002:a2e:5d49:: with SMTP id r70mr14199858ljb.102.1557746217312; Mon, 13 May 2019 04:16:57 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:ac2:421a:: with SMTP id y26ls1106743lfh.13.gmail; Mon, 13 May 2019 04:16:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqx6FD7OJXXRoeEb0xBsMFjx+2fNAjIDl9d10rK6xaQzStSHq/gDyRqIyLwwmPioVr3Dzqe4 X-Received: by 2002:a19:9154:: with SMTP id y20mr4990019lfj.87.1557746216826; Mon, 13 May 2019 04:16:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557746216; cv=none; d=google.com; s=arc-20160816; b=ejE74DY+3hqLnG2Bw5WsKYjy1fRjkBmdgDkNv5S3b+PXM2fdhLbu7mfgrTzHabFvzz 1yrfEB4dEUjM+CN1HBLEvzCOpcQQCq60XNZzqxJEUAExpN8W5Yy6iJVGu0a5OpQQu+vh abB/FjZgpkSlV21WsPlhQnXf9qHsBcHcgTkzgdoOiB+kIVHNhr0Ijkv56YWu99LXWjjD Y3G194DZmbrHpYE+C7/TRvAa9BNOqCOzsSwT3JGJA/7iB2h44iarPiFCJaMj5GpFBa7F 30mEhdN/LH3z4/ImJwQjpJfWb10deS0Vg2WkFxqn2ghh8LUKYBaJyXgmNnN/NAyWMhnO aSew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:organization:from:references:to:subject; bh=/6xJD0KpMoeeEPFYbD3hPMQOZ2PEJ/+Tj0y4g9DrYFs=; b=akxybiEQBGbuflaf1XuXYI51DCvwB7Q6XHt/1LgmTGunXCsf8vEJyrZTyE3azbuZtO XmW3jQElsRDsykiib2DwtJFnQCbxx0yZmItAz6l5EcsgaXdLh7wjp0aVYey+tHFqBeHD JyN3lqFXmDCx1zM13olpriqtq6/j18RiQIyUzFLqA1TjeRJtL/DU6bTaMCZfhYn2kLZ6 X1KE6tMUONdfebA9Pg7L0ioQK2bXLUSOI+V7Y8wXZtbA+R1xMjHNl48Yde1Q/0g1tlEE UuLHjmrAn0PsILnTice4N5foUdYkN4YjaEldjuqcnfBYq/82f5NtK+HVwwEGentMyvPM Hggw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of mosipov@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=mosipov@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id w13si2589003ljj.2.2019.05.13.04.16.56 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 13 May 2019 04:16:56 -0700 (PDT) Received-SPF: pass (google.com: domain of mosipov@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of mosipov@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=mosipov@ilbers.de Received: from [192.168.1.29] ([109.131.165.115]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8) with ESMTPSA id x4DBGsJx026799 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 May 2019 13:16:54 +0200 Subject: Re: [PATCH v2 2/3] Revert "image.bbclass: make KERNEL_IMAGE & INITRD_IMAGE variable fixed" To: Claudius Heine , isar-users@googlegroups.com References: <20190512193100.23709-1-mosipov@ilbers.de> <20190512193100.23709-3-mosipov@ilbers.de> <13a1e1d6-4abb-cccb-95f2-f745be200c11@siemens.com> <5eb17910-8690-4cff-20ff-0472a4146c52@siemens.com> From: "Maxim Yu. Osipov" Organization: ilbers GmbH Message-ID: <04f4257d-e2d6-2c7a-3e45-6c2ec01ceab1@ilbers.de> Date: Mon, 13 May 2019 13:16:49 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: M+jgs/Hi5/ET 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 >>>>>> --- >>>>>>   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