The NanoPC-T6 (as “T6”) is an open-sourced mini IoT gateway device with two 2.5G and one Gbps Ethernet ports, designed and developed by FriendlyElec.It is integrated with a Rockchip RK3588 CPU, 4GB/8GB/16GB LPDDR4x RAM and 32GB/64GB/256GB eMMC flash. It supports booting with TF cards and works with operating systems such as FriendlyWrt etc.
The NanoPC-T6 has rich hardware resources with a compact PCB size of 110*80mm. FriendlyElec has released a carefully-designed custom CNC housing for it. It has two HDMI-Out port and one HDMI-In port. It works with Android, Debian Desktop and Ubuntu etc and works with headless systems as well. It supports decoding 8K60 H.265/VP9 formatted videos.
The NanoPC-T6 has one USB3.0 port and one USB C port.
All in all, the NanoPC-T6 is a board featured with multiple Ethernet ports, light NAS and video playing. It is a cannot-miss platform with infinite possibilities for geeks, fans and developers.
Pin# | GPIO | SPI | UART | I2C | I2S | PWM | POWER | Description |
1,17 | VCC3V3_SYS_S3 | 3.3V Power Output, 500mA Max | ||||||
2,4 | VCC_5V0 | 5V Power Output, 500mA Max | ||||||
6,9,14,20,25,30,34,39 | GND | Power and Signal Ground | ||||||
3 | GPIO1_D7 | I2C8_SDA_M2 | pulled up to 3.3V with 2.2K on T6 | |||||
5 | GPIO1_D6 | I2C8_SCL_M2 | pulled up to 3.3V with 2.2K on T6 | |||||
7 | GPIO3_B2 | I2S2_SDI_M1 | 3.3V | |||||
8 | GPIO0_C5 | UART0_TX_M0 | PWM4_M0 | 3.3V | ||||
10 | GPIO0_C4 | UART0_RX_M0 | 3.3V | |||||
11 | GPIO3_C2 | PWM14_M0 | 3.3V | |||||
12 | GPIO3_B7 | 3.3V | ||||||
13 | GPIO3_C3 | PWM15_IR_M0 | 3.3V | |||||
15 | GPIO1_A7 | 3.3V | ||||||
16 | GPIO3_B3 | I2S2_SDO_M1 | 3.3V | |||||
18 | GPIO3_B4 | I2S2_MCLK_M1 | 3.3V | |||||
19 | GPIO1_B2 | SPI0_MOSI_M2 | UART4_RX_M2 | 3.3V | ||||
21 | GPIO1_B1 | SPI0_MISO_M2 | 3.3V | |||||
22 | GPIO1_B5 | SPI0_CS1_M0 | UART7_TX_M2 | 3.3V | ||||
23 | GPIO1_B3 | SPI0_CLK_M2 | UART4_TX_M2 | 3.3V | ||||
24 | GPIO1_B4 | SPI0_CS0_M2 | UART7_RX_M2 | 3.3V | ||||
26 | GPIO1_B0 | 3.3V | ||||||
27 | GPIO1_A0 | UART6_RX_M1 | 3.3V | |||||
28 | GPIO1_A1 | UART6_TX_M1 | 3.3V | |||||
29 | GPIO3_B5 | UART3_TX_M1 | I2S2_SCLK_M1 | PWM12_M0 | 3.3V | |||
31 | GPIO3_B6 | UART3_RX_M1 | I2S2_LRCK_M1 | PWM13_M0 | 3.3V | |||
32 | GPIO0_C6 | PWM5_M1 | 3.3V | |||||
33 | GPIO3_B0 | PWM9_M0 | 3.3V | |||||
35 | GPIO3_A0 | SPI4_MISO_M1 | I2S3_MCLK | PWM10_M0 | 3.3V | |||
36 | GPIO3_A3 | SPI4_CS0_M1 | UART8_RX_M1 | I2S3_SDO | 3.3V | |||
37 | GPIO3_A4 | SPI4_CS1_M1 | I2S3_SDI | 3.3V | ||||
38 | GPIO3_A1 | SPI4_MOSI_M1 | I2S3_SCLK | 3.3V | ||||
40 | GPIO3_A2 | SPI4_CLK_M1 | UART8_TX_M1 | I2S3_LRCK | 3.3V |
Pin# | MIPI-DSI0 | MIPI-DSI1 | Description |
1,2,3 | VCC_5V0 | VCC_5V0 | 5V Power ouput |
4,7,9,11,15,18,21,24,27,30 | GND | GND | Power and Signal Ground |
5 | I2C5_SDA_M0 | I2C4_SDA_M3 | 3.3V, I2C Data, pulled up to 3.3V with 2.2K on T6 |
6 | I2C5_SCL_M0 | I2C4_SCL_M3 | 3.3V, I2C Clock, pulled up to 3.3V with 2.2K on T6 |
8 | GPIO3_C0 | GPIO4_A0 | 3.3V, GPIO |
10 | GPIO3_B1/PWM2_M1 | GPIO3_D5/PWM11_M3 | 3.3V, GPIO/PWM |
12 | GPIO3_A6 | GPIO4_A3 | 3.3V, GPIO |
13 | /NC | /NC | No Connection |
14 | GPIO3_C1 | GPIO4_A1 | 3.3V, GPIO |
16 | MIPI_DPHY0_TX_D3N | MIPI_DPHY1_TX_D3N | MIPI TX Lane3 ouput N |
17 | MIPI_DPHY0_TX_D3P | MIPI_DPHY1_TX_D3P | MIPI TX Lane3 ouput P |
19 | MIPI_DPHY0_TX_D2N | MIPI_DPHY1_TX_D2N | MIPI TX Lane2 ouput N |
20 | MIPI_DPHY0_TX_D2P | MIPI_DPHY1_TX_D2P | MIPI TX Lane2 ouput P |
22 | MIPI_DPHY0_TX_D1N | MIPI_DPHY1_TX_D1N | MIPI TX Lane1 ouput N |
23 | MIPI_DPHY0_TX_D1P | MIPI_DPHY1_TX_D1P | MIPI TX Lane1 ouput P |
25 | MIPI_DPHY0_TX_D0N | MIPI_DPHY1_TX_D0N | MIPI TX Lane0 ouput N |
26 | MIPI_DPHY0_TX_D0P | MIPI_DPHY1_TX_D0P | MIPI TX Lane0 ouput P |
28 | MIPI_DPHY0_TX_CLKN | MIPI_DPHY1_TX_CLKN | MIPI TX Clock ouput N |
29 | MIPI_DPHY0_TX_CLKP | MIPI_DPHY1_TX_CLKP | MIPI TX Clock ouput P |
Pin# | MIPI-CSI0 | MIPI-CSI1 | Description |
1,2 | VCC_5V0 | VCC_5V0 | 5V Power ouput |
3,13,15,18,21,24,27,30 | GND | GND | Power and Signal Ground |
4,5,7 | /NC | /NC | No Connection |
6 | VCC_1V8_S3 | VCC_1V8_S3 | 1.8V Power ouput, 100mA Max |
8 | VSYNC_MASTER | VSYNC_SLAVE | Have been Connected together on T6 for sensor synchronization |
9 | I2C3_SCL_M0 | I2C7_SCL_M0 | 1.8V, I2C Clock, pulled up to 1.8V with 2.2K on T6 |
10 | I2C3_SDA_M0 | I2C7_SDA_M0 | 1.8V, I2C Data, pulled up to 1.8V with 2.2K on T6 |
11 | GPIO4_C4 | GPIO2_C1 | 1.8V, GPIO |
12 | GPIO4_C5 | GPIO2_C2 | 1.8V, GPIO |
14 | MIPI_CAM1_CLKOUT | MIPI_CAM2_CLKOUT | 1.8V, CLock ouput for Sensor |
16 | MIPI_CSI0_RX_D3P | MIPI_CSI1_RX_D3P | MIPI RX Lane3 iuput P |
17 | MIPI_CSI0_RX_D3N | MIPI_CSI1_RX_D3N | MIPI RX Lane3 iuput N |
19 | MIPI_CSI0_RX_D2P | MIPI_CSI1_RX_D2P | MIPI RX Lane2 iuput P |
20 | MIPI_CSI0_RX_D2P | MIPI_CSI1_RX_D2N | MIPI RX Lane2 iuput N |
22 | MIPI_CSI0_RX_D1P | MIPI_CSI1_RX_D1P | MIPI RX Lane1 iuput P |
23 | MIPI_CSI0_RX_D1N | MIPI_CSI1_RX_D1N | MIPI RX Lane1 iuput N |
25 | MIPI_CSI0_RX_CLK0P | MIPI_CSI1_RX_CLK0P | MIPI RX Clock iuput P |
26 | MIPI_CSI0_RX_CLK0N | MIPI_CSI1_RX_CLK0N | MIPI RX Clock iuput N |
28 | MIPI_CSI0_RX_D0P | MIPI_CSI1_RX_D0P | MIPI RX Lane0 iuput P |
29 | MIPI_CSI0_RX_D0N | MIPI_CSI1_RX_D0N | MIPI RX Lane0 iuput N |
Pin# | Assignment | Description |
1 | GND | 0V |
2 | UART2_TX_M0_DEBUG | output |
3 | UART2_RX_M0_DEBUG | intput |
Port | Max Output | Port | Max Output |
USB-A 3.0 | 5V/2A | USB-C/DP | 5V/2A |
M.2 M-Key | 3.3V/3A | M.2 E-Key | 3.3V/3A |
MIPI-CSI0 | 5V/0.5A | MIPI-CSI1 | 5V/0.5A |
MIPI-DSI0 | 5V/1A | MIPI-DSI1 | 5V/1A |
GPIO | 5V/0.5A, 3.3V/0.5A | miniPCIe | 3.3V/3A |
Total | 35W |
Before starting to use your NanoPC-T6 get the following items ready
Refer to:
SanDisk 32GB TF(MicroSD)
SanDisk 32GB TF(MicroSD)
SanDisk TF 8G Class10 microSD
SanDisk TF 128G Class10 microSDXC TF 128G 48MB/S
Use the following serial parameters:
Baud rate | 1500000 |
Data bit | 8 |
Parity check | None |
Stop bit | 1 |
Flow control | None |
Visit download link to download image files (in the "01_Official images/01_SD card images" directory) and utilities (in the "05_Tools" directory):
Image Files | |
rk3588-sd-friendlywrt-21.02-YYYYMMDD.img.gz | FriendlyWrt lite image file, based on OpenWrt 21.02, kernel version 5.10.y |
rk3588-sd-friendlywrt-21.02-docker-YYYYMMDD.img.gz | FriendlyWrt with Docker image file, based on OpenWrt 21.02, kernel version 5.10.y |
rk3588-sd-friendlywrt-22.03-YYYYMMDD.img.gz | FriendlyWrt lite image file, based on OpenWrt 22.03, kernel version 5.10.y |
rk3588-sd-friendlywrt-22.03-docker-YYYYMMDD.img.gz | FriendlyWrt with Docker image file, based on OpenWrt 22.03, kernel version 5.10.y |
rk3588-sd-androidtv-YYYYMMDD.img.zip | Android 12 TV |
rk3588-sd-android12-YYYYMMDD.img.zip | Android 12 Tablet |
rk3588-sd-debian-bullseye-core-5.10-arm64-YYYYMMDD.img.gz | Debian 11(Bullseye) Core, no desktop environment, command line only, kernel version 5.10.y |
rk3588-sd-debian-bullseye-minimal-5.10-arm64-YYYYMMDD.img.gz | Debian 11(Bullseye) Desktop, Uses LXDE as default desktop, no pre-installed recommended software, supports hardware acceleration, kernel version 5.10.y |
rk3588-sd-debian-bullseye-desktop-5.10-arm64-YYYYMMDD.img.gz | Debian 11(Bullseye) Desktop, Uses LXDE as default desktop, pre-installed mpv, smplayer and chromium brower, supports hardware acceleration, kernel version 5.10.y |
rk3588-sd-ubuntu-jammy-desktop-arm64-YYYYMMDD.img.gz | Ubuntu 22.04 with GNOME and Wayland, pre-installed web browser and other recommended software, kernel version 5.10.y |
rk3588-sd-ubuntu-jammy-minimal-arm64-YYYYMMDD.img.gz | Lightweight Ubuntu 22.04 with GNOME and Wayland, recommended software is not included, kernel version 5.10.y |
rk3588-sd-friendlycore-focal-5.10-arm64-YYYYMMDD.img.gz | 64-bit FriendlyCore Lite image file based on Ubuntu core 20.04 64bit, kernel version 5.10.y |
Other Image | |
Github Actions | |
Flash Utility: | |
win32diskimager.rar | Windows utility. Under Linux users can use "dd" |
The detailed steps are as follows:
Get a TF card which has been installed with FriendlyWrt, log in FriendlyWrt on the web page, click on “System” ->”eMMC Tools”. Click on “Select file” to select your wanted image file, either an official image (the name might start with “rk3588-sd”) or a third party image. The file should be a “.gz” or “.img” file.
After a file is selected, click on “Upload and Write” to start installing an OS.
After installation is done, eject the SD card, the system will automatically reboot and load the OS from eMMC. After the OS begins to load, if the system LED is flashing and the network LED is on, it means the the OS has loaded successfully. If the OS is FriendlyWrt, you can click on “Go to Homepage” to enter the homepage.
Note that if you are burning the FriendlyElec firmware, you need to use an image file with the "-sd-" file name, similar to the one below:
rk3588-sd-friendlywrt-21.02-YYYYMMDD.img.gz |
rk3588-sd-friendlywrt-21.02-docker-YYYYMMDD.img.gz |
rk3588-sd-friendlywrt-22.03-YYYYMMDD.img.gz |
rk3588-sd-friendlywrt-22.03-docker-YYYYMMDD.img.gz |
If the file is in 7z, zip or rar format, you will need to extract it first. If the file is too large to write, you can compress it into .gz format and try again.
Visit download link to download the needed utilities and image file:
Image File | |
rk3588-eflasher-friendlywrt-21.02-YYYYMMDD.img.gz | FriendlyWrt Based on OpenWrt 21.02 Kernel version 5.10.y |
rk3588-eflasher-friendlywrt-21.02-docker-YYYYMMDD.img.gz | FriendlyWrt Pre-installed Docker Based on OpenWrt 21.02 Kernel version 5.10.y |
rk3588-eflasher-friendlywrt-22.03-YYYYMMDD.img.gz | FriendlyWrt Based on OpenWrt 22.03 Kernel version 5.10.y |
rk3588-eflasher-friendlywrt-22.03-docker-YYYYMMDD.img.gz | FriendlyWrt Pre-installed Docker Based on OpenWrt 22.03 Kernel version 5.10.y |
rk3588-eflasher-debian-bullseye-core-5.10-arm64-YYYYMMDD.img.gz | Debian 11(Bullseye) Core No desktop environment, command line only Kernel version 5.10.y |
rk3588-eflasher-debian-bullseye-minimal-5.10-arm64-YYYYMMDD.img.gz | Debian 11(Bullseye) Desktop Uses LXDE as default desktop No pre-installed recommended software Supports hardware acceleration Kernel version 5.10.y |
rk3588-eflasher-debian-bullseye-desktop-5.10-arm64-YYYYMMDD.img.gz | Debian 11(Bullseye) Desktop Uses LXDE as default desktop Pre-installed mpv, smplayer and chromium brower Supports hardware acceleration Kernel version 5.10.y |
rk3588-eflasher-androidtv-YYYYMMDD.img.zip | Android TV |
rk3588-eflasher-android12-YYYYMMDD.img.zip | Android 12 (Tablet) |
rk3588-eflasher-ubuntu-jammy-desktop-arm64-YYYYMMDD.img.gz | Ubuntu 22.04 with GNOME and Wayland Pre-installed web browser and other recommended software kernel version 5.10.y |
rk3588-eflasher-ubuntu-jammy-minimal-arm64-YYYYMMDD.img.gz | Lightweight Ubuntu 22.04 with GNOME and Wayland Recommended software is not included kernel version 5.10.y |
rk3588-eflasher-friendlycore-focal-5.10-arm64-YYYYMMDD.img.gz | 64-bit FriendlyCore Lite image file based on Ubuntu core 20.04 64bit, kernel version 5.10.y |
Flash Utility: | |
win32diskimager.rar | Windows utility. Under Linux users can use "dd" |
Here are the steps:
Progress | SYS LED(Red) |
---|---|
Power On | Solid On |
System Boot | Slow Flashing |
Installation in Progress | Fast Flashing |
Installation Done | Slow Flashing |
1) Download an “eflasher” firmware from network drive, extract it and install it to a TF card ;
2) Eject and insert the TF card to your PC, after a “FriendlyARM” device shows up(Under Linux, it is a “FriendlyARM” directory), copy an .img or .gz file to the TF card.
3) Open the eflasher.conf file on the TF card, set “autoStart=” to the name of your image file, such as:
autoStart=openwrt-rockchip-armv8_nanopi-ext4-sysupgrade.img.gz
Anyone of the files that contain “-sd-” will work. Here is a list:
rk3588-sd-friendlywrt-22.03-YYYYMMDD.img.gz |
rk3588-sd-friendlywrt-22.03-docker-YYYYMMDD.img.gz |
rk3588-sd-friendlywrt-21.02-YYYYMMDD.img.gz |
rk3588-sd-friendlywrt-21.02-docker-YYYYMMDD.img.gz |
rk3588-sd-ubuntu-jammy-desktop-5.10-arm64-20221029.img.gz |
4) Eject the TF card, insert the TF card to NanoPC-T6, power it on it will automatically install your firmware. You can watch the installation progress by observing the LEDs’ status.
If you want to disable auto installation, please open the eflasher.conf file, set “autoStart=” to empty:
autoStart=
In this case, after the system boots, it will stay at the step where you are expected to select an image file. You need to connect an HDMI monitor and a USB mouse to your board and install a firmware on its UI;
Download a driver file DriverAssitant_v5.1.1.zip under the “tools” directory from network drive, extract and install it.
Under the same directory, download a utility RKDevTool_Release_v2.84.zip and extract it.
1) Disconnect the connected USB cable and the power cord from NanoPC-T6, eject the TF card;
2) Press and hold the “Mask” key, power on the board. After the status LED has been on for at least 3 seconds, release the Mask key.
3) Use a USB C-to-A cable, connect NanoPC-T6 to a PC.
A firmware in general is packaged in either of the two options: the first is an whole image (ie, update.img) which is often offered by third party developers, the second is that an image is packaged and placed in multiple partition images. FriendlyElec offers an image in the latter option.
On a PC which has the extracted RKDevTool_Release_v2.84 utility, go to the RKDevTool_Release_v2.84 directory, run the RKDevTool.exe file. If everything works, you will see a “Found a new Maskrom device” message on the utility;
Go to “Upgrade Firmware(升级固件)”, click on “Firmware(固件)”, select your wanted image file, and click on “Upgrade(升级)” to install. After installation is done, your board will reboot automatically and load the system from eMMC;
Go to network drive to download your needed package and extract it.
Image File | |
rk3588-usb-friendlywrt-21.02-YYYYMMDD.img.gz | FriendlyWrt Based on OpenWrt 21.02 Kernel version 5.10.y |
rk3588-usb-friendlywrt-21.02-docker-YYYYMMDD.img.gz | FriendlyWrt Pre-installed Docker Based on OpenWrt 21.02 Kernel version 5.10.y |
rk3588-usb-friendlywrt-22.03-YYYYMMDD.img.gz | FriendlyWrt Based on OpenWrt 22.03 Kernel version 5.10.y |
rk3588-usb-friendlywrt-22.03-docker-YYYYMMDD.img.gz | FriendlyWrt Pre-installed Docker Based on OpenWrt 22.03 Kernel version 5.10.y |
rk3588-usb-debian-bullseye-core-arm64-YYYYMMDD.img.gz | Debian 11(Bullseye) Core No desktop environment, command line only Kernel version 5.10.y |
rk3588-usb-debian-bullseye-minimal-arm64-YYYYMMDD.img.gz | Debian 11(Bullseye) Desktop Uses LXDE as default desktop No pre-installed recommended software Supports hardware acceleration Kernel version 5.10.y |
rk3588-usb-debian-bullseye-desktop-arm64-YYYYMMDD.img.gz | Debian 11(Bullseye) Desktop Uses LXDE as default desktop Pre-installed mpv, smplayer and chromium brower Supports hardware acceleration Kernel version 5.10.y |
rk3588-usb-androidtv-YYYYMMDD.img.zip | Android TV |
rk3588-usb-android12-YYYYMMDD.img.zip | Android 12 (Tablet) |
rk3588-usb-ubuntu-jammy-desktop-arm64-YYYYMMDD.img.gz | Ubuntu 22.04 with GNOME and Wayland Pre-installed web browser and other recommended software kernel version 5.10.y |
rk3588-usb-ubuntu-jammy-minimal-arm64-YYYYMMDD.img.gz | Lightweight Ubuntu 22.04 with GNOME and Wayland Recommended software is not included kernel version 5.10.y |
rk3588-usb-friendlycore-focal-5.10-arm64-YYYYMMDD.img.gz | 64-bit FriendlyCore Lite image file based on Ubuntu core 20.04 64bit, kernel version 5.10.y |
After it is extracted, you will see some utilities and a configuration file under the directory. double click on RKDevTool.exe, you will see a “Found a new Maskrom device” message on the utility. Click on the “Execute”, wait a moment and it will be installed. After installation is done your system will automatically reboot and load the system from eMMC.
By default, the system will be booted from the TF card first, but this is not the case under all conditions. This section will explain all situations in detail;
Refer to rockchip official document (1), there are two types of loader program:
1) U-Boot TPL/SPL (i.e. upsream U-Boot, also called mainline U-Boot)
2) Rockchip MiniLoader
Things to note:
1) FriendlyELEC's image uses Rockchip MiniLoader
2) The third-party image usually uses U-Boot TPL/SPL
The following situations will always start from eMMC:
If the system in the eMMC, or the system in the TF card uses the first Loader type U-Boot TPL/SPL, it will always boot from the eMMC;
If you want to boot from the TF card, there are the following methods:
Method 1: Clear the Loader on the eMMC, the clearing method is as follows, after starting from the eMMC, enter the following command on the command line to clear the Loader on the eMMC:
dd if=/dev/zero of=/dev/mmcblk2 bs=8M count=1
Method 2: Insert the TF card, Press Maskrom Key (or short-circuit the Maskrom contacts) and then power on (need to keep the short-circuit for about 3 seconds), it will start from the TF card
The summary is as follows:
eMMC current system | TF card current system | Boot priority |
---|---|---|
No system | Any image | TF card |
FriendlyELEC's image | FriendlyELEC's image | TF card |
FriendlyELEC's image | Image with Mainline U-boot | eMMC |
Image with Mainline U-boot | FriendlyELEC's image | eMMC |
Image with Mainline U-boot | Image with Mainline U-boot | eMMC |
FriendlyWrt is a customized system made by FriendlyElec based on an OpenWrt distribution. It is open source and well suitable for developing IoT applications, NAS applications etc.
For the first boot, the system needs to do the following initialization work:
1)Extended root file system
2)Initial setup(will execute /root/setup.sh)
So you need to wait for a while (about 2~3 minutes) to boot up for the first time, and then set FriendlyWrt, you can enter the ttyd terminal on the openwrt webpage, when the prompt is displayed as root@FriendlyWrt, it means the system has been initialized.
root@FriendlyWrt
The default password is password (empty password in some versions). Please set or change a safer password for web login and ssh login. It is recommended to complete this setting before connecting NanoPC-T6 to the Internet.
Connect the PC to the LAN port of NanoPC-T6. If your PC without a built-in ethernet port, connect the LAN port of the wireless AP to the LAN port of NanoPC-T6, and then connect your PC to the wireless AP via WiFi , Enter the following URL on your PC's browser to access the admin page:
The above is the LAN port address of NanoPC-T6. The IP address of the WAN port will be dynamically obtained from your main router through DHCP.
The following settings are highly recommended to complete before connecting NanoPC-T6 to the Internet。
Edit /etc/config/uhttpd,Change the original 0.0.0.0 and [::] addresses to the local lan address, for example:
# HTTP listen addresses, multiple allowed list listen_http 192.168.2.1:80 list listen_http [fd00:ab:cd::1]:80 # HTTPS listen addresses, multiple allowed list listen_https 192.168.2.1:443 list listen_https [fd00:ab:cd::1]:443
Restart the service:
/etc/init.d/uhttpd restart
Set up as you wish.
1) Click on Network → Interfaces, then click on the Edit button of the LAN Network;
2) In General Setup tab, input new IP address (for example: 192.168.11.1), click "Save" and then click "Save & Apply";
3) On the pop-up window with the title “Connectivity change“, click "Apply and revert on connectivity loss";
4) Wait a moment, enter the new address in your computer's browser and login to FriendlyWrt;
Enter the "Services" -> "Terminal", enter the "poweroff" command and hit enter, wait until the led light is off, and then unplug the power supply.
Enter "System"->"Backup/Flash firmware",Click “Perform reset“ Button, Your device's settings will be reset to defaults like when FriendlyWrt was first installed.
You can also do this in the terminal:
firstboot && reboot
sed -i -e 's/mirrors.cloud.tencent.com/downloads.openwrt.org/g' /etc/opkg/distfeeds.conf opkg update
Before install software packages update the package list:
$ opkg update
$ opkg list
$ opkg list-installed
$ opkg install <package names>
$ opkg remove <package names>
. /root/setup.sh disable_ipv6 reboot
By default, the user button is configured to reboot the device, as shown below:
echo 'BTN_1 1 /sbin/reboot' >> /etc/triggerhappy/triggers.d/example.conf
You can change its behavior by changing the configuration file above.
Plug the USB2LCD module to the USB interface ofNanoPC-T6 and power on, the IP address and CPU temperature will be displayed on the LCD:
(1) Click on "services>ttyd" to start the command line utility
(2) Make sure no USB devices are connected to your board and run the following command to check if any USB devices are connected or not
lsusb
(3) Connect a USB WiFi device to the board and run the command again
lsusb
You will see a new device is detected. In our test the device's ID was 0BDA:C811
(4) Type your device's ID (in our case it was "0BDA:C811" or "VID_0BDA&PID_C811") in a search engine and you may find a device that matches the ID. In our case the device we got was Realtek 8811CU.
(1) Connect a USB WiFi device to the NanoPC-T6. We recommend you to use the following devices:
Note: devices that match these VID&PIDs would most likely work.
(2) Click on "System>Reboot" and reboot your NanoPC-T6
(3) Click on "Network>Wireless" to enter the WiFi configuration page
(4) Click on "Edit" to edit the configuration
(5) On the "Interface Configuration" page you can set the WiFi mode and SSID, and then go to "Wireless Security" to change the password. By default the password is "password". After you make your changes click on "Save" to save
(6) After you change the settings you can use a smartphone or PC to search for WiFi
1) It is recommended to plug in the usb wifi in the off state, then power it on, FriendlyWrt will automatically generate the configuration file /etc/config/wireless, if not, see if there is wlan0 by ifconfig -a, if there is no wlan0, usually there is no driver.
2) If ifconfig -a sees wlan0, but the hotspot is not working properly, try changing the channel and country code, an inappropriate country code can also cause the WiFi to not work.
3) Some USB WiFis (e.g. MTK MT7662) work in CD-ROM mode by default and need to be switched by usb_modeswitch, you can try to add usb_modeswitch configuration to the following directory: /etc/usb_modeswitch.d.
FriendlyWrt sets the country, hotspot name and other parameters for USB WiFi by default, with the aim of being as plug-and-play as possible, but this does not guarantee that all modules will be compatible with this setting, you can change these behaviors by modifying the following file:
/lib/wifi/mac80211.sh
mkdir -p /jellyfin/config mkdir -p /jellyfin/videos docker run --restart=always -d -p 8096:8096 -v /jellyfin/config:/config -v /jellyfin/videos:/videos jellyfin/jellyfin:10.1.0-arm64 -name myjellyfin
After installation, visit port 8096 and here is what you would find:
mkdir /nextcloud -p docker run -d -p 8888:80 --name nextcloud -v /nextcloud/:/var/www/html/ --restart=always --privileged=true arm64v8/nextcloud
After installtion, visit port 8888.
/etc/init.d/dockerd stop
mv /opt /opt-old && mkdir /opt
root@FriendlyWrt:~# mount | grep /opt /dev/nvme0n1p1 on /opt type ext4 (rw,relatime) root@FriendlyWrt:~#
cp -af /opt-old/* /opt/ && rm -rf /opt-old
reboot
Solution:
mount -t cifs //192.168.1.10/shared /movie -o username=xxx,password=yyy,file_mode=0644
Download and run the following script on 64-bit Ubuntu (version 18.04+): How to setup the Compiling Environment on Ubuntu bionic
The sdk is located in the toolchain directory of the network disk:
tar xvf openwrt-sdk-*-rockchip-armv8_gcc-11.2.0_musl.Linux-x86_64.tar.xz # If the path is too long, it will cause some package compilation errors, so change the directory name here mv openwrt-sdk-*-rockchip-armv8_gcc-11.2.0_musl.Linux-x86_64 sdk cd sdk ./scripts/feeds update -a ./scripts/feeds install -a
download the source code of the example (a total of 3 examples are example1, example2, example3), and copy to the package directory:
git clone https://github.com/mwarning/openwrt-examples.git cp -rf openwrt-examples/example* package/ rm -rf openwrt-examples/
Then enter the configuration menu through the following command:
make menuconfig
In the menu, select the following packages we want to compile (actually selected by default):
"Utilities" => "example1" "Utilities" => "example3" "Network" => "VPN" => "example2"
execute the following commands to compile the three software packages:
make package/example1/compile V=99 make package/example2/compile V=99 make package/example3/compile V=99
After the compilation is successful, you can find the ipk file in the bin directory, as shown below:
$ find ./bin -name example*.ipk ./bin/packages/aarch64_generic/base/example3_1.0.0-220420.38257_aarch64_generic.ipk ./bin/packages/aarch64_generic/base/example1_1.0.0-220420.38257_aarch64_generic.ipk ./bin/packages/aarch64_generic/base/example2_1.0.0-220420.38257_aarch64_generic.ipk
You can use the scp command to upload the ipk file to NanoPi:
cd ./bin/packages/aarch64_generic/base/ scp example*.ipk root@192.168.2.1:/root/
Then use the opkg command to install them:
cd /root/ opkg install example3_1.0.0-220420.38257_aarch64_generic.ipk opkg install example1_1.0.0-220420.38257_aarch64_generic.ipk opkg install example2_1.0.0-220420.38257_aarch64_generic.ipk
Please refre this link: https://github.com/friendlyarm/Actions-FriendlyWrt
Ubuntu 22.04 Desktop has the following features:
Regular Account:
User Name: pi
Password: pi
Root:
the root user account is disabled by default, you may configure the root password through the 'sudo passwd root' command.
Since the hostname is FriendlyElec.lan by default, you can use the ping command to get the IP address:
ping FriendlyElec.lan
ssh pi@FriendlyElec.lan
The default password is: pi
$ sudo apt-get update
$ sudo apt-get install snapd $ sudo snap install snap-store
sudo dpkg -i /opt/linux-headers-*.deb
try to compile a kernel module:
sudo apt update sudo apt install git gcc make bc git clone https://github.com/RinCat/RTL88x2BU-Linux-Driver.git cd RTL88x2BU-Linux-Driver make -j$(nproc) sudo make install sudo modprobe 88x2bu
timedatectl
timedatectl list-timezones
sudo timedatectl set-timezone Asia/Shanghai
Replace the following two files in the kernel source code directory and recompile the kernel:
kernel/logo.bmp
kernel/logo_kernel.bmp
Or use the script to operate, as shown below:
git clone https://github.com/friendlyarm/sd-fuse_rk3588.git -b master cd sd-fuse_rk3588
convert files/logo.jpg -type truecolor /tmp/logo.bmp convert files/logo.jpg -type truecolor /tmp/logo_kernel.bmp LOGO=/tmp/logo.bmp KERNEL_LOGO=/tmp/logo_kernel.bmp ./build-kernel.sh ubuntu-jammy-desktop-arm64 ./mk-emmc-image.sh ubuntu-jammy-desktop-arm64
Execute the following command in a terminal:
sudo firstboot && sudo reboot
Put the desktop file in the ~/.config/autostart/ directory, for example:
mkdir ~/.config/autostart/ cp /usr/share/applications/firefox.desktop ~/.config/autostart/
sudo systemctl mask udisks2 sudo reboot
Enter the following command and select 'zh_CN.UTF-8':
sudo dpkg-reconfigure locales
Add environment variables to .bashrc:
echo "export LC_ALL=zh_CN.UTF-8" >> ~/.bashrc echo "export LANG=zh_CN.UTF-8" >> ~/.bashrc echo "export LANGUAGE=zh_CN.UTF-8" >> ~/.bashrc
Reboot device:
sudo reboot
export DISPLAY=:0.0 mpv --fs /home/pi/Videos/demo.mp4
export DISPLAY=:0.0 mpv --fs https://www.youtube.com/watch?v=lK-nYDmC1Dk
Run the following command to install:
echo deb https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add - sudo apt update sudo apt install plexmediaserver
After successful installation, enable Plex (starts automatically at system startup):
sudo systemctl enable plexmediaserver sudo systemctl start plexmediaserver sudo systemctl status plexmediaserver
After installation, login to Plex server by entering the following address in your computer browser: http://IPAddress:32400/web/
sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg lsb-release curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt update sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin
Let’s verify:
sudo docker info
sudo groupadd docker sudo gpasswd -a ${USER} docker sudo systemctl restart docker sudo chmod a+rw /var/run/docker.sock
Let’s verify:
docker images
mkdir ~/nextcloud -p docker run -d -p 8888:80 --name nextcloud -v ~/nextcloud/:/var/www/html/ --restart=always --privileged=true arm64v8/nextcloud
After installation, visit: http://Device-IP-Address:8888 on your computer browser to view the nextcloud web page.
Click on the icon on the top right in the FriendlyDesktop's main window, select your wanted WiFi hotspot and proceed with prompts
Please visit: Use NetworkManager to configure network settings
First, change the CPU governor to performance:
sudo sh -c 'echo performance > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor' sudo sh -c 'echo performance > /sys/devices/system/cpu/cpufreq/policy4/scaling_governor' sudo sh -c 'echo performance > /sys/devices/system/cpu/cpufreq/policy6/scaling_governor'
Start glmark2-es2-wayland:
glmark2-es2-wayland
Chromium web browser has enabled hardware acceleration by default, supports WebGL, and can view hardware acceleration details by entering the URL chrome://gpu, as shown below:
Play a video in the browser, then use fuser on the command line to view the mpp device node to confirm that the vpu interface is being called:
pi@FriendlyElec:~$ fuser /dev/mpp_service /dev/mpp_service: 3258
If there is no content output from the fuser command, it means software decoding.
Android include the following features:
Please note: After turning on the ADB, the USB3 port will work in Device mode, if you need to connect a device such as a USB stick, you need to turn off the ADB and restart the board
In general, ADB is disabled by default, please follow the steps below to enable it:
$ adb devices List of devices attached 27f7a63caa3faf16 device
$ adb shell
nanopi3:/ $
If Android is installed on an SD card, after burning the image to the SD card, do not insert it into the target board and start it up. Instead, execute the following commands on a Linux computer to expand the partition first:
echo "write" | sfdisk /dev/sdX -q --force parted -s /dev/sdX unit % resizepart 14 100 print
Please replace /dev/sdX with the actual device name of your SD card, and 14 with the sequence number of the last partition on your SD card.
If Android is installed on eMMC, you can start a Linux system (such as Ubuntu or Debian) from an SD card and perform the same operation on the eMMC device via the command line. The device name for eMMC is usually /dev/mmcblk2.
If the Android system has already been booted and you need to restore the factory settings after expanding the partition, for example, if the system is an Android tablet, the option to restore factory settings can be found here:
Settings -> System -> Reset options -> Erase all data(factory reset)
Using EFlasher to burn the Android image to eMMC will automatically expand the file system.
Debian11 Desktop is a light-weighted debian desktop system,it has the following features:
Regular Account:
User Name: pi
Password: pi
Root:
the root user account is disabled by default, you may configure the root password through the 'sudo passwd root' command.
Since the Debian Bullseye hostname is the hardware model by default, you can use the ping command to get the IP address:ping NanoPC-T6
Run the following commandssh pi@NanoPC-T6
The default password is: pi
$ sudo apt-get update
The following command to install x11vnc server:
sudo apt-get install x11vnc
sudo x11vnc -storepasswd /etc/x11vnc.pwd
Create service configuration file:
sudo vi /lib/systemd/system/x11vnc.service
Let’s copy and paste the following configuration into our newly create service file:
[Unit] Description=Start x11vnc at startup. Requires=display-manager.service After=syslog.target network-online.target Wants=syslog.target network-online.target [Service] Type=simple ExecStart=/usr/bin/x11vnc -display :0 -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pwd -rfbport 5900 -shared -capslock -nomodtweak ExecStop=/usr/bin/x11vnc -R stop Restart=on-failure [Install] WantedBy=multi-user.target
The following commands to reload the systmd system and to enable and start the x11vnc service:
sudo systemctl daemon-reload sudo systemctl enable x11vnc.service sudo systemctl start x11vnc
Start the VNC client software, input IP:5900 to connect:
sudo dpkg -i /opt/linux-headers-*.deb
try to compile a kernel module:
sudo apt update sudo apt install git gcc make bc git clone https://github.com/RinCat/RTL88x2BU-Linux-Driver.git cd RTL88x2BU-Linux-Driver make -j$(nproc) sudo make install sudo modprobe 88x2bu
timedatectl
timedatectl list-timezones
sudo timedatectl set-timezone Asia/Shanghai
Replace the following two files in the kernel source code directory and recompile the kernel:
kernel/logo.bmp
kernel/logo_kernel.bmp
Or use the script to operate, as shown below:
git clone https://github.com/friendlyarm/sd-fuse_rk3588.git -b master --single-branch cd sd-fuse_rk3588
convert files/logo.jpg -type truecolor /tmp/logo.bmp convert files/logo.jpg -type truecolor /tmp/logo_kernel.bmp sudo LOGO=/tmp/logo.bmp KERNEL_LOGO=/tmp/logo_kernel.bmp ./build-kernel.sh debian-bullseye-desktop-arm64 sudo ./mk-sd-image.sh debian-bullseye-desktop-arm64 sudo ./mk-emmc-image.sh debian-bullseye-desktop-arm64
Note: If your system is not debian-bullseye-desktop-arm64, please specify according to the actual situation
Modify the following configuration file:
/home/pi/.config/pcmanfm/LXDE/desktop-items-0.conf
Execute the following command in a terminal:
sudo firstboot && sudo reboot
Put the desktop file in the ~/.config/autostart/ directory, for example:
mkdir ~/.config/autostart/ cp /usr/share/applications/kodi.desktop ~/.config/autostart/
sudo systemctl mask udisks2 sudo reboot
Enter the following command and select 'zh_CN.UTF-8':
sudo dpkg-reconfigure locales
Add environment variables to .bashrc:
echo "export LC_ALL=zh_CN.UTF-8" >> ~/.bashrc echo "export LANG=zh_CN.UTF-8" >> ~/.bashrc echo "export LANGUAGE=zh_CN.UTF-8" >> ~/.bashrc
Reboot device:
sudo reboot
Enter the following command to install fcitx and Pinyin input method:
sudo apt update sudo apt-get install fcitx fcitx-pinyin sudo apt-get install im-config sudo apt-get install fcitx-table* sudo apt-get install fcitx-ui-classic fcitx-ui-light sudo apt-get install fcitx-frontend-gtk2 fcitx-frontend-gtk3 fcitx-frontend-qt4 sudo apt-get remove --purge scim* ibus* sudo reboot
After reboot, press Ctrl+Space to switch between Chinese and English input methods, and the input method icon will appear in the upper right corner, right-click the input method icon in the upper right corner to switch input methods in the pop-up menu, as shown below:
Visit the Plex website: https://www.plex.tv/media-server-downloads/
On the download page, select the category "Plex Media Server", choose "Linux" for the platform and "Ubuntu(16.04+)/Debian(8+) - ARMv8" for the version,
After downloading the deb package, use the dpkg command to install the package:
sudo dpkg -i plexmediaserver_1.31.0.6654-02189b09f_arm64.deb
After installation, login to the Plex server by typing the following URL into your computer browser: http://IP地址:32400/web/
Please refer to: How to Install Docker on Debian
Click on the icon on the top right in the Debian's main window, select your wanted WiFi hotspot and proceed with prompts
Please visit: Use NetworkManager to configure network settings
You can test it by clicking on the Terminator icon to start a commandline utility in the System Tools and run the following commands:
glmark2-es2
Open the system's menu and go to Perferences -> Monitor Settings to customize your settings.
Recommended resolution: 1920x1080@60Hz
Open the command line terminal and enter the command to operate, Note:
1) You need to login to the desktop;
2) If you are using ssh terminal, please use the same username as the desktop login. The default is pi. You cannot use the root user. you also need to assign the DISPLAY variable:
export DISPLAY=:0.0
xrandr -q
For example set to 1920X1080@60Hz:
xrandr --output HDMI-1 --mode 1920x1080 --refresh 60
For example, the transformation scaling horizontal coordinates by 0.8, vertical coordinates by 1.04 and moving the screen by 35 pixels right and 19 pixels down:
xrandr --output HDMI-1 --transform 0.80,0,-35,0,1.04,-19,0,0,1
Edit ~/.config/autostart/lxrandr-autostart.desktop,Write the full xrandr command to the key at the beginning of "Exec= as shown below:
[Desktop Entry] Type=Application Name=LXRandR autostart Comment=Start xrandr with settings done in LXRandR Exec=sh -c 'xrandr --output HDMI-1 --mode 1920x1080 --refresh 50 --transform 1.04,0,-35,0,1.05,-30,0,0,1' OnlyShowIn=LXDE
Chromium web browser has enabled hardware acceleration by default, supports WebGL, and can view hardware acceleration details by entering the URL chrome://gpu, as shown below:
Play a video in the browser, then use fuser on the command line to view the mpp device node to confirm that the vpu interface is being called:
pi@FriendlyElec:~$ fuser /dev/mpp_service /dev/mpp_service: 3258
If there is no content output from the fuser command, it means software decoding.
User Name: pi Password: pi
User Name: root Password: fa
$ sudo apt-get update
By default "eth0" is assigned an IP address obtained via dhcp. If you want to change the setting you need to change the following file:
vi /etc/network/interfaces.d/eth0
For example if you want to assign a static IP to it you can run the following commands:
auto eth0 iface eth0 inet static address 192.168.1.231 netmask 255.255.255.0 gateway 192.168.1.1
The other ethernet port are set up with static IP addresses, as follows:
eth1: 192.168.2.1
You also need to modify the following file to add the DNS configuration:
vi /etc/systemd/resolved.conf
For example, set to 192.168.1.1:
[Resolve] DNS=192.168.1.1
Restart the systemd-resolved service with the following command:
sudo systemctl restart systemd-resolved.service sudo systemctl enable systemd-resolved.service
To change the setting of "eth1" you can add a new file similar to eth0's configuration file under the /etc/network/interfaces.d/ directory.
First, use the following command to check if Network-Manager is installed on your system:
which nmcli
If you have installed it, refer to this link to connect to WiFi: Use NetworkManager to configure network settings, If you do not have Network-Manager installed on your system, please refer to the following method to configure WiFi,
By default the WiFi device is "wlan0". You need to create a configuration file under "/etc/network/interfaces.d/" for WiFi:
vi /etc/network/interfaces.d/wlan0
Here is a sample wlan0 file:
auto lo
iface lo inet loopback
auto wlan0
iface wlan0 inet dhcp
wpa-driver wext
wpa-ssid YourWiFiESSID
wpa-ap-scan 1
wpa-proto RSN
wpa-pairwise CCMP
wpa-group CCMP
wpa-key-mgmt WPA-PSK
wpa-psk YourWiFiPassword
Please replace "YourWiFiESSID" and "YourWiFiPassword" with your WiFiESSID and password. After save and close the file you can connect to your WiFi source by running the following command:
sudo systemctl daemon-reload sudo systemctl restart networking
After you power on your board it will automatically connect to your WiFi source.
Please note that if you use one TF card to boot multiple boards the WiFi device name will likely be named to "wlan1", "wlan2" and etc. You can reset it to "wlan0" by deleting the contents of the following file and reboot your board: /etc/udev/rules.d/70-persistent-net.rules
sudo dpkg -i /opt/linux-headers-*.deb
First determine whether the system already exists the leds initialization service:
sudo systemctl status leds
If the leds service already exists, change the default behavior of the LEDs by editing the following file:
/etc/init.d/leds.sh
Since there is no leds service in the early firmware, you need to refer to the following guide to manually configure the LEDs. First, set the following kernel modules to be automatically loaded at boot:
modprobe ledtrig-netdev echo ledtrig-netdev > /etc/modules-load.d/ledtrig-netdev.conf
Put the following into the autorun script to associate the status leds with the ethernet interface, and you can configure it to behave in other ways by referring to these content:
echo netdev > /sys/class/leds/usr_led/trigger echo eth0 > /sys/class/leds/usr_led/device_name echo 1 > /sys/class/leds/usr_led/link
Please refre to docker-cross-compiler-novnc
Install and run requirements ubuntu 20.04, install required packages using the following commands:
sudo apt-get -y update sudo apt-get install -y sudo curl sudo bash -c \ "$(curl -fsSL https://raw.githubusercontent.com/friendlyarm/build-env-on-ubuntu-bionic/master/install.sh)"
The following cross-compilers will be installed:
Version | Architecture | Compiler path | Purpose |
---|---|---|---|
4.9.3 | armhf | /opt/FriendlyARM/toolchain/4.9.3 | Can be used to build 32-bit ARM applications |
6.4 | aarch64 | /opt/FriendlyARM/toolchain/6.4-aarch64 | Can be used to build kernel 4.4 |
11.3 | aarch64 | /opt/FriendlyARM/toolchain/11.3-aarch64 | Can be used to build kernel 4.19 or higher and U-Boot |
Based on the table in the previous section, select the appropriate version of the compiler and add the compiler's path to PATH. For example, if you want to use the 11.3 cross-compiler, edit ~/.bashrc using vi and add the following content to the end:
export PATH=/opt/FriendlyARM/toolchain/11.3-aarch64/bin:$PATH export GCC_COLORS=auto
Run the ~/.bashrc script to make it effective in the current commandline. Note: there is a space after ".":
. ~/.bashrc
To verify if the installation was successful:
$ aarch64-linux-gcc -v Using built-in specs. COLLECT_GCC=aarch64-linux-gcc COLLECT_LTO_WRAPPER=/opt/FriendlyARM/toolchain/11.3-aarch64/libexec/gcc/aarch64-cortexa53-linux-gnu/11.3.0/lto-wrapper Target: aarch64-cortexa53-linux-gnu Configured with: /home/cross/arm64/src/gcc/configure --build=x86_64-build_pc-linux-gnu --host=x86_64-build_pc-linux-gnu --target=aarch64-cortexa53-linux-gnu --prefix=/opt/FriendlyARM/toolchain/11.3-aarch64 --exec_prefix=/opt/FriendlyARM/toolchain/11.3-aarch64 --with-sysroot=/opt/FriendlyARM/toolchain/11.3-aarch64/aarch64-cortexa53-linux-gnu/sysroot --enable-languages=c,c++ --enable-fix-cortex-a53-843419 --with-arch=armv8-a+crypto+crc --with-cpu=cortex-a53 --with-pkgversion=ctng-1.25.0-119g-FA --with-bugurl=http://www.friendlyelec.com/ --enable-objc-gc --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --disable-libquadmath --disable-libquadmath-support --disable-libsanitizer --disable-libmpx --with-gmp=/home/cross/arm64/buildtools --with-mpfr=/home/cross/arm64/buildtools --with-mpc=/home/cross/arm64/buildtools --with-isl=/home/cross/arm64/buildtools --enable-lto --enable-threads=posix --disable-libstdcxx-pch --enable-clocale=gnu --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-indirect-function --enable-gnu-unique-object --enable-default-pie --enable-linker-build-id --with-linker-hash-style=gnu --enable-plugin --enable-gold --with-libintl-prefix=/home/cross/arm64/buildtools --disable-multilib --with-local-prefix=/opt/FriendlyARM/toolchain/11.3-aarch64/aarch64-cortexa53-linux-gnu/sysroot --enable-long-long --enable-checking=release --enable-link-serialization=2 Thread model: posix Supported LTO compression algorithms: zlib gcc version 11.3.0 (ctng-1.25.0-119g-FA)
Two versions are available, please choose as required:
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
mkdir friendlywrt22-rk3588 cd friendlywrt22-rk3588 git clone https://github.com/friendlyarm/repo --depth 1 tools tools/repo init -u https://github.com/friendlyarm/friendlywrt_manifests -b master-v22.03 \ -m rk3588.xml --repo-url=https://github.com/friendlyarm/repo --no-clone-bundle tools/repo sync -c --no-clone-bundle
./build.sh rk3588.mk # or rk3588-docker.mk
All the components (including u-boot, kernel, and friendlywrt) are compiled and the sd card image will be generated, then execute the following command to generate the image file for installing the system into the emmc:
./build.sh emmc-img
After making changes to the project, the sd card image needs to be repackaged by running the following command:
./build.sh sd-img
cd friendlywrt make menuconfig rm -rf ./tmp make -j${nproc} cd ../ ./build.sh sd-img ./build.sh emmc-img
./build.sh uboot
./build.sh kernel
./build.sh friendlywrt
Or go to the friendlywrt directory and follow the standard openwrt commands. If you get an error with the above command, try using the following command to compile in a single thread:
cd friendlywrt make -j1 V=s
Operating System | Kernel Version | U-boot version | Cross-compiler | Partition type | Packaging Tool | Kernel branch | Kernel configuration | U-boot branch | U-boot configuration |
---|---|---|---|---|---|---|---|---|---|
buildroot | linux v5.10.y | u-boot v2017.09 | 11.3-aarch64 | nanopi6_linux_defconfig | rk3588_defconfig | ||||
ubuntu-jammy-desktop-arm64 | |||||||||
ubuntu-jammy-minimal-arm64 | |||||||||
friendlycore-focal-arm64 | |||||||||
debian-bullseye-core-arm64 | |||||||||
debian-bullseye-desktop-arm64 | |||||||||
debian-bullseye-minimal-arm64 | |||||||||
debian-buster-desktop-arm64 | |||||||||
friendlywrt21 | nanopi6_linux_defconfig friendlywrt.config | ||||||||
friendlywrt21-docker | |||||||||
friendlywrt22 | |||||||||
friendlywrt22-docker |
Clone the repository to your local drive then build:
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 # Configuring the Kernel # Load default configuration make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 nanopi6_linux_defconfig # Optionally, load configuration for FriendlyWrt # make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 nanopi6_linux_defconfig friendlywrt.config # Optionally, if you want to change the default kernel config # make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 menuconfig # Start building kernel make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 nanopi6-images -j$(nproc) # Start building kernel 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_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)
The generated files:
kernel.img | resource.img | The kernel modules are located in the out-modules directory |
Run your build:
Please refre to #Running the build
Clone the repository to your local drive then build:
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
After the compilation, the following files will be generated:
uboot.img | rk3588_spl_loader_v1.08.111.bin (aka MiniLoaderAll.bin) |
Run your build:
Please refre to #Running the build
RK3588 uses GPT partitions by default, you can use the dd command, but be careful to choose the right output device:
Use the 'parted' command to view the partition layout:
parted /dev/mmcblk2 print
Sample outputs:
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
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:
dd if=resource.img of=/dev/mmcblk2p4 bs=1M dd if=kernel.img of=/dev/mmcblk2p5 bs=1M
If you want to update u-boot:
dd if=boot.img of=/dev/mmcblk2p1 bs=1M
To update new driver modules, copy the newly compiled driver modules to the appropriate directory under /lib/modules.
To create a new OS image file, you need to use the "sd-fuse" packaging tool.
"sd-fuse" is a collection of scripts that can be used to create bootable SD card images for FriendlyElec boards. Its main features include:
Please click on the following link to find out more:
Kernel version | Packaging Tool |
---|---|
linux v5.10.y |
To flash U-Boot and kernel using the "upgrade_tool" tool, please use the following command:
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
Note: "upgrade_tool" is a command-line tool provided by Rockchip for Linux operating systems (Linux_Upgrade_Tool).
git clone https://github.com/friendlyarm/sd-fuse_rk3588.git --single-branch -b master cd sd-fuse_rk3588 tar xvzf /path/to/netdrive/03_Partition\ image\ files/friendlycore-focal-arm64-images.tgz
Download the kernel source code and compile it. the relevant image files in the friendlycore-focal-arm64 directory will be automatically updated, including the kernel modules in the file system:
git clone https://github.com/friendlyarm/kernel-rockchip --depth 1 -b nanopi5-v5.10.y_opt kernel-rk3588 KERNEL_SRC=$PWD/kernel-rk3588 ./build-kernel.sh friendlycore-focal-arm64
git clone https://github.com/friendlyarm/kernel-rockchip --depth 1 -b nanopi5-v5.10.y_opt kernel-rk3588 MK_HEADERS_DEB=1 BUILD_THIRD_PARTY_DRIVER=0 KERNEL_SRC=$PWD/kernel-rk3588 ./build-kernel.sh friendlycore-focal-arm64
Download the uboot source code and compile it. the relevant image files in the friendlycore-focal-arm64 directory will be automatically updated:
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
Repackage the image file in the friendlycore-focal-arm64 directory into sd card image:
./mk-sd-image.sh friendlycore-focal-arm64
After the command is completed, the image is in the out directory, you can use the dd command to make the SD boot card, for example:
dd if=out/rk3588-sd-friendlycore-focal-5.10-arm64-YYYYMMDD.img of=/dev/sdX bs=1M
Netdisk URL: Click here
File location on netdisk:"07_Source codes/rk35xx-android12-xxxxxxx-YYYYMMDD.tgz" (YYYYMMDD represents the date of the package, and xxxxxxx represents the final commit-id)
Unzip and fetch updates:
tar xzf '/path/to/netdisk/07_Source codes/rk35xx-android12-xxxxxxx-YYYYMMDD.tgz' cd rk35xx-android12 git pull
echo "ROCKCHIP_DEVICE_DIR := device/rockchip/rk3588/nanopi6" > .rockchip_device.mk # export INSTALL_GAPPS_FOR_TESTING=yes # include google apps . setenv.sh ./build.sh -FMu
echo "ROCKCHIP_DEVICE_DIR := device/rockchip/rk3588/nanopi6_box" > .rockchip_device.mk # export INSTALL_GAPPS_FOR_TESTING=yes # include google apps . setenv.sh ./build.sh -FMu
# export INSTALL_GAPPS_FOR_TESTING=yes # include google apps . setenv.sh make
After the Android compilation is completed, the image file will be stored in the rockdev/Image-aosp_nanopi3 subdirectory of the Android source code directory.
Use the rockchip tool to flash the following file: rockdev/Image-aosp_nanopi3/update.img
Refer to the following steps:
1) Insert the SD card of the eflasher system into the host;
2) Copy the files in the rockdev/Image-aosp_nanopi3 directory to the android12 or androidtv directory in the FRIENDLYARM partition of the SD card:
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) Insert the SD card into NanoPC-T6 and re-flash;
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
For more information, please refer to #Packaging and creating an SD image
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 /
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.
su root git clone https://github.com/friendlyarm/sd-fuse_rk3588 --single-branch -b master 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/emmc-eflasher-images.tgz scp pi@BOARDIP:/rootfs.tar.gz /rootfs.tar.gz mkdir rootfs tar xzf rootfs.tar.gz -C rootfs ./build-rootfs-img.sh rootfs debian-buster-desktop-arm64 ./mk-sd-image.sh debian-buster-desktop-arm64 ./mk-emmc-image.sh debian-buster-desktop-arm64 autostart=yes
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.
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:
git clone https://github.com/friendlyarm/sd-fuse_rk3588.git -b master --single-branch 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/emmc-flasher-images.tgz vim friendlywrt22/parameter.txt # Edit command-line parameters ./mk-sd-image.sh friendlywrt22 # Repackage sd image file ./mk-emmc-image.sh friendlywrt22 # Repackage sd-to-emmc image file
root@FriendlyELEC:~# cat /proc/partitions major minor #blocks name 1 0 4096 ram0 259 0 125034840 nvme0n1
If there is a nvme0n1 device node it means an SSD is recognized.
To mount an SSD under Linux we re-partition it as one section by running the following command:
(echo g; echo n; echo p; echo 1; echo ""; echo ""; echo w; echo q) | fdisk /dev/nvme0n1
If you want to re-partition it to multiple sections you can run "fdisk /dev/nvme0n1". For more detail about this command refer to the fdisk's manual.
After an SSD is successfully partitioned you can check its sections by running "cat /proc/partitions". The /dev/nvme0n1p1 section is used to store data:
root@FriendlyELEC:~# cat /proc/partitions major minor #blocks name 1 0 4096 ram0 259 0 125034840 nvme0n1 259 2 125033816 nvme0n1p1
The following command formats a section to ext4:
mkfs.ext4 /dev/nvme0n1p1
Before we mount an SSD's section you need to know its Block ID. You can check it by running "blkid":
blkid /dev/nvme0n1p1 /dev/nvme0n1p1: UUID="d15c4bbf-a6c3-486f-8f81-35a8dbd46057" TYPE="ext4" PARTUUID="887628f0-01"
Add a "Block ID" to "/etc/fstab" and here is what it looks like
UUID=<Block ID> /media/nvme ext4 defaults 0 0
You need to replace <Block ID> with the UUID obtained by running "blkid". To mount the SSD in our example we made the "/etc/fstab" file as follows:
UUID=d15c4bbf-a6c3-486f-8f81-35a8dbd46057 /media/nvme ext4 defaults 0 0
We want to mount an SSD to "/media/nvme" but this directory doesn't exist. Therefore we create it and change its access right by running the following commands:
mkdir -p /media/nvme chmod 777 /media/nvme
Run "mount" to check if the SSD is mounted successfully:
mount /media/nvme
You can reboot your board to check if your SSD will be automatically mounted:
reboot
There are three versions:
Initial Release