Difference between revisions of "Template:RK3588-BuildFromSource/zh"

From FriendlyELEC WiKi
Jump to: navigation, search
(updated by API)
(updated by API)
 
(7 intermediate revisions by the same user not shown)
Line 13: Line 13:
 
=====版本FriendlyWrt 23.05=====
 
=====版本FriendlyWrt 23.05=====
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
mkdir friendlywrt22-rk3588
+
mkdir friendlywrt23-rk3588
cd friendlywrt22-rk3588
+
cd friendlywrt23-rk3588
 
git clone https://github.com/friendlyarm/repo --depth 1 tools
 
git clone https://github.com/friendlyarm/repo --depth 1 tools
 
tools/repo init -u https://github.com/friendlyarm/friendlywrt_manifests -b master-v23.05 \
 
tools/repo init -u https://github.com/friendlyarm/friendlywrt_manifests -b master-v23.05 \
Line 73: Line 73:
 
! 交叉编译器
 
! 交叉编译器
 
! 分区类型
 
! 分区类型
! 构建脚本
+
! 构建工具集
 
! 内核代码分支
 
! 内核代码分支
 
! 内核配置
 
! 内核配置
Line 80: Line 80:
 
|-
 
|-
 
| buildroot
 
| buildroot
| rowspan="13" | linux v5.10.y
+
| linux v5.10.y
| rowspan="13" | u-boot <br />v2017.09
+
| rowspan="14" | u-boot <br />v2017.09
| rowspan="13" | 11.3-aarch64
+
| rowspan="14" | 11.3-aarch64
| rowspan="13" | [https://github.com/friendlyarm/sd-fuse_rk3588/blob/master/prebuilt/parameter.template GPT]
+
| [https://github.com/friendlyarm/sd-fuse_rk3588/blob/master/prebuilt/parameter.template GPT]
| rowspan="13" | [https://github.com/friendlyarm/sd-fuse_rk3588/tree/master sd-fuse]
+
| [https://github.com/friendlyarm/sd-fuse_rk3588/tree/master sd-fuse]
| rowspan="13" | [https://github.com/friendlyarm/kernel-rockchip/tree/nanopi5-v5.10.y_opt nanopi5-v5.10.y_opt]
+
| [https://github.com/friendlyarm/kernel-rockchip/tree/nanopi5-v5.10.y_opt nanopi5-v5.10.y_opt]
| rowspan="9" | nanopi6_linux_defconfig
+
| rowspan="10" | nanopi6_linux_defconfig
| rowspan="13" | [https://github.com/friendlyarm/uboot-rockchip/tree/nanopi6-v2017.09 nanopi6-v2017.09]
+
| rowspan="14" | [https://github.com/friendlyarm/uboot-rockchip/tree/nanopi6-v2017.09 nanopi6-v2017.09]
| rowspan="13" | nanopi6_defconfig
+
| rowspan="14" | nanopi6_defconfig
 +
|-
 +
| openmediavault-arm64
 +
| rowspan="13" | linux v6.1.y
 +
| [https://github.com/friendlyarm/sd-fuse_rk3588/blob/kernel-6.1.y/prebuilt/parameter-ext4.txt GPT]
 +
| rowspan="13" | [https://github.com/friendlyarm/sd-fuse_rk3588/tree/kernel-6.1.y sd-fuse]
 +
| rowspan="13" | [https://github.com/friendlyarm/kernel-rockchip/tree/nanopi6-v6.1.y nanopi6-v6.1.y]
 
|-
 
|-
 
| ubuntu-jammy-desktop-arm64
 
| ubuntu-jammy-desktop-arm64
 +
| rowspan="12" | [https://github.com/friendlyarm/sd-fuse_rk3588/blob/kernel-6.1.y/prebuilt/parameter.template GPT]
 
|-
 
|-
 
| ubuntu-jammy-minimal-arm64
 
| ubuntu-jammy-minimal-arm64
 
|-
 
|-
 
| ubuntu-jammy-x11-desktop-arm64
 
| ubuntu-jammy-x11-desktop-arm64
 +
|-
 +
| ubuntu-focal-desktop-arm64
 
|-
 
|-
 
| friendlycore-focal-arm64
 
| friendlycore-focal-arm64
 
|-
 
|-
| debian-bullseye-core-arm64
+
| debian-bookworm-core-arm64
 
|-
 
|-
 
| debian-bullseye-desktop-arm64
 
| debian-bullseye-desktop-arm64
 
|-
 
|-
 
| debian-bullseye-minimal-arm64
 
| debian-bullseye-minimal-arm64
|-
 
| debian-buster-desktop-arm64
 
 
|-
 
|-
 
| friendlywrt21
 
| friendlywrt21
Line 111: Line 118:
 
| friendlywrt21-docker
 
| friendlywrt21-docker
 
|-
 
|-
| friendlywrt22
+
| friendlywrt23
 
|-
 
|-
| friendlywrt22-docker
+
| friendlywrt23-docker
 
|}
 
|}
 
* 内核源代码仓库地址:https://github.com/friendlyarm/kernel-rockchip
 
* 内核源代码仓库地址:https://github.com/friendlyarm/kernel-rockchip
Line 121: Line 128:
 
export PATH=/opt/FriendlyARM/toolchain/11.3-aarch64/bin/:$PATH
 
export PATH=/opt/FriendlyARM/toolchain/11.3-aarch64/bin/:$PATH
 
</syntaxhighlight>
 
</syntaxhighlight>
* [https://github.com/friendlyarm/sd-fuse_rk3588/tree/master sd-fuse]构建脚本可以用于快速编译kernel和uboot、重新打包sd卡固件与卡刷固件等
+
* [https://github.com/friendlyarm/sd-fuse_rk3588/tree/kernel-6.1.y sd-fuse]构建脚本可以用于快速编译kernel和uboot、重新打包sd卡固件与卡刷固件等
====编译内核linux-v5.10.y====
+
====编译内核linux-v6.1.y====
 
下载源代码并编译:
 
下载源代码并编译:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
git clone https://github.com/friendlyarm/kernel-rockchip --single-branch --depth 1 -b nanopi5-v5.10.y_opt kernel-rockchip
+
git clone https://github.com/friendlyarm/kernel-rockchip --single-branch --depth 1 -b nanopi6-v6.1.y kernel-rockchip
 
cd kernel-rockchip
 
cd kernel-rockchip
 
export PATH=/opt/FriendlyARM/toolchain/11.3-aarch64/bin/:$PATH
 
export PATH=/opt/FriendlyARM/toolchain/11.3-aarch64/bin/:$PATH
Line 169: Line 176:
 
|-
 
|-
 
| uboot.img
 
| uboot.img
| rk3588_spl_loader_v1.08.111.bin (打包时改名为MiniLoaderAll.bin)
+
| rk3588_spl_loader_xx.yy.zzz.bin (打包时改名为MiniLoaderAll.bin)
 
|}
 
|}
 
安装u-boot: <br />
 
安装u-boot: <br />
Line 209: Line 216:
 
如果要更新uboot:
 
如果要更新uboot:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
dd if=boot.img of=/dev/mmcblk2p1 bs=1M
+
dd if=uboot.img of=/dev/mmcblk2p1 bs=1M
 
</syntaxhighlight>
 
</syntaxhighlight>
 
如果要更新内核驱动模块,将新驱动模块目录上传并替换以下目录下的文件即可:/lib/modules。
 
如果要更新内核驱动模块,将新驱动模块目录上传并替换以下目录下的文件即可:/lib/modules。
Line 224: Line 231:
 
! 构建脚本
 
! 构建脚本
 
|-
 
|-
| linux v5.10.y
+
| linux v6.1.y
| [https://github.com/friendlyarm/sd-fuse_rk3588/tree/master sd-fuse_rk3588]
+
| [https://github.com/friendlyarm/sd-fuse_rk3588/tree/kernel-6.1.y sd-fuse_rk3588]
 
|}
 
|}
 
=====线刷=====
 
=====线刷=====
 
======Linux系统======
 
======Linux系统======
用upgrade_tool工具烧写uboot与内核, 命令如下所示:
+
用以下命令让开发板进入loader模式:
 +
<syntaxhighlight lang="bash">
 +
sudo reboot loader
 +
</syntaxhighlight>
 +
用 upgrade_tool_v2.17_for_linux 工具烧写uboot与内核, 命令如下所示:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
sudo upgrade_tool ul MiniLoaderAll.bin
+
sudo upgrade_tool di -k kernel.img
sudo upgrade_tool di -p parameter.txt
+
sudo upgrade_tool di -re resource.img
sudo upgrade_tool di uboot uboot.img
+
sudo upgrade_tool di -u uboot.img
sudo upgrade_tool di resource resource.img
+
sudo upgrade_tool di kernel kernel.img
+
 
sudo upgrade_tool RD
 
sudo upgrade_tool RD
 
</syntaxhighlight>
 
</syntaxhighlight>
注:upgrade_tool是Rockchip提供的Linux下的命令行工具(Linux_Upgrade_Tool)
+
注:upgrade_tool是Rockchip提供的Linux下的命令行工具(Linux_Upgrade_Tool),需要使用v2以上版本。
  
 
===使用脚本进行编译===
 
===使用脚本进行编译===
Line 244: Line 253:
 
以friendlycore-focal系统为例,从github克隆下载脚本, 并解压friendlycore-focal系统的映象文件,映象文件可以在网盘的"03_分区镜像文件"目录找到:
 
以friendlycore-focal系统为例,从github克隆下载脚本, 并解压friendlycore-focal系统的映象文件,映象文件可以在网盘的"03_分区镜像文件"目录找到:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
git clone https://github.com/friendlyarm/sd-fuse_rk3588.git --single-branch -b master
+
git clone https://github.com/friendlyarm/sd-fuse_rk3588.git --single-branch -b kernel-6.1.y
 
cd sd-fuse_rk3588
 
cd sd-fuse_rk3588
 
tar xvzf /path/to/netdrive/03_分区镜像文件/friendlycore-focal-arm64-images.tgz
 
tar xvzf /path/to/netdrive/03_分区镜像文件/friendlycore-focal-arm64-images.tgz
Line 251: Line 260:
 
下载内核源代码并编译,编译完成后会自动更新 friendlycore-focal-arm64 目录下的相关映象文件,包括文件系统中的内核模块 (rootfs.img会被解包并重新打包):
 
下载内核源代码并编译,编译完成后会自动更新 friendlycore-focal-arm64 目录下的相关映象文件,包括文件系统中的内核模块 (rootfs.img会被解包并重新打包):
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
git clone https://github.com/friendlyarm/kernel-rockchip --depth 1 -b nanopi5-v5.10.y_opt kernel-rk3588
+
git clone https://github.com/friendlyarm/kernel-rockchip --depth 1 -b nanopi6-v6.1.y kernel-rk3588
 
KERNEL_SRC=$PWD/kernel-rk3588 ./build-kernel.sh friendlycore-focal-arm64
 
KERNEL_SRC=$PWD/kernel-rk3588 ./build-kernel.sh friendlycore-focal-arm64
 
</syntaxhighlight>
 
</syntaxhighlight>
 
====编译内核头文件====
 
====编译内核头文件====
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
git clone https://github.com/friendlyarm/kernel-rockchip --depth 1 -b nanopi5-v5.10.y_opt kernel-rk3588
+
git clone https://github.com/friendlyarm/kernel-rockchip --depth 1 -b nanopi6-v6.1.y kernel-rk3588
 
MK_HEADERS_DEB=1 BUILD_THIRD_PARTY_DRIVER=0 KERNEL_SRC=$PWD/kernel-rk3588 ./build-kernel.sh friendlycore-focal-arm64
 
MK_HEADERS_DEB=1 BUILD_THIRD_PARTY_DRIVER=0 KERNEL_SRC=$PWD/kernel-rk3588 ./build-kernel.sh friendlycore-focal-arm64
 
</syntaxhighlight>
 
</syntaxhighlight>

Latest revision as of 08:18, 1 July 2024

1 编译 Openwrt/Friendlywrt

1.1 下载源代码

FriendlyWrt有两个版本, 请根据需要进行选择.

1.1.1 版本FriendlyWrt 21.02
mkdir friendlywrt21-rk3588
cd friendlywrt21-rk3588
git clone https://github.com/friendlyarm/repo --depth 1 tools
tools/repo init -u https://github.com/friendlyarm/friendlywrt_manifests -b master-v21.02 \
        -m rk3588.xml --repo-url=https://github.com/friendlyarm/repo  --no-clone-bundle
tools/repo sync -c  --no-clone-bundle
1.1.2 版本FriendlyWrt 23.05
mkdir friendlywrt23-rk3588
cd friendlywrt23-rk3588
git clone https://github.com/friendlyarm/repo --depth 1 tools
tools/repo init -u https://github.com/friendlyarm/friendlywrt_manifests -b master-v23.05 \
        -m rk3588.xml --repo-url=https://github.com/friendlyarm/repo  --no-clone-bundle
tools/repo sync -c  --no-clone-bundle

1.2 首次编译

下面的命令是编译不带docker的版本, 如需要编译带docker的版本, 请将rk3588.mk替换为rk3588-docker.mk:

./build.sh rk3588.mk

会编译所有组件(包含u-boot, kernel 和 friendlywrt)并生成sd卡镜像文件,再执行以下命令,可生成用于安装系统到emmc运行的镜像文件(eflahser固件):

./build.sh emmc-img

对项目进行过修改后, 需要重新打包sd卡镜像, 可执行如下命令:

./build.sh sd-img

1.3 二次编译

cd friendlywrt
make menuconfig #改动FriendlyWrt的配置
rm -rf ./tmp
make -j${nproc}
cd ../
./build.sh sd-img
./build.sh emmc-img

1.4 单独编译u-boot

./build.sh uboot

1.5 单独编译kernel

./build.sh kernel

1.6 单独编译friendlywrt

./build.sh friendlywrt

或者进入friendlywrt目录, 按标准openwrt的命令操作, 上面的命令出现错误时, 可尝试使用以下命令单线程编译:

cd friendlywrt
make -j1 V=s

2 编译Buildroot

请参考: Buildroot

3 其他Linux系统编译

3.1 各个OS对应的内核与u-boot版本

操作系统 内核版本 uboot版本 交叉编译器 分区类型 构建工具集 内核代码分支 内核配置 uboot代码分支 uboot配置
buildroot linux v5.10.y u-boot
v2017.09
11.3-aarch64 GPT sd-fuse nanopi5-v5.10.y_opt nanopi6_linux_defconfig nanopi6-v2017.09 nanopi6_defconfig
openmediavault-arm64 linux v6.1.y GPT sd-fuse nanopi6-v6.1.y
ubuntu-jammy-desktop-arm64 GPT
ubuntu-jammy-minimal-arm64
ubuntu-jammy-x11-desktop-arm64
ubuntu-focal-desktop-arm64
friendlycore-focal-arm64
debian-bookworm-core-arm64
debian-bullseye-desktop-arm64
debian-bullseye-minimal-arm64
friendlywrt21 nanopi6_linux_defconfig
friendlywrt.config
friendlywrt21-docker
friendlywrt23
friendlywrt23-docker
export PATH=/opt/FriendlyARM/toolchain/11.3-aarch64/bin/:$PATH
  • sd-fuse构建脚本可以用于快速编译kernel和uboot、重新打包sd卡固件与卡刷固件等

3.2 编译内核linux-v6.1.y

下载源代码并编译:

git clone https://github.com/friendlyarm/kernel-rockchip --single-branch --depth 1 -b nanopi6-v6.1.y kernel-rockchip
cd kernel-rockchip
export PATH=/opt/FriendlyARM/toolchain/11.3-aarch64/bin/:$PATH
touch .scmversion
# 配置内核
# option1: 加载Linux系统配置
make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 nanopi6_linux_defconfig
# option2: 加载FriendlyWrt系统配置
# make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 nanopi6_linux_defconfig friendlywrt.config
# 启动配置界面
# make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 menuconfig
# 编译内核
make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 nanopi6-images -j$(nproc)
# 编译驱动模块
mkdir -p out-modules && rm -rf out-modules/*
make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 INSTALL_MOD_PATH="$PWD/out-modules" modules -j$(nproc)
make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 INSTALL_MOD_PATH="$PWD/out-modules" modules_install
KERNEL_VER=$(make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 kernelrelease)
[ ! -f "$PWD/out-modules/lib/modules/${KERNEL_VER}/modules.dep" ] && depmod -b $PWD/out-modules -E Module.symvers -F System.map -w ${KERNEL_VER}
(cd $PWD/out-modules && find . -name \*.ko | xargs aarch64-linux-strip --strip-unneeded)

完成后会得到如下文件:

kernel.img resource.img boot.img (此img弃用) 驱动模块位于out-modules目录

安装内核:
请参考 #应用新编译的uboot与内核

3.3 编译u-boot v2017.09

下载源代码并编译:

git clone https://github.com/friendlyarm/rkbin --single-branch --depth 1 -b nanopi6
git clone https://github.com/friendlyarm/uboot-rockchip --single-branch --depth 1 -b nanopi6-v2017.09
export PATH=/opt/FriendlyARM/toolchain/11.3-aarch64/bin/:$PATH
cd uboot-rockchip/
./make.sh nanopi6

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

uboot.img rk3588_spl_loader_xx.yy.zzz.bin (打包时改名为MiniLoaderAll.bin)

安装u-boot:
请参考 #应用新编译的uboot与内核

3.4 应用新编译的uboot与内核

3.4.1 安装到目标板

由于rk3588的OS默认均采用GPT分区, 可以用dd命令将image文件烧写至image对应的分区,SD卡与eMMC的设备节点如下:

  • SD/TF Card设备节点为 /dev/mmcblk0
  • eMMC设备节点为 /dev/mmcblk2

下面将演示如何将内核更新到eMMC:
使用parted命令查看分区布局:

parted /dev/mmcblk2 print

得到如下输出:

Model: MMC A3A551 (sd/mmc)
Disk /dev/mmcblk2: 31.0GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
 
Number  Start   End     Size    File system  Name      Flags
 1      8389kB  12.6MB  4194kB               uboot
 2      12.6MB  16.8MB  4194kB               misc
 3      16.8MB  21.0MB  4194kB               dtbo
 4      21.0MB  37.7MB  16.8MB               resource
 5      37.7MB  79.7MB  41.9MB               kernel
 6      79.7MB  113MB   33.6MB               boot
 7      113MB   147MB   33.6MB               recovery
 8      147MB   31.0GB  30.9GB  ext4         rootfs

resource分区的序号为4, kernel分区的序号为5,对应的设备节点为/dev/mmcblk2p4和/dev/mmcblk2p5, dd命令如下:

dd if=resource.img of=/dev/mmcblk2p4 bs=1M
dd if=kernel.img of=/dev/mmcblk2p5 bs=1M

如果要更新uboot:

dd if=uboot.img of=/dev/mmcblk2p1 bs=1M

如果要更新内核驱动模块,将新驱动模块目录上传并替换以下目录下的文件即可:/lib/modules。

3.4.2 打包新的SD Image

sd-fuse 提供一些工具和脚本, 用于制作SD卡固件, 具体用途如下:

  • 制作分区镜像文件, 例如将rootfs目录打包成rootfs.img
  • 将多个分区镜像文件打包成可直接写SD卡的单一镜像文件
  • 简化内核和uboot的编译, 一键编译内核、第三方驱动, 并更新rootfs.img中的内核模块

请根据所用的内核版本点击对应的链接了解详细的使用方法:

内核版本 构建脚本
linux v6.1.y sd-fuse_rk3588
3.4.3 线刷
3.4.3.1 Linux系统

用以下命令让开发板进入loader模式:

sudo reboot loader

用 upgrade_tool_v2.17_for_linux 工具烧写uboot与内核, 命令如下所示:

sudo upgrade_tool di -k kernel.img
sudo upgrade_tool di -re resource.img
sudo upgrade_tool di -u uboot.img
sudo upgrade_tool RD

注:upgrade_tool是Rockchip提供的Linux下的命令行工具(Linux_Upgrade_Tool),需要使用v2以上版本。

4 使用脚本进行编译

4.1 下载工具与固件

以friendlycore-focal系统为例,从github克隆下载脚本, 并解压friendlycore-focal系统的映象文件,映象文件可以在网盘的"03_分区镜像文件"目录找到:

git clone https://github.com/friendlyarm/sd-fuse_rk3588.git --single-branch -b kernel-6.1.y
cd sd-fuse_rk3588
tar xvzf /path/to/netdrive/03_分区镜像文件/friendlycore-focal-arm64-images.tgz

4.2 编译内核

下载内核源代码并编译,编译完成后会自动更新 friendlycore-focal-arm64 目录下的相关映象文件,包括文件系统中的内核模块 (rootfs.img会被解包并重新打包):

git clone https://github.com/friendlyarm/kernel-rockchip --depth 1 -b nanopi6-v6.1.y kernel-rk3588
KERNEL_SRC=$PWD/kernel-rk3588 ./build-kernel.sh friendlycore-focal-arm64

4.3 编译内核头文件

git clone https://github.com/friendlyarm/kernel-rockchip --depth 1 -b nanopi6-v6.1.y kernel-rk3588
MK_HEADERS_DEB=1 BUILD_THIRD_PARTY_DRIVER=0 KERNEL_SRC=$PWD/kernel-rk3588 ./build-kernel.sh friendlycore-focal-arm64

4.4 编译uboot

下载uboot源代码并编译,编译完成后会自动更新 friendlycore-focal-arm64 目录下的相关映象文件:

git clone https://github.com/friendlyarm/uboot-rockchip --depth 1 -b nanopi6-v2017.09
UBOOT_SRC=$PWD/uboot-rockchip ./build-uboot.sh friendlycore-focal-arm64

4.5 生成新固件

将friendlycore-focal-arm64目录下的映象文件重新打包成sd卡固件:

./mk-sd-image.sh friendlycore-focal-arm64

命令完成后,固件位于out目录,可以用 dd 命令制作sd启动卡,举例说明:

dd if=out/rk3588-sd-friendlycore-focal-5.10-arm64-YYYYMMDD.img of=/dev/sdX bs=1M

5 Android系统编译

5.1 电脑的软硬件要求

  • 至少配置16G以上内存+300G磁盘空间,建议使用32G内存+大容量高速SSD的机器,不建议使用虚拟机;
  • 如遇到编译错误,可能是编译环境问题,推荐使用如下Docker容器进行编译:docker-cross-compiler-novnc

5.2 从网盘下载Android源代码

网盘地址:点击进入
网盘路径:07_源代码/rk35xx-android12-xxxxxxx-YYYYMMDD.tgz (YYYYMMDD表示打包的日期, xxxxxxx表示最后的commit-id)
使用如下命令解压并拉取更新:

tar xzf /path/to/netdisk/07_源代码/rk35xx-android12-xxxxxxx-YYYYMMDD.tgz
cd rk35xx-android12
git pull

5.3 编译Android Tablet版本(首次编译)

echo "ROCKCHIP_DEVICE_DIR := device/rockchip/rk3588/nanopi6" > .rockchip_device.mk
# export INSTALL_GAPPS_FOR_TESTING=yes  # 是否包含google apps
. setenv.sh
./build.sh -FMu

5.4 编译Android TV版本(首次编译)

echo "ROCKCHIP_DEVICE_DIR := device/rockchip/rk3588/nanopi6_box" > .rockchip_device.mk
# export INSTALL_GAPPS_FOR_TESTING=yes  # 是否包含google apps
. setenv.sh
./build.sh -FMu

5.5 二次编译

# export INSTALL_GAPPS_FOR_TESTING=yes  # 是否包含google apps
. setenv.sh
make
./build.sh -Mu

5.6 安装Android

Android编译完成后,image文件会存放在Android源代码目录的 rockdev/Image-aosp_nanopi3 子目录下。

5.6.1 USB线刷

用rockchip的工具刷入如下文件:rockdev/Image-aosp_nanopi3/update.img

5.6.2 SD卡烧写

参考以下步骤:
1) 将安装了 eflasher 系统的SD卡插入电脑;
2) 将 rockdev/Image-aosp_nanopi3 子目录下的文件更新到SD卡 FRIENDLYARM 分区里的android12或androidtv目录:

sudo cp -af parameter.txt config.cfg MiniLoaderAll.bin uboot.img \
    dtbo.img vbmeta.img boot.img recovery.img \
    misc.img pcba_small_misc.img pcba_whole_misc.img \
    baseparameter.img super.img /media/$USER/FriendlyARM/android12

3) 将SD卡插入{{{1}}},重新烧写Andorid系统即可;

5.7 打包成新的SD Image

git clone https://github.com/friendlyarm/sd-fuse_rk3588.git
SDFUSE=$PWD/sd-fuse_rk3588
mkdir $SDFUSE/android12
 
cd /path/to/rk35xx-android12/rockdev/Image-aosp_nanopi3
cp -af parameter.txt config.cfg MiniLoaderAll.bin uboot.img \
    dtbo.img vbmeta.img boot.img recovery.img \
    misc.img pcba_small_misc.img pcba_whole_misc.img \
    baseparameter.img super.img $SDFUSE/android12
 
cd $SDFUSE/
./mk-sd-image.sh android12
 
tar xvzf /path/to/netdrive/03_Partition\ image\ files/emmc-flasher-images.tgz
./mk-emmc-image.sh android12

更多信息,请参考 #打包新的SD Image