Include kernel with initramfs in Tezi install folder

I am trying to get a kernel bundled with an initramfs included in my Tezi install folder. The Image.gz-initramfs-verdin-imx8mp.bin file is created in the /deploy/images/verdin-imx8mp folder. The Image.gz linked binary is 8.1MB while the Image.gz-initramfs-verdin-imx8mp.bin is 30MB. The file in the Tezi install folder is always 8.1MB. I have the following in my local.conf:

INITRAMFS_IMAGE = "sutter-initramfs-image"
INITRAMFS_IMAGE_BUNDLE = "1"
IMAGE_BOOT_FILES = "     Image.gz-initramfs-verdin-imx8mp.bin;Image.gz     \
	imx8mp-verdin-nonwifi-dahlia.dtb \
	imx8mp-verdin-nonwifi-dev.dtb \
	imx8mp-verdin-nonwifi-ivy.dtb \
	imx8mp-verdin-nonwifi-mallow.dtb \
	imx8mp-verdin-nonwifi-yavia.dtb \
	imx8mp-verdin-wifi-dahlia.dtb \
	imx8mp-verdin-wifi-dev.dtb \
	imx8mp-verdin-wifi-ivy.dtb \
	imx8mp-verdin-wifi-mallow.dtb \
	imx8mp-verdin-wifi-yavia.dtb \
	boot.scr-verdin-imx8mp;boot.scr \
	overlays.txt overlays/*;overlays/"

We are not using a separate boot partition so TEZI_USE_BOOTFILES is set to false in the image_type_tezi.bbclass file in case that is relevant.

Any suggestions will be greatly appreciated.

tdx-info:
Software summary

Bootloader: U-Boot
Kernel version: 6.6.23-7.0.0-devel-gecddeee1ad4c #1 SMP PREEMPT Wed Sep 25 11:25:16 UTC 2024
Kernel command line: root=PARTUUID=8b44fa4f-01 ro rootwait console=ttymxc2 splash
Distro name: NAME=“TDX Wayland with XWayland”
Distro version: VERSION_ID=7.0.0-devel-20241219010323-build.0
Hostname: verdin-imx8mp-15402814

Hardware info

HW model: Toradex Verdin iMX8M Plus on Verdin Development Board
Toradex version: 0063 V1.1B
Serial number: 15402814
Processor arch: aarch64

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

Did you like my answer? :+1: :-1:


Hello! Thank you for providing detailed information about your setup and the steps you’ve taken. Let’s review the issue and see how you can ensure your kernel + initramfs binary is deployed within your Toradex Easy Installer (Tezi) image.

Problem Summary

Your Image.gz-initramfs-verdin-imx8mp.bin is being built correctly and shows up as ~30MB in deploy/images, but the kernel file in the Tezi install folder is just 8.1MB (the size of the plain Image.gz), implying the bundled version is not being picked up for the installer output.


Points to Check

1. IMAGE_BOOT_FILES Syntax

Your IMAGE_BOOT_FILES entry looks correct, specifically the part:

Image.gz-initramfs-verdin-imx8mp.bin;Image.gz

This syntax should copy Image.gz-initramfs-verdin-imx8mp.bin as Image.gz into your deploy directory.

Suggestion:

Make sure in deploy/images/verdin-imx8mp you only have:

  • Image.gz
  • Image.gz-initramfs-verdin-imx8mp.bin

and not both a plain Image.gz and the initramfs bundle with similar timestamps. Double-check that the filename mapping is not getting overwritten in a later build step.


2. Clean Build Output

Sometimes old artifacts can result in the wrong files being installed. Try:

bitbake -c cleanall linux-toradex
bitbake <your-image>

Then inspect deploy/images/verdin-imx8mp for the correct filenames and sizes before and after running the Tezi preparation step.


3. Tezi Output Mapping

The files included in the Tezi output depend on the bitbake recipe for your image. When you set TEZI_USE_BOOTFILES = "false", all required boot files (including kernel, DTBs, overlays, etc.) should be gathered by the image recipe into the Tezi folder.

Important:

The file that lands in the root of the Tezi install folder as Image.gz will be whatever is picked as the first mapping to that name in IMAGE_BOOT_FILES. If there is also just an Image.gz file (unbundled), and the mapping causes it to be used instead (due to build or copy order), you may end up with the wrong one.


4. Confirm File Used in Tezi Folder

Directly after bitbake completes, check the content in:

<your build>/deploy/images/verdin-imx8mp/teziimage

(if teziimage output dir exists) or in the tezi output of your custom image. Confirm that the Image.gz file there is your intended kernel+initramfs bundle (approx 30MB).


Troubleshooting steps:

  1. Rebuild with a clean state as described.
  2. Search for all Image.gz* in your deploy and Tezi output folders:
    find ./deploy/images/verdin-imx8mp/ -name "Image.gz*"
    
  3. Use ls -lh to check sizes and make sure the mapping is as you expect.
  4. Double-check IMAGE_BOOT_FILES isn’t overridden elsewhere (e.g., in a machine or distro .conf).
  5. If you still get a mismatch, you can temporarily move/rename the plain Image.gz after build before packaging, ensuring only the bundled file remains to be mapped as Image.gz.

Additional References

While exact instructions for initramfs bundling with Tezi images are not explicitly documented, you can find more on the Verdin and Tezi install process at:

You can also browse Toradex’s GitHub or Community for similar user experiences.


Summary

  • Ensure only your bundled kernel is mapped to Image.gz in the Tezi output.
  • Remove or rename any plain Image.gz if it accidentally overrides the intended file.
  • Rebuild from clean if needed to clear any artifacts.
  • Confirm output content and sizes before flashing.

Let me know if these steps clarify the origin of the smaller kernel in your Tezi image or if you need further help!

Best regards,
Toradex AI Assistant.