Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by mx.groups.io with SMTP id smtpd.web10.1758.1593676014897950829 for ; Thu, 02 Jul 2020 00:46:55 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=SLjHjltd; spf=pass (domain: linuxfoundation.org, ip: 209.85.221.68, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wr1-f68.google.com with SMTP id f18so18876606wrs.0 for ; Thu, 02 Jul 2020 00:46:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=fiVxpRref7EXbm5Ndg7nTtcQoxZZ/LLmaOXqg7aWruc=; b=SLjHjltdt/cOqU4hDVA/dWL4ys7B/Q2hKJlub0uKjKC+4OZ0HnvJXTN2fBYRvbdTjl Bmw1d2G+oHIWy+Ke0soouQspIIn6vfxX7Wn3BplfM8NGxLmZYCvQMGVKd9KeF+3nXWH2 o2zLQBjo29nRMxsx25ZS83uoJXZmu9deYHYLU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=fiVxpRref7EXbm5Ndg7nTtcQoxZZ/LLmaOXqg7aWruc=; b=Rq1D4Nr+4FPt8Sqa/N1f13vN/Uj1yXY3dQCaTPp7ePhrWPqGFqo0E5qrFaIweQV0k1 k/iWFIQ/idXDvEqo6q6NsbkiYELcZixBcjQO8Vr3t0TLwWOMfKAO6F1WguHtkq5r9W6/ SeUEQbEh+l2cTj3sAl6mmnf0Xdc/wHP2cgsQSMtRBBa27ReWT1/JdvXNqMxi26a22KNM R9xdTw+yiA0lJVpVaaqJ2Sb8JA0ljhuLuGFtK8VLVhayX+hd0ed830aDtJzxux7zvlvB YMBSeZ6R6NDLhvdJlwf7nUmGTWRx2y7wkCZkz6XB6f4jKwXDf/Ci2J/bUPG+JnmUXxVx 9xSQ== X-Gm-Message-State: AOAM531nbwkBiSBl1L0XCOK6fmbGhiVo/v5JCa/whq4UgG3nqfXc1Fpl uOwBYfaYcGNKGqysxgkSWYwzvw== X-Google-Smtp-Source: ABdhPJxWCsvpc0/H0thYARyxzDbM6mUlZ1WgVIU/DyUn0xQERKeP2AQAQ1YReeTTMWrpt3hqpp0+HQ== X-Received: by 2002:adf:fa8f:: with SMTP id h15mr30133230wrr.211.1593676013162; Thu, 02 Jul 2020 00:46:53 -0700 (PDT) Return-Path: Received: from hex (5751f4a1.skybroadband.com. [87.81.244.161]) by smtp.gmail.com with ESMTPSA id d63sm10209108wmc.22.2020.07.02.00.46.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jul 2020 00:46:52 -0700 (PDT) Message-ID: <992d7721671aa464f6a59209d0346a55dc569db6.camel@linuxfoundation.org> Subject: Re: [OE-core][PATCH 1/1 v3] classes/kernel: Use a copy of image for kernel*.rpm if fs doesn't support symlinks From: "Richard Purdie" To: "Xu, Yanfei" , Bruce Ashfield Cc: Patches and discussions about the oe-core layer Date: Thu, 02 Jul 2020 08:46:51 +0100 In-Reply-To: References: <20200619114727.40142-1-yanfei.xu@windriver.com> <20200619114727.40142-2-yanfei.xu@windriver.com> <144b99d5a5b327d660925ff5ee18139d7dc088c3.camel@linuxfoundation.org> <7d7b57ca-5419-971d-6701-4cd2e8958960@windriver.com> <77c7e877-527a-3e39-ad58-2b34c4cffa05@windriver.com> <764ae03515c1e73c6eaa394a68b4b98877b38577.camel@linuxfoundation.org> <777044a4-8a9b-ea9b-fc05-636caa004c3d@windriver.com> User-Agent: Evolution 3.36.2-0ubuntu1 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit On Thu, 2020-07-02 at 10:43 +0800, Xu, Yanfei wrote: > > On 7/1/20 9:42 PM, Bruce Ashfield wrote: > > On Wed, Jul 1, 2020 at 4:22 AM Xu, Yanfei > > wrote: > > > > > > > > > On 6/28/20 8:21 PM, Xu, Yanfei wrote: > > > > > > > > On 6/25/20 12:18 AM, Richard Purdie wrote: > > > > > On Wed, 2020-06-24 at 23:57 +0800, Xu, Yanfei wrote: > > > > > > On 6/24/20 9:08 PM, Richard Purdie wrote: > > > > > > > On Wed, 2020-06-24 at 09:47 +0800, Xu, Yanfei wrote: > > > > > > > > On 6/24/20 5:51 AM, Richard Purdie wrote: > > > > > > > > > On Tue, 2020-06-23 at 10:31 -0400, Bruce Ashfield > > > > > > > > > wrote: > > > > > > > > > > On Fri, Jun 19, 2020 at 7:47 AM < > > > > > > > > > > yanfei.xu@windriver.com> > > > > > > > > > > wrote: > > > > > > > > > > > From: Yanfei Xu > > > > > > > > > > > > > > > > > > > > > > Some filesystems don't support symlink, then you > > > > > > > > > > > will get > > > > > > > > > > > failure > > > > > > > > > > > when > > > > > > > > > > > you install or update the kernel rpm package. Now > > > > > > > > > > > we use a > > > > > > > > > > > copy > > > > > > > > > > > of > > > > > > > > > > > image for these filesystems instead of symlink. > > > > > > > > > > > > > > > > > > > > > > Suggested-by: Bruce Ashfield < > > > > > > > > > > > bruce.ashfield@gmail.com> > > > > > > > > > > > Suggested-by: Richard Purdie < > > > > > > > > > > > richard.purdie@linuxfoundation.org> > > > > > > > > > > > Signed-off-by: Yanfei Xu > > > > > > > > > > > > > > > > > > > > > > --- > > > > > > > > > > > meta/classes/kernel.bbclass | 19 > > > > > > > > > > > ++++++++++++++++--- > > > > > > > > > > > 1 file changed, 16 insertions(+), 3 > > > > > > > > > > > deletions(-) > > > > > > > > > > > > > > > > > > > > > > diff --git a/meta/classes/kernel.bbclass > > > > > > > > > > > b/meta/classes/kernel.bbclass > > > > > > > > > > > index 20a0135fc9..1269b54343 100644 > > > > > > > > > > > --- a/meta/classes/kernel.bbclass > > > > > > > > > > > +++ b/meta/classes/kernel.bbclass > > > > > > > > > > > @@ -94,6 +94,22 @@ python __anonymous () { > > > > > > > > > > > d.appendVar('RDEPENDS_%s-image' % > > > > > > > > > > > kname, ' %s- > > > > > > > > > > > image- > > > > > > > > > > > %s' % > > > > > > > > > > > (kname, typelower)) > > > > > > > > > > > d.setVar('PKG_%s-image-%s' % > > > > > > > > > > > (kname,typelower), > > > > > > > > > > > '%s- > > > > > > > > > > > image- > > > > > > > > > > > %s-${KERNEL_VERSION_PKG_NAME}' % (kname, > > > > > > > > > > > typelower)) > > > > > > > > > > > d.setVar('ALLOW_EMPTY_%s-image-%s' % > > > > > > > > > > > (kname, > > > > > > > > > > > typelower), > > > > > > > > > > > '1') > > > > > > > > > > > + d.setVar('pkg_postinst_ontarget_%s- > > > > > > > > > > > image-%s' % > > > > > > > > > > > (kname,typelower), """ > > > > > > > > > > > > > > > > > > > > You were previously concerned about boot issues if > > > > > > > > > > the > > > > > > > > > > unversioned > > > > > > > > > > image link/copy was deferred until boot. I don't > > > > > > > > > > see a > > > > > > > > > > summary of > > > > > > > > > > why > > > > > > > > > > that's no longer a concern in the v3 of the patch. > > > > > > > > > > Can you > > > > > > > > > > confirm > > > > > > > > > > that it isn't an issue ? Is it simply because the > > > > > > > > > > booted > > > > > > > > > > image > > > > > > > > > > isn't > > > > > > > > > > installed via this package, and hence we are fine ? > > > > > > > > > > > > > > > > > > I'm suspecting this patch is why we're seeing > > > > > > > > > selftest > > > > > > > > > failures: > > > > > > > > > > > > > > > > > > https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/1055 > > > > > > > > > > > > > > > > > > > > > > > > > > Do you mean this patch has been applied? and introduce > > > > > > > > new > > > > > > > > issues? > > > > > > > > > > > > > > Yes, I reverted it and retested and confirmed this patch > > > > > > > causes the > > > > > > > selftest failure in the link to the build above. > > > > > > > > > > > > > OK, I am trying to analyse the log. But I haven't figured > > > > > > out what > > > > > > cause > > > > > > it fialed, and how to reproduce it on my mechine. I'd > > > > > > apprecate any > > > > > > information. > > > > > > > > > > The command to reproduce should be: > > > > > > > > > > oe-selftest -r efibootpartition.GenericEFITest.test_boot_efi > > > > > > > > > I've addressed this failure why due to boot partation in wic > > > > doesn't > > > > contain no-versioned image. This result is different from the > > > > previous > > > > I verified, because of the different configuraions in wks. > > > > > > > > "--source" field in wks decides where the files in boot > > > > partation come > > > > from. So no-versioned image may come from ${IMAGE_ROOTFS}/boot > > > > which is > > > > installed by rpm package. Blow is the wks used by 'oe-selftest > > > > -r > > > > efibootpartition.GenericEFITest.test_boot_efi' > > > > > > > > bootloader --ptable gpt > > > > part /boot --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/boot > > > > --fstype=vfat --label boot --active --align 1024 --use-uuid > > > > --overhead-factor 1.0 > > > > part / --source rootfs --fstype=ext4 --label root --align 1024 > > > > --exclude-path boot/ > > > > > > > > Hence we still should keep the no-versioned iamge in kernel- > > > > image*.rpm > > > > which is like the previous v2 patch. > > > > > > > Any opinions? It does cause the kernel rpm larger. However, the > > > kernel > > > image is not always large, only a few MB. And it will be changed > > > to > > > symlink when installed on targe. So this patch's only negative > > > effect > > > is the little increasement about update payloads. > > > > I'm trying to follow the description that you had about the > > oe-selftest and I'm missing something. > > > > Can you describe it again ? In a way that someone not familiar with > > that the selftest is seeing as a failure can grok ? > > > > i.e. in the selftest configuration are we not getting the > > (un)versioned kernel image because the symlink (or copy fallback) > > is > > in an on-boot post install hook ? And the test is looking for the > > versioned/unversioned kernel image at image construction time ? > > > > So that leaves us at either installing both the versioned and > > unversioned, or some sort of package install time testing of the > > target filesystem ? Does that partition exist at package install > > time > > ? Is that the approach we tried in v1 of the patch (I know v2 was > > keeping both as copies in the package, and converting it to a > > symlink > > on boot). > > Sorry for the uncleared discription. > > For the os-selftest failure: The failure happened at qemu booting > with > its wic image. Qemu could not find the unversioned kernel image in > wic > image for booting itself ,then caused the test failed. > > Why the booted partition in wic image doesn't contain the unversioned > kernel image? Cause the wks can decide where the unversioned kernel > images in wic image comes from. For this test, it comes from > ${IMAGE_ROOTFS}/boot which is installed by kernel rpm package. > Actually > it didn't get unversioned kernel image because the symlink(or copy > fallback) is in an on-boot post install hook. > > Hence we should keep a unversioned kernel image in kernel rpm > package. > And patch v2 did it.( v1 and v2 are similar, but v2 improves print > messages.) This does bring us to a bit of an impasse as I don't really like the idea of duplicating the kernel binaries twice in the packages just to work around fat filesystem limitations. Today its this file, you could argue we have to replace a load more files with duplicate copies and postinstalls which would seem to be the wrong direction to go in. Which tools does the extraction of the files onto this fat system? Could we ignore the symlink errors there and rely on a postinstall to create if not already created? Cheers, Richard