Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.
Oleksandr Andrushchenko edited this page Jan 12, 2017 · 29 revisions

Welcome to the manifests wiki!

Currently the first drop of the functional build is wrapped by the repo with the manifest from this project. You could download and build the stuff with steps as below(adjusted version of http://elinux.org/R-Car/Boards/Yocto-Gen3).

Setup your Ubuntu:

sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev xterm python-crypto repo

Download yocto layers:

cd <your-folder>
repo init -u [email protected]:xen-troops/manifests.git -b 2017
repo sync

Strange step for the meta-renesas layer:

export WORK=`pwd`
cd $WORK/meta-renesas
export PATCH_DIR=meta-rcar-gen3/docs/sample/patch/patch-for-linaro-gcc
patch -p1 < ${PATCH_DIR}/0001-rcar-gen3-add-readme-for-building-with-Linaro-Gcc.patch
unset PATCH_DIR
cd -

Download evaluation version of proprietary graphics and multimedia drivers from Renesas.

  • To download Multimedia and Graphics library, please use the following link.

  • To download related Linux drivers, please use the following link

\

mkdir $WORK/proprietary
#unzip archives above to $WORK/proprietary

Populate meta-renesas with proprietary software packages.

export PKGS_DIR=$WORK/proprietary
cd $WORK/meta-renesas
sh meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh -f $PKGS_DIR
unset PKGS_DIR
cd -

Setup build environment:

source poky/oe-init-build-env
cp $WORK/meta-demo/meta-rcar-gen3-xen/doc/*.conf ./conf/

Build the stuff:

mv conf/local-wayland.conf conf/local.conf
bitbake core-image-weston

Prepare your sdcard to host two domains:

Insert your sdcard with cardreader, assuming the device is /dev/sdb. Create two partitions:

sudo fdisk /dev/sdb
o #create a new empty DOS partition table
n #add a new partition
p #primary
1 #partition number
#press enter for the default first sector
+2G #2GB partition
n #add a new partition
p #primary
2 #partition number
#press enter for the default first sector
#press enter for the default last sector
a #toggle a bootable flag
1 #Partition number
w #write table to disk and exit

Format partitions as ext4:

sudo mkfs.ext4 /dev/sdb1
sudo mkfs.ext4 /dev/sdb2

Mount partitions (manually or reinsert the card).

Put dom0 binaries on the partition /dev/sdX1 with ext4 fs:

export BINARIES=$WORK/build/tmp/deploy/images/salvator-x-xen-dom0
export SDCARD=/media/<user>/<UUID> 
export ROOTFS_PKG=core-image-weston-salvator-x-xen-dom0.tar.bz2

sudo tar -xf $BINARIES/$ROOTFS_PKG -C $SDCARD
sudo cp $BINARIES/xen-salvator-x-xen-dom0.uImage $SDCARD/boot/xen-uImage
sudo cp $BINARIES/Image-r8a7795-salvator-x-dom0.dtb $SDCARD/boot/r8a7795-salvator-x-dom0.dtb

Put demo UI applications from evid.tbz2 to $SDCARD/home/root/.

Put weston.ini to $SDCARD/etc/xdg/weston/.

Put fusion-start.sh to $SDCARD/home/root/.

Put domU configuration file fusion.cfg to $SDCARD/xen/fusion.cfg.

Put (with renaming) domU kernel image to $SDCARD/xen/image_fusion.img.

Put domU rootfs on the partition /dev/sdX2 with ext4 fs:

export SDCARD2=/media/<user>/<UUID-/dev/sdX2>
sudo tar -xf <domu rootfs tar> -C $SDCARD2

Unpack installation.tar.gz to domU rootfs:

sudo tar -xf installation.tar.gz -C $SDCARD2/home/root

Update your bootloaders:

  1. Disconnect a Salvator-X board from power supply

  2. Set boot mode and flash to “QSPI Flash” as described in a document “Salvator_MiniMonitor_Manual_Rev0.03_e.pdf” section 3.1.

  3. Poweron the board and see minimonitor prompt in a serial console

  4. Issue a command no. 18 described in a document “Salvator_MiniMonitor_Manual_Rev0.03_e.pdf” section 4.1

  5. Follow minimonitor instructions with following actions:

    • Select 3 as a flash memory

    • Set switches as minimonitor asks

    • * Input a “Top” address of a desired to be reflashed program.

      * Program’s “Top”, “Flash save” and correspondent binary file name are described in a document “RENESAS_RCH3M3_YoctoStartupGuide_UME_v2.11.0.pdf” section 4.1.

    • * Input a “Flash save” address of a desired to be reflashed program.

    • Send a desired program * file from yocto $WORK/build/tmp/deploy/images/salvator-x-xen-dom0 folder.

    F.e. using minicom:

     * Ctrl-A S
     * Select ascii
     * Browse to the folder (double space key pressing goes folder down)
     * Select and send a desired program file
     * Press Y to flash a desired program
    
  6. Iterate steps 4 and 5 to flash all (or needed only) binaries described in the document “RENESAS_RCH3M3_YoctoStartupGuide_UME_v2.11.0.pdf” section 4.1.

  7. Power off the board.

  8. Set boot mode and flash to “HyperFlash 80 MHz” as described in the document “Salvator_MiniMonitor_Manual_Rev0.03_e.pdf” section 3.1.

  9. Power on the board.

Setup u-boot environment to boot xen:

setenv bootcmd 'run bootcmd_xen'
setenv bootcmd_xen 'run xen_load; run dtb_load; run kernel_load; run xenpolicy_load; bootm 0x48080000 - 0x48000000'
setenv xen_load 'ext2load mmc 0:1 0x48080000 /boot/xen-uImage'
setenv dtb_load 'ext2load mmc 0:1 0x48000000 /boot/r8a7795-salvator-x-dom0.dtb'
setenv kernel_load 'ext2load mmc 0:1 0x7a000000 /boot/Image'
setenv xenpolicy_load 'ext2load mmc 0:1 0x7c000000 /boot/xenpolicy-4.8.0'
setenv bootargs
saveenv

IMPORTANT Make sure that environment variable bootargs is absent among other environment variables in U-Boot.

Insert sdcard to SD0 slot, reboot the board.

If weston did not start (you see some text on displays, but black screens is weston started well with ivi shell), start it manually:

systemctl stop weston
systemctl start weston

Run UI applications:

./start_ic.sh
./start_openivi.sh

Run fusion domain:

./fusion-start.sh

Enjoy.

Clone this wiki locally