R-Car/Emotion Recognition Engine SDK Image preparation guide

From eLinux.org
Jump to: navigation, search

Included contents info

References

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=<define your sd card directory>

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


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

unmount your SD

$ umount $SDCARD

Write IPL to Target

Please download the IPL:
File:IPL for h3ulcb.zip
File:IPL for m3ulcb.zip


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.
  • For h3ulcb
=> 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
  • For m3ulcb
=> 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

Control emotion.service

Looking at the service status

# systemctl status emotion

Stopping the service

# systemctl stop emotion

Starting the service

# systemctl start emotion

Restarting the service(Try to restart when the demo is not started with blank page)

# systemctl restart emotion

Disabling the service(service would not run automatically)

# systemctl disable emotion

Enabling the service

# systemctl enable emotion

Looking at the latest service log

# journalctl -xe

Audio volume control

ex.)In case of setting DVC Out 10%.

# amixer set -Dhw:0 "DVC Out" 10% 
# alsactl store

<R-Car