c语言编译 aiocompiler,RK3399快速熟悉(基于AIO-3399C开发板)

一、简介

AIO-3399C(AI) 包括 “带 NPU” 和“无 NPU” 两个版本

1.规格参数

~$ arch

aarch64

~$ cat /proc/version

Linux version 4.4.154 (daijh@tchip14) (gcc version 6.3.1 20170404 (Linaro GCC 6.3-2017.05) ) #28 SMP Mon Mar 4 12:21:30 CST 2019

~$ uname -a

Linux firefly 4.4.154 #28 SMP Mon Mar 4 12:21:30 CST 2019 aarch64 aarch64 aarch64 GNU/Linux

~$ head -n 1 /etc/issue

Ubuntu 16.04.5 LTS \n \l

$ free -m

total used free shared buff/cache available

Mem: 3845 204 3297 34 344 3554

Swap: 0 0 0

$ df -m

Filesystem 1M-blocks Used Available Use% Mounted on

/dev/root 14643 2002 12026 15% /

devtmpfs 1922 0 1922 0% /dev

tmpfs 1923 1 1923 1% /dev/shm

tmpfs 1923 18 1906 1% /run

tmpfs 5 1 5 1% /run/lock

tmpfs 1923 0 1923 0% /sys/fs/cgroup

tmpfs 385 0 385 0% /run/user/0

tmpfs 385 1 385 1% /run/user/1000

2.接口描述

二、固件烧写

1.固件类型

固件有两种格式:

原始固件(raw firmware)

一种能以逐位复制的方式烧写到存储设备的固件,是存储设备的原始映像。原始固件一般烧写到SD卡中,但也可以烧写到eMMC中。

RK固件(Rockchip firmware)

以Rockchip专有格式打包的固件,使用Rockchip提供的upgrade_tool(Linux)或AndroidTool(Windows)工具烧写到eMMC闪存中。

Android的RK固件也可以使用SD Firmware Tool工具烧写到SD卡中。

分区映像是分区的映像数据,用于存储设备对应分区的烧写

例如,编译Android SDK会构建出boot.img、kernel.img和system.img等分区映像文件,kernel.img会被写到eMMC或SD卡的“kernel”分区。

固件分类

官方固件:官方云盘提供的Ubuntu固件中,带MBR字样的为旧版本SDK编译出来的MBR固件,带GPT字样的为新SDK编译出来的GPT固件.

DIY固件:根据《编译Ubuntu固件(GPT)》编译出来的固件为GPT固件

2.支持的系统列表

Android 7.1

Ubuntu 16.04

Ubuntu 18.04

Debian 9

3.烧录工具

烧写 SD卡

图形界面烧写工具:

Etcher (windows/linux/Mac)

命令行烧写工具

dd (Linux)

烧写 eMMC

图形界面烧写工具:

命令行烧写工具:

不同系统对应的烧录工具和固件

4.启动模式

AIO-3399C 有 32KB 的 BootRom 和 200KB 的内部 SRAM,支持从以下设备加载系统:

SPI 接口

eMMC 接口

SDMMC 接口

另外 AIO-3399C 支持从 USB OTG 接口下载系统代码。

启动次序

主控上电初始化

BootRom 代码在 SRAM 上运行,校验存储设备里的 bootloader

校验通过,加载并运行 bootloader 引导代码

bootloader 引导代码负责初始化 DDR 内存,加载 bootloader 完整代码到 DDR 内存中并运行

bootloader 加载存储设备上的 Linux 内核,并将执行权交给 Linux 内核

AIO-3399C 有三种启动模式

Normal 模式

正常的启动过程,各个组件依次加载,正常进入系统。

Loader 模式

bootloader 会进入升级状态,等待主机命令,用于固件升级等。

进入方法

Type-C数据线连接好设备和主机。

按住设备上的 RECOVERY (恢复)键并保持。

插上电源

大约两秒钟后,松开 RECOVERY 键。

MaskRom 模式

用于 bootloader 损坏时的系统修复

只有在 bootloader 校验失败(读取不了 IDR 块,或 bootloader 损坏) 的情况下,BootRom 代码 就会进入 MaskRom 模式。此时 BootRom 代码等待主机通过 USB 接口传送 bootloader 代码,加载并运行之。

5.升级步骤

通过Type-C升级到eMMC ,参考固件升级

升级完成后会自动启动,显示Firefly界面。

初始账号密码:firefly,可以使用ssh登录

