From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: How can I create a truly minimal distribution that runs entirely from RAM? To: yocto@lists.yoctoproject.org From: p32@tuta.io X-Originating-Location: Karlsruhe, Baden-Württemberg, DE (46.223.162.21) X-Originating-Platform: Linux Firefox 86 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Wed, 10 Mar 2021 15:32:17 -0800 Message-ID: <2W3V.1615419137982625968.f4wK@lists.yoctoproject.org> Content-Type: multipart/alternative; boundary="YEYGHveOE5f9udO5YKnd" --YEYGHveOE5f9udO5YKnd Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello everyone, I am currently using this ( https://source.codeaurora.org/external/imx/imx= -manifest/tree/imx-5.4.3-2.0.0.xml?h=3Dimx-linux-zeus ) Yocto-based build s= etup provided by NXP to create a custom Linux distribution for one of the i= .MX boards. My custom image is based on the core-image-minimal recipe and w= orks fine, i.e., runs on the platform as expected. However, I have to follo= wing two issues: Although core-image-minimal is documented as "A small image just capable o= f allowing a device to boot", I can tell from the running system that it co= ntains a huge number of components that I think are not be strictly necessa= ry to boot the device. For instance, the boot log contains entries about an= FPGA manager framework, Bluetooth, Ethernet, KVM, USB, and a lot of i.MX-s= pecific modules such as for DMA or power management. For evaluation purpose= s, I want to get rid of all of these and end up with a *truly* minimal Linu= x system that is able to boot, schedule its tasks, and to communicate via U= ART. How can I achieve this without losing the i.MX support, i.e., the gene= ration of a bootloader and suitable device tree files? Furthermore, I would like the minimal system to run entirely from RAM. Mor= e specifically: After being started from the SD card, U-Boot should start t= he Linux distribution via initramfs. I am able to generate some kind of ini= tramfs binary using the following changes: # local.conf INITRAMFS_IMAGE =3D "recipe-name" INITRAMFS_IMAGE_BUNDLE =3D "1" # recipe-name.bb IMAGE_FSTYPES =3D "${INITRAMFS_FSTYPES}" PACKAGE_INSTALL =3D "${IMAGE_INSTALL}" However, this does not affect the generated U-Boot, which means that U-Boo= t still tries to boot from an SD card partition. What is the "right way" to= make use of the Image-initramfs-board.bin or the image-board.cpio.gz files= that Yocto creates in this case? Any help yould be greatly appreciated. Kind regards! --YEYGHveOE5f9udO5YKnd Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello everyone,

I am currently using this Yocto-based build set= up provided by NXP to create a custom Linux distribution for one of the i.M= X boards. My custom image is based on the core-image-minimal recipe and wor= ks fine, i.e., runs on the platform as expected. However, I have to followi= ng two issues:

Although core-image-minimal is documented as "A s= mall image just capable of allowing a device to boot", I can tell from the = running system that it contains a huge number of components that I think ar= e not be strictly necessary to boot the device. For instance, the boot log = contains entries about an FPGA manager framework, Bluetooth, Ethernet, KVM,= USB, and a lot of i.MX-specific modules such as for DMA or power managemen= t. For evaluation purposes, I want to get rid of all of these and end up wi= th a truly minimal Linux system that is able to boot, sche= dule its tasks, and to communicate via UART. How can I achieve this without= losing the i.MX support, i.e., the generation of a bootloader and suitable= device tree files?

Furthermore, I would like the minimal system= to run entirely from RAM. More specifically: After being started from the = SD card, U-Boot should start the Linux distribution via initramfs. I am abl= e to generate some kind of initramfs binary using the following changes:
# local.conf
INITRAMFS_IMAGE =3D "recipe-name"
INITRAMFS_IMAGE_BUNDLE =3D "1"
# recipe-name.bb
IMAGE_FSTYPES =3D "${INITRAMFS_FSTYPES}= "
PACKAGE_INSTALL =3D "${IMAGE_INSTALL}"<= /div>
However, this does not affect the generated U-Boot, which means that= U-Boot still tries to boot from an SD card partition. What is the "right w= ay" to make use of the Image-initramfs-board.bin or the image-board.cpio.gz= files that Yocto creates in this case?

Any help yould be greatl= y appreciated.

Kind regards! --YEYGHveOE5f9udO5YKnd-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-il1-f173.google.com (mail-il1-f173.google.com [209.85.166.173]) by mx.groups.io with SMTP id smtpd.web11.2159.1615439028514256663 for ; Wed, 10 Mar 2021 21:03:48 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QHZ7VYO1; spf=pass (domain: gmail.com, ip: 209.85.166.173, mailfrom: zoran.stojsavljevic@gmail.com) Received: by mail-il1-f173.google.com with SMTP id g9so17830547ilc.3 for ; Wed, 10 Mar 2021 21:03:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=E18tuqnJIYKX3Z9/J2ap8fepDaQeTVWMLWVrUzRPYdE=; b=QHZ7VYO14v+arT2zA5z1dZxNuCTgGjmxQHMUwFrEQfL5NAJgepXmviZ7BFm9dhyBfs hyYMU1dIOGtGgUgSzNZ6Js9/4H5nG/3kkelP7JM1tcNtsCoUk5igWp/DbuEnHOOlXjHt 13sUqwTP5LJgZ/4XazDBdfoOmwtq46+qN6MdJnXrngrCeey+JabqT9qxnpUPkEv7MiUb nFHCKcQkhBDaRfJ1VmKxib0ifL8pVRm2Hg9m+PoZS1tKsrGHHqAonqkAcIUfTea/sexB fmsdW5ACIkn0yJ6ZhvDXbRzno5gd+X4NvR1xVJzZonZ9q5fUTs55GTliYVlDJakqmHH/ iMSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=E18tuqnJIYKX3Z9/J2ap8fepDaQeTVWMLWVrUzRPYdE=; b=k4kgMoFosH4FszHUEgqd/lyTEJknHovVoPf1z8eUJAvGG4fO6MLIDJAeUiUg/neq3h OB+F9HIJQY0KNAgVfNvsH7TDuK6x8nMj9sJ8iM3DOwvEu/ofJbW9ji08w/ELR0kvyYBo 9RLubSymp/1j5FgIg9TNI+xvziym1wOlC0oN6MWf9uIiZQAm0x7J4Pdj46ckR1bTepLp yl7QDs3ahehxmD5vzaBSbDhk7EMncqgFNPz3ZhfDnDO35UwcYyWGqkOh+YNxpsaLDXMH UDCp+y0VZ9o9mRlbrbFz/ece6Up2fbIKJAUNUQCNtScLGdwZ0+mJ+S1UMhHkCWPUokA0 +nZQ== X-Gm-Message-State: AOAM531CBzCvPNpPLDh4Z/xedR4GmDNslPhG6151T0m6gzFJWLi3wBjt gHRlJHCnRh2gi9f6ajWVTzco5VH6UNGDA7oE/vo= X-Google-Smtp-Source: ABdhPJxaCg1OrgSQ4EVzhODBXrABQyRhCSKW+Htq98iG/aQomdFIWxUrfWHNi8jI7nidR8ShziqIRe6+NKClPQLtR08= X-Received: by 2002:a92:444e:: with SMTP id a14mr5460149ilm.215.1615439027692; Wed, 10 Mar 2021 21:03:47 -0800 (PST) MIME-Version: 1.0 References: <2W3V.1615419137982625968.f4wK@lists.yoctoproject.org> In-Reply-To: <2W3V.1615419137982625968.f4wK@lists.yoctoproject.org> From: "Zoran" Date: Thu, 11 Mar 2021 06:03:36 +0100 Message-ID: Subject: Re: [yocto] How can I create a truly minimal distribution that runs entirely from RAM? To: p32@tuta.io Cc: Yocto-mailing-list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable BBB example: https://www.yoctoproject.org/pipermail/yocto/2018-July/041696.html The line: DISTRO_FEATURES_append =3D " ram" Should be: DISTRO_FEATURES_append =3D " nfs" BSP Traces for BBB (YOCTO Warrior): https://github.com/ZoranStojsavljevic/bbb-yocto/blob/master/bbb-releases/b= bb-warrior/target-bbb-platform-traces.txt And the ash script in the U-Boot supporting above written: https://github.com/ZoranStojsavljevic/bbb-yocto/blob/master/custom/u-boot.= ash#L3 Line 3 to 10. Please, pay attention to line 1 as well! Zee _______ On Thu, Mar 11, 2021 at 12:32 AM p32 via lists.yoctoproject.org wrote: > > Hello everyone, > > I am currently using this Yocto-based build setup provided by NXP to cre= ate a custom Linux distribution for one of the i.MX boards. My custom image= is based on the core-image-minimal recipe and works fine, i.e., runs on th= e platform as expected. However, I have to following two issues: > > Although core-image-minimal is documented as "A small image just capable= of allowing a device to boot", I can tell from the running system that it = contains a huge number of components that I think are not be strictly neces= sary to boot the device. For instance, the boot log contains entries about = an FPGA manager framework, Bluetooth, Ethernet, KVM, USB, and a lot of i.MX= -specific modules such as for DMA or power management. For evaluation purpo= ses, I want to get rid of all of these and end up with a truly minimal Linu= x system that is able to boot, schedule its tasks, and to communicate via U= ART. How can I achieve this without losing the i.MX support, i.e., the gene= ration of a bootloader and suitable device tree files? > > Furthermore, I would like the minimal system to run entirely from RAM. M= ore specifically: After being started from the SD card, U-Boot should start= the Linux distribution via initramfs. I am able to generate some kind of i= nitramfs binary using the following changes: > # local.conf > INITRAMFS_IMAGE =3D "recipe-name" > INITRAMFS_IMAGE_BUNDLE =3D "1" > # recipe-name.bb > IMAGE_FSTYPES =3D "${INITRAMFS_FSTYPES}" > PACKAGE_INSTALL =3D "${IMAGE_INSTALL}" > > However, this does not affect the generated U-Boot, which means that U-B= oot still tries to boot from an SD card partition. What is the "right way" = to make use of the Image-initramfs-board.bin or the image-board.cpio.gz fil= es that Yocto creates in this case? > > Any help yould be greatly appreciated. > > Kind regards! >=20 > From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: How can I create a truly minimal distribution that runs entirely from RAM? To: yocto@lists.yoctoproject.org From: p32@tuta.io X-Originating-Location: Karlsruhe, Baden-Württemberg, DE (46.223.162.21) X-Originating-Platform: Linux Firefox 86 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Fri, 12 Mar 2021 13:49:20 -0800 References: In-Reply-To: Message-ID: <29498.1615585760727204439@lists.yoctoproject.org> Content-Type: multipart/alternative; boundary="9oJfLcuFxjoALv3GM5dV" --9oJfLcuFxjoALv3GM5dV Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Thank you very much for your help on the second issue! I was unaware of the= fact that another mkimage call is necessary. After taking a look at the th= e references you provided, I was able to boot the system from an initramfs. However, my current approach requires two manual steps after running Yocto= : I need to call mkimage on the cpio.xz file and to extend/configure the U-= Boot environment in the running system. Is there a way to automate this? More specifically, is it possible to... * have Yocto generate an initramfs.cpio.xz.uboot file instead of just an i= nitramfs.cpio.xz file and to * modify the default environment that Yocto will compile into the U-Boot b= inary? --9oJfLcuFxjoALv3GM5dV Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Thank you very much for your help on the second issue! I was unaware of the= fact that another mkimage call is necessary. After taking a look at the th= e references you provided, I was able to boot the system from an initramfs.=

However, my current approach requires two manual steps after ru= nning Yocto: I need to call mkimage on the cpio.xz file and to extend/confi= gure the U-Boot environment in the running system. Is there a way to automa= te this?

More specifically, is it possible to...
  1. have Yocto generate an initramfs.cpio.xz.uboot file instead of just an= initramfs.cpio.xz file and to
  2. modify the default environment that Yocto will compile into the U-Boot= binary?
--9oJfLcuFxjoALv3GM5dV-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-il1-f180.google.com (mail-il1-f180.google.com [209.85.166.180]) by mx.groups.io with SMTP id smtpd.web12.627.1615620541341783444 for ; Fri, 12 Mar 2021 23:29:01 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20161025 header.b=V0XB9kmh; spf=pass (domain: gmail.com, ip: 209.85.166.180, mailfrom: zoran.stojsavljevic@gmail.com) Received: by mail-il1-f180.google.com with SMTP id d5so4727256iln.6 for ; Fri, 12 Mar 2021 23:29:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4KGui1/L8QgLZ4Z37pDxxbGiER2+PJPcBCTEb53dHg4=; b=V0XB9kmh2GSWRY9B55whzH0FXbpcd0Rc/2gfrbnUYv9WaYM/Sio7jey77j8ee3/7QG MiaPYVq9hljAnpXSb4fP4xVt/Pj8Ivqdv7JauXS7BfKt/FBYmnxVOouwxWtUHKQSKMC8 5j417hzEBTEqsyKYx/wvdVIQZ6Gyh7b9Rgd3gf7EzJyAAlw6m3rhfAOUR73uwI7JY0Ix DjBVvkYPol3lq39cQYlmxwOEb5BXkxwiQWavflNh068WpeZrnDXp3W1ETc+2ItVDNaCq +DMmCvzKPLoCIAKln9OGBsF69pQl4TYJh1vF9mnIXKKkdcl7Ny+3UGpDR2fk32QxJ6i9 6r1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4KGui1/L8QgLZ4Z37pDxxbGiER2+PJPcBCTEb53dHg4=; b=r8xI/0OP7VTVDb4T9tDzTT5c3TWbmTcm+CFvf8/V6riFEEDyMzr+MeQe0iFjM4Xwyu A72+uXgQ4WMJL/7AtHibmLgTpp4uzpiKaiRFqr10fZtjtd3Om1CwFnwZMNMnDymgxWYd 9vFQs/uNBRWqaoxwe3f4CiuRZfn+i4lCMSTORnNl2IWXi+TEEH+dLptthER5NoqMnwWy gtrW7cIgVfe4UNkaTR87wFNVkxDAGwMaRris5V9a0w2GR2a+rHXfZcs4bZfB1KJBL3vO +9sl5tPWkz3atvo6GXvPKj4kLlSo6OKh7CU36ls+2KEPKqxe2HggqqoiSHeyk9vYejpp 4GSg== X-Gm-Message-State: AOAM5329+8kvvXah1aZGEbOEJeGUkXAd7KEn3ehsFZiAuF3rQIYGc9E+ zKmvE9RerI1AXpml5dVf7YhgejJA75ONcBbDsqE= X-Google-Smtp-Source: ABdhPJwzEBCV991lt7N0KF1wVMFnMqUXupQcLti+QQfGmw8FFeQlZB8VlYFrbvQyOYcrFulxOKGCVy10xOOisX78ODA= X-Received: by 2002:a05:6e02:1094:: with SMTP id r20mr5522767ilj.154.1615620540552; Fri, 12 Mar 2021 23:29:00 -0800 (PST) MIME-Version: 1.0 References: <29498.1615585760727204439@lists.yoctoproject.org> In-Reply-To: <29498.1615585760727204439@lists.yoctoproject.org> From: "Zoran" Date: Sat, 13 Mar 2021 08:28:49 +0100 Message-ID: Subject: Re: [yocto] How can I create a truly minimal distribution that runs entirely from RAM? To: p32@tuta.io Cc: Yocto-mailing-list Content-Type: text/plain; charset="UTF-8" > 1. have Yocto generate an initramfs.cpio.xz.uboot file > instead of just an initramfs.cpio.xz file and to I assume this is not too hard to achieve. Somewhere in some bitbake config file this should be added, but either me do not know that. So, we'll both wait for this info, maybe some new variable should be defined for such cases as initramfs, for YOCTO build system to generate. For example, adding INITRAMFS_CONF = "1" into local.conf (initially this variable should be set to INITRAMFS_CONF ??= "0") in some YOCTO defconfig file?! > 2. modify the default environment that Yocto will > compile into the U-Boot binary? This, I believe, is achievable by the following steps: 1. Taking/cloning last U-Boot from denx git; 2. Modifying the ./include/configs/ file, introducing the following: #ifdef CONFIG_SUPPORT_INITRAMFS_BOOT #define INITRAMFS_ENV \ #else #define INITRAMFS_ENV "" #endif 3. Compile U-boot, place it on SDcard and test, to see if you are able to make it work after rebooting the system; 4. tar again U-Boot source code with these changes, and upload it on your server; 5. Change the U-boot recipe to be downloaded from your server! Another approach I do not know (maybe YOCTO people do know a better approach from inside the YOCTO build system). Hope this helps. Zoran _______ On Fri, Mar 12, 2021 at 10:49 PM p32 via lists.yoctoproject.org wrote: > > Thank you very much for your help on the second issue! I was unaware of the fact that another mkimage call is necessary. After taking a look at the the references you provided, I was able to boot the system from an initramfs. > > However, my current approach requires two manual steps after running Yocto: I need to call mkimage on the cpio.xz file and to extend/configure the U-Boot environment in the running system. Is there a way to automate this? > > More specifically, is it possible to... > > have Yocto generate an initramfs.cpio.xz.uboot file instead of just an initramfs.cpio.xz file and to > modify the default environment that Yocto will compile into the U-Boot binary? > > > > From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: How can I create a truly minimal distribution that runs entirely from RAM? To: yocto@lists.yoctoproject.org From: p32@tuta.io X-Originating-Location: Karlsruhe, Baden-Württemberg, DE (46.223.162.21) X-Originating-Platform: Linux Firefox 86 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Sun, 14 Mar 2021 16:16:51 -0700 References: In-Reply-To: Message-ID: <29235.1615763811371292564@lists.yoctoproject.org> Content-Type: multipart/alternative; boundary="42d4OkbSmJ5aBH1QiDDz" --42d4OkbSmJ5aBH1QiDDz Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Thank you very much. I figured out that you can have Yocto create a suitabl= e U-Boot wrapper as follows (from the image recipe): IMAGE_FSTYPES =3D "cpio.xz.u-boot" Now there is only one last issue that I wasn't able to solve yet: I would = like Yocto to not only generate this U-Boot file but also add it to the boo= t partition of a wic.gz image. I tried to extend the image recipe as follow= s: IMAGE_FSTYPES =3D "cpio.xz.u-boot wic.gz" IMAGE_BOOT_FILES_append +=3D "${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio.xz.u-= boot" Unfortunately, there is a dependency issue here. BitBake schedules the do_= image_wic task before the do_image_cpio task, which creates the u-boot file= . I tried to fix it as follows (from the image recipe): do_image_wic[depends] =3D "my-image-recipe:do_image_cpio" While the dependency graph acknowledges this dependency, BitBake does not = seem to care about it. Whatever I try, do_image_wic is always executed firs= t and, obviously, does not succeed. I think the problem is comparable to th= e unsolved one outlined here: https://stackoverflow.com/questions/58954170/yocto-creating-a-dependency-f= or-wic-to-cpio-gz-image How can I instruct Yocto to execute do_image_cpio first? --42d4OkbSmJ5aBH1QiDDz Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Thank you very much. I figured out that you can have Yocto create a suitabl= e U-Boot wrapper as follows (from the image recipe):
IMAGE_FSTYPES =3D= "cpio.xz.u-boot"

Now there is only one last issue that I wasn't= able to solve yet: I would like Yocto to not only generate this U-Boot fil= e but also add it to the boot partition of a wic.gz image. I tried to exten= d the image recipe as follows:
IMAGE_FSTYPES =3D "cpio.xz.u-boot wic.g= z"
IMAGE_BOOT_FILES_append +=3D "${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpi= o.xz.u-boot"

Unfortunately, there is a dependency issue here. Bi= tBake schedules the do_image_wic task before the do_image_cpio task, which = creates the u-boot file. I tried to fix it as follows (from the image recip= e):
do_image_wic[depends] =3D "my-image-recipe:do_image_cpio"
While the dependency graph acknowledges this dependency, BitBake does no= t seem to care about it. Whatever I try, do_image_wic is always executed fi= rst and, obviously, does not succeed. I think the problem is comparable to = the unsolved one outlined here:
https://stackoverflow.com/questions/58= 954170/yocto-creating-a-dependency-for-wic-to-cpio-gz-image

How = can I instruct Yocto to execute do_image_cpio first?
--42d4OkbSmJ5aBH1QiDDz-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-il1-f171.google.com (mail-il1-f171.google.com [209.85.166.171]) by mx.groups.io with SMTP id smtpd.web10.10757.1615824085350579989 for ; Mon, 15 Mar 2021 09:01:25 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ne2JrNuX; spf=pass (domain: gmail.com, ip: 209.85.166.171, mailfrom: zoran.stojsavljevic@gmail.com) Received: by mail-il1-f171.google.com with SMTP id v14so9797546ilj.11 for ; Mon, 15 Mar 2021 09:01:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=277grrDngFpTImeuj08h59gs0BvPyC2QF3zJ/IqToHM=; b=Ne2JrNuXkexT3lnzC0LKpaQ2WSPLtrlN+6F5ZqBR6JOqVFv2Xmg0aB1PbCVkFyTu4Z MHOmmw8OsO31jvdlqrIRvjAI/JGL45LHDshwytmFKFaJg48+10D13uRKLbkYB6EICpjq 3+CMwnIwOT8Fi1vjr5xxPpz2gsgmp0Rf5zRBOJjh7JGC9H7lsBECDUT2yFTvNUhXABIJ op43FPLjWQWX8ZVNu02AAd4unJHCmYfrC4l8H3QUz+EGSdXwoeRKiUIDSf716sNG3H4a T89ZsRdwEFoc1Hp5xt7d6uIWx0qK3SgNOoSaJJEoSPuvIP7bQaL0DFYM04yAZcFqbSew fiwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=277grrDngFpTImeuj08h59gs0BvPyC2QF3zJ/IqToHM=; b=JDgn4HPmkXIsP/iPxOzYiwNB7H3k99sw7/0/3xjBcEqMXPbydnROsAz4b23F0cP2bf lrTthTbArkycqxV5dDkrSLom1FVQB5Iy9coCdEgL4U1xLikXT+N+YY7YQ7nNAd3Q99aN Qc/FSvpMg9Ok1ZeHayFdUP/nBeO1uyuHythsBY7nLMCOlnXJJ9yTDQtglIXqTQm2jCWe PtrqjKqZrzidfBtyspFWp+qD0gIiBXtndRpiCfRo+gDNd8WMJ3ai+b14I7tcgB1Jsqrn u7yNR/JGwhoCmo2V1Jf7YPAWwt6S6pqOIYJe5ZVpm7hX97/ZXIQ2dpQI/jXYngavOM3K 9N/w== X-Gm-Message-State: AOAM531/4vtw6k6moXs9iCYR/PvxlM/Dw8cY7XDx25fCDCygB//PRKa/ geZxkqP/aFVOCAkUnSx5C1XIhE1Y4KnBpaPCTgo= X-Google-Smtp-Source: ABdhPJwZjOiNu/os8R9Pc9eXzM4N5N0x4U6ftWfQ77b4Gi5aUys/E9Ozu4rA7DwJcZ7n2/cjfNxnfwt5gw2W67RCKOo= X-Received: by 2002:a92:6511:: with SMTP id z17mr241041ilb.232.1615824084426; Mon, 15 Mar 2021 09:01:24 -0700 (PDT) MIME-Version: 1.0 References: <29235.1615763811371292564@lists.yoctoproject.org> In-Reply-To: <29235.1615763811371292564@lists.yoctoproject.org> From: "Zoran" Date: Mon, 15 Mar 2021 17:01:13 +0100 Message-ID: Subject: Re: [yocto] How can I create a truly minimal distribution that runs entirely from RAM? To: p32@tuta.io Cc: Yocto-mailing-list Content-Type: text/plain; charset="UTF-8" > How can I instruct Yocto to execute do_image_cpio first? YOCTO people are entitled to answer that question. Aren't ya, INTEL folks??? Actually, iNTEL (IOTG) is responsible for that (since YOCTO support is 90% from INTEL), and I assume INTEL YOCTO people are entitled answering that/// Thank you, Zee (Zoran) _______ On Mon, Mar 15, 2021 at 12:17 AM p32 via lists.yoctoproject.org wrote: > > Thank you very much. I figured out that you can have Yocto create a suitable U-Boot wrapper as follows (from the image recipe): > IMAGE_FSTYPES = "cpio.xz.u-boot" > > Now there is only one last issue that I wasn't able to solve yet: I would like Yocto to not only generate this U-Boot file but also add it to the boot partition of a wic.gz image. I tried to extend the image recipe as follows: > IMAGE_FSTYPES = "cpio.xz.u-boot wic.gz" > IMAGE_BOOT_FILES_append += "${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio.xz.u-boot" > > Unfortunately, there is a dependency issue here. BitBake schedules the do_image_wic task before the do_image_cpio task, which creates the u-boot file. I tried to fix it as follows (from the image recipe): > do_image_wic[depends] = "my-image-recipe:do_image_cpio" > > While the dependency graph acknowledges this dependency, BitBake does not seem to care about it. Whatever I try, do_image_wic is always executed first and, obviously, does not succeed. I think the problem is comparable to the unsolved one outlined here: > https://stackoverflow.com/questions/58954170/yocto-creating-a-dependency-for-wic-to-cpio-gz-image > > How can I instruct Yocto to execute do_image_cpio first? > > > From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) by mx.groups.io with SMTP id smtpd.web08.299.1615828898647052343 for ; Mon, 15 Mar 2021 10:21:39 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=zGx+vrcM; spf=pass (domain: linaro.org, ip: 209.85.208.48, mailfrom: nicolas.dechesne@linaro.org) Received: by mail-ed1-f48.google.com with SMTP id dm8so18282058edb.2 for ; Mon, 15 Mar 2021 10:21:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=YKKCobqcIRhn1u8u7BV+Ka0u0xTC0/ogvVRY2KTUpFs=; b=zGx+vrcMtM5+/Bt5ofD5uKzBgei4ma0B1R2DKOxn3aO5adEdG0o60ptEgRh1PUGmG3 KO1RNNf6mPd2vKn48bbZ0vRJQmQPxqrKiYNrxaLbntNxgOSspcZ8zLaweSjWj6Knvm7h IoW7+Iq9wdWb33n8r9arvU3y0on9rPX2QbH+ZkRwS5zdwN9jqzEuA2fBctNGnrlSAwet AL1yvZFgvM5rTc7rj8/8eGUvKpQ2BL4XhU1048rzZpuAutXc52VGSIDVdmWRrsuJIXEt UijoHHDlqEgaTW888Vo6ouayFFepdlVa5XIje2BL14eWIwCCJu0H28/j2x9WZmTzJV+w DQHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=YKKCobqcIRhn1u8u7BV+Ka0u0xTC0/ogvVRY2KTUpFs=; b=NPq6WxkFU3lijqUavcvM5Y0XxHq5Qd2FdAuGzTNW3VmjvbNjmjoos/mycJfGgQgP56 p30wtj+PbxLNtZaJd5DUjDWF4VIxc2Oe4lHuHqhCDpQv1GouGKNjGPE7olOQXXI3cxL+ ZWwW8hgzs1gNYdcFu2kRUe4PwJEaPIoGgJkPrKFtJ2nJwCcXQBcfgu93Aq2mUPKcXfb7 C0IcNfu6ENBhAz/DXpI2ge6e8C2D70eAEXmg+OJQmifR5XAnh3hLEhhygThJhCmCRSIe W1PlJyLfE2OFZ4uJK3rCnOJGZqShUVLe0twicAfwVbOBAQXHm37DgfG1Rt8u5t0ui9LR RZfQ== X-Gm-Message-State: AOAM531mamzkD9G5kGgthk3XqslsMhHS2pdYVZS83e9QuGsgNhrN8aSM rsDRPZnT/TmMQOQ2C+PpbfqW1LuFgn/yp1Ucgt1zbg== X-Google-Smtp-Source: ABdhPJxial5jBAqGKPKCwkxYArd++i7ki9kaYjksC9pJ7WxcwN6LfHwq850yZgxER4BSBTFsxuSrmGvVL0zy+R91Pxk= X-Received: by 2002:a05:6402:5203:: with SMTP id s3mr31534820edd.79.1615828897000; Mon, 15 Mar 2021 10:21:37 -0700 (PDT) MIME-Version: 1.0 References: <29235.1615763811371292564@lists.yoctoproject.org> In-Reply-To: From: "Nicolas Dechesne" Date: Mon, 15 Mar 2021 18:21:25 +0100 Message-ID: Subject: Re: [yocto] How can I create a truly minimal distribution that runs entirely from RAM? To: Zoran Cc: p32@tuta.io, Yocto-mailing-list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable hey Zoran, On Mon, Mar 15, 2021 at 5:01 PM Zoran wrot= e: > > > How can I instruct Yocto to execute do_image_cpio first? > > YOCTO people are entitled to answer that question. Aren't ya, INTEL folk= s??? > > Actually, iNTEL (IOTG) is responsible for that (since YOCTO support is > 90% from INTEL), and I assume INTEL YOCTO people are entitled > answering that/// Please be aware that this is a community mailing list for the Yocto Project, and we expect everyone to be as pleasant as possible. I don't think the tone of your last email is appropriate for our mailing lists. Please refrain yourself from such claims, or we will need to use moderation. Let's make sure our discussions are about technical content and in case of any doubt, please refer to our CoC, at https://www.yoctoproject.org/community/code-of-conduct/. > > > Thank you, > Zee (Zoran) > _______ > > On Mon, Mar 15, 2021 at 12:17 AM p32 via lists.yoctoproject.org > wrote: > > > > Thank you very much. I figured out that you can have Yocto create a su= itable U-Boot wrapper as follows (from the image recipe): > > IMAGE_FSTYPES =3D "cpio.xz.u-boot" > > > > Now there is only one last issue that I wasn't able to solve yet: I wo= uld like Yocto to not only generate this U-Boot file but also add it to the= boot partition of a wic.gz image. I tried to extend the image recipe as fo= llows: > > IMAGE_FSTYPES =3D "cpio.xz.u-boot wic.gz" > > IMAGE_BOOT_FILES_append +=3D "${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio.x= z.u-boot" > > > > Unfortunately, there is a dependency issue here. BitBake schedules the= do_image_wic task before the do_image_cpio task, which creates the u-boot = file. I tried to fix it as follows (from the image recipe): > > do_image_wic[depends] =3D "my-image-recipe:do_image_cpio" > > > > While the dependency graph acknowledges this dependency, BitBake does = not seem to care about it. Whatever I try, do_image_wic is always executed = first and, obviously, does not succeed. I think the problem is comparable t= o the unsolved one outlined here: > > https://stackoverflow.com/questions/58954170/yocto-creating-a-dependen= cy-for-wic-to-cpio-gz-image > > > > How can I instruct Yocto to execute do_image_cpio first? > > > > > > > >=20 > From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-io1-f50.google.com (mail-io1-f50.google.com [209.85.166.50]) by mx.groups.io with SMTP id smtpd.web12.639.1615831265923966761 for ; Mon, 15 Mar 2021 11:01:06 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20161025 header.b=U227lCbv; spf=pass (domain: gmail.com, ip: 209.85.166.50, mailfrom: zoran.stojsavljevic@gmail.com) Received: by mail-io1-f50.google.com with SMTP id a7so34334072iok.12 for ; Mon, 15 Mar 2021 11:01:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=qj70mfm/XI2eik8MJxqd05rLUUhSGkJVn34MF5KjdRo=; b=U227lCbvcDF5tGqFDYdZf+FjaKRzCskl6Zz8Bz4mNQ1rCDH4XVDW1JRpje70rvtj/Y kLZu/K5emeo+oDKVR63MqxNDTx4/ZxaPC84PgA4D4PqQfhaOwOHPqqMftZTFNPXR3X5X AliVbLEIPgEfDk1Lb1j5TX//14ysYc4lKSqEk+pzfpKNLxehD9MYQh7qy7UAUJXC3T8D 8bYhEDuKhfjfMhoZLWOxonFLVeYcSknBN0juIbJZTK/M2QIpTgvxmC6inRLLcWMfy1tN YdiNVvkw5ziMHTc+nRpotUMf3koKTYLIZzWnclLhEjFFYZUWT5RTt6ScWHe119GCkC5r 6lBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=qj70mfm/XI2eik8MJxqd05rLUUhSGkJVn34MF5KjdRo=; b=KPASdiw3e59cmPRavaQLrg6nSW88Z+z42FD/W+nfAxnJhmHbeFHxxvjFAWR9ZNt3Ge cia13OMHlWzYW8Kj21X0QWKn+EGyaAWPT4Y181a93lic+KBzUgn6Ppex41Mf5J291aR6 ItNganpycxvejJE4TvgTEn8s8+pRNbhqQ1AWTxtkloFeX5IbwISL7a0vok/9v/4AuwPl jPx4wBE3ZuzE6kKFOHJpmt+Nf2kRKVUT2kn4S0XeEryZ1HvINdgnKghngK/XgWbemKQ2 S9pgJAOyeSj/CsFQ5l+cD6GnKqbb3aclEPsEQSaG2TVy2uMTN5gObf/3bw/x9jMQYjNT N0qg== X-Gm-Message-State: AOAM531Q4NMjkFJO8gM3/vJqqViwexW5i0Dyg+O9MowQiat1LaWW77LJ Qm/3Ze8idJKifm/bDhlFRFV30l+G0j3dEms6plVwI16TTaI= X-Google-Smtp-Source: ABdhPJxavGXTuwGjXNJqr3JUYqTXyWfMmp0CUOn54Yzr7PkaPMJ6NgCGR6i50Orc/WJ/B95+V/RQ8Jjwua3eXT/++Ak= X-Received: by 2002:a02:cd33:: with SMTP id h19mr10482270jaq.88.1615831264756; Mon, 15 Mar 2021 11:01:04 -0700 (PDT) MIME-Version: 1.0 References: <29235.1615763811371292564@lists.yoctoproject.org> In-Reply-To: From: "Zoran" Date: Mon, 15 Mar 2021 19:00:52 +0100 Message-ID: Subject: Re: [yocto] How can I create a truly minimal distribution that runs entirely from RAM? To: Ross Burton , Yocto-mailing-list Content-Type: text/plain; charset="UTF-8" I can tell you... Ross! Please, focus on The Problem. Could you, please??? Since, I, an independent entity, am trying to help the people! OK? Since I do not care about political IOTG development, rather than on overall (NOT INTEL) resolution of the problem?! Do you understand the core of the problem (since I am the only one trying to help here)??? Or do I need to explain it more to (you and INTEL) the ground??? Did you contribute to the solution of the problem??? Or you need salt and pepper from me? Do you get it??? Thank you for understanding, Zoran Stojsavljevic _______ From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-io1-f53.google.com (mail-io1-f53.google.com [209.85.166.53]) by mx.groups.io with SMTP id smtpd.web12.831.1615831854338027880 for ; Mon, 15 Mar 2021 11:10:54 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iRRaq4L0; spf=pass (domain: gmail.com, ip: 209.85.166.53, mailfrom: zoran.stojsavljevic@gmail.com) Received: by mail-io1-f53.google.com with SMTP id m7so15344779iow.7 for ; Mon, 15 Mar 2021 11:10:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=SrQ4fjieBDmZHERM33nC40xJzvqS7P37YaVeNSCI8XU=; b=iRRaq4L0y707SwyNAg5ZLmW61OKsPgDgGWckpRoKTSZWxePv1O0wj4wt/93ykAHE4o wY6wmP8QeNjVqwzivPo/UZzb4hi6Glc+XaPo6f3r0ceCGjEsOZ9gFeSU4ytiwGJyNLrd qPKAGMKaIwOMNO1gEj9OexRtlM3lcQ1+hatbOmGSV2lf/Ba/tsl6ihxffMck506hg1pA a6wHwQmW9uLEtDQRxCL5Hf2NECza8j9/sh4KnkcR6gEUPUUewtazLWj8F30tLeAClEU6 WNJqmZeUGC6PLjzsFDdB/e/aY87jclVkDlYStz2enQnJVNIGdpdzQtcW6hxZpoQnAl59 9rYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=SrQ4fjieBDmZHERM33nC40xJzvqS7P37YaVeNSCI8XU=; b=IwN4NHCjUickUvQkCf/i4u87F476hPjl7Je4DspKJa2YrBZYGS/9NS7/0oUrsM/rhd TAwYSSU6AKjCLTYYhfLpz3Th3cX+4FNGTXId1tVgbUpAcq00jd9UErfBStxJZwVisWDm FeSXRKIOda86UtjqMz4QZyIDoAIiZICbrqL+dOrhPk7btoiTBI58RWwJ9JVbtYrqe9JS 7gT1VQRSfm/0IfGR6wbk7ULsro3qDNCPc/KlCrQAerzFShkCunsaNZroIEIUGZsDU1kX NxMZLcVvCSvKcHoNaz4nhnFUOEGx/kpbPP6wgUr9rCGuX2rN2LcLXj8hwANN6iiK+g91 6pjg== X-Gm-Message-State: AOAM533e3IaJUu0bLD+3zg+Fd8u2xz4gtC7QJOGtVguZ6AFEDh4WeknX ccr8FVFhcd8g6YYK2QkVquUJCip5W635T63Hy2Y= X-Google-Smtp-Source: ABdhPJxrRLAJa9oU4Cw4b4AeNlVf6qk1sIDb6ZQnj+FlD9k7QO5GBFMR1UItIpzbrQDOFpQeXojhPQNVu5WP6R2TNpc= X-Received: by 2002:a05:6602:2156:: with SMTP id y22mr637381ioy.10.1615831853507; Mon, 15 Mar 2021 11:10:53 -0700 (PDT) MIME-Version: 1.0 References: <29235.1615763811371292564@lists.yoctoproject.org> In-Reply-To: From: "Zoran" Date: Mon, 15 Mar 2021 19:10:42 +0100 Message-ID: Subject: Re: [yocto] How can I create a truly minimal distribution that runs entirely from RAM? To: Nicolas Dechesne Cc: p32@tuta.io, Yocto-mailing-list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > Please be aware that this is a community mailing list for the Yocto > Project, and we expect everyone to be as pleasant as possible > I don't think the tone of your last email is appropriate for our > mailing lists. Unfortunately, Nicolas, you are barking under the wrong tree. Please, go to Ross Burton, bark there, and align the (?) views (nothing ag= ainst your attack against me). Thank you, Zoran Stojsavljevic _______ On Mon, Mar 15, 2021 at 6:21 PM Nicolas Dechesne wrote: > > hey Zoran, > > > On Mon, Mar 15, 2021 at 5:01 PM Zoran wr= ote: > > > > > How can I instruct Yocto to execute do_image_cpio first? > > > > YOCTO people are entitled to answer that question. Aren't ya, INTEL fo= lks??? > > > > Actually, iNTEL (IOTG) is responsible for that (since YOCTO support is > > 90% from INTEL), and I assume INTEL YOCTO people are entitled > > answering that/// > > Please be aware that this is a community mailing list for the Yocto > Project, and we expect everyone to be as pleasant as possible. I don't > think the tone of your last email is appropriate for our mailing > lists. Please refrain yourself from such claims, or we will need to > use moderation. Let's make sure our discussions are about technical > content and in case of any doubt, please refer to our CoC, at > https://www.yoctoproject.org/community/code-of-conduct/. > > > > > > > Thank you, > > Zee (Zoran) > > _______ > > > > On Mon, Mar 15, 2021 at 12:17 AM p32 via lists.yoctoproject.org > > wrote: > > > > > > Thank you very much. I figured out that you can have Yocto create a = suitable U-Boot wrapper as follows (from the image recipe): > > > IMAGE_FSTYPES =3D "cpio.xz.u-boot" > > > > > > Now there is only one last issue that I wasn't able to solve yet: I = would like Yocto to not only generate this U-Boot file but also add it to t= he boot partition of a wic.gz image. I tried to extend the image recipe as = follows: > > > IMAGE_FSTYPES =3D "cpio.xz.u-boot wic.gz" > > > IMAGE_BOOT_FILES_append +=3D "${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio= .xz.u-boot" > > > > > > Unfortunately, there is a dependency issue here. BitBake schedules t= he do_image_wic task before the do_image_cpio task, which creates the u-boo= t file. I tried to fix it as follows (from the image recipe): > > > do_image_wic[depends] =3D "my-image-recipe:do_image_cpio" > > > > > > While the dependency graph acknowledges this dependency, BitBake doe= s not seem to care about it. Whatever I try, do_image_wic is always execute= d first and, obviously, does not succeed. I think the problem is comparable= to the unsolved one outlined here: > > > https://stackoverflow.com/questions/58954170/yocto-creating-a-depend= ency-for-wic-to-cpio-gz-image > > > > > > How can I instruct Yocto to execute do_image_cpio first? > > > > > > > > > > > > >=20 > > From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by mx.groups.io with SMTP id smtpd.web11.193.1615838335665951241 for ; Mon, 15 Mar 2021 12:58:56 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=S3OO/xjS; spf=pass (domain: linuxfoundation.org, ip: 209.85.221.52, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wr1-f52.google.com with SMTP id u16so9322397wrt.1 for ; Mon, 15 Mar 2021 12:58:55 -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=h0l0XUDEoMqKZyCvUimT37Q2to3A28FL/JspJDyEYT0=; b=S3OO/xjSIlLL1NkmNdeluLZTULX+un5F8n89v8N2TFt25T+IvS3O0KSMA841fa9DuP 3zisGKYusvdfe8hxefkghUsUHkfljMfCdeao5FcmW6ltCJnOrOVcDYNu+uuICqMwdut7 UJFvNef5ybPsde0+huZbRJC70hPA/d3RRbf+w= 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=h0l0XUDEoMqKZyCvUimT37Q2to3A28FL/JspJDyEYT0=; b=MqS/IUwttwUNrNoujm+DRVLtRhC+8bVnW+veeGTx8/LWYbvN77uBcPNaurnPILZV4b go7swv0ieWKla8eXZ5nY4rl4pJViGSBVfa/pBN0f9QS3ZaUL5M7kPgQt0M95pBpeygNf lspIO/s9FQdh5jIJyrWCLo8w5TudCzEAHDvxjpbvc+NYQwIyZlJrscDOS8Kl5rIZgtGg ZTHRLpoWKXefgQQ6D4CaXAQohCo9gFSZS31rR90M9j1j1OwFkU4iQLd4KnhQQlCQK4/W QXwhDOrvxlqdxZMygxXOQPYVERZuWNzb8IHIWCuxZmS4JxJR+HfhjkxWBRWWizfnwZCA axRg== X-Gm-Message-State: AOAM5316GLqYcWxrY+I/8v/tggOqQ9z6yp7PWekOy1MfRewOx3BogcuF VnWJXwvF+wCR4FLf5wMEi5MItQ== X-Google-Smtp-Source: ABdhPJxwqDUcd8S7mflHRgHPXzP9c6Jp9nMFcVElK1eM++MiilQa5Kb/DBAX174X8ADNWn2jmTZd8A== X-Received: by 2002:a05:6000:11cd:: with SMTP id i13mr1207460wrx.417.1615838334055; Mon, 15 Mar 2021 12:58:54 -0700 (PDT) Return-Path: Received: from ?IPv6:2001:8b0:aba:5f3c:1452:a8a7:f5e8:db32? ([2001:8b0:aba:5f3c:1452:a8a7:f5e8:db32]) by smtp.gmail.com with ESMTPSA id b17sm19607342wrt.17.2021.03.15.12.58.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Mar 2021 12:58:53 -0700 (PDT) Message-ID: <42212f2bddd7a0d18b408694e6f582762a109496.camel@linuxfoundation.org> Subject: Re: [yocto] How can I create a truly minimal distribution that runs entirely from RAM? From: "Richard Purdie" To: Zoran , p32@tuta.io Cc: Yocto-mailing-list Date: Mon, 15 Mar 2021 19:58:52 +0000 In-Reply-To: References: <29235.1615763811371292564@lists.yoctoproject.org> User-Agent: Evolution 3.39.2-1 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit On Mon, 2021-03-15 at 17:01 +0100, Zoran wrote: > > How can I instruct Yocto to execute do_image_cpio first? > > YOCTO people are entitled to answer that question. Aren't ya, INTEL folks??? > > Actually, iNTEL (IOTG) is responsible for that (since YOCTO support is > 90% from INTEL), and I assume INTEL YOCTO people are entitled > answering that/// For the record and for the alleviation of any doubt, Intel was one of  a group of founders of the project and continues to be a valued  contributor but has never been 90% of the project. Intel has reduced its involvement more recently both in Yocto Project and in other open source efforts as it's focus has changed over time. Many of the people who did work for Intel and contributed to the project now work for different organisations but still contribute, Ross and myself included. I'd *strongly* suggest sticking to technical discussion rather than directing comments at any specific company in future. Your comments are confusing and off putting for people. Cheers, Richard From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f52.google.com (mail-ot1-f52.google.com [209.85.210.52]) by mx.groups.io with SMTP id smtpd.web11.206.1615838398669855238 for ; Mon, 15 Mar 2021 12:59:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LEULkQzs; spf=pass (domain: gmail.com, ip: 209.85.210.52, mailfrom: jpewhacker@gmail.com) Received: by mail-ot1-f52.google.com with SMTP id x28so7573456otr.6 for ; Mon, 15 Mar 2021 12:59:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=/ed0cJPFp9vuQkj+rLFnXMqWWkP2W1OI1kG9zF5Hzh4=; b=LEULkQzs7M0+FnNOcxHEKDObW0zNhKGlor6SngLIfjAx8fHOheOJvjWkb08SAuTwK3 Dr9FIgoJfMDW3TalZYR424D8ooP2IffdSAAPT05c/AYp+wBEbIM41FYJ9VvyZfD9Zd1R vbhhVUL3sambCPVueLATWGF4waRREFMyNIZxdahYzA/FHwwkHme6+0vuIUCMqvIiAs6I 9BKU6WNNsqaxD5pRVI8ryCBIZdbjPGTjpXd8inOkQZeTENcnEfeBHJhVsv04A7fjqqzZ nBxbJk5i4xLNyJVKz7be3vzcCdPp5LOT4sjmiomzyWXupBaCgq0M2r2X3SDr/mU4myis d+DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=/ed0cJPFp9vuQkj+rLFnXMqWWkP2W1OI1kG9zF5Hzh4=; b=EyHD0+J8F3f62vt7/TIcgFnzIQfWjqoerkuA43B47oDb+7DGivwYOGhuL7yNZyHYJr aTMI0a9ZSQeye1AlHJVbQ6heOedMRj37EWp3UvV8JlTil80A0ON/fyA+IzN3w43GIMgL qIbUZ6zhuJDJVzevaozDQVVNM2HyoIex/SicDeeTtMBOgU2wGTjCJIeXvIQ9eIJO2jcw d4b/CNMGgUUUNujJ0vfIV0YkVVGNUXzu75k3kNiKWdIj/FB0Ma2twYaBlZXKzCAS496b oqwezHGjNQb+2ghiF9GBkzfoXEL34qqOlJFGXvZ/pLIEFuWliZTlbLql7AdA08Tru+WL wtDQ== X-Gm-Message-State: AOAM532+Ze0fKbiU8nUYyzN292v9qgVcS+F2or7uauFSXCU7RdCBHuwJ OiCc9hWd4SHMTxro8rDw4Bbr9LTfCpc= X-Google-Smtp-Source: ABdhPJxHtNm78tgXf37qQ+7DNi7G5luzdwchmm87V8r5nlTUlBCX2HOcw9UthMiNhKkPGFQGEd27zw== X-Received: by 2002:a9d:65cf:: with SMTP id z15mr603700oth.310.1615838397704; Mon, 15 Mar 2021 12:59:57 -0700 (PDT) Return-Path: Received: from ?IPv6:2605:a601:ac3d:c100:e3e8:d9:3a56:e27d? ([2605:a601:ac3d:c100:e3e8:d9:3a56:e27d]) by smtp.gmail.com with ESMTPSA id i11sm6977196otp.76.2021.03.15.12.59.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 Mar 2021 12:59:57 -0700 (PDT) From: "Joshua Watt" X-Google-Original-From: Joshua Watt Subject: Re: [yocto] How can I create a truly minimal distribution that runs entirely from RAM? To: p32@tuta.io, yocto@lists.yoctoproject.org References: <29235.1615763811371292564@lists.yoctoproject.org> Message-ID: Date: Mon, 15 Mar 2021 14:59:56 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <29235.1615763811371292564@lists.yoctoproject.org> Content-Type: multipart/alternative; boundary="------------7849A9BCFF24CAE51EBDCEEF" Content-Language: en-US --------------7849A9BCFF24CAE51EBDCEEF Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 3/14/21 6:16 PM, p32 via lists.yoctoproject.org wrote: > Thank you very much. I figured out that you can have Yocto create a > suitable U-Boot wrapper as follows (from the image recipe): > IMAGE_FSTYPES = "cpio.xz.u-boot" > > Now there is only one last issue that I wasn't able to solve yet: I > would like Yocto to not only generate this U-Boot file but also add it > to the boot partition of a wic.gz image. I tried to extend the image > recipe as follows: > IMAGE_FSTYPES = "cpio.xz.u-boot wic.gz" > IMAGE_BOOT_FILES_append += > "${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio.xz.u-boot" > > Unfortunately, there is a dependency issue here. BitBake schedules the > do_image_wic task before the do_image_cpio task, which creates the > u-boot file. I tried to fix it as follows (from the image recipe): > do_image_wic[depends] = "my-image-recipe:do_image_cpio" > > While the dependency graph acknowledges this dependency, BitBake does > not seem to care about it. Whatever I try, do_image_wic is always > executed first and, obviously, does not succeed. I think the problem > is comparable to the unsolved one outlined here: > https://stackoverflow.com/questions/58954170/yocto-creating-a-dependency-for-wic-to-cpio-gz-image > > How can I instruct Yocto to execute do_image_cpio first? You might try splitting it up with two images; one that makes your CPIO and one that makes the wic image. Since the wic image (presumably?) doesn't even have the rootfs specified, it probably doesn't even matter what the image is (e.g. you could use core-image-minimal as a test, or try to make some even slimmer empty image). I think by doing that you could do something like:  IMAGE_BOOT_FILES += "my-cpio-image.cpio.xz.u-boot"  IMAGE_FILE_DEPENDS += "my-cpio-image" Then:  bitbake core-image-minimal Would sort of do what you are asking I think they key is that you need a "root file system image" that is *not* your CPIO because wic expects to be tied to one that it can write to the .wic image, even if thats not actually what you are doing. > > > --------------7849A9BCFF24CAE51EBDCEEF Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit


On 3/14/21 6:16 PM, p32 via lists.yoctoproject.org wrote:
Thank you very much. I figured out that you can have Yocto create a suitable U-Boot wrapper as follows (from the image recipe):
IMAGE_FSTYPES = "cpio.xz.u-boot"

Now there is only one last issue that I wasn't able to solve yet: I would like Yocto to not only generate this U-Boot file but also add it to the boot partition of a wic.gz image. I tried to extend the image recipe as follows:
IMAGE_FSTYPES = "cpio.xz.u-boot wic.gz"
IMAGE_BOOT_FILES_append += "${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio.xz.u-boot"

Unfortunately, there is a dependency issue here. BitBake schedules the do_image_wic task before the do_image_cpio task, which creates the u-boot file. I tried to fix it as follows (from the image recipe):
do_image_wic[depends] = "my-image-recipe:do_image_cpio"

While the dependency graph acknowledges this dependency, BitBake does not seem to care about it. Whatever I try, do_image_wic is always executed first and, obviously, does not succeed. I think the problem is comparable to the unsolved one outlined here:
https://stackoverflow.com/questions/58954170/yocto-creating-a-dependency-for-wic-to-cpio-gz-image

How can I instruct Yocto to execute do_image_cpio first?

You might try splitting it up with two images; one that makes your CPIO and one that makes the wic image. Since the wic image (presumably?) doesn't even have the rootfs specified, it probably doesn't even matter what the image is (e.g. you could use core-image-minimal as a test, or try to make some even slimmer empty image).

I think by doing that you could do something like:

 IMAGE_BOOT_FILES += "my-cpio-image.cpio.xz.u-boot"

 IMAGE_FILE_DEPENDS += "my-cpio-image"

Then:

 bitbake core-image-minimal

Would sort of do what you are asking

I think they key is that you need a "root file system image" that is *not* your CPIO because wic expects to be tied to one that it can write to the .wic image, even if thats not actually what you are doing.




--------------7849A9BCFF24CAE51EBDCEEF--