Support R-Car M2 porter board
[AGL/meta-agl.git] / README.md
1 meta-agl, the Yocto layer for Automotive Grade Linux Distribution
2 =================================================================
3
4 This layer's purpose is ... [TBD]
5
6 Layer Dependencies
7 ------------------
8
9 URI: git://git.yoctoproject.org/poky
10 > branch:   dizzy
11 > revision: 5f0d25152bac2d3798663a4ebfdd2df24060f153
12
13 URI: git://git.openembedded.org/meta-openembedded
14 > layer:    meta-oe
15 > branch:   dizzy
16 > revision: 853dcfa0d618dc26bd27b3a1b49494b98d6eee97
17
18 ## The Renesas R-Car Gen2 (Porter) board depends in addition on: ##
19
20 URI: https://gerrit.automotivelinux.org/gerrit/p/AGL/meta-renesas.git
21 > branch:   agl-1.0-bsp-1.8.0
22 > revision: 0a69b07cfca17d1435f2bc7bf779139c5fac09a3
23
24 Layers
25 ------
26
27 There are 2 sub-layers in top-level `meta-agl`.
28
29 `meta-agl` is a layer which contains AGL common and middleware packages.
30 > meta-agl/meta-agl
31
32 `meta-agl-bsp` is a layer which contains required packages to boot AGL distribution on an emulated machine(QEMU).
33 > meta-agl/meta-agl-bsp
34
35 Packagegroups
36 -------------
37
38 AGL package group design:
39
40 These are the top-level packagegroups for AGL Distribution.
41 > packagegroup-agl-core  (basic/common packages out of oe-core)
42 > packagegroup-agl-ivi   (middlewares for AGL IVI)
43
44 Each package group can contain sub-package groups like these.
45 > packagegroup-agl-core-multimedia
46 > packagegroup-agl-core-connectivity
47 > ...
48 > packagegroup-agl-ivi-multimedia
49 > packagegroup-agl-ivi-connectivity
50 > ...
51
52 The recipe for `packagegroup-agl-core-*.bb` will contain common packages between meta-agl, meta-ivi and meta-tizen.
53 > directory: meta-agl/meta-agl/recipes-core/packagegroups
54 > recipes  : packagegroup-agl-core-[subsystem].bb
55
56 The "packagegroups-agl-ivi-*" will contain AGL specific middleware packages.
57 > directory: meta-agl/meta-agl/recipes-ivi/packagegroups
58 > recipes  : packagegroup-agl-ivi-[subsystem].bb
59
60 Supported Machine
61 -----------------
62
63 * QEMU (x86-64) - emulated machine: qemux86-64
64 * Renesas R-Car Gen2 (R-Car M2) - machine: porter
65
66 Supported Target of bitbake
67 ------------------------
68
69 * `agl-image-ivi` The baseline image of AGL Distributions
70
71 * `agl-image-minimal` For internal use to develop distribution (experimental)
72 * `agl-image-weston`  For internal use to develop distribution (experimental)
73
74 Supposed Directory Trees of Layers to build
75 -------------------------------------------
76
77 * For QEMU
78
79       ${TOPDIR}/
80                 meta-agl/
81                 meta-openembedded/
82                 poky/
83
84 * For R-Car M2
85
86       ${TOPDIR}/
87                 meta-agl/
88                 meta-openembedded/
89                 meta-renesas/
90                 poky/
91
92 Build a QEMU image
93 ------------------
94
95 You can build a QEMU image using the following steps:
96
97 1. Export TEMPLATECONF to pick up correct configuration for the build
98    > $ export TEMPLATECONF=/full/path/to/meta-agl/meta-agl/conf
99
100 2. Run the following command:
101    > $ source poky/oe-init-build-env
102
103 3. Build the minimal image of AGL Distribution
104    > $ bitbake agl-image-ivi
105
106 4. Run the emulator
107    > $ PATH_TO_POKY/poky/scripts/runqemu agl-image-ivi qemux86-64
108
109    For large screen:
110    > $ PATH_TO_POKY/poky/scripts/runqemu agl-image-ivi qemux86-64 bootparams="uvesafb.mode_option=1280x720-32"
111
112 5. Some weston samples are available from weston terminal.
113
114 Build a R-Car M2 (porter) image
115 -------------------------------
116
117 ### Software setup
118
119 #### Obtain and Install Renesas Graphics Drivers
120
121 See [here](http://wiki.projects.genivi.org/index.php/Hardware_Setup_and_Software_Installation/koelsch%26porter#M2_Porter_low_cost_board) and get 2 ZIP files from the link there.
122
123 Note: You have to copy files manually because there is no shell-script
124 in the current meta-renesas.
125
126 1. Unzip the two downloads into a folder. In this example a temporary directory is used.
127         $ cd $HOME/AGL
128         $ mkdir binary-tmp
129         $ <unzip the two downloads into binary-tmp>
130
131    After this step there should be two files in binary-tmp:
132         R-Car_Series_Evaluation_Software_Package_for_Linux-*.tar.gz
133         R-Car_Series_Evaluation_Software_Package_of_Linux_Drivers-*.tar.gz
134
135 2. Extract 2 tar.gz
136         tar xf R-Car_Series_Evaluation_Software_Package_for_Linux-*.tar.gz
137         tar xf R-Car_Series_Evaluation_Software_Package_of_Linux_Drivers-*.tar.gz
138
139 3. Copy 2 files manually
140    1. Locate EVA_r8a7791_linux_sgx_binaries_gles2.tar.bz2 in the graphics
141    driver deliverable and copy it into the BSP layer. (need rename)
142           cp <path_to_file>/EVA_r8a7791_linux_sgx_binaries_gles2.tar.bz2 \
143           meta-renesas/meta-rcar-gen2/recipes-graphics/gles-module/\
144           gles-user-module/r8a7791_linux_sgx_binaries_gles2.tar.bz2
145
146    2. Locate SGX_KM_M2.tar.bz2 in the graphics driver deliverable and copy
147    it into the BSP layer.
148           cp <path_to_file>SGX_KM_M2.tar.bz2 \
149           meta-renesas/meta-rcar-gen2/recipes-kernel/gles-module/gles-kernel-module
150
151 #### Build from the Source code
152
153 You can build a R-Car2 M2 (porter) image using the following steps:
154
155 1. Export TEMPLATECONF to pick up correct configuration for the build
156    > $ export TEMPLATECONF=/full/path/to/meta-renesas/meta-rcar-gen2/conf
157
158 2. Run the following command:
159    > $ source poky/oe-init-build-env
160
161 3. Build the minimal image of AGL Distribution
162    > $ bitbake agl-image-ivi
163
164 ### Deployment (SDCARD)
165
166 Follow the instructions [here](http://wiki.projects.genivi.org/index.php/Hardware_Setup_and_Software_Installation/koelsch%26porter#Deployment_.28SDCARD.29)
167
168 Note: Use `agl-image-ivi-porter.tar.bz2` as name of root file system archive.