1 meta-agl, the Yocto layer for Automotive Grade Linux Distribution
2 =================================================================
4 This layer's purpose is ... [TBD]
9 URI: git://git.yoctoproject.org/poky
11 > revision: 5f0d25152bac2d3798663a4ebfdd2df24060f153
13 URI: git://git.openembedded.org/meta-openembedded
16 > revision: 853dcfa0d618dc26bd27b3a1b49494b98d6eee97
18 ## The Renesas R-Car Gen2 (Porter) board depends in addition on: ##
20 URI: https://gerrit.automotivelinux.org/gerrit/AGL/meta-renesas
21 > branch: agl-1.0-bsp-1.8.0
22 > revision: 13a2551505942808752a1721c9a27ce7d35cec33
27 There are 3 layers in top-level `meta-agl`.
29 `meta-ivi-common` is a layer which contains common packages to AGL
30 Distribution and other platforms for In-Vehicle Infotainment system.
31 > meta-agl/meta-ivi-common
33 `meta-agl` is a layer which contains AGL common and middleware packages.
36 `meta-agl-bsp` is a layer which contains required packages to boot AGL distribution on an emulated machine(QEMU).
37 > meta-agl/meta-agl-bsp
42 AGL package group design:
44 These are the top-level packagegroups for AGL Distribution.
45 > packagegroup-agl-core (minimal packages to boot system)
46 > packagegroup-agl-ivi (middlewares for AGL IVI)
47 > packagegroup-ivi-common (common packages to AGL and others)
49 Each package group can contain sub-package groups like these.
50 > packagegroup-agl-core-multimedia
51 > packagegroup-agl-core-connectivity
53 > packagegroup-agl-ivi-multimedia
54 > packagegroup-agl-ivi-connectivity
56 > packagegroup-ivi-common-multimedia
57 > packagegroup-ivi-common-connectivity
59 The recipe for `packagegroup-ivi-common-*.bb` will contain common packages to
60 AGL Distribution(meta-agl) and other In-Vehicle Infotainment system(e.g. meta-ivi and meta-tizen).
61 > directory: meta-agl/meta-ivi-common/recipes-core/packagegroups
62 > recipes : packagegroup-ivi-common-[subsystem].bb
64 The "packagegroups-agl-ivi-*" will contain AGL specific middleware packages.
65 > directory: meta-agl/meta-agl/recipes-ivi/packagegroups
66 > recipes : packagegroup-agl-ivi-[subsystem].bb
71 * QEMU (x86-64) - emulated machine: qemux86-64
72 * Renesas R-Car Gen2 (R-Car M2) - machine: porter
74 Supported Target of bitbake
75 ------------------------
77 * `agl-image-ivi` The baseline image of AGL Distributions
79 * `agl-image-minimal` For internal use to develop distribution (experimental)
80 * `agl-image-weston` For internal use to develop distribution (experimental)
82 Supposed Directory Trees of Layers to build
83 -------------------------------------------
103 You can build a QEMU image using the following steps:
105 1. Export TEMPLATECONF to pick up correct configuration for the build
106 > $ export TEMPLATECONF=/full/path/to/meta-agl/meta-agl/conf
108 2. Run the following command:
109 > $ source poky/oe-init-build-env
111 3. Build the minimal image of AGL Distribution
112 > $ bitbake agl-image-ivi
115 > $ PATH_TO_POKY/poky/scripts/runqemu agl-image-ivi qemux86-64
118 > $ PATH_TO_POKY/poky/scripts/runqemu agl-image-ivi qemux86-64 bootparams="uvesafb.mode_option=1280x720-32"
120 5. Some weston samples are available from weston terminal.
122 Build a R-Car M2 (porter) image
123 -------------------------------
127 NOTE: These instructions are based on GENIVI wiki, [here](http://wiki.projects.genivi.org/index.php/Hardware_Setup_and_Software_Installation/koelsch%26porter). If these didn't work correctly especially around Renesas Binary Packages, please check there and updated instructions.
129 #### Getting Source Code and Build image
131 1. Create a directory for working, then go to there.
132 $ mkdir -p $HOME/ANYWHERE_YOU_WANT_TO_WORK_THERE
133 $ cd $HOME/ANYWHERE_YOU_WANT_TO_WORK_THERE
134 $ export AGL_TOP=`pwd`
136 2. Get the meta data and checkout
137 $ git clone git://git.yoctoproject.org/poky
139 $ git checkout 5f0d25152bac2d3798663a4ebfdd2df24060f153
141 $ git clone git://git.openembedded.org/meta-openembedded
142 $ cd meta-openembedded
143 $ git checkout 853dcfa0d618dc26bd27b3a1b49494b98d6eee97
145 $ git clone https://gerrit.automotivelinux.org/gerrit/AGL/meta-renesas
147 $ git checkout c28172567a6325f5692e5d33b1ae1c1e64e59ddf
149 $ git clone https://gerrit.automotivelinux.org/gerrit/AGL/meta-agl
151 #### Obtain and Install Renesas Graphics Drivers
153 1. Download packages from Renesas
155 The graphics and multimedia acceleration packages for the R-Car M2 Porter board
156 can be download directory from [here](http://www.renesas.com/secret/r_car_download/rcar_demoboard.jsp).
158 There are 2 ZIP files can be downloaded.
159 * Multimedia and Graphics library which require registeration and click through license
160 > r-car_series_evaluation_software_package_for_linux-*.zip
161 * Related Linux drivers
162 > r-car_series_evaluation_software_package_of_linux_drivers-*.zip
164 2. Unzip the two downloads into a temporary directory.
168 $ unzip PATH_TO_DOWNLOAD/r-car_series_evaluation_software_package_for_linux-*.zip
169 $ unzip PATH_TO_DOWNLOAD/r-car_series_evaluation_software_package_of_linux_drivers-*.zip
171 After this step there should be two files in binary-tmp:
172 * Multimedia and Graphics library
173 > R-Car_Series_Evaluation_Software_Package_for_Linux-*.tar.gz
174 * Related Linux drivers
175 > R-Car_Series_Evaluation_Software_Package_of_Linux_Drivers-*.tar.gz
177 3. Extract 2 tar archives
178 $ tar xf R-Car_Series_Evaluation_Software_Package_for_Linux-*.tar.gz
179 $ tar xf R-Car_Series_Evaluation_Software_Package_of_Linux_Drivers-*.tar.gz
181 4. Copy 2 files manually
182 1. Locate `EVA_r8a7791_linux_sgx_binaries_gles2.tar.bz2` in the Multimedia and Graphics library deliverable and copy it into the BSP layer.
184 $ cp <path_to_file>/EVA_r8a7791_linux_sgx_binaries_gles2.tar.bz2 \
185 meta-renesas/meta-rcar-gen2/recipes-graphics/gles-module/\
186 gles-user-module/r8a7791_linux_sgx_binaries_gles2.tar.bz2
188 2. Locate `SGX_KM_M2.tar.bz2` in the related linux drivers deliverable and copy it into the BSP layer.
189 $ cp <path_to_file>SGX_KM_M2.tar.bz2 \
190 $ meta-renesas/meta-rcar-gen2/recipes-kernel/gles-module/gles-kernel-module
192 #### Build from the Source code
194 You can build a R-Car2 M2 (porter) image using the following steps:
196 1. Export TEMPLATECONF to pick up correct configuration for the build
197 $ export TEMPLATECONF=$AGL_TOP/meta-renesas/meta-rcar-gen2/conf
199 2. Run the following command:
201 $ source poky/oe-init-build-env
203 3. Build the minimal image of AGL Distribution
204 $ bitbake agl-image-ivi
206 ### Deployment (SDCARD)
208 NOTE: These instructions are based on GENIVI wiki, [here](http://wiki.projects.genivi.org/index.php/Hardware_Setup_and_Software_Installation/koelsch%26porter#Deployment_.28SDCARD.29).
210 #### Instructions on the host
212 1. Format SD-Card and then, create single EXT3 partition on it.
214 2. Mount the SD-Card, for example `/media/$SDCARD_LABEL`.
216 3. Copy AGL root file system onto the SD-Card
217 1. Go to build directory
218 $ cd $AGL_TOP/build/tmp/deploy/images/porter
219 2. Extract the root file system into the SD-Card
220 $ sudo tar --extract --numeric-owner --preserve-permissions --preserve-order \
221 --totals --directory=/media/$SDCARD_LABEL --file=agl-image-ivi-porter.tar.bz2
222 3. Copy kernel and DTB into the `/boot` of the SD-Card
223 $ sudo cp uImage uImage-r8a7791-porter.dtb /media/$SDCARD_LABEL
225 4. After the copy finished, unmount SD-Card and insert it into the SD-Card slot of the porter board.
227 #### Instructions on the host
229 NOTE: There is details about porter board [here](http://elinux.org/R-Car/Boards/Porter).
231 NOTE: To boot weston on porter board, we need keyboard and mouse. (USB2.0 can be use for this)
233 ##### Change U-Boot parameters to boot from SD card
235 1. Power up the board and, using your preferred terminal emulator, stop the board's autoboot by hitting any key.
237 > Debug serial settings are 38400 8N1. Any standard terminal emulator program can be used.
239 2. Set the follow environment variables and save them
240 => setenv bootargs_console console=ttySC6,${baudrate}
241 => setenv bootargs_video vmalloc=384M video=HDMI-A-1:1024x768-32@60
242 => setenv bootcmd_sd 'ext4load mmc 0:1 0x40007fc0 boot/uImage;ext4load mmc 0:1 0x40f00000 boot/uImage-r8a7791-porter.dtb'
243 => setenv bootcmd 'setenv bootargs ${bootargs_console} ${bootargs_video} root=/dev/mmcblk0p1 rw rootfstype=ext3;run bootcmd_sd;bootm 0x40007fc0 - 0x40f00000'
246 ##### Boot from SD card
248 1. After board reset, U-Boot is started and after a countdown, ...
249 Linux boot message should be displayed. Please wait a moment.
250 2. Then weston is booted automatically, and weston-terminal appears.