Skip to content

iMX6 iMX6ul iMX7

vraevsky edited this page Jul 4, 2018 · 10 revisions

How to build U-Boot and Kernel 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
EXPORT environment_setup=$(find  tmp/work | awk '/core-image-minimal.*environment-setup/')

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 ${environment_setup}
  • Issue build for the target this way:
make -C src ${DEFCONFIG}
make -C src -j8