1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
|
# Troubleshooting
This topic describes various areas that could cause you problems.
## Including Extended Attributes
The
[Extended Attributes Set (`xattrs`)](https://linux-audit.com/using-xattrs-extended-attributes-on-linux/)
associated with the image during its construction must be copied to
the bootable media.
The `xattrs` supports
[Smack](https://en.wikipedia.org/wiki/Smack_(software)), which is a
Simplified Mandatory Access Control kernel.
**NOTE:** See
[https://www.kernel.org/doc/Documentation/security/Smack.txt](https://www.kernel.org/doc/Documentation/security/Smack.txt).
for detailed information on Smack.
Many methods exist that allow you to create bootable media (e.g. `dd`, `bmaptools`,
`tar`, and AGL-provided scripts such as `mkabl-agl.sh` and `mkefi-agl.sh`).
It is recommended that you do not use `tar` to create bootable media.
However, if you do, you must take these steps to copy `xattrs` to the media:
1. Verify your `tar` version is 1.28 or newer:
```bash
$ tar --version
tar (GNU tar) 1.28
[snip]
```
2. Optionally update `tar` if required.
Most systems come with `tar` installed.
If you need to install it, see the
"[Installing tar](https://www.howtoforge.com/tutorial/linux-tar-command/#installing-tar)"
section for instructions.
When you build an AGL distribution, a native up-to-date version of
`tar` is created.
Use the following command to see that version:
```bash
$ tmp/sysroots/x86_64-linux/usr/bin/tar-native/tar --version
tar (GNU tar) 1.28
[snip]
```
3. Copy the AGL files and Extended Attributes Set to your bootable media:
```bash
$ tar --extract --xz --numeric-owner --preserve-permissions --preserve-order --totals \
--xattrs-include='*' --directory=DESTINATION_DIRECTORY --file=agl-demo-platform.....tar.xz
```
## Screen orientation for Splash and in Weston
Depending of your scren mounting the default orientation of the UI an/or splash screen might be incorrect.
To change the orientation of the splash screen patch
```bash
File: /etc/systemd/system/sysinit.target.wants/psplash-start.service
Line: ExecStart=/usr/bin/psplash -n -a 90
```
To change the orientation of the UI in Weston patch
```bash
File: /etc/xdg/weston/weston.ini
Line: transform=90
```
## Disabling Homescreen in AGL 4.0.x DD release
**Problem**: new installed applications are not available on Homescreen and even if started manually through afm-util, the application starts but no surface appears.
**Answer**: this is due to IVI-Shell integration with Qt and Homescreen.
To disable IVI-Shell and revert to the "plain old" weston desktop, you can follow the 4 steps below:
* Modify */etc/xdg/weston/weston.ini* and comment the line mentioning IVI-shell. For example on Porter board:
```bash
[core]
backend=drm-backend.so
#shell=ivi-shell.so
...
```
* modify */etc/afm/unit.env.d/qt-for-ivi-shell* and comment the line specifying QT Wayland backend:
```bash
...
#Environment=QT_WAYLAND_SHELL_INTEGRATION=ivi-shell
...
```
(If you use vi, remove backup files by `rm /etc/afm/unit.env.d/*~`)
* disable Homescreen services:
```bash
# systemctl --user mask HomeScreen.service
```
* Reboot your target and you should then be able to start apps on the standard weston screen using afm-util
## Adding media files to play with MediaPlayer
AGL include the default MediaPlayer sample app which can be used to play music. The `lightmediascanner.service` by default will search for media under the `/media` folder. So if you plug in any USB stick containing music, they would be recognized and showed in the playlist of the MediaPlayer app menu.
The current supported format is OGG. Please convert your files to ogg to play with MediaPlayer.
In case you want to store music in another place, modify the `/usr/lib/systemd/user/lightmediascanner.service` file and change the `--directory` parameter to the path of that folder.
If you don’t want to touch the ligthmediascanner service, you can also add a folder named "Music" under `/home/root` and put your music files there.
## Configuring the Audio hardware
AGL uses alsa as Audio configuration master. If the correct HW is not setup, the Audio system will fail to start what will also fails the demo Home Screen launch.
You need to configure Audio in 2 places
* alsa
* 4A HAL
### alsa
The file /etc/asound.conf (at the beginning) tells which hardware will be used.
For example on an Intel Minnow or UP board your need to enter the following configuration.
```bash
pcm.Speakers {
type dmix
slave {pcm "hw:PCH,3"}
ipc_key 1001 # ipc_key should be unique to each dmix
}
```
The correct value (here hw:PCH,3) can be obtained with the command:
```bash
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
```
Using hw:PCH rather than hw:0 will avoid you many trouble.\
NOTE that the device number is not always 0. If you give no device number, alsa will assume device 0 (and the not the first available device), what can fail your configuration.\
As the default is hw:0 (card 0 device 0), it will always fail on a Minnow or UP board.
For info HW device for common configuration are:
* for USB Audio -> hw:AUDIO,0
* for Intel Analog output -> hw:PCH,0 (not available on Minnow, Joule, Up boards, ...)
* for Intel via -> HDMI hw:PCH,3
* for MOST Unicens -> hw:ep016ch,0
### 4A HAL configuration
AGL 4A needs to know which HAL shall be used. This is configured in the file:
```bash
/usr/agl-service-audio-4a/ahl-agl-service-audio-4a-config.json
```
At the beginning of that file you will find the slected HAL (note the there is no correct default value).
```bash
{
"version": "0.2.0",
"policy_module": "AudioPolicy_v1",
"description": "High-level binding configuration file",
"note": "Devices and routings are always listed in order of priority (for device selection rules)",
"hal_list": ["intel-minnow"],
"audio_roles": [
```
Here you see "intel-minnow" but common values are:
* Intel laptop -> intel-pc
* Intel via HDMI -> intel-minnow
* Renesas -> Rcar-M3
* USB Audio Speaker -> usb-audio
* MOSTS Unicens -> hal-most-unicens
More HAL can be found on Gerrit (search projects named as 4a-hal*)
## Installing the Map for the Navigation Application
While the Navigation App is installed with all other demo Apps at first boot, the Maps required to be installed manually.
### a) Method 1 on target download
1. Install the new image on the target
2. boot a first time to install the demo Apps
3. via ssh or serial connection, execute the script
* /usr/AGL/apps/download_mapdata_uk.sh\
or
* /usr/AGL/apps/download_mapdata_jp.sh
### b) At image creation
Download on your build machine the desired maps and uncompress them on your target image before 1st boot.
This method is quicker and does not require to have the network enabled on the target device.
Map can be found here.
* <http://agl.wismobi.com/data/japan_TR9/navi_data.tar.gz>
* <http://agl.wismobi.com/data/UnitedKingdom_TR9/navi_data_UK.tar.gz>
Once that you have built your image on the SD card, uncompress the desired map in on the SD card at the position /YourMountPoint/var/mapdata\
(YourMountPoint will vary with your build system).
You can also use the script from the image to install the Mapdata on your SD card but there is little adavange in using that method. e.g.
* download_mapdata_jp.sh /YourMountPoint
|