DragonBoard 410 メモ

# DragonBoard 410

![dragon.jpg](https://qiita-image-store.s3.amazonaws.com/0/63450/84e4d949-265d-7d38-65bc-f51cb48c7839.jpeg)

# CPU

| NAME | スペック | 
|:--|:--|
| Qualcomm Snapdragon 410 | Quad-core ARM® Cortex® A53(1.2 GHz) |
| Qualcomm Adreno 306 | 400MHz GPU |

# Support OS

| OS |  Android 5.1<br>Ubuntu<br>Windows 10 IoT | 
|:--|:--|

# Linux

- [u-Boot](https://github.com/96boards/u-boot)
- [Linux](https://github.com/96boards/linux)
- [Dragonboard 410c Installation Guide for Linux and Android](https://github.com/96boards/documentation/wiki/Dragonboard-410c-Installation-Guide-for-Linux-and-Android)

# GPIO

- [96 Board GPIO](https://github.com/96boards/96BoardsGPIO)

# PIN Assign

| PIN | 96Boards Signals | 410c Signals |
|:--|:--|:--|
| 1 | GND | GDN |
| 3 | UART0_CTS | UART0_CTS_N (APQ GPIO_2) |
| 5 | UART0_TxD | UART0_TX (APQ GPIO_0) |
| 7 | UART0_RxD | UART0_RX (APQ GPIO_1) |
| 9 | UART0_RTS | UART0_CTSN_B(APQ GPIO_3) |
| 11 | UART1_TxD | UART1_TX (APQ GPIO_4) |
| 13 | UART1_RxD | UART1_RX (APQ GPIO_5) |
| 15 | I2C0_SCL | I2C0_SCL (APQ GPIO_7) |
| 17 | I2C0_SDA | I2C0_SDA (APQ GPIO_6) |
| 19 | I2C1_SCL | I2C1_SCL (APQ GPIO_23) |
| 21 | I2C1_SDA | I2C1_SDA (APQ GPIO_22) |
| 23 | GPIO-A | LS_EXP_GPIO_A (APQ GPIO_36) (APQ INT) |
| 25 | GPIO-C | LS_EXP_GPIO_C (APQ GPIO_13) (TS_INT_N) |
| 27 | GPIO-E | LS_EXP_GPIO_E (APQ GPIO_115) (GYRO_ACCL_INT_N) |
| 29 | GPIO-G | LS_EXP_GPIO_G (APQ GPIO_24) (DSI_VSYNC) |
| 31 | GPIO-I | LS_EXP_GPIO_I (APQ GPIO_35) (CSI0_RST) |
| 33 | GPIO-K | LS_EXP_GPIO_K (APQ GPIO_28) (CSI1_RST) |
| 35 | +1V8 | LS_EXP_1P8 |
| 37 | +5V | SYS_5P0 |
| 39 | GND | GND |

| PIN | 96Boards Signals | 410c Signals |
|:--|:--|:--|
| 2 | GND | GND |
| 4 | PWR_BTN_N | PHONE_ON_N |
| 6 | RST_BTN_N | PM_RESIN_N |
| 8 | SPI0_SCLK | SPI0_CLK (APQ GPIO_19) |
| 10 | SPI0_DIN | SPI0_MISO (APQ GPIO_17) |
| 12 | SPI0_CS | SPI0_CS_N (APQ GPIO_18) |
| 14 | SPI0_DOUT | SPI0_MOSI (APQ GPIO_16) |
| 16 | PCM_FS | LS_EXP_MI2S_WS (APQ GPIO_110) |
| 18 | PCM_CLK | LS_EXP_MI2S_SCK (APQ GPIO_113) (ALPS_INT) |
| 20 | PCM_DO | LS_EXP_MI2S_DATA0 (APQ GPIO_114) |
| 22 | PCM_DI | N.C. I2S |
| 24 | GPIO-B | LS_EXP_GPIO_B (APQ GPIO_12) (TS_RST_N) |
| 26 | GPIO-D | LS_EXP_GPIO_D (APQ GPIO_69) (MAG_INT) |
| 28 | GPIO-F | LS_EXP_GPIO_F (PM_MPP_4) (DSI_BLCTRL)) |
| 30 | GPIO-H | LS_EXP_GPIO_H (APQ GPIO_25) (DSI_RST) |
| 32 | GPIO-J | LS_EXP_GPIO_J (APQ GPIO_34) (CSI0_PWDN) |
| 34 | GPIO-L | LS_EXP_GPIO_L (APQ GPIO_33) (CSI1_PWDN) |
| 36 | SYS_DCIN | SYS_DCIN |
| 38 | SYC_DCIN | SYS_DCIN |
| 40 | GND | GND |

# I2C
VOLTAGE-LEVEL TRANSLATORのPCA9306で、I2Cのレベル変換する。

# DIP Switch

|スイッチ|意味|
|:--|:--|
| Switch 1 | onでUSB BOOT |
| Switch 2 | osでSD BOOT  |
| Switch 3 | USB HOSTの設定 |
| Switch 4 | HDMI SELの設定 |

# インストール

## SDカードによるインストール

> $ sudo diskutil list

でSDカードのディレクトリを確認する。(以下、SDカードが/dev/disk4だった場合の解説)

> $ sudo diskutil unmountDisk /dev/disk4 

```
Unmount of all volumes on disk4 was successful
```

> $ sudo dd if=db410c_sd_install_android.img of=/dev/rdisk4

```
2048+0 records in
2048+0 records out
2147483648 bytes transferred in 147.654051 secs (14544021 bytes/sec)
      147.68 real         0.00 user         1.86 sys
```

DragonBoard410にSDカードを差し込み、DIP Switchの2番をONにして再起動する。

<img width="91" alt="dip1.png" src="https://qiita-image-store.s3.amazonaws.com/0/63450/dd31ce57-093f-f82b-7254-2005940dfd1b.png">

Installメニューがあらわれるので、Imageを選択しInstall(i)を選択し、ImageをeMMC(Flashメモリ)にコピーする。

![install.jpg](https://qiita-image-store.s3.amazonaws.com/0/63450/53b417f2-ac7d-f6eb-cdb7-af01d37f1b31.jpeg)

DIP Switchを元どおりにして、再起動する。

<img width="92" alt="dip2.png" src="https://qiita-image-store.s3.amazonaws.com/0/63450/4ea585a3-2bbd-e864-a42d-445fbb96e66b.png">

## Fastbootによるインストール(Debian)

S4のスイッチを押した状態で、電源をONにする。

![fastboot.png](https://qiita-image-store.s3.amazonaws.com/0/63450/3a8120c7-5c08-c1fc-afd0-38a0e96a96fb.png)

> $ fastboot devices

```
a4e82d18	fastboot
```

http://builds.96boards.org/releases/dragonboard410c/linaro/rescue/latest/dragonboard410c_bootloader_emmc_linux*.zip

から、 eMMC用のパーティション生成ツールを取得する。

<img width="414" alt="fastboot_dir.png" src="https://qiita-image-store.s3.amazonaws.com/0/63450/deef9a99-bbea-ed04-2bed-d74deefd69e8.png">

> $ cd dragonboard410c_bootloader_emmc_linux-46
> $ ./flashall

```
target reported max download size of 268435456 bytes
sending 'partition' (33 KB)...
OKAY [  0.005s]
writing 'partition'...
OKAY [  0.767s]
finished. total time: 0.772s
target reported max download size of 268435456 bytes
sending 'hyp' (56 KB)...
OKAY [  0.005s]
writing 'hyp'...
OKAY [  0.013s]
finished. total time: 0.018s
target reported max download size of 268435456 bytes
sending 'modem' (22561 KB)...
OKAY [  0.713s]
writing 'modem'...
OKAY [  0.420s]
finished. total time: 1.134s
target reported max download size of 268435456 bytes
sending 'rpm' (151 KB)...
OKAY [  0.008s]
writing 'rpm'...
OKAY [  0.011s]
finished. total time: 0.019s
target reported max download size of 268435456 bytes
sending 'sbl1' (246 KB)...
OKAY [  0.010s]
writing 'sbl1'...
OKAY [  0.011s]
finished. total time: 0.022s
target reported max download size of 268435456 bytes
sending 'sec' (0 KB)...
OKAY [  0.004s]
writing 'sec'...
OKAY [  0.007s]
finished. total time: 0.011s
target reported max download size of 268435456 bytes
sending 'tz' (472 KB)...
OKAY [  0.018s]
writing 'tz'...
OKAY [  0.015s]
finished. total time: 0.033s
target reported max download size of 268435456 bytes
sending 'aboot' (726 KB)...
OKAY [  0.026s]
writing 'aboot'...
OKAY [  0.025s]
finished. total time: 0.051s
erasing 'boot'...
OKAY [  0.034s]
finished. total time: 0.034s
erasing 'rootfs'...
OKAY [  0.268s]
finished. total time: 0.268s
erasing 'devinfo'...
OKAY [  0.036s]
finished. total time: 0.036s
```
eMMC内のデータの削除ができたので、今度は焼き込むイメージを用意する。

Debian Boot image
http://builds.96boards.org/releases/dragonboard410c/linaro/debian/latest/boot-linaro-jessie-qcom-snapdragon-arm64*.img.gz

Debian Root file system
http://builds.96boards.org/releases/dragonboard410c/linaro/debian/latest/linaro-jessie-developer-qcom-snapdragon-arm64*.img.gz

> $ ls
> linaro-jessie-developer-qcom-snapdragon-arm64-20151204-36.img.gz
> boot-linaro-jessie-qcom-snapdragon-arm64-20151204-36.img.gz
>
> $ gunzip *.gz
> $ fastboot flash boot boot-linaro-jessie-qcom-snapdragon-arm64-20151204-36.img
> $ flash rootfs linaro-jessie-developer-qcom-snapdragon-arm64-20151204-36.img 

## Fastbootによるインストール(Android)


http://builds.96boards.org/releases/dragonboard410c/linaro/rescue/latest/dragonboard410c_bootloader_emmc_android*.zip

から、 eMMC用のパーティション生成ツールを取得する。

<img width="414" alt="fastboot_dir.png" src="https://qiita-image-store.s3.amazonaws.com/0/63450/deef9a99-bbea-ed04-2bed-d74deefd69e8.png">

> $ cd dragonboard410c_bootloader_emmc_android-46
> $ ./flashall

- [boot.img.tar.xz](http://builds.96boards.org/releases/dragonboard410c/qualcomm/android/latest/boot.img.tar.xz)
- [system.img.tar.xz](http://builds.96boards.org/releases/dragonboard410c/qualcomm/android/latest/system.img.tar.xz)
- [userdata.img.tar.xz](http://builds.96boards.org/releases/dragonboard410c/qualcomm/android/latest/userdata.img.tar.xz)
- [recovery.img.tar.xz](http://builds.96boards.org/releases/dragonboard410c/qualcomm/android/latest/recovery.img.tar.xz)
- [persist.img.tar.xz](http://builds.96boards.org/releases/dragonboard410c/qualcomm/android/latest/persist.img.tar.xz)
- [cache.img.tar.xz](http://builds.96boards.org/releases/dragonboard410c/qualcomm/android/latest/cache.img.tar.xz)

> for f in *.tar.xz; do tar xJf $f; done
> fastboot flash boot boot.img
> fastboot flash system system.img
> fastboot flash userdata userdata.img
> fastboot flash recovery recovery.img
> fastboot flash persist persist.img
> fastboot flash cache cache.img


# Brillio
[http://blog.sola-dolphin-1.net/archives/4981335.html](http://blog.sola-dolphin-1.net/archives/4981335.html)