TechNexion / tn-imx-yocto-manifest

TechNexion i.MX Yocto manifests
27 stars 10 forks source link

Image deployment #14

Open louloux88 opened 3 years ago

louloux88 commented 3 years ago

Hi, i have a question about image deployment, the README doc indicates that the ".sdcard" file needs to be flashed on sdcard but my build of fsl-image-machine-test gives me no ".sdcard" file. I got env, wks, json, ext4, manifest, tar.bz2, wic.bz2, dtb, dtbo, tgz and bin files. I read on "IMX Linux User Guide" that the sdcard creates automatically the four pieces needed to boot from sdcard (Linux OS kernel image, dtb, bootleader image and root file system). Do i need to partitionate my sdcard manually ? Which files do i need to use? Does the "wic" file is the equivalent of the "sdcard" file? Sorry am quite a beginner :) Can you update your README file or explain me in the reply section how to flash my sdcard in order to boot my pico-pi-imx8m-mini from it?

Thanks a lot

maximdeclercq commented 3 years ago

The .sdcard format changed to .wic in Yocto 3.0 or so. It should be equivalent. You should be able to extract the wic.bz2 file and flash it (bmap is preferred for speed, but dd works as well). I see that you use an imx8, so maybe you should look into mfgtool. I can't find the exact news page, but you can check this patch for more info.

tbandtg commented 3 years ago

When he says use bmap he means a command like this. Which is what I do to burn the sd card.

sudo bmaptool copy /mnt/nfs_share/edm_yocto2/build-xwayland-edm-g-imx8mp/tmp/deploy/images/edm-g-imx8mp/fsl-image-qt5-validation-imx-edm-g-imx8mp.wic.bz2 /dev/sdb

johnweber commented 3 years ago

Sure. Another way to do it would be to use a cross-platform tool like Balena Etcher. It can also look into the contents of the compressed archive (.xz or .bz2) and write the .wic file to the e.MMC or sdcard. It also takes care of unmounting any filesystems that might have been automatically mounted by the host operating system, and ejecting them after performing the flashing and validation.

tbandtg commented 3 years ago

I didnt realize that etcher had a linux port. That is by far the easiest way to do it. Step by step with a GUI. Whichever way you do it though do not forget to open it in the disk manager and resize the partion. image

johnweber commented 3 years ago

You can also include the growpart package into your image, if you want to resize the rootfs the first time after an image is installed.

In your image recipe or local.conf:

IMAGE_INSTALL_append += " \
    growpart \
"

For additional reference, you can study the recipe and files here: https://github.com/TechNexion/meta-tn-imx-bsp/tree/zeus_5.4.70-2.3.0-stable/recipes-extended/growpart