53 lines
653 B
Markdown
53 lines
653 B
Markdown
|
# Yocto 基本使用
|
||
|
|
||
|
## 交叉编译配置
|
||
|
|
||
|
在 yocto 根目录下:
|
||
|
|
||
|
```sh
|
||
|
source <sdk root>/oe-init-build-env
|
||
|
```
|
||
|
|
||
|
## 编译目标
|
||
|
|
||
|
使用如下命令查看所有编译目标:
|
||
|
|
||
|
```sh
|
||
|
bitbake -s
|
||
|
```
|
||
|
|
||
|
## 在 build 目录下进行编译
|
||
|
|
||
|
```sh
|
||
|
bitbake <target> -C compile
|
||
|
```
|
||
|
|
||
|
参数:
|
||
|
|
||
|
-C 强制编译,配置、编译目标并打包;
|
||
|
-c 不强制。
|
||
|
|
||
|
生成的文件在:
|
||
|
|
||
|
```sh
|
||
|
<yocto root>/build/tmp/deploy/images/<product>
|
||
|
```
|
||
|
|
||
|
目录下。
|
||
|
|
||
|
## Linux Kernel
|
||
|
|
||
|
Kernel 源码在:
|
||
|
|
||
|
```sh
|
||
|
<yocto root>/build/tmp/work-shared/<product>/kernel-source
|
||
|
```
|
||
|
|
||
|
目录下。
|
||
|
|
||
|
Kernel 配置方法为:
|
||
|
|
||
|
```sh
|
||
|
bitbake linux-renesas -c do_menuconfig
|
||
|
```
|