From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk0-f65.google.com (mail-vk0-f65.google.com [209.85.213.65]) by mail.openembedded.org (Postfix) with ESMTP id D01FB6FF84 for ; Fri, 15 Jan 2016 08:46:01 +0000 (UTC) Received: by mail-vk0-f65.google.com with SMTP id i129so9314624vkb.2 for ; Fri, 15 Jan 2016 00:46:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Z3L70Y0sYd2I9gdWaPFwf1qKrws6CnDqkLX3fvmejaA=; b=YfWRpkbiS88efYaZQQ+qzNWIqxDkT5Kk961QyJclUvZDs37YF/PmVj8AWUTeK8Piir PVBf2Qs2FRhrNzFIKK9SqdUSg/SnCqKgnwB9kw+tTuNvq/c0E33EkALN2fnYp4wD+T4U cs9skooNDttfWZwRUn7aS9X11Fqvf/LI3RZ5AgYyUr1LZCd5gG5Am8sx50UPiq1nTs5n bpKBllY1XDL3G0IR4wVdWwc2QhReUJ9iHp9+Mb35wWaTAZ/rFKd8blu2ZKqTtMvtQWZX lskBiRqxfkeEPxxbi1OiaspOb0eeHYSBaCd5FUHaMxL2yLJHj+s+B6qaCF1P474y/7BM 2ZzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Z3L70Y0sYd2I9gdWaPFwf1qKrws6CnDqkLX3fvmejaA=; b=ddPyQz5hkFu/xiIbeSzg+2E3ixUiGLb8XC1nKgs8y47vV/u+FZNUdwT5dwOCm1PQMU wdM+cjcRizyyQSDQnrR+qPYAoJBDnw1eg25GAZk+bM75JlVbS0SpxVEU4d7wr151D5oB hIvz8J6JyPVZM5njBT0jbBiYgDku7IVyCK3v9yAMAmJOG2Ot0h8r4exhalO576iniNx8 XnUhfcA2WN+oVuSNk1XuF/AMibCUHDpdnOzEihp9l1VfvpDEipuybAknB2bjvDvll93p uCP20HFqgmcAGp0im2fFLqePKU8hIVer4+mbYEtQMzroA+wjmX6fUXxDt/Yf2POwZwuM PHgw== X-Gm-Message-State: ALoCoQn8UODKpUrM7vtCkyBfqxHt8LXdc0ZxB1oLrKcFui9/zvkZrTILicccqOXiGysq22u7xDLextVS5Wi8+rykKvLhld4xFw== MIME-Version: 1.0 X-Received: by 10.31.178.146 with SMTP id b140mr6544409vkf.108.1452847562041; Fri, 15 Jan 2016 00:46:02 -0800 (PST) Received: by 10.31.30.204 with HTTP; Fri, 15 Jan 2016 00:46:01 -0800 (PST) In-Reply-To: <5697D5AA.1030109@windriver.com> References: <1451999565-3502-1-git-send-email-liu.ming50@gmail.com> <5697D5AA.1030109@windriver.com> Date: Fri, 15 Jan 2016 09:46:01 +0100 Message-ID: From: Ming Liu To: Bruce Ashfield Cc: "yue.tao" , OE-core Subject: Re: [PATCH 0/3] Introduces kernel-initramfs recipe to resolve a implicit dependency issue X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2016 08:46:02 -0000 Content-Type: multipart/alternative; boundary=001a1144034cd92f9f05295b6e2c --001a1144034cd92f9f05295b6e2c Content-Type: text/plain; charset=UTF-8 Hi, Bruce: No problem, thanks for letting me know the status. //Ming Liu 2016-01-14 18:06 GMT+01:00 Bruce Ashfield : > Just bumping this review to let you know that I haven't forgotten > about it. > > I've been looking at the details at least twice now, but haven't > managed to sort everything out. > > I'll pick this up again shortly. > > Bruce > > > On 16-01-05 08:12 AM, Ming Liu wrote: > >> In current initramfs bundled kernel packaging policy, there are several >> dependency chains co-existing: >> >> | "core-image-minimal.do_build" -> >> "core-image-minimal.do_bundle_initramfs" >> | "core-image-minimal.do_bundle_initramfs" -> >> "virtual/kernel.do_bundle_initramfs" >> | "core-image-minimal.do_bundle_initramfs" -> >> "core-image-minimal.do_rootfs" >> | "core-image-minimal.do_rootfs" -> >> "virtual/kernel.do_package_write_${IMAGE_PKGTYPE}" >> | "virtual/kernel.do_package_write_${IMAGE_PKGTYPE}" -> >> "virtual/kernel.do_package" >> | "virtual/kernel.do_package" -> "virtual/kernel.do_install" >> | >> | "virtual/kernel.do_deploy" -> "virtual/kernel.do_bundle_initramfs" >> | "virtual/kernel.do_bundle_initramfs" -> "virtual/kernel.do_install" >> >> We could see, virtual/kernel.do_package is not explicitly depending on >> virtual/kernel.do_bundle_initramfs so far, therefore, there is not a >> workable way to add initramfs bundled kernel image into rootfs, because >> kernel's do_bundle_initramfs could run parallelly with its do_package, >> which means we will get a implicit kernel-image package that sometimes it >> contains the initramfs bundled kernel or sometimes it doesn't. >> >> To fix this problem, the idea is to let the initramfs bundled kernel >> packaging depend on do_bundle_initramfs, meanwhile, to avoid the circular >> dependency issue that commit: 609d5a9ab9e58bb1c2bcc2145399fbc8b701b85a >> [ kernel.bbclass, image.bbclass: Implement kernel INITRAMFS dependency >> and bundling ] >> >> was trying to address, this dependency has to be splitted from kernel >> recipe(at least, I could not figure out another way to achieve it), so a >> new kernel-initramfs is introduced, in which a dependency chain is >> created: >> >> | "kernel-initramfs.do_install" -> "virtual/kernel.do_deploy" >> | "virtual/kernel.do_deploy" -> "virtual/kernel.do_bundle_initramfs" >> >> Then the users can add initramfs bundled kernel image into rootfs by: >> >> IMAGE_INSTALL_append = " kernel-initramfs" >> >> without introducing any circular dependencies. >> >> Ming Liu (3): >> kernel.bbclass: do not install initramfs bundled kernel image >> image.bbclass: removes bundle_initramfs related code >> kernel-initramfs: new recipe, creates initramfs bundled kernel >> packaging >> >> meta/classes/image.bbclass | 11 ----- >> meta/classes/kernel.bbclass | 4 -- >> meta/recipes-kernel/linux/kernel-initramfs.bb | 69 >> +++++++++++++++++++++++++++ >> 3 files changed, 69 insertions(+), 15 deletions(-) >> create mode 100644 meta/recipes-kernel/linux/kernel-initramfs.bb >> >> > --001a1144034cd92f9f05295b6e2c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi, Bruce:

