您尚未登录。

楼主 # 昨天 13:50:36

solo666
会员
注册时间: 2025-06-26
已发帖子: 5
积分: 0

X3399快速使用说明

九鼎X3399开发板使用说明

一、3399获得uboot.img:
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


二、ubuntu16用下面命令安装所需的软件包:
1、sudo apt-get update

2、
apt-get install git gnupg flex bison gperf libsdl1.2-dev libwxgtk3.0-dev build-essential zip curl zlib1g-dev gcc-multilib g++-multilib genromfs libc6-dev-i386 libncurses5-dev x11proto-core-dev libx11-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip gperf lsb-core lib32z1-dev lib32ncurses5-dev lzop liblz4-tool proot libssl1.0.0 libssl-dev genext2fs

三、安装 kernel 及 u-boot 编译需要依赖的软件包
apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip device-tree-compiler

四、安装文件系统需要依赖的软件包
apt-get install lib32stdc++-4.9-dev lib32z1

五、安装 Buildroot 编译需要依赖的软件包
apt-get install libfile-which-perl sed make binutils gcc g++ bash patch gzip bzip2 perl tar cpio python unzip rsync file bc libmpc3 git repo texinfo pkg-config cmake tree

六、编译uboot:在x3399_linux_new目录下执行 ./mk.sh -u
编译uboot后的打印:
--------pack uboot.img--------
load addr is 0x200000!
pack input /test/doc/x3399/x3399_linux_new/u-boot/u-boot.bin
pack file size: 955619
crc = 0xf23a6d50
pack uboot.img success!
pack uboot okay! Input: /test/doc/x3399/x3399_linux_new/u-boot/u-boot.bin
--------pack loader--------
out:rk3399_loader_v1.23.119.bin
fix opt:rk3399_loader_v1.23.119.bin
merge success(rk3399_loader_v1.23.119.bin)
/test/doc/x3399/x3399_linux_new/u-boot
pack loader okay! Input: /test/doc/x3399/x3399_linux_new/rkbin/RKBOOT/RK3399MINIALL.ini
--------pack trust.img--------
out:trust.img
merge success(trust.img)
/test/doc/x3399/x3399_linux_new/u-boot
pack trust okay! Input: /test/doc/x3399/x3399_linux_new/rkbin/RKTRUST/RK3399TRUST.ini
'/test/doc/x3399/x3399_linux_new/u-boot/rk3399_loader_v1.23.119.bin' -> '/test/doc/x3399/x3399_linux_new/output/MiniLoaderAll.bin'
'/test/doc/x3399/x3399_linux_new/u-boot/uboot.img' -> '/test/doc/x3399/x3399_linux_new/output/uboot.img'
'/test/doc/x3399/x3399_linux_new/u-boot/trust.img' -> '/test/doc/x3399/x3399_linux_new/output/trust.img'

七、编译kernel ./mk.sh -k
编译kernel后的打印:
Pack to resource.img successed!
  Image:  resource.img (with x3399-linux.dtb logo.bmp logo_kernel.bmp) is ready
  Image:  boot.img (with Image resource.img) is ready
  Image:  zboot.img (with Image.lz4 resource.img) is ready
'/test/doc/x3399/x3399_linux_new/kernel/boot.img' -> '/test/doc/x3399/x3399_linux_new/output/boot.img'

使用到的8个设备树:
x3399-linux.dts
rk3399-9tripod.dtsi

rk3399-linux.dtsi
rk3399.dtsi
rk3399-opp.dtsi
rk3399-vop-clk-set.dtsi
rk3399-dram-default-timing.dtsi  :一样
rk3399-sched-energy.dtsi  :firefly和9trip一样


八、编译recovery  ./mk.sh -r
--------pack recovery image with zImage and resource...--------done.
'/test/doc/x3399/x3399_linux_new/buildroot/output/rockchip_x3399_recovery/images/recovery.img' -> '/test/doc/x3399/x3399_linux_new/output/recovery.img'


九、编译文件系统  ./mk.sh -b
'/test/doc/x3399/x3399_linux_new/buildroot/output/rockchip_x3399/images/rootfs.ext4' -> '/test/doc/x3399/x3399_linux_new/output/rootfs-linux.img'

十、整体一起编译  ./mk.sh -a

十一、打包成统一镜像  ./mk.sh -U
update-linux.img 为整个 QT 系统升级文件的单一映像,包括了 uboot,内核,文件系统等。
注意,生成 update-linux.img 的先决条件是已经成功编译了 uboot,内核和 linux 文件系统,缺一不可。

十二、各镜像含义
MiniLoaderAll.bin:uboot 镜像文件,复制自 uboot 生成的“*_loader_*.bin”文件。 
parameter.txt: 分区文件
uboot.img:uboot 镜像文件,由 uboot 编译得到的 bin 文件打包得到。 
trust.img:uboot 镜像文件,同样由 rk 提供的 bin 文件打包得到,uboot.img 和MiniLoaderAll.bin 以及 trust.img 的生成打包过程,有兴趣可通过研究编译脚本理解其原理。 
misc.img:分区镜像,负责启动模式切换和急救模式的参数传递。 
recovery.img:急救模式映像。 
boot.img:内核镜像文件,将内核 Image 文件和 resource.img 打包得到,这一点和 Android的 boot.img 不同。 
rootfs.img:文件系统分区镜像,对应 rootfs 分区,这里可烧写 SDK 编译得到的 Linux系统,也可烧写 Ubuntu 或 debian 文件系统等。 
oem.img:用于给厂家使用,存放厂家的 APP 或数据。只读。oem 的生成可参考编译脚本,生成的源目录见 SDK 源码的 device/rockchip/oem/目录。 
userdata.img:存放用户数据,用户可将需要的文件放置到 device/rockchip/userdata/目录下,然后打包烧写。在板子启动的系统中,此分区占用剩余的空间。

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn