Wayland-core-image-minimal

From Estone Technology Wiki
Jump to: navigation, search

Previous Section: Build & Install SDK

Compiling image core-image-minimal

fsl-imx-wayland Kernel-4.9.123-2.3.0-8mm-ga Yocto(Rocko)

Pre-built .SDcard Image

core-image-minimal imx8mmevk

  • This build is dependent on the following items:

SDK
fsl-imx-xwayland-glibc-x86_64-meta-toolchain-qt5-aarch64-toolchain-4.9-rocko.sh

ROOTFS
core-image-minimal-imx8mmevk-20190416215532v1.0.rootfs.tar.bz2

U-BOOT
uboot-imx

U-BOOT-TOOLS


KERNEL
linux-imx

IMX-MKIMAGE
imx-mkimage-imx8mmevk

Compile Image Parts From Source

SDK

Download SDK here: fsl-imx-xwayland-glibc-x86_64-meta-toolchain-qt5-aarch64-toolchain-4.9-rocko.sh

or

Compile SDK: SDK From Source

Compile ROOTFS

Note: Start at the directory where SDK was created from last section

$ cd <imx8mm>
$ mkdir <full-image>
$ DISTRO=fsl-imx-wayland MACHINE=imx8mmevk source fsl-setup-release.sh -b <build>
$ bitbake -v core-image-minimal
$ cp -rv /tmp/deploy/images/imx8mmevk/rootfs.tar.bz2 ../../full-image
$ cp -rv /tmp/deploy/images/imx8mmevk/imx-boot-tools/ ../../

After a build has succesfully completed, the created image resides at
<imx8mm>/<build>/tmp/deploy/images/imx8mmevk/


Note: Copy <imx8mm>/<build>/tmp/deploy/images/imx8mmevk/imx-boot-tools folder to main imx8mm folder

Compile UBOOT

$ cd <imx8mm>
$ mkdir <uboot>
$ cd uboot
$ mkdir <flashbin>
$ cp -rv ../imx-boot-tools/bl31-imx8mm.bin flashbin/bl31.bin
$ cp -rv ../imx-boot-tools/lpddr4_pmu_train_* flashbin/
$ cp -rv ../imx-boot-tools/signed_hdmi_imx8m.bin flashbin/
$ git clone -b imx_4.9.123_imx8mm_ga https://source.codeaurora.org/external/imx/imx-mkimage
$ git clone -b imx_v2017.03_4.9.123_imx8mm_ga https://source.codeaurora.org/external/imx/uboot-imx
$ cd uboot-imx
$ git pull
$ source /opt/fsl-imx-xwayland/4.9-rocko/environment-setup-aarch64-poky-linux
$ export ARCH=arm64
$ export CROSS_COMPILE=aarch64-poky-linux-
$ unset LDFLAGS
$ make imx8mm_evk_defconfig
$ make
$ cp -rv u-boot.bin u-boot-nodtb.bin ../flashbin/
$ cp -rv spl/u-boot-spl.bin ../flashbin/
$ cp -rv arch/arm/dts/fsl-imx8mm-evk.dtb ../flashbin/
$ cp -rv tools/mkimage ../flashbin/mkimage_uboot

Make flash.bin file

$ cd ..
$ cp -rv flashbin/* imx-mkimage/iMX8M/
$ chmod 777 -R imx-mkimage/
$ cd imx-mkimage/
$ sudo make SOC=iMX8MM flash_evk
$ cp -rv iMX8M/flash.bin ../../full-image/

Compile Kernel

$ cd <imx8mm>
$ mkdir <kernel>
$ cd kernel
$ git clone -b imx_4.9.123_imx8mm_ga https://source.codeaurora.org/external/imx/linux-imx
$ cd linux-imx
$ git pull
$ source /opt/fsl-imx-xwayland/4.9-rocko/environment-setup-aarch64-poky-linux
$ export ARCH=arm64
$ export CROSS_COMPILE=aarch64-poky-linux-
$ unset LDFLAGS
$ make defconfig
$ make
$ cp -v arch/arm64/boot/Image ../../full-image/
$ cp -v arch/arm64/boot/dts/freescale/fsl-imx8mm-evk.dtb ../../full-image/

Next Section: Mount Image to SD Card