No problem, thanks for l= etting me know the status.

//Ming Liu

2016-01-14 18:06 GMT+01:00 Bruce= Ashfield <bruce.ashfield@windriver.com>:
Just bumping this review to let you know that I = haven't forgotten
about it.

I've been looking at the details at least twice now, but haven't managed to sort everything out.

I'll pick this up again shortly.

Bruce


On 16-01-05 08:12 AM, Ming Liu wrote:
In current initramfs bundled kernel packaging policy, there are several
dependency chains co-existing:

| "core-image-minimal.do_build" -> "core-image-minimal.do= _bundle_initramfs"
| "core-image-minimal.do_bundle_initramfs" -> "virtual/ke= rnel.do_bundle_initramfs"
| "core-image-minimal.do_bundle_initramfs" -> "core-image= -minimal.do_rootfs"
| "core-image-minimal.do_rootfs" -> "virtual/kernel.do_pa= ckage_write_${IMAGE_PKGTYPE}"
| "virtual/kernel.do_package_write_${IMAGE_PKGTYPE}" -> "= virtual/kernel.do_package"
| "virtual/kernel.do_package" -> "virtual/kernel.do_insta= ll"
|
| "virtual/kernel.do_deploy" -> "virtual/kernel.do_bundle= _initramfs"
| "virtual/kernel.do_bundle_initramfs" -> "virtual/kernel= .do_install"

We could see, virtual/kernel.do_package is not explicitly depending on
virtual/kernel.do_bundle_initramfs so far, therefore, there is not a
workable way to add initramfs bundled kernel image into rootfs, because
kernel's do_bundle_initramfs could run parallelly with its do_package,<= br> which means we will get a implicit kernel-image package that sometimes it contains the initramfs bundled kernel or sometimes it doesn't.

To fix this problem, the idea is to let the initramfs bundled kernel
packaging depend on do_bundle_initramfs, meanwhile, to avoid the circular dependency issue that commit: 609d5a9ab9e58bb1c2bcc2145399fbc8b701b85a
[ kernel.bbclass, image.bbclass: Implement kernel INITRAMFS dependency and = bundling ]

was trying to address, this dependency has to be splitted from kernel
recipe(at least, I could not figure out another way to achieve it), so a new kernel-initramfs is introduced, in which a dependency chain is created:=

| "kernel-initramfs.do_install" -> "virtual/kernel.do_dep= loy"
| "virtual/kernel.do_deploy" -> "virtual/kernel.do_bundle= _initramfs"

Then the users can add initramfs bundled kernel image into rootfs by:

IMAGE_INSTALL_append =3D " kernel-initramfs"

without introducing any circular dependencies.

Ming Liu (3):
=C2=A0 =C2=A0kernel.bbclass: do not install initramfs bundled kernel image<= br> =C2=A0 =C2=A0image.bbclass: removes bundle_initramfs related code
=C2=A0 =C2=A0kernel-initramfs: new recipe, creates initramfs bundled kernel=
=C2=A0 =C2=A0 =C2=A0packaging

=C2=A0 meta/classes/image.bbclass=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 | 11 -----
=C2=A0 meta/classes/kernel.bbclass=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 4 --
=C2=A0 meta/recipes-kernel/linux/kernel-initramfs.bb | 69 ++++++++++++= +++++++++++++++
=C2=A0 3 files changed, 69 insertions(+), 15 deletions(-)
=C2=A0 create mode 100644 meta/recipes-kernel/linux/kernel-initramfs.bb



--001a1144034cd92f9f05295b6e2c--