Difference between revisions of "Getting Started with W2"

From Banana Pi Wiki
Jump to: navigation, search
(Install On EMMC)
(Install On EMMC)
Line 56: Line 56:
  
 
====Install On EMMC====
 
====Install On EMMC====
 +
=====Android=====
 
   1.Connect debug console between PC and BPI-W2, and Power off BPI-W2
 
   1.Connect debug console between PC and BPI-W2, and Power off BPI-W2
 
   2.Run “boot_recovery.exe”   
 
   2.Run “boot_recovery.exe”   

Revision as of 17:53, 18 July 2019

Introduction

Overview: BPI-W2 Android 6.0

Read more: Banana Pi BPI-W2

Development

Let's get start to develop on BPI-W2, see amazing things happen.

Old page:Getting Started with BPI-W2

Basic Development

Prepare to develop

  • Prepare 8G/above TF card, USB-Serial interface, PC with Ubuntu System
  • Using your USB-Serial Connect debug console on W2

Debug console wire.png

W2 debug console.jpg

Install Linux Image On W2

Install Image On SD Card On Windows

  • Board SW4 switch to 1
  • English:
 1.Format SD card: http://wiki.banana-pi.org/Quick_Start_Banana_pi_SBC#Format_your_SD_under_Windows_os
 2.Install Image On SD Card: http://wiki.banana-pi.org/Quick_Start_Banana_pi_SBC#how_to_write_Linux_image
  • Chinese:
 https://www.cnblogs.com/topbin/p/10882992.html

Install Image On SD Card On Ubuntu

  • Board SW4 switch to 1
 1.Install bpi-tools on your system
 * apt-get install pv
 * curl -sL https://github.com/BPI-SINOVOIP/bpi-tools/raw/master/bpi-tools | sudo -E bash
 
 2.After you download the image, insert your TF card into your Ubuntu
 * Execute "bpi-copy xxx.img /dev/sdx" to install image on your TF card.
 
 3.After step 2, then you can insert your TF card into W2, and press power button setup W2.

Install Image On EMMC On Ubuntu

 1.Prepare a sd which is installed ubuntu image, the Board SW4 switch to 1, let W2 boot from sd card.
 2.Copy emmc image to udisk then plug in W2, then mount udisk.
 3.After mount udisk, use command "bpi-copy xxx-emmc-xxx.img" to install image on Emmc.
 4.After success to install, power off W2, switch SW4 to 0, power on W2.

Load Android image on W2

Install On SD Card

Install On EMMC

Android
 1.Connect debug console between PC and BPI-W2, and Power off BPI-W2
 2.Run “boot_recovery.exe”  
 
 1)Check LK option --> yes
 2)Choose HW Setting File as “RTD1296_hwsetting_BOOT_4DDR4_4Gb_s1866.config”
 3)Choose dvrboot.bin File as “dvrboot.exe.bin”
 4)Click Write button

W2 Emmc 1.png

 3.After you click the Write button, then power on BPI-W2, the software will begins to burn boot to BPI-W2 and waiting for response "OK"。

W2 Emmc 2.png

W2 Emmc 3.png

 4.Close app and power off BPI-W2.
 5.Format your Udisk first and then copy Android image to it.

W2 Emmc 4.png

 6.Change the image name to install.img

W2 Emmc 5.png

 7.Copy other files in the following to Udisk.

W2 Emmc 6.png

 8.Plug the U-disk to BPI-W2 USB3.0 interface(the blue one)

W2 Emmc 7.png

 9.Open a terminal software, here I use SecureCRT 8.0.
 10.Press “Esc” key on your PC, and power on BPI-W2, then press “enter” key, you will get into uboot command line.

W2 Emmc 8.png

 11.Input these commands
    Realtek> usb start 
    Realtek> fatload usb 0:1 0x01b00000 bluecore.audio
    Realtek> fatload usb 0:1 0x03000000 emmc.uImage
    Realtek> fatload usb 0:1 0x02100000 rescue.emmc.dtb
    Realtek> fatload usb 0:1 0x02200000 rescue.root.emmc.cpio.gz_pad.img
    Realtek> boot all

W2 Emmc 9.png

 12.Check HDMI status to 100%
Ubuntu
 1.Download this image: 
 
 * Google: https://drive.google.com/open?id=1BkkLcuNryVgwIpcrpX50G9kpQEcsFiDp
 * Baidu: https://pan.baidu.com/s/1fPSu8TyylN9wRP300WNs6A PinCode:z0wx 
 
 2.Prepare a sd card which installed image.
 3.Switch SW4 to 1, boot w2 from sd card.
 4.Execute commands "cd / ","bpi-copy android7xxx.img", then this android image will be installed on Emmc
 5.Switch Sw4 to 0, remove sd card, power on W2

Advanced Development

GPIO

GPIO Control

PWM Control

SATA

1. Mount dev on W2

  • After insert sata interface, execute "fdisk -l"
  • Then "mount /dev/sdx /mnt/xxx"
 W2 Sata.jpg

2. If you meet some errors when you mount SATA, try these following commands:

  • "fdisk /dev/sdx" to create new partition , set your partition numbers and size, after created partitions, input "wq" to save and quit.
  • "mkfs.ext2 /dev/sdx" to format the SATA
  • "mount /dev/sdx /mnt/xxx"

SSD

1. After you success to insert SATA, we could input following commands to test SATA interface:

  • "time dd if=/dev/xxx of=/dev/null bs=1M count=1000" to test read speed
  • "time dd if=/dev/zero of=/dev/sdx bs=1M count=1000" to test write speed
 W2 ssd test.jpg

HDD

1. After you success to insert SATA, we could input following commands to test SATA interface:

  • "time dd if=/dev/xxx of=/dev/null bs=1M count=1000" to test read speed
  • "time dd if=/dev/zero of=/dev/sdx bs=1M count=1000" to test write speed
 W2 hdd test.jpg

NetWork

GMAC

  • iperf3 -c [server]

W2 iperf3 c.jpg

  • iperf3 -u -c [server]

W2 iperf3 u c.jpg

  • iperf3 -s

W2 iperf3 s.jpg

WiFi & BT

1.If you want to use WiFi or BT, you could use RTL8822BE module.

RTL8822BE.jpg

STA

1. Use commands to setup WiFi client

  • ip link set wlan0 up
  • iw dev wlan0 scan | grep SSID
  • vim /etc/wpa_supplicant/wpa_supplicant.conf
network={    
ssid="ssid"    
psk="password"    
priority=1 
}
  • wpa_supplicant -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
  • dhclient wlan0

2. Use UI interface to setup WiFi Client

RTL8822BE STA.jpg

AP

Developing

Develop 4G module with W2

GPU

  • Execute "glmark2-es" to start OpenGL test
  • glmark2 Score: 30

M3 GPU Test.png

Make your own image