All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ferry Toth <ftoth@telfort.nl>
To: yocto@yoctoproject.org
Subject: Re: struggling with initramfs
Date: Wed, 04 Jul 2018 20:57:18 +0200	[thread overview]
Message-ID: <phj56a$5q5$1@blaine.gmane.org> (raw)
In-Reply-To: CALh9vaX7aAYi59jJABfr5JXtoHXE6XVupfAwaHvRnVAAA5nDdA@mail.gmail.com

Tim Hammer wrote:

> Can anyone point me to a step-by-step tutorial or simple how-to on
> creating and using an initramfs with my kernel for ARM aarch64?
> 
> 
> I have tried creating my own:
>  - boot-image.bb file with IMAGE_FSTYPES = "cpio.gz".
>  - local.conf has INITRAMFS_IMAGE_BUNDLE = "1"
>  - linux.bbappend has INITRAMFS_IMAGE = "boot-image"
> 
> This all seems to be "correct" to the extent that bitbake linux tries to
> do the right thing.
> 
> However, I get a failure in do_bundle_initramfs- "mv: cannot stat
> 'arch/arm64/boot/Image': No such file or directory".
> 
> To the best of my (limited) debugging abilities with Yocto, it seems like
> the kernel image backup has already been run when it gets to this point
> and the Image file in that directory has already been moved to Image.bak.
> If I comment out the mv statement in kernel.bbclass causing the failure,
> the process continues, but the initramfs does not seem to get populated or
> perhaps installed into my kernel image as I get kernel panics that I have
> been unable to get past.
> 
> 
> I decided to take a different approach and try using the
> core-image-minimal-initramfs recipe as INITRAMFS_IMAGE. By commenting out
> the COMPATIBLE_HOST entry I am able to build a kernel for ARM aarch64. I
> can even seem to boot into this initramfs- it counts down waiting for
> removable media; seems to find my primary rootfs on sda3, but there is no
> rootfs.img file there so says it is dropping to a shell (although I never
> get a prompt...).

We have taken this approach here 
https://github.com/edison-fw/meta-intel-edison/tree/master/meta-intel-edison-distro/recipes-core

There are 2 images, the rootfs and the initramfs. And we overload the init-live.sh 
to load certain kernel modules and acpi-tables then switchroot to the rootfs.

> Thinking I could start with that recipe and work to get rid of the live
> stuff and just get to a busybox prompt before trying to run my unique init
> commands, I copied  core-image-minimal-initramfs.bb to my-
> core-image-minimal-initramfs.bb in my layer and changed INITRAMFS_IMAGE to
> "my- core-image-minimal-initramfs".
> However, I obviously missed something in the configuration as I get an
> error in go_bundle_initramfs again:
>      kernel-source/scripts/gen_initramfs_list.sh:
>                  Cannot open
> '/.../linux-qoriq/4.14-r0/build/usr/my-core-image-minimal-initramfs-{machine}.cpio'
> 
> Any help would be greatly appreciated.
> Thank you!




  parent reply	other threads:[~2018-07-04 18:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-03 18:02 struggling with initramfs Tim Hammer
2018-07-03 22:00 ` Prakash Ks
2018-07-03 23:33 ` Andre McCurdy
2018-07-04 18:57 ` Ferry Toth [this message]
2018-07-05  6:23   ` Zoran Stojsavljevic
2018-07-06  1:13     ` Andre McCurdy
2018-07-06  6:56       ` Zoran Stojsavljevic
2018-07-07 19:02 ` Ferry Toth

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='phj56a$5q5$1@blaine.gmane.org' \
    --to=ftoth@telfort.nl \
    --cc=yocto@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.