All of lore.kernel.org
 help / color / mirror / Atom feed
* Stuck to build zImage-initramfs
@ 2019-07-08 21:34 JH
  2019-07-09  9:55 ` Zoran Stojsavljevic
  0 siblings, 1 reply; 5+ messages in thread
From: JH @ 2019-07-08 21:34 UTC (permalink / raw)
  To: Yocto discussion list

Hi,

I have been stuck to build zImage-initramfs for weeks. I've read Yocto
latest document, but still failed to generate the initarmfs to run on
RAM. I added following statements in local.conf:

UBOOT_CONFIG = "ram"
INITRAMFS_IMAGE_BUNDLE = "1"
DISTRO_FEATURES_append = " ram"
IMAGE_FSTYPES_append = " cpio.xz"

It built to following images:

dev-image.rootfs.cpio.xz
u-boot.imx-ram
zImage.bin

If I extract the dev-image.rootfs.cpio.xz, it contains zImage at boot directory.

What I need is the zImage-initramfs to contain the rootfs in initramfs format.

I see there is document ramfs-rootfs-initramfs.txt, but it did not
mention how to generate zImage-initramfs.

There is core-image-minimal-initramfs.bb, but it cannot be run:

$ MACHINE="imx6evk" DISTRO="imx6evk" bitbake core-image-minimal-initramfs
ERROR: Nothing PROVIDES 'core-image-minimal-initramfs'
core-image-minimal-initramfs was skipped: incompatible with host
arm-oe-linux-gnueabi (not in COMPATIBLE_HOST)

Could any one help what I am missing here and how to build the zImage-initramfs?

Thank you.

Kind regards,

- jh


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Stuck to build zImage-initramfs
  2019-07-08 21:34 Stuck to build zImage-initramfs JH
@ 2019-07-09  9:55 ` Zoran Stojsavljevic
  2019-07-09 11:47   ` JH
  0 siblings, 1 reply; 5+ messages in thread
From: Zoran Stojsavljevic @ 2019-07-09  9:55 UTC (permalink / raw)
  To: JH; +Cc: Yocto discussion list

Please, read the following thread:
https://lists.yoctoproject.org/pipermail/yocto/2018-July/041680.html

Zoran
_______

On Mon, Jul 8, 2019 at 11:43 PM JH <jupiter.hce@gmail.com> wrote:
>
> Hi,
>
> I have been stuck to build zImage-initramfs for weeks. I've read Yocto
> latest document, but still failed to generate the initarmfs to run on
> RAM. I added following statements in local.conf:
>
> UBOOT_CONFIG = "ram"
> INITRAMFS_IMAGE_BUNDLE = "1"
> DISTRO_FEATURES_append = " ram"
> IMAGE_FSTYPES_append = " cpio.xz"
>
> It built to following images:
>
> dev-image.rootfs.cpio.xz
> u-boot.imx-ram
> zImage.bin
>
> If I extract the dev-image.rootfs.cpio.xz, it contains zImage at boot directory.
>
> What I need is the zImage-initramfs to contain the rootfs in initramfs format.
>
> I see there is document ramfs-rootfs-initramfs.txt, but it did not
> mention how to generate zImage-initramfs.
>
> There is core-image-minimal-initramfs.bb, but it cannot be run:
>
> $ MACHINE="imx6evk" DISTRO="imx6evk" bitbake core-image-minimal-initramfs
> ERROR: Nothing PROVIDES 'core-image-minimal-initramfs'
> core-image-minimal-initramfs was skipped: incompatible with host
> arm-oe-linux-gnueabi (not in COMPATIBLE_HOST)
>
> Could any one help what I am missing here and how to build the zImage-initramfs?
>
> Thank you.
>
> Kind regards,
>
> - jh
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Stuck to build zImage-initramfs
  2019-07-09  9:55 ` Zoran Stojsavljevic
@ 2019-07-09 11:47   ` JH
  2019-07-09 13:31     ` Zoran Stojsavljevic
  0 siblings, 1 reply; 5+ messages in thread
