Difference between revisions of "R-Car/Emotion Engine SDK Image preparation guide"

From eLinux.org
Jump to: navigation, search
(Control emotion.service)
(Create an EXT4 partition on a micro SD-card using fdisk and set the MBR)
Line 27: Line 27:
 
   Changes will remain in memory only, until you decide to write them.
 
   Changes will remain in memory only, until you decide to write them.
 
   Be careful before using the write command.
 
   Be careful before using the write command.
   Command (m for help): o
+
   '''Command (m for help): o'''
 
   Created a new DOS disklabel with disk identifier 0x96e5850d.
 
   Created a new DOS disklabel with disk identifier 0x96e5850d.
   Command (m for help): n
+
   '''Command (m for help): n'''
 
   Partition type
 
   Partition type
 
   p primary (0 primary, 0 extended, 4 free)
 
   p primary (0 primary, 0 extended, 4 free)
Line 39: Line 39:
 
   Last sector, +sectors or +size{K,M,G,T,P} (2048-31291391, default 31291391):
 
   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.
 
   Created a new partition 1 of type 'Linux' and of size 14,9 GiB.
   Command (m for help): w
+
   '''Command (m for help): w'''
 
   The partition table has been altered.
 
   The partition table has been altered.
 
   Calling ioctl() to
 
   Calling ioctl() to

Revision as of 18:53, 27 August 2018

Included contents info

References

Create an EXT4 partition on a micro SD-card using fdisk and set the MBR

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 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

Write IPL to Target

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

# systemctl restart 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