diff options
Diffstat (limited to 'docs/nnfw/howto/device')
-rw-r--r-- | docs/nnfw/howto/device/xu3-dip.png | bin | 0 -> 262925 bytes | |||
-rw-r--r-- | docs/nnfw/howto/device/xu3_tizen.md | 140 | ||||
-rw-r--r-- | docs/nnfw/howto/device/xu3_ubuntu.md | 114 | ||||
-rw-r--r-- | docs/nnfw/howto/device/xu4_tizen.md | 228 | ||||
-rw-r--r-- | docs/nnfw/howto/device/xu4_ubuntu.md | 99 |
5 files changed, 581 insertions, 0 deletions
diff --git a/docs/nnfw/howto/device/xu3-dip.png b/docs/nnfw/howto/device/xu3-dip.png Binary files differnew file mode 100644 index 000000000..59c0be3f2 --- /dev/null +++ b/docs/nnfw/howto/device/xu3-dip.png diff --git a/docs/nnfw/howto/device/xu3_tizen.md b/docs/nnfw/howto/device/xu3_tizen.md new file mode 100644 index 000000000..6473ab9a8 --- /dev/null +++ b/docs/nnfw/howto/device/xu3_tizen.md @@ -0,0 +1,140 @@ +# About + +This will describe how to flash microSD with Tizen-5.5 for ODroid XU3. + +Host environment is Ubuntu 18.04 + +This document will explain the only on eMMC + XU3. + +# Download files + +## Images + +Boot +- https://download.tizen.org/snapshots/tizen/unified/latest/images/standard/tv-boot-armv7l-odroidxu3/ +- download the biggest file + +Root FS +- https://download.tizen.org/snapshots/tizen/unified/latest/images/standard/tv-wayland-armv7l-odroidu3/ +- download the biggest file + +U-Boot images +``` +wget https://github.com/hardkernel/u-boot/raw/odroidxu3-v2012.07/sd_fuse/hardkernel_1mb_uboot/bl1.bin.hardkernel +wget https://github.com/hardkernel/u-boot/raw/odroidxu3-v2012.07/sd_fuse/hardkernel_1mb_uboot/bl2.bin.hardkernel.1mb_uboot +wget https://github.com/hardkernel/u-boot/raw/odroidxu3-v2012.07/sd_fuse/hardkernel_1mb_uboot/tzsw.bin.hardkernel +``` + +You also need `u-boot-mmc.bin` that is inside `tizen-unified_20180425.2_tv-boot-armv7l-odroidxu3.tar.gz` file. +``` +tar xvf tizen-unified_20180425.2_tv-boot-armv7l-odroidxu3.tar.gz u-boot-mmc.bin +``` + + +## Flashing script + +Download [sd_fusing_xu4.sh](https://git.tizen.org/cgit/platform/kernel/u-boot/plain/scripts/tizen/sd_fusing_xu4.sh?h=tizen) + +This file name has `xu4` but it works on also xu3. + + +## Files + +``` +dragon@loki:~/Works/tizen/odroid-xu3/flashing$ ls -l +total 1316 +-rw-rw-r-- 1 dragon dragon 15616 9월 5 14:41 bl1.bin.hardkernel +-rw-rw-r-- 1 dragon dragon 14592 9월 5 14:41 bl2.bin.hardkernel.1mb_uboot +-rw-rw-r-- 1 dragon dragon 262144 9월 5 14:41 tzsw.bin.hardkernel +-rwxr-xr-x 1 dragon dragon 1048576 9월 4 15:17 u-boot-mmc.bin +``` + +# Flash + +Host environment +- Ubuntu 18.04 +- eMMC connected through microUSB from xu3 to host + +## Flash boot files + +on target +``` +... + +CPU: Exynos5422 @ 800 MHz + +Model: Odroid XU3 based on EXYNOS5422 +Board: Odroid XU3 based on EXYNOS5422 +Type: xu3 +DRAM: 2 GiB +MMC: EXYNOS DWMMC: 0, EXYNOS DWMMC: 1 +In: serial +Out: serial +Err: serial +Net: No ethernet found. +Hit any key to stop autoboot: 0 +ODROID-XU3 # + +ODROID-XU3 # mmc list +EXYNOS DWMMC: 0 (eMMC) +EXYNOS DWMMC: 1 + +ODROID-XU3 # ums 0 mmc 0 + +UMS: LUN 0, dev 0, hwpart 0, sector 0x0, count 0x1d5a000 + +/ +``` + +then on host +``` +$ sudo fdisk -l +.......... + +Partition table entries are not in disk order + +Disk /dev/sdh: 32.0 GB, 32010928128 bytes + +64 heads, 32 sectors/track, 30528 cylinders, total 62521344 sectors + +Units = sectors of 1 * 512 = 512 bytes + +Sector size (logical/physical): 512 bytes / 512 bytes + +I/O size (minimum/optimal): 512 bytes / 512 bytes + +Disk identifier: 0x00000000 + + +Device Boot Start End Blocks Id System + +/dev/sdh1 * 8192 139263 65536 e W95 FAT16 (LBA) .......... +``` + +``` +$ sudo ../sd_fusing_xu4.sh -d /dev/sdh --format \ + -b bl1.bin.hardkernel bl2.bin.hardkernel.1mb_uboot tzsw.bin.hardkernel u-boot-mmc.bin +... +``` + +`--format` option will, 1) delete current partition 2) create new partition table, 3) format each partitions. + +- If you meet `./sd_fusing_xu4-u1604.sh: line 147: pv: command not found` message and want to remove this message, install pv package by `sudo apt-get install pv` + +## Flash image files +``` +$ sudo ../sd_fusing_xu4.sh -d /dev/sdh \ + -b tizen-unified_20190905.1_tv-boot-armv7l-odroidxu3.tar.gz \ + tizen-unified_20190905.1_tv-wayland-armv7l-odroidxu3.tar.gz +``` + +# After boot + +Follow [xu4_tizen](xu4_tizen.md) + +# References + +- http://suprem.sec.samsung.net/confluence/display/KS/Odroid+XU3 +- http://suprem.sec.samsung.net/confluence/pages/viewpage.action?pageId=104635990 +- http://suprem.sec.samsung.net/confluence/pages/viewpage.action?spaceKey=TPLAB&title=XU3+Image+Flashing +- http://download.tizen.org/snapshots/tizen/unified/latest/images/standard/ diff --git a/docs/nnfw/howto/device/xu3_ubuntu.md b/docs/nnfw/howto/device/xu3_ubuntu.md new file mode 100644 index 000000000..38dbc69b0 --- /dev/null +++ b/docs/nnfw/howto/device/xu3_ubuntu.md @@ -0,0 +1,114 @@ +## How to setup XU3 with Ubuntu 16.04 + +Ref: https://wiki.odroid.com/old_product/odroid-xu3/odroid-xu3 + +MicroSD card images +- https://dn.odroid.com/5422/ODROID-XU3/Ubuntu/ + +Latest image (as of writing this file) +- https://dn.odroid.com/5422/ODROID-XU3/Ubuntu/ubuntu-16.04.3-4.14-minimal-odroid-xu4-20171213.img.xz +- Flash with `WinFlashTool` + +MicroSD boot DIP settings +- ![image](xu3-dip.png) + +SW1-1,2 | 1st Boot media +-- | -- +ON ON | eMMC +OFF ON | MicroSD card + +Boot +- login with serial console +- password: `root`/`odroid` + +Set ethernet +`/etc/network/interfaces` +``` +# interfaces(5) file used by ifup(8) and ifdown(8) +# Include files from /etc/network/interfaces.d: +source-directory /etc/network/interfaces.d + +auto lo eth0 +iface lo inet loopback + +iface eth0 inet static + address 10.113.xxx.yyy + netmask 255.255.255.0 + network 10.113.xxx.0 + broadcast 10.113.xxx.255 + gateway 10.113.xxx.1 + dns-nameservers 10.32.192.11 10.32.193.11 8.8.8.8 +``` +Change `xxx.yyy` to your IP address. + +Reboot and login with SSH + +### Add proxy settings + +Add `/etc/apt/apt.conf.d/90proxies` +``` +Acquire::http::proxy "http://10.112.1.184:8080/"; +Acquire::https::proxy "http://10.112.1.184:8080/"; +Acquire::ftp::proxy "ftp://10.112.1.184:8080/"; +``` + +Add `/etc/profile.d/proxy.sh` +``` +#!/bin/bash + +# Proxy +export HTTP_PROXY=http://10.112.1.184:8080/ +export HTTPS_PROXY=https://10.112.1.184:8080/ +``` + +### Update and install programs + +``` +sudo apt-get update +sudo apt-get upgrade +sudo apt-get install vim nfs-common +``` + +### For convenience + +Edit `~/.profile` +``` +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. +``` + +### MALI GPU driver + +https://developer.arm.com/products/software/mali-drivers/user-space + +Download at `Odroid-XU3` section +- https://developer.arm.com/-/media/Files/downloads/mali-drivers/user-space/odroid-xu3/malit62xr12p004rel0linux1fbdev.tar.gz?revision=b4f9b859-ac02-408e-9729-c1e50d3a9c6c + +Extract and copy to `/usr/lib/fbdev` + +File list +``` +$ll /usr/lib/fbdev/ + +total 22520 +drwxr-xr-x 2 root root 4096 Feb 21 02:35 ./ +drwxr-xr-x 57 root root 4096 Feb 21 08:33 ../ +lrwxrwxrwx 1 root root 11 Feb 21 02:35 libEGL.so -> libEGL.so.1* +lrwxrwxrwx 1 root root 10 Feb 21 02:35 libEGL.so.1 -> libmali.so* +lrwxrwxrwx 1 root root 17 Feb 21 02:35 libGLESv1_CM.so -> libGLESv1_CM.so.1* +lrwxrwxrwx 1 root root 10 Feb 21 02:35 libGLESv1_CM.so.1 -> libmali.so* +lrwxrwxrwx 1 root root 14 Feb 21 02:35 libGLESv2.so -> libGLESv2.so.2* +lrwxrwxrwx 1 root root 10 Feb 21 02:35 libGLESv2.so.2 -> libmali.so* +lrwxrwxrwx 1 root root 14 Feb 21 02:35 libOpenCL.so -> libOpenCL.so.1* +lrwxrwxrwx 1 root root 10 Feb 21 02:35 libOpenCL.so.1 -> libmali.so* +-rwxr-xr-x 1 root root 21471208 Feb 21 02:35 libmali.so* +-rwxr-xr-x 1 root root 1580048 Feb 21 02:35 liboffline_compiler_api.so* +``` + +Add `/etc/ld.so.conf.d/malifbdev.conf` +``` +# arm mali +/usr/lib/fbdev +``` + +Rename `arm-linux-gnueabihf_EGL.conf` to `arm-linux-gnueabihf_EGL.conf.not` +- This is to disable mesa (software emulator of EGL) diff --git a/docs/nnfw/howto/device/xu4_tizen.md b/docs/nnfw/howto/device/xu4_tizen.md new file mode 100644 index 000000000..a270bef1b --- /dev/null +++ b/docs/nnfw/howto/device/xu4_tizen.md @@ -0,0 +1,228 @@ +# About + +This will describe how to flash microSD with Tizen for ODroid XU4. + +Tested host environment is Ubuntu 16.04, target environment is Tizen 5.5 + +# Download files + +## Images + +Boot +- https://download.tizen.org/snapshots/tizen/unified/latest/images/standard/tv-boot-armv7l-odroidxu3/ +- download the biggest file + +Root FS +- https://download.tizen.org/snapshots/tizen/unified/latest/images/standard/tv-wayland-armv7l-odroidxu3/ +- download the biggest file + +If you cannot access directories `tv-boot-armv7l-odroidxu3` or `tv-wayland-armv7l-odroidxu3`, or cannot find images in those directories, go to https://download.tizen.org/snapshots/tizen/unified/ and find latest snapshot including images for Odroid-XU3. + +U-Boot images +``` +wget https://github.com/hardkernel/u-boot/raw/odroidxu3-v2012.07/sd_fuse/hardkernel_1mb_uboot/bl1.bin.hardkernel +wget https://github.com/hardkernel/u-boot/raw/odroidxu3-v2012.07/sd_fuse/hardkernel_1mb_uboot/bl2.bin.hardkernel.1mb_uboot +wget https://github.com/hardkernel/u-boot/raw/odroidxu3-v2012.07/sd_fuse/hardkernel_1mb_uboot/tzsw.bin.hardkernel +``` + +## Flashing script + +Download `sd_fusing_xu4.sh` from https://git.tizen.org/cgit/platform/kernel/u-boot/plain/scripts/tizen/sd_fusing_xu4.sh?h=tizen + +This file works on Ubuntu 16.04 and 18.04 + +Make it executable +``` +chmod u+x sd_fusing_xu4.sh +``` + + +## Files + +You should see like this +``` +-rw-r--r-- 1 hseok82 hseok82 15616 11월 5 13:56 bl1.bin.hardkernel +-rw-r--r-- 1 hseok82 hseok82 14592 11월 5 13:56 bl2.bin.hardkernel.1mb_uboot +-rwxrwxr-x 1 hseok82 hseok82 8040 11월 5 13:53 sd_fusing_xu4.sh +-rw-rw-r-- 1 hseok82 hseok82 10515369 11월 5 14:01 tizen-unified_20191105.1_tv-boot-armv7l-odroidxu3.tar.gz +-rw-rw-r-- 1 hseok82 hseok82 465487683 11월 5 14:01 tizen-unified_20191105.1_tv-wayland-armv7l-odroidxu3.tar.gz +-rw-r--r-- 1 hseok82 hseok82 262144 11월 5 13:56 tzsw.bin.hardkernel +``` + +# Flash + +Host environment +- Ubuntu 16.04 +- microSD connected through USB Reader as `/dev/sdd` file. + +## Flash boot files and image files + +Give `--format` if it's a new flash memory. +``` +sudo ./sd_fusing_xu4.sh --format \ +-d /dev/sdd \ +-b bl1.bin.hardkernel bl2.bin.hardkernel.1mb_uboot tzsw.bin.hardkernel \ +tizen-unified_20191105.1_tv-boot-armv7l-odroidxu3.tar.gz \ +tizen-unified_20191105.1_tv-wayland-armv7l-odroidxu3.tar.gz +``` +Change `/dev/sdd` to your configuration. + +You will be asked to confirm format when used `--format`. Please type `y` to continue. +``` +/dev/sdd will be formatted, Is it OK? [y/n] +y +``` + +You can omit `--format` from the second time and followings. +``` +sudo ./sd_fusing_xu4.sh \ +-d /dev/sdd \ +-b bl1.bin.hardkernel bl2.bin.hardkernel.1mb_uboot tzsw.bin.hardkernel \ +tizen-unified_20191105.1_tv-boot-armv7l-odroidxu3.tar.gz \ +tizen-unified_20191105.1_tv-wayland-armv7l-odroidxu3.tar.gz +``` +`--format` option will, 1) delete current partition 2) create new partition table, 3) format each partitions. + +- If you meet `./sd_fusing_xu4.sh: line 147: pv: command not found` message and want to remove this message, install pv package by `sudo apt-get install pv` + +# Boot with Tizen + +Follow the steps + +Step 1. +- Take out eMMC memory card if you have any + +Step 2. +- Plug-In microSD with Tizen + +Step 3. Set boot switch +- Refer https://wiki.odroid.com/odroid-xu4/hardware/hardware +- Set `Boot mode selector` switch on the bottom of the board to `uSD` + +Step 4. Connect Serial Console port with USB of Host computer +- Install `minicom` +``` +sudo apt-get install minicom +``` +- Add yourself to the group `dialout` + - `sudo vi /etc/group` +- Use serial terminal program like `minicom` (note that `/dev/ttyUSB1` might be different in your environment.) +``` +minicom --baudrate 115200 --device /dev/ttyUSB1 +``` +- Use `CTRL-a z o` > `Serial port setup` to enter the dialog +- Baud should be `115200-8N1` +- Set configuration `Hardware Flow Control` to `No` to enable communication(keyboard typing..) +- `Save setup as dfl` in configuration +- If you are connecting from Windows or Mac my need to install the driver + - https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers + - Use `PuTTY` for Windows. + +Step 5. Connect Power +- You should see the boot logs... + +Step 6. Login root +- login `root` pwd `tizen` + +# After boot + +## Slow down the fan speed + +If the fan noise is disturbing, you can slow down a little. + +``` +echo "100" > /sys/devices/platform/pwm-fan/hwmon/hwmon0/pwm1 +``` +This will slow down the speed to 100. Range is from 0 to 255. "0" to make it stop. "255" for maximum speed. +This value resets automatically and after reboot so may have to set the value every time you reboot and when fan noise loud again. + +Other solution is changing cpu governors policy for big core to `ondemand` + +``` +echo ondemand | tee /sys/devices/system/cpu/cpu{0..7}/cpufreq/scaling_governor +``` + +## Remount root file system writable + +Default ROOT FS (except `/opt/usr`) is read-only. If you want to modify FS, you need to remount as wriable. + +``` +mount -o remount,rw / +``` + +This is resets after reboot so need to fix `/etc/fstab` when you want to mount FS with wriable on every boot + +## Wide console + +``` +stty cols 200 +``` + +## Setting IP Address of Target Device + +Use `connmanctl` + +**CAUTION** PLEASE DO THIS IN YOUR TARGET DEVICE. RUNNING THIS IN YOUR HOST MAY DAMAGE. + +Step 1. Get the service name +- You first need to connect Ethernet cable. +``` +connmanctl services +``` +Will drop something like this +``` +*AR Wired ethernet_1a43230d5dfa_cable +``` + +Step 2. Use `config` to set the IP address +``` +connmanctl config ethernet_1a43230d5dfa_cable --ipv4 manual 10.113.XXX.YYY 255.255.255.0 10.113.XXX.1 +connmanctl config ethernet_1a43230d5dfa_cable --nameservers 10.32.192.11 10.32.193.11 +``` +where `XXX.YYY` is your address for the target board. + +Setting for proxy can be done with connmanctl but don't know how to check. +``` +connmanctl config ethernet_1a43230d5dfa_cable --proxy manual http://10.112.1.184:8080/ +``` +You can use environment variable but still don't know how to check. + + +This information remains after reboot. + +# Connecting with SDB + +Default Tizen image has running SDBD in the device with default port (26101). + +In your Linux or Windows with `sdb` command, +``` +sdb connect 10.113.XXX.YYY +``` +Result will be something like +``` +* Server is not running. Start it now on port 26099 * +* Server has started successfully * +connecting to 10.113.xxx.yyy:26101 ... +connected to 10.113.xxx.yyy:26101 +``` +With `sdb devices`, +``` +sdb devices +List of devices attached +10.113.xxx.yyy:26101 device xu3 +``` +It comes up with `xu3` as our `xu4` also uses same image `xu3` image. + +# (Optional) Install OpenCL + +To use arm compute CL backend, install OpenCL. +You can get OpenCL for tizen in Tizen Mali DDK. + +# Known issue +- `ls -al` of root folder shows strange output. + +# Reference +- https://wiki.tizen.org/Quick_guide_for_odroidxu4 +- and the mail got from "김석원님" +- https://magazine.odroid.com/wp-content/uploads/odroid-xu4-user-manual.pdf + - https://magazine.odroid.com/odroid-xu4 diff --git a/docs/nnfw/howto/device/xu4_ubuntu.md b/docs/nnfw/howto/device/xu4_ubuntu.md new file mode 100644 index 000000000..7b8a3aa2b --- /dev/null +++ b/docs/nnfw/howto/device/xu4_ubuntu.md @@ -0,0 +1,99 @@ +## How to use XU4 with Ubuntu 16.04 + +Ref: https://wiki.odroid.com/odroid-xu4/odroid-xu4 + +eMMC card pre-installed Ubuntu 16.04 + +Preparation for IO via serial cable +- Refer to `minicom` section in xu4_tizen.md +- To find the name of serial device, plug your odroid into your host machine and power it on. Then, run the following on your host: + ``` + $ dmesg | grep tty + [ 0.000000] console [tty0] enabled + [322282.017985] usb 2-1: cp210x converter now attached to ttyUSB0 + ``` +- Use `CTRL-a z o` > `Serial port setup` to enter the dialog +- Set configuration `Serial Device` to `/dev/ttyUSB0` for the name of serial device +- Baud should be `115200-8N1` +- Set configuration `Hardware Flow Control` to `No` to enable communication(keyboard typing..) + +Connect +- Connect eMMC to bottom of the board +- Connect Serial Console to Host USB +- Connect power and boot + +Login with serial console. you can login with `root` or default `odroid` account +- `root` password: `odroid` +- `odroid `password: `odroid` + +Set ethernet +`/etc/network/interfaces` +``` +# interfaces(5) file used by ifup(8) and ifdown(8) +# Include files from /etc/network/interfaces.d: +source-directory /etc/network/interfaces.d + +auto lo eth0 +iface lo inet loopback + +iface eth0 inet static + address 10.113.xxx.yyy + netmask 255.255.255.0 + network 10.113.xxx.0 + broadcast 10.113.xxx.255 + gateway 10.113.xxx.1 + dns-nameservers 10.32.192.11 10.32.193.11 8.8.8.8 +``` +Change `xxx.yyy` to your IP address. + +Reboot and login with SSH + +### Add proxy settings + +Add `/etc/apt/apt.conf.d/90proxies` +``` +Acquire::http::proxy "http://10.112.1.184:8080/"; +Acquire::https::proxy "http://10.112.1.184:8080/"; +Acquire::ftp::proxy "ftp://10.112.1.184:8080/"; +``` + +Add `/etc/profile.d/proxy.sh` +``` +#!/bin/bash + +# Proxy +export HTTP_PROXY=http://10.112.1.184:8080/ +export HTTPS_PROXY=https://10.112.1.184:8080/ +``` + +### Update and install programs + +``` +sudo apt-get update +sudo apt-get upgrade +sudo apt-get install vim nfs-common +``` + +### MALI GPU driver + +Driver files are pre-installed in eMMC as follows +``` +odroid@odroid:/usr/lib/arm-linux-gnueabihf/mali-egl$ ll +total 20136 +drwxr-xr-x 2 root root 4096 Aug 20 2017 ./ +drwxr-xr-x 106 root root 90112 Mar 26 08:32 ../ +-rw-r--r-- 1 root root 38 Apr 30 2017 ld.so.conf +-rwxr-xr-x 1 root root 2752 Apr 30 2017 libEGL.so* +lrwxrwxrwx 1 root root 9 Apr 30 2017 libEGL.so.1 -> libEGL.so* +lrwxrwxrwx 1 root root 9 Apr 30 2017 libEGL.so.1.4 -> libEGL.so* +-rwxr-xr-x 1 root root 2752 Apr 30 2017 libGLESv1_CM.so* +lrwxrwxrwx 1 root root 15 Apr 30 2017 libGLESv1_CM.so.1 -> libGLESv1_CM.so* +lrwxrwxrwx 1 root root 15 Apr 30 2017 libGLESv1_CM.so.1.1 -> libGLESv1_CM.so* +-rwxr-xr-x 1 root root 2752 Apr 30 2017 libGLESv2.so* +lrwxrwxrwx 1 root root 12 Apr 30 2017 libGLESv2.so.2 -> libGLESv2.so* +lrwxrwxrwx 1 root root 12 Apr 30 2017 libGLESv2.so.2.0 -> libGLESv2.so* +-rwxr-xr-x 1 root root 20493444 May 8 2017 libmali.so* +-rwxr-xr-x 1 root root 2752 Apr 30 2017 libOpenCL.so* +lrwxrwxrwx 1 root root 12 Apr 30 2017 libOpenCL.so.1 -> libOpenCL.so* +lrwxrwxrwx 1 root root 12 Apr 30 2017 libOpenCL.so.1.1 -> libOpenCL.so* +``` |