Re: [meta-xilinx] rootfs on ram

2019-09-17 Thread Jek F.
Thanks for your reply, i'll try this as soon as i can.

Il lun 16 set 2019, 17:37 Jean-Francois Dagenais 
ha scritto:

> Hi Jek,
>
> > On Sep 16, 2019, at 11:15, Jek F.  wrote:
> >
> > Hi everyone, i propose again the question i desccribed to you at the
> beginning of the summer because I haven't been able to solve it yet.
> > Sorry if i'm boring, but this is a very important topic to me.
> >
> >
> > I'm using a microzed, and i need to create an image that mount rootf on
> ram.
> > I tried to follow the yocto manual for initramfs (
> https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#building-an-initramfs-image),
> but at bitbake it returns this error:
> >
> > ERROR: Nothing PROVIDES 'core-image-minimal-initramfs'
> > core-image-minimal-initramfs was skipped: incompatible with host
> arm-poky-linux-gnueabi (not in COMPATIBLE_HOST)
> > core-image-minimal-initramfs was skipped: incompatible with host
> arm-poky-linux-gnueabi (not in COMPATIBLE_HOST)
> >
> > Any suggestion?
>
> Indeed, the last lines of core-image-minimal-initramfs.bb are:
> # Use the same restriction as initramfs-live-install
> COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
>
> You would need to why they put that there... My hunch is that loading an
> initrd image is very bootload specific. So you can remove them, or override
> the line with a bbappend. You will be missing some glue to make it work
> though.
>
> On zynqmp, one can use u-boot to load the initrd.
>
> I have this in my machine.conf:
> INITRAMFS_FSTYPES = "cpio.gz.u-boot"
>
>
> Then in my image classes that make the initrd rootfs, I have:
> IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
>
> (The image recipes use INITRAMFS_FSTYPES to not include knowledge of the
> bootloader/machine underneath. This is just good practice, so you can do
> whatever you want for your recipes.)
>
> But then this will make the .cpio.gz.u-boot file. If you want an image
> which you can dd on, say, an SD card, you need another image for this, one
> which doesn't really make a rootfs, a relevant one anyway, but is bundled
> in the end with the WIC framework with the initrd.cpio.gz.u-boot file
> included. Your WKS file can just mention the boot part, no second rootfs.
>
> I have this in my other image:
> INITRD_IMAGE = "the-initrd-rootfs-recipe"
> IMAGE_FSTYPES = "wic.lz4"
>
>
> Just specifying wic.lz4 is not enough, you need to specify the kickstart
> file to use:
> WKS_FILES = "my-bootonly.wks"
>
> I personally specify this to all my images by using an IMAGE_CLASSES in my
> machine.conf:
>
> IMAGE_CLASSES += "my-image-wic"
>
> This is "my-image-wic.bbclass":
>
> WKS_FILES ?= "my-bootonly.wks"
> WIC_CREATE_EXTRA_ARGS = " --no-fstab-update"
>
> do_image_wic[depends] += "\
> xilinx-bootbin:do_deploy \
> e2fsprogs-native:do_populate_sysroot \
> "
>
> python () {
> initRdImage = d.getVar("INITRD_IMAGE")
> if initRdImage:
> d.appendVarFlag("do_image_wic", "depends", " " + initRdImage +
> ":do_image_complete")
> }
>
> IMAGE_CMD_wic_append() {
> cd ${DEPLOY_DIR_IMAGE}
>
> ln -sfv ${IMAGE_LINK_NAME}.wic.lz4 ${IMAGE_LINK_NAME}.sdcard.lz4
> }
>
>
> here's my-bootonly.wks (1 line only):
> part /boot --source bootimg-partition --fstype=vfat --label boot --active
> --align 4096 --extra-space 10
>
> The "bootimg-partition" wic plugin mentioned above expects variable
> IMAGE_BOOT_FILES to be set. Usually, this is defined in the machine.conf:
> IMAGE_BOOT_FILES = "\
> BOOT-${MACHINE}.bin;boot.bin \
> Image \
> ${MACHINE}.dtb \
> uEnv.txt.example \
> ${INITRD_IMAGE}.cpio.gz.u-boot;initrd.cpio.gz.u-boot \
> "
>
> Then you need to make your u-boot configuration find a load as initrd a
> file named initrd.cpio.gz.u-boot...
>
>
> This should get you going. I may be doing way more manually than is
> required. I had developed this a while back and it's been working fine for
> us since.
>
>
> Cheers!
>
>
>
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] rootfs on ram

