Difference between revisions of "APITestPage/zh"

From FriendlyELEC WiKi
Jump to: navigation, search
Line 1: Line 1:
===How to compile custom kernel and u-boot===
+
===Linux系统编译===
====Kernel and u-boot versions for each OS====
+
====各个OS对应的内核与u-boot版本====
 
{| class="wikitable"  
 
{| class="wikitable"  
 
|-
 
|-
! Operating System
+
! 操作系统
! Kernel Version
+
! 内核版本
! U-boot version
+
! uboot版本
! Cross-compiler
+
! 交叉编译器
! Partition type
+
! 分区类型
! Build toolset
+
! 构建脚本
! Kernel code branch
+
! 内核代码分支
! Kernel configuration
+
! 内核配置
! U-boot code branch
+
! uboot代码分支
! u-boot configuration
+
! uboot配置
 
|-
 
|-
 
| buildroot
 
| buildroot
Line 44: Line 44:
 
| friendlywrt22-docker
 
| friendlywrt22-docker
 
|}
 
|}
* Kernel source code repository:https://github.com/friendlyarm/kernel-rockchip
+
* 内核源代码仓库地址:https://github.com/friendlyarm/kernel-rockchip
* u-boot source code repository:https://github.com/friendlyarm/uboot-rockchip
+
* u-boot源代码仓库地址:https://github.com/friendlyarm/uboot-rockchip
* The cross-compile toolchain is located in the path: /opt/FriendlyARM/toolchain/. Using the toolchain is as simple as adding the toolchain’s bin directory in your PATH, such as:
+
* 交叉编译工具链存放在如下路径: /opt/FriendlyARM/toolchain/,使用前需导出到PATH环境变量,例如需要使用11.3-aarch64版本的编译器,使用如下命令:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
export PATH=/opt/FriendlyARM/toolchain/11.3-aarch64/bin/:$PATH
 
export PATH=/opt/FriendlyARM/toolchain/11.3-aarch64/bin/:$PATH
 
</syntaxhighlight>
 
