Rockchip linux sdk buildroot使用记录
Rockchip Linux SDK里面的buildroot可以制作一个简洁的rootfs,但按照文档还是有一些问题,以下是使用时大致的一个记录及代码修改记录。 SDK从 http://opensource.rock-chips.com/wiki_Linux_SDK 获取。http://opensource.rock-chips.com/wiki_Source 里面有使用方法。 先要获取repogit clone https://github.com/rockchip-linux/repo mkdir linux cd linux
而后同步代码,我这里使用的是RK3399的代码,由于网络原因可能会有超时发生,可以使用后面的脚本进行多次获取。```
../repo/repo init –repo-url=https://github.com/rockchip-linux/repo -u https://github.com/rockchip-linux/manifests -b master -m rk3399_linux_release.xml
../repo/repo sync
#!/bin/sh
../repo/repo sync -c
while \[ $? -ne 0 \] ;
do
../repo/repo sync -c;
done
```代码就绪后就可以开始动手编译了。```
#cd u-boot
#./make.sh evb-rk3399
$ source buildroot/build/envsetup.sh
You're building on Linux
Lunch menu...pick a combo:
1. rockchip\_rk3308\_release
2. rockchip\_rk3308\_debug
3. rockchip\_rk3308\_robot\_release
4. rockchip\_rk3308\_robot\_debug
5. rockchip\_rk3308\_mini\_release
Which would you like? \[1\] #这里选择硬件对应的配置
$make
$./build.sh rootfs
$ls rockchip/3399/linux/buildroot/output/rockchip\_rk3399/images/rootfs.ext4
```在编译的过程中由于语法问题有多处错误,大致需要修改以下内容(有些内容遗漏了)```
./buildroot/output/rockchip\_rk3399/build/host-squashfs-3de1687d7432ea9b302c2db9521996f506c140a3/squashfs-tools/mksquashfs.c
添加#include <sys/sysmacros.h>
./output/rockchip\_rk3399/build/host-squashfs-3de1687d7432ea9b302c2db9521996f506c140a3/squashfs-tools/Makefile
LIBS = -lpthread -lm -lc
./rockchip\_rk3399/build/settings-1.0/wlan/wlanlisttable.cpp ifiStateItem::operator < 函数做下面的修改
} else if (state == WIFI\_STATE\_SAVED || this->text().toInt() == WIFI\_STATE\_AUTH\_FAILED) {
./rockchip\_rk3399/build/QLauncher-1.0/src/appi18n.cpp 文件 字符串处修改成如下内容
QString lang= (tmp->value("LANG",defaultLang).toString().leftRef(langTokenLength)).toString()+QString(QLatin1String("/appName"));
./output/rockchip\_rk3399/build/host-libglib2-2.54.2/gio/Makefile
```END