1)问题总结

6.串口调试

AIO-3399C 使用以下串口参数:

波特率:1500000

数据位:8

停止位:1

奇偶校验:无

流控:无

连接图

image

三、Linux系统编译

可以包括创建Buildroot根文件系统、Debian操作系统、Ubuntu根文件系统。

1.手动制作Ubuntu根文件系统镜像

1)准备工作

安装qemu模拟器

sudo apt-get install qemu-user-static

下载和解压 ubuntu-core

Firefly-rk3399 ubuntu根文件系统是基于Ubuntu base 16.04来创建的。用户可以到ubuntu cdimg 下载,选择下载ubuntu-base-16.04.1-base-arm64.tar.gz 。

wget http://cdimage.ubuntu.com/ubuntu-base/releases/16.04/release/ubuntu-base-16.04.1-base-arm64.tar.gz

创建临时文件夹并解压根文件系统

mkdir temp

tar -xpf ubuntu-base-16.04.1-base-arm64.tar.gz -C temp

2)修改根文件系统

准备网络和qemu

sudo cp -b /etc/resolv.conf temp/etc/resolv.conf

sudo cp /usr/bin/qemu-aarch64-static temp/usr/bin/

进入根文件系统进行操作

#切换temp目录为根目录

sudo chroot temp

apt update

apt upgrade

#可以安装桌面,如apt install xubuntu-desktop,可以不需要,这样生成的文件小,制作和烧写的过程快。

apt install vim git #根据个人需求下载相关组件

useradd -s '/bin/bash' -m -G adm,sudo firefly #添加用户

passwd firefly

passwd root

exit

3)制作根文件系统

依据temp文件夹的大小来修改count值

dd if=/dev/zero of=linuxroot.img bs=1M count=2048

sudo mkfs.ext4 linuxroot.img

mkdir rootfs

sudo mount linuxroot.img rootfs/

