Difference between revisions of "Template:RockchipMiscCustome"

From FriendlyELEC WiKi
Jump to: navigation, search
(updated by API)
(updated by API)
 
(One intermediate revision by the same user not shown)
Line 11: Line 11:
 
     --exclude=/usr/local/first_boot_flag --one-file-system /
 
     --exclude=/usr/local/first_boot_flag --one-file-system /
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
Note: if there is a mounted directory on the system, an error message will appear at the end, which can be ignored.
 
===Making a bootable SD card from a root filesystem===
 
===Making a bootable SD card from a root filesystem===
 
{{#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 23: Line 24:
 
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 xvzfp rootfs.tar.gz -C rootfs --numeric-owner --same-owner
 
./build-rootfs-img.sh rootfs friendlycore-lite-focal-arm64
 
./build-rootfs-img.sh rootfs friendlycore-lite-focal-arm64
 
./mk-sd-image.sh friendlycore-lite-focal-arm64
 
./mk-sd-image.sh friendlycore-lite-focal-arm64
Line 29: Line 30:
 
</syntaxhighlight>
 
</syntaxhighlight>
 
  | RK3399 =
 
  | RK3399 =
Run the following script on your Linux PC host, we'll only mention "debian-buster-desktop-arm64 os" for brevity, but you can apply the same process for every linux OS.
+
Run the following script on your Linux PC host, we'll only mention "debian-bullseye-desktop-arm64 os" for brevity, but you can apply the same process for every linux OS.
 
<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 xvzfp rootfs.tar.gz -C rootfs --numeric-owner --same-owner
./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 =
Run the following script on your Linux PC host, we'll only mention "debian-buster-desktop-arm64 os" for brevity, but you can apply the same process for every linux OS.
+
Run the following script on your Linux PC host, we'll only mention "debian-bullseye-desktop-arm64 os" for brevity, but you can apply the same process for every linux OS.
 
<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 xvzfp rootfs.tar.gz -C rootfs --numeric-owner --same-owner
./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 =
Run the following script on your Linux PC host, we'll only mention "debian-buster-desktop-arm64 os" for brevity, but you can apply the same process for every linux OS.
+
Run the following script on your Linux PC host, we'll only mention "debian-bullseye-desktop-arm64 os" for brevity, but you can apply the same process for every linux OS.
 
<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 xvzfp rootfs.tar.gz -C rootfs --numeric-owner --same-owner
./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 89: Line 90:
 
  | 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  # Edit command-line parameters
+
vim friendlywrt23/parameter.txt  # Edit command-line parameters
./mk-sd-image.sh friendlywrt22   # Repackage sd image file
+
./mk-sd-image.sh friendlywrt23   # Repackage sd image file
./mk-emmc-image.sh friendlywrt22 # Repackage sd-to-emmc image file
+
./mk-emmc-image.sh friendlywrt23 # Repackage sd-to-emmc image file
 
</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  # Edit command-line parameters
+
vim friendlywrt23/parameter.txt  # Edit command-line parameters
./mk-sd-image.sh friendlywrt22   # Repackage sd image file
+
./mk-sd-image.sh friendlywrt23   # Repackage sd image file
./mk-emmc-image.sh friendlywrt22 # Repackage sd-to-emmc image file
+
./mk-emmc-image.sh friendlywrt23 # Repackage sd-to-emmc image file
 
</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  # Edit command-line parameters
+
vim friendlywrt23/parameter.txt  # Edit command-line parameters
./mk-sd-image.sh friendlywrt22   # Repackage sd image file
+
./mk-sd-image.sh friendlywrt23   # Repackage sd image file
./mk-emmc-image.sh friendlywrt22 # Repackage sd-to-emmc image file
+
./mk-emmc-image.sh friendlywrt23 # Repackage sd-to-emmc image file
 
</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  # Edit command-line parameters
+
vim friendlywrt23/parameter.txt  # Edit command-line parameters
./mk-sd-image.sh friendlywrt22   # Repackage sd image file
+
./mk-sd-image.sh friendlywrt23   # Repackage sd image file
./mk-emmc-image.sh friendlywrt22 # Repackage sd-to-emmc image file
+
./mk-emmc-image.sh friendlywrt23 # Repackage sd-to-emmc image file
 
</syntaxhighlight>
 
</syntaxhighlight>
 
  | #default =
 
  | #default =
 
Only support RK3328/RK3399/RK3568/RK3588<br />
 
Only support RK3328/RK3399/RK3568/RK3588<br />
 
}}
 
}}

Latest revision as of 10:53, 28 March 2024

1 Backup rootfs and create custom SD image (to burn your application into other boards)

1.1 Backup rootfs

Run the following commands on your target board. These commands will back up the entire root partition:

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 /

Note: if there is a mounted directory on the system, an error message will appear at the end, which can be ignored.

1.2 Making a bootable SD card from a root filesystem

Only support RK3328/RK3399/RK3568/RK3588

2 Configuring kernel command line parameters

2.1 eMMC Boot

Here are the steps:
Make an eflahser bootable SD card (use the firmware file starting with rk3xxxx-eflasher-),
Insert the SD card into your computer, go to the SD card's OS-related directory, and edit the file parameter.txt, which is a text file containing command-line parameters,
Then boot from the SD card and burn the system to the eMMC.

2.2 SD Boot

To modify the command line parameters of the SD card, you need to repackage the SD card image file,
you can use the sd-fuse script we provide to assist packaging:


Only support RK3328/RK3399/RK3568/RK3588