2019-09-16 Thread Jean-Francois Dagenais
Hi Jek,

> On Sep 16, 2019, at 11:15, Jek F.  wrote:
> 
> Hi everyone, i propose again the question i desccribed to you at the 
> beginning of the summer because I haven't been able to solve it yet.
> Sorry if i'm boring, but this is a very important topic to me.
> 
> 
> I'm using a microzed, and i need to create an image that mount rootf on ram.
> I tried to follow the yocto manual for initramfs 
> (https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#building-an-initramfs-image),
>  but at bitbake it returns this error:
> 
> ERROR: Nothing PROVIDES 'core-image-minimal-initramfs'
> core-image-minimal-initramfs was skipped: incompatible with host 
> arm-poky-linux-gnueabi (not in COMPATIBLE_HOST)
> core-image-minimal-initramfs was skipped: incompatible with host 
> arm-poky-linux-gnueabi (not in COMPATIBLE_HOST)
> 
> Any suggestion?

Indeed, the last lines of core-image-minimal-initramfs.bb are:
# Use the same restriction as initramfs-live-install
COMPATIBLE_HOST = "(i.86|x86_64).*-linux"

You would need to why they put that there... My hunch is that loading an initrd 
image is very bootload specific. So you can remove them, or override the line 
with a bbappend. You will be missing some glue to make it work though.

On zynqmp, one can use u-boot to load the initrd.

I have this in my machine.conf:
INITRAMFS_FSTYPES = "cpio.gz.u-boot"


Then in my image classes that make the initrd rootfs, I have:
IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"

(The image recipes use INITRAMFS_FSTYPES to not include knowledge of the 
bootloader/machine underneath. This is just good practice, so you can do 
whatever you want for your recipes.)

But then this will make the .cpio.gz.u-boot file. If you want an image which 
you can dd on, say, an SD card, you need another image for this, one which 
doesn't really make a rootfs, a relevant one anyway, but is bundled in the end 
with the WIC framework with the initrd.cpio.gz.u-boot file included. Your WKS 
file can just mention the boot part, no second rootfs. 

I have this in my other image:
INITRD_IMAGE = "the-initrd-rootfs-recipe"
IMAGE_FSTYPES = "wic.lz4"


Just specifying wic.lz4 is not enough, you need to specify the kickstart file 
to use:
WKS_FILES = "my-bootonly.wks"

I personally specify this to all my images by using an IMAGE_CLASSES in my 
machine.conf:

IMAGE_CLASSES += "my-image-wic"

This is "my-image-wic.bbclass":

WKS_FILES ?= "my-bootonly.wks"
WIC_CREATE_EXTRA_ARGS = " --no-fstab-update"

do_image_wic[depends] += "\
xilinx-bootbin:do_deploy \
e2fsprogs-native:do_populate_sysroot \
"

python () {
initRdImage = d.getVar("INITRD_IMAGE")
if initRdImage:
d.appendVarFlag("do_image_wic", "depends", " " + initRdImage + 
":do_image_complete")
}

IMAGE_CMD_wic_append() {
cd ${DEPLOY_DIR_IMAGE}

ln -sfv ${IMAGE_LINK_NAME}.wic.lz4 ${IMAGE_LINK_NAME}.sdcard.lz4
}


here's my-bootonly.wks (1 line only):
part /boot --source bootimg-partition --fstype=vfat --label boot --active 
--align 4096 --extra-space 10

The "bootimg-partition" wic plugin mentioned above expects variable 
IMAGE_BOOT_FILES to be set. Usually, this is defined in the machine.conf:
IMAGE_BOOT_FILES = "\
BOOT-${MACHINE}.bin;boot.bin \
Image \
${MACHINE}.dtb \
uEnv.txt.example \
${INITRD_IMAGE}.cpio.gz.u-boot;initrd.cpio.gz.u-boot \
"

Then you need to make your u-boot configuration find a load as initrd a file 
named initrd.cpio.gz.u-boot...


This should get you going. I may be doing way more manually than is required. I 
had developed this a while back and it's been working fine for us since.


Cheers!




smime.p7s
Description: S/MIME cryptographic signature
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


[meta-xilinx] rootfs on ram

2019-09-16 Thread Jek F.
Hi everyone, i propose again the question i desccribed to you at the
beginning of the summer because I haven't been able to solve it yet.
Sorry if i'm boring, but this is a very important topic to me.


I'm using a microzed, and i need to create an image that mount rootf on ram.
I tried to follow the yocto manual for initramfs (
https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#building-an-initramfs-image),
but at bitbake it returns this error:

ERROR: Nothing PROVIDES 'core-image-minimal-initramfs'
core-image-minimal-initramfs was skipped: incompatible with host
arm-poky-linux-gnueabi (not in COMPATIBLE_HOST)
core-image-minimal-initramfs was skipped: incompatible with host
arm-poky-linux-gnueabi (not in COMPATIBLE_HOST)

Any suggestion?

Tanks a lot.
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] rootfs on ram

2019-08-07 Thread Jek F.
Hi, i tried to follow the yocto manual for initramfs (
https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#building-an-initramfs-image),
but at bitbake it returns this error:

ERROR: Nothing PROVIDES 'core-image-minimal-initramfs'
core-image-minimal-initramfs was skipped: incompatible with host
arm-poky-linux-gnueabi (not in COMPATIBLE_HOST)
core-image-minimal-initramfs was skipped: incompatible with host
arm-poky-linux-gnueabi (not in COMPATIBLE_HOST)

Any suggestion?

Il giorno mar 23 lug 2019 alle ore 18:34 Philip Balister <
phi...@balister.org> ha scritto:

> I made a fitImage with a rootfs  for microzed and have booted that from
> u-boot. I'm on holiday this week, but can look up details who I amke
> these next week.
>
> Philip
>
> On 07/23/2019 11:51 AM, Jek F. wrote:
> > Hi everyone,
> >
> > i'm using a microzed, and i need to create an image that mount rootf on
> > ram. I read that for xilinx board, should be enough rename the
> > core-image-minimal-microzed-zynq.gpio.gz.u-boot to uramdisk.image.gz,
> > rename microzed-zynq.dtb to devicetree.dtb and make a single fat
> partition
> > with: uImage, u-boot.img, boot.bin, uramdisk.image.gz and
> microzed-zynq.dtb
> > but with this configuration the board doesn't boot at all.
> > Any suggestion?
> >
> > Thanks a lot.
> >
> >
> >
>
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] rootfs on ram

2019-07-24 Thread Jek F.
I really appreciate that, thank a lot.

Il giorno mar 23 lug 2019 alle ore 18:34 Philip Balister <
phi...@balister.org> ha scritto:

> I made a fitImage with a rootfs  for microzed and have booted that from
> u-boot. I'm on holiday this week, but can look up details who I amke
> these next week.
>
> Philip
>
> On 07/23/2019 11:51 AM, Jek F. wrote:
> > Hi everyone,
> >
> > i'm using a microzed, and i need to create an image that mount rootf on
> > ram. I read that for xilinx board, should be enough rename the
> > core-image-minimal-microzed-zynq.gpio.gz.u-boot to uramdisk.image.gz,
> > rename microzed-zynq.dtb to devicetree.dtb and make a single fat
> partition
> > with: uImage, u-boot.img, boot.bin, uramdisk.image.gz and
> microzed-zynq.dtb
> > but with this configuration the board doesn't boot at all.
> > Any suggestion?
> >
> > Thanks a lot.
> >
> >
> >
>
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] rootfs on ram

