This repository has been archived by the owner on Oct 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
486 lines (348 loc) · 15.2 KB
/
README
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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
TI AM335x-EVM/SK and BeagleBoneBlack Boards
1. About this document
======================
This document describes the common and non-hardware specific information.
Please refer to README.hardware for hardware specific information.
Dependencies
------------
This layer depends on the oe-core version supplied with Wind River Linux
and the wr-kernel layer.
Maintenance
-----------
This layer is maintained by Wind River Systems, Inc.
Contact <[email protected]> or your support representative for more
information on submitting changes.
Building the ti-am335x layer
---------------------------
This layer and wr-kernel layer should be added to bblayers.conf. This
is done automatically when using the Wind River configure wrapper.
License
-------
Copyright (C) 2018 Wind River Systems, Inc.
Source code included in the tree for individual recipes is under the LICENSE
stated in the associated recipe (.bb file) unless otherwise stated.
The metadata is under the following license unless otherwise stated.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
2. BSP Kernel and Distros
=========================
The following table summarizes the valid Wind River Linux distros for this BSP.
'Y' in each content cell stands for supported; 'N' stands for not supported:
+--------------+-------------+-------------+------------------+
| valid/distro | wrlinux | wrlinux-cgl | wrlinux-std-sato |
+--------------+-------------+-------------+------------------+
| valid | Y | N | Y |
+--------------+-------------+-------------+------------------+
For the supported kernel type for this BSP, please check the TARGET_SUPPORTED_KTYPES
by running 'bitbake -e | grep "^TARGET_SUPPORTED_KTYPES"'.
Note: The preempt-rt ktype is not available for this BSP/Machine at this time.
3. Board Specific Patches
=========================
To get a list of patches applied to the kernel specific to this BSP,
along with patch descriptions, use git to see what changed on the default
kernel (git whatchanged <kernel_type>..<bsp_name>). For example:
# cd tmp-glibc/work-shared/ti-am335x/kernel-source
# git whatchanged standard/base..
4 Boot Instructions
====================
4.1 NFS Root File System
------------------------
Configure u-boot with target IP, tftp server, netmask and other required
network values.
> tftp 0x82000000 "/<tftp root>/zImage"
> tftp 0x80005000 "/<tftp root>/dtb"
> setenv bootargs console=ttyS0,115200 root=/dev/nfs rw \
nfsroot=<nfs server>:<nfs root>,nolock ip=dhcp\
ip=<target IP>::<gateway>:<netmask>::eth0:off
> bootz 0x82000000 - 0x80005000
or use the env variable:
> set serverip $addr
> set ipaddr $addr
> set netargs setenv bootargs console=ttyS0,115200n8 root=/dev/nfs \
nfsroot=<IP>:<nfs_dir>,nolock rw ip=dhcp;
> setenv autoload no;run netargs;
> bootz 0x82000000 - 0x80005000
4.2 Rootfs on MMC/SD
--------------------
An ext4 filesystem can be created on the MMC/SD using standard techniques.
4.2.1 Deployment
----------------
After loading the kernel, pass kernel arguments like following:
root=/dev/mmcblk0p2 rw console=ttyS0,115200n8 rootwait
4.2.2 Note
----------
Please set the right /dev/mmcblkXpX according to your real app scenario, then
rootfs will be correctly mounted.
4.2.3 WIC
---------
User can use the OpenEmbedded Image Creator to create the properly partitioned
image on a SD card. It generates partitioned images from existing OpenEmbedded
build artifacts. Please refer to the following URL for more detailed partition
information about WIC:
http://www.yoctoproject.org/docs/2.2/mega-manual/mega-manual.html#creating-partitioned-images
After having built your project, a partitioned WIC image will be created in the
deploy folder as follows:
path_to_your_project/build/tmp-glibc/deploy/images/ti-am335x/wrlinux-image-glibc-<rootfs_type>-ti-am335x.wic
There are two partitions in this WIC images, the first one is to hold the boot
images, the second is the related root file system.
6.1 An example to deploy bootloader into the first partition
------------------------------------------------------------
1) Deploy the created WIC image into SD card(/dev/sdx) in your host machine.
$ sudo dd if=wrlinux-image-glibc-<rootfs_type>-ti-am335x.wic of=/dev/sdx
2) Deploy your own MLO and u-boot.img into this /dev/sdx1
$ sudo mount /dev/sdx1 path_to_sdx1
$ cp -r path_to_your_bootloader/MLO path_to_sdx1
$ cp -r path_to_your_bootloader/u-boot.img path_to_sdx1
$ sync; sudo umount path_to_sdx1
6.2 boot the board from the WIC SD card
---------------------------------------
Insert the SD card into the board and select this SD card as the boot device.
Then set the proper u-boot environment parameters to boot the board like the
following steps:
$ setenv bootargs console=ttyS0,115200n8 root=/dev/mmcblk0p2 rw rootwait ip=dhcp
$ fatload mmc 0 0x82000000 zImage; fatload mmc 0 0x80005000 am335x-boneblack.dtb; bootz 0x82000000 - 0x80005000
5. Features Notes
=================
5.1 Crypto engine
-----------------
5.1.1 Usage and verification
----------------------------
openssl without cryptodev:
# openssl speed -evp aes-128-cbc
3s on 16 size blocks: 3506326 aes-128-cbc's in 3.00s
3s on 64 size blocks: 1060720 aes-128-cbc's in 3.00s
3s on 256 size blocks: 282339 aes-128-cbc's in 3.00s
3s on 1024 size blocks: 71710 aes-128-cbc's in 3.00s
3s on 8192 size blocks: 9005 aes-128-cbc's in 3.00s
openssl with cryptodev:
# modprobe cryptodev
cryptodev: driver 1.9 loaded.
# openssl speed -evp aes-128-cbc
3s on 16 size blocks: 43127 aes-128-cbc's in 0.02s
3s on 64 size blocks: 34100 aes-128-cbc's in 0.11s
3s on 256 size blocks: 27633 aes-128-cbc's in 0.06s
3s on 1024 size blocks: 19539 aes-128-cbc's in 0.04s
3s on 8192 size blocks: 6836 aes-128-cbc's in 0.02s
5.1.2 Target Notes
------------------
make sure openssl is right for ioctl.
5.2 Audio
---------
5.2.1 Usage and verification
----------------------------
# amixer cset name='PGA Capture Volume' 80%,80%
# amixer cset name='PCM Playback Volume' 80%,80%
# arecord -Dhw:0,0 -f S16_LE -r8000 -c2 -v sample.wav
# aplay sample.wav
5.2.2 Target Notes
------------------
There is no in-line or mic output pin for SK board, and profile #0 for only EVM.
5.3 PM suspend
--------------
5.3.1 Usage and verification
----------------------------
# echo standby > /sys/power/state
# echo mem > /sys/power/state
5.3.2 Target Notes
------------------
Wakeup resources:
ti-am335x: tsc, uart0, and, gpio0(SK).
freeze listed, but not a default functional suspend for all arm platform.
5.4 PM cpufreq
--------------
5.4.1 Usage and verification
----------------------------
cpufreq:
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
conservative ondemand userspace powersave performance
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
720000
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
275000 500000 600000 720000
# echo 275000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
275000
5.4.1 Note
----------
CPUFreq can only be tested by userspace mode.
5.5 PM CPU idle
---------------
5.5.1 Usage and verification
----------------------------
There are two states for ti-am335x, which are C0, C1 as follows:
root@localhost:/sys/devices/system/cpu/cpu0/cpuidle# ls -lR
.:
total 0
drwxr-xr-x 2 root root 0 Mar 12 00:46 state0
drwxr-xr-x 2 root root 0 Mar 12 00:46 state1
They can be disabled by echo 1 > disable as follows:
root@localhost:/sys/devices/system/cpu/cpu0/cpuidle/state1# cat disable
0
root@localhost:/sys/devices/system/cpu/cpu0/cpuidle/state1# echo 1 > disable
root@localhost:/sys/devices/system/cpu/cpu0/cpuidle/state1# cat disable
1
5.5.1 Note
----------
Since DDR2 is deprecated currently, C2 SR has been removed from SDK. So there
are only two idle states in the latest SDK.
5.6 Touch Screen
----------------
5.6.1 Usage and verification
----------------------------
Touch screen calibration will be done when boot, and there is also a program
in desktop when matchbox starts.
5.7 Watchdog
------------
5.7.1 Usage and verification
-----------------------------
# echo 1 > /dev/watchdog
5.8 USB
-------
5.8.1 Usage and verification
----------------------------
Host mode is OK as-is, the following example for device mode:
# modprobe g_multi "file=/dev/mmcblk0p1"
5.8.2 note
----------
The status host/gadget of USB are OK on both EVM and SK.
5.9 PWMSS
----------
5.9.1 Usage and verification
-----------------------------
The lcd brightness is controlled by ecap.
the brightness will be changed:
# echo 0~8 > /sys/devices/platform/backlight/backlight/backlight/brightness
5.10 DCAN
--------
5.10.1 Usage and verification
----------------------------
# ip link set can0 up type can bitrate 800000
c_can_platform 481d0000.can can0: setting BTR=2a01 BRPE=0000
IPv6: ADDRCONF(NETDEV_CHANGE): can0: link becomes ready
# ip -details link show can0
# cansend can0 1F334455#1122334455667788
# ip link set can0 down
5.10.2 Target Notes
------------------
This feature is only available in profile #1 of AM335X EVM with a general
purpose daughter card according to EVM profile definition. Transceiver port
on the daughter card is sw8 with the value of 1110, which means 2~4 ON and 1
OFF. Please refer to the following link for more information:
http://processors.wiki.ti.com/index.php/AM335X_DCAN_Driver_Guide
5.11 Graphics settings notes:
-----------------------------
There are two xorg.conf in recipes-graphics/xorg-xserver/files respectively for
am335x-evm and am335x-evmsk, they will be installed into the /etc/X11/xorg.conf
Generally speaking, they are the default reference design, but you need to make
sure they match to your real application scenario if something goes wrong.
And you always can easily find them by(Noise removed):
# cd /sys/devices
# find . -name '*event*'|grep input
./platform/lis3lv02d/input/input2/event2
./platform/ocp/44e0d000.tscadc/TI-am335x-tsc/input/input1/event1
./platform/matrix_keypad0/input/input0/event0
Then edit /etc/X11/xorg.conf to match settings above, save and reboot.
5.12 Graphics SGX
-----------------
Currently the third party lib are integrated partly, pvrsrvkm can be installed
with wrlinux-std-sato distro, including a binary vendor demo module.
5.12.1 Usage and verification for binary example & pvrsrvkm.ko
--------------------------------------------------------------
# depmod
# modprobe bc_example
# cat /proc/devices |grep bc_example
245 bc_example
# ls /dev/bc_example -l
crw------- 1 root root 245, 0 Aug 2 02:18 /dev/bc_example
5.12.2 Notes
------------
Generally speaking, xorg.conf is a very live configuration settings, which means
there might be a different xorg.conf matching to the specific scenario even for
the same board.
There are two xorg configuration files in /etc/X11 for the reference design, the
default xorg.conf is for am335x-evm, and another one for SK board, obviously you
need to replace xorg.conf with xorg-sk.conf when your board is SK.
5.13 Bluetooth & WLAN
---------------------
5.13.1 Bluetooth usage and verification
---------------------------------------
# modprobe st_drv
# uim-sysfs start
# modprobe btwilink
# rfkill unblock bluetooth
# hciconfig hci0 up
# hcitool -i hci0 scan
Scanning ...
00:EC:0A:0B:C7:xx nobody
B8:8A:60:59:85:xx PEK-XX
5.13.2 Bluetooth Target Notes
-----------------------------
Make sure the match between firmware version and your HD bluetooth module, and
the current version is TIInit_7.6.15.
After machine suspend, like "echo mem > /sys/power/state", the bluetooth needs
reboot by the following commands:
# hciconfig hci0 down
# hciconfig hci0 up
5.13.3 WLAN Usage and verification
----------------------------------
# rfkill unblock wlan
# ifconfig wlan0 up
# iw dev wlan0 scan
# killall wpa_supplicant
# wpa_supplicant -iwlan0 -B -c /etc/wpa_supplicant.conf
Generally speaking, wpa will automatically launch a new negotiation process when
timeout. If wlan0 is finally failure on authentication and association, then try
to do the following commands:
# killall wpa_supplicant
# ifconfig wlan0 down
# ifconfig wlan0 up
# wpa_supplicant -iwlan0 -B -c /etc/wpa_supplicant.conf
Be patient please until the following messages are shown:
wlcore: Association completed.
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Then you can get your IP from dchp servers by the command:
# dhclient wlan0
# ping -I wlan0 your_wifi_gatewayip
Note:
It seems current omap-hsmmc suspend logic has a conflict with wl12xx protocol
by sdio, which means wlcore_sdio is not ready for suspend operation since dts
related sleep pins are not availabe for wl127x from TI git repo.
The suspend will stop WiFi modules when you take MMC card as root filesystem,
As we observed, after machine suspend, the wlcore_sdio does not work properly
any more due to illegal byte sequence(-84 returned) even if we re-install all
wlcore related modules, and reboot board is the only way to get wlan0 back.
Here is a workaround way to get them along with each other: Don't take MMC as
your root filesystem, and do "bitbake -c menuconfig linux-yocto" to configure
kernel config fragment MMC, MMC_BLOCK, MMC_OMAP_HS from "y" to "m" in project
for re-deployment. Then the following steps can be taken to suspend:
# killall wpa_supplicant
# ifconfig wlan0 down
# rmmod wlcore_sdio wl12xx wlcore
Before the below steps, please umount all your live mmc filesystem.
# rmmod omap_hsmmc mmc_block mmc_core
# echo mem > /sys/power/state
# modprobe omap_hsmmc wlcore_sdio
# ifconfig wlan0 up
We are aware of some wlcore mismatch WARNINGs in boottime and benign & active
calltrace will show up during mem suspending from a live wlan. We'll keep and
leave them to warn our customers if their real app scenario shows or needs to
mute them. Actually it's easy to do that. Of course, the suspend process can
still be finished normally.
Make sure your root filesystem is always online while any network operations.
Make sure the match between firmware version and your HD wireless module, and
rfkill set is right for wlan. The default firmware version is 6.3.10.0.142.
But unlucky, it has been dropped in the latest SDK, please contact your board
vendor for more information.