Difference between revisions of "APITestPage"

From FriendlyELEC WiKi
Jump to: navigation, search
(updated by API)
(updated by API)
Line 1: Line 1:
[[NanoPC-T6/zh|查看中文]]
+
==Android系统的使用==
==Introduction==
+
===Android7 下使用4G模块EC20===
[[File:NanoPC-T6-01B.jpg|thumb|Overview]]
+
====连接方法====
[[File:NanoPC-T6-A01.jpg|thumb|Front]]
+
{{#switch: {{{1}}}
[[File:NanoPC-T6-B01.jpg|thumb|Back]]
+
| Smart4418 =
[[File:T6-01.jpg|thumb|frameless|250x250px|Case]]
+
将EC20连接到底板的miniPCIe接口,以Smart4418底板为例,如下图所示:<br />
[[File:T6-02.jpg|thumb|frameless|250x250px|Case]]
+
[[File:Smartxx18-4G-EC20.jpg|frameless|400px]]<br>
[[File:T6-03.jpg|thumb|frameless|250x250px|Case]]
+
| Smart6818 =
[[File:T6-04.jpg|thumb|frameless|250x250px|Case]]
+
将EC20连接到底板的miniPCIe接口,以Smart4418底板为例,如下图所示:<br />
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.<br/><br/>
+
[[File:Smartxx18-4G-EC20.jpg|frameless|400px]]<br>
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.  <br/><br/>
+
| Smart4418SDK 1305 =
The NanoPC-T6 has one USB3.0 port and one USB C port.<br/><br/>
+
将EC20连接到底板的miniPCIe接口,以Smart4418底板为例,如下图所示:<br />
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.
+
[[File:Smartxx18-4G-EC20.jpg|frameless|400px]]<br>
==Hardware Spec==
+
| Smart4418SDK 1606 =
* SoC: Rockchip RK3588
+
将EC20连接到底板的miniPCIe接口,以Smart4418底板为例,如下图所示:<br />
** CPU: Quad-core ARM Cortex-A76(up to 2.4GHz) and quad-core Cortex-A55 CPU (up to 1.8GHz)
+
[[File:Smartxx18-4G-EC20.jpg|frameless|400px]]<br>
** GPU: Mali-G610 MP4, compatible with OpenGLES 1.1, 2.0, and 3.2, OpenCL up to 2.2 and Vulkan1.2
+
| #default =
** VPU: 8K@60fps H.265 and VP9 decoder, 8K@30fps H.264 decoder, 4K@60fps AV1 decoder, 8K@30fps H.264 and H.265 encoder
+
连接时,需要通过USB to miniPCIe转接板转接EC20,再连接到主板的USB Host端口,以T2为例,如下图所示:<br /> 
** NPU: 6TOPs, supports INT4/INT8/INT16/FP16
+
[[File: T2-4G-EC20.jpg|frameless|400px]]<br>
* RAM: 64-bit 4GB/8GB/16GB LPDDR4X at 2133MHz
+
}}
* Flash: 32GB/64GB/256GB eMMC, at HS400 mode
+
连接后无需额外的配置,启动Android后就可以使用4G上网了,跟Android手机类拟。<br />
* microSD: support up to SDR104 mode
+
* Ethernet: 2x PCIe 2.5G Ethernet
+
* 4G LTE: one mimiPCIe connector and one microSIM slot
+
* USB-A: 1x USB 3.0 Type-A
+
* USB-C: 1x Full function USB Type‑C™ port, support DP display up to 4Kp60, USB 3.0
+
* Video input:
+
** 1x Standard HDMI input port, up to 4Kp60
+
** 2x 4-lane MIPI-CSI, compatible with MIPI V1.2
+
* Video output:
+
** 2x Standard HDMI output ports
+
*** compatible with HDMI2.1, HDMI2.0, and HDMI1.4 operation
+
*** one support displays up to 7680x4320@60Hz, another one support up to 4Kp60
+
*** Support RGB/YUV(up to 10bit) format
+
** 2x 4-lane MIPI-DSI, compatible with MIPI DPHY 2.0 or CPHY 1.1
+
* Audio:
+
** 3.5mm jack for stereo headphone output
+
** 2.0mm PH-2A connector for analog microphone input
+
* GPIO:
+
** 40-pin 2.54mm header connector
+
** up to 2x SPIs, 6x UARTs, 1x I2Cs, 8x PWMs, 2x I2Ss, 28x GPIOs
+
* M.2 Connectors
+
** one M.2 M-Key connector with PCIe 3.0 x4 for NVMe SSDs up to 2,500 MB/s
+
** one M.2 E-key connector with PCIe 2.1 x1 and USB2.0 Host
+
* others:
+
** 2 Pin 1.27/1.25mm RTC battery input connector for low power RTC IC HYM8563TS
+
** one 38Khz IR receiver
+
** MASK button for eMMC update, reset button, and Power button
+
** one 5V Fan connector
+
** Debug UART, 3-Pin 2.54mm header, 3.3V level, 1500000bps
+
** 2 x GPIO Controlled LED (SYS, LED1)
+
* Power supply: 5.5*2.1mm DC Jack, 12VDC input.
+
* PCB: 8 Layer, 110x80x1.6mm
+
*Ambient Operating Temperature: 0℃ to 70℃
+
  
