Hi Mark, and also Khem (sorry for the miss-spelling of your name),

> -----Original Message-----
> From: [email protected] <[email protected]> On
> Behalf Of Mark Asselstine
> Sent: Thursday, January 23, 2020 11:37 AM
> To: [email protected]; Greg Wilson-Lindberg
> <[email protected]>
> Cc: Khem Raj <[email protected]>; Yocto list discussion
> <[email protected]>
> Subject: Re: [yocto] generate initramfs for raspberry pi
> 
> On Thursday, January 23, 2020 2:24:27 P.M. EST Khem Raj wrote:
> > On Thu, Jan 23, 2020 at 11:16 AM Greg Wilson-Lindberg
> >
> > <[email protected]> wrote:
> > > Hi Kem,
> > > I had figured out your suggestions, my problem is how do I generate
> > > the "<your-image>" image in:
> > >
> > > INITRAMFS_IMAGE_rpi = "<your-image>"
> > >
> > > I need a recipe for the image and a way to get Yocto to build it
> > > when I build the rest of my image. Maybe specifying the name will
> > > build it, but I still need a recipe for the image.
> > Depends what your needs are, its not clear what you want from this
> > initramfs image.
> > is it something you want to do some preboot stuff and pivot into final
> > image during boot or do you want your full userspace to be running in
> > it for second case Just use your image if you want that to be bundled
> > in and build bitbake virtual/kernel it will get you single kernel
> > image with everything in it.
> >
> > for first case. define a new image perhaps a derivative of
> > core-image-minimal and use that
> 
> There are two useful starting points,
> openembedded-core/meta/recipes-core/images/core-image-minimal-
> initramfs.bb
> openembedded-core/meta/recipes-core/images/core-image-tiny-
> initramfs.bb
> 
> Both do not have
> COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
> 
> In the end you will most likely want to customize your image as Khem says,
> so just start by copying one of these and start making adjustments.
> Alternatively you can do something like the following in your local.conf to
> overcome this:
> COMPATIBLE_HOST_pn-core-image-tiny-initramfs = "aarch64-poky-linux"

I just need something to boot into on the way to the full image. I am doing 
this as a step to bringing up OStree. So maybe setting the 'COMPATIBLE_HOST' 
and using core-image-tiny-initramfs will work.

Thanks for the suggestions. I had thought that there must be an initramfs for 
the Raspberry Pi with all of the threads about using an initramfs on the Pi, 
but I guess that there isn't a separate one.

Best Regards,
Greg

> 
> You will want to determine if this initramfs is going to pivot to the 'init'
> found in the main rootfs, or if you want to simply boot into the 'init' in the
> initramfs and remain there.
> 
> Lastly you can either keep the initramfs standalone or have the kernel
> bundle the initramfs. The latter is useful if you want/need to include
> software in the initramfs that is needed to get the disks up and running to
> then get access to the rootfs.
> 
> Take a look at
> https://www.yoctoproject.org/docs/2.6/ref-manual/ref-manual.html#var-
> INITRAMFS_FSTYPES
> https://www.yoctoproject.org/docs/2.6/ref-manual/ref-manual.html#var-
> INITRAMFS_IMAGE
> https://www.yoctoproject.org/docs/2.6/ref-manual/ref-manual.html#var-
> INITRAMFS_IMAGE_BUNDLE
> 
> MarkA
> 
> 
> >
> > > Regards,
> > > Greg
> > >
> > > -----Original Message-----
> > > From: Khem Raj <[email protected]>
> > > Sent: Thursday, January 23, 2020 10:56 AM
> > > To: Greg Wilson-Lindberg <[email protected]>
> > > Cc: Yocto list discussion <[email protected]>
> > > Subject: Re: [yocto] generate initramfs for raspberry pi
> > >
> > > On Thu, Jan 23, 2020 at 10:44 AM Greg Wilson-Lindberg
> <[email protected]> wrote:
> > > > Hello List,
> > > >
> > > > I have not been able to figure out how to generate an initramfs
> > > > image for a raspberry pi build of yocto. I’ve searched it web and
> > > > have not found anything that mentions generating the actual image,
> > > > lots of hits on how to configure using the initramfs, but not on
> > > > generating it. Is there a standard recipe for a raspberry pi
> > > > initramfs and how would I enable its generation, or maybe I’m just
> being clueless.
> > > >
> > > >
> > > >
> > > > I’m running on a boot2qt build of yocto based on Qt v5.14.0 that
> > > > uses warrior and I’m targeting an RPi 4 using u-boot.
> > > >
> > > >
> > > >
> > > > Any help would be greatly appreciated.
> > >
> > > try something like below in local.conf
> > >
> > > INITRAMFS_IMAGE_BUNDLE_rpi = "1"
> > > INITRAMFS_IMAGE_rpi = "<your-image>"
> > > # Enlarge boot partition to 1GiB
> > > BOOT_SPACE = "1073741"
> > > INITRAMFS_MAXSIZE = "315400"
> > > IMAGE_FSTYPES_pn-${INITRAMFS_IMAGE} = "${INITRAMFS_FSTYPES}"
> > >
> > > > Best regards,
> > > >
> > > > Greg Wilson-Lindberg
> 
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#48120): https://lists.yoctoproject.org/g/yocto/message/48120
Mute This Topic: https://lists.yoctoproject.org/mt/70053252/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to