[OE-core] [PATCH v3] kernel.bbclass: do not deploy fitImage; kernel-fitimage.bbclass does that.

Leon Woestenberg leon at sidebranch.com
Tue Sep 18 10:22:22 UTC 2018


Hi Marek,

On Tue, Sep 18, 2018 at 12:12 PM Marek Vasut <marex at denx.de> wrote:
>
> On 09/18/2018 12:01 PM, Leon Woestenberg wrote:
> > Hi Marek,
> Could you _please_ stop top-posting ?

 Yes.

>
> > one of the issues I saw was that both kernel.bbclass and
> > kernel-fitImage.bbclass deployed the FIT image into the deploy/images/
> > subfolder.
> >
> > My fix was to make the kernel.bbclass ignore "fitImage" during
> > deployment. This is also the fix I saw from Xilinx.
>
> If I recall correctly, meta-xilinx had their own horribly hacked
> fitImage bbclass, are you sure it's not interfering here ?
>
Yes I am sure it's not.

>
> > (Another fix I have pending is that bundled initramfs images (i.e that
> > go inside the kernel binary) where also seperately packed inside the FIT
> > image.)
>
> Separate initrd is already supported.


There is no exception for INITRAMFS_IMAGE_BUNDLE in
kernel-fitimage.bbclass. The initramfs will be packed inside the FIT,
in addition of also being packed inside the kernel.

My local fix has this:

diff --git a/meta/classes/kernel-fitimage.bbclass
b/meta/classes/kernel-fitimage.bbclass
index a4d7aca..17addab 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -475,7 +475,9 @@ addtask assemble_fitimage before do_install after do_compile

 do_assemble_fitimage_initramfs() {
        if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage" && \
-               test -n "${INITRAMFS_IMAGE}" ; then
+               test -n "${INITRAMFS_IMAGE}" && \
+               test ! -n "${INITRAMFS_IMAGE_BUNDLE}"; then
+
                cd ${B}
                fitimage_assemble fit-image-${INITRAMFS_IMAGE}.its
fitImage-${INITRAMFS_IMAGE} 1
        fi
@@ -483,6 +485,18 @@ do_assemble_fitimage_initramfs() {

 addtask assemble_fitimage_initramfs before do_deploy after do_install

+do_assemble_fitimage_bundled_initramfs() {
+       if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage" && \
+               test -n "${INITRAMFS_IMAGE}" && \
+               test -n "${INITRAMFS_IMAGE_BUNDLE}"; then
+
+               cd ${B}
+               fitimage_assemble fit-image-${INITRAMFS_IMAGE}.its
fitImage-${INITRAMFS_IMAGE}
+       fi
+}
+
+addtask assemble_fitimage_bundled_initramfs before do_deploy after
do_bundle_initramfs
+


Regards,

Leon.



More information about the Openembedded-core mailing list