To build U-Boot and Kernel in a standalone environment, perform the following steps:
First, generate a development SDK, which includes the tools, toolchain, and small rootfs to compile against to put on the host
machine.
• Generate an SDK from the Yocto Project build environment with the following command. To set up the Yocto Project
build environment, follow the steps in the i.MX Yocto Project User's Guide (IMXLXYOCTOUG). In the following
command, set Target-Machine to the machine you are building for. The populate_sdk generates a script file that sets up
a standalone environment without Yocto Project. This SDK should be updated for each release to pick up the latest
headers, toolchain, and tools from the current release.
DISTRO=fsl-imx-fb MACHINE=Target-Machine bitbake core-image-minimal -c populate sdk
• From the build directory, the bitbake was run in, copy the sh file in tmp/deploy/sdk to the host machine to build on and
execute the script to install the SDK. The default location is in /opt but can be placed anywhere on the host machine.
On the host machine, these are the steps to build U-Boot and Kernel:
• For i.MX 8 builds on the host machine, set the environment with the following command before building.
export CROSS_COMPILE=/opt/fsl-imx-fb//environment-setup-aarch64-poky-linux
export ARCH=arm
• For i.MX 6 and i.MX 7 builds on the host machine, set the environment with the following command before building.
export CROSS_COMPILE=/opt/fsl-imx-fb//environment-setup-cortexa9hf-vfp-neon-poky-linuxgnueabi
export ARCH=arm
• To build an i.MX 8 U-Boot in the standalone environment, find the configuration for the target boot. In the following
example, i.MX 8QM ARM2 is the target and it runs on the ARM Cortex-A53 core by default.
make clean
make imx8qm_lpddr4_arm2_defconfig
make u-boot.imx
• To build an i.MX 6 or i.MX 7 U-Boot in the standalone environment, find the configuration for the target boot. In the
following example, i.MX 6ULL is the target.
Download source by cloning with git clone http://git.freescale.com/git/cgit.cgi/imx/
uboot-imx.git -b imx_v2017.03_4.9.11-1.0.0_ga
cd uboot-imx
make clean
make mx6ull_14x14_evk_defconfig
make u-boot.imx
• To build the kernel in the standalone environment for i.MX 8, execute the following commands:
make defconfig
make
• To build the kernel in the standalone environment for i.MX 6 and i.MX 7, execute the following commands:
Download source by cloning with git clone http://git.freescale.com/git/cgit.cgi/imx/
linux-imx.git -b imx_v2017.03_4.9.11-1.0.0_ga
cd linux-imx
make imx_v7_defconfig
make
How to build U-Boot and Kernel in standalone environment
最新推荐文章于 2022-07-22 11:53:35 发布