Fsl-imx-fb

From Estone Technology Wiki
Jump to: navigation, search

Previous Section: Build and Install SDK

Compiling image fsl-imx-fb

core-image-minimal Kernel-4.9.51 Yocto 2.4(Morty)

Pre-built .SDcard Image

core-image-minimal-imx8mqevk

  • This build is dependent on the following items:

SDK
fsl-imx-xwayland-glibc-x86_64-meta-toolchain-qt5-aarch64-toolchain-4.9.51-mx8-ga.sh

Rootfs
core-image-minimal-imx8mqevk.rootfs.tar.bz

U-BOOT
imx_v2017.03_4.9.51_imx8m_ga

U-BOOT-TOOLS
imx-boot-tools

KERNEL
imx_4.9.51_imx8m_ga

IMX-MKIMAGE
imx-mkimage.git

Compile Individual Image Parts

SDK

Download SDK here: fsl-imx-xwayland-glibc-x86_64-meta-toolchain-qt5-aarch64-toolchain-4.9.51-mx8-ga.sh

or

Compile SDK: SDK From Source

Compile ROOTFS

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

$ cd <imx-yocto-bsp>
$ DISTRO=fsl-imx-wayland MACHINE=imx8mqevk source fsl-setup-release.sh -b <build>
$ bitbake core-image-minimal

After a build has succesfully completed, the created image resides at

<imx-yocto-bsp>/<build>/tmp/deploy/images/imx8mqevk/

Compile U-BOOT

$ mkdir <build_dir>
$ cd <build_dir>
$ mkdir <flashbin>
$ mkdir <boot>
$ git clone -b imx_v2017.03_4.9.51_imx8m_ga  https://github.com/estonetechnology/uboot-imx-emb-2238.git

Username for https://github.com: xxxxxxxxx@xxxxxxxx.com
Password for xxxxxxxxx@xxxxxxxxx.com: password
$ cd uboot-imx-emb-2238 $ git pull $ source /opt/fsl-imx-xwayland/4.9.51-mx8-ga/environment-setup-aarch64-poky-linux $ export ARCH=arm64 $ export CROSS_COMPILE=aarch64-poky-linux- $ unset LDFLAGS $ make imx8mq_evk_defconfig $ make $ cp u-boot.bin u-boot-nodtb.bin ../flashbin/ $ cp spl/u-boot-spl.bin ../flashbin/ $ cp arch/arm/dts/fsl-imx8mq-evk.dtb ../flashbin/

Compile KERNEL

$ cd <build_dir>
$ git clone -b imx_4.9.51_imx8m_ga https://github.com/estonetechnology/linux-imx-emb-2238.git

Username for https://github.com: xxxxxxxxx@xxxxxxxx.com
Password for xxxxxxxxx@xxxxxxxxx.com: password
$ cd linux-imx-emb-2238 $ source /opt/fsl-imx-xwayland/4.9.51-mx8-ga/environment-setup-aarch64-poky-linux $ export ARCH=arm64 $ export CROSS_COMPILE=aarch64-poky-linux- $ unset LDFLAGS $ make emb-2238_defconfig $ make $ cp arch/arm64/boot/Image ../boot/ $ cp arch/arm64/boot/dts/freescale/fsl-imx8mq-evk.dtb ../boot/

Firmware

Note: Download firmware from source Hereand follow steps to for implementation for U-BOOT flash.bin creation

$ cd  <Firmware.zip_download_directory>
$ unzip Firmware.zip
$ cp Firmware <build_dir>
$ cd Firmware
$ sudo cp bl31.bin mkimage_uboot signed_hdmi_imx8m.bin ../flashbin
$ sudo cp lpddr4_pmu_train_1d_dmem.bin lpddr4_pmu_train_1d_imem.bin ../flashbin
$ sudo cp lpddr4_pmu_train_2d_dmem.bin lpddr4_pmu_train_2d_imem.bin ../flashbin

IMX-MKIMAGE

$ cd <build_dir>
$ git clone -b master https://github.com/Freescale/imx-mkimage.git

Make flash.bin for U-Boot

$ cd <build_dir>
$ cp flashbin/* imx-mkimage/iMX8M/
$ chmod 777 -R imx-mkimage/
$ cd imx-mkimage
$ make SOC=iMX8M flash_hdmi_spl_uboot
$ cp iMX8M/flash.bin ../boot/

Note: All the files created and moved to the <build_dir>/boot/ directory will be used to create a bootable MicroSD card image in the next section

Next Section: Mount Image to MicroSD