HOBBY:ODROID

구차니의 잡동사니 위키
이동: 둘러보기, 찾기

목차

odroid XU4

Hardware

  • Exynos5422 Cortex-A15 2Ghz and Cortex-A7 Octa core CPUs
    • USB 3.0 2 ports + USB 2.0 1 port
    • LPDDR3 2GB(PoP)
  • SDHC / eMMC 5.0 HS400
  • USB to GbE Realtek RTL8153
  • USB 3.0 2port HUB Genesys GL3521
  • HDMI

power consume

  • idle
    • 2.71 W
  • idle + HDMI
    • 2.73 W
  • idle + LAN
    • 3.48 W
  • idle + LAN + HDMI
    • 3.40 W (200MHz)
    • 3.57 W (300MHz)
    • 3.99 W (1.5GHz / Performance)

recovery bootloader

  • SD 메모리에 이미지를 넣고
  • eMMC 에 이미지를 넣고
  • SD 메모리로 부팅하도록 스위치 설정후 전원 공급
  • uboot 에서 enter를 눌러 부팅을 멈춘후
  • eMMC를 장착하고 아래의 명령을 수행
Exynos5422 # run copy_uboot_sd2emmc

odroid U3

Hardware

  • exynos4412 Cortex-A9 Quad-Core 1.7GHz
    • USB 2 ports + USB OTG 1 port
    • DDR2 2GB(PoP)
  • SDHC / eMMC 4.41
  • LAN9730 USB to 100Mbps Ethernet
  • USB3503A 3 ports USB HUB
  • micro HDMI


power consume

  • idle
    • 1.72 W
  • idle + LAN
    • 1.95 W -> 2.30 W
  • idle + LAN + HDMI
    • not tested
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
ondemand
$ cat /etc/init.d/cpufrequtils

$ sudo apt-get install cpufreq
$ sudo cpufreq-set -g ondemand 
  • performance 1700 MHz / 4 core
  • powersave 200 MHz / 2 core
  • ondemand 200-1700 MHz / 2 core
  • conservative 200-1700MHz / 2 core

Software

proc file system

$ cat /proc/cpuinfo
processor       : 3
model name      : ARMv7 Processor rev 0 (v7l)
BogoMIPS        : 3394.86
Features        : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x3
CPU part        : 0xc09
CPU revision    : 0

Hardware        : ODROID-U2/U3
Revision        : 0000
Serial          : 0000000000000000
$ cat /proc/meminfo
MemTotal:        2071648 kB
MemFree:         1687464 kB
Buffers:           36660 kB
Cached:           192708 kB
SwapCached:            0 kB
Active:           155372 kB
Inactive:         155856 kB
Active(anon):      84596 kB
Inactive(anon):     9012 kB
Active(file):      70776 kB
Inactive(file):   146844 kB
Unevictable:           0 kB
Mlocked:               0 kB
HighTotal:       1317888 kB
HighFree:        1041248 kB
LowTotal:         753760 kB
LowFree:          646216 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:               112 kB
Writeback:             0 kB
AnonPages:         81888 kB
Mapped:            51140 kB
Shmem:             11756 kB
Slab:              23832 kB
SReclaimable:      11868 kB
SUnreclaim:        11964 kB
KernelStack:        2232 kB
PageTables:         2876 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     1035824 kB
Committed_AS:     954184 kB
VmallocTotal:     245760 kB
VmallocUsed:        2868 kB
VmallocChunk:     105404 kB

kernel build

cross compile

$ wget http://dn.odroid.com/toolchains/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux.tar.bz2
$ sudo mkdir -p /opt/toolchains
$ sudo tar jxvf gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux.tar.bz2 -C /opt/toolchains/
$ vi ~/.bashrc
export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabihf-
export PATH=/opt/toolchains/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin:$PATH
$ source ~/.bashrc

native compile

takes about 30 minutes(not cross compile)

$ sudo apt-get install libc6-i386 zlib1g
$ sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 ncurses-dev

u-boot compile

$ git clone https://github.com/hardkernel/u-boot.git -b odroid-v2015.10
$ cd u-boot
$ make smdk4412_config
$ make

kernel compile