From: JH @ 2019-07-09 11:47 UTC (permalink / raw)
  To: Zoran Stojsavljevic; +Cc: Yocto discussion list

Thanks Zoran, I did see that link and your post to run mkimage. Did
you get zImage-initramfs? I have to admit, I lost in that long email
discussion with different approaches, I tried all set up, but there is
no zImage-initramfs to be generated, files built in deploy/images just
could not be used to run uuu on imx6 RAM.

There is post for add KERNEL_INITRAMFS = "-initramfs", it looks like
very close to generate zImage-initramfs, but I could still not get it
:-(.

Thank you very much.

On 7/9/19, Zoran Stojsavljevic <zoran.stojsavljevic@gmail.com> wrote:
> Please, read the following thread:
> https://lists.yoctoproject.org/pipermail/yocto/2018-July/041680.html
>
> Zoran
> _______
>
> On Mon, Jul 8, 2019 at 11:43 PM JH <jupiter.hce@gmail.com> wrote:
>>
>> Hi,
>>
>> I have been stuck to build zImage-initramfs for weeks. I've read Yocto
>> latest document, but still failed to generate the initarmfs to run on
>> RAM. I added following statements in local.conf:
>>
>> UBOOT_CONFIG = "ram"
>> INITRAMFS_IMAGE_BUNDLE = "1"
>> DISTRO_FEATURES_append = " ram"
>> IMAGE_FSTYPES_append = " cpio.xz"
>>
>> It built to following images:
>>
>> dev-image.rootfs.cpio.xz
>> u-boot.imx-ram
>> zImage.bin
>>
>> If I extract the dev-image.rootfs.cpio.xz, it contains zImage at boot
>> directory.
>>
>> What I need is the zImage-initramfs to contain the rootfs in initramfs
>> format.
>>
>> I see there is document ramfs-rootfs-initramfs.txt, but it did not
>> mention how to generate zImage-initramfs.
>>
>> There is core-image-minimal-initramfs.bb, but it cannot be run:
>>
>> $ MACHINE="imx6evk" DISTRO="imx6evk" bitbake core-image-minimal-initramfs
>> ERROR: Nothing PROVIDES 'core-image-minimal-initramfs'
>> core-image-minimal-initramfs was skipped: incompatible with host
>> arm-oe-linux-gnueabi (not in COMPATIBLE_HOST)
>>
>> Could any one help what I am missing here and how to build the
>> zImage-initramfs?
>>
>> Thank you.
>>
>> Kind regards,
>>
>> - jh
>> --
>> _______________________________________________
>> yocto mailing list
>> yocto@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Stuck to build zImage-initramfs
  2019-07-09 11:47   ` JH
@ 2019-07-09 13:31     ` Zoran Stojsavljevic
  2019-07-09 22:01       ` JH
  0 siblings, 1 reply; 5+ messages in thread
From: Zoran Stojsavljevic @ 2019-07-09 13:31 UTC (permalink / raw)
  To: JH; +Cc: Yocto discussion list

Jupiter,

I never read carefully the whole mechanism how to bundle kernel with
initramfs in YOCTO.

I have there a description how to organize kernel image WITHOUT
initramfs (only kernel image by itself) and separately initramfs as
final stage, so I can do the tests with Lava, but I developed another
meanings with such a configuration: some another way of testing
various proofs of concepts.

What you are asking is a classical approach: kernel bundled with
initramfs, which is called Dracut phase, before mounting HDD/SSD
permanent rootfs... It is non-trivial process, controlled by various
kernel scripts.

I also need to analyse this @ thread regarding what you have asked
for... Maybe this is good time do to such a analysis! If?

Zoran
_______

On Tue, Jul 9, 2019 at 1:47 PM JH <jupiter.hce@gmail.com> wrote:
>
> Thanks Zoran, I did see that link and your post to run mkimage. Did
> you get zImage-initramfs? I have to admit, I lost in that long email
> discussion with different approaches, I tried all set up, but there is
> no zImage-initramfs to be generated, files built in deploy/images just
> could not be used to run uuu on imx6 RAM.
>
> There is post for add KERNEL_INITRAMFS = "-initramfs", it looks like
> very close to generate zImage-initramfs, but I could still not get it
> :-(.
>
> Thank you very much.
>
> On 7/9/19, Zoran Stojsavljevic <zoran.stojsavljevic@gmail.com> wrote:
> > Please, read the following thread:
> > https://lists.yoctoproject.org/pipermail/yocto/2018-July/041680.html
> >
> > Zoran
> > _______
> >
> > On Mon, Jul 8, 2019 at 11:43 PM JH <jupiter.hce@gmail.com> wrote:
> >>
> >> Hi,
> >>
> >> I have been stuck to build zImage-initramfs for weeks. I've read Yocto
> >> latest document, but still failed to generate the initarmfs to run on
> >> RAM. I added following statements in local.conf:
> >>
> >> UBOOT_CONFIG = "ram"
> >> INITRAMFS_IMAGE_BUNDLE = "1"
> >> DISTRO_FEATURES_append = " ram"
> >> IMAGE_FSTYPES_append = " cpio.xz"
> >>
> >> It built to following images:
> >>
> >> dev-image.rootfs.cpio.xz
> >> u-boot.imx-ram
> >> zImage.bin
> >>
> >> If I extract the dev-image.rootfs.cpio.xz, it contains zImage at boot
> >> directory.
> >>
> >> What I need is the zImage-initramfs to contain the rootfs in initramfs
> >> format.
> >>
> >> I see there is document ramfs-rootfs-initramfs.txt, but it did not
> >> mention how to generate zImage-initramfs.
> >>
> >> There is core-image-minimal-initramfs.bb, but it cannot be run:
> >>
> >> $ MACHINE="imx6evk" DISTRO="imx6evk" bitbake core-image-minimal-initramfs
> >> ERROR: Nothing PROVIDES 'core-image-minimal-initramfs'
> >> core-image-minimal-initramfs was skipped: incompatible with host
> >> arm-oe-linux-gnueabi (not in COMPATIBLE_HOST)
> >>
> >> Could any one help what I am missing here and how to build the
> >> zImage-initramfs?
> >>
> >> Thank you.
> >>
> >> Kind regards,
> >>
> >> - jh
> >> --
> >> _______________________________________________
> >> yocto mailing list
> >> yocto@yoctoproject.org
> >> https://lists.yoctoproject.org/listinfo/yocto
> >


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Stuck to build zImage-initramfs
  2019-07-09 13:31     ` Zoran Stojsavljevic
@ 2019-07-09 22:01       ` JH
  0 siblings, 0 replies; 5+ messages in thread
From: JH @ 2019-07-09 22:01 UTC (permalink / raw)
  To: Zoran Stojsavljevic; +Cc: Yocto discussion list

Hi Zoran,

On 7/9/19, Zoran Stojsavljevic <zoran.stojsavljevic@gmail.com> wrote:
> Jupiter,
>
> I never read carefully the whole mechanism how to bundle kernel with
> initramfs in YOCTO.

Given Yocto reach features and powerful capacities, I would thought
there must be some simple mechanism to bundle the kernel with
initramfs which is an essential Linux feature, I would be surprised if
Yocto doesn't have that simple solution.

> I have there a description how to organize kernel image WITHOUT
> initramfs (only kernel image by itself) and separately initramfs as
> final stage, so I can do the tests with Lava, but I developed another
> meanings with such a configuration: some another way of testing
> various proofs of concepts.

Ideally, it should all be done in Yocto without separate external manual steps.

> What you are asking is a classical approach: kernel bundled with
> initramfs, which is called Dracut phase, before mounting HDD/SSD
> permanent rootfs... It is non-trivial process, controlled by various
> kernel scripts.

The popularity of initramfs will be beyond traditional PC world, Cloud
and HPC have already use it to boot in virtual computing. For embedded
system, it might not be the only way, but I am using it to burn imx6
nand.

> I also need to analyse this @ thread regarding what you have asked
> for... Maybe this is good time do to such a analysis! If?

I am keen to involve as well. Here is what I have a zImage-initrafs
built from OpenWrt:

$ file zImage-initrafs
zImage-initramfs: Linux kernel ARM boot executable zImage (little-endian)

It can be downloaded to imx6 to burn imx6 nand. I have my zImage built
from Yocto which failed to start rootfs (apparently not bundle the
rootfs well), I am still debugging it, will post more information if
you are interested.

Thank you.

- jupiter

> Zoran
> _______
>
> On Tue, Jul 9, 2019 at 1:47 PM JH <jupiter.hce@gmail.com> wrote:
>>
>> Thanks Zoran, I did see that link and your post to run mkimage. Did
>> you get zImage-initramfs? I have to admit, I lost in that long email
>> discussion with different approaches, I tried all set up, but there is
>> no zImage-initramfs to be generated, files built in deploy/images just
>> could not be used to run uuu on imx6 RAM.
>>
>> There is post for add KERNEL_INITRAMFS = "-initramfs", it looks like
>> very close to generate zImage-initramfs, but I could still not get it
>> :-(.
>>
>> Thank you very much.
>>
>> On 7/9/19, Zoran Stojsavljevic <zoran.stojsavljevic@gmail.com> wrote:
>> > Please, read the following thread:
>> > https://lists.yoctoproject.org/pipermail/yocto/2018-July/041680.html
>> >
>> > Zoran
>> > _______
>> >
>> > On Mon, Jul 8, 2019 at 11:43 PM JH <jupiter.hce@gmail.com> wrote:
>> >>
>> >> Hi,
>> >>
>> >> I have been stuck to build zImage-initramfs for weeks. I've read Yocto
>> >> latest document, but still failed to generate the initarmfs to run on
>> >> RAM. I added following statements in local.conf:
>> >>
>> >> UBOOT_CONFIG = "ram"
>> >> INITRAMFS_IMAGE_BUNDLE = "1"
>> >> DISTRO_FEATURES_append = " ram"
>> >> IMAGE_FSTYPES_append = " cpio.xz"
>> >>
>> >> It built to following images:
>> >>
>> >> dev-image.rootfs.cpio.xz
>> >> u-boot.imx-ram
>> >> zImage.bin
>> >>
>> >> If I extract the dev-image.rootfs.cpio.xz, it contains zImage at boot
>> >> directory.
>> >>
>> >> What I need is the zImage-initramfs to contain the rootfs in initramfs
>> >> format.
>> >>
>> >> I see there is document ramfs-rootfs-initramfs.txt, but it did not
>> >> mention how to generate zImage-initramfs.
>> >>
>> >> There is core-image-minimal-initramfs.bb, but it cannot be run:
>> >>
>> >> $ MACHINE="imx6evk" DISTRO="imx6evk" bitbake
>> >> core-image-minimal-initramfs
>> >> ERROR: Nothing PROVIDES 'core-image-minimal-initramfs'
>> >> core-image-minimal-initramfs was skipped: incompatible with host
>> >> arm-oe-linux-gnueabi (not in COMPATIBLE_HOST)
>> >>
>> >> Could any one help what I am missing here and how to build the
>> >> zImage-initramfs?
>> >>
>> >> Thank you.
>> >>
>> >> Kind regards,
>> >>
>> >> - jh
>> >> --
>> >> _______________________________________________
>> >> yocto mailing list
>> >> yocto@yoctoproject.org
>> >> https://lists.yoctoproject.org/listinfo/yocto
>> >
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-07-09 22:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-08 21:34 Stuck to build zImage-initramfs JH
2019-07-09  9:55 ` Zoran Stojsavljevic
2019-07-09 11:47   ` JH
2019-07-09 13:31     ` Zoran Stojsavljevic
2019-07-09 22:01       ` JH

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.