All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zoran" <zoran.stojsavljevic@gmail.com>
To: p32@tuta.io
Cc: Yocto-mailing-list <yocto@lists.yoctoproject.org>
Subject: Re: [yocto] How can I create a truly minimal distribution that runs entirely from RAM?
Date: Sat, 13 Mar 2021 08:28:49 +0100	[thread overview]
Message-ID: <CAGAf8LyKF9dAcPc9VVBTNcurVzNp3wgmgfVgDhMdK35fHtn_hw@mail.gmail.com> (raw)
In-Reply-To: <29498.1615585760727204439@lists.yoctoproject.org>

> 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/<board.h> file, introducing
the following:

          #ifdef CONFIG_SUPPORT_INITRAMFS_BOOT
          #define INITRAMFS_ENV \
                  <place here modified by you initramfs ash script>
          #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
<p32=tuta.io@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?
>
>
> 
>

  reply	other threads:[~2021-03-13  7:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-10 23:32 How can I create a truly minimal distribution that runs entirely from RAM? p32
2021-03-11  5:03 ` [yocto] " Zoran
2021-03-12 21:49   ` p32
2021-03-13  7:28     ` Zoran [this message]
2021-03-14 23:16       ` p32
2021-03-15 16:01         ` [yocto] " Zoran
2021-03-15 17:21           ` Nicolas Dechesne
2021-03-15 18:10             ` Zoran
     [not found]           ` <CAAnfSTv6a9qUZi6-o2r-t1ucNAnn52HcAsNKbpfMz9vUez01sQ@mail.gmail.com>
2021-03-15 18:00             ` Zoran
2021-03-15 19:58           ` Richard Purdie
2021-03-15 19:59         ` Joshua Watt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGAf8LyKF9dAcPc9VVBTNcurVzNp3wgmgfVgDhMdK35fHtn_hw@mail.gmail.com \
    --to=zoran.stojsavljevic@gmail.com \
    --cc=p32@tuta.io \
    --cc=yocto@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.