yocto常用命令 杂记

/*导出环境变量*/
source setup-environment <build_dir>
eg:
    source setup-environment build-x11

/*编译构建系统*/
bitbake fsl-image-gui
DISTRO=fsl-imx-x11 MACHINE=imx6ulevk source fsl-setup-release.sh -b build-x11
MACHINE=imx6ulevk source setup-environment build-x11

/*更改根文件系统,安装工具*/
find -name *fsl-image-gui*.bb*
./meta-fsl-bsp-release/imx/meta-sdk/recipes-fsl/images/fsl-image-gui.bb

/*编译busybox工具*/
bitbake -c menuconfig busybox
bitbake  busybox -f -c compile

/*编译相关工具*/
bitbake  xinetd -f -c compile
bitbake  dhcp -f -c compile
bitbake  valgrind -f -c compile
bitbake -c deploy -f -v valgrind

/*编译交叉工具链*/
bitbake meta-toolchain
./tmp/deploy/sdk/poky-glibc-x86_64-meta-toolchain-cortexa7hf-vfp-neon-toolchain-1.8.sh

/*QT工具链*/
bitbake meta-toolchain-qt5

/*编译uboot*/
source /opt/poky/1.8/environment-setup-cortexa7hf-vfp-neon-poky-linux-gnueabi
make mx6ul_14x14_evk_defconfig
make

/*编译kernel*/
export ARCH=arm
export CROSS_COMPILE=$TARGET_PREFIX
unset LDFLAGS
make imx_v7_defconfig
make uImage LOADADDR=0x10008000

/*移植开源库*/
dhcp移植:
./configure --host=arm-poky-linux-gnueabi --target=arm-poky-linux-gnueabi --prefix=/home/vec/nfs/dhcp/dhcp-4.3.5/dir  --with-randomdev=no
make BUILD_CC=gcc
make install

sudo cp -rf lib/* /opt/poky/1.8/sysroots/cortexa7hf-vfp-neon-poky-linux-gnueabi/usr/lib/
sudo cp -rf include/* /opt/poky/1.8/sysroots/cortexa7hf-vfp-neon-poky-linux-gnueabi/usr/include/
sudo cp -rf bin/* /opt/poky/1.8/sysroots/cortexa7hf-vfp-neon-poky-linux-gnueabi/usr/bin/


/*编译内核*/
/*配置为默认编译选项  在kernel/arch/arm/configs下*/
make imx_v7_defconfig O=dir
/*修改.config*/
make menuconfig O=dir
/*编译内核*/
make zImage O=dir

/*编译结果*/
/*1. 各类工具*/
/home/vec/fsl-release-bsp/build-x11/tmp/work/cortexa7hf-vfp-neon-poky-linux-gnueabi
kernel, rootfs, uboot :(fsl-image-gui linux-imx u-boot-imx)
/home/vec/fsl-release-bsp/build-x11/tmp/work/imx6ulevk-poky-linux-gnueabi

/*2. 下载源码*/
/home/vec/fsl-release-bsp/downloads

你可能感兴趣的:(linux工具)