Skip to content
This repository was archived by the owner on Apr 7, 2020. It is now read-only.
Maksim Sisov edited this page Jun 8, 2017 · 23 revisions

Building

  • Download proprietary Multimedia & Graphics library and related Linux drivers. For R-Car, you can find them on Renesas' website.
  • Place the zip files in $HOME/Downloads (or $XDG_DOWNLOAD_DIR) so it looks like this:
$ ls -l ~/Downloads/R-Car_Gen3_Series_Evaluation_Software_Package_*
-rw-r--r-- 1 msisov msisov 4668616 May 12 12:18 /home/msisov/Downloads/R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20170427.zip
-rw-r--r-- 1 msisov msisov 2823636 May 12 12:19 /home/msisov/Downloads/R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20170427.zip
  • Download the AGL sources. For R-Car Gen3, be sure to use the master branch.
  • After all the sources are downloaded (repo init && repo sync), initialize the environment and configuration. For example, for RCar-M3:
source meta-agl/scripts/aglsetup.sh -m m3ulcb agl-demo agl-devel

You should see how it decompresses all the binary blobs and copies them.

  • Now start the build:
bitbake agl-demo-platform
  • After you have checked it can build the base demo fine, then add meta-browser and meta-openembedded/meta-gnome to the BBLAYERS variable of your bblayers.conf.

  • Set CHROMIUM_GN_PATH in your local.conf file to point to the directory containing the gn executable. For example, if you have downloaded chromium source it's /your/chromium/src/buildtools/linux64/. Alternatively, you can download it from Igalia's server. Warning: the gn binary included in the depot_tools repository is just a thin python wrapper to the actual gn executable, be sure to use the one contained in the Chromium source instead.

  • Set PACKAGECONFIG_pn-chromium to use-egl wayland disable-api-keys-info-bar in your local.conf.

  • You can now build chromium:

  bitbake chromium

You can also append chromium to the image by setting IMAGE_INSTALL_append = " chromium" in your local.conf and rebuild agl-demo-platform so that chromium is installed by default.

Installation

Instructions below are based on the AGL doc for M2 and on the elinux documentation for Gen3.

  • Find your microSD card with dmesg and format it with fdisk:
sudo fdisk /dev/YOURSDCARD
# Note: This deletes partition if there is one on your microSD card:
Command (m for help): d
Selected partition 1
Partition 1 has been deleted.
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.
# Note: elinux suggests to do "t", "83" to force the partition type to 'Linux'.
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
  • Create a new ext3 partition:
sudo mkfs.ext3 /dev/YOURSDCARD1
mke2fs 1.42.12 (29-Aug-2014)
/dev/sdb1 contains a ext3 file system
	last mounted on / on Mon Dec  5 13:53:59 2016
Proceed anyway? (y,n) y
Creating filesystem with 7814912 4k blocks and 1954064 inodes
Filesystem UUID: e82c13ac-c9c1-4515-9ad1-830b8d465aaf
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
	4096000
Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done   
  • Mount this partition on your host to any directory (say /mnt/):
sudo mount /dev/YOURSDCARD1 /mnt
  • Unpack AGL files onto the microSD card:
sudo tar xfj build/tmp/deploy/images/m3ulcb/agl-demo-platform-m3ulcb.tar.bz2 -C /mnt/
  • Copy Kernel Image and Device Tree Blob file into /mnt/boot/
sudo cp build/tmp/deploy/images/m3ulcb/Image-r8a7796-m3ulcb.dtb /mnt/boot/
  • Sync and umount:
sync
sudo umount /mnt/

Running AGL & Chromium

  • Perform the various connection of your R-Car M3 (see elinux and this video for some help)

  • For the first boot, the R-Car will try and perform a network boot and you'll need to change the default boot sequence. Connect the "CPLD debug" port to your computer. Connect to the shell with sudo screen /dev/ttyUSB0 38400, press the power button of the R-Car M3 and immediately any key to interrupt the default boot. In the U-boot shell, configure the boot sequence as follows (again, be careful that the /boot/ paths correspond to what is on your microSD card):

setenv bootargs 'rw root=/dev/mmcblk1p1 rootfstype=ext3 rootwait'
editenv bootcmd
  ext2load mmc 0:1 0x48080000 /boot/Image; ext2load mmc 0:1 0x48000000 /boot/Image-r8a7796-m3ulcb.dtb; booti 0x48080000 - 0x48000000
saveenv
  • (Re)boot your board.
  • Once the board is up and running, open a terminal and change shell type from ivi-shell to desktop-shell in /etc/xdg/weston/weston.ini and reboot.
  • Once AGL & weston are started, open a terminal and launch chromium with the following command:
/usr/bin/chromium/chrome --mus --no-sandbox

The '--mus' switch allows to run Chromium's bleeding edge architectural rework. Also, in this mode, chrome runs in the so called "external window mode", which means that all the windows are controlled by a host window manager. This is an in-flux, and lots of stabilization work is expected in 2017.

Clone this wiki locally