sudo cp -rfp temp/* rootfs/

sudo umount rootfs/

e2fsck -p -f linuxroot.img

resize2fs -M linuxroot.img

生成的linuxroot.img 就是最终的根文件系统映像文件

这样的文件系统只有基本shell功能

file linuxroot.img

linuxroot.img: Linux rev 1.0 ext4 filesystem data, UUID=dde2c956-e165-436b-b4f7-25c35f11e063 (extents) (64bit) (large files) (huge files)

4)更新根文件系统

使用rockchip相关烧录工具,如AndroidTool v2.58

在下载镜像中只勾选roofs一栏,并添加其文件路径,点击执行,系统就会更新rootfs

boot分区镜像是又kernel.img(内核配置生成的文件)和resource.img(设备树生成的文件)合并而成的。

5)分区介绍

uboot 分区: 烧写 uboot 编译出来的 uboot.img.

trust 分区: 烧写 uboot 编译出来的 trust.img

misc 分区: 烧写 misc.img。开机检测进入recovery模式.(可省略)

boot 分区: 烧写 kernel 编译出来的 boot.img.包含kernel和设备树信息

recovery 分区: 烧写 recovery.img.(可省略)

backup 分区: 预留,暂时没有用。后续跟 android 一样作为 recovery 的 backup 使用.(可省略)

oem 分区: 给厂家使用,存放厂家的 app 或数据。只读。代替原来音箱的 data 分区。挂载在/oem 目录.(可省略)

rootfs 分区: 存放 buildroot 或者 debian 编出来的 rootfs.img,只读.

userdata 分 区 : 存 放 app 临 时 生 成 的 文 件 或 者 是 给 最 终 用 户 使 用 。 可 读 写 , 挂 载 在/userdata 目录下.(可省略)

2.使用官方Linux SDK编译分区镜像和统一固件

为了方便用户的使用与开发,官方提供了Linux开发的整套sdk。

1)下载源码

使用repo工具下载

repo是Android为了方便管理多个git库而开发的Python脚本。

repo是通过一个git库来管理项目的清单文件,这个git库名字叫manifests。

在客户端使用repo初始化一个项目时,就会从远程把manifests和repo这两个git库拷贝到本地,repo将自动化的管理信息都隐藏根目录的.repo子目录中。

#通过github下载

mkdir linux

cd linux

git clone https://github.com/rockchip-linux/repo

#或者

sudo apt-get install repo

下载RK3399 Linux SDK

mkdir linux-sdk

cd linux-sdk

#初始化项目,同步RK3399最新的代码

repo init --repo-url=https://github.com/rockchip-linux/repo -u https://github.com/rockchip-linux/manifests -b master -m rk3399_linux.xml

#下载代码

repo sync --no-clone-bundle #加快下载速度

#清单将所有相关的仓库(如u-boot、buildroot等)下载下来

#1.把压缩包放在上一步下载repo工具的目录下

7z x Linux_SDK.7z

#2.更新代码

repo sync -c

2)Linux_SDK 目录介绍

├── linux_sdk

│ ├── app

│ ├── buildroot buildroot根文件系统的编译目录

│ ├── build.sh -> device/rockchip/common/build.sh 全自动编译脚本

│ ├── device 编译相关配置文件

│ ├── distro debian根文件系统生成目录

│ ├── docs 文档

│ ├── envsetup.sh -> buildroot/build/envsetup.sh

│ ├── external

│ ├── kernel 内核

│ ├── Makefile -> buildroot/build/Makefile

│ ├── mkfirmware.sh -> device/rockchip/common/mkfirmware.sh rockdev链接更新脚本

│ ├── prebuilts

│ ├── rkbin

│ ├── rkflash.sh -> device/rockchip/common/rkflash.sh 烧写脚本

│ ├── rootfs debian根文件系统编译目录

│ ├── tools 烧写、打包工具

│ └── u-boot u-boot

3)搭建SDK编译环境

编译buildroot固件

sudo apt-get install repo git-core gitk git-gui gcc-arm-linux-gnueabihf u-boot-tools device-tree-compiler \

gcc-aarch64-linux-gnu mtools parted libudev-dev libusb-1.0-0-dev python-linaro-image-tools \

linaro-image-tools autoconf autotools-dev libsigsegv2 m4 intltool libdrm-dev curl sed make \

binutils build-essential gcc g++ bash patch gzip bzip2 perl tar cpio python unzip rsync file bc wget \

libncurses5 libqt4-dev libglib2.0-dev libgtk2.0-dev libglade2-dev cvs git mercurial rsync openssh-client \

subversion asciidoc w3m dblatex graphviz python-matplotlib libc6:i386 libssl-dev texinfo \

liblz4-tool genext2fs lib32stdc++6

编译debian固件

sudo apt-get install repo git-core gitk git-gui gcc-arm-linux-gnueabihf u-boot-tools device-tree-compiler \

gcc-aarch64-linux-gnu mtools parted libudev-dev libusb-1.0-0-dev python-linaro-image-tools \

linaro-image-tools gcc-4.8-multilib-arm-linux-gnueabihf gcc-arm-linux-gnueabihf libssl-dev \

gcc-aarch64-linux-gnu g+conf autotools-dev libsigsegv2 m4 intltool libdrm-dev curl sed make \

binutils build-essential gcc g++ bash patch gzip bzip2 perl tar cpio python unzip rsync file bc wget \

libncurses5 libqt4-dev libglib2.0-dev libgtk2.0-dev libglade2-dev cvs git mercurial rsync openssh-client \

subversion asciidoc w3m dblatex graphviz python-matplotlib libc6:i386 libssl-dev texinfo \

liblz4-tool genext2fs lib32stdc++6

编译ubuntu固件

会需要使用官方提供的根文件系统镜像

sudo apt-get install repo git-core gitk git-gui gcc-arm-linux-gnueabihf u-boot-tools device-tree-compiler \

gcc-aarch64-linux-gnu mtools parted libudev-dev libusb-1.0-0-dev python-linaro-image-tools \

linaro-image-tools gcc-4.8-multilib-arm-linux-gnueabihf gcc-arm-linux-gnueabihf libssl-dev \

gcc-aarch64-linux-gnu g+conf autotools-dev libsigsegv2 m4 intltool libdrm-dev curl sed make \

binutils build-essential gcc g++ bash patch gzip bzip2 perl tar cpio python unzip rsync file bc wget \

libncurses5 libqt4-dev libglib2.0-dev libgtk2.0-dev libglade2-dev cvs git mercurial rsync openssh-client \

subversion asciidoc w3m dblatex graphviz python-matplotlib libc6:i386 libssl-dev texinfo \

liblz4-tool genext2fs lib32stdc++6

可以通过build.shell脚本选择编译所需的固件

Usage: build.sh [OPTIONS]

Available options:

BoardConfig*.mk -switch to specified board config

uboot -build uboot

kernel -build kernel

modules -build kernel modules

rootfs -build default rootfs, currently build buildroot as default

buildroot -build buildroot rootfs

ramboot -build ramboot image

multi-npu_boot -build boot image for multi-npu board

yocto -build yocto rootfs

debian -build debian9 stretch rootfs

distro -build debian10 buster rootfs

pcba -build pcba

recovery -build recovery

all -build uboot, kernel, rootfs, recovery image

cleanall -clean uboot, kernel, rootfs, recovery

firmware -pack all the image we need to boot up system

updateimg -pack update image

otapackage -pack ab update otapackage image

save -save images, patches, commands used to debug

allsave -build all & firmware & updateimg & save

4)编译buildroot

注意:manifest的buildroot分支编译是会出错,所以不建议使用

载入配置文件

mk配置文件会被build.sh执行,配置环境变量(仅对当前控制台有效)

./build.sh BoardConfig.mk

#文件路径在device/rockchip/rk3399/BoardConfig.mk

配置文件关键参数说明

# Target arch

export RK_ARCH=arm64

# Uboot defconfig

export RK_UBOOT_DEFCONFIG=rk3399

#文件路径u-boot/configs/rk3399_defconfig

# Kernel defconfig

export RK_KERNEL_DEFCONFIG=rockchip_linux_defconfig

#文件路径在kernel/arch/arm64/configs/rockchip_linux_defconfig

# Kernel dts

export RK_KERNEL_DTS=rk3399-sapphire-excavator-linux

#文件路径在kernel/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-linux

# boot image type

export RK_BOOT_IMG=boot.img

# kernel image path

export RK_KERNEL_IMG=kernel/arch/arm64/boot/Image

# parameter for GPT table

export RK_PARAMETER=parameter-buildroot.txt

#文件路径在device/rockchip/rk3399/parameter-buildroot.txt

# Buildroot config

export RK_CFG_BUILDROOT=rockchip_rk3399 # Buildroot 根文件系统配置文件

# 文件路径在 `buildroot/configs/rockchip_rk3399_defconfig`

# Recovery config

export RK_CFG_RECOVERY=rockchip_rk3399_recovery # recovery 模式下根文件系统配置文件

# 文件路径在 `buildroot/configs/rockchip_rk3399_recovery_defconfig`

# target chip

export RK_TARGET_PRODUCT=rk3399

# Set rootfs type, including ext2 ext4 squashfs

export RK_ROOTFS_TYPE=ext4

# rootfs image path

export RK_ROOTFS_IMG=buildroot/output/$RK_CFG_BUILDROOT/images/rootfs.$RK_ROOTFS_TYPE

#本例中,文件路径在 `buildroot/output/rockchip_rk3399/images/rootfs.ext4`,该文件路径将在首次编译根文件系统后生成

从parameter-buildroot.txt可知分区表信息

mtdparts=rk29xxnand:

0x00002000@0x00004000(uboot),

0x00002000@0x00006000(trust),

0x00002000@0x00008000(misc),

0x00010000@0x0000a000(boot),

0x00010000@0x0001a000(recovery),

0x00010000@0x0002a000(backup),

0x00020000@0x0003a000(oem),

0x00200000@0x0005a000(rootfs),

-@0x0025a000(userdata:grow)

uuid:rootfs=614e0000-0000-4b53-8000-1d28000054a9

对比parameter-debian.txt,ubutnu的分区与debian一致

CMDLINE: mtdparts=rk29xxnand:

0x00002000@0x00004000(uboot), //0x00004000为uboot分区起始位置,0x00002000为分区的大小

0x00002000@0x00006000(trust),

0x00002000@0x00008000(misc),

0x00010000@0x0000a000(boot)

0x00010000@0x0001a000(recovery),

0x00010000@0x0002a000(backup),

0x00020000@0x0003a000(oem),

0x00700000@0x0005a000(rootfs) //rootfs分区大小为0x00700000

,-@0x0075a000(userdata:grow) //区别,debian和ubuntu的根文件系统比较大,所以需要更大的空间

uuid:rootfs=614e0000-0000-4b53-8000-1d28000054a9

firefly ubuntu统一固件分区

rk29xxnand:

0x00002000@0x00004000(uboot),

0x00002000@0x00006000(trust),

0x00010000@0x0000a000(boot),

0x00010000@0x0002a000(backup),

-@0x0005a000(rootfs:grow)

uuid:rootfs=614e0000-0000-4b53-8000-1d28000054a9

//jx-ubuntu分区表

CMDLINE: mtdparts=rk29xxnand:

0x00002000@0x00004000(uboot),

0x00002000@0x00006000(trust),

0x00010000@0x0000a000(boot),

0x00010000@0x0002a000(backup),

-@0x0005a000(rootfs:grow)

uuid:rootfs=614e0000-0000-4b53-8000-1d28000054a9

执行编译

从build.sh的usage可知,执行./build.sh all 将编译uboot, kernel, rootfs, recovery image。

编译完成后,生成文件如下:

buildroot/output/rockchip_rk3399目录

build/:包含所有的源文件

host/:主机端编译需要的工具包括交叉编译工具

images/:包含压缩好的根文件系统镜像文件

rootfs.ext4

staging/:包含编译生成的所有头文件和库,以及其他开发文件

target/:包含完整的根文件系统

buildroot/output/rockchip_rk3399_recovery目录

build/:包含所有的源文件

host/:主机端编译需要的工具包括交叉编译工具

images/:包含压缩好的根文件系统镜像文件

rootfs.ext4

recovery.img

staging/:包含编译生成的所有头文件和库,以及其他开发文件

target/:包含完整的根文件系统

uboot目录

rk3399_loader_v1.08.106.bin

trust.img

uboot.img

kernel目录

boot.img (由kernel.img和resource.img合成)

kernel.img

resource.img

自定义配置buildroot

模块配置修改

cd buildroot/output/rockchip_rk3399/

# 进入图形化配置界面,选择所需模块,保存退出

make menuconfig

# 保存到配置文件 'buildroot/configs/rockchip_rk3399_defconfig'

make savedefconfig

#编译 Buildroot 根文件系统

make

注意

进行编译时,Buildroot 根据配置,会自动从网络获取相关的软件包,包括一些第三方库,插件,实用工具等,放在dl/目录。

软件包会解压在 output/build/ 目录下,然后进行编译。

如果要修改软件包的源码,可以通过打补丁的方式进行修改,补丁集中放在 package/ 目录,Buildroot 会在解压软件包时为其打上相应的补丁。

交叉编译工具在buildroot/output/rockchip_rk3399/host/bin/目录下,编译第三方用于需要将该目录和aarch64-rockchip-linux-gnueabihf/bin/ 添加到环境变量

在sdk根目录执行:source envsetup.sh ,就会将上述路径添加到环境变量中(仅当前控制台有效)

busybox配置修改

cd buildroot/output/rockchip_rk3399/

# 进入图形化配置界面,选择所需工具,退出保存

make busybox-menuconfig

# 保存到配置文件 `board/rockchip/common/base/busybox.config`

make busybox-update-config

make

5)编译ubuntu 整合固件

载入配置文件

./build.sh BoardConfig_debian.mk

#配置文件生效会连接到device/rockchip/rk3399/BoardConfig_debian.mk

修改配置文件

# Target arch

export RK_ARCH=arm64

# Uboot defconfig

export RK_UBOOT_DEFCONFIG=firefly-rk3399 #chg rk3399

# Kernel defconfig

export RK_KERNEL_DEFCONFIG=rockchip_linux_defconfig

# Kernel dts

export RK_KERNEL_DTS=rk3399-firefly-linux #chg rk3399-sapphire-excavator-linux

# boot image type

export RK_BOOT_IMG=boot.img

# kernel image path

export RK_KERNEL_IMG=kernel/arch/arm64/boot/Image

# parameter for GPT table

export RK_PARAMETER=parameter-ubuntu.txt #chg parameter-debian.txt

# Buildroot config

export RK_CFG_BUILDROOT=rockchip_rk3399

# Recovery config

export RK_CFG_RECOVERY=rockchip_rk3399_recovery

# ramboot config

export RK_CFG_RAMBOOT=

# Pcba config

export RK_CFG_PCBA=rockchip_rk3399_pcba

# Build jobs

export RK_JOBS=12

# target chip

export RK_TARGET_PRODUCT=rk3399

# Set rootfs type, including ext2 ext4 squashfs

export RK_ROOTFS_TYPE=ext4

# packagefile for make update image

export RK_PACKAGE_FILE=rk3399-package-file #add 打包配置文件,根据tools/linux/Linux_Pack_Firmware/rockdev/rk3399-package-file作修改

# rootfs image path

export RK_ROOTFS_IMG=ubunturootfs/ubuntu_16.04_arm64_20190226150448.img #chg

parameter-ubuntu.txt分区表

将该文件放到device/rockchip/rk3399文件夹下

FIRMWARE_VER: 8.1

MACHINE_MODEL: RK3399

MACHINE_ID: 007

MANUFACTURER: RK3399

MAGIC: 0x5041524B

ATAG: 0x00200800

MACHINE: 3399

CHECK_MASK: 0x80

PWR_HLD: 0,0,A,0,1

TYPE: GPT

CMDLINE: mtdparts=rk29xxnand:0x00002000@0x00004000(uboot),0x00002000@0x00006000(trust),0x00010000@0x0000a000(boot),0x00010000@0x0002a000(backup),-@0x0005a000(rootfs:grow)

uuid:rootfs=614e0000-0000-4b53-8000-1d28000054a9

tar -xvf ubuntu_16.04_arm64_20190226150448.img.tgz

#sdk根目录下

mkdir ubunturootfs

mv ubuntu_16.04_arm64_20190226150448.img ubunturootfs/

注意:ubuntu镜像无需编译,下载的镜像已经是编译完成的rootfs。

可以使用自己制作的根文件系统镜像,用同样的方法打包

编译ubuntu

注释build.sh中build_all函数的build_rootfs,避免系统变量RK_ROOTFS_IMG被修改

./build.sh all

实际是编译其他镜像

6)固件打包

同步更新各部分镜像

运行./mkfirmware.sh命令,会将各分区镜像链接到rockdev目录,并自动更新rockdev/rootfs.img的链接

buildroot生成的分区镜像

├── boot.img -> ../kernel/boot.img

├── MiniLoaderAll.bin -> ../u-boot/rk3399_loader_v1.23.119.bin

├── misc.img -> ../device/rockchip/rockimg/wipe_all-misc.img

├── oem.img

├── parameter.txt -> ../device/rockchip/rk3399/parameter-buildroot.txt

├── recovery.img -> ../buildroot/output/rockchip_rk3399_recovery/images/recovery.img

├── rootfs.img -> ../buildroot/output/rockchip_rk3399/images/rootfs.ext2

├── trust.img -> ../u-boot/trust.img

├── uboot.img -> ../u-boot/uboot.img

└── userdata.img

ubuntu“生成”的分区镜像

├── boot.img -> ../kernel/boot.img

├── MiniLoaderAll.bin -> ../u-boot/rk3399_loader_v1.23.119.bin

├── misc.img -> ../device/rockchip/rockimg/wipe_all-misc.img

├── oem.img

├── parameter.txt -> ../device/rockchip/rk3399/parameter-ubuntu.txt

├── recovery.img -> ../buildroot/output/rockchip_rk3399_recovery/images/recovery.img

├── rootfs.img -> ../ubunturootfs/ubuntu_16.04_arm64_20190226150448.img

├── trust.img -> ../u-boot/trust.img

├── uboot.img -> ../u-boot/uboot.img

└── userdata.img

打包统一固件

注意:打包前请确认tools/linux/Linux_Pack_Firmware/rockdev/rk3399-package-file是否正确,打包配置文件的分区需要与分区表RK_PARAMETER一致,同时分区镜像名称上述rockdev目录的镜像名称一致。

# NAME Relative path

#

#HWDEF HWDEF

package-file package-file

bootloader Image/MiniLoaderAll.bin

parameter Image/parameter.txt

trust Image/trust.img

uboot Image/uboot.img

#misc Image/misc.img

#resource Image/resource.img

#kernel Image/kernel.img

boot Image/boot.img

#recovery Image/recovery.img

rootfs Image/rootfs.img

#oem Image/oem.img

#userdata:grow Image/userdata.img

# 要写入backup分区的文件就是自身(update.img)

# SELF 是关键字,表示升级文件(update.img)自身

# 在生成升级文件时,不加入SELF文件的内容,但在头部信息中有记录

# 在解包升级文件时,不解包SELF文件的内容。

backup RESERVED

#update-script update-script

#recover-script recover-script

整合统一固件:./build.sh updateimg

将在rockdev/目录生成update.img

3.问题发现与调试

编译ubuntu统一固件的uboot有异常,系统会无法进入loader更新

编译ubuntu统一固件的boot固件会导致串口数据乱码,且无法进入文件系统

需要参考firefly的官方sdk,对比内核和uboot的配置文件做了哪些修改

你可能感兴趣的:(c语言编译,aiocompiler)