How to build U-Boot and Kernel in standalone environment

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
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值