Difference between revisions of "Template:RockchipMiscCustome/zh"

From FriendlyELEC WiKi
Jump to: navigation, search
(updated by API)
(updated by API)
Line 11: Line 11:
 
     --exclude=/usr/local/first_boot_flag --one-file-system /
 
     --exclude=/usr/local/first_boot_flag --one-file-system /
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
注:备份时,如果系统中有挂载目录,最后会出现一个错误提示信息,可以无视它,我们本来就是要忽略这些目录
 
===从根文件系统制作一个可启动的SD卡===
 
===从根文件系统制作一个可启动的SD卡===
 
{{#switch: {{{1}}}
 
{{#switch: {{{1}}}
Line 17: Line 18:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
su root
 
su root
git clone https://github.com/friendlyarm/sd-fuse_rk3328 --single-branch -b kernel-5.15.y
+
git clone https://github.com/friendlyarm/sd-fuse_rk3328 --single-branch -b kernel-6.1.y
 
cd sd-fuse_rk3328
 
cd sd-fuse_rk3328
 
tar xvzf /path/to/netdrive/03_Partition\ image\ files/friendlycore-lite-focal-arm64-images.tgz
 
tar xvzf /path/to/netdrive/03_Partition\ image\ files/friendlycore-lite-focal-arm64-images.tgz
Line 29: Line 30:
 
</syntaxhighlight>
 
</syntaxhighlight>
 
  | RK3399 =
 
  | RK3399 =
在Linux PC上执行以下shell命令,为了简洁起见,这里以debian-buster-desktop-arm64系统为例,但方法适用于所有Linux系统。
+
在Linux PC上执行以下shell命令,为了简洁起见,这里以debian-bullseye-desktop-arm64系统为例,但方法适用于所有Linux系统。
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
su root
 
su root
 
git clone https://github.com/friendlyarm/sd-fuse_rk3399 --single-branch -b kernel-4.19
 
git clone https://github.com/friendlyarm/sd-fuse_rk3399 --single-branch -b kernel-4.19
 
cd sd-fuse_rk3399
 
cd sd-fuse_rk3399
tar xvzf /path/to/netdrive/03_Partition\ image\ files/debian-buster-desktop-arm64-images.tgz
+
tar xvzf /path/to/netdrive/03_Partition\ image\ files/debian-bullseye-desktop-arm64-images.tgz
 
tar xvzf /path/to/netdrive/03_Partition\ image\ files/emmc-eflasher-images.tgz
 
tar xvzf /path/to/netdrive/03_Partition\ image\ files/emmc-eflasher-images.tgz
 
scp pi@BOARDIP:/rootfs.tar.gz /rootfs.tar.gz
 
scp pi@BOARDIP:/rootfs.tar.gz /rootfs.tar.gz
 
mkdir rootfs
 
mkdir rootfs
 
tar xzf rootfs.tar.gz -C rootfs
 
tar xzf rootfs.tar.gz -C rootfs
./build-rootfs-img.sh rootfs debian-buster-desktop-arm64
+
./build-rootfs-img.sh rootfs debian-bullseye-desktop-arm64
./mk-sd-image.sh debian-buster-desktop-arm64
+
./mk-sd-image.sh debian-bullseye-desktop-arm64
./mk-emmc-image.sh debian-buster-desktop-arm64 autostart=yes
+
./mk-emmc-image.sh debian-bullseye-desktop-arm64 autostart=yes
 
</syntaxhighlight>
 
</syntaxhighlight>
 
  | RK3568 =
 
  | RK3568 =
在Linux PC上执行以下shell命令,为了简洁起见,这里以debian-buster-desktop-arm64系统为例,但方法适用于所有Linux系统。
+
在Linux PC上执行以下shell命令,为了简洁起见,这里以debian-bullseye-desktop-arm64系统为例,但方法适用于所有Linux系统。
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
su root
 
su root
git clone https://github.com/friendlyarm/sd-fuse_rk3568 --single-branch -b master
+
git clone https://github.com/friendlyarm/sd-fuse_rk3568 --single-branch -b kernel-6.1.y
 
cd sd-fuse_rk3568
 
cd sd-fuse_rk3568
tar xvzf /path/to/netdrive/03_Partition\ image\ files/debian-buster-desktop-arm64-images.tgz
+
tar xvzf /path/to/netdrive/03_Partition\ image\ files/debian-bullseye-desktop-arm64-images.tgz
 
tar xvzf /path/to/netdrive/03_Partition\ image\ files/emmc-eflasher-images.tgz
 
tar xvzf /path/to/netdrive/03_Partition\ image\ files/emmc-eflasher-images.tgz
 
scp pi@BOARDIP:/rootfs.tar.gz /rootfs.tar.gz
 
scp pi@BOARDIP:/rootfs.tar.gz /rootfs.tar.gz
 
mkdir rootfs
 
mkdir rootfs
 
tar xzf rootfs.tar.gz -C rootfs
 
tar xzf rootfs.tar.gz -C rootfs
./build-rootfs-img.sh rootfs debian-buster-desktop-arm64
+
./build-rootfs-img.sh rootfs debian-bullseye-desktop-arm64
./mk-sd-image.sh debian-buster-desktop-arm64
+
./mk-sd-image.sh debian-bullseye-desktop-arm64
./mk-emmc-image.sh debian-buster-desktop-arm64 autostart=yes
+
./mk-emmc-image.sh debian-bullseye-desktop-arm64 autostart=yes
 
</syntaxhighlight>
 
</syntaxhighlight>
 
  | RK3588 =
 
  | RK3588 =
在Linux PC上执行以下shell命令,为了简洁起见,这里以debian-buster-desktop-arm64系统为例,但方法适用于所有Linux系统。
+
在Linux PC上执行以下shell命令,为了简洁起见,这里以debian-bullseye-desktop-arm64系统为例,但方法适用于所有Linux系统。
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
su root
 
su root
git clone https://github.com/friendlyarm/sd-fuse_rk3588 --single-branch -b master
+
git clone https://github.com/friendlyarm/sd-fuse_rk3588 --single-branch -b kernel-6.1.y
 
cd sd-fuse_rk3588
 
cd sd-fuse_rk3588
tar xvzf /path/to/netdrive/03_Partition\ image\ files/debian-buster-desktop-arm64-images.tgz
+
tar xvzf /path/to/netdrive/03_Partition\ image\ files/debian-bullseye-desktop-arm64-images.tgz
 
tar xvzf /path/to/netdrive/03_Partition\ image\ files/emmc-eflasher-images.tgz
 
tar xvzf /path/to/netdrive/03_Partition\ image\ files/emmc-eflasher-images.tgz
 
scp pi@BOARDIP:/rootfs.tar.gz /rootfs.tar.gz
 
scp pi@BOARDIP:/rootfs.tar.gz /rootfs.tar.gz
 
mkdir rootfs
 
mkdir rootfs
 
tar xzf rootfs.tar.gz -C rootfs
 
tar xzf rootfs.tar.gz -C rootfs
./build-rootfs-img.sh rootfs debian-buster-desktop-arm64
+
./build-rootfs-img.sh rootfs debian-bullseye-desktop-arm64
./mk-sd-image.sh debian-buster-desktop-arm64
+
./mk-sd-image.sh debian-bullseye-desktop-arm64
./mk-emmc-image.sh debian-buster-desktop-arm64 autostart=yes
+
./mk-emmc-image.sh debian-bullseye-desktop-arm64 autostart=yes
 
</syntaxhighlight>
 
</syntaxhighlight>
 
  | #default =
 
  | #default =
Line 87: Line 88:
 
  | RK3328 =
 
  | RK3328 =
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
git clone https://github.com/friendlyarm/sd-fuse_rk3328.git -b kernel-5.15.y --single-branch
+
git clone https://github.com/friendlyarm/sd-fuse_rk3328.git -b kernel-6.1.y --single-branch
 
cd sd-fuse_rk3328
 
cd sd-fuse_rk3328
tar xvzf /path/to/netdrive/03_Partition\ image\ files/friendlywrt22-images.tgz
+
tar xvzf /path/to/netdrive/03_Partition\ image\ files/friendlywrt23-images.tgz
 
tar xvzf /path/to/netdrive/03_Partition\ image\ files/emmc-flasher-images.tgz
 
tar xvzf /path/to/netdrive/03_Partition\ image\ files/emmc-flasher-images.tgz
vim friendlywrt22/parameter.txt  # 编辑命令行参数
+
vim friendlywrt23/parameter.txt  # 编辑命令行参数
./mk-sd-image.sh friendlywrt22   # 重新打包sd映象文件
+
./mk-sd-image.sh friendlywrt23   # 重新打包sd映象文件
./mk-emmc-image.sh friendlywrt22 # 重新打包sd-to-emmc映象文件(eflasher img)
+
./mk-emmc-image.sh friendlywrt23 # 重新打包sd-to-emmc映象文件(eflasher img)
 
</syntaxhighlight>
 
</syntaxhighlight>
 
  | RK3399 =
 
  | RK3399 =
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
git clone https://github.com/friendlyarm/sd-fuse_rk3399.git -b kernel-5.15.y --single-branch
+
git clone https://github.com/friendlyarm/sd-fuse_rk3399.git -b kernel-6.1.y --single-branch
 
cd sd-fuse_rk3399
 
cd sd-fuse_rk3399
tar xvzf /path/to/netdrive/03_Partition\ image\ files/friendlywrt22-images.tgz
+
tar xvzf /path/to/netdrive/03_Partition\ image\ files/friendlywrt23-images.tgz
 
tar xvzf /path/to/netdrive/03_Partition\ image\ files/emmc-flasher-images.tgz
 
tar xvzf /path/to/netdrive/03_Partition\ image\ files/emmc-flasher-images.tgz
vim friendlywrt22/parameter.txt  # 编辑命令行参数
+
vim friendlywrt23/parameter.txt  # 编辑命令行参数
./mk-sd-image.sh friendlywrt22   # 重新打包sd映象文件
+
./mk-sd-image.sh friendlywrt23   # 重新打包sd映象文件
./mk-emmc-image.sh friendlywrt22 # 重新打包sd-to-emmc映象文件(eflasher img)
+
./mk-emmc-image.sh friendlywrt23 # 重新打包sd-to-emmc映象文件(eflasher img)
 
</syntaxhighlight>
 
</syntaxhighlight>
 
  | RK3568 =
 
  | RK3568 =
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
git clone https://github.com/friendlyarm/sd-fuse_rk3568.git -b master --single-branch
+
git clone https://github.com/friendlyarm/sd-fuse_rk3568.git -b kernel-6.1.y --single-branch
 
cd sd-fuse_rk3568
 
cd sd-fuse_rk3568
tar xvzf /path/to/netdrive/03_Partition\ image\ files/friendlywrt22-images.tgz
+
tar xvzf /path/to/netdrive/03_Partition\ image\ files/friendlywrt23-images.tgz
 
tar xvzf /path/to/netdrive/03_Partition\ image\ files/emmc-flasher-images.tgz
 
tar xvzf /path/to/netdrive/03_Partition\ image\ files/emmc-flasher-images.tgz
vim friendlywrt22/parameter.txt  # 编辑命令行参数
+
vim friendlywrt23/parameter.txt  # 编辑命令行参数
./mk-sd-image.sh friendlywrt22   # 重新打包sd映象文件
+
./mk-sd-image.sh friendlywrt23   # 重新打包sd映象文件
./mk-emmc-image.sh friendlywrt22 # 重新打包sd-to-emmc映象文件(eflasher img)
+
./mk-emmc-image.sh friendlywrt23 # 重新打包sd-to-emmc映象文件(eflasher img)
 
</syntaxhighlight>
 
</syntaxhighlight>
 
  | RK3588 =
 
  | RK3588 =
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
git clone https://github.com/friendlyarm/sd-fuse_rk3588.git -b master --single-branch
+
git clone https://github.com/friendlyarm/sd-fuse_rk3588.git -b kernel-6.1.y --single-branch
 
cd sd-fuse_rk3588
 
cd sd-fuse_rk3588
tar xvzf /path/to/netdrive/03_Partition\ image\ files/friendlywrt22-images.tgz
+
tar xvzf /path/to/netdrive/03_Partition\ image\ files/friendlywrt23-images.tgz
 
tar xvzf /path/to/netdrive/03_Partition\ image\ files/emmc-flasher-images.tgz
 
tar xvzf /path/to/netdrive/03_Partition\ image\ files/emmc-flasher-images.tgz
vim friendlywrt22/parameter.txt  # 编辑命令行参数
+
vim friendlywrt23/parameter.txt  # 编辑命令行参数
./mk-sd-image.sh friendlywrt22   # 重新打包sd映象文件
+
./mk-sd-image.sh friendlywrt23   # 重新打包sd映象文件
./mk-emmc-image.sh friendlywrt22 # 重新打包sd-to-emmc映象文件(eflasher img)
+
./mk-emmc-image.sh friendlywrt23 # 重新打包sd-to-emmc映象文件(eflasher img)
 
</syntaxhighlight>
 
</syntaxhighlight>
 
  | #default =
 
  | #default =
 
仅支持RK3328/RK3399/RK3568/RK3588<br />
 
仅支持RK3328/RK3399/RK3568/RK3588<br />
 
}}
 
}}

