Difference between revisions of "Main Page"

From FriendlyELEC WiKi
Jump to: navigation, search
(updated by API)
(One intermediate revision by the same user not shown)
Line 1: Line 1:
===How to compile custom kernel and u-boot===
+
 
====Kernel and u-boot versions for each OS====
+
<div id="GettingStarted"></div>
{| class="wikitable"  
+
=Getting Started=
 +
{| border="0" cellpadding="10" width="100%"
 
|-
 
|-
! Operating System
+
|width="32%" valign="top" align="left"|
! Kernel Version
+
*[https://github.com/friendlyarm/build-env-on-ubuntu-bionic How to setup the Compiling Environment on Ubuntu bionic]
! U-boot version
+
*[[BakeBit Starter Kit with NanoPi NEO/NEO2/NEO Air|Get Started with BakeBit Starter Kit]]
! Cross-compiler
+
*[[Get Started with Matrix Starter Kit]]
! Partition type
+
*[[Hardware testing]]
! Build toolset
+
|width="32%" valign="top" align="left"|
! Kernel code branch
+
|}
! Kernel configuration
+
 
! U-boot code branch
+
<div id="Learning"></div>
! u-boot configuration
+
 
 +
=Software & Development Tools=
 +
{| border="0" cellpadding="10" width="100%"
 
|-
 
|-
| buildroot
+
|width="32%" valign="top" align="left"|
| rowspan="10" | linux v5.10.y
+
===Embedded Operating Systems===
| rowspan="10" | u-boot <br />v2017.09
+
*[https://github.com/friendlyarm/Actions-FriendlyWrt FriendlyWrt]
| rowspan="10" | 11.3-aarch64
+
*[[Buildroot|Buildroot]]
| rowspan="10" | [https://github.com/friendlyarm/sd-fuse_rk3568/blob/master/prebuilt/parameter.template GPT]
+
*[[Debian Bullseye Desktop|Debian11 (Bullseye)]]
| rowspan="10" | [https://github.com/friendlyarm/sd-fuse_rk3568/tree/master sd-fuse]
+
*[[Debian Buster Desktop|Debian10 (Buster)]]
| rowspan="10" | [https://github.com/friendlyarm/kernel-rockchip/tree/nanopi5-v5.10.y_opt nanopi5-v5.10.y_opt]
+
*[[FriendlyDesktop 18.04 for RK3399|FriendlyDesktop 18.04 for RK3399]]
| rowspan="6" | nanopi5_linux_defconfig
+
*[[FriendlyCore (based on ubuntu-core with Qt)|FriendlyCore]]
| rowspan="10" | [https://github.com/friendlyarm/uboot-rockchip/tree/nanopi5-v2017.09 nanopi5-v2017.09]
+
*[[Lubuntu desktop 16.04 for RK3399]]
| rowspan="10" | rk3568_defconfig
+
*[[Lubuntu desktop|Lubuntu desktop 16.04 for S5P4418/S5P6818]]
 +
*[https://dietpi.com/docs/hardware/#nanopi-series-friendlyarm DietPi OS]
 +
<!--
 +
*[[DietPi|DietPi for H3]]
 +
*[[DietPi|DietPi for H5]]
 +
*[[Debian Jessie]]
 +
-->
 +
 
 +
=== Utilities ===
 +
*[[EFlasher]]
 +
*[[npi-config]]
 +
*[[How to make your own SD-bootable ROM]]
 +
*[[Use NetworkManager to configure network settings]]
 +
*[[How to use overlayfs on Linux]]
 +
 
 +
=== Building from open source code ===
 +
*[[How to Build FriendlyWrt]]
 +
*[[How to Build, Install and Setting Qt Application|Qt dev: How to Build, Install and Setting Qt Application]]
 +
*[[Building U-boot and Linux for H5/H3/H2+]]
 +
*Cross-compiling Qt application in Docker:  [https://github.com/friendlyarm/friendlyelec-ubuntu18-docker [RK3399 platform]] [http://github.com/friendlyarm/friendlyelec-ubuntu16-docker [S5P4418/S5P6818/H3/H5 platform platform]]
 +
*Building Android open source project in Docker: [http://github.com/friendlyarm/friendlyelec-android-docker [RK3399/S5P4418/S5P6818/H3/H5 platform]]
 +
*[https://github.com/friendlyarm/ble-server-sample-for-linux Building and running BLE GATT Server Example on FriendlyCore]
 +
|width="32%" valign="top" align="left"|
 +
 
 +
=== AI, Qt, IoT and more… ===
 +
*[[How to Install Docker on Debian]]
 +
*[[WiringPi for RK3399|WiringPi for RK3399]]
 +
*[[WiringPi-Python for RK3399|WiringPi-Python for RK3399]]
 +
*[[WiringNP: NanoPi NEO/NEO2/Air GPIO Programming with C]]
 +
*[[RPi.GPIO : NanoPi NEO/NEO2/Air GPIO Programming with Python]]
 +
*[[FriendlyThings for RK3399|Android: FriendlyThings for RK3399]]
 +
*[[FriendlyThings|Android: FriendlyThings for S5P4418/S5P6818/H3/H5 Platforms]]
 +
*[[FriendlyThings APIs|Android: FriendlyThings APIs]]
 +
*[https://github.com/friendlyarm/install-opencv-on-friendlycore Installing OpenCV on FriendlyCore]
 +
*[https://github.com/friendlyarm/install-caffe-on-friendlycore Installing Caffe on FriendlyCore]
 +
*[https://github.com/friendlyarm/install-tensorflow-on-friendlycore Installing Tensorflow  on RK3399 boards]
 +
*[[Install ROS Melodic on NanoPC-T4/zh|Install ROS Melodic on NanoPC-T4]]
 +
*[[How to use MIPI camera on RK3399 boards]]
 +
*[[How to use 4G Module on NanoPC-T4]]
 +
*[[How to use 4G Module on Debian/zh|How to use 4G Module on Debian]]
 +
*[[How to setup RTMP server on NanoPC-T4]]
 +
*[[How to setup VNC server on NanoPC-T4]]
 +
*[[How to setup XRDP server on NanoPC-T4]]
 +
*[[How to install chinese input method on FriendlyDesktop|如何在FriendlyDesktop上安装中文输入法]]
 +
*[[Template:RK3399-Linux-Install-Docker|How to install and use docker on RK3399 boards]]
 +
*[[Template:Linux-Create-WiFiAP|How to setup WiFiAP / HotAP]]
 +
*[[How to setup JellyFin media system on NanoPi-R2S/zh|在NanoPi-R2S上安装使用JellyFin影音服务器]]
 +
*[[How to use a USB WiFi adapter as an access point on FriendlyWrt|如何在FriendlyWrt下使用USB WiFi作为AP]]
 +
|}
 +
 
 +
<div id="Products"></div>
 +
 
 +
=Hardware Settings and Controls (TBD) =
 +
{| border="0" cellpadding="10" width="100%"
 
|-
 
|-
| friendlycore-focal-arm64
+
|width="32%" valign="top" align="left"|
 +
*[[WiFi]]
 +
*[[LED]]
 +
*[[Serial port]]
 +
<!--*[[PWM]]-->
 +
*[[SPI]]
 +
*[[USB OTG]]
 +
*[[LCD]]
 +
*[[CPU]]
 +
*[[Network]]
 +
|width="32%" valign="top" align="left"|
 +
*[[I2S]]
 +
*[[I2C]]
 +
*[[CVBS]]
 +
*[[Watchdog]]
 +
*[[GSM/GPRS]]
 +
*[[Codec]]
 +
*[[PCIe]]
 +
*[[GPIO]]
 +
*[[eMMC]]
 +
|width="32%" valign="top" align="left"|
 +
*[[Bluetooth]]
 +
*[[HDMI]]
 +
*[[Camera]]
 +
*[[Memory]]
 +
*[[RTC]]
 +
*[[EEPROM]]
 +
*[[MIPI-DSI]]
 +
|}
 +
<div id="Products"></div>
 +
 
 +
=Products=
 +
===CPU Boards===
 +
<div id="CPUBoards"></div>
 +
{| border="0" cellpadding="10" width="100%"
 
|-
 
|-
| debian-bullseye-core-arm64
+
|width="32%" valign="top" align="left"|
 +
*[[Micro2451]]
 +
*[http://www.friendlyarm.com/ Tiny4412,Super4412,Smart210,Tiny210,Tiny6410,Tiny2451,Tiny2416 ]
 +
 
 +
|width="32%" valign="top" align="left"|
 +
*[[Smart4418]]
 +
*[[Smart6818]]
 +
*[[Core4418]]
 +
*[[SOM-4418]]
 +
*[[SOM-RK3399]]
 +
*[[SOM-RK3399v2]]
 +
 
 +
<!--*[[Tiny4412]]-->
 +
<!--*[[Super4412]]-->
 +
<!--*[[Smart210]]-->
 +
<!--*[[Tiny210]]-->
 +
<!--*[[Tiny3358]]-->
 +
<!--*[[Tiny6410]]-->
 +
<!--*[[Micro2440]]-->
 +
<!--*[[Tiny2451]]-->
 +
<!--*[[Tiny2416]]-->
 +
 
 +
|}
 +
 
 +
===Carrier Boards===
 +
<div id="CarrierBoards"></div>
 +
{| border="0" cellpadding="10" width="100%"
 
|-
 
|-
| debian-bullseye-desktop-arm64
+
|width="32%" valign="top" align="left"|
 +
*[[Smart210/4418 SDK]]
 +
*[[Smart4418SDK 1305]]
 +
*[[Smart4418SDK 1606]]
 +
*[[Smart4418/6818SDK V2]]
 +
*[[All-in-One Android Touch Screen]]
 +
*[[Smart210/4418 ADK]]
 +
 
 +
|width="32%" valign="top" align="left"|
 +
*[[SOM-RK3399 Dev Kit]]
 +
*[[Edge-RT300]]
 +
 
 +
|width="32%" valign="top" align="left"|
 +
<!--*[[Tiny2416/2451/6410/210 ADK]]-->
 +
<!--*[[Tiny2416/2451/6410/210 SDK]]-->
 +
<!--*[[Tiny3358 ITX SDK]]-->
 +
<!--*[[Micro2440/2451 SDK]]-->
 +
 
 +
|width="32%" valign="top" align="left"|
 +
<!--*[[Tiny4412 ADK]]-->
 +
<!--*[[Tiny4412 SDK]]-->
 +
 
 +
|}
 +
 
 +
===NanoPC/Pi Series===
 +
<div id="NanoPCSeries"></div>
 +
{| border="0" cellpadding="10" width="100%"
 
|-
 
|-
| debian-bullseye-minimal-arm64
+
|width="25%" valign="top" align="left"|
|-
+
*[[NanoPC-T1]]
| debian-buster-desktop-arm64
+
*[[NanoPC-T2]]
 +
*[[NanoPC-T3]]
 +
*[[NanoPC-T3 Plus]]
 +
*[[NanoPC-T4]]
 +
*[[NanoPi]]
 +
*[[NanoPi 2]]
 +
*[[NanoPi 2 Fire]]
 +
*[[NanoPi Fire2A]]
 +
*[[NanoPi Fire3]]
 +
*[[NanoPi S2]]
 +
*[[NanoPi A64]]
 +
*[[NanoPi Duo]]
 +
*[[NanoPi Duo2]]
 +
|width="25%" valign="top" align="left"|
 +
*[[NanoPi K1 Plus]]
 +
*[[NanoPi K2]]
 +
*[[NanoPi M1]]
 +
*[[NanoPi M1 Plus]]
 +
*[[NanoPi M2]]
 +
*[[NanoPi M2A]]
 +
*[[NanoPi M3]]
 +
*[[NanoPi M4]]
 +
*[[NanoPi M4V2]]
 +
*[[NanoPi M4B]]
 +
|width="25%" valign="top" align="left"|
 +
*[[NanoPi NEO]]
 +
*[[NanoPi NEO2]]
 +
*[[NanoPi NEO2 Black]]
 +
*[[NanoPi NEO3]]
 +
*[[NanoPi NEO4]]
 +
*[[NanoPi NEO Air]]
 +
*[[NanoPi NEO Core]]
 +
*[[NanoPi NEO Core2]]
 +
*[[NanoPi NEO Plus2]]
 +
*[[ZeroPi]]
 +
|width="25%" valign="top" align="left"|
 +
*[[NanoPi R1]]
 +
*[[NanoPi R1S-H3]]
 +
*[[NanoPi R1S-H5]]
 +
*[[NanoPi R2S]]
 +
*[[NanoPi R2C]]
 +
*[[NanoPi R2C Plus]]
 +
*[[NanoPi R4S]]
 +
*[[NanoPi R4SE]]
 +
*[[NanoPi R5S]]
 +
*[[NanoPi R5C]]
 +
*[[NanoPi R6S]]
 +
*[[NanoPi R6C]]
 +
*[[NanoPC-T6]]
 +
|}
 +
 
 +
===Mini Boards===
 +
<div id="MiniBoards"></div>
 +
:[http://www.friendlyarm.com/ Mini210s, Mini2440, Mini2451, Mini6410]
 +
<!--
 +
{| border="0" cellpadding="10" width="100%"
 
|-
 
|-
| friendlywrt21
+
|width="32%" valign="top" align="left"|
| rowspan="4" | nanopi5_linux_defconfig<br />friendlywrt.config
+
*[[Mini210S]]
|-
+
*[[Mini2440]]
| friendlywrt21-docker
+
 
|-
+
|width="32%" valign="top" align="left"|
| friendlywrt22
+
*[[Mini2451]]
|-
+
 
| friendlywrt22-docker
+
|width="32%" valign="top" align="left"|
 +
*[[Mini6410]]
 +
 
 
|}
 
|}
* Kernel source code repository:https://github.com/friendlyarm/kernel-rockchip
+
-->
* u-boot source code repository:https://github.com/friendlyarm/uboot-rockchip
+
<div id="Matrix"></div>
* The cross-compile toolchain is located in the path: /opt/FriendlyARM/toolchain/. Before using it, you need to export it to the PATH environment variable:
+
{{Matrix}}
<syntaxhighlight lang="bash">
+
 
export PATH=/opt/FriendlyARM/toolchain/11.3-aarch64/bin/:$PATH
+
===Starter Kit===
</syntaxhighlight>
+
<div id="Starter Kit"></div>
* The [https://github.com/friendlyarm/sd-fuse_rk3568/tree/master sd-fuse] build toolset can be used to quickly compile the kernel and u-boot, as well as repackaging SD card image and SD-to-eMMC image.
+
{| border="0" cellpadding="10" width="100%"
====Compile kernel linux-v5.10.y====
+
Download the source code and compile as follows:
+
<syntaxhighlight lang="bash">
+
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
+
# Option1: Load Linux system configuration
+
make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 nanopi5_linux_defconfig
+
# Option2: Load FriendlyWrt system configuration
+
# 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
+
# Compiling Kernel
+
make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 nanopi5-images -j$(nproc)
+
# Compiling the driver 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)
+
</syntaxhighlight>
+
You will get the following file:
+
{| class="wikitable"  
+
 
|-
 
|-
| kernel.img
+
|width="32%" valign="top" align="left"|
| resource.img
+
*[[Matrix Starter Kit with NanoPi]]
| <del>boot.img This img is deprecated</del>
+
*[[Matrix Starter Kit with RasberryPi]]
| The kernel modules are located in the out-modules directory
+
*[[Matrix Starter Kit with Arduino]]
 +
*[[BakeBit|BakeBit Starter Kit with NEO]]
 +
 
 +
 
 +
|width="32%" valign="top" align="left"|
 +
 
 +
|width="32%" valign="top" align="left"|
 +
 
 
|}
 
|}
Installing the kernel: <br>
+
 
Please click on [[#Download u-boot and the kernel to the target board]]<br>
+
===LCD Modulse===
====Compile u-boot v2017.09====
+
{| border="0" cellpadding="10" width="100%"
Download the source code and compile as follows:
+
<syntaxhighlight lang="bash">
+
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
+
</syntaxhighlight>
+
After the compilation, the following files will be generated:
+
{| class="wikitable"  
+
 
|-
 
|-
| uboot.img
+
|width="32%" valign="top" align="left"|
| rk356x_spl_loader_v1.15.112.bin (Before packaging, you need to rename it to MiniLoaderAll.bin)
+
*[[LCD-H43]]
 +
*[[LCD-HD700]]
 +
*[[LCD-HD702]]
 +
*[[LCD-HD702V]]
 +
*[[LCD-HD702E]]
 +
*[[LCD-HD101]]
 +
*[[LCD-K116E]]
 +
*[[LCD-L80]]
 +
*[[LCD-T35]]
 +
 
 +
|width="32%" valign="top" align="left"|
 +
*[[LCD-TD35]]
 +
*[[LCD-X710]]
 +
*[[LCD-N35]]
 +
*[[LCD-N43]]
 +
*[[LCD-P35]]
 +
*[[LCD-P43]]
 +
 
 
|}
 
|}
Installing the u-boot: <br>
 
Please click on [[#Download u-boot and the kernel to the target board]]<br>
 
  
====Download u-boot and the kernel to the target board====
+
{| border="0" cellpadding="10" width="100%"
=====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:
+
|width="32%" valign="top" align="left"|
* The SD/TF Card device node: /dev/mmcblk0 <br />
+
*[[LCD-S430]]
* The eMMC device node: /dev/mmcblk2 <br />
+
*[[LCD-S70]]
The following is an example of how to update the kernel to eMMC:<br />
+
*[[LCD-S700]]
Use the 'parted' command to view the partition layout:
+
*[[LCD-S700]]
<syntaxhighlight lang="bash">
+
*[[LCD-S702]]
parted /dev/mmcblk2 print
+
*[[LCD-S70D]]
</syntaxhighlight>
+
You should get output similar to the following:
+
<syntaxhighlight lang="bash">
+
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
+
|width="32%" valign="top" align="left"|
1      8389kB  12.6MB  4194kB              uboot
+
*[[LCD-W35]]
2      12.6MB  16.8MB  4194kB              misc
+
*[[LCD-W35B]]
3      16.8MB  21.0MB  4194kB              dtbo
+
*[[LCD-W50]]
4      21.0MB  37.7MB  16.8MB              resource
+
*[[LCD-W101]]
5      37.7MB  79.7MB  41.9MB              kernel
+
*[[LCD-W500]]
6      79.7MB  113MB  33.6MB              boot
+
7      113MB  147MB  33.6MB              recovery
+
8      147MB  31.0GB  30.9GB  ext4        rootfs
+
</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:
+
<syntaxhighlight lang="bash">
+
dd if=resource.img of=/dev/mmcblk2p4 bs=1M
+
dd if=kernel.img of=/dev/mmcblk2p5 bs=1M
+
</syntaxhighlight>
+
If you want to update u-boot:
+
<syntaxhighlight lang="bash">
+
dd if=boot.img of=/dev/mmcblk2p1 bs=1M
+
</syntaxhighlight>
+
To update new driver modules, copy the newly compiled driver modules to the appropriate directory under /lib/modules.
+
  
=====How to create a new OS image file=====
+
|}
To create a new OS image file, you need to use the "sd-fuse" packaging tool.<br />
+
 
<br />
+
===3D Models===
"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 />
+
<div id="3DModules"></div>
* Creation of root filesystem images from a directory <br />
+
 
* Building of bootable SD card images<br />
+
===Accessories===
* Simple compilation of kernel, U-Boot, and third-party drivers<br />
+
<div id="Accessories"></div>
Please click on the following link to find out more:
+
{| border="0" cellpadding="10" width="100%"
{| class="wikitable"  
+
 
|-
 
|-
! Kernel version
+
|width="32%" valign="top" align="left"|
! Build toolset
+
*[[NanoPC-T1 Case]]
|-
+
 
| linux v5.10.y
+
|width="32%" valign="top" align="left"|
| [https://github.com/friendlyarm/sd-fuse_rk3568/tree/master<br /> sd-fuse_rk3568]
+
 
 +
 
 +
|width="32%" valign="top" align="left"|
 +
 
 
|}
 
|}
=====USB flashing=====
 
======Linux======
 
To flash U-Boot and kernel using the "upgrade_tool" tool, please use the following command:
 
<syntaxhighlight lang="bash">
 
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
 
</syntaxhighlight>
 
Note: "upgrade_tool" is a command-line tool provided by Rockchip for Linux operating systems (Linux_Upgrade_Tool).
 

Revision as of 11:29, 8 May 2023

1 Getting Started

2 Software & Development Tools

2.1 Embedded Operating Systems

2.2 Utilities

2.3 Building from open source code

2.4 AI, Qt, IoT and more…

3 Hardware Settings and Controls (TBD)

4 Products

4.1 CPU Boards


4.2 Carrier Boards

4.3 NanoPC/Pi Series

4.4 Mini Boards

Mini210s, Mini2440, Mini2451, Mini6410

4.5 Matrix


4.6 Breakout

4.7 BakeBit

4.8 HATs&Docks

4.9 Starter Kit


4.10 LCD Modulse

4.11 3D Models

4.12 Accessories