uboot源码下载:https://github.com/rockchip-linux/u-boot.git
Rockchip binary源码下载:https://github.com/rockchip-linux/rkbin.git
rkdeveloptool源码下载:https://github.com/rockchip-linux/rkdeveloptool.git

sudo git clone https://github.com/rockchip-linux/u-boot.git -b stable-4.4-rk3399-linux
sudo git clone https://github.com/rockchip-linux/rkbin.git
sudo git clone https://github.com/rockchip-linux/rkdeveloptool.git
sudo chmod -R 777 u-boot rkbin rkdevloptool

编译rkdevloptool:

按照下面的命令一步一步执行:

cd rkdevloptool
autoreconf -i
./configure
make
sudo make install

获得rk3399_loader_v1.24.126.bin文件:

在rkbin中:

./tools/boot_merger ./RKBOOT/RK3399MINIALL.ini

其中根据自己的需求可以在./RKBOOT/RK3399MINIALL.ini修改ddr,usbplug,miniloader
在这里插入图片描述

获得trust.img的方法

在rkbin中:

 ./tools/trust_merger  ./RKTRUST/RK3399TRUST.ini

其中可以修改bl31,bl32等。

获得uboot.img

在u-boot中:

make clean
make rk3399_defconfig ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
make CROSS_COMPILE=aarch64-linux-gnu-
tools/loaderimage --pack --uboot u-boot.bin uboot.img

通过rkdevloptool烧写三个文件

rk3399_loader_v1.24.126.bin
uboot.img
trust.img

sudo rkdeveloptool db rk3399_loader_v1.24.126.bin
sudo rkdeveloptool ul rk3399_loader_v1.24.126.bin
sudo rkdeveloptool wl 0x4000 uboot.img
sudo rkdeveloptool wl 0x6000 trust.img
sudo rkdeveloptool rd
Logo

更多推荐