"Hikey960" 修訂間的差異

出自 flip the world
前往: 導覽搜尋
(Enable UART)
 
(未顯示同一使用者於中間所作的 11 次修訂)
行 5: 行 5:
 
[[file:Hikey960-pin-def.jpg]]
 
[[file:Hikey960-pin-def.jpg]]
  
== SDK Architecture ==
+
* UART signals are driven at 1.8V.
[[File:MT7697_SDK_architecture.PNG|MT7697 SDK Arch]]
+
 
 
== Build FW ==
 
== Build FW ==
* ./build.sh linkit7697_hdk freertos_ledcube
 
* Or, go to the mt7697/project/linkit7697_hdk/templates/freertos_ledcube/GCC, then, make
 
== FW Programming ==
 
* git clone https://github.com/MediaTek-Labs/mt76x7-uploader
 
* python ./upload.py -c /dev/ttyUSB0 -f ./out/linkit7697_hdk/freertos_ledcube/freertos_ledcube.bin -t cm4 -p mt7697
 
  
== module ON or OFF feature option ==
+
* Download the Android source tree:
* Edit inc/hal_feature_config.h in each example code
+
** repo init -u https://android.googlesource.com/platform/manifest -b master
 +
** repo sync -j8
 +
 
 +
*Build:
 +
** . ./build/envsetup.sh
 +
** lunch hikey960-userdebug
 +
** make -j24
 +
 
 +
== Installing initial images ==
 +
*Select fastboot mode by turning ON switch 3 (for details, refer to the HiKey 960 Getting Started guide).
 +
*Power the board.
 +
*Flash initial images:
 +
** cd device/linaro/hikey/installer/hikey960
 +
*Turn OFF switch 3 and power cycle the board.
 +
 
 +
== Flashing images ==
 +
*Enter fastboot mode by turning ON switch 3.
 +
*Flash images by running the following commands:
 +
** fastboot flash boot out/target/product/hikey960/boot.img
 +
*Turn OFF switch 3 and power cycle the board.
 +
 
 +
== Building the kernel ==
 +
*Run the following commands:
 +
**mkdir repo-common
 +
**cd repo-common
 +
**repo init -u https://android.googlesource.com/kernel/manifest -b hikey-linaro-android-4.19
 +
**repo sync -j8 -c
 +
**rm -rf out
 +
**rm build.config
 +
**BUILD_CONFIG=hikey-linaro/build.config.hikey960 ./build/build.sh
 +
*Update the kernel in the boot image.
 +
**Copy hi3660-hikey960.dtb (out/android-hikey-linaro-4.19/dist/hi3660-hikey960.dtb) to the hikey-kernel directory as file hi3660-hikey960.dtb-4.19.
 +
**Copy the Image file (out/android-hikey-linaro-4.19/dist/Image.gz-dtb) to the hikey-kernel directory as file Image.gz-dtb-hikey960-4.19.
 +
<pre>
 +
cp repo-common/out/android-hikey-linaro-4.19/dist/hi3660-hikey960.dtb hikey960/device/linaro/hikey-kernel/hi3660-hikey960.dtb-4.19
 +
cp repo-common/out/android-hikey-linaro-4.19/dist/Image.gz-dtb hikey960/device/linaro/hikey-kernel/Image.gz-dtb-hikey960-4.19
 +
</pre>
 +
*Make the boot image:
 +
**make bootimage -j24
 +
 
 +
== Enable UART ==
 +
* In repo-common/hikey-linaro
 +
<pre>
 +
diff --git a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
 +
index 80334e500..a2f1de30b 100644
 +
--- a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
 +
+++ b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
 +
@@ -494,7 +494,7 @@
 +
                        clock-names = "uartclk", "apb_pclk";
 +
                        pinctrl-names = "default";
 +
                        pinctrl-0 = <&uart0_pmx_func &uart0_cfg_func>;
 +
-                      status = "disabled";
 +