</syntaxhighlight>
* The [https://github.com/friendlyarm/sd-fuse_rk3568/tree/master sd-fuse] is a bunch of scripts to build bootable SD card images.
+
* [https://github.com/friendlyarm/sd-fuse_rk3568/tree/master sd-fuse]构建脚本可以用于快速编译kernel和uboot、重新打包sd卡固件与卡刷固件等
====Compile kernel linux-v5.10.y====
+
====编译内核linux-v5.10.y====
Download the source code and compile as follows:
+
下载源代码并编译:
 
<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 nanopi5-v5.10.y_opt kernel-rockchip
Line 58: Line 58:
 
export PATH=/opt/FriendlyARM/toolchain/11.3-aarch64/bin/:$PATH
 
export PATH=/opt/FriendlyARM/toolchain/11.3-aarch64/bin/:$PATH
 
touch .scmversion
 
touch .scmversion
# Configuring the Kernel
+
# 配置内核
# Option1: Load Linux system configuration
+
# option1: 加载Linux系统配置
 
make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 nanopi5_linux_defconfig
 
make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 nanopi5_linux_defconfig
# Option2: Load FriendlyWrt system configuration
+
# option2: 加载FriendlyWrt系统配置
 
# make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 nanopi5_linux_defconfig friendlywrt.config
 
# make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 nanopi5_linux_defconfig friendlywrt.config
# Launch configuration interface
+
# 启动配置界面
 
# make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 menuconfig
 
# make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 menuconfig
# Compiling Kernel
+
# 编译内核
 
make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 nanopi5-images -j$(nproc)
 
make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 nanopi5-images -j$(nproc)
# Compiling the driver modules
+
# 编译驱动模块
 
mkdir -p out-modules && rm -rf out-modules/*
 
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 -j$(nproc)
Line 75: Line 75:
 
(cd $PWD/out-modules && find . -name \*.ko | xargs aarch64-linux-strip --strip-unneeded)
 
(cd $PWD/out-modules && find . -name \*.ko | xargs aarch64-linux-strip --strip-unneeded)
 
</syntaxhighlight>
 
</syntaxhighlight>
After compilation there will be some files in corresponding folder named as:
+
完成后会得到如下文件:
 
{| class="wikitable"  
 
{| class="wikitable"  
 
|-
 
|-
 
| kernel.img
 
| kernel.img
 
| resource.img
 
| resource.img
| <del>boot.img This img is deprecated</del>
+
| <del>boot.img (此img弃用)</del>
| The kernel modules are located in the out-modules directory
+
| 驱动模块位于out-modules目录
 
|}
 
|}
Installing the kernel: <br>
+
安装内核: <br>
Please click on [[#Download u-boot and the kernel to the target board]]<br>
+
请参考 [[#下载uboot与内核到目标板]]<br>
====Compile u-boot v2017.09====
+
====编译u-boot v2017.09====
Download the source code and compile as follows:
+
下载源代码并编译:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
git clone https://github.com/friendlyarm/rkbin --single-branch --depth 1 -b nanopi5
 
git clone https://github.com/friendlyarm/rkbin --single-branch --depth 1 -b nanopi5
Line 94: Line 94:
 
./make.sh nanopi5
 
./make.sh nanopi5
 
</syntaxhighlight>
 
</syntaxhighlight>
After the compilation, the following files will be generated:
+
编译完成后会生成如下文件:
 
{| class="wikitable"  
 
{| class="wikitable"  
 
|-
 
|-
 
| uboot.img
 
| uboot.img
| rk356x_spl_loader_v1.15.112.bin (Before packaging, you need to rename it to MiniLoaderAll.bin)
+
| rk356x_spl_loader_v1.15.112.bin (打包时改名为MiniLoaderAll.bin)
 
|}
 
|}
Installing the u-boot: <br>
+
安装u-boot: <br />
Please click on [[#Download u-boot and the kernel to the target board]]<br>
+
请参考 [[#下载uboot与内核到目标板]]<br>
  
====Download u-boot and the kernel to the target board====
+
====应用新编译的uboot与内核====
=====Download to the installed system=====
+
=====安装到目标板=====
Since the RK3568's OS uses GPT partitions by default, you can use the dd command to write the image file to the partition, the device nodes for SD card and eMMC are shown below:
+
由于RK3568的OS默认均采用GPT分区, 可以用dd命令将image文件烧写至image对应的分区,SD卡与eMMC的设备节点如下:
* The SD/TF Card device node: /dev/mmcblk0 <br />
+
* SD/TF Card设备节点为 /dev/mmcblk0 <br />
* The eMMC device node: /dev/mmcblk2 <br />
+
* eMMC设备节点为 /dev/mmcblk2 <br />
The following is an example of how to update the kernel to eMMC:<br />
+
下面将演示如何将内核更新到eMMC:<br />
Use the 'parted' command to view the partition layout:
+
使用parted命令查看分区布局:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
parted /dev/mmcblk2 print
 
parted /dev/mmcblk2 print
 
</syntaxhighlight>
 
</syntaxhighlight>
You should get output similar to the following:
+
得到如下输出:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
Model: MMC A3A551 (sd/mmc)
 
Model: MMC A3A551 (sd/mmc)
Line 131: Line 131:
 
  8      147MB  31.0GB  30.9GB  ext4        rootfs
 
  8      147MB  31.0GB  30.9GB  ext4        rootfs
 
</syntaxhighlight>
 
</syntaxhighlight>
as shown above, the resource partition is located at 4 and the kernel partition is located at 5. Use the dd command to write the resource.img and kernel.img files to these partitions, the commands are as follows:
+
resource分区的序号为4, kernel分区的序号为5,对应的设备节点为/dev/mmcblk2p4和/dev/mmcblk2p5, dd命令如下:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
dd if=resource.img of=/dev/mmcblk2p4 bs=1M
 
dd if=resource.img of=/dev/mmcblk2p4 bs=1M
 
dd if=kernel.img of=/dev/mmcblk2p5 bs=1M
 
dd if=kernel.img of=/dev/mmcblk2p5 bs=1M
 
</syntaxhighlight>
 
</syntaxhighlight>
If you want to update u-boot:
+
如果要更新uboot:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
dd if=boot.img of=/dev/mmcblk2p1 bs=1M
 
dd if=boot.img of=/dev/mmcblk2p1 bs=1M
 
</syntaxhighlight>
 
</syntaxhighlight>
To update new driver modules, copy the newly compiled driver modules to the appropriate directory under /lib/modules.
+
如果要更新内核驱动模块,将新驱动模块目录上传并替换以下目录下的文件即可:/lib/modules。
  
=====How to create a new OS image file=====
+
=====打包新的SD Image=====
To create a new OS image file, you need to use the "sd-fuse" packaging tool.<br />
+
sd-fuse 提供一些工具和脚本, 用于制作SD卡固件, 具体用途如下:<br />
<br />
+
* 制作分区镜像文件, 例如将rootfs目录打包成rootfs.img<br />
"sd-fuse" is a collection of scripts that can be used to create bootable SD card images for FriendlyElec boards. Its main features include:<br />
+
* 将多个分区镜像文件打包成可直接写SD卡的单一镜像文件<br />
* Creation of root filesystem images from a directory <br />
+
* 简化内核和uboot的编译, 一键编译内核、第三方驱动, 并更新rootfs.img中的内核模块<br />
* Building of bootable SD card images<br />
+
请根据所用的内核版本点击对应的链接了解详细的使用方法:
* Simple compilation of kernel, U-Boot, and third-party drivers<br />
+
Please click on the following link to find out more:
+
 
{| class="wikitable"  
 
{| class="wikitable"  
 
|-
 
|-
! Kernel version
+
! 内核版本
! Build toolset
+
! 构建脚本
 
|-
 
|-
 
| linux v5.10.y
 
| linux v5.10.y
 
| [https://github.com/friendlyarm/sd-fuse_rk3568/tree/master<br /> sd-fuse_rk3568]
 
| [https://github.com/friendlyarm/sd-fuse_rk3568/tree/master<br /> sd-fuse_rk3568]
 
|}
 
|}
=====USB flashing=====
+
=====线刷=====
======Linux======
+
======Linux系统======
To flash U-Boot and kernel using the "upgrade_tool" tool, please use the following command:
+
用upgrade_tool工具烧写uboot与内核, 命令如下所示:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
sudo upgrade_tool ul MiniLoaderAll.bin
 
sudo upgrade_tool ul MiniLoaderAll.bin
Line 169: Line 167:
 
sudo upgrade_tool RD
 
sudo upgrade_tool RD
 
</syntaxhighlight>
 
</syntaxhighlight>
Note: "upgrade_tool" is a command-line tool provided by Rockchip for Linux operating systems (Linux_Upgrade_Tool).
+
注:upgrade_tool是Rockchip提供的Linux下的命令行工具(Linux_Upgrade_Tool)
 +
===Android系统编译===
 +
====从网盘下载Android源代码====
 +
网盘地址:[http://download.friendlyelec.com/{{#replace:{{#replace:{{BASEPAGENAME}}| |}}|/zh|}} 点击进入]<br />
 +
网盘路径:07_源代码/rk35xx-android12-xxxxxxx-YYYYMMDD.tgz (YYYYMMDD表示打包的日期, xxxxxxx表示最后的commit-id)<br />
 +
使用如下命令解压并拉取更新:<br />
 +
<syntaxhighlight lang="bash">
 +
tar xzf /path/to/netdisk/07_源代码/rk35xx-android12-xxxxxxx-YYYYMMDD.tgz
 +
cd rk35xx-android12
 +
git pull
 +
</syntaxhighlight>
 +
====编译Android Table版本====
 +
<syntaxhighlight lang="bash">
 +
echo "ROCKCHIP_DEVICE_DIR := device/rockchip/rk3588/nanopi6" > .rockchip_device.mk
 +
# export INSTALL_GAPPS_FOR_TESTING=yes  # 是否包含google apps
 +
. setenv.sh
 +
./build.sh -FMu
 +
</syntaxhighlight>
 +
====编译Android TV版本====
 +
<syntaxhighlight lang="bash">
 +
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
 +
</syntaxhighlight>
 +
编译完成后,image文件会存放在Android源代码目录的 rockdev/Image-aosp_nanopi3 子目录下。
 +
====安装Android====
 +
=====USB线刷=====
 +
用rockchip的工具刷入如下文件:rockdev/Image-aosp_nanopi3/update.img
 +
=====SD卡烧写=====
 +
,参考以下步骤更新到 {{{1}}}上: <br />
 +
1) 将安装了 eflasher 系统的SD卡插入电脑; <br />
 +
2) 将 rockdev/Image-aosp_nanopi3 子目录下的文件更新到SD卡 FRIENDLYARM 分区里的android12或androidtv目录: <br />
 +
<syntaxhighlight lang="bash">
 +
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
 +
</syntaxhighlight>
 +
3) 将SD卡插入{{{1}}},重新烧写Andorid系统即可; <br />
 +
====打包成新的SD Image====
 +
<syntaxhighlight lang="bash">
 +
git clone https://github.com/friendlyarm/sd-fuse_rk3568.git
 +
SDFUSE=$PWD/sd-fuse_rk3568
 +
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
 +
</syntaxhighlight>
 +
更多信息,请参考 [[#打包新的SD Image]]<br>

Revision as of 09:24, 7 April 2023

1 Linux系统编译

1.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 nanopi5_linux_defconfig nanopi5-v2017.09 rk3568_defconfig
friendlycore-focal-arm64
debian-bullseye-core-arm64
debian-bullseye-desktop-arm64
debian-bullseye-minimal-arm64
debian-buster-desktop-arm64
friendlywrt21 nanopi5_linux_defconfig
friendlywrt.config
friendlywrt21-docker
friendlywrt22
friendlywrt22-docker
export PATH=/opt/FriendlyARM/toolchain/11.3-aarch64/bin/:$PATH
  • sd-fuse构建脚本可以用于快速编译kernel和uboot、重新打包sd卡固件与卡刷固件等

1.2 编译内核linux-v5.10.y

下载源代码并编译:

git clone https://github.com/friendlyarm/kernel-rockchip --single-branch --depth 1 -b nanopi5-v5.10.y_opt 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 nanopi5_linux_defconfig
# option2: 加载FriendlyWrt系统配置
# make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 nanopi5_linux_defconfig friendlywrt.config
# 启动配置界面
# make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 menuconfig
# 编译内核
make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 nanopi5-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与内核到目标板

1.3 编译u-boot v2017.09

下载源代码并编译:

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

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

uboot.img rk356x_spl_loader_v1.15.112.bin (打包时改名为MiniLoaderAll.bin)

安装u-boot:
请参考 #下载uboot与内核到目标板

1.4 应用新编译的uboot与内核

1.4.1 安装到目标板

由于RK3568的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=boot.img of=/dev/mmcblk2p1 bs=1M

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

1.4.2 打包新的SD Image

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

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

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

内核版本 构建脚本
linux v5.10.y
sd-fuse_rk3568
1.4.3 线刷
1.4.3.1 Linux系统

用upgrade_tool工具烧写uboot与内核, 命令如下所示:

sudo upgrade_tool ul MiniLoaderAll.bin
sudo upgrade_tool di -p parameter.txt
sudo upgrade_tool di uboot uboot.img
sudo upgrade_tool di resource resource.img
sudo upgrade_tool di kernel kernel.img
sudo upgrade_tool RD

注:upgrade_tool是Rockchip提供的Linux下的命令行工具(Linux_Upgrade_Tool)

2 Android系统编译

2.1 从网盘下载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

2.2 编译Android Table版本

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

2.3 编译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

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

2.4 安装Android

2.4.1 USB线刷

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

2.4.2 SD卡烧写

,参考以下步骤更新到 {{{1}}}上:
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系统即可;

2.5 打包成新的SD Image

git clone https://github.com/friendlyarm/sd-fuse_rk3568.git
SDFUSE=$PWD/sd-fuse_rk3568
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