2018년 4월 30일 월요일

Make Google Home with ODROID-C2

Open Browser and go to http://opengapps.org.
Choice nano variant and Download.

Open ODROID Utility app.
Click menu and select "Package install from storage".

Select zip file.


Connect USB microphone.

 Or ODROID USB Cam;

Open Google app.
Settings -> Voice.

Install Google Assistant. ODROID-C2 currently only support English language.

2018년 3월 27일 화요일

Build your own cheap car head unit with ODROID


ODROID-C2

ODROID-C1+


ODROID-C1+


ODROID-C2

ODROID-VU7 : 7inch 800x480 HDMI display with Multi-touch


I2S 2Watt Stereo Boom Bonnet Kit

USB 플러그 미니 마이크 데스크탑 스튜디오 음성 녹음 F Skype MSN

http://itempage3.auction.co.kr/DetailView.aspx?itemNo=B503887087&frm3=V2


ODROID USB-CAM 720P

http://www.hardkernel.com/main/products/prdt_info.php?g_code=G146883099080


$ sudo apt-get install xfce4-pulseaudio-plugin alsa-utils

Setup I2S 2Watt Stereo Boom Bonnet Kit
https://wiki.odroid.com/accessory/sound/stereo_boom_bonnet?s[]=boom

$ su
# echo "snd-soc-pcm5102" >> /etc/modules
# echo "snd-soc-odroid-dac" >> /etc/modules

Sound Setting


2018년 3월 21일 수요일

OpenAuto turns a ODROID into an Android Auto Head Unit.


Android Auto with AA mirror

1. Ubuntu 16.04 mate


2. Install packages.

$ sudo apt-get update && sudo apt-get upgrade
$ sudo apt-get install -y git-core curl dh-autoreconf libboost-all-dev libusb-1.0.0-dev libssl-dev cmake  libqt5multimedia5 libqt5multimedia5-plugins libqt5multimediawidgets5 qtmultimedia5-dev libqt5bluetooth5 libqt5bluetooth5-bin qtconnectivity5-dev pulseaudio gstreamer1.0-plugins-bad  gst123 librtaudio-dev

3. auto login

$ sudo vi /usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf

[Seat:*]
greeter-session=lightdm-gtk-greeter
autologin-user=odroid


4. update compiler

$ gcc -v                                                     
Using built-in specs.                                                         
COLLECT_GCC=gcc                                                               
COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/5/lto-wrapper             
Target: aarch64-linux-gnu                                                     
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 5.4.0-6ubu
ntu1~16.04.9' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-lan
guages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-
5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-inclu
ded-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot
=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --w
ith-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath -
-enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk
 --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-arm64/jre --e
nable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-arm64 --with-j
vm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-arm64 --with-arch-directory=aar
ch64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-multiarch --enable-
fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=aarch64
-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu               
Thread model: posix                                                           
gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9)   
                                                                             
$ sudo apt-get update
$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
$ sudo apt-get update
$ sudo apt-get install gcc-snapshot -y
$ sudo apt-get update
$ sudo apt-get install gcc-6 g++-6 -y
$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6
$ sudo update-alternatives --config gcc

$ gcc -v                                                     
Using built-in specs.                                                         
COLLECT_GCC=gcc                                                               
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/6/lto-wrapper           
Target: arm-linux-gnueabihf                                                   
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 6.3.0-18ub
untu2~16.04' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-lang
uages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6
 --program-prefix=arm-linux-gnueabihf- --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir
=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-
debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-
unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-syst
em-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with
-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-armhf/jre --enable-java-home --with-jvm
-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-armhf --with-jvm-jar-dir=/usr/lib/jvm-ex
ports/java-1.5.0-gcj-6-armhf --with-arch-directory=arm --with-ecj-jar=/usr/share
/java/eclipse-ecj.jar --with-target-system-zlib --enable-objc-gc=auto --enable-m
ultiarch --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-
fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-werror --enable-mult
ilib --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnue
abihf --target=arm-linux-gnueabihf                                           
Thread model: posix                                                           
gcc version 6.3.0 20170519 (Ubuntu/Linaro 6.3.0-18ubuntu2~16.04)             