Revision as of 17:16, 26 October 2023

1 备份文件系统并创建SD映像(将系统及应用复制到另一块开发板)

1.1 备份根文件系统

开发板上执行以下命令,备份整个文件系统(包括OS与数据):

sudo passwd root
su root
cd /
tar --warning=no-file-changed -cvpzf /rootfs.tar.gz \
    --exclude=/rootfs.tar.gz --exclude=/var/lib/docker/runtimes \
    --exclude=/etc/firstuser --exclude=/etc/friendlyelec-release \
    --exclude=/usr/local/first_boot_flag --one-file-system /

注:备份时,如果系统中有挂载目录,最后会出现一个错误提示信息,可以无视它,我们本来就是要忽略这些目录

1.2 从根文件系统制作一个可启动的SD卡

Only support RK3328/RK3399/RK3568/RK3588

2 更改内核命令行参数

2.1 eMMC启动

步骤如下:
先做一张eflahser的烧写卡 (使用rk3xxxx-eflasher-开头的固件文件),
将烧写卡插入电脑,进入sd卡的OS相关目录,编辑文件parameter.txt, 这是个文本文件,里面有命令行参数,
然后再用烧写卡启动,把系统烧写进 eMMC。

2.2 SD启动

要修改SD卡启动时的命令行参数, 需要重新打包SD卡镜像文件, 可以使用我们提供的sd-fuse脚本来辅助打包:
仅支持RK3328/RK3399/RK3568/RK3588