Skip to content

iMX6 iMX6ul iMX7

vraevsky edited this page Oct 21, 2018 · 10 revisions

How to build U-Boot and Kernel in standalone environment

References

  • i.MX BSP Porting Guide (IMXXBSPPG) - Contains the information on:
    • How to build and load Kernel in standalone environment
    • How to build U-Boot in standalone environment

Generate an SDK from the Yocto Project build environment

cd ${BUILDDIR}
DISTRO=fsl-imx-fb MACHINE=cl-som-imx6 bitbake core-image-minimal -c populate_sdk

Kernel/U-Boot Source Code

Set a target

  • cl-som-imx6
Kernel U-Boot
export TARGET=linux-compulab export TARGET=u-boot-compulab
export DEFCONFIG=cl_som_imx6_defconfig export DEFCONFIG=cl_som_imx6_defconfig
  • cl-som-imx6ul
Kernel U-Boot
export TARGET=linux-compulab export TARGET=u-boot-compulab
export DEFCONFIG=cl_som_imx6ul_defconfig export DEFCONFIG=cl_som_imx6ul_defconfig
  • cl-som-imx7
Kernel U-Boot
export TARGET=linux-compulab export TARGET=u-boot-compulab
export DEFCONFIG=compulab_imx7_defconfig export DEFCONFIG=cl_som_imx7_defconfig

Retrieve the target information

git clone -b devel_ga https://github.com/compulab-yokneam/meta-compulab-imx8 ../sources/meta-compulab-imx8
bitbake -c devshell ${TARGET}
mkdir -p ${BUILDDIR}/../ooye/${TARGET}
${BUILDDIR}/../sources/meta-compulab-imx8/bb-tools/getenv > ${BUILDDIR}/../ooye/${TARGET}/.rc
exit

Clone the target source code & patch it

cd ${BUILDDIR}/../ooye/${TARGET}
source ${BUILDDIR}/../ooye/${TARGET}/.rc
git clone ${ORIGIN} src
git -C src checkout -b development ${HEAD}
git -C src am ${PATCHES}/*.patch

Building the target

  • Set the environment with the following command before building.
source /opt/fsl-imx-fb/*/environment-setup-cortexa9hf-vfp-neon-pokylinux-gnueabi
  • Issue build for the target this way:
make -C src ${DEFCONFIG}
make -C src -j8

cl-som-imx8

ucm-imx8m-mini

Clone this wiki locally