5. build protobuf-compiler(3.0)

5.1 get protobuf-compiler source.
$ wget https://github.com/google/protobuf/archive/v3.0.0.zip
$ unzip v3.0.0.zip
$ cd protobuf-3.0.0

5.2 fix autogen.sh

if test ! -e gmock; then
  curl $curlopts -L -O https://github.com/google/googletest/archive/release-1.7.0.zip
  unzip -q release-1.7.0.zip
  rm release-1.7.0.zip
  mkdir -p gmock/gtest
  mv googletest-release-1.7.0 gmock/gtest
fi

5.3 build
$ ./autogen.sh
$ ./configure --prefix=/usr/lib/arm-linux-gnueabihf
$ make [-j4]
$ sudo make install
$ sudo ldconfig
$ export PATH=/usr/lib/arm-linux-gnueabihf/bin/:$PATH

6. build aasdk

$ cd
$ git clone -b master https://github.com/f1xpl/aasdk.git
$ mkdir aasdk_build
$ cd aasdk_build
$ cmake -DCMAKE_BUILD_TYPE=Release ../aasdk
$ make [-j4]


7. build openauto

$ cd
$ git clone -b master https://github.com/f1xpl/openauto.git
$ mkdir openauto_build
$ cd openauto_build
$ cmake -DCMAKE_BUILD_TYPE=Release -DRPI3_BUILD=FALSE -DAASDK_INCLUDE_DIRS="/home/odroid/aasdk/include" -DAASDK_LIBRARIES="/home/odroid/aasdk/lib/libaasdk.so" -DAASDK_PROTO_INCLUDE_DIRS="/home/odroid/aasdk_build" -DAASDK_PROTO_LIBRARIES="/home/odroid/aasdk/lib/libaasdk_proto.so" ../openauto
$ make [-j4]

8. Make autostart!

$ echo "./openauto/bin/autoapp &" >> .bashrc

$ sudo usermod -a -G root odroid
$ sudo usermod -a -G tty odroid
$ sudo usermod -a -G voice odroid
$ sudo usermod -a -G input odroid
$ sudo usermod -a -G audio odroid
$ sudo usermod -a -G pulse odroid
$ sudo usermod -a -G pulse-access odroid










ODROID-C1+


ODROID-C2


9 AA Mirror

Install Android Auto 2.x version for AA Mirror.

Select "Developer"

Check "Unknown sources"



2018년 1월 16일 화요일

ODROID-C2로 오락실 게임기 만들기

여기서 recalbox OS를 다운 받는다.

https://archive.recalbox.com/

8GB Sd Card를 준비한다. OS와 ROM 파일을 큰 SD 카드에 같이 저장해도 되고 USB 이동 저장 장치에 게임 ROM만 따로 저장해도 된다.


etcher를 설치하고 다운 받은 recalbox.img.xz을 선택한다.
https://etcher.io/


게임 롬을 담을 USB stick을 준비
전체를 FAT32나 NTFS로 format한다.


ODROID-C2에 SD 카드를 연결하고 전원을 넣으면 recalbox 화면이 나온다.




XBox 조이스틱과 USB stick을 연결한다.


키는 다음과 같다.
A -> enter(OK)
B -> back
start -> setting menu


"MAIN MENU" 진입한다.


아래와 같이 "STORAGE DEVICE"에 앞에서 format한 USB Stick을 선택한다.


그리고 USB stick을 PC에 연결하면 recalbox란 폴더가 생성되어 있다.

여기서 중요한건 bios 폴더와 roms란 폴더이다.


bios란 폴더에 neogeo.zip을 넣고


roms/neogeo/ 폴더에 neogeo 게임 롬을 넣으면 된다.












2017년 8월 25일 금요일

Dual booting android and Ubuntu on ODROID-XU4

I made dual booting image for ODROID-C2.
https://codewalkerster.blogspot.kr/2016/03/dual-booting-android-and-ubuntu-on.html

We will make dual booting image for ODROID-XU3/4.

It is recommended to use a storage device of 16Gbyte or more.

Make bootable android media(eMMC or SD).