$ git clone --depth 1 https://github.com/hardkernel/linux.git -b odroid-3.8.y
$ cd linux
$ zcat /proc/config.gz > .config
$ make odroidu_defconfig
$ make menuconfig
$ make -j4

installation eMMC with SDHC

  • write OS image into eMMC using win32Imager
  • boot without any microsd cards
  • reserve partition resize using odroid-utiltiy.sh
  • reboot without any microsd cards
  • update and upgrade with apt-get package manager
  • kernel recover with odroid-utiltiy.sh

recovery bootloader

Exynos4412 # movi init 1
Exynos4412 # run copy_uboot_sd2emmc

System configuration

u-boot argument

  • eMMC obtains /dev/mmcblk1
  • SDHC obtains /dev/mmcblk0
  • eMMC with SDHC configuration mounts SDHC as rootfs
  • need rootfs with UUID option
setenv bootargs "console=tty1 root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait ro mem=2047M"

chrome webGL acceleration

$ cat /etc/chromium-browser/default
# Default settings for chromium-browser. This file is sourced by /bin/sh from
# /usr/bin/chromium-browser

# Options to pass to chromium-browser
CHROMIUM_FLAGS=" --use-gl=egl --ignore-gpu-blacklist --disable-accelerated-2d-canvas --num-raster-threads=2"

openbox to metacity

window manager for acceleration

  • menu - preferences - Default Applications for LXSessions
  • Core Applications - Window Manager
  • openbox -> matecity

kernel argument

need kernel rebuild (default argument includes console=ttySAC1,115200)

uart

  • /dev/ttySAC0
    • uart0 - IO Expansion (8pin 2.0mm pitch header)
  • /dev/ttySAC1
    • uart1 - kernel console (4pin molex)

install odroid-utility.sh

$ sudo -s
# wget -O /usr/local/bin/odroid-utility.sh https://raw.githubusercontent.com/mdrjr/odroid-utility/master/odroid-utility.sh
# chmod +x /usr/local/bin/odroid-utility.sh
# odroid-utility.sh

https://github.com/mdrjr/odroid-utility

kernel replace for odroid

kernel update needed when can't reboot

odroid_utility.sh exist below 14.04 LTS

$ sudo odroid-utility.sh
  ┌─────────────────────┐
  │ Main Menu                                │
  │                                          │
  │  1  HDMI Configuration                   │
  │  2  Update your Kernel/Firmware          │
  │  3  Install/Update XBMC (Ubuntu Only)    │
  │  4  Resize your root partition           │
  │  5  Xorg On/Off                          │
  │  6  Rebuild Xorg DDX (fixes ABI errors)  │
  │  7  Change Hostname                      │
  │  10 Pulse Audio Control (on/off)         │
  │                                          │
  │                                          │
  │         <Select>         <Exit>          │
  │                                          │
  └─────────────────────┘
  ┌──────────────────────────────┐
  │ Kernel Update/Configuration                               │
  │                                                           │
  │  1 Update Kernel                                          │
  │  2 Install firmware files to /lib/firmware                │
  │  3 Update boot scripts                                    │
  │  4 Update udev rules for ODROID subdevices (mali, cec..)  │
  │  5 Update the bootloader                                  │
  │  6 Exit                                                   │
  │                                                           │
  │                                                           │
  │              <확인>                <취소>                 │
  │                                                           │
  └──────────────────────────────┘

Trouble shotting

MAC Address 설정하기

  • odroid 에는 MAC 어드레스가 할당되어 있지 않으므로, 동일 네트워크에 여러개의 ODROID를 동일 이미지로 구동시 MAC 주소 충돌하게 됨
$ sudo vi /etc/smsc95xx_mac_addr

Korean IME

  • preference - language support
  • ibus of 16.04 has some problem with fast typing. fcitx-hangul recommended.

sudo 시간 늘리기

-1은 무제한 0은 매번 묻기 1 이상은 그 시간 이내에 명령어 수행시 패스워드 묻지 않음

$ sudo visudo
Defaults        env_reset,timestamp_timeout=-1

hack

USB Powered

R39 0 Ohm Connect

개인 도구
이름공간

변수
행위
둘러보기
도구모음