+                      status = "ok";
 +
                };
 +
 
 +
                uart1: serial@fdf00000 {
 +
@@ -508,7 +508,7 @@
 +
                        clock-names = "uartclk", "apb_pclk";
 +
                        pinctrl-names = "default";
 +
                        pinctrl-0 = <&uart1_pmx_func &uart1_cfg_func>;
 +
-                      status = "disabled";
 +
+                      status = "ok";
 +
                };
 +
 
 +
                uart2: serial@fdf03000 {
 +
</pre>
 +
 
 +
== Setting the serial number ==
 +
=== To set the random serial number, run ===
 +
**fastboot getvar nve:SN@16\_DIGIT\_NUMBER
 +
*Bootloader exports the generated serial number to the kernel using androidboot.serialno=.
  
 +
=== Setting monitor resolution ===
 +
*Edit the device/linaro/hikey/hikey960/BoardConfig.mk parameter BOARD_KERNEL_CMDLINE and configure the video setting. For example, the setting for a 24-inch monitor is video=HDMI-A-1:1280x800@60.
  
== Note ==
+
== Android note ==
 
* Disable ICMP for enable ping
 
* Disable ICMP for enable ping
 
** sysctl -w net.ipv4.icmp_echo_ignore_all=0
 
** sysctl -w net.ipv4.icmp_echo_ignore_all=0

於 2020年5月13日 (三) 21:17 的最新修訂

Hikey960 Front Hikey960 Back

Pin definition

Hikey960-pin-def.jpg

  • UART signals are driven at 1.8V.

Build FW

  • Build:
    • . ./build/envsetup.sh
    • lunch hikey960-userdebug
    • make -j24

Installing initial images

  • Select fastboot mode by turning ON switch 3 (for details, refer to the HiKey 960 Getting Started guide).
  • Power the board.
  • Flash initial images:
    • cd device/linaro/hikey/installer/hikey960
  • Turn OFF switch 3 and power cycle the board.

Flashing images

  • Enter fastboot mode by turning ON switch 3.
  • Flash images by running the following commands:
    • fastboot flash boot out/target/product/hikey960/boot.img
  • Turn OFF switch 3 and power cycle the board.

Building the kernel

  • Run the following commands:
  • Update the kernel in the boot image.
    • Copy hi3660-hikey960.dtb (out/android-hikey-linaro-4.19/dist/hi3660-hikey960.dtb) to the hikey-kernel directory as file hi3660-hikey960.dtb-4.19.
    • Copy the Image file (out/android-hikey-linaro-4.19/dist/Image.gz-dtb) to the hikey-kernel directory as file Image.gz-dtb-hikey960-4.19.
 cp repo-common/out/android-hikey-linaro-4.19/dist/hi3660-hikey960.dtb hikey960/device/linaro/hikey-kernel/hi3660-hikey960.dtb-4.19
 cp repo-common/out/android-hikey-linaro-4.19/dist/Image.gz-dtb hikey960/device/linaro/hikey-kernel/Image.gz-dtb-hikey960-4.19
  • Make the boot image:
    • make bootimage -j24

Enable UART

  • In repo-common/hikey-linaro
diff --git a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
index 80334e500..a2f1de30b 100644
--- a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
+++ b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
@@ -494,7 +494,7 @@
                        clock-names = "uartclk", "apb_pclk";
                        pinctrl-names = "default";
                        pinctrl-0 = <&uart0_pmx_func &uart0_cfg_func>;
-                       status = "disabled";
+                       status = "ok";
                };

                uart1: serial@fdf00000 {
@@ -508,7 +508,7 @@
                        clock-names = "uartclk", "apb_pclk";
                        pinctrl-names = "default";
                        pinctrl-0 = <&uart1_pmx_func &uart1_cfg_func>;
-                       status = "disabled";
+                       status = "ok";
                };

                uart2: serial@fdf03000 {

Setting the serial number

To set the random serial number, run

    • fastboot getvar nve:SN@16\_DIGIT\_NUMBER
  • Bootloader exports the generated serial number to the kernel using androidboot.serialno=.

Setting monitor resolution

  • Edit the device/linaro/hikey/hikey960/BoardConfig.mk parameter BOARD_KERNEL_CMDLINE and configure the video setting. For example, the setting for a 24-inch monitor is video=HDMI-A-1:1280x800@60.

Android note

  • Disable ICMP for enable ping
    • sysctl -w net.ipv4.icmp_echo_ignore_all=0

Reference