https://wiki.odroid.com/odroid-xu4/os_images/android/v5.4

Add "VFAT" to label of fat32 partition.



Download ODROID-XU3/4 Ubuntu Image.

https://wiki.odroid.com/odroid-xu4/os_images/linux/ubuntu_4.9/20170824



Copy rootfs and boot partition of ODROID-XU3/4 Ubuntu to your desktop Ubuntu.


mount disk wrote ODROID-XU3/4 Ubuntu image on your desktop PC.




$ mount
...
/.../ubuntu-16.04.3-4.9-mate* on /media/codewalker/boot type vfat (ro,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)
/.../ubuntu-16.04.3-4.9-mate* on /media/codewalker/rootfs type ext4 (ro,nosuid,nodev,uhelper=udisks2)


$ mkdir dual
$ cd dual
$ mkdir boot
$ sudo cp -a /media/username/boot/* boot/
$ mkdir rootfs
$ sudo cp -a /media/username/rootfs/* rootfs/


Unmount ubuntu disk image.


Delete rootfs/aafirstboot

$ rm -rf rootfs/aafirstboot

Edit rootfs/etc/fstab

$ sudo vi rootfs/etc/fstab
LABEL=VFAT /media/boot vfat defaults,rw,owner,flush,umask=000 0 0

Chagne userdata partition UUID.

- Insert disk wrote android image on your desktop PC and unmount /dev/sdX3.
$ sudo umount /dev/sdX3
$ cat rootfs/etc/fstab 
LABEL=VFAT /media/boot vfat defaults,rw,owner,flush,umask=000 0 0

UUID=e139ce78-9841-40fe-8823-96a304a09859 / ext4 errors=remount-ro,noatime 0 1

$ sudo tune2fs /dev/sdX3 -U e139ce78-9841-40fe-8823-96a304a09859

Copy ODROID-XU3/4 Ubuntu files to android disk.

$ mv /media/username/VFAT/boot. ini  /media/username/VFAT/boot. ini.android
$ cp boot/* /media/username/VFAT/
$ sudo cp rootfs/* /media/username/e139ce78-9841-40fe-8823-96a304a09859/ -a
$ sync

Make script to change OS.

in Ubuntu
$ vi boot_android.sh
------------------------------------------------------------------------
#!/bin/bash
sudo mv /media/boot/boot.ini /media/boot/boot.ini.ubuntu
sudo mv /media/boot/boot.ini.android /media/boot/boot.ini
sudo reboot
------------------------------------------------------------------------
#chmod +x boot_android.sh


in Adnroid
$ su
# mount -o rw,remount /
# vi /system/bin/boot_ubuntu.sh
------------------------------------------------------------------------
#!/bin/sh
mv /storage/internal/boot.ini /storage/internal/boot.ini.android
mv /storage/internal/boot.ini.ubuntu /storage/internal/boot.ini
reboot
------------------------------------------------------------------------
# chmod 777 /system/bin/boot_ubuntu.sh

2017년 6월 30일 금요일

How to change DDR Clock on ODROID-C2(android)

Official wiki page
http://odroid.com/dokuwiki/doku.php?id=en:c2_adjust_ddrclk

Guide to change DDR Clock by android update and recovery.

Open https://dn.odroid.com/S905/BootLoader/ODROID-C2/


Download files.
updatepackage-odroidc2-ddr-408.zip
updatepackage-odroidc2-ddr-792.zip
updatepackage-odroidc2-ddr-912.zip
updatepackage-odroidc2-ddr-1104.zip

Open Utility app.
Select "Package install from storage"



Select "File Manager" -> Download folder


Select updatepackage-odroidc2-ddr-xxx.zip wanted DDR clock.


Recovery!



After reboot, you can check the DDR configuration using the following logs of boot loader if you have a usb-uart module kit.

BL2 Built : 11:44:26, Nov 25 2015.
gxb gfb13a3b-c2 - jcao@wonton

Board ID = 8
set vcck to 1100 mv
set vddee to 1070 mv
CPU clk: 1536MHz
DDR channel setting: DDR0 Rank0+1 same
DDR0: 2048MB(auto) @ 1104MHz(2T)-14