==Diagram, Layout and Dimension==
+
{{#switch: {{{1}}}
[[File:NanoPC-T6 Layout-L.jpg|1100px]]
+
| Smart4418 =
===Layout===
+
===Android4.4 下使用4G模块华为ME909u-521===
<!-- [[File:NanoPC-T6_Layout.jpg|thumb|frameless|300px|NanoPC-T6 Layout]] -->
+
(注:该模块只支持 Android4.4)
* '''40-pin GPIO'''
+
* Smart4418使用Android4.4系统,假设你已经接好4G通信模块(4G Model:ME909u-521, 该模块支持联通FDD-LTE),进入系统后,可直接使用4G通信模块。
::{| class="wikitable"
+
[[File:4G Model-nanopc-t3.png|frameless|500px|4G Model]]
|-
+
  | #default =
|'''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
+
|}
+
* '''MIPI-DSI'''
+
:: 0.5mm FPC Connector
+
::{| class="wikitable"
+
|-
+
|'''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
+
|}
+
* '''MIPI-CSI'''
+
:: 0.5mm FPC Connector
+
::{| class="wikitable"
+
|-
+
|'''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
+
|}
+
* '''Debug UART Pin Spec'''
+
:: 3.3V level signals, 1500000bps
+
::{| class="wikitable"
+
|-
+
|'''Pin#''' ||'''Assignment''' ||  '''Description ''' 
+
|-
+
|1    || GND                    || 0V
+
|-
+
|2  || UART2_TX_M0_DEBUG        || output
+
|-
+
|3  || UART2_RX_M0_DEBUG        || intput
+
|}
+
*'''About Power'''
+
** Power supply via 5.5*2.1mm DC Jack. 5V~20V, 12V is recommended.
+
**Power Output Capacity
+
::{| class="wikitable"
+
|-
+
|'''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
+
|}
+
  
*'''RTC'''
+
===更换Android开机Logo===
::RTC backup current is 0.25μA TYP (VDD =3.0V, TA =25℃).
+
替换下面路径下的 logo.bmp:  
::Connector P/N: Molex 53398-0271
+
<syntaxhighlight lang="bash">
[[File:T6-rtc.png|350px]]
+
/opt/FriendlyARM/smart4418/android/device/friendlyelec/nanopi3/boot/logo.bmp
 +
/opt/FriendlyARM/smart4418/android/device/friendlyelec/nanopi2/boot/logo.bmp
 +
</syntaxhighlight>
 +
重新编译 Android 源代码。
 +
===使用fastboot命令烧写android固件===
 +
上电时在串口终端敲回车进入uboot命令行模式,然后输入以下命令:
 +
<syntaxhighlight lang="bash">
 +
fastboot 0
 +
</syntaxhighlight>
 +
For S5P4418, PC端可使用以下命令来更新emmc:
 +
<syntaxhighlight lang="bash">
 +
fastboot flash partmap partmap.txt
 +
fastboot flash 2ndboot bl1-mmcboot.bin
 +
fastboot flash fip-loader loader-mmc.img
 +
fastboot flash fip-secure bl_mon.img
 +
fastboot flash fip-nonsecure bootloader.img
 +
fastboot flash boot boot.img
 +
fastboot flash system system.img
 +
fastboot flash cache cache.img
 +
fastboot flash userdata userdata.img
 +
</syntaxhighlight>
 +
For S5P6818, PC端可使用以下命令来更新emmc:
 +
<syntaxhighlight lang="bash">
 +
fastboot flash partmap partmap.txt
 +
fastboot flash 2ndboot bl1-mmcboot.bin
 +
fastboot flash fip-loader fip-loader.img
 +
fastboot flash fip-secure fip-secure.img
 +
fastboot flash fip-nonsecure fip-nonsecure.img
 +
fastboot flash boot boot.img
 +
fastboot flash system system.img
 +
fastboot flash cache cache.img
 +
fastboot flash userdata userdata.img
 +
</syntaxhighlight>
 +
===Android证书===
 +
Android 5 我们缺省采用的是自己生成的证书,位于:
 +
<syntaxhighlight lang="bash">
 +
  vendor/friendly-arm/nanopi3/security/
 +
</syntaxhighlight>
 +
Android 7 缺省采用的是:
 +
<syntaxhighlight lang="bash">
 +
  build/target/product/security/
 +
</syntaxhighlight>
 +
===Android7只连接HDMI的情况下性能优化===
 +
====背景说明====
 +
默认情况下,驱动会初始化两个framebuffer,分别用于主显示LCD和HDMI,如果项目需求只需要使用HDMI,不需要用LCD,则可以根据本章节的步骤进行修改,修改后会将HDMI设置为主显示,这样驱动只会初始化一个framebuffer,节约资源,对UI性能和开机速度会有相应的提升。<br />
 +
本章节内容仅适用于 S5P6818 Android7, S5P4418修改方法类拟,只是需要调整一下相应的文件。<br />
 +
====修改内核====
 +
需要修改内核dts,禁止dp_drm_lvds节点, 如下所示:
 +
<syntaxhighlight lang="bash">
 +
--- a/arch/arm64/boot/dts/nexell/s5p6818-nanopi3-common.dtsi
 +
+++ b/arch/arm64/boot/dts/nexell/s5p6818-nanopi3-common.dtsi
 +
@@ -810,6 +810,7 @@
 +
                        plane-names = "video", "rgb", "primary";
 +
                };
 +
                port@1 {
 +
+                      status = "disabled";
 +
                        reg = <1>;
 +
                        back_color = < 0x0 >;
 +
                        color_key = < 0x0 >;
 +
@@ -820,7 +821,7 @@
  
*'''IR receiver'''
+
&dp_drm_lvds {
::Connected to PWM3_IR_M0
+
        remote-endpoint = <&lcd_panel>;
::38Khz carrier frequency
+
-      status = "ok";
::compatible with NEC protocol, User code is 3B4C
+
+      status = "disabled";
::Support FriendlyELEC RC100 IR controller
+
  
==Get Started==
+
        display-timing {
===Essentials You Need===
+
                clock-frequency = <50000000>;
Before starting to use your NanoPC-T6 get the following items ready
+
</syntaxhighlight>
* NanoPC-T6
+
编译后将获得新的 arch/arm64/boot/dts/nexell/s5p6818-nanopi3-rev*.dtb。 <br />
* MicroSD Card/TF Card: Class 10 or Above, minimum 8GB SDHC
+
测试阶段可直接通过adb 更新到板子,命令如下:
* A DC 12V/2A power
+
<syntaxhighlight lang="bash">
* If you need to develop and compile,you need a computer that can connect to the Internet. It is recommended to install Ubuntu 20.04 64-bit system and use the following script to initialize the development environment, or use docker container: <br />
+
adb root; adb wait-for-device; adb shell mkdir /storage/sdcard1/; adb
**[https://github.com/friendlyarm/build-env-on-ubuntu-bionic How to setup the Compiling Environment on Ubuntu bionic]<br />
+
shell mount -t ext4 /dev/block/mmcblk0p1 /storage/sdcard1/
**[https://github.com/friendlyarm/docker-cross-compiler-novnc docker-cross-compiler-novnc]<br />
+
adb push arch/arm64/boot/dts/nexell/s5p6818-nanopi3-rev*.dtb /storage/sdcard1/
===TF Cards We Tested===
+
</syntaxhighlight>
Refer to: [[Template:TFCardsWeTested/zh|TFCardsWeTested]]
+
完整的固件则需要替换android7源代码目录 device/friendlyelec/nanopi3/boot 下的文件
{{1500000SerialPortDebugSetting}}
+
====修改env.conf====
===Install OS===
+
修改 device/friendlyelec/nanopi3/boot/env.conf 增加一行:
{{Downloads-RK3588|NanoPC-T6}}
+
<syntaxhighlight lang="bash">
{{BurnLinuxToSD-RK3588|NanoPC-T6}}
+
lcdtype    HDMI1080P60
{{BurnLinuxToEMMC-RK3588|NanoPC-T6}}
+
</syntaxhighlight>
{{RockchipBootPriority|NanoPC-T6}}
+
此模式需要与android7启动后探测到的模式相同,否则会导致长时的黑屏状态,甚至无显示输出, 或者进入uboot命令行环境手工设置:
{{FriendlyWrt21|NanoPC-T6}}
+
<syntaxhighlight lang="bash">
==Work with Ubuntu 22.04 Desktop==
+
setenv lcdtype HDMI1080P60; saveenv; reset
===Introduction to Ubuntu 22.04 Desktop===
+
</syntaxhighlight>
{{UbuntuJammyDesktop-Intro|NanoPC-T6}}
+
====修改system.prop====
{{UbuntuJammyDesktop-Common|NanoPC-T6}}
+
修改android7中 device/friendlyelec/nanopi3/system.prop
{{UbuntuJammyDesktop-WithHDMI|NanoPC-T6}}
+
<syntaxhighlight lang="bash">
{{Android12|NanoPC-T6}}
+
ro.sf.lcd_density=240
==Work with Debian11 Desktop==
+
</syntaxhighlight>
===Introduction to Debian11 Desktop===
+
或其它自己认为更合适的值, 也可串口或adb环境下,wm density 240 来调整观察效果是否合适。
{{DebianBullseyeDesktop-XFCE-Intro|NanoPC-T6}}
+
====编译Android====
{{DebianBullseyeDesktop-XFCE-Common|NanoPC-T6}}
+
根据wiki说明编译android 7并测试,遇到异常则请仔细检查前面的步骤
{{DebianBullseyeDesktop-XFCE-WithHDMI|NanoPC-T6}}
+
{{DebianBullseyeDesktop-XFCE-HDMIIN|NanoPC-T6}}
+
==Work with Debian10 Desktop==
+
* Refer to:
+
** [[Debian Buster Desktop|Debian Buster]]
+
{{OfficialUbuntuCore|NanoPC-T6}}
+
{{FriendlyCoreRemoveQt}}
+
==How to Compile==
+
{{Rockchip-DevEnv|NanoPC-T6}}
+
{{RK3588-BuildFromSource|NanoPC-T6}}
+
{{RK3588-HWAccess|NanoPC-T6}}
+
{{RockchipMiscCustome|RK3588}}
+
 
+
{{Template:How to Initialize and Format New SSD And HDD|NanoPC-T6}}
+
==Schematic, PCB CAD File==
+
*Schematic: https://wiki.friendlyelec.com/wiki/images/9/97/NanoPC-T6_2301_SCH.PDF
+
*PCB CAD File:https://wiki.friendlyelec.com/wiki/images/9/90/NanoPC-T6_2301_DXF.zip
+
 
+
==Update Logs==
+
{{RK3588-UpdateLog|NanoPC-T6}}
+

Revision as of 07:59, 8 September 2023

1 Android系统的使用

1.1 Android7 下使用4G模块EC20

1.1.1 连接方法

连接时,需要通过USB to miniPCIe转接板转接EC20,再连接到主板的USB Host端口,以T2为例,如下图所示:
T2-4G-EC20.jpg
连接后无需额外的配置,启动Android后就可以使用4G上网了,跟Android手机类拟。


替换下面路径下的 logo.bmp:

/opt/FriendlyARM/smart4418/android/device/friendlyelec/nanopi3/boot/logo.bmp
/opt/FriendlyARM/smart4418/android/device/friendlyelec/nanopi2/boot/logo.bmp

重新编译 Android 源代码。

1.3 使用fastboot命令烧写android固件

上电时在串口终端敲回车进入uboot命令行模式,然后输入以下命令:

fastboot 0

For S5P4418, PC端可使用以下命令来更新emmc:

fastboot flash partmap partmap.txt
fastboot flash 2ndboot bl1-mmcboot.bin
fastboot flash fip-loader loader-mmc.img
fastboot flash fip-secure bl_mon.img
fastboot flash fip-nonsecure bootloader.img
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash cache cache.img
fastboot flash userdata userdata.img

For S5P6818, PC端可使用以下命令来更新emmc:

fastboot flash partmap partmap.txt
fastboot flash 2ndboot bl1-mmcboot.bin
fastboot flash fip-loader fip-loader.img 
fastboot flash fip-secure fip-secure.img 
fastboot flash fip-nonsecure fip-nonsecure.img
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash cache cache.img
fastboot flash userdata userdata.img

1.4 Android证书

Android 5 我们缺省采用的是自己生成的证书,位于:

  vendor/friendly-arm/nanopi3/security/

Android 7 缺省采用的是:

  build/target/product/security/

1.5 Android7只连接HDMI的情况下性能优化

1.5.1 背景说明

默认情况下,驱动会初始化两个framebuffer,分别用于主显示LCD和HDMI,如果项目需求只需要使用HDMI,不需要用LCD,则可以根据本章节的步骤进行修改,修改后会将HDMI设置为主显示,这样驱动只会初始化一个framebuffer,节约资源,对UI性能和开机速度会有相应的提升。
本章节内容仅适用于 S5P6818 Android7, S5P4418修改方法类拟,只是需要调整一下相应的文件。

1.5.2 修改内核

需要修改内核dts,禁止dp_drm_lvds节点, 如下所示:

--- a/arch/arm64/boot/dts/nexell/s5p6818-nanopi3-common.dtsi
+++ b/arch/arm64/boot/dts/nexell/s5p6818-nanopi3-common.dtsi
@@ -810,6 +810,7 @@
                        plane-names = "video", "rgb", "primary";
                };
                port@1 {
+                       status = "disabled";
                        reg = <1>;
                        back_color = < 0x0 >;
                        color_key = < 0x0 >;
@@ -820,7 +821,7 @@
 
 &dp_drm_lvds {
        remote-endpoint = <&lcd_panel>;
-       status = "ok";
+       status = "disabled";
 
        display-timing {
                clock-frequency = <50000000>;

编译后将获得新的 arch/arm64/boot/dts/nexell/s5p6818-nanopi3-rev*.dtb。
测试阶段可直接通过adb 更新到板子,命令如下:

adb root; adb wait-for-device; adb shell mkdir /storage/sdcard1/; adb
shell mount -t ext4 /dev/block/mmcblk0p1 /storage/sdcard1/
adb push arch/arm64/boot/dts/nexell/s5p6818-nanopi3-rev*.dtb /storage/sdcard1/

完整的固件则需要替换android7源代码目录 device/friendlyelec/nanopi3/boot 下的文件

1.5.3 修改env.conf

修改 device/friendlyelec/nanopi3/boot/env.conf 增加一行:

lcdtype     HDMI1080P60

此模式需要与android7启动后探测到的模式相同,否则会导致长时的黑屏状态,甚至无显示输出, 或者进入uboot命令行环境手工设置:

setenv lcdtype HDMI1080P60; saveenv; reset

1.5.4 修改system.prop

修改android7中 device/friendlyelec/nanopi3/system.prop

ro.sf.lcd_density=240

或其它自己认为更合适的值, 也可串口或adb环境下,wm density 240 来调整观察效果是否合适。

1.5.5 编译Android

根据wiki说明编译android 7并测试,遇到异常则请仔细检查前面的步骤