2019-07-23 Thread Philip Balister
I made a fitImage with a rootfs  for microzed and have booted that from
u-boot. I'm on holiday this week, but can look up details who I amke
these next week.

Philip

On 07/23/2019 11:51 AM, Jek F. wrote:
> Hi everyone,
> 
> i'm using a microzed, and i need to create an image that mount rootf on
> ram. I read that for xilinx board, should be enough rename the
> core-image-minimal-microzed-zynq.gpio.gz.u-boot to uramdisk.image.gz,
> rename microzed-zynq.dtb to devicetree.dtb and make a single fat partition
> with: uImage, u-boot.img, boot.bin, uramdisk.image.gz and microzed-zynq.dtb
> but with this configuration the board doesn't boot at all.
> Any suggestion?
> 
> Thanks a lot.
> 
> 
> 
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


[meta-xilinx] rootfs on ram

2019-07-23 Thread Jek F.
Hi everyone,

i'm using a microzed, and i need to create an image that mount rootf on
ram. I read that for xilinx board, should be enough rename the
core-image-minimal-microzed-zynq.gpio.gz.u-boot to uramdisk.image.gz,
rename microzed-zynq.dtb to devicetree.dtb and make a single fat partition
with: uImage, u-boot.img, boot.bin, uramdisk.image.gz and microzed-zynq.dtb
but with this configuration the board doesn't boot at all.
Any suggestion?

Thanks a lot.
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx