the script is just for reference, if you need to use it, replace "_flash.bin" by "imx-boot-imx8qmmek-sd.bin-flash", I haven't built imx8qm on my work station now, you can build the imx8qm board according to the yocto user guide, after finish building, you can check if your bsp has XEN or not, you should find "fsl-imx8qm-mek-dom0.dtb" there, add this in the script too, another option is building standalone xen package, this example is for 4.9 change it according to your own bsp version
−Env:
- export SDKTARGETSYSROOT=/opt/fsl-imx-internal-xwayland/4.9-rocko/sysroots/aarch64-poky-linux
- export PATH=$PATH:/opt/fsl-imx-internal-xwayland/4.9-rocko/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/
- export CC="aarch64-poky-linux-gcc --sysroot=$SDKTARGETSYSROOT"
- export ARCH=arm64
- export CROSS_COMPILE=aarch64-poky-linux-
−Linux Kernel
- make ARCH=arm64 CROSS_COMPILE=aarch64-poky-linux- defconfig(Linux)/android_car_defconfig(Android)
- Dom0/DomU Linux share one kernel image; Dom0 Linux/ DomU android use different Kernel image
- make ARCH=arm64 CROSS_COMPILE=aarch64-poky-linux- -j4
−U-Boot
- make CC="$CC" imx8qm_mek_defconfig; make CC="$CC"
−ATF
−Scfw
−imx-mkimage
- Copy bl31.bin from ATF; copy u-boot.bin from U-Boot; copy scfw_tcm.bin from scfw; to i.MX8QM. make SOC=iMX8QM clean; make SOC=iMX8QM flash
−XEN
- cd xen; make ARCH=arm64 XEN_TARGET_ARCH=arm64 defconfig; make ARCH=arm64 XEN_TARGET_ARCH=arm64 menuconfig; select CONFIG_DEBUG; cd -;
- make dist-xen ARCH=arm64 XEN_TARGET_ARCH=arm64 CONFIG_DEBUG=y CONFIG_EARLY_PRINTK=imx8qm CROSS_COMPILE=aarch64-poky-linux-