R-Car/Emotion Recognition Engine SDK Image preparation guide

Included contents info

 * Target board:R-Car Starter Kit Premier/Pro (aka. h3ulcb/m3ulcb)
 * http://elinux.org/R-Car/Boards/H3SK
 * https://elinux.org/R-Car/Boards/M3SK
 * AGL version : EE-5.0.3(Electric eel v5.0.3)
 * Chromium version : m 67.0.3375.0

Create a partition on a micro SD-card
Recommended environment for Creating an Image


 * Tested OS: Ubuntu 14.04LTS, 16.04LTS
 * 8GB/Class10 SD-card at least.
 * tar version: 1.28 at least

For example, if the micro SD-card is /dev/sdg: Type the commands where you got “Command(m for help):” as below.

$ sudo fdisk /dev/sdg Welcome to fdisk (util-linux 2.27.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): o Created a new DOS disklabel with disk identifier 0x96e5850d. Command (m for help): n Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p): Using default response p. Partition number (1-4, default 1): First sector (2048-31291391, default 2048): Last sector, +sectors or +size{K,M,G,T,P} (2048-31291391, default 31291391): Created a new partition 1 of type 'Linux' and of size 14,9 GiB. Command (m for help): w The partition table has been altered. Calling ioctl to

Format the micro SD-card
Initialize the ext4 partition using “mke2fs”; for example, if the micro SD-card is associated with /dev/sdg1: Confirm whether the command is success or not. If you get “done” like following, the command is successful.

$ sudo mke2fs -t ext4 /dev/sdg1 --snip-- Allocating group tables: done Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done

Extract Emotion Recognition Engine SDK
export directory path of micro SD-card

$ SDCARD=

mount your SD to your rootfs

$ mount /dev/sdg1 $SDCARD

remove all data in SDCARD

$ sudo rm -rf ${SDCARD:-bad_dir}/*

Extract the file to $SDCARD

$ sudo tar xf emotion-sdk-h3ulcb-agl-5.0.3-chromium-m67.tar.xz -C $SDCARD;sync $ sudo tar xf emotion-sdk-m3ulcb-agl-5.0.3-chromium-m67.tar.xz -C $SDCARD;sync
 * For h3ulcb
 * For m3ulcb

unmount your SD

$ umount $SDCARD

Write IPL to Target
Please download the IPL:

See below to write IPL. https://elinux.org/R-Car/Boards/H3SK#Flashing_firmware https://elinux.org/R-Car/Boards/M3SK#Flashing_firmware

Setting U-boot parameters

 * 1) Insert the micro SD-card to the target board. And Boot up.
 * 2) Stop auto boot hitting any key.
 * 3) set u-boot environment variable.

=> setenv bootargs console=ttySC0,115200 root=/dev/mmcblk1p1 rootwait rw => setenv load_dtb ext4load mmc 0:1 0x48000000 /boot/Image-r8a7795-h3ulcb.dtb => setenv load_ker ext4load mmc 0:1 0x48080000 /boot/Image => setenv rootfstype ext4 => setenv bootcmd run load_ker\; run load_dtb\; booti 0x48080000 - 0x48000000 => saveenv => run bootcmd => setenv bootargs console=ttySC0,115200 root=/dev/mmcblk1p1 rootwait rw => setenv load_dtb ext4load mmc 0:1 0x48000000 /boot/Image-r8a7796-m3ulcb.dtb => setenv load_ker ext4load mmc 0:1 0x48080000 /boot/Image => setenv rootfstype ext4 => setenv bootcmd run load_ker\; run load_dtb\; booti 0x48080000 - 0x48000000 => saveenv => run bootcmd
 * For h3ulcb
 * For m3ulcb

Control emotion.service
Looking at the service status Stopping the service Starting the service Restarting the service(Try to restart when the demo is not started with blank page) Disabling the service(service would not run automatically) Enabling the service Looking at the latest service log
 * 1) systemctl status emotion
 * 1) systemctl stop emotion
 * 1) systemctl start emotion
 * 1) systemctl restart emotion
 * 1) systemctl disable emotion
 * 1) systemctl enable emotion
 * 1) journalctl -xe

Audio volume control
ex.)In case of setting DVC Out 10%.
 * 1) amixer set -Dhw:0 "DVC Out" 10%
 * 2) alsactl store

<R-Car