mirror of
https://github.com/agherzan/meta-raspberrypi.git
synced 2025-12-06 06:19:11 +00:00
Compare commits
344 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a5f9b07a82 | ||
|
|
8c5eba1d94 | ||
|
|
5229f75604 | ||
|
|
5771c7f7d4 | ||
|
|
1b2c25ee88 | ||
|
|
4c02c7ce07 | ||
|
|
cc64d6324d | ||
|
|
2745399f75 | ||
|
|
3fb0a1914a | ||
|
|
6564e126ae | ||
|
|
101e8aba77 | ||
|
|
10691ae680 | ||
|
|
5cac5e67f8 | ||
|
|
43ecd9ac99 | ||
|
|
fe92cc7e14 | ||
|
|
d49bd07c5b | ||
|
|
b34b4fe8fc | ||
|
|
5f12d846f7 | ||
|
|
f38938f6ca | ||
|
|
4fb1a155dc | ||
|
|
8a21c1dda6 | ||
|
|
0dbf569173 | ||
|
|
ffddbad97c | ||
|
|
69840c0bbe | ||
|
|
b1940869a5 | ||
|
|
5d79d24d36 | ||
|
|
f7af12910f | ||
|
|
9912d38e97 | ||
|
|
060927314d | ||
|
|
cd338c26e2 | ||
|
|
dedd75f08f | ||
|
|
c4ddf87db2 | ||
|
|
953dc5a406 | ||
|
|
1317a894fa | ||
|
|
6cdb2becac | ||
|
|
37c2366724 | ||
|
|
4a2cefab66 | ||
|
|
47440c32a4 | ||
|
|
3fe96d9212 | ||
|
|
c57a7295d7 | ||
|
|
d997e2da17 | ||
|
|
e2603e56d6 | ||
|
|
3696c0ef66 | ||
|
|
bfc46bdd55 | ||
|
|
3645b27848 | ||
|
|
f1b7034077 | ||
|
|
4f8930b9d0 | ||
|
|
d493717509 | ||
|
|
9b6cdaf826 | ||
|
|
54ecd3402d | ||
|
|
e9e4b1bbd2 | ||
|
|
e447357ec4 | ||
|
|
3bd9b1bce4 | ||
|
|
197266a2aa | ||
|
|
9797874a23 | ||
|
|
84af6e7de3 | ||
|
|
8f425f1b9e | ||
|
|
e82417d33b | ||
|
|
d28692dc9e | ||
|
|
f6473c36a5 | ||
|
|
8f285bb8f3 | ||
|
|
75efa69e75 | ||
|
|
38ab74bd3e | ||
|
|
e9c8b2aa4d | ||
|
|
2c19e8882f | ||
|
|
00962adc49 | ||
|
|
370e0f68e6 | ||
|
|
f248d7cf8c | ||
|
|
53e17683c5 | ||
|
|
27445a1e4c | ||
|
|
06709d784d | ||
|
|
da73efffe1 | ||
|
|
34cb837929 | ||
|
|
507ab2682b | ||
|
|
4ed070fc0c | ||
|
|
b47e8f5599 | ||
|
|
6fa040c769 | ||
|
|
bfbe0ce3b4 | ||
|
|
4db634bcda | ||
|
|
32d0936570 | ||
|
|
519c387e3b | ||
|
|
12a8848127 | ||
|
|
1601a3571c | ||
|
|
752a9a89e5 | ||
|
|
5eaeb55161 | ||
|
|
15a23443c8 | ||
|
|
a42a1706de | ||
|
|
249cb544e0 | ||
|
|
807cff5e5b | ||
|
|
224d1c9925 | ||
|
|
0d5aff5161 | ||
|
|
52671faf4f | ||
|
|
b331933938 | ||
|
|
6c6f6cf7b3 | ||
|
|
8948772554 | ||
|
|
451a8de37c | ||
|
|
e9de6d816d | ||
|
|
9675f8f09a | ||
|
|
4d42a6efec | ||
|
|
68b18fa80e | ||
|
|
37e4913438 | ||
|
|
c65b0b8c3f | ||
|
|
bcb26ed634 | ||
|
|
9295c7fd71 | ||
|
|
048008a935 | ||
|
|
c25a43a3b4 | ||
|
|
736e1ba035 | ||
|
|
6726ffb4fe | ||
|
|
053cb6ea0d | ||
|
|
1465bc8787 | ||
|
|
6bd39a61b7 | ||
|
|
6314f668fa | ||
|
|
fe25a1163a | ||
|
|
70e7860820 | ||
|
|
509f042280 | ||
|
|
f2cff839f5 | ||
|
|
a967c15d75 | ||
|
|
bc0d788b47 | ||
|
|
0776b86c66 | ||
|
|
58806f6552 | ||
|
|
dba20cbb0a | ||
|
|
7cff0a0a9e | ||
|
|
50a7710718 | ||
|
|
fcbb1e6e91 | ||
|
|
7d2249a2e2 | ||
|
|
7f043ab724 | ||
|
|
aaf8e2e738 | ||
|
|
a7d629e569 | ||
|
|
c0563670d3 | ||
|
|
5546748231 | ||
|
|
0d7f01df10 | ||
|
|
36c2501130 | ||
|
|
10a5bace87 | ||
|
|
20c8e6a5bc | ||
|
|
f22ecc425c | ||
|
|
72ea51f87b | ||
|
|
4dfa633d23 | ||
|
|
c6f7ec52cf | ||
|
|
bdbe28d7f3 | ||
|
|
16718000cf | ||
|
|
17dad9328b | ||
|
|
ade923f17d | ||
|
|
4c06098563 | ||
|
|
b47cbb6996 | ||
|
|
bfe2307cc4 | ||
|
|
d676d54f04 | ||
|
|
f188f3d756 | ||
|
|
7457bf182c | ||
|
|
b78459f260 | ||
|
|
83c9ed7dc7 | ||
|
|
9182a217c9 | ||
|
|
27a8acecf5 | ||
|
|
5f057d9343 | ||
|
|
3eafe9d57a | ||
|
|
25d8f0b8d8 | ||
|
|
c8532df1c2 | ||
|
|
0fc2b1c3ac | ||
|
|
bfd50c24a2 | ||
|
|
4a4373c02d | ||
|
|
6ef9d94a2c | ||
|
|
bcae58ba84 | ||
|
|
e1c5efc658 | ||
|
|
c9f29df249 | ||
|
|
b896a7da70 | ||
|
|
a7ce059274 | ||
|
|
d1fa1c0b75 | ||
|
|
ddd1f03373 | ||
|
|
5810be737d | ||
|
|
c0ee9c7641 | ||
|
|
df7eeb6f86 | ||
|
|
57c8e6bffb | ||
|
|
4e59c28f70 | ||
|
|
23add242bc | ||
|
|
7146e12374 | ||
|
|
1350ba8acf | ||
|
|
6392a63985 | ||
|
|
1949a0d5ba | ||
|
|
ba383ecd35 | ||
|
|
4147bd7214 | ||
|
|
fde4b34aa2 | ||
|
|
72c43866c1 | ||
|
|
b7c3a935cc | ||
|
|
d8bf60ce6c | ||
|
|
463d0e2d7d | ||
|
|
54c5451a04 | ||
|
|
dedd45f4f8 | ||
|
|
8c8a5cd64c | ||
|
|
318f1b3994 | ||
|
|
7089e6a891 | ||
|
|
18e5856a25 | ||
|
|
e1d4448ce8 | ||
|
|
b89a2743fb | ||
|
|
b99a09b257 | ||
|
|
2dbc974596 | ||
|
|
4905c7cc2b | ||
|
|
4dc75cedf7 | ||
|
|
327c0c12b5 | ||
|
|
dc6327683e | ||
|
|
2adea22b46 | ||
|
|
4535ac053f | ||
|
|
12eeae3bdf | ||
|
|
b9a3b88ff9 | ||
|
|
9ac77c112e | ||
|
|
a335bf5fe6 | ||
|
|
67a1c4eaaf | ||
|
|
b6d899e4d2 | ||
|
|
efd760d0a2 | ||
|
|
1eda7e8b74 | ||
|
|
1ed383d466 | ||
|
|
eb3f087a56 | ||
|
|
a1f39c598e | ||
|
|
2dea23c4fb | ||
|
|
6c6f44136f | ||
|
|
6b63f6fcbd | ||
|
|
ec36d853d8 | ||
|
|
0a5b6bb390 | ||
|
|
d85f800dd9 | ||
|
|
5abdd93e35 | ||
|
|
6a8c859c2f | ||
|
|
e598f63fbb | ||
|
|
7ec84dd0a1 | ||
|
|
9939629b44 | ||
|
|
c3410fe342 | ||
|
|
c67cee2e95 | ||
|
|
f6680e791c | ||
|
|
4a6f326a23 | ||
|
|
9cb147d1dd | ||
|
|
25fd817f62 | ||
|
|
0409d0e521 | ||
|
|
aa790be2fa | ||
|
|
e7fdcad1fa | ||
|
|
f3a8693f08 | ||
|
|
4bdd72341c | ||
|
|
c07c5cdbf3 | ||
|
|
4167e7e210 | ||
|
|
abcd66b30d | ||
|
|
34c217d114 | ||
|
|
d470f32da2 | ||
|
|
d399605ea5 | ||
|
|
00e185cf52 | ||
|
|
02c9c4eded | ||
|
|
2f98f49fab | ||
|
|
cc74bf6c1f | ||
|
|
a986e168bc | ||
|
|
fbc0947e96 | ||
|
|
edce18f691 | ||
|
|
f638f7cf38 | ||
|
|
a760ea5fa2 | ||
|
|
bdb6b72284 | ||
|
|
9d626df7b8 | ||
|
|
9d8e47274b | ||
|
|
fcf5cb333e | ||
|
|
f83334b687 | ||
|
|
55e2c1c172 | ||
|
|
d06976118b | ||
|
|
8ba072fa76 | ||
|
|
2bcc11d41e | ||
|
|
54d3650fa1 | ||
|
|
27ae741581 | ||
|
|
9f79376203 | ||
|
|
c2102292fa | ||
|
|
5e62146ae3 | ||
|
|
d6468b7f91 | ||
|
|
833e61aa5c | ||
|
|
34047964fe | ||
|
|
dbc5ea02b2 | ||
|
|
d9ce376660 | ||
|
|
d0cb637e1b | ||
|
|
7b1791f45f | ||
|
|
48bd943382 | ||
|
|
26fa448b0c | ||
|
|
8778a3724c | ||
|
|
9fea357028 | ||
|
|
ca8a3eeaaf | ||
|
|
30e3972912 | ||
|
|
9a3ee96ea3 | ||
|
|
da3e157408 | ||
|
|
49c0872448 | ||
|
|
4ace9c24f0 | ||
|
|
c1b08f6704 | ||
|
|
07764b251d | ||
|
|
c4fd6d1102 | ||
|
|
5916b4abd2 | ||
|
|
31375eb909 | ||
|
|
c4527681d2 | ||
|
|
43414393af | ||
|
|
3d7a6edce0 | ||
|
|
cbb6008288 | ||
|
|
3994102d7b | ||
|
|
908e69151b | ||
|
|
7cb819a69b | ||
|
|
6305870896 | ||
|
|
be20e02dec | ||
|
|
78519944fe | ||
|
|
5aec26c461 | ||
|
|
7bea82b2b8 | ||
|
|
9cd9f42fa1 | ||
|
|
bfb7098335 | ||
|
|
acc1661473 | ||
|
|
5dc928066a | ||
|
|
6864865fd6 | ||
|
|
3f519e6b89 | ||
|
|
eff5ec9b75 | ||
|
|
aa662e8575 | ||
|
|
bfe7d23dd1 | ||
|
|
c96c590d0c | ||
|
|
4498a2be50 | ||
|
|
0680f82e91 | ||
|
|
c1f6772e6b | ||
|
|
8c35f8f296 | ||
|
|
4c3555651b | ||
|
|
1929844aab | ||
|
|
b7511f7fda | ||
|
|
184fa20444 | ||
|
|
5c8d2c08df | ||
|
|
298e28ff96 | ||
|
|
fef11f98cf | ||
|
|
9fb923aa8d | ||
|
|
e921fcc54c | ||
|
|
c454aef30f | ||
|
|
228f0a3ecb | ||
|
|
bb665e7140 | ||
|
|
164e87c291 | ||
|
|
40267fd013 | ||
|
|
c52d4b3da1 | ||
|
|
0537685dc7 | ||
|
|
8751681571 | ||
|
|
0ab5263f53 | ||
|
|
ca4e4659f6 | ||
|
|
78d3a9d68d | ||
|
|
caf5f88c65 | ||
|
|
0680e94115 | ||
|
|
cb6ee9867d | ||
|
|
cfd873e223 | ||
|
|
7c73b36d4a | ||
|
|
c95edb57d9 | ||
|
|
5da09b299e | ||
|
|
88f8ddceef | ||
|
|
996021a83a | ||
|
|
7b6aa02efe | ||
|
|
808f5e54f8 | ||
|
|
ac879f9e21 | ||
|
|
26000aace1 | ||
|
|
06630f323d |
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
build*
|
||||
*~
|
||||
.*.swp
|
||||
*.orig
|
||||
*.rej
|
||||
377
README
377
README
@@ -1,89 +1,59 @@
|
||||
.8MMMMMMMM MMMMMMMM8.
|
||||
MMM77$$$$$$7MM MM$$$$$$$$$MMM
|
||||
MM$$$$$$$$$$$$M M$$$$$$$$$$$$MM
|
||||
MO7$$$$$8$$$$$MMM$$$$$N7$$$$7DM
|
||||
M7$$$$$$$M7$$MMM$$7M$$$$$$$7M.
|
||||
M7$$$$$$$$MMMMMMM$$$$$$$$7M.
|
||||
MM$$$$$$7MMMMMMM$$$$$$$MM
|
||||
.MM$7MMMMMMMMMMMMM7$MM.
|
||||
.MM8ZZZMMZZZZZZZMZZZ$MM.
|
||||
.MOZZZZMMZZZZZZZZZM8ZZZZMM
|
||||
MZZMMMZZZZ8MMMMM$ZZZ$MMZZMM
|
||||
.MMMMMZZZZZZZZMMMZZZZZZZMMMMM:
|
||||
M8ZZMMZZZZZZZZNMZZZZZZZZZMMZZMM
|
||||
MZZZZMZZZZZZZZZMMMZZZZZZZZ8MZZZMM
|
||||
.MZZZZMZZZZZZZZZMMMZZZZZZZZMMZZZ8M
|
||||
.MZZZMMMZZZZZZZMMMMM$ZZZZZ$MMZZZMM
|
||||
MMZZMMMMMM8MMNZZZZZ8MMMMMMMMMZZM
|
||||
MMMMZMMMMMMZZZZZZZZZMMMM$ZZZMM.
|
||||
MMZZZZZMMMZZZZZZZZZMMMZZZZZMM
|
||||
MZZZZZZZMNZZZZZZZMMZZZZZZZM.
|
||||
MMMMMZZZZZZZZZMMMM.
|
||||
.MMDZZZZZZZMMD
|
||||
.MMMMMMMM,
|
||||
....
|
||||
|
||||
Quick links
|
||||
===========
|
||||
Git repository web frontend:
|
||||
http://git.yoctoproject.org/cgit/cgit.cgi/meta-raspberrypi/
|
||||
Mailing list (yocto mailing list):
|
||||
yocto@yoctoproject.org
|
||||
Issues management (redmine):
|
||||
http://redmine.gherzan.ro/projects/meta-raspberrypi
|
||||
|
||||
|
||||
Contents:
|
||||
=========
|
||||
1. OpenEmbedded BSP Layer - RaspberryPi
|
||||
2. Yocto BSP Layer - RaspberryPi
|
||||
2.A. Compressed deployed files
|
||||
2.B. GPU memory
|
||||
2.C. Add purchased license codecs
|
||||
2.D. Disable overscan
|
||||
2.E. Set overclocking options
|
||||
3. Contribution
|
||||
1. Description
|
||||
2. Yocto BSP Layer - Raspberry Pi
|
||||
2.A. How to use it
|
||||
2.B. Images
|
||||
3. Optional build configuration
|
||||
3.A. Compressed deployed files
|
||||
3.B. GPU memory
|
||||
3.C. Add purchased license codecs
|
||||
3.D. Disable overscan
|
||||
3.E. Set overclocking options
|
||||
3.F. Video camera support with V4L2 drivers
|
||||
3.G. Enable offline compositing support
|
||||
3.H. Enable kgdb over console support
|
||||
3.I. Boot to U-Boot
|
||||
3.J. Image with Initramfs
|
||||
3.K. Device tree support
|
||||
3.L. Enable SPI bus
|
||||
3.M. Enable I2C
|
||||
3.N. Enable PiTFT support
|
||||
3.O. Enable UART support
|
||||
4. Extra apps
|
||||
4.A. omxplayer
|
||||
5. Board Configuration
|
||||
5.A. Audio Routing
|
||||
6. Source code and mirrors
|
||||
7. Contribution
|
||||
7.A. Mailing List
|
||||
7.B. Redmine
|
||||
8. Maintainers
|
||||
|
||||
|
||||
|
||||
1. OpenEmbedded BSP Layer - RaspberryPi
|
||||
=======================================
|
||||
1. Description
|
||||
==============
|
||||
|
||||
This is the general hardware specific BSP overlay for the RaspberryPi device.
|
||||
It should be used with openembedded-core (not old-style org.openembedded.dev).
|
||||
|
||||
More information can be found at:
|
||||
|
||||
http://www.raspberrypi.org/ (Official Site)
|
||||
http://www.distant-earth.com/ (My Site)
|
||||
|
||||
Build scripts patched to support making a firmware image for the RaspberryPi
|
||||
with Angstrom can be found at:
|
||||
|
||||
http://github.com/Angstrom-distribution/setup-scripts
|
||||
|
||||
When not depending on meta-openembedded and not using systemd, you may need to
|
||||
mask few recipes requiring systemd or other recipes not included in your
|
||||
distribution of choice.
|
||||
|
||||
You can achieve this by adding something like the following to local.conf:
|
||||
|
||||
BBMASK = "meta-raspberrypi/recipes-multimedia/libav|\
|
||||
meta-raspberrypi/recipes-core/systemd"
|
||||
|
||||
You can adjust the BBMASK for any .bbappends that your distribution does not
|
||||
contain recipes for.
|
||||
|
||||
The core BSP part of meta-raspberrypi should work with different
|
||||
OpenEmbedded/Yocto distributions and layer stacks, such as:
|
||||
|
||||
* Distro-less (only with OE-Core).
|
||||
* Angstrom (main focus of testing).
|
||||
* Yocto/Poky.
|
||||
|
||||
This layer in its entirety depends on:
|
||||
|
||||
URI: git://git.openembedded.org/openembedded-core
|
||||
branch: master
|
||||
revision: HEAD
|
||||
|
||||
URI: git://git.openembedded.org/meta-openembedded
|
||||
branch: master
|
||||
revision: HEAD
|
||||
|
||||
|
||||
* Angstrom.
|
||||
* Yocto/Poky (main focus of testing).
|
||||
|
||||
2. Yocto BSP Layer - RaspberryPi
|
||||
================================
|
||||
@@ -95,30 +65,53 @@ branch: master
|
||||
revision: HEAD
|
||||
|
||||
URI: git://git.openembedded.org/meta-openembedded
|
||||
layers: meta-oe, meta-multimedia
|
||||
branch: master
|
||||
revision: HEAD
|
||||
|
||||
How to use it:
|
||||
|
||||
1. source poky/oe-init-build-env rpi-build
|
||||
2. Add needed layers to bblayers.conf:
|
||||
2.A. How to use it
|
||||
==================
|
||||
a. source poky/oe-init-build-env rpi-build
|
||||
b. Add needed layer to bblayers.conf:
|
||||
- meta-raspberrypi
|
||||
- meta-openembedded/meta-oe
|
||||
3 Set MACHINE to raspberrypi in local.conf
|
||||
4. bitbake rpi-hwup-image
|
||||
5. dd to a SD card the generated sdimg file (use xzcat if rpi-sdimg.xz is used)
|
||||
6. Boot your RPI.
|
||||
c. Set MACHINE in local.conf to one of the supported boards:
|
||||
- raspberrypi
|
||||
- raspberrypi0
|
||||
- raspberrypi2
|
||||
- raspberrypi3
|
||||
d. bitbake rpi-hwup-image
|
||||
e. dd to a SD card the generated sdimg file (use xzcat if rpi-sdimg.xz is used)
|
||||
f. Boot your RPI.
|
||||
|
||||
2.A. Optional - compressed deployed files:
|
||||
==========================================
|
||||
2.B. Images
|
||||
-===========
|
||||
* rpi-hwup-image
|
||||
Hardware up image
|
||||
* rpi-basic-image
|
||||
Based on rpi-hwup-image with some added features (ex: splash)
|
||||
* rpi-test-image
|
||||
Image based on rpi-basic-image which includes most of the packages in this
|
||||
layer and some media samples.
|
||||
|
||||
3. Optional build configuration
|
||||
===============================
|
||||
|
||||
There are a set of ways in which a user can influence different paramenters of the build.
|
||||
We list here the ones that are closely related to this BSP or specific to it. For the rest
|
||||
please check: http://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html
|
||||
|
||||
3.A. Compressed deployed files
|
||||
==============================
|
||||
1. Overwrite IMAGE_FSTYPES in local.conf
|
||||
IMAGE_FSTYPES = "tar.bz2 ext3.xz rpi-sdimg.xz
|
||||
IMAGE_FSTYPES = "tar.bz2 ext3.xz"
|
||||
2. Overwrite SDIMG_ROOTFS_TYPE in local.conf
|
||||
SDIMG_ROOTFS_TYPE = "ext3.xz"
|
||||
SDIMG_ROOTFS_TYPE = "ext3.xz"
|
||||
3. Overwrite SDIMG_COMPRESSION in local.conf
|
||||
SDIMG_COMPRESSION = "xz"
|
||||
*Accommodate the values above to your own needs (ex: ext3 / ext4).
|
||||
|
||||
2.B. Optional - GPU memory:
|
||||
===========================
|
||||
3.B. GPU memory
|
||||
===============
|
||||
Variable : Details
|
||||
GPU_MEM : GPU memory in megabyte. Sets the memory split between the ARM and
|
||||
GPU. ARM gets the remaining memory. Min 16. Default 64.
|
||||
@@ -126,9 +119,11 @@ GPU_MEM_256 : GPU memory in megabyte for the 256MB Raspberry Pi. Ignored by the
|
||||
512MB RP. Overrides gpu_mem. Max 192. Default not set.
|
||||
GPU_MEM_512 : GPU memory in megabyte for the 512MB Raspberry Pi. Ignored by the
|
||||
256MB RP. Overrides gpu_mem. Max 448. Default not set.
|
||||
GPU_MEM_1024: GPU memory in megabyte for the 1024MB Raspberry Pi. Ignored by the
|
||||
256MB/512MB RP. Overrides gpu_mem. Max 944. Default not set.
|
||||
|
||||
2.C.Optional - Add purchased license codecs:
|
||||
============================================
|
||||
3.C. Add purchased license codecs
|
||||
=================================
|
||||
To add you own licenses use variables KEY_DECODE_MPG2 and KEY_DECODE_WVC1 in
|
||||
local.conf. Example:
|
||||
KEY_DECODE_MPG2 = "12345678"
|
||||
@@ -136,15 +131,15 @@ KEY_DECODE_WVC1 = "12345678"
|
||||
You can supply more licenses separated by comma. Example:
|
||||
KEY_DECODE_WVC1 = "0x12345678,0xabcdabcd,0x87654321"
|
||||
|
||||
2.D. Optional - Disable overscan:
|
||||
=================================
|
||||
3.D. Disable overscan
|
||||
=====================
|
||||
By default the GPU adds a black border around the video output to compensate for
|
||||
TVs which cut off part of the image. To disable this set this variable in
|
||||
local.conf:
|
||||
DISALE_OVERSCAN = "0"
|
||||
DISABLE_OVERSCAN = "1"
|
||||
|
||||
2.E. Optional - Set overclocking options:
|
||||
=========================================
|
||||
3.E. Set overclocking options
|
||||
=============================
|
||||
The Raspberry PI can be overclocked. As of now overclocking up to the "Turbo
|
||||
Mode" is officially supported by the raspbery and does not void warranty.
|
||||
Check the config.txt for a detailed description of options and modes. Example:
|
||||
@@ -154,29 +149,201 @@ CORE_FREQ = "500"
|
||||
SDRAM_FREQ = "500"
|
||||
OVER_VOLTAGE = "6"
|
||||
|
||||
3.F. Video camera support with V4L2 drivers
|
||||
===========================================
|
||||
Set this variable to enable support for the video camera (Linux 3.12.4+ required)
|
||||
VIDEO_CAMERA = "1"
|
||||
|
||||
3.G. Enable offline compositing support
|
||||
=======================================
|
||||
Set this variable to enable support for dispmanx offline compositing
|
||||
DISMANX_OFFLINE = "1"
|
||||
|
||||
3. Contributing
|
||||
This will enable the firmware to fall back to off-line compositing of
|
||||
Dispmanx elements. Normally the compositing is done on-line, during scanout,
|
||||
but cannot handle too many elements. With off-line enabled, an off-screen
|
||||
buffer is allocated for compositing. When scene complexity (number and sizes
|
||||
of elements) is high, compositing will happen off-line into the buffer.
|
||||
|
||||
Heavily recommended for Wayland/Weston.
|
||||
|
||||
See: http://wayland.freedesktop.org/raspberrypi.html
|
||||
|
||||
3.H. Enable kgdb over console support
|
||||
=====================================
|
||||
To add the kdbg over console (kgdboc) parameter to the kernel command line,
|
||||
set this variable in local.conf:
|
||||
ENABLE_KGDB = "1"
|
||||
|
||||
3.I. Boot to U-Boot
|
||||
===================
|
||||
To have u-boot load kernel image, set in your local.conf
|
||||
KERNEL_IMAGETYPE = "uImage"
|
||||
|
||||
This will make kernel.img be u-boot image which will load uImage.
|
||||
By default, kernel.img is the actual kernel image (ex. Image).
|
||||
|
||||
3.J. Image with Initramfs
|
||||
=========================
|
||||
To build an initramfs image :
|
||||
* Set this 3 kernel variables (in linux-raspberrypi.inc for example)
|
||||
- kernel_configure_variable BLK_DEV_INITRD y
|
||||
- kernel_configure_variable INITRAMFS_SOURCE ""
|
||||
- kernel_configure_variable RD_GZIP y
|
||||
* Set the yocto variables (in linux-raspberrypi.inc for example)
|
||||
- INITRAMFS_IMAGE = "<a name for your initramfs image>"
|
||||
- INITRAMFS_IMAGE_BUNDLE = "1"
|
||||
* Set the meta-rasberrypi variable (in raspberrypi.conf for example)
|
||||
- KERNEL_INITRAMFS = "-initramfs"
|
||||
|
||||
3.K. Device tree support
|
||||
=========================
|
||||
Device tree for RPi is only supported when using linux-raspberrypi 3.18+
|
||||
kernels.
|
||||
|
||||
* Set KERNEL_DEVICETREE (in conf/machine/raspberrypi.conf)
|
||||
- the trailer is added to the kernel image before kernel install task.
|
||||
While creating the SDCard image, this modified kernel is put on
|
||||
boot partition (as kernel.img) as well as DeviceTree blobs (.dtb files).
|
||||
|
||||
NOTE: KERNEL_DEVICETREE is default enabled for kernel >= 3.18 and always disabled for
|
||||
older kernel versions.
|
||||
|
||||
3.L. Enable SPI bus
|
||||
====================
|
||||
When using device tree kernels, set this variable to enable the SPI bus
|
||||
ENABLE_SPI_BUS = "1"
|
||||
|
||||
3.M. Enable I2C
|
||||
===============
|
||||
When using device tree kernels, set this variable to enable I2C
|
||||
ENABLE_I2C = "1"
|
||||
|
||||
3.N. Enable PiTFT support
|
||||
=========================
|
||||
Basic support for using PiTFT screens can be enabled by adding
|
||||
below in local.conf:
|
||||
|
||||
MACHINE_FEATURES += "pitft"
|
||||
- This will enable SPI bus and i2c device-trees, it will also setup
|
||||
framebuffer for console and x server on PiTFT.
|
||||
|
||||
NOTE: To get this working the overlay for the PiTFT model must be build,
|
||||
added and specified as well (dtoverlay=<driver> in config.txt)
|
||||
|
||||
Below is a list of currently supported PiTFT models in meta-raspberrypi,
|
||||
the modelname should be added as a MACHINE_FEATURES in local.conf like below:
|
||||
- MACHINE_FEATURES += "pitft <modelname>"
|
||||
|
||||
List of currently supported models:
|
||||
- pitft22
|
||||
- pitft28r
|
||||
|
||||
3.O. Enable UART
|
||||
===============
|
||||
|
||||
To contribute to this layer you should send the patches for review to the
|
||||
mailing list.
|
||||
RaspberryPi 1, 2 and CM will have UART console enabled by default.
|
||||
|
||||
Mailing list:
|
||||
RaspberryPi 3 does not have the UART enabled by default because this needs a
|
||||
fixed core frequency and enable_uart wil set it to the minimum. Certain
|
||||
operations - 60fps h264 decode, high quality deinterlace - which aren't
|
||||
performed on the ARM may be affected, and we wouldn't want to do that to users
|
||||
who don't want to use the serial port. Users who want serial console support on
|
||||
RaspberryPi3 will have to explicitely set in local.conf: ENABLE_UART = "1".
|
||||
|
||||
https://lists.yoctoproject.org/listinfo/yocto
|
||||
Ref.: https://github.com/raspberrypi/firmware/issues/553
|
||||
https://github.com/RPi-Distro/repo/issues/22
|
||||
|
||||
Source code:
|
||||
4. Extra apps
|
||||
=============
|
||||
|
||||
4.A. omxplayer
|
||||
==============
|
||||
omxplayer depends on libav which has a commercial license. So in order to be
|
||||
able to compile omxplayer you will need to whiteflag the commercial license
|
||||
adding to you local.conf:
|
||||
LICENSE_FLAGS_WHITELIST = "commercial"
|
||||
|
||||
5. Board Configuration
|
||||
======================
|
||||
|
||||
5.A. Audio Routing
|
||||
==================
|
||||
To load audio driver
|
||||
|
||||
modprobe snd-bcm2835
|
||||
|
||||
To test audio playback
|
||||
|
||||
e.g. aplay test.wav
|
||||
|
||||
Note that without HDMI connected this emits audio from the 3.5in jack connector
|
||||
as expected. However With an HDMI display connected there is no audio output from
|
||||
the jack connector.
|
||||
|
||||
To force the audio routing via the 3.5in jack connector use
|
||||
|
||||
amixer cset numid=3 1
|
||||
|
||||
Options to amixer cset are:
|
||||
|
||||
0=auto
|
||||
1=headphones
|
||||
2=hdmi
|
||||
|
||||
6. Source code and mirrors
|
||||
==========================
|
||||
|
||||
Main repo:
|
||||
git://git.yoctoproject.org/meta-raspberrypi
|
||||
http://git.yoctoproject.org/git/meta-raspberrypi
|
||||
https://github.com/djwillis/meta-raspberrypi
|
||||
|
||||
When sending patches, please use something like:
|
||||
Github mirror:
|
||||
https://github.com/agherzan/meta-raspberrypi
|
||||
|
||||
git send-email --to yocto@yoctoproject.org \
|
||||
--subject-prefix='meta-raspberrypi][PATCH'
|
||||
Bitbucket mirror:
|
||||
https://bitbucket.org/agherzan/meta-raspberrypi
|
||||
|
||||
|
||||
Layer maintainers: John Willis <John.Willis at distant-earth.com>
|
||||
Andrei Gherzan <andrei at gherzan.ro>
|
||||
7. Contributing
|
||||
===============
|
||||
|
||||
7.A. Mailing list
|
||||
=================
|
||||
The main communication tool we use is a mailing list:
|
||||
yocto@yoctoproject.org
|
||||
https://lists.yoctoproject.org/listinfo/yocto
|
||||
|
||||
Feel free to ask any kind of questions but always prepend your email subject
|
||||
with "[meta-raspberrypi]". This is because we use the 'yocto' mailing list and
|
||||
not a perticular 'meta-raspberrypi' mailing list.
|
||||
|
||||
To contribute to this layer you should send the patches for review to the
|
||||
above specified mailing list.
|
||||
The patches should be compliant with the openembedded patch guidelines:
|
||||
http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
|
||||
|
||||
|
||||
When creating patches, please use something like:
|
||||
|
||||
git format-patch -s --subject-prefix='meta-raspberrypi][PATCH' origin
|
||||
|
||||
When sending patches to mailing list, please use something like:
|
||||
|
||||
git send-email --to yocto@yoctoproject.org <generated patch>
|
||||
|
||||
7.B. Github issues
|
||||
==================
|
||||
In order to manage and trace the meta-raspberrypi issues, we use github issues:
|
||||
https://github.com/agherzan/meta-raspberrypi/issues
|
||||
|
||||
If you push patches which have a github issue associated, please provide the
|
||||
issue number in the commit log just before "Signed-off-by" line(s). Example line
|
||||
for a bug:
|
||||
[Issue #13]
|
||||
|
||||
|
||||
8. Maintainers
|
||||
==============
|
||||
|
||||
Andrei Gherzan <andrei at gherzan.ro>
|
||||
|
||||
39
classes/linux-raspberrypi-base.bbclass
Normal file
39
classes/linux-raspberrypi-base.bbclass
Normal file
@@ -0,0 +1,39 @@
|
||||
inherit linux-kernel-base
|
||||
|
||||
|
||||
def get_dts(d, ver):
|
||||
staging_dir = d.getVar("STAGING_KERNEL_BUILDDIR", True)
|
||||
dts = d.getVar("KERNEL_DEVICETREE", True)
|
||||
|
||||
# d.getVar() might return 'None' as a normal string
|
||||
# leading to 'is None' check isn't enough.
|
||||
# TODO: Investigate if this is a bug in bitbake
|
||||
if ver is None or ver == "None":
|
||||
''' if 'ver' isn't set try to grab the kernel version
|
||||
from the kernel staging '''
|
||||
ver = get_kernelversion_file(staging_dir)
|
||||
|
||||
if ver is not None:
|
||||
min_ver = ver.split('.', 3)
|
||||
else:
|
||||
return dts
|
||||
|
||||
# Always turn off device tree support for kernel's < 3.18
|
||||
try:
|
||||
if int(min_ver[0]) <= 3:
|
||||
if int(min_ver[1]) < 18:
|
||||
dts = ""
|
||||
except IndexError:
|
||||
min_ver = None
|
||||
|
||||
return dts
|
||||
|
||||
|
||||
def split_overlays(d, out):
|
||||
dts = get_dts(d, None)
|
||||
if out:
|
||||
overlays = oe.utils.str_filter_out('\S+\-overlay\.dtb$', dts, d)
|
||||
else:
|
||||
overlays = oe.utils.str_filter('\S+\-overlay\.dtb$', dts, d)
|
||||
|
||||
return overlays
|
||||
@@ -1,4 +1,5 @@
|
||||
inherit image_types
|
||||
inherit linux-raspberrypi-base
|
||||
|
||||
#
|
||||
# Create an image that can by written onto a SD card using dd.
|
||||
@@ -13,60 +14,74 @@ inherit image_types
|
||||
# Default Free space = 1.3x
|
||||
# Use IMAGE_OVERHEAD_FACTOR to add more space
|
||||
# <--------->
|
||||
# 4MiB 20MiB SDIMG_ROOTFS
|
||||
# 4MiB 40MiB SDIMG_ROOTFS
|
||||
# <-----------------------> <----------> <---------------------->
|
||||
# ------------------------ ------------ ------------------------
|
||||
# | IMAGE_ROOTFS_ALIGNMENT | BOOT_SPACE | ROOTFS_SIZE |
|
||||
# ------------------------ ------------ ------------------------
|
||||
# ^ ^ ^ ^
|
||||
# | | | |
|
||||
# 0 4MiB 4MiB + 20MiB 4MiB + 20Mib + SDIMG_ROOTFS
|
||||
# 0 4MiB 4MiB + 40MiB 4MiB + 40Mib + SDIMG_ROOTFS
|
||||
|
||||
# This image depends on the rootfs image
|
||||
IMAGE_TYPEDEP_rpi-sdimg = "${SDIMG_ROOTFS_TYPE}"
|
||||
|
||||
# Set kernel and boot loader
|
||||
IMAGE_BOOTLOADER ?= "bcm2835-bootfiles"
|
||||
|
||||
# Set initramfs extension
|
||||
KERNEL_INITRAMFS ?= ""
|
||||
|
||||
# Kernel image name
|
||||
SDIMG_KERNELIMAGE_raspberrypi ?= "kernel.img"
|
||||
SDIMG_KERNELIMAGE_raspberrypi2 ?= "kernel7.img"
|
||||
|
||||
# Boot partition volume id
|
||||
BOOTDD_VOLUME_ID ?= "${MACHINE}"
|
||||
|
||||
# Boot partition size [in KiB] (will be rounded up to IMAGE_ROOTFS_ALIGNMENT)
|
||||
BOOT_SPACE ?= "20480"
|
||||
BOOT_SPACE ?= "40960"
|
||||
|
||||
# Set alignment to 4MB [in KiB]
|
||||
IMAGE_ROOTFS_ALIGNMENT = "4096"
|
||||
|
||||
# Use an uncompressed ext3 by default as rootfs
|
||||
SDIMG_ROOTFS_TYPE ?= "ext3"
|
||||
SDIMG_ROOTFS = "${IMAGE_NAME}.rootfs.${SDIMG_ROOTFS_TYPE}"
|
||||
SDIMG_ROOTFS = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.${SDIMG_ROOTFS_TYPE}"
|
||||
|
||||
IMAGE_DEPENDS_rpi-sdimg = " \
|
||||
parted-native \
|
||||
mtools-native \
|
||||
dosfstools-native \
|
||||
virtual/kernel \
|
||||
virtual/kernel:do_deploy \
|
||||
${IMAGE_BOOTLOADER} \
|
||||
${@bb.utils.contains('KERNEL_IMAGETYPE', 'uImage', 'u-boot', '',d)} \
|
||||
"
|
||||
|
||||
# SD card image name
|
||||
SDIMG = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.rpi-sdimg"
|
||||
|
||||
# Compression method to apply to SDIMG after it has been created. Supported
|
||||
# compression formats are "gzip", "bzip2" or "xz". The original .rpi-sdimg file
|
||||
# is kept and a new compressed file is created if one of these compression
|
||||
# formats is chosen. If SDIMG_COMPRESSION is set to any other value it is
|
||||
# silently ignored.
|
||||
#SDIMG_COMPRESSION ?= ""
|
||||
|
||||
# Additional files and/or directories to be copied into the vfat partition from the IMAGE_ROOTFS.
|
||||
FATPAYLOAD ?= ""
|
||||
|
||||
IMAGEDATESTAMP = "${@time.strftime('%Y.%m.%d',time.gmtime())}"
|
||||
|
||||
IMAGE_CMD_rpi-sdimg () {
|
||||
|
||||
# Align partitions
|
||||
BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1)
|
||||
BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE_ALIGNED} - ${BOOT_SPACE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT})
|
||||
ROOTFS_SIZE=`du -bks ${SDIMG_ROOTFS} | awk '{print $1}'`
|
||||
# Round up RootFS size to the alignment size as well
|
||||
ROOTFS_SIZE_ALIGNED=$(expr ${ROOTFS_SIZE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1)
|
||||
ROOTFS_SIZE_ALIGNED=$(expr ${ROOTFS_SIZE_ALIGNED} - ${ROOTFS_SIZE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT})
|
||||
SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} + ${BOOT_SPACE_ALIGNED} + ${ROOTFS_SIZE_ALIGNED})
|
||||
SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} + ${BOOT_SPACE_ALIGNED} + $ROOTFS_SIZE)
|
||||
|
||||
echo "Creating filesystem with Boot partition ${BOOT_SPACE_ALIGNED} KiB and RootFS ${ROOTFS_SIZE_ALIGNED} KiB"
|
||||
echo "Creating filesystem with Boot partition ${BOOT_SPACE_ALIGNED} KiB and RootFS $ROOTFS_SIZE KiB"
|
||||
|
||||
# Check if we are building with device tree support
|
||||
DTS="${@get_dts(d, None)}"
|
||||
|
||||
# Initialize sdcard image file
|
||||
dd if=/dev/zero of=${SDIMG} bs=1024 count=0 seek=${SDIMG_SIZE}
|
||||
@@ -82,9 +97,38 @@ IMAGE_CMD_rpi-sdimg () {
|
||||
|
||||
# Create a vfat image with boot files
|
||||
BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG} unit b print | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }')
|
||||
rm -f ${WORKDIR}/boot.img
|
||||
mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::kernel.img
|
||||
if test -n "${DTS}"; then
|
||||
# Device Tree Overlays are assumed to be suffixed by '-overlay.dtb' string and will be put in a dedicated folder
|
||||
DT_OVERLAYS="${@split_overlays(d, 0)}"
|
||||
DT_ROOT="${@split_overlays(d, 1)}"
|
||||
|
||||
# Copy board device trees to root folder
|
||||
for DTB in ${DT_ROOT}; do
|
||||
DTB_BASE_NAME=`basename ${DTB} .dtb`
|
||||
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB_BASE_NAME}.dtb ::${DTB_BASE_NAME}.dtb
|
||||
done
|
||||
|
||||
# Copy device tree overlays to dedicated folder
|
||||
mmd -i ${WORKDIR}/boot.img overlays
|
||||
for DTB in ${DT_OVERLAYS}; do
|
||||
DTB_BASE_NAME=`basename ${DTB} .dtb`
|
||||
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB_BASE_NAME}.dtb ::overlays/${DTB_BASE_NAME}.dtb
|
||||
done
|
||||
fi
|
||||
case "${KERNEL_IMAGETYPE}" in
|
||||
"uImage")
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.bin ::${SDIMG_KERNELIMAGE}
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::uImage
|
||||
;;
|
||||
*)
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::${SDIMG_KERNELIMAGE}
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -n ${FATPAYLOAD} ] ; then
|
||||
echo "Copying payload into VFAT"
|
||||
@@ -95,8 +139,8 @@ IMAGE_CMD_rpi-sdimg () {
|
||||
fi
|
||||
|
||||
# Add stamp file
|
||||
echo "${IMAGE_NAME}-${IMAGEDATESTAMP}" > ${WORKDIR}/image-version-info
|
||||
mcopy -i ${WORKDIR}/boot.img -v ${WORKDIR}//image-version-info ::
|
||||
echo "${IMAGE_NAME}" > ${WORKDIR}/image-version-info
|
||||
mcopy -i ${WORKDIR}/boot.img -v ${WORKDIR}/image-version-info ::
|
||||
|
||||
# Burn Partitions
|
||||
dd if=${WORKDIR}/boot.img of=${SDIMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync
|
||||
@@ -107,6 +151,19 @@ IMAGE_CMD_rpi-sdimg () {
|
||||
else
|
||||
dd if=${SDIMG_ROOTFS} of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync
|
||||
fi
|
||||
|
||||
# Optionally apply compression
|
||||
case "${SDIMG_COMPRESSION}" in
|
||||
"gzip")
|
||||
gzip -k9 "${SDIMG}"
|
||||
;;
|
||||
"bzip2")
|
||||
bzip2 -k9 "${SDIMG}"
|
||||
;;
|
||||
"xz")
|
||||
xz -k "${SDIMG}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
ROOTFS_POSTPROCESS_COMMAND += " rpi_generate_sysctl_config ; "
|
||||
|
||||
@@ -7,7 +7,7 @@ BBFILES += "${LAYERDIR}/recipes*/*/*.bb \
|
||||
|
||||
BBFILE_COLLECTIONS += "raspberrypi"
|
||||
BBFILE_PATTERN_raspberrypi := "^${LAYERDIR}/"
|
||||
BBFILE_PRIORITY_raspberrypi = "6"
|
||||
BBFILE_PRIORITY_raspberrypi = "9"
|
||||
|
||||
# Additional license directories.
|
||||
LICENSE_PATH += "${LAYERDIR}/files/custom-licenses"
|
||||
|
||||
53
conf/machine/include/rpi-base.inc
Normal file
53
conf/machine/include/rpi-base.inc
Normal file
@@ -0,0 +1,53 @@
|
||||
include conf/machine/include/rpi-default-settings.inc
|
||||
include conf/machine/include/rpi-default-versions.inc
|
||||
include conf/machine/include/rpi-default-providers.inc
|
||||
|
||||
SOC_FAMILY = "rpi"
|
||||
include conf/machine/include/soc-family.inc
|
||||
|
||||
IMAGE_FSTYPES ?= "tar.bz2 ext3 rpi-sdimg"
|
||||
|
||||
XSERVER = " \
|
||||
xserver-xorg \
|
||||
xf86-input-evdev \
|
||||
xf86-input-mouse \
|
||||
xf86-input-keyboard \
|
||||
xf86-video-fbdev \
|
||||
"
|
||||
|
||||
# Really supported starting from linux-raspberrypi 3.18.y only
|
||||
KERNEL_DEVICETREE ?= " \
|
||||
bcm2708-rpi-b.dtb \
|
||||
bcm2708-rpi-b-plus.dtb \
|
||||
bcm2709-rpi-2-b.dtb \
|
||||
bcm2710-rpi-3-b.dtb \
|
||||
\
|
||||
overlays/hifiberry-amp-overlay.dtb \
|
||||
overlays/hifiberry-dac-overlay.dtb \
|
||||
overlays/hifiberry-dacplus-overlay.dtb \
|
||||
overlays/hifiberry-digi-overlay.dtb \
|
||||
overlays/i2c-rtc-overlay.dtb \
|
||||
overlays/iqaudio-dac-overlay.dtb \
|
||||
overlays/iqaudio-dacplus-overlay.dtb \
|
||||
overlays/lirc-rpi-overlay.dtb \
|
||||
overlays/pitft22-overlay.dtb \
|
||||
overlays/pitft28-resistive-overlay.dtb \
|
||||
overlays/pps-gpio-overlay.dtb \
|
||||
overlays/rpi-ft5406-overlay.dtb \
|
||||
overlays/w1-gpio-overlay.dtb \
|
||||
overlays/w1-gpio-pullup-overlay.dtb \
|
||||
overlays/pi3-miniuart-bt-overlay.dtb \
|
||||
"
|
||||
KERNEL_IMAGETYPE ?= "Image"
|
||||
|
||||
MACHINE_FEATURES += "apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio"
|
||||
|
||||
# Raspberry Pi has no hardware clock
|
||||
MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc"
|
||||
|
||||
MACHINE_EXTRA_RRECOMMENDS += " kernel-modules"
|
||||
|
||||
# Set Raspberrypi splash image
|
||||
SPLASH = "psplash-raspberrypi"
|
||||
|
||||
IMAGE_BOOT_FILES ?= "bcm2835-bootfiles/* ${KERNEL_IMAGETYPE};${SDIMG_KERNELIMAGE}"
|
||||
@@ -1,7 +1,9 @@
|
||||
# RaspberryPi BSP default providers
|
||||
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-raspberrypi"
|
||||
PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
|
||||
PREFERRED_PROVIDER_virtual/kernel ?= "linux-raspberrypi"
|
||||
PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
|
||||
PREFERRED_PROVIDER_virtual/egl ?= "userland"
|
||||
PREFERRED_PROVIDER_virtual/libgles2 ?= "userland"
|
||||
PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-raspberrypi"
|
||||
PREFERRED_PROVIDER_virtual/libgl ?= "mesa-gl"
|
||||
PREFERRED_PROVIDER_virtual/mesa ?= "mesa-gl"
|
||||
PREFERRED_PROVIDER_jpeg ?= "jpeg"
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
# RaspberryPi BSP default versions
|
||||
|
||||
PREFERRED_VERSION_linux-raspberrypi ?= "4.1.%"
|
||||
|
||||
@@ -4,8 +4,12 @@ require conf/machine/include/arm/arch-armv6.inc
|
||||
|
||||
TUNEVALID[arm1176jzfs] = "Enable arm1176jzfs specific processor optimizations"
|
||||
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "arm1176jzfs", "-mtune=arm1176jzf-s", "", d)}"
|
||||
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "vfp", "-mfpu=vfp", "", d)}"
|
||||
|
||||
AVAILTUNES += "arm1176jzfs"
|
||||
TUNE_FEATURES_tune-arm1176jzfs = "${TUNE_FEATURES_tune-armv6} arm1176jzfs"
|
||||
AVAILTUNES += "arm1176jzfs arm1176jzfshf"
|
||||
ARMPKGARCH_tune-arm1176jzfs = "arm1176jzfs"
|
||||
ARMPKGARCH_tune-arm1176jzfshf = "arm1176jzfs"
|
||||
TUNE_FEATURES_tune-arm1176jzfs = "${TUNE_FEATURES_tune-armv6} arm1176jzfs"
|
||||
TUNE_FEATURES_tune-arm1176jzfshf = "${TUNE_FEATURES_tune-arm1176jzfs} callconvention-hard"
|
||||
PACKAGE_EXTRA_ARCHS_tune-arm1176jzfs = "${PACKAGE_EXTRA_ARCHS_tune-armv6}"
|
||||
PACKAGE_EXTRA_ARCHS_tune-arm1176jzfshf = "${PACKAGE_EXTRA_ARCHS_tune-armv6hf} arm1176jzfshf-vfp"
|
||||
|
||||
@@ -1,34 +1,12 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: RaspberryPi Development Board
|
||||
#@DESCRIPTION: Machine configuration for the RaspberryPi http://www.raspberrypi.org/ Board
|
||||
#@MAINTAINER: John Willis
|
||||
|
||||
include conf/machine/include/rpi-default-settings.inc
|
||||
include conf/machine/include/rpi-default-versions.inc
|
||||
include conf/machine/include/rpi-default-providers.inc
|
||||
DEFAULTTUNE ?= "arm1176jzfshf"
|
||||
|
||||
require conf/machine/include/tune-arm1176jzf-s.inc
|
||||
|
||||
IMAGE_FSTYPES ?= "tar.bz2 ext3 rpi-sdimg"
|
||||
include conf/machine/include/rpi-base.inc
|
||||
|
||||
SERIAL_CONSOLE = "115200 ttyAMA0"
|
||||
|
||||
MACHINE_KERNEL_PR = "r5"
|
||||
|
||||
XSERVER = " \
|
||||
xserver-xorg \
|
||||
xf86-input-evdev \
|
||||
xf86-input-mouse \
|
||||
xf86-input-keyboard \
|
||||
xf86-video-fbdev \
|
||||
"
|
||||
|
||||
KERNEL_IMAGETYPE = "Image"
|
||||
|
||||
MACHINE_FEATURES = "kernel26 apm usbgadget usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio"
|
||||
|
||||
#RaspberryPi has no hardware clock
|
||||
MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc"
|
||||
|
||||
MACHINE_EXTRA_RRECOMMENDS += " \
|
||||
kernel-modules \
|
||||
"
|
||||
UBOOT_MACHINE = "rpi_config"
|
||||
|
||||
8
conf/machine/raspberrypi0.conf
Normal file
8
conf/machine/raspberrypi0.conf
Normal file
@@ -0,0 +1,8 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: RaspberryPi Zero Development Board
|
||||
#@DESCRIPTION: Machine configuration for the RaspberryPi Zero board (https://www.raspberrypi.org/blog/raspberry-pi-zero)
|
||||
|
||||
MACHINEOVERRIDES = "raspberrypi:${MACHINE}"
|
||||
include conf/machine/raspberrypi.conf
|
||||
|
||||
SERIAL_CONSOLE = "115200 ttyAMA0"
|
||||
12
conf/machine/raspberrypi2.conf
Normal file
12
conf/machine/raspberrypi2.conf
Normal file
@@ -0,0 +1,12 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: RaspberryPi 2 Development Board
|
||||
#@DESCRIPTION: Machine configuration for the RaspberryPi 2
|
||||
|
||||
DEFAULTTUNE ?= "cortexa7thf-neon-vfpv4"
|
||||
|
||||
require conf/machine/include/tune-cortexa7.inc
|
||||
include conf/machine/include/rpi-base.inc
|
||||
|
||||
SERIAL_CONSOLE = "115200 ttyAMA0"
|
||||
|
||||
UBOOT_MACHINE = "rpi_2_config"
|
||||
11
conf/machine/raspberrypi3.conf
Normal file
11
conf/machine/raspberrypi3.conf
Normal file
@@ -0,0 +1,11 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: RaspberryPi 3 Development Board
|
||||
#@DESCRIPTION: Machine configuration for the RaspberryPi 3
|
||||
|
||||
MACHINEOVERRIDES = "raspberrypi2:${MACHINE}"
|
||||
|
||||
MACHINE_EXTRA_RRECOMMENDS += "linux-firmware-brcm43430"
|
||||
|
||||
include conf/machine/raspberrypi2.conf
|
||||
|
||||
SERIAL_CONSOLE = "115200 ttyS0"
|
||||
@@ -1,37 +0,0 @@
|
||||
DESCRIPTION = "Closed source binary files to help boot the ARM on the BCM2835."
|
||||
LICENSE = "Proprietary"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://LICENCE.broadcom;md5=e86e693d19572ee64cc8b17fb062faa9"
|
||||
|
||||
include ../common/firmware.inc
|
||||
|
||||
RDEPENDS_${PN} = "rpi-config"
|
||||
|
||||
COMPATIBLE_MACHINE = "raspberrypi"
|
||||
|
||||
SRC_URI = " \
|
||||
git://github.com/raspberrypi/firmware.git;protocol=git;branch=master \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/git/boot"
|
||||
|
||||
PR = "r3"
|
||||
|
||||
addtask deploy before do_package after do_install
|
||||
|
||||
do_deploy() {
|
||||
install -d ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles
|
||||
for i in *.elf ; do
|
||||
cp $i ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles
|
||||
done
|
||||
for i in *.dat ; do
|
||||
cp $i ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles
|
||||
done
|
||||
for i in *.bin ; do
|
||||
cp $i ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles
|
||||
done
|
||||
# Add stamp in deploy directory
|
||||
touch ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/${PN}-${PV}.stamp
|
||||
}
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
@@ -1,57 +0,0 @@
|
||||
DESCRIPTION = "Commented config.txt file for the Raspberry Pi. \
|
||||
The Raspberry Pi config.txt file is read by the GPU before \
|
||||
the ARM core is initialised. It can be used to set various \
|
||||
system configuration parameters."
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
|
||||
|
||||
COMPATIBLE_MACHINE = "raspberrypi"
|
||||
|
||||
SRCREV = "62bf3e9db62f547eb1a2a352dde957d2f94bd216"
|
||||
SRC_URI = "git://github.com/Evilpaul/RPi-config.git;protocol=git;branch=master \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
PR = "r3"
|
||||
|
||||
addtask deploy before do_package after do_install
|
||||
|
||||
do_deploy() {
|
||||
install -d ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles
|
||||
cp config.txt ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/
|
||||
if [ -n "${KEY_DECODE_MPG2}" ]; then
|
||||
sed -i '/#decode_MPG2/ c\decode_MPG2=${KEY_DECODE_MPG2}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
if [ -n "${KEY_DECODE_WVC1}" ]; then
|
||||
sed -i '/#decode_WVC1/ c\decode_MVC1=${KEY_DECODE_WVC1}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
if [ -n "${DISABLE_OVERSCAN}" ]; then
|
||||
sed -i '/#disable_overscan/ c\disable_overscan=${DISABLE_OVERSCAN}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
if [ -n "${ARM_FREQ}" ]; then
|
||||
sed -i '/#arm_freq/ c\arm_freq=${ARM_FREQ}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
if [ -n "${CORE_FREQ}" ]; then
|
||||
sed -i '/#core_freq/ c\core_freq=${CORE_FREQ}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
if [ -n "${SDRAM_FREQ}" ]; then
|
||||
sed -i '/#sdram_freq/ c\sdram_freq=${SDRAM_FREQ}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
if [ -n "${OVER_VOLTAGE}" ]; then
|
||||
sed -i '/#over_voltage/ c\over_voltage=${OVER_VOLTAGE}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
|
||||
# GPU memory
|
||||
if [ -n "${GPU_MEM}" ]; then
|
||||
sed -i '/#gpu_mem=/ c\gpu_mem=${GPU_MEM}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
if [ -n "${GPU_MEM_256}" ]; then
|
||||
sed -i '/#gpu_mem_256/ c\gpu_mem_256=${GPU_MEM_256}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
if [ -n "${GPU_MEM_512}" ]; then
|
||||
sed -i '/#gpu_mem_512/ c\gpu_mem_512=${GPU_MEM_512}' ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
}
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
@@ -1,6 +0,0 @@
|
||||
# 7/1/2013 firmware; this can be overridden from distro config
|
||||
RPIFW_SRCREV ?= "0ac68cce44d4550c251172e8524100090e8211fa"
|
||||
RPIFW_DATE ?= "20130107"
|
||||
|
||||
SRCREV = "${RPIFW_SRCREV}"
|
||||
PV = "${RPIFW_DATE}"
|
||||
39
recipes-bsp/bootfiles/bcm2835-bootfiles.bb
Normal file
39
recipes-bsp/bootfiles/bcm2835-bootfiles.bb
Normal file
@@ -0,0 +1,39 @@
|
||||
DESCRIPTION = "Closed source binary files to help boot the ARM on the BCM2835."
|
||||
LICENSE = "Proprietary"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://LICENCE.broadcom;md5=4a4d169737c0786fb9482bb6d30401d1"
|
||||
|
||||
inherit deploy
|
||||
|
||||
include recipes-bsp/common/firmware.inc
|
||||
|
||||
RDEPENDS_${PN} = "rpi-config"
|
||||
|
||||
COMPATIBLE_MACHINE = "raspberrypi"
|
||||
|
||||
S = "${RPIFW_S}/boot"
|
||||
|
||||
PR = "r3"
|
||||
|
||||
do_deploy() {
|
||||
install -d ${DEPLOYDIR}/${PN}
|
||||
|
||||
for i in ${S}/*.elf ; do
|
||||
cp $i ${DEPLOYDIR}/${PN}
|
||||
done
|
||||
for i in ${S}/*.dat ; do
|
||||
cp $i ${DEPLOYDIR}/${PN}
|
||||
done
|
||||
for i in ${S}/*.bin ; do
|
||||
cp $i ${DEPLOYDIR}/${PN}
|
||||
done
|
||||
|
||||
# Add stamp in deploy directory
|
||||
touch ${DEPLOYDIR}/${PN}/${PN}-${PV}.stamp
|
||||
}
|
||||
|
||||
addtask deploy before do_package after do_install
|
||||
do_deploy[dirs] += "${DEPLOYDIR}/${PN}"
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
|
||||
110
recipes-bsp/bootfiles/rpi-config_git.bb
Normal file
110
recipes-bsp/bootfiles/rpi-config_git.bb
Normal file
@@ -0,0 +1,110 @@
|
||||
DESCRIPTION = "Commented config.txt file for the Raspberry Pi. \
|
||||
The Raspberry Pi config.txt file is read by the GPU before \
|
||||
the ARM core is initialised. It can be used to set various \
|
||||
system configuration parameters."
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
|
||||
|
||||
COMPATIBLE_MACHINE = "raspberrypi"
|
||||
|
||||
SRCREV = "648ffc470824c43eb0d16c485f4c24816b32cd6f"
|
||||
SRC_URI = "git://github.com/Evilpaul/RPi-config.git;protocol=git;branch=master \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
PR = "r4"
|
||||
|
||||
PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
|
||||
PITFT22="${@bb.utils.contains("MACHINE_FEATURES", "pitft22", "1", "0", d)}"
|
||||
PITFT28r="${@bb.utils.contains("MACHINE_FEATURES", "pitft28r", "1", "0", d)}"
|
||||
|
||||
inherit deploy
|
||||
|
||||
do_deploy() {
|
||||
install -d ${DEPLOYDIR}/bcm2835-bootfiles
|
||||
|
||||
cp ${S}/config.txt ${DEPLOYDIR}/bcm2835-bootfiles/
|
||||
|
||||
if [ -n "${KEY_DECODE_MPG2}" ]; then
|
||||
sed -i '/#decode_MPG2/ c\decode_MPG2=${KEY_DECODE_MPG2}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
if [ -n "${KEY_DECODE_WVC1}" ]; then
|
||||
sed -i '/#decode_WVC1/ c\decode_WVC1=${KEY_DECODE_WVC1}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
if [ -n "${DISABLE_OVERSCAN}" ]; then
|
||||
sed -i '/#disable_overscan/ c\disable_overscan=${DISABLE_OVERSCAN}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
if [ -n "${ARM_FREQ}" ]; then
|
||||
sed -i '/#arm_freq/ c\arm_freq=${ARM_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
if [ -n "${CORE_FREQ}" ]; then
|
||||
sed -i '/#core_freq/ c\core_freq=${CORE_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
if [ -n "${SDRAM_FREQ}" ]; then
|
||||
sed -i '/#sdram_freq/ c\sdram_freq=${SDRAM_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
if [ -n "${OVER_VOLTAGE}" ]; then
|
||||
sed -i '/#over_voltage/ c\over_voltage=${OVER_VOLTAGE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
|
||||
# GPU memory
|
||||
if [ -n "${GPU_MEM}" ]; then
|
||||
sed -i '/#gpu_mem=/ c\gpu_mem=${GPU_MEM}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
if [ -n "${GPU_MEM_256}" ]; then
|
||||
sed -i '/#gpu_mem_256/ c\gpu_mem_256=${GPU_MEM_256}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
if [ -n "${GPU_MEM_512}" ]; then
|
||||
sed -i '/#gpu_mem_512/ c\gpu_mem_512=${GPU_MEM_512}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
if [ -n "${GPU_MEM_1024}" ]; then
|
||||
sed -i '/#gpu_mem_1024/ c\gpu_mem_1024=${GPU_MEM_1024}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
|
||||
# Video camera support
|
||||
if [ -n "${VIDEO_CAMERA}" ]; then
|
||||
echo "# Enable video camera" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
echo "start_x=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
|
||||
# Offline compositing support
|
||||
if [ -n "${DISPMANX_OFFLINE}" ]; then
|
||||
echo "# Enable offline compositing" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
echo "dispmanx_offline=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
|
||||
# SPI bus support
|
||||
if [ -n "${ENABLE_SPI_BUS}" ] || [ "${PITFT}" = "1" ]; then
|
||||
echo "# Enable SPI bus" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
echo "dtparam=spi=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
|
||||
if [ -n "${ENABLE_I2C}" ] || [ "${PITFT}" = "1" ]; then
|
||||
echo "# Enable I2C" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
echo "dtparam=i2c1=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
echo "dtparam=i2c_arm=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
|
||||
# PiTFT22 display support
|
||||
if [ "${PITFT22}" = "1" ]; then
|
||||
echo "# Enable PITFT22 display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
echo "dtoverlay=pitft22,rotate=270,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
|
||||
if [ "${PITFT28r}" = "1" ]; then
|
||||
echo "# Enable PITFT28r display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
echo "dtoverlay=pitft28-resistive,rotate=90,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
|
||||
# UART support
|
||||
if [ "${ENABLE_UART}" = "1" ]; then
|
||||
echo "# Enable UART" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
echo "enable_uart=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
}
|
||||
|
||||
addtask deploy before do_package after do_install
|
||||
do_deploy[dirs] += "${DEPLOYDIR}/bcm2835-bootfiles"
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
8
recipes-bsp/common/firmware.inc
Normal file
8
recipes-bsp/common/firmware.inc
Normal file
@@ -0,0 +1,8 @@
|
||||
RPIFW_SRCREV ?= "390f53ed0fd79df274bdcc81d99e09fa262f03ab"
|
||||
RPIFW_DATE ?= "20160622"
|
||||
RPIFW_SRC_URI ?= "git://github.com/raspberrypi/firmware.git;protocol=git;branch=master"
|
||||
RPIFW_S ?= "${WORKDIR}/git"
|
||||
|
||||
SRC_URI = "${RPIFW_SRC_URI}"
|
||||
SRCREV = "${RPIFW_SRCREV}"
|
||||
PV = "${RPIFW_DATE}"
|
||||
@@ -1,2 +1 @@
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||
PRINC = "1"
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From b4f2b77472aeb967d3a7595e8a965785c7a37c87 Mon Sep 17 00:00:00 2001
|
||||
From: Phil Elwell <phil@raspberrypi.org>
|
||||
Date: Tue, 16 Feb 2016 16:40:46 +0000
|
||||
Subject: [PATCH 1/4] bcm43xx: Add bcm43xx-3wire variant
|
||||
|
||||
---
|
||||
tools/hciattach.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/tools/hciattach.c b/tools/hciattach.c
|
||||
index 59a76a7..5861d33 100644
|
||||
--- a/tools/hciattach.c
|
||||
+++ b/tools/hciattach.c
|
||||
@@ -1144,6 +1144,9 @@ struct uart_t uart[] = {
|
||||
{ "bcm43xx", 0x0000, 0x0000, HCI_UART_H4, 115200, 3000000,
|
||||
FLOW_CTL, DISABLE_PM, NULL, bcm43xx, NULL },
|
||||
|
||||
+ { "bcm43xx-3wire", 0x0000, 0x0000, HCI_UART_3WIRE, 115200, 3000000,
|
||||
+ 0, DISABLE_PM, NULL, bcm43xx, NULL },
|
||||
+
|
||||
{ "ath3k", 0x0000, 0x0000, HCI_UART_ATH3K, 115200, 115200,
|
||||
FLOW_CTL, DISABLE_PM, NULL, ath3k_ps, ath3k_pm },
|
||||
|
||||
--
|
||||
1.9.1
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
From e145c9621f976063e5c573db1f2053d906f63427 Mon Sep 17 00:00:00 2001
|
||||
From: Phil Elwell <phil@raspberrypi.org>
|
||||
Date: Tue, 16 Feb 2016 16:39:09 +0000
|
||||
Subject: [PATCH 2/4] bcm43xx: The UART speed must be reset after the firmware download
|
||||
|
||||
---
|
||||
tools/hciattach_bcm43xx.c | 6 ++----
|
||||
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/tools/hciattach_bcm43xx.c b/tools/hciattach_bcm43xx.c
|
||||
index 81f38cb..0b792e0 100644
|
||||
--- a/tools/hciattach_bcm43xx.c
|
||||
+++ b/tools/hciattach_bcm43xx.c
|
||||
@@ -366,11 +366,8 @@ int bcm43xx_init(int fd, int def_speed, int speed, struct termios *ti,
|
||||
return -1;
|
||||
|
||||
if (bcm43xx_locate_patch(FIRMWARE_DIR, chip_name, fw_path)) {
|
||||
- fprintf(stderr, "Patch not found, continue anyway\n");
|
||||
+ fprintf(stderr, "Patch not found for %s, continue anyway\n", chip_name);
|
||||
} else {
|
||||
- if (bcm43xx_set_speed(fd, ti, speed))
|
||||
- return -1;
|
||||
-
|
||||
if (bcm43xx_load_firmware(fd, fw_path))
|
||||
return -1;
|
||||
|
||||
@@ -380,6 +377,7 @@ int bcm43xx_init(int fd, int def_speed, int speed, struct termios *ti,
|
||||
return -1;
|
||||
}
|
||||
|
||||
+ sleep(1);
|
||||
if (bcm43xx_reset(fd))
|
||||
return -1;
|
||||
}
|
||||
--
|
||||
1.9.1
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
From d41dc2046dd08d8c95197f677e224506f5b39bdd Mon Sep 17 00:00:00 2001
|
||||
From: Phil Elwell <phil@raspberrypi.org>
|
||||
Date: Wed, 20 Jan 2016 16:00:37 +0000
|
||||
Subject: [PATCH 3/4] Increase firmware load timeout to 30s
|
||||
|
||||
---
|
||||
tools/hciattach.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tools/hciattach.c b/tools/hciattach.c
|
||||
index 5861d33..4141796 100644
|
||||
--- a/tools/hciattach.c
|
||||
+++ b/tools/hciattach.c
|
||||
@@ -1293,7 +1293,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
struct uart_t *u = NULL;
|
||||
int detach, printpid, raw, opt, i, n, ld, err;
|
||||
- int to = 10;
|
||||
+ int to = 30;
|
||||
int init_speed = 0;
|
||||
int send_break = 0;
|
||||
pid_t pid;
|
||||
--
|
||||
1.9.1
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
From 76681284b0ea49852041fdb97a35175089a08781 Mon Sep 17 00:00:00 2001
|
||||
From: Phil Elwell <phil@raspberrypi.org>
|
||||
Date: Tue, 23 Feb 2016 17:52:29 +0000
|
||||
Subject: [PATCH 4/4] Move the 43xx firmware into /lib/firmware
|
||||
|
||||
---
|
||||
tools/hciattach_bcm43xx.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tools/hciattach_bcm43xx.c b/tools/hciattach_bcm43xx.c
|
||||
index 0b792e0..207f668 100644
|
||||
--- a/tools/hciattach_bcm43xx.c
|
||||
+++ b/tools/hciattach_bcm43xx.c
|
||||
@@ -43,7 +43,7 @@
|
||||
#include "hciattach.h"
|
||||
|
||||
#ifndef FIRMWARE_DIR
|
||||
-#define FIRMWARE_DIR "/etc/firmware"
|
||||
+#define FIRMWARE_DIR "/lib/firmware"
|
||||
#endif
|
||||
|
||||
#define FW_EXT ".hcd"
|
||||
--
|
||||
1.9.1
|
||||
|
||||
BIN
recipes-connectivity/bluez5/bluez5/BCM43430A1.hcd
Normal file
BIN
recipes-connectivity/bluez5/bluez5/BCM43430A1.hcd
Normal file
Binary file not shown.
12
recipes-connectivity/bluez5/bluez5/brcm43438.service
Normal file
12
recipes-connectivity/bluez5/bluez5/brcm43438.service
Normal file
@@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=Broadcom BCM43438 bluetooth HCI
|
||||
ConditionPathIsDirectory=/proc/device-tree/soc/gpio@7e200000/bt_pins
|
||||
Before=bluetooth.service
|
||||
After=dev-ttyAMA0.device
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/hciattach -n /dev/ttyAMA0 bcm43xx 921600 noflow -
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
26
recipes-connectivity/bluez5/bluez5_%.bbappend
Normal file
26
recipes-connectivity/bluez5/bluez5_%.bbappend
Normal file
@@ -0,0 +1,26 @@
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
SRC_URI_append_raspberrypi3 = " \
|
||||
file://BCM43430A1.hcd \
|
||||
file://0001-bcm43xx-Add-bcm43xx-3wire-variant.patch \
|
||||
file://0002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch \
|
||||
file://0003-Increase-firmware-load-timeout-to-30s.patch \
|
||||
file://0004-Move-the-43xx-firmware-into-lib-firmware.patch \
|
||||
file://brcm43438.service \
|
||||
"
|
||||
|
||||
do_install_append_raspberrypi3() {
|
||||
install -d ${D}/lib/firmware/brcm/
|
||||
install -m 0644 ${WORKDIR}/BCM43430A1.hcd ${D}/lib/firmware/brcm/BCM43430A1.hcd
|
||||
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
|
||||
install -d ${D}${systemd_unitdir}/system
|
||||
install -m 0644 ${WORKDIR}/brcm43438.service ${D}${systemd_unitdir}/system
|
||||
fi
|
||||
}
|
||||
|
||||
FILES_${PN}_append_raspberrypi3 = " \
|
||||
/lib/firmware/brcm/BCM43430A1.hcd \
|
||||
"
|
||||
|
||||
SYSTEMD_SERVICE_${PN}_raspberrypi3 += "brcm43438.service"
|
||||
@@ -1,9 +0,0 @@
|
||||
# stock fstab for the RaspberryPi - you may want to tweak this to suit.
|
||||
|
||||
rootfs / auto defaults,noatime 1 1
|
||||
proc /proc proc defaults 0 0
|
||||
devpts /dev/pts devpts mode=0620,gid=5 0 0
|
||||
usbfs /proc/bus/usb usbfs defaults 0 0
|
||||
tmpfs /var/volatile tmpfs defaults 0 0
|
||||
tmpfs /dev/shm tmpfs mode=0777 0 0
|
||||
tmpfs /media/ram tmpfs defaults 0 0
|
||||
@@ -1,33 +0,0 @@
|
||||
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
|
||||
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
|
||||
|
||||
PATH="/usr/local/bin:/usr/bin:/bin"
|
||||
EDITOR="/bin/vi" # needed for packages like cron
|
||||
test -z "$TERM" && TERM="vt100" # Basic terminal capab. For screen etc.
|
||||
|
||||
if [ ! -e /etc/localtime -a ! -e /etc/TZ ]; then
|
||||
TZ="UTC" # Time Zone. Look at http://theory.uwinnipeg.ca/gnu/glibc/libc_303.html
|
||||
# for an explanation of how to set this to your local timezone.
|
||||
export TZ
|
||||
fi
|
||||
|
||||
if [ "`id -u`" -eq 0 ]; then
|
||||
PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin:
|
||||
fi
|
||||
if [ "$PS1" ]; then
|
||||
# works for bash and ash (no other shells known to be in use here)
|
||||
PS1='\u@\h:\w\$ '
|
||||
fi
|
||||
|
||||
if [ -d /etc/profile.d ]; then
|
||||
for i in /etc/profile.d/*.sh; do
|
||||
if [ -r $i ]; then
|
||||
. $i
|
||||
fi
|
||||
done
|
||||
unset i
|
||||
fi
|
||||
|
||||
export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM
|
||||
|
||||
umask 022
|
||||
@@ -1,3 +0,0 @@
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||
# Don't forget to bump PRINC if you update the extra files.
|
||||
PRINC = "1"
|
||||
@@ -1,4 +1,6 @@
|
||||
# Base this image on rpi-hwup-image
|
||||
include rpi-hwup-image.bb
|
||||
|
||||
SPLASH = "psplash-raspberrypi"
|
||||
|
||||
IMAGE_FEATURES += "ssh-server-dropbear splash"
|
||||
|
||||
4
recipes-core/images/rpi-test-image.bb
Normal file
4
recipes-core/images/rpi-test-image.bb
Normal file
@@ -0,0 +1,4 @@
|
||||
# Base this image on rpi-basic-image
|
||||
include rpi-basic-image.bb
|
||||
|
||||
IMAGE_INSTALL_append = " packagegroup-rpi-test"
|
||||
27
recipes-core/packagegroups/packagegroup-rpi-test.bb
Normal file
27
recipes-core/packagegroups/packagegroup-rpi-test.bb
Normal file
@@ -0,0 +1,27 @@
|
||||
DESCRIPTION = "RaspberryPi Test Packagegroup"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
|
||||
|
||||
inherit packagegroup
|
||||
|
||||
RDEPENDS_${PN} = "\
|
||||
omxplayer \
|
||||
bcm2835-tests \
|
||||
wiringpi \
|
||||
rpio \
|
||||
rpi-gpio \
|
||||
pi-blaster \
|
||||
python-rtimu \
|
||||
python-sense-hat \
|
||||
connman \
|
||||
connman-client \
|
||||
crda \
|
||||
bluez5 \
|
||||
"
|
||||
|
||||
RRECOMMENDS_${PN} = "\
|
||||
bigbuckbunny-1080p \
|
||||
bigbuckbunny-480p \
|
||||
bigbuckbunny-720p \
|
||||
${MACHINE_EXTRA_RRECOMMENDS} \
|
||||
"
|
||||
@@ -1,2 +1,2 @@
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
|
||||
SPLASH_IMAGES = "file://psplash-raspberrypi-img.h;outsuffix=default"
|
||||
SPLASH_IMAGES += "file://psplash-raspberrypi-img.h;outsuffix=raspberrypi"
|
||||
|
||||
@@ -8,35 +8,33 @@ AUTHOR = "Mike McCauley (mikem@open.com.au)"
|
||||
LICENSE = "GPLv2"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
|
||||
|
||||
PR = "r0"
|
||||
|
||||
COMPATIBLE_MACHINE = "raspberrypi"
|
||||
|
||||
SRC_URI = "http://www.open.com.au/mikem/bcm2835/bcm2835-1.8.tar.gz"
|
||||
SRC_URI = "http://www.airspayce.com/mikem/bcm2835/bcm2835-${PV}.tar.gz"
|
||||
|
||||
SRC_URI[md5sum] = "cca8500049d4ebf9087de4bd1601d185"
|
||||
SRC_URI[sha256sum] = "64be77b10aaf48ecb2a9022e13057f3b564093916875c0fc56373b4142dd5cae"
|
||||
SRC_URI[md5sum] = "258caf3437012d09a651e1852d0bd60c"
|
||||
SRC_URI[sha256sum] = "52180b8a61b6546c1df4aed259d0a4d2fa56e50605e0d4d967a76bf2b23dafb8"
|
||||
|
||||
inherit autotools
|
||||
|
||||
do_compile_append() {
|
||||
# Now compiling the examples provided by the package
|
||||
mkdir -p ${B}/examples
|
||||
for file in `ls ${S}/examples`; do
|
||||
${CC} ${LDFLAGS} ${S}/examples/${file}/${file}.c -o ${B}/examples/${file} -Bstatic -L${B}/src -lbcm2835 -I${S}/src
|
||||
done
|
||||
}
|
||||
|
||||
do_install_append() {
|
||||
install -d ${D}/${libdir}/${BPN}
|
||||
for file in ${B}/examples/*
|
||||
do
|
||||
install -m 0755 ${file} ${D}/${libdir}/${BPN}
|
||||
done
|
||||
}
|
||||
|
||||
PACKAGES += "${PN}-tests"
|
||||
|
||||
FILES_${PN} = ""
|
||||
FILES_${PN}-tests = "${libdir}/${BPN}"
|
||||
FILES_${PN}-dbg += "${libdir}/${BPN}/.debug"
|
||||
|
||||
inherit autotools
|
||||
|
||||
do_compile_append() {
|
||||
#Now compiling the examples provided by the package
|
||||
for file in examples/*
|
||||
do
|
||||
${CC} ${file}/${file##*/}.c -o ${file}/${file##*/} -Bstatic -L${S}/src -lbcm2835 -I${S}/src
|
||||
done
|
||||
}
|
||||
|
||||
do_install_append() {
|
||||
install -d ${D}/${libdir}/${BPN}
|
||||
for file in examples/*
|
||||
do
|
||||
install -m 0755 ${file}/${file##*/} ${D}/${libdir}/${BPN}
|
||||
done
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
Remove dependencies on LSB functions
|
||||
|
||||
Upstream-Status: Inappropriate [configuration]
|
||||
|
||||
Signed-off-by: Alex Lennon <ajlennon@dynamicdevices.co.uk>
|
||||
|
||||
diff -ur git.org/pi-blaster.boot.sh git/pi-blaster.boot.sh
|
||||
--- git.org/pi-blaster.boot.sh 2014-05-20 14:49:44.378582168 +0100
|
||||
+++ git/pi-blaster.boot.sh 2014-05-20 14:51:08.330582386 +0100
|
||||
@@ -28,12 +28,12 @@
|
||||
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
|
||||
|
||||
# Load the VERBOSE setting and other rcS variables
|
||||
-. /lib/init/vars.sh
|
||||
+#. /lib/init/vars.sh
|
||||
|
||||
# Define LSB log_* functions.
|
||||
# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
|
||||
# and status_of_proc is working.
|
||||
-. /lib/lsb/init-functions
|
||||
+#. /lib/lsb/init-functions
|
||||
|
||||
#
|
||||
# Function that starts the daemon/service
|
||||
@@ -77,48 +77,23 @@
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
- [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
|
||||
+ [ "$VERBOSE" != no ] && echo "Starting $DESC" "$NAME"
|
||||
do_start
|
||||
- case "$?" in
|
||||
- 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
- 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
- esac
|
||||
;;
|
||||
stop)
|
||||
- [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
|
||||
+ [ "$VERBOSE" != no ] && echo "Stopping $DESC" "$NAME"
|
||||
do_stop
|
||||
- case "$?" in
|
||||
- 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
- 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
- esac
|
||||
- ;;
|
||||
- status)
|
||||
- status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
|
||||
;;
|
||||
restart|force-reload)
|
||||
#
|
||||
# If the "reload" option is implemented then remove the
|
||||
# 'force-reload' alias
|
||||
#
|
||||
- log_daemon_msg "Restarting $DESC" "$NAME"
|
||||
do_stop
|
||||
- case "$?" in
|
||||
- 0|1)
|
||||
- do_start
|
||||
- case "$?" in
|
||||
- 0) log_end_msg 0 ;;
|
||||
- 1) log_end_msg 1 ;; # Old process is still running
|
||||
- *) log_end_msg 1 ;; # Failed to start
|
||||
- esac
|
||||
- ;;
|
||||
- *)
|
||||
- # Failed to stop
|
||||
- log_end_msg 1
|
||||
- ;;
|
||||
- esac
|
||||
+ do_start
|
||||
;;
|
||||
*)
|
||||
- echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
|
||||
+ echo "Usage: $SCRIPTNAME {start|stop|restart}" >&2
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
21
recipes-devtools/pi-blaster/pi-blaster.inc
Normal file
21
recipes-devtools/pi-blaster/pi-blaster.inc
Normal file
@@ -0,0 +1,21 @@
|
||||
DESCRIPTION = "This project enables PWM on the GPIO pins you request of a Raspberry Pi."
|
||||
HOMEPAGE = "https://github.com/sarfata/pi-blaster/"
|
||||
SECTION = "devel/libs"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://README.md;beginline=157;endline=170;md5=f20832f31126609af5a7bf2340014540"
|
||||
|
||||
SRC_URI = "git://github.com/sarfata/pi-blaster \
|
||||
file://remove-initscript-lsb-dependency.patch \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit update-rc.d autotools
|
||||
|
||||
INITSCRIPT_PACKAGES = "${PN}"
|
||||
INITSCRIPT_NAME_${PN} = "${PN}.boot.sh"
|
||||
INITSCRIPT_PARAMS_${PN} = "defaults 15 85"
|
||||
|
||||
COMPATIBLE_MACHINE = "raspberrypi"
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
3
recipes-devtools/pi-blaster/pi-blaster_git.bb
Normal file
3
recipes-devtools/pi-blaster/pi-blaster_git.bb
Normal file
@@ -0,0 +1,3 @@
|
||||
require pi-blaster.inc
|
||||
|
||||
SRCREV = "ec5e1b4c6191d8f9a538497dbbb86f9cf0de7016"
|
||||
@@ -1,16 +0,0 @@
|
||||
We already have setuptools python module so we will use that and not the
|
||||
one provided in this package.
|
||||
|
||||
Upstream-Status: Inappropriate [embedded specific]
|
||||
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
|
||||
|
||||
Index: RPi.GPIO-0.2.0/setup.py
|
||||
===================================================================
|
||||
--- RPi.GPIO-0.2.0.orig/setup.py 2012-05-24 13:17:31.000000000 +0300
|
||||
+++ RPi.GPIO-0.2.0/setup.py 2012-08-22 00:56:59.049001018 +0300
|
||||
@@ -1,6 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
-import distribute_setup
|
||||
-distribute_setup.use_setuptools()
|
||||
from setuptools import setup, find_packages
|
||||
import platform
|
||||
@@ -0,0 +1,33 @@
|
||||
From c3aa4af56652b403e304ea5f321acfe289e42922 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 30 Jan 2016 16:07:14 -0800
|
||||
Subject: [PATCH] include asm/ioctl.h for ioctl() define
|
||||
|
||||
also fixes errors e.g.
|
||||
|
||||
../../RTIMULib/RTIMUHal.cpp:208:29: error: '_IOC_SIZEBITS' was not
|
||||
declared in this scope
|
||||
return ioctl(m_SPI, SPI_IOC_MESSAGE(1), &wrIOC);
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
Upstream-Status: Submitted
|
||||
|
||||
RTIMULib/RTIMUHal.cpp | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/RTIMULib/RTIMUHal.cpp b/RTIMULib/RTIMUHal.cpp
|
||||
index f9c3d15..d968326 100644
|
||||
--- a/RTIMULib/RTIMUHal.cpp
|
||||
+++ b/RTIMULib/RTIMUHal.cpp
|
||||
@@ -29,6 +29,7 @@
|
||||
#if !defined(WIN32) && !defined(__APPLE__)
|
||||
|
||||
#include <linux/spi/spidev.h>
|
||||
+#include <asm/ioctl.h>
|
||||
|
||||
RTIMUHal::RTIMUHal()
|
||||
{
|
||||
--
|
||||
2.7.0
|
||||
|
||||
15
recipes-devtools/python/python-rtimu_git.bb
Normal file
15
recipes-devtools/python/python-rtimu_git.bb
Normal file
@@ -0,0 +1,15 @@
|
||||
DESCRIPTION = "RTIMULib is a C++ and Python library that makes it easy to use 9-dof and \
|
||||
10-dof IMUs with embedded Linux systems"
|
||||
HOMEPAGE = "https://github.com/RPi-Distro/RTIMULib/"
|
||||
SECTION = "devel/python"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://../../LICENSE;md5=96cdecb41125f498958e09b72faf318e"
|
||||
|
||||
SRC_URI = "git://github.com/RPi-Distro/RTIMULib.git;protocol=http;branch=master \
|
||||
file://0001-include-asm-ioctl.h-for-ioctl-define.patch;patchdir=../.. \
|
||||
"
|
||||
SRCREV = "b949681af69b45f0f7f4bb53b6770037b5b02178"
|
||||
|
||||
S = "${WORKDIR}/git/Linux/python/"
|
||||
|
||||
inherit setuptools
|
||||
28
recipes-devtools/python/python-sense-hat_2.1.0.bb
Normal file
28
recipes-devtools/python/python-sense-hat_2.1.0.bb
Normal file
@@ -0,0 +1,28 @@
|
||||
SUMMARY = "Python module to control the Raspberry Pi Sense HAT used in the Astro Pi mission"
|
||||
HOMEPAGE = "https://github.com/RPi-Distro/python-sense-hat"
|
||||
SECTION = "devel/python"
|
||||
LICENSE = "BSD"
|
||||
LIC_FILES_CHKSUM = "file://LICENCE.txt;md5=d80fe312e1ff5fbd97369b093bf21cda"
|
||||
|
||||
SRCNAME = "sense-hat"
|
||||
|
||||
SRC_URI = "https://pypi.python.org/packages/source/s/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
|
||||
|
||||
SRC_URI[md5sum] = "71217f15ea963040f06e2f50722186ca"
|
||||
SRC_URI[sha256sum] = "c6c76707c0ea514e4b0f1f96f1b5b79755875891aae037df7434b6aad7b9dbca"
|
||||
|
||||
S = "${WORKDIR}/${SRCNAME}-${PV}"
|
||||
|
||||
inherit setuptools
|
||||
|
||||
DEPENDS += " \
|
||||
jpeg \
|
||||
zlib \
|
||||
freetype \
|
||||
"
|
||||
|
||||
RDEPENDS_${PN} += " \
|
||||
python-numpy \
|
||||
python-rtimu \
|
||||
python-imaging \
|
||||
"
|
||||
@@ -0,0 +1,294 @@
|
||||
From 23d7ab77865f8b17042f5cd4c6720cca475e0eb5 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Wed, 13 Jan 2016 14:27:10 -0800
|
||||
Subject: [PATCH] Remove nested functions
|
||||
|
||||
nested functions are not supported on llvm/clang compiler, replacing
|
||||
them helps make code portable and be compilable with non-gcc compilers
|
||||
additionally fix the diagnostic messages clang reported
|
||||
|
||||
source/c_gpio.c:130:18: warning: comparison of distinct pointer types
|
||||
('volatile uint32_t *' (aka 'volatile unsigned int *') an
|
||||
d 'void *') [-Wcompare-distinct-pointer-types]
|
||||
if (gpio_map < MAP_FAILED)
|
||||
~~~~~~~~ ^ ~~~~~~~~~~
|
||||
|
||||
source/c_gpio.c:89:13: warning: variable 'peri_base' is used
|
||||
uninitialized whenever 'if' condition is false [-Wsometimes-uninit
|
||||
ialized]
|
||||
if (fread(buf, 1, sizeof buf, fp) == sizeof buf) {
|
||||
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
source/c_gpio.c:116:17: note: uninitialized use occurs here
|
||||
gpio_base = peri_base + GPIO_BASE_OFFSET;
|
||||
^~~~~~~~~
|
||||
source/c_gpio.c:89:9: note: remove the 'if' if its condition is always
|
||||
true
|
||||
if (fread(buf, 1, sizeof buf, fp) == sizeof buf) {
|
||||
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
source/c_gpio.c:64:23: note: initialize the variable 'peri_base' to
|
||||
silence this warning
|
||||
uint32_t peri_base;
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
Upstream-Status: Submitted
|
||||
|
||||
source/c_gpio.c | 6 +--
|
||||
source/py_gpio.c | 135 ++++++++++++++++++++++++++++---------------------------
|
||||
2 files changed, 71 insertions(+), 70 deletions(-)
|
||||
|
||||
diff --git a/source/c_gpio.c b/source/c_gpio.c
|
||||
index c96a2b0..b69880f 100644
|
||||
--- a/source/c_gpio.c
|
||||
+++ b/source/c_gpio.c
|
||||
@@ -61,7 +61,7 @@ int setup(void)
|
||||
{
|
||||
int mem_fd;
|
||||
uint8_t *gpio_mem;
|
||||
- uint32_t peri_base;
|
||||
+ uint32_t peri_base = 0;
|
||||
uint32_t gpio_base;
|
||||
unsigned char buf[4];
|
||||
FILE *fp;
|
||||
@@ -73,7 +73,7 @@ int setup(void)
|
||||
if ((mem_fd = open("/dev/gpiomem", O_RDWR|O_SYNC)) > 0)
|
||||
{
|
||||
gpio_map = (uint32_t *)mmap(NULL, BLOCK_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, mem_fd, 0);
|
||||
- if ((uint32_t)gpio_map < 0) {
|
||||
+ if (gpio_map == MAP_FAILED) {
|
||||
return SETUP_MMAP_FAIL;
|
||||
} else {
|
||||
return SETUP_OK;
|
||||
@@ -127,7 +127,7 @@ int setup(void)
|
||||
|
||||
gpio_map = (uint32_t *)mmap( (void *)gpio_mem, BLOCK_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_FIXED, mem_fd, gpio_base);
|
||||
|
||||
- if ((uint32_t)gpio_map < 0)
|
||||
+ if (gpio_map == MAP_FAILED)
|
||||
return SETUP_MMAP_FAIL;
|
||||
|
||||
return SETUP_OK;
|
||||
diff --git a/source/py_gpio.c b/source/py_gpio.c
|
||||
index d54cc7f..007bad5 100644
|
||||
--- a/source/py_gpio.c
|
||||
+++ b/source/py_gpio.c
|
||||
@@ -69,6 +69,20 @@ static int mmap_gpio_mem(void)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
+static inline int cleanup_one(unsigned int gpio)
|
||||
+{
|
||||
+ // clean up any /sys/class exports
|
||||
+ event_cleanup(gpio);
|
||||
+
|
||||
+ // set everything back to input
|
||||
+ if (gpio_direction[gpio] != -1) {
|
||||
+ setup_gpio(gpio, INPUT, PUD_OFF);
|
||||
+ gpio_direction[gpio] = -1;
|
||||
+ return 1;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
|
||||
// python function cleanup(channel=None)
|
||||
static PyObject *py_cleanup(PyObject *self, PyObject *args, PyObject *kwargs)
|
||||
@@ -83,19 +97,6 @@ static PyObject *py_cleanup(PyObject *self, PyObject *args, PyObject *kwargs)
|
||||
PyObject *tempobj;
|
||||
static char *kwlist[] = {"channel", NULL};
|
||||
|
||||
- void cleanup_one(void)
|
||||
- {
|
||||
- // clean up any /sys/class exports
|
||||
- event_cleanup(gpio);
|
||||
-
|
||||
- // set everything back to input
|
||||
- if (gpio_direction[gpio] != -1) {
|
||||
- setup_gpio(gpio, INPUT, PUD_OFF);
|
||||
- gpio_direction[gpio] = -1;
|
||||
- found = 1;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O", kwlist, &chanlist))
|
||||
return NULL;
|
||||
|
||||
@@ -140,7 +141,7 @@ static PyObject *py_cleanup(PyObject *self, PyObject *args, PyObject *kwargs)
|
||||
} else if (channel != -666) { // channel was an int indicating single channel
|
||||
if (get_gpio_number(channel, &gpio))
|
||||
return NULL;
|
||||
- cleanup_one();
|
||||
+ found = cleanup_one(gpio);
|
||||
} else { // channel was a list/tuple
|
||||
for (i=0; i<chancount; i++) {
|
||||
if (chanlist) {
|
||||
@@ -169,7 +170,7 @@ static PyObject *py_cleanup(PyObject *self, PyObject *args, PyObject *kwargs)
|
||||
|
||||
if (get_gpio_number(channel, &gpio))
|
||||
return NULL;
|
||||
- cleanup_one();
|
||||
+ found = cleanup_one(gpio);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -182,6 +183,37 @@ static PyObject *py_cleanup(PyObject *self, PyObject *args, PyObject *kwargs)
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
+static inline int setup_one(unsigned int *gpio, int channel, int pud, int direction, int initial) {
|
||||
+ if (get_gpio_number(channel, gpio))
|
||||
+ return 0;
|
||||
+
|
||||
+ int func = gpio_function(*gpio);
|
||||
+ if (gpio_warnings && // warnings enabled and
|
||||
+ ((func != 0 && func != 1) || // (already one of the alt functions or
|
||||
+ (gpio_direction[*gpio] == -1 && func == 1))) // already an output not set from this program)
|
||||
+ {
|
||||
+ PyErr_WarnEx(NULL, "This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.", 1);
|
||||
+ }
|
||||
+
|
||||
+ // warn about pull/up down on i2c channels
|
||||
+ if (gpio_warnings) {
|
||||
+ if (rpiinfo.p1_revision == 0) { // compute module - do nothing
|
||||
+ } else if ((rpiinfo.p1_revision == 1 && (*gpio == 0 || *gpio == 1)) ||
|
||||
+ (*gpio == 2 || *gpio == 3)) {
|
||||
+ if (pud == PUD_UP || pud == PUD_DOWN)
|
||||
+ PyErr_WarnEx(NULL, "A physical pull up resistor is fitted on this channel!", 1);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (direction == OUTPUT && (initial == LOW || initial == HIGH)) {
|
||||
+ output_gpio(*gpio, initial);
|
||||
+ }
|
||||
+ setup_gpio(*gpio, direction, pud);
|
||||
+ gpio_direction[*gpio] = direction;
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+
|
||||
// python function setup(channel(s), direction, pull_up_down=PUD_OFF, initial=None)
|
||||
static PyObject *py_setup_channel(PyObject *self, PyObject *args, PyObject *kwargs)
|
||||
{
|
||||
@@ -195,37 +227,6 @@ static PyObject *py_setup_channel(PyObject *self, PyObject *args, PyObject *kwar
|
||||
int pud = PUD_OFF + PY_PUD_CONST_OFFSET;
|
||||
int initial = -1;
|
||||
static char *kwlist[] = {"channel", "direction", "pull_up_down", "initial", NULL};
|
||||
- int func;
|
||||
-
|
||||
- int setup_one(void) {
|
||||
- if (get_gpio_number(channel, &gpio))
|
||||
- return 0;
|
||||
-
|
||||
- func = gpio_function(gpio);
|
||||
- if (gpio_warnings && // warnings enabled and
|
||||
- ((func != 0 && func != 1) || // (already one of the alt functions or
|
||||
- (gpio_direction[gpio] == -1 && func == 1))) // already an output not set from this program)
|
||||
- {
|
||||
- PyErr_WarnEx(NULL, "This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.", 1);
|
||||
- }
|
||||
-
|
||||
- // warn about pull/up down on i2c channels
|
||||
- if (gpio_warnings) {
|
||||
- if (rpiinfo.p1_revision == 0) { // compute module - do nothing
|
||||
- } else if ((rpiinfo.p1_revision == 1 && (gpio == 0 || gpio == 1)) ||
|
||||
- (gpio == 2 || gpio == 3)) {
|
||||
- if (pud == PUD_UP || pud == PUD_DOWN)
|
||||
- PyErr_WarnEx(NULL, "A physical pull up resistor is fitted on this channel!", 1);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if (direction == OUTPUT && (initial == LOW || initial == HIGH)) {
|
||||
- output_gpio(gpio, initial);
|
||||
- }
|
||||
- setup_gpio(gpio, direction, pud);
|
||||
- gpio_direction[gpio] = direction;
|
||||
- return 1;
|
||||
- }
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "Oi|ii", kwlist, &chanlist, &direction, &pud, &initial))
|
||||
return NULL;
|
||||
@@ -290,7 +291,7 @@ static PyObject *py_setup_channel(PyObject *self, PyObject *args, PyObject *kwar
|
||||
} else if (chantuple) {
|
||||
chancount = PyTuple_Size(chantuple);
|
||||
} else {
|
||||
- if (!setup_one())
|
||||
+ if (!setup_one(&gpio, channel, pud, direction, initial))
|
||||
return NULL;
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
@@ -320,12 +321,29 @@ static PyObject *py_setup_channel(PyObject *self, PyObject *args, PyObject *kwar
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- if (!setup_one())
|
||||
+ if (!setup_one(&gpio, channel, pud, direction, initial))
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
+static inline int output_val(unsigned int *gpio, int channel, int value) {
|
||||
+ if (get_gpio_number(channel, gpio))
|
||||
+ return 0;
|
||||
+
|
||||
+ if (gpio_direction[*gpio] != OUTPUT)
|
||||
+ {
|
||||
+ PyErr_SetString(PyExc_RuntimeError, "The GPIO channel has not been set up as an OUTPUT");
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if (check_gpio_priv())
|
||||
+ return 0;
|
||||
+
|
||||
+ output_gpio(*gpio, value);
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
|
||||
// python function output(channel(s), value(s))
|
||||
static PyObject *py_output_gpio(PyObject *self, PyObject *args)
|
||||
@@ -342,23 +360,6 @@ static PyObject *py_output_gpio(PyObject *self, PyObject *args)
|
||||
int chancount = -1;
|
||||
int valuecount = -1;
|
||||
|
||||
- int output(void) {
|
||||
- if (get_gpio_number(channel, &gpio))
|
||||
- return 0;
|
||||
-
|
||||
- if (gpio_direction[gpio] != OUTPUT)
|
||||
- {
|
||||
- PyErr_SetString(PyExc_RuntimeError, "The GPIO channel has not been set up as an OUTPUT");
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- if (check_gpio_priv())
|
||||
- return 0;
|
||||
-
|
||||
- output_gpio(gpio, value);
|
||||
- return 1;
|
||||
- }
|
||||
-
|
||||
if (!PyArg_ParseTuple(args, "OO", &chanlist, &valuelist))
|
||||
return NULL;
|
||||
|
||||
@@ -416,7 +417,7 @@ static PyObject *py_output_gpio(PyObject *self, PyObject *args)
|
||||
}
|
||||
|
||||
if (chancount == -1) {
|
||||
- if (!output())
|
||||
+ if (!output_val(&gpio, channel, value))
|
||||
return NULL;
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
@@ -472,7 +473,7 @@ static PyObject *py_output_gpio(PyObject *self, PyObject *args)
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
- if (!output())
|
||||
+ if (!output_val(&gpio, channel, value))
|
||||
return NULL;
|
||||
}
|
||||
|
||||
--
|
||||
2.7.0
|
||||
|
||||
@@ -2,20 +2,20 @@ DESCRIPTION = "A module to control Raspberry Pi GPIO channels"
|
||||
HOMEPAGE = "http://code.google.com/p/raspberry-gpio-python/"
|
||||
SECTION = "devel/python"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://LICENCE.txt;md5=ee5754ae9d5f8061d6d4ccd9c9fe0061"
|
||||
LIC_FILES_CHKSUM = "file://LICENCE.txt;md5=9b95630a648966b142f1a0dcea001cb7"
|
||||
|
||||
SRCNAME = "RPi.GPIO"
|
||||
PR = "r0"
|
||||
|
||||
SRC_URI = "\
|
||||
http://pypi.python.org/packages/source/R/RPi.GPIO/${SRCNAME}-${PV}.tar.gz \
|
||||
file://don-t-install-setuptools.patch \
|
||||
file://0001-Remove-nested-functions.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "254d0443a436eb241367c487274e7197"
|
||||
SRC_URI[sha256sum] = "54e5fb06d9ea1a1389a497fb5a06dfa950c86303b0f4ba89b68c55999d1df064"
|
||||
|
||||
S = "${WORKDIR}/${SRCNAME}-${PV}"
|
||||
|
||||
inherit setuptools
|
||||
inherit distutils
|
||||
|
||||
COMPATIBLE_MACHINE = "raspberrypi"
|
||||
|
||||
SRC_URI[md5sum] = "0fc4bfa6aabc856b0b75252a40ac75cc"
|
||||
SRC_URI[sha256sum] = "fcfd97dc9687dde76b13b9d12c122e71b13e2ba09a62913d7b8d9ddbb3e8cabf"
|
||||
@@ -0,0 +1,30 @@
|
||||
From c86bfacc98d58244f532626954ed00d84ecfa82d Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 30 Jan 2016 17:12:37 -0800
|
||||
Subject: [PATCH] include sys/types.h explicitly for getting caddr_t definition
|
||||
|
||||
Helps fixing build on musl where sys/types.h is not included indirectly
|
||||
as happening on glibc
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
Upstream-Status: Submitted
|
||||
|
||||
source/c_gpio/c_gpio.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/source/c_gpio/c_gpio.c b/source/c_gpio/c_gpio.c
|
||||
index 25a04ca..70df632 100644
|
||||
--- a/source/c_gpio/c_gpio.c
|
||||
+++ b/source/c_gpio/c_gpio.c
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
+#include <sys/types.h>
|
||||
#include <sys/mman.h>
|
||||
#include "c_gpio.h"
|
||||
|
||||
--
|
||||
2.7.0
|
||||
|
||||
20
recipes-devtools/python/rpio_0.10.0.bb
Normal file
20
recipes-devtools/python/rpio_0.10.0.bb
Normal file
@@ -0,0 +1,20 @@
|
||||
DESCRIPTION = "Advanced GPIO for the Raspberry Pi. Extends RPi.GPIO with PWM, \
|
||||
GPIO interrups, TCP socket interrupts, command line tools and more"
|
||||
HOMEPAGE = "https://github.com/metachris/RPIO"
|
||||
SECTION = "devel/python"
|
||||
LICENSE = "LGPLv3+"
|
||||
LIC_FILES_CHKSUM = "file://README.rst;beginline=41;endline=53;md5=d5d95d7486a4d98c999675c23196b25a"
|
||||
|
||||
SRCNAME = "RPIO"
|
||||
|
||||
SRC_URI = "http://pypi.python.org/packages/source/R/RPIO/${SRCNAME}-${PV}.tar.gz \
|
||||
file://0001-include-sys-types.h-explicitly-for-getting-caddr_t-d.patch \
|
||||
"
|
||||
S = "${WORKDIR}/${SRCNAME}-${PV}"
|
||||
|
||||
inherit setuptools
|
||||
|
||||
COMPATIBLE_MACHINE = "raspberrypi"
|
||||
|
||||
SRC_URI[md5sum] = "cefc45422833dcafcd59b78dffc540f4"
|
||||
SRC_URI[sha256sum] = "b89f75dec9de354681209ebfaedfe22b7c178aacd91a604a7bd6d92024e4cf7e"
|
||||
@@ -0,0 +1,410 @@
|
||||
From 6d85e6cc3ab97c3f060e5e0a8e3f1945a14c86ba Mon Sep 17 00:00:00 2001
|
||||
From: Gianfranco Costamagna <gianfranco.costamagna@abinsula.com>
|
||||
Date: Mon, 12 Oct 2015 12:15:51 +0200
|
||||
Subject: [PATCH] Add initial cross compile support (rebase from Petter Mabäcker <petter@technux.se> version)
|
||||
|
||||
---
|
||||
devLib/Makefile | 54 ++++++++++++++++++++++++-------------------
|
||||
examples/Gertboard/Makefile | 22 +++++++++++-------
|
||||
examples/Makefile | 22 +++++++++++-------
|
||||
examples/PiFace/Makefile | 22 +++++++++++-------
|
||||
examples/PiGlow/Makefile | 4 ++--
|
||||
examples/q2w/Makefile | 4 ++--
|
||||
gpio/Makefile | 29 ++++++++++++-----------
|
||||
wiringPi/Makefile | 50 +++++++++++++++++++++------------------
|
||||
8 files changed, 119 insertions(+), 88 deletions(-)
|
||||
|
||||
diff --git a/devLib/Makefile b/devLib/Makefile
|
||||
index 0fb0033..cbea759 100644
|
||||
--- a/devLib/Makefile
|
||||
+++ b/devLib/Makefile
|
||||
@@ -31,15 +31,19 @@ ifneq ($V,1)
|
||||
Q ?= @
|
||||
endif
|
||||
|
||||
-STATIC=libwiringPiDev.a
|
||||
-DYNAMIC=libwiringPiDev.so.$(VERSION)
|
||||
+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include
|
||||
+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib
|
||||
|
||||
-#DEBUG = -g -O0
|
||||
-DEBUG = -O2
|
||||
-CC = gcc
|
||||
-INCLUDE = -I.
|
||||
-DEFS = -D_GNU_SOURCE
|
||||
-CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -pipe -fPIC
|
||||
+BASE_NAME=libwiringPiDev
|
||||
+STATIC=$(BASE_NAME).a
|
||||
+DYNAMIC=$(BASE_NAME).so.$(VERSION)
|
||||
+
|
||||
+#DEBUG ?= -g -O0
|
||||
+DEBUG ?= -O2
|
||||
+CC ?= gcc
|
||||
+INCLUDE ?= -I.
|
||||
+DEFS ?= -D_GNU_SOURCE
|
||||
+CFLAGS ?= $(DEBUG) $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -pipe -fPIC
|
||||
|
||||
LIBS =
|
||||
|
||||
@@ -66,16 +70,16 @@ $(STATIC): $(OBJ)
|
||||
|
||||
$(DYNAMIC): $(OBJ)
|
||||
$Q echo "[Link (Dynamic)]"
|
||||
- $Q $(CC) -shared -Wl,-soname,libwiringPiDev.so$(WIRINGPI_SONAME_SUFFIX) -o libwiringPiDev.so.$(VERSION) -lpthread $(OBJ)
|
||||
+ $Q $(CC) -shared $(LDFLAGS) -Wl,-soname,$(BASE_NAME).so.$(DYN_VERS_MAJ) -o $(BASE_NAME).so -lpthread $(OBJ)
|
||||
|
||||
.c.o:
|
||||
$Q echo [Compile] $<
|
||||
- $Q $(CC) -c $(CFLAGS) $< -o $@
|
||||
+ $Q $(CC) -c $(CFLAGS) -fPIC $< -o $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
$Q echo "[Clean]"
|
||||
- $Q rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak libwiringPiDev.*
|
||||
+ $Q rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak $(BASE_NAME).so* $(BASE_NAME).a
|
||||
|
||||
.PHONY: tags
|
||||
tags: $(SRC)
|
||||
@@ -86,22 +90,22 @@ tags: $(SRC)
|
||||
.PHONY: install
|
||||
install: $(DYNAMIC)
|
||||
$Q echo "[Install Headers]"
|
||||
- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/include
|
||||
- $Q install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include
|
||||
+ $Q install -m 0755 -d $(INCLUDE_DIR)
|
||||
+ $Q install -m 0644 $(HEADERS) $(INCLUDE_DIR)
|
||||
$Q echo "[Install Dynamic Lib]"
|
||||
- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib
|
||||
- $Q install -m 0755 libwiringPiDev.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/libwiringPiDev.so.$(VERSION)
|
||||
- $Q ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPiDev.so.$(VERSION) $(DESTDIR)/lib/libwiringPiDev.so
|
||||
- $Q $(LDCONFIG)
|
||||
+ $Q install -m 0755 -d $(LIB_DIR)
|
||||
+ $Q install -m 0755 $(BASE_NAME).so $(LIB_DIR)/$(DYNAMIC)
|
||||
+ $Q ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so
|
||||
+ $Q ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ)
|
||||
|
||||
.PHONY: install-static
|
||||
install-static: $(STATIC)
|
||||
$Q echo "[Install Headers]"
|
||||
- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/include
|
||||
- $Q install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include
|
||||
+ $Q install -m 0755 -d $(INCLUDE_DIR)
|
||||
+ $Q install -m 0644 $(HEADERS) $(INCLUDE_DIR)
|
||||
$Q echo "[Install Static Lib]"
|
||||
- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib
|
||||
- $Q install -m 0755 libwiringPiDev.a $(DESTDIR)$(PREFIX)/lib
|
||||
+ $Q install -m 0755 -d $(LIB_DIR)
|
||||
+ $Q install -m 0755 $(STATIC) $(LIB_DIR)
|
||||
|
||||
.PHONY: install-deb
|
||||
install-deb: $(DYNAMIC)
|
||||
@@ -116,9 +120,11 @@ install-deb: $(DYNAMIC)
|
||||
.PHONY: uninstall
|
||||
uninstall:
|
||||
$Q echo "[UnInstall]"
|
||||
- $Q cd $(DESTDIR)$(PREFIX)/include/ && rm -f $(HEADERS)
|
||||
- $Q cd $(DESTDIR)$(PREFIX)/lib/ && rm -f libwiringPiDev.*
|
||||
- $Q $(LDCONFIG)
|
||||
+ $Q cd $(INCLUDE_DIR) && rm -f $(HEADERS)
|
||||
+ $Q rm -f $(LIB_DIR)/$(STATIC)
|
||||
+ $Q rm -f $(LIB_DIR)/$(DYNAMIC)
|
||||
+ $Q rm -f $(LIB_DIR)/$(BASE_NAME).so
|
||||
+ $Q rm -f $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ)
|
||||
|
||||
|
||||
.PHONY: depend
|
||||
diff --git a/examples/Gertboard/Makefile b/examples/Gertboard/Makefile
|
||||
index 1939ad6..98d1415 100644
|
||||
--- a/examples/Gertboard/Makefile
|
||||
+++ b/examples/Gertboard/Makefile
|
||||
@@ -9,14 +9,20 @@ ifneq ($V,1)
|
||||
Q ?= @
|
||||
endif
|
||||
|
||||
-#DEBUG = -g -O0
|
||||
-DEBUG = -O3
|
||||
-CC = gcc
|
||||
-INCLUDE = -I/usr/local/include
|
||||
-CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
|
||||
-
|
||||
-LDFLAGS = -L/usr/local/lib
|
||||
-LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm
|
||||
+DESTDIR?=/usr
|
||||
+PREFIX?=/local
|
||||
+
|
||||
+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include
|
||||
+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib
|
||||
+
|
||||
+#DEBUG ?= -g -O0
|
||||
+DEBUG ?= -O3
|
||||
+CC ?= gcc
|
||||
+INCLUDE ?= -I$(INCLUDE_DIR)
|
||||
+CFLAGS ?= $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
|
||||
+
|
||||
+LDFLAGS ?= -L$(LIB_DIR)
|
||||
+LDLIBS ?= -lwiringPi -lwiringPiDev -lpthread -lm
|
||||
|
||||
# Should not alter anything below this line
|
||||
###############################################################################
|
||||
diff --git a/examples/Makefile b/examples/Makefile
|
||||
index e6b9b71..931b167 100644
|
||||
--- a/examples/Makefile
|
||||
+++ b/examples/Makefile
|
||||
@@ -26,14 +26,20 @@ ifneq ($V,1)
|
||||
Q ?= @
|
||||
endif
|
||||
|
||||
-#DEBUG = -g -O0
|
||||
-DEBUG = -O3
|
||||
-CC = gcc
|
||||
-INCLUDE = -I/usr/local/include
|
||||
-CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
|
||||
-
|
||||
-LDFLAGS = -L/usr/local/lib
|
||||
-LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm
|
||||
+DESTDIR?=/usr
|
||||
+PREFIX?=/local
|
||||
+
|
||||
+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include
|
||||
+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib
|
||||
+
|
||||
+#DEBUG ?= -g -O0
|
||||
+DEBUG ?= -O3
|
||||
+CC ?= gcc
|
||||
+INCLUDE ?= -I$(INCLUDE_DIR)
|
||||
+CFLAGS ?= $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
|
||||
+
|
||||
+LDFLAGS ?= -L$(LIB_DIR)
|
||||
+LDLIBS ?= -lwiringPi -lwiringPiDev -lpthread -lm
|
||||
|
||||
# Should not alter anything below this line
|
||||
###############################################################################
|
||||
diff --git a/examples/PiFace/Makefile b/examples/PiFace/Makefile
|
||||
index 4685adc..cfaf902 100644
|
||||
--- a/examples/PiFace/Makefile
|
||||
+++ b/examples/PiFace/Makefile
|
||||
@@ -26,14 +26,20 @@ ifneq ($V,1)
|
||||
Q ?= @
|
||||
endif
|
||||
|
||||
-#DEBUG = -g -O0
|
||||
-DEBUG = -O3
|
||||
-CC = gcc
|
||||
-INCLUDE = -I/usr/local/include
|
||||
-CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
|
||||
-
|
||||
-LDFLAGS = -L/usr/local/lib
|
||||
-LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm
|
||||
+DESTDIR?=/usr
|
||||
+PREFIX?=/local
|
||||
+
|
||||
+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include
|
||||
+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib
|
||||
+
|
||||
+#DEBUG ?= -g -O0
|
||||
+DEBUG ?= -O3
|
||||
+CC ?= gcc
|
||||
+INCLUDE ?= -I$(INCLUDE_DIR)
|
||||
+CFLAGS ?= $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
|
||||
+
|
||||
+LDFLAGS ?= -L$(LIB_DIR)
|
||||
+LDLIBS ?= -lwiringPi -lwiringPiDev -lpthread -lm
|
||||
|
||||
# Should not alter anything below this line
|
||||
###############################################################################
|
||||
diff --git a/examples/PiGlow/Makefile b/examples/PiGlow/Makefile
|
||||
index acd4818..dabd64e 100644
|
||||
--- a/examples/PiGlow/Makefile
|
||||
+++ b/examples/PiGlow/Makefile
|
||||
@@ -29,10 +29,10 @@ endif
|
||||
#DEBUG = -g -O0
|
||||
DEBUG = -O3
|
||||
CC = gcc
|
||||
-INCLUDE = -I/usr/local/include
|
||||
+INCLUDE = -I../wiringPi -I../wiringPiDev
|
||||
CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
|
||||
|
||||
-LDFLAGS = -L/usr/local/lib
|
||||
+LDFLAGS = -L../wiringPi -L../wiringPiDev
|
||||
LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm
|
||||
|
||||
# Should not alter anything below this line
|
||||
diff --git a/examples/q2w/Makefile b/examples/q2w/Makefile
|
||||
index 6f50fa0..c5e9f6e 100644
|
||||
--- a/examples/q2w/Makefile
|
||||
+++ b/examples/q2w/Makefile
|
||||
@@ -29,10 +29,10 @@ endif
|
||||
#DEBUG = -g -O0
|
||||
DEBUG = -O3
|
||||
CC = gcc
|
||||
-INCLUDE = -I/usr/local/include
|
||||
+INCLUDE = -I../wiringPi -I../devLib
|
||||
CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
|
||||
|
||||
-LDFLAGS = -L/usr/local/lib
|
||||
+LDFLAGS = -L../wiringPi -L../devLib
|
||||
LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm
|
||||
|
||||
###############################################################################
|
||||
diff --git a/gpio/Makefile b/gpio/Makefile
|
||||
index 7dcd090..83ec454 100644
|
||||
--- a/gpio/Makefile
|
||||
+++ b/gpio/Makefile
|
||||
@@ -30,13 +30,17 @@ ifneq ($V,1)
|
||||
Q ?= @
|
||||
endif
|
||||
|
||||
-#DEBUG = -g -O0
|
||||
-DEBUG = -O2
|
||||
-CC = gcc
|
||||
-INCLUDE = -I$(DESTDIR)$(PREFIX)/include
|
||||
-CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
|
||||
+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include
|
||||
+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib
|
||||
+BIN_DIR?=$(DESTDIR)$(PREFIX)/bin
|
||||
|
||||
-LDFLAGS = -L$(DESTDIR)$(PREFIX)/lib
|
||||
+#DEBUG ?= -g -O0
|
||||
+DEBUG ?= -O2
|
||||
+CC ?= gcc
|
||||
+INCLUDE ?= -I$(INCLUDE_DIR)
|
||||
+CFLAGS ?= $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
|
||||
+
|
||||
+LDFLAGS ?= -L$(LIB_DIR)
|
||||
LIBS = -lwiringPi -lwiringPiDev -lpthread
|
||||
|
||||
# May not need to alter anything below this line
|
||||
@@ -72,13 +76,10 @@ tags: $(SRC)
|
||||
.PHONY: install
|
||||
install: gpio
|
||||
$Q echo "[Install]"
|
||||
- $Q cp gpio $(DESTDIR)$(PREFIX)/bin
|
||||
-ifneq ($(WIRINGPI_SUID),0)
|
||||
- $Q chown root.root $(DESTDIR)$(PREFIX)/bin/gpio
|
||||
- $Q chmod 4755 $(DESTDIR)$(PREFIX)/bin/gpio
|
||||
-endif
|
||||
- $Q mkdir -p $(DESTDIR)$(PREFIX)/man/man1
|
||||
- $Q cp gpio.1 $(DESTDIR)$(PREFIX)/man/man1
|
||||
+ $Q install -d $(BIN_DIR)
|
||||
+ $Q install -m 4755 -o root -g root gpio $(BIN_DIR)
|
||||
+ $Q install -d $(DESTDIR)$(PREFIX)/share/man/man1
|
||||
+ $Q install -m 644 -o root -g root gpio.1 $(DESTDIR)$(PREFIX)/share/man/man1
|
||||
|
||||
.PHONY: install-deb
|
||||
install-deb: gpio
|
||||
@@ -89,7 +90,7 @@ install-deb: gpio
|
||||
.PHONY: uninstall
|
||||
uninstall:
|
||||
$Q echo "[UnInstall]"
|
||||
- $Q rm -f $(DESTDIR)$(PREFIX)/bin/gpio
|
||||
+ $Q rm -f $(BIN_DIR)/gpio
|
||||
$Q rm -f $(DESTDIR)$(PREFIX)/man/man1/gpio.1
|
||||
|
||||
.PHONY: depend
|
||||
diff --git a/wiringPi/Makefile b/wiringPi/Makefile
|
||||
index 6bbcc5d..5355b74 100644
|
||||
--- a/wiringPi/Makefile
|
||||
+++ b/wiringPi/Makefile
|
||||
@@ -25,19 +25,23 @@ VERSION=$(shell cat ../VERSION)
|
||||
DESTDIR?=/usr
|
||||
PREFIX?=/local
|
||||
|
||||
+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include
|
||||
+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib
|
||||
+
|
||||
LDCONFIG?=ldconfig
|
||||
|
||||
ifneq ($V,1)
|
||||
Q ?= @
|
||||
endif
|
||||
|
||||
-STATIC=libwiringPi.a
|
||||
-DYNAMIC=libwiringPi.so.$(VERSION)
|
||||
+BASE_NAME=libwiringPi
|
||||
+STATIC=$(BASE_NAME).a
|
||||
+DYNAMIC=$(BASE_NAME).so.$(VERSION)
|
||||
|
||||
-#DEBUG = -g -O0
|
||||
-DEBUG = -O2
|
||||
-CC = gcc
|
||||
-INCLUDE = -I.
|
||||
+#DEBUG ?= -g -O0
|
||||
+DEBUG ?= -O2
|
||||
+CC ?= gcc
|
||||
+INCLUDE ?= -I.
|
||||
DEFS = -D_GNU_SOURCE
|
||||
CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -pipe -fPIC
|
||||
|
||||
@@ -89,17 +93,17 @@ $(STATIC): $(OBJ)
|
||||
|
||||
$(DYNAMIC): $(OBJ)
|
||||
$Q echo "[Link (Dynamic)]"
|
||||
- $Q $(CC) -shared -Wl,-soname,libwiringPi.so$(WIRINGPI_SONAME_SUFFIX) -o libwiringPi.so.$(VERSION) -lpthread $(OBJ)
|
||||
+ $Q $(CC) $(LDFLAGS) -shared -Wl,-soname,$(BASE_NAME).so.$(DYN_VERS_MAJ) -o $(BASE_NAME).so -lpthread $(OBJ)
|
||||
|
||||
.c.o:
|
||||
$Q echo [Compile] $<
|
||||
- $Q $(CC) -c $(CFLAGS) $< -o $@
|
||||
+ $Q $(CC) -c $(CFLAGS) -fPIC $< -o $@
|
||||
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
$Q echo "[Clean]"
|
||||
- $Q rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak libwiringPi.*
|
||||
+ $Q rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak $(BASE_NAME).so* $(BASE_NAME).a
|
||||
|
||||
.PHONY: tags
|
||||
tags: $(SRC)
|
||||
@@ -110,22 +114,22 @@ tags: $(SRC)
|
||||
.PHONY: install
|
||||
install: $(DYNAMIC)
|
||||
$Q echo "[Install Headers]"
|
||||
- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/include
|
||||
- $Q install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include
|
||||
+ $Q install -m 0755 -d $(INCLUDE_DIR)
|
||||
+ $Q install -m 0644 $(HEADERS) $(INCLUDE_DIR)
|
||||
$Q echo "[Install Dynamic Lib]"
|
||||
- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib
|
||||
- $Q install -m 0755 libwiringPi.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION)
|
||||
- $Q ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION) $(DESTDIR)/lib/libwiringPi.so
|
||||
- $Q $(LDCONFIG)
|
||||
+ $Q install -m 0755 -d $(LIB_DIR)
|
||||
+ $Q install -m 0755 $(BASE_NAME).so $(LIB_DIR)/$(DYNAMIC)
|
||||
+ $Q ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so
|
||||
+ $Q ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ)
|
||||
|
||||
.PHONY: install-static
|
||||
install-static: $(STATIC)
|
||||
$Q echo "[Install Headers]"
|
||||
- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/include
|
||||
- $Q install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include
|
||||
+ $Q install -m 0755 -d $(INCLUDE_DIR)
|
||||
+ $Q install -m 0644 $(HEADERS) $(INCLUDE_DIR)
|
||||
$Q echo "[Install Static Lib]"
|
||||
- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib
|
||||
- $Q install -m 0755 libwiringPi.a $(DESTDIR)$(PREFIX)/lib
|
||||
+ $Q install -m 0755 -d $(LIB_DIR)
|
||||
+ $Q install -m 0755 $(STATIC) $(LIB_DIR)
|
||||
|
||||
.PHONY: install-deb
|
||||
install-deb: $(DYNAMIC)
|
||||
@@ -140,9 +144,11 @@ install-deb: $(DYNAMIC)
|
||||
.PHONY: uninstall
|
||||
uninstall:
|
||||
$Q echo "[UnInstall]"
|
||||
- $Q cd $(DESTDIR)$(PREFIX)/include/ && rm -f $(HEADERS)
|
||||
- $Q cd $(DESTDIR)$(PREFIX)/lib/ && rm -f libwiringPi.*
|
||||
- $Q $(LDCONFIG)
|
||||
+ $Q cd $(INCLUDE_DIR) && rm -f $(HEADERS)
|
||||
+ $Q rm -f $(LIB_DIR)/$(STATIC)
|
||||
+ $Q rm -f $(LIB_DIR)/$(DYNAMIC)
|
||||
+ $Q rm -f $(LIB_DIR)/$(BASE_NAME).so
|
||||
+ $Q rm -f $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ)
|
||||
|
||||
|
||||
.PHONY: depend
|
||||
--
|
||||
2.1.4
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
From 7f65eb37a82a6d9b095d9c8f262ad9dd205acd03 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 30 Jan 2016 16:57:38 -0800
|
||||
Subject: [PATCH] include <asm/ioctl.h> directly for _IOC_SIZEBITS
|
||||
|
||||
Fixes errors like
|
||||
| wiringPiSPI.c: In function 'wiringPiSPIDataRW':
|
||||
| wiringPiSPI.c:89:35: error: '_IOC_SIZEBITS' undeclared (first use in
|
||||
this function)
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
Upstream-Status: Submitted
|
||||
|
||||
wiringPi/wiringPi.c | 1 +
|
||||
wiringPi/wiringPiI2C.c | 1 +
|
||||
wiringPi/wiringPiSPI.c | 1 +
|
||||
3 files changed, 3 insertions(+)
|
||||
|
||||
diff --git a/wiringPi/wiringPi.c b/wiringPi/wiringPi.c
|
||||
index 32e5100..cb5db9d 100644
|
||||
--- a/wiringPi/wiringPi.c
|
||||
+++ b/wiringPi/wiringPi.c
|
||||
@@ -64,6 +64,7 @@
|
||||
#include <time.h>
|
||||
#include <fcntl.h>
|
||||
#include <pthread.h>
|
||||
+#include <asm/ioctl.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
diff --git a/wiringPi/wiringPiI2C.c b/wiringPi/wiringPiI2C.c
|
||||
index c787bce..efdf53c 100644
|
||||
--- a/wiringPi/wiringPiI2C.c
|
||||
+++ b/wiringPi/wiringPiI2C.c
|
||||
@@ -52,6 +52,7 @@
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
+#include <asm/ioctl.h>
|
||||
|
||||
#include "wiringPi.h"
|
||||
#include "wiringPiI2C.h"
|
||||
diff --git a/wiringPi/wiringPiSPI.c b/wiringPi/wiringPiSPI.c
|
||||
index 453df31..ae3c7d9 100644
|
||||
--- a/wiringPi/wiringPiSPI.c
|
||||
+++ b/wiringPi/wiringPiSPI.c
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
+#include <asm/ioctl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <linux/spi/spidev.h>
|
||||
|
||||
--
|
||||
2.7.0
|
||||
|
||||
34
recipes-devtools/wiringPi/wiringpi_git.bb
Normal file
34
recipes-devtools/wiringPi/wiringpi_git.bb
Normal file
@@ -0,0 +1,34 @@
|
||||
DESCRIPTION = "A library to control Raspberry Pi GPIO channels"
|
||||
HOMEPAGE = "https://projects.drogon.net/raspberry-pi/wiringpi/"
|
||||
SECTION = "devel/libs"
|
||||
LICENSE = "LGPLv3+"
|
||||
LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02"
|
||||
|
||||
# tag 2.32
|
||||
SRCREV = "b0a60c3302973ca1878d149d61f2f612c8f27fac"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
SRC_URI = "git://git.drogon.net/wiringPi \
|
||||
file://0001-Add-initial-cross-compile-support.patch \
|
||||
file://0001-include-asm-ioctl.h-directly-for-_IOC_SIZEBITS.patch \
|
||||
"
|
||||
|
||||
COMPATIBLE_MACHINE = "raspberrypi"
|
||||
|
||||
CFLAGS_prepend = "-I${S}/wiringPi -I${S}/devLib "
|
||||
|
||||
EXTRA_OEMAKE += "'INCLUDE_DIR=${D}${includedir}' 'LIB_DIR=${D}${libdir}'"
|
||||
EXTRA_OEMAKE += "'DESTDIR=${D}/usr' 'PREFIX=""'"
|
||||
|
||||
do_compile() {
|
||||
oe_runmake -C devLib
|
||||
oe_runmake -C wiringPi
|
||||
oe_runmake -C gpio 'LDFLAGS=${LDFLAGS} -L${S}/wiringPi -L${S}/devLib'
|
||||
}
|
||||
|
||||
do_install() {
|
||||
oe_runmake -C devLib install
|
||||
oe_runmake -C wiringPi install
|
||||
oe_runmake -C gpio install
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
DESCRIPTION = "Scripts to support a first run wizard on the Raspberry Pi."
|
||||
LICENSE = "GPLv2"
|
||||
LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
|
||||
|
||||
DEPENDS = "zenity dbus"
|
||||
RDEPENDS_${PN} = "slim sudo zenity dbus"
|
||||
|
||||
COMPATIBLE_MACHINE = "raspberrypi"
|
||||
|
||||
PR = "r2"
|
||||
|
||||
SRC_URI = " \
|
||||
file://LICENSE \
|
||||
file://first-run-wizard.sh \
|
||||
file://rpi_startup.sh \
|
||||
file://rc.firstrun \
|
||||
"
|
||||
|
||||
inherit update-rc.d
|
||||
|
||||
INITSCRIPT_NAME = "rpi-run-init"
|
||||
INITSCRIPT_PARAMS = "start 29 2 3 4 5 . stop 29 2 3 4 5 ."
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${prefix}/rpi/scripts/
|
||||
install -m 0755 ${WORKDIR}/first-run-wizard.sh ${D}${prefix}/rpi/scripts/
|
||||
install -m 0755 ${WORKDIR}/rpi_startup.sh ${D}${prefix}/rpi/scripts/
|
||||
|
||||
install -d ${D}${sysconfdir}/init.d/
|
||||
install -m 0755 ${WORKDIR}/rc.firstrun ${D}${sysconfdir}/init.d/rpi-run-init
|
||||
|
||||
install -d ${D}${sysconfdir}/rpi/
|
||||
}
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
|
||||
FILES_${PN} += "${prefix} ${sysconfdir}"
|
||||
@@ -1,339 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
@@ -1,213 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Initially based on the scripts by JohnX/Mer Project - http://wiki.maemo.org/Mer/
|
||||
# Reworked for the OpenPandora - John Willis/Michael Mrozek
|
||||
# Quickly 'hacked' for the Raspberry Pi to provide a simple 1st boot wizard.
|
||||
|
||||
# You can start the wizard from the shell using 'xinit ./first-boot-init.sh'
|
||||
|
||||
export LANG=en_GB.UTF-8
|
||||
export GTK2_RC_FILES=/usr/share/themes/Xfce/gtk-2.0/gtkrc
|
||||
|
||||
# Ensure there is a wheel group for sudoers to be put into.
|
||||
# TODO: Do this somewhere better.
|
||||
groupadd wheel
|
||||
|
||||
# Default error message (should a user hit cancel, validation fail etc.).
|
||||
ERROR_WINDOW='zenity --title="Error" --error --text="Sorry! Please try again." --timeout 6'
|
||||
|
||||
RESET_ROOT="yes"
|
||||
|
||||
DISPLAY=:0 xset s off
|
||||
|
||||
# Greet the user.
|
||||
|
||||
if zenity --question --title="Pandoras Box has been opened." --text="Welcome!\n\nPandora's Box has been opened.\n\nThis wizard will help you setting up your new OpenPandora handheld before the first use.\n\nYou will be asked a few simple questions to personalise and configure your device.\n\nDo you want to set up your unit now or shut the unit down and do it later?" --ok-label="Start now" --cancel-label="Shutdown" ; then
|
||||
# ----
|
||||
|
||||
# Reset ROOT's password to something random
|
||||
|
||||
# (I know the image build sets the password to something pusdo-random)
|
||||
# (ok, urandom is not 100% secure but it's good enough for our needs)
|
||||
|
||||
if [ $RESET_ROOT == "yes" ]; then
|
||||
rootpwd=$(cat /dev/urandom|tr -dc "a-zA-Z0-9-_\$\?"|fold -w 30|head -n 1)
|
||||
passwd "root" <<EOF
|
||||
$rootpwd
|
||||
$rootpwd
|
||||
EOF
|
||||
rootpwd=""
|
||||
fi
|
||||
|
||||
# ----
|
||||
|
||||
# Setup swap partition if the user has placed an SD with a swap partition on it.
|
||||
|
||||
swap_part=$(sfdisk -l /dev/mmcblk? | grep swap | cut -d" " -f1)
|
||||
if [ x$swap_part != x ] ; then
|
||||
use_swap=$(zenity --title="Enable swap?" --text "Swap partition found on SD card. Would you like to use it?\n\nWarning: This SD must remain in the system to use the swap." --list --radiolist --column " " --column "Answer" TRUE "Use swap on $swap_part" FALSE "Do not use swap")
|
||||
if [ "$use_swap" = "Use swap on $swap_part" ] ; then
|
||||
swapon $swap_part
|
||||
echo "$swap_part none swap sw 0 0" >> /etc/fstab
|
||||
fi
|
||||
fi
|
||||
|
||||
# ----
|
||||
|
||||
# Setup the full name and username.
|
||||
|
||||
while ! name=$(zenity --title="Please enter your full name" --entry --text "Please enter your full name.") || [ "x$name" = "x" ] ; do
|
||||
zenity --title="Error" --error --text="Please try again." --timeout 6
|
||||
done
|
||||
|
||||
username_guess=$(echo "$name" | cut -d" " -f1 | tr A-Z a-z)
|
||||
|
||||
while ! username=$(zenity --title="Enter your username" --entry --text "Please choose a short username.\n\nIt should be all lowercase and contain only letters and numbers." --entry-text "$username_guess") || [ "x$username" = "x" ] ; do
|
||||
zenity --title="Error" --error --text="Please try again." --timeout 6
|
||||
done
|
||||
|
||||
while ! useradd -c "$name,,," -G adm,audio,video,netdev,wheel,plugdev,users "$username" ; do
|
||||
username=$(zenity --title="Please check username" --entry --text "Please ensure that your username consists of only\nletters and numbers and is not already in use on the system." --entry-text "$username")
|
||||
done
|
||||
|
||||
# ----
|
||||
|
||||
# Setup the users password.
|
||||
|
||||
password=""
|
||||
while [ x$password = x ] ; do
|
||||
password1=$(zenity --title=Password --entry --text="Please choose a new password." --hide-text)
|
||||
password2=$(zenity --title=Confirm --entry --text="Confirm your new password." --hide-text)
|
||||
if [ $password1 != $password2 ] ; then
|
||||
zenity --title="Error" --error --text="The passwords do not match.\n\nPlease try again." --timeout 6
|
||||
else
|
||||
if [ x$password1 = x ] ; then
|
||||
zenity --title="Error" --error --text="Password cannot be blank!\n\nPlease try again." --timeout 6
|
||||
else
|
||||
password=$password1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
passwd "$username" <<EOF
|
||||
$password
|
||||
$password
|
||||
EOF
|
||||
|
||||
# ----
|
||||
|
||||
# Pick a name for the OpenPandora.
|
||||
|
||||
while ! hostname=$(zenity --title="Name your Pandora" --entry --text "Please choose a name for your OpenPandora.\n\nIt should only contain letters, numbers and dashes, no spaces." --entry-text "$username-openpandora") || [ "x$hostname" = "x" ]; do
|
||||
zenity --title="Error" --error --text="Please try again."
|
||||
done
|
||||
|
||||
|
||||
echo $hostname > /etc/hostname
|
||||
hostname =$(sed 's/ /_/g' /etc/hostname)
|
||||
echo $hostname > /etc/hostname
|
||||
echo "127.0.0.1 localhost.localdomain localhost $hostname" > /etc/hosts
|
||||
hostname -F /etc/hostname
|
||||
|
||||
# Set the correct user for Autologin and enable / disable it.
|
||||
|
||||
if zenity --question --title="Autologin" --text="Do you wish to automatically login at startup?\n\nSecurity warning: This skips the password check on startup" --ok-label="Yes" --cancel-label="No"; then
|
||||
# echo "PREFERED_USER=$username" > /etc/default/autologin
|
||||
sed -i "s/.*default_user.*/default_user $username/g" /etc/slim.conf
|
||||
sed -i 's/.*auto_login.*/auto_login yes/g' /etc/slim.conf
|
||||
else
|
||||
if zenity --question --title="User" --text="Do you wish to have your username automatically populated in the login screen?\n\nNote: This is ideal if you're the only user of the OpenPandora but wish to disable autologin and use a password." --ok-label="Yes" --cancel-label="No"; then
|
||||
sed -i "s/.*default_user.*/default_user $username/g" /etc/slim.conf
|
||||
sed -i 's/.*auto_login.*/auto_login no/g' /etc/slim.conf
|
||||
else
|
||||
sed -i "s/.*default_user.*/default_user/g" /etc/slim.conf
|
||||
sed -i 's/.*auto_login.*/auto_login no/g' /etc/slim.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
# ----
|
||||
|
||||
# Select the default interface and setup SLiM to pass that as a sesion to ~./.xinitrc
|
||||
|
||||
selection=""
|
||||
while [ x$selection = x ]; do
|
||||
selection=$(cat /etc/pandora/conf/gui.conf | awk -F\; '{print $1 "\n" $2 }' | zenity --width=500 --height=300 --title="Select the Default GUI" --list --column "Name" --column "Description" --text "Please select the Default GUI" )
|
||||
if [ x$selection = x ]; then
|
||||
zenity --title="Error" --error --text="Please select a GUI." --timeout=6
|
||||
fi
|
||||
done
|
||||
|
||||
echo $selection
|
||||
|
||||
gui=$(grep $selection /etc/pandora/conf/gui.conf | awk -F\; '{print $3}')
|
||||
stopcommand=$(grep $selection /etc/pandora/conf/gui.conf | awk -F\; '{print $4}')
|
||||
|
||||
echo $gui
|
||||
|
||||
if [ $gui ]; then
|
||||
sed -i "s/.*DEFAULT_SESSION=.*/DEFAULT_SESSION=$gui/g" /home/$username/.xinitrc
|
||||
echo $selection selected as default interface
|
||||
zenity --info --title="Selected session" --text "You selected $selection as default setting. You can always change your default GUI later." --timeout 6
|
||||
else
|
||||
sed -i 's/.*DEFAULT_SESSION=.*/DEFAULT_SESSION=startxfce4/g' /home/$username/.xinitrc
|
||||
fi
|
||||
|
||||
# ----
|
||||
|
||||
# Set the timezone and date/time
|
||||
|
||||
while ! area=$(zenity --list --title "Select your time zone" --text="Please select your area" --column="Select your area" --print-column=1 "Africa" "America" "Asia" "Australia" "Europe" "Pacific" --width=500 --height=260) || [ "x$area" = "x" ] ; do
|
||||
zenity --title="Error" --error --text="Please select your area." --timeout=6
|
||||
done
|
||||
|
||||
while ! timezone=$(ls -1 /usr/share/zoneinfo/$area | zenity ---width=500 --height=200 --title="Select your closest location" --list --column "Closest Location" --text "Please select the location closest to you") || [ "x$timezone" = "x" ] ; do
|
||||
zenity --title="Error" --error --text="Please select your location." --timeout=6
|
||||
done
|
||||
|
||||
echo $timezone
|
||||
rm /etc/localtime && ln -s /usr/share/zoneinfo/$area/$timezone /etc/localtime
|
||||
|
||||
# Make sure we clean up any leading zeros in the day (as Zenity freaks out)
|
||||
date_d=`date +%d | sed 's/^0//'`
|
||||
date_m=`date +%m | sed 's/^0//'`
|
||||
date_y=`date +%Y`
|
||||
|
||||
while ! date=$(zenity --calendar --text="Please select the current date" --title "Please select the current date" --day=$date_d --month=$date_m --year=$date_y --date-format="%Y%m%d" --width=500) || [ "x$date" = "x" ] ; do
|
||||
zenity --title="Error" --error --text="Please select the date." --timeout 6
|
||||
done
|
||||
|
||||
echo $date
|
||||
|
||||
time_h=`date +%H`
|
||||
time_m=`date +%M`
|
||||
|
||||
while ! time=$(zenity --title="Enter actual time" --entry --text "Please enter the time in 24hour format (HH:MM):" --entry-text "$time_h:$time_m") || [ "x$time" = "x" ] ; do
|
||||
zenity --title="Error" --error --text="Please input the time." --timeout 6
|
||||
done
|
||||
|
||||
while ! date -d $time ; do
|
||||
time=$(zenity --title="Enter actual time" --entry --text "Please enter the time in 24hour format (HH:MM):" --entry-text "$time_h:$time_m")
|
||||
done
|
||||
|
||||
date +%Y%m%d -s $date
|
||||
date +%H:%M -s $time
|
||||
|
||||
# ----
|
||||
|
||||
# Finsh up and boot the system.
|
||||
|
||||
zenity --info --title="Finished" --text "This concludes the First Boot Wizard.\n\nYour chosen interface will start in a few seconds\n\nThankyou for buying the OpenPandora. Enjoy using the device!" --timeout 6
|
||||
|
||||
# ----
|
||||
|
||||
# Write the control file so this script is not run on next boot
|
||||
# (hackish I know but I want the flexability to drop a new script in later esp. in the early firmwares).
|
||||
|
||||
touch /etc/rpi/first-boot
|
||||
# Make the control file writeable by all to allow the user to delete to rerun the wizard on next boot.
|
||||
chmod 0666 /etc/rpi/first-boot
|
||||
|
||||
# ----
|
||||
else
|
||||
poweroff
|
||||
fi
|
||||
@@ -1,73 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: rpiruninit
|
||||
# Required-Start: #adjust
|
||||
# Required-Stop: #adjust
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
### END INIT INFO
|
||||
|
||||
DESC="Raspberry Pi Startup Script Deamon"
|
||||
NAME="rpiruninit"
|
||||
|
||||
PID=`pidof -o %PPID -x rpi_startup.sh`
|
||||
OPRUNINIT='/usr/rpi/scripts/rpi_startup.sh'
|
||||
|
||||
d_stop() {
|
||||
if [ $PID ]
|
||||
then
|
||||
kill $PID
|
||||
else
|
||||
echo "$DESC: $NAME not running."
|
||||
fi
|
||||
}
|
||||
|
||||
d_start() {
|
||||
if [ $PID ]
|
||||
then
|
||||
echo "$DESC: $NAME already running."
|
||||
else
|
||||
$OPRUNINIT
|
||||
fi
|
||||
}
|
||||
|
||||
d_reload() {
|
||||
if [ $PID ]
|
||||
then
|
||||
kill -HUP $PID
|
||||
else
|
||||
echo "$DESC: $NAME not running."
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting $DESC: $NAME"
|
||||
d_start
|
||||
echo "."
|
||||
;;
|
||||
stop)
|
||||
echo -n "Stopping $DESC: $NAME"
|
||||
d_stop
|
||||
echo "."
|
||||
;;
|
||||
reload)
|
||||
echo -n "Reloading $DESC: $NAME"
|
||||
d_reload
|
||||
echo "."
|
||||
;;
|
||||
restart|force-reload)
|
||||
echo -n "Restarting $DESC: $NAME"
|
||||
d_stop
|
||||
sleep 1
|
||||
d_start
|
||||
echo "."
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
OP_CHECKFILE='/etc/rpi/first-boot'
|
||||
OP_FIRSTRUN='xinit /usr/rpi/scripts/first-run-wizard.sh'
|
||||
|
||||
[ -f $OP_CHECKFILE ] && echo -e "\nOP_STARTUP: $OP_CHECKFILE exists, not first boot." || $OP_FIRSTRUN
|
||||
1
recipes-graphics/eglinfo/eglinfo-fb_%.bbappend
Normal file
1
recipes-graphics/eglinfo/eglinfo-fb_%.bbappend
Normal file
@@ -0,0 +1 @@
|
||||
EGLINFO_DEVICE_rpi = "raspberrypi"
|
||||
2
recipes-graphics/eglinfo/eglinfo-x11_%.bbappend
Normal file
2
recipes-graphics/eglinfo/eglinfo-x11_%.bbappend
Normal file
@@ -0,0 +1,2 @@
|
||||
EGLINFO_DEVICE_rpi = "raspberrypi"
|
||||
ASNEEDED = ""
|
||||
@@ -0,0 +1,208 @@
|
||||
From 83c5ac5892d0cd29caa8922ff8b639b9a373c3cb Mon Sep 17 00:00:00 2001
|
||||
From: Dom Cobley <dc4@broadcom.com>
|
||||
Date: Tue, 9 Jul 2013 09:26:26 -0400
|
||||
Subject: [PATCH 01/13] Allow applications to set next resource handle
|
||||
|
||||
This patch adds provisions in userland to
|
||||
let apps callers set the next rendereing dispmanx resource.
|
||||
It's useful for implementing, say, a buffer carousel.
|
||||
---
|
||||
interface/khronos/common/khrn_client_rpc.h | 2 ++
|
||||
interface/khronos/common/khrn_int_ids.h | 2 ++
|
||||
interface/khronos/egl/egl_client.c | 30 +++++++++++++++++++++++++++---
|
||||
interface/khronos/egl/egl_client_surface.c | 24 +++++++++++++++++++++++-
|
||||
interface/khronos/egl/egl_client_surface.h | 3 ++-
|
||||
interface/khronos/egl/egl_int_impl.h | 5 +++--
|
||||
6 files changed, 59 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/interface/khronos/common/khrn_client_rpc.h b/interface/khronos/common/khrn_client_rpc.h
|
||||
index 418aa67..a7557a8 100644
|
||||
--- a/interface/khronos/common/khrn_client_rpc.h
|
||||
+++ b/interface/khronos/common/khrn_client_rpc.h
|
||||
@@ -683,6 +683,7 @@ static INLINE void rpc_call12_out_ctrl(CLIENT_THREAD_STATE_T *thread,uint32_t id
|
||||
static INLINE void rpc_call13_out_ctrl(CLIENT_THREAD_STATE_T *thread,uint32_t id, uint32_t p0, uint32_t p1, uint32_t p2, uint32_t p3, uint32_t p4, uint32_t p5, uint32_t p6, uint32_t p7, uint32_t p8, uint32_t p9, uint32_t p10, uint32_t p11, void *out) { rpc_begin(thread); RPC_CALL(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); rpc_recv(thread, out, NULL, (RPC_RECV_FLAG_T)(RPC_RECV_FLAG_CTRL | RPC_RECV_FLAG_LEN)); rpc_end(thread); }
|
||||
static INLINE void rpc_call14_out_ctrl(CLIENT_THREAD_STATE_T *thread,uint32_t id, uint32_t p0, uint32_t p1, uint32_t p2, uint32_t p3, uint32_t p4, uint32_t p5, uint32_t p6, uint32_t p7, uint32_t p8, uint32_t p9, uint32_t p10, uint32_t p11, uint32_t p12, void *out) { rpc_begin(thread); RPC_CALL(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); rpc_recv(thread, out, NULL, (RPC_RECV_FLAG_T)(RPC_RECV_FLAG_CTRL | RPC_RECV_FLAG_LEN)); rpc_end(thread); }
|
||||
static INLINE void rpc_call15_out_ctrl(CLIENT_THREAD_STATE_T *thread,uint32_t id, uint32_t p0, uint32_t p1, uint32_t p2, uint32_t p3, uint32_t p4, uint32_t p5, uint32_t p6, uint32_t p7, uint32_t p8, uint32_t p9, uint32_t p10, uint32_t p11, uint32_t p12, uint32_t p13, void *out) { rpc_begin(thread); RPC_CALL(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); rpc_recv(thread, out, NULL, (RPC_RECV_FLAG_T)(RPC_RECV_FLAG_CTRL | RPC_RECV_FLAG_LEN)); rpc_end(thread); }
|
||||
+static INLINE void rpc_call16_out_ctrl(CLIENT_THREAD_STATE_T *thread,uint32_t id, uint32_t p0, uint32_t p1, uint32_t p2, uint32_t p3, uint32_t p4, uint32_t p5, uint32_t p6, uint32_t p7, uint32_t p8, uint32_t p9, uint32_t p10, uint32_t p11, uint32_t p12, uint32_t p13, uint32_t p14, void *out) { rpc_begin(thread); RPC_CALL(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14); rpc_recv(thread, out, NULL, (RPC_RECV_FLAG_T)(RPC_RECV_FLAG_CTRL | RPC_RECV_FLAG_LEN)); rpc_end(thread); }
|
||||
#endif
|
||||
|
||||
#define RPC_CALL1_OUT_CTRL(fn, thread, id, out) rpc_call1_out_ctrl(thread, id, out)
|
||||
@@ -700,6 +701,7 @@ static INLINE void rpc_call15_out_ctrl(CLIENT_THREAD_STATE_T *thread,uint32_t id
|
||||
#define RPC_CALL13_OUT_CTRL(fn, thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, out) rpc_call13_out_ctrl(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, out)
|
||||
#define RPC_CALL14_OUT_CTRL(fn, thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, out) rpc_call14_out_ctrl(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, out)
|
||||
#define RPC_CALL15_OUT_CTRL(fn, thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, out) rpc_call15_out_ctrl(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, out)
|
||||
+#define RPC_CALL16_OUT_CTRL(fn, thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, out) rpc_call16_out_ctrl(thread, id, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, out)
|
||||
|
||||
# if !defined(__SYMBIAN32__) //use functions defined in khrpc.cpp
|
||||
static INLINE uint32_t rpc_call1_out_ctrl_res(CLIENT_THREAD_STATE_T *thread,uint32_t id, void *out) { uint32_t res; rpc_begin(thread); RPC_CALL(thread, id); res = rpc_recv(thread, out, NULL, (RPC_RECV_FLAG_T)(RPC_RECV_FLAG_RES | RPC_RECV_FLAG_CTRL | RPC_RECV_FLAG_LEN)); rpc_end(thread); return res; }
|
||||
diff --git a/interface/khronos/common/khrn_int_ids.h b/interface/khronos/common/khrn_int_ids.h
|
||||
index 8378f4a..ec961e0 100644
|
||||
--- a/interface/khronos/common/khrn_int_ids.h
|
||||
+++ b/interface/khronos/common/khrn_int_ids.h
|
||||
@@ -367,6 +367,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define EGLINTCREATESURFACE_ID 0x4000
|
||||
+#define EGLINTCREATESURFACE_ID_V2 0x4100
|
||||
#define EGLINTCREATEGLES11_ID 0x4001
|
||||
#define EGLINTCREATEGLES20_ID 0x4002
|
||||
#define EGLINTCREATEVG_ID 0x4003
|
||||
@@ -377,6 +378,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#define EGLINTMAKECURRENT_ID 0x4008
|
||||
#define EGLINTFLUSHANDWAIT_ID 0x4009
|
||||
#define EGLINTSWAPBUFFERS_ID 0x400a
|
||||
+#define EGLINTSWAPBUFFERS_ID_V2 0x410a
|
||||
#define EGLINTSELECTMIPMAP_ID 0x400b
|
||||
#define EGLINTFLUSH_ID 0x400c
|
||||
#define EGLINTGETCOLORDATA_ID 0x400d
|
||||
diff --git a/interface/khronos/egl/egl_client.c b/interface/khronos/egl/egl_client.c
|
||||
index 472ef0c..234da65 100644
|
||||
--- a/interface/khronos/egl/egl_client.c
|
||||
+++ b/interface/khronos/egl/egl_client.c
|
||||
@@ -162,6 +162,17 @@ static void egl_current_release(CLIENT_PROCESS_STATE_T *process, EGL_CURRENT_T *
|
||||
void egl_gl_flush_callback(bool wait);
|
||||
void egl_vg_flush_callback(bool wait);
|
||||
|
||||
+#include "interface/vmcs_host/vc_dispmanx_types.h"
|
||||
+/**HACKHACK - give us the ability to inject a DispmanX
|
||||
+ * resource handle into the CreateWindowSurface and
|
||||
+ * SwapBuffers calls */
|
||||
+static DISPMANX_RESOURCE_HANDLE_T next_resource_handle;
|
||||
+
|
||||
+EGLAPI EGLBoolean EGLAPIENTRY eglSetNextResourceHandle(DISPMANX_RESOURCE_HANDLE_T handle)
|
||||
+{
|
||||
+ next_resource_handle = handle;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
TODO: do an RPC call to make sure the Khronos vll is loaded (and that it stays loaded until eglTerminate)
|
||||
Also affects global image (and possibly others?)
|
||||
@@ -644,7 +655,8 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig c
|
||||
false,
|
||||
EGL_NO_TEXTURE,
|
||||
EGL_NO_TEXTURE,
|
||||
- 0, 0);
|
||||
+ 0, 0,
|
||||
+ next_resource_handle);
|
||||
|
||||
if (surface) {
|
||||
if (khrn_pointer_map_insert(&process->surfaces, process->next_surface, surface)) {
|
||||
@@ -889,7 +901,7 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig
|
||||
mipmap_texture,
|
||||
texture_format,
|
||||
texture_target,
|
||||
- 0, 0);
|
||||
+ 0, 0, 0);
|
||||
|
||||
if (surface) {
|
||||
if (khrn_pointer_map_insert(&process->surfaces, process->next_surface, surface)) {
|
||||
@@ -1031,7 +1043,7 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig c
|
||||
false,
|
||||
EGL_NO_TEXTURE,
|
||||
EGL_NO_TEXTURE,
|
||||
- pixmap, ((server_handle[0] == 0) && (server_handle[1] == (uint32_t)(-1))) ? NULL : server_handle);
|
||||
+ pixmap, ((server_handle[0] == 0) && (server_handle[1] == (uint32_t)(-1))) ? NULL : server_handle, 0);
|
||||
|
||||
if (surface) {
|
||||
if (khrn_pointer_map_insert(&process->surfaces, process->next_surface, surface)) {
|
||||
@@ -2303,6 +2315,18 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf)
|
||||
|
||||
vcos_log_trace("eglSwapBuffers server call");
|
||||
|
||||
+ if (next_resource_handle)
|
||||
+ RPC_CALL7(eglIntSwapBuffers_impl,
|
||||
+ thread,
|
||||
+ EGLINTSWAPBUFFERS_ID_V2,
|
||||
+ RPC_UINT(surface->serverbuffer),
|
||||
+ RPC_UINT(surface->width),
|
||||
+ RPC_UINT(surface->height),
|
||||
+ RPC_UINT(surface->internal_handle),
|
||||
+ RPC_UINT(surface->swap_behavior == EGL_BUFFER_PRESERVED ? 1 : 0),
|
||||
+ RPC_UINT(khrn_platform_get_window_position(surface->win)),
|
||||
+ RPC_INT(next_resource_handle));
|
||||
+ else
|
||||
RPC_CALL6(eglIntSwapBuffers_impl,
|
||||
thread,
|
||||
EGLINTSWAPBUFFERS_ID,
|
||||
diff --git a/interface/khronos/egl/egl_client_surface.c b/interface/khronos/egl/egl_client_surface.c
|
||||
index 0fa1fd1..0dc10e2 100644
|
||||
--- a/interface/khronos/egl/egl_client_surface.c
|
||||
+++ b/interface/khronos/egl/egl_client_surface.c
|
||||
@@ -314,7 +314,8 @@ EGL_SURFACE_T *egl_surface_create(
|
||||
EGLenum texture_format,
|
||||
EGLenum texture_target,
|
||||
EGLNativePixmapType pixmap,
|
||||
- const uint32_t *pixmap_server_handle)
|
||||
+ const uint32_t *pixmap_server_handle,
|
||||
+ DISPMANX_RESOURCE_HANDLE_T next_resource_handle)
|
||||
{
|
||||
KHRN_IMAGE_FORMAT_T color;
|
||||
KHRN_IMAGE_FORMAT_T depth;
|
||||
@@ -473,6 +474,27 @@ EGL_SURFACE_T *egl_surface_create(
|
||||
#endif
|
||||
uint32_t results[3];
|
||||
|
||||
+ if (next_resource_handle)
|
||||
+ RPC_CALL16_OUT_CTRL(eglIntCreateSurface_impl,
|
||||
+ thread,
|
||||
+ EGLINTCREATESURFACE_ID_V2,
|
||||
+ RPC_UINT(serverwin),
|
||||
+ RPC_UINT(buffers),
|
||||
+ RPC_UINT(width),
|
||||
+ RPC_UINT(height),
|
||||
+ RPC_UINT(color),
|
||||
+ RPC_UINT(depth),
|
||||
+ RPC_UINT(mask),
|
||||
+ RPC_UINT(multi),
|
||||
+ RPC_UINT(largest_pbuffer),
|
||||
+ RPC_UINT(mipmap_texture),
|
||||
+ RPC_UINT(config_depth_bits),
|
||||
+ RPC_UINT(config_stencil_bits),
|
||||
+ RPC_UINT(sem_name),
|
||||
+ RPC_UINT(type),
|
||||
+ RPC_INT(next_resource_handle),
|
||||
+ results);
|
||||
+ else
|
||||
RPC_CALL15_OUT_CTRL(eglIntCreateSurface_impl,
|
||||
thread,
|
||||
EGLINTCREATESURFACE_ID,
|
||||
diff --git a/interface/khronos/egl/egl_client_surface.h b/interface/khronos/egl/egl_client_surface.h
|
||||
index c99d44c..b5bf70a 100644
|
||||
--- a/interface/khronos/egl/egl_client_surface.h
|
||||
+++ b/interface/khronos/egl/egl_client_surface.h
|
||||
@@ -322,7 +322,8 @@ extern EGL_SURFACE_T *egl_surface_create(
|
||||
EGLenum texture_format,
|
||||
EGLenum texture_target,
|
||||
EGLNativePixmapType pixmap,
|
||||
- const uint32_t *pixmap_server_handle);
|
||||
+ const uint32_t *pixmap_server_handle,
|
||||
+ DISPMANX_RESOURCE_HANDLE_T next_resource_handle);
|
||||
extern EGL_SURFACE_T *egl_surface_from_vg_image(
|
||||
VGImage vg_handle,
|
||||
EGLSurface name,
|
||||
diff --git a/interface/khronos/egl/egl_int_impl.h b/interface/khronos/egl/egl_int_impl.h
|
||||
index 8a5734c..51b3580 100644
|
||||
--- a/interface/khronos/egl/egl_int_impl.h
|
||||
+++ b/interface/khronos/egl/egl_int_impl.h
|
||||
@@ -56,7 +56,8 @@ FN(int, eglIntCreateSurface_impl, (
|
||||
uint32_t config_stencil_bits,
|
||||
uint32_t sem,
|
||||
uint32_t type,
|
||||
- uint32_t *results))
|
||||
+ uint32_t *results,
|
||||
+ DISPMANX_RESOURCE_HANDLE_T next_resource_handle))
|
||||
|
||||
FN(int, eglIntCreatePbufferFromVGImage_impl, (
|
||||
VGImage vg_handle,
|
||||
@@ -110,7 +111,7 @@ FN(void, eglIntMakeCurrent_impl, (uint32_t pid_0, uint32_t pid_1, uint32_t glver
|
||||
FN(int, eglIntFlushAndWait_impl, (uint32_t flushgl, uint32_t flushvg))
|
||||
FN(void, eglIntFlush_impl, (uint32_t flushgl, uint32_t flushvg))
|
||||
|
||||
-FN(void, eglIntSwapBuffers_impl, (EGL_SURFACE_ID_T s, uint32_t width, uint32_t height, uint32_t handle, uint32_t preserve, uint32_t position))
|
||||
+FN(void, eglIntSwapBuffers_impl, (EGL_SURFACE_ID_T s, uint32_t width, uint32_t height, uint32_t handle, uint32_t preserve, uint32_t position, DISPMANX_RESOURCE_HANDLE_T new_back_buffer))
|
||||
FN(void, eglIntSelectMipmap_impl, (EGL_SURFACE_ID_T s, int level))
|
||||
|
||||
FN(void, eglIntGetColorData_impl, (EGL_SURFACE_ID_T s, KHRN_IMAGE_FORMAT_T format, uint32_t width, uint32_t height, int32_t stride, uint32_t y_offset, void *data))
|
||||
--
|
||||
2.9.0
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,28 @@
|
||||
From e3df3fec01aefac3ec301f6f3d5ec3e91652b9c5 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 10 Aug 2015 02:38:27 -0700
|
||||
Subject: [PATCH 04/13] wayland-egl: Add bcm_host to dependencies
|
||||
|
||||
It uses headers like vcos_platform_types.h but does not
|
||||
depend on module which should add the required include paths
|
||||
lets add the dependency on bcm_host module which should do it
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
interface/khronos/wayland-egl/wayland-egl.pc.in | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/interface/khronos/wayland-egl/wayland-egl.pc.in b/interface/khronos/wayland-egl/wayland-egl.pc.in
|
||||
index 8bafc15..fd259c9 100644
|
||||
--- a/interface/khronos/wayland-egl/wayland-egl.pc.in
|
||||
+++ b/interface/khronos/wayland-egl/wayland-egl.pc.in
|
||||
@@ -6,5 +6,6 @@ includedir=${prefix}/include
|
||||
Name: wayland-egl
|
||||
Description: VideoCore wayland-egl library
|
||||
Version: @PROJECT_APIVER@
|
||||
+Requires: bcm_host
|
||||
Libs: -L${libdir} -lwayland-egl
|
||||
Cflags: -I${includedir}
|
||||
--
|
||||
2.9.0
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
From 6c9d407c9ec0859380e7bcf35cf915cef4b3687b Mon Sep 17 00:00:00 2001
|
||||
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
|
||||
Date: Sat, 24 Jan 2015 22:07:19 +0100
|
||||
Subject: [PATCH 05/13] interface: remove faulty assert() to make weston happy
|
||||
at runtime
|
||||
|
||||
This was removed after a discussion on IRC with the weston guys
|
||||
('daniels' on irc.freenode.net/#wayland).
|
||||
|
||||
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
|
||||
---
|
||||
interface/vmcs_host/vc_vchi_dispmanx.c | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/interface/vmcs_host/vc_vchi_dispmanx.c b/interface/vmcs_host/vc_vchi_dispmanx.c
|
||||
index 3e668f5..8e065dc 100755
|
||||
--- a/interface/vmcs_host/vc_vchi_dispmanx.c
|
||||
+++ b/interface/vmcs_host/vc_vchi_dispmanx.c
|
||||
@@ -1304,7 +1304,6 @@ static void *dispmanx_notify_func( void *arg ) {
|
||||
// Decrement the use count - the corresponding "use" is in vc_dispmanx_update_submit.
|
||||
vchi_service_release(dispmanx_client.notify_handle[0]);
|
||||
if (dispmanx_client.update_callback ) {
|
||||
- vcos_assert( dispmanx_client.pending_update_handle == handle);
|
||||
dispmanx_client.update_callback(handle, dispmanx_client.update_callback_param);
|
||||
}
|
||||
} else {
|
||||
--
|
||||
2.9.0
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From e3ffe9438fe8417586d0045d00eb1368ca3a71b6 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 6 Feb 2016 11:10:47 -0800
|
||||
Subject: [PATCH 06/13] zero-out wl buffers in egl_surface_free
|
||||
|
||||
origins from buildroot
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
interface/khronos/egl/egl_client_surface.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/interface/khronos/egl/egl_client_surface.c b/interface/khronos/egl/egl_client_surface.c
|
||||
index 49cf7e5..512c83b 100644
|
||||
--- a/interface/khronos/egl/egl_client_surface.c
|
||||
+++ b/interface/khronos/egl/egl_client_surface.c
|
||||
@@ -690,11 +690,13 @@ void egl_surface_free(EGL_SURFACE_T *surface)
|
||||
if (surface->back_wl_buffer) {
|
||||
wl_buffer_destroy(surface->back_wl_buffer->wl_buffer);
|
||||
free(surface->back_wl_buffer);
|
||||
+ surface->back_wl_buffer = 0;
|
||||
}
|
||||
|
||||
if (surface->front_wl_buffer) {
|
||||
wl_buffer_destroy(surface->front_wl_buffer->wl_buffer);
|
||||
free(surface->front_wl_buffer);
|
||||
+ surface->front_wl_buffer = 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
--
|
||||
2.9.0
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From ed31a6a206c9e205bd5316e95788e5d7bb837e38 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 6 Feb 2016 11:11:41 -0800
|
||||
Subject: [PATCH 07/13] initialize front back wayland buffers
|
||||
|
||||
origins from metrological wayland support
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
interface/khronos/egl/egl_client_surface.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/interface/khronos/egl/egl_client_surface.c b/interface/khronos/egl/egl_client_surface.c
|
||||
index 512c83b..a429724 100644
|
||||
--- a/interface/khronos/egl/egl_client_surface.c
|
||||
+++ b/interface/khronos/egl/egl_client_surface.c
|
||||
@@ -401,11 +401,14 @@ EGL_SURFACE_T *egl_surface_create(
|
||||
#ifdef BUILD_WAYLAND
|
||||
if (type == WINDOW && wl_display) {
|
||||
surface->wl_egl_window = (struct wl_egl_window*)win;
|
||||
+ surface->front_wl_buffer = NULL;
|
||||
surface->back_wl_buffer = allocate_wl_buffer(
|
||||
surface->wl_egl_window, color);
|
||||
resource = surface->back_wl_buffer->resource;
|
||||
} else {
|
||||
surface->wl_egl_window = NULL;
|
||||
+ surface->front_wl_buffer = NULL;
|
||||
+ surface->back_wl_buffer = NULL;
|
||||
resource = DISPMANX_NO_HANDLE;
|
||||
}
|
||||
#endif
|
||||
--
|
||||
2.9.0
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
From 6e173040a825185013ccbbb33113442207f10eeb Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 6 Feb 2016 11:09:18 -0800
|
||||
Subject: [PATCH 08/13] Remove RPC_FLUSH
|
||||
|
||||
Origins from buildroot
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
interface/khronos/ext/gl_oes_egl_image_client.c | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/interface/khronos/ext/gl_oes_egl_image_client.c b/interface/khronos/ext/gl_oes_egl_image_client.c
|
||||
index f9b7287..b04ffef 100644
|
||||
--- a/interface/khronos/ext/gl_oes_egl_image_client.c
|
||||
+++ b/interface/khronos/ext/gl_oes_egl_image_client.c
|
||||
@@ -107,7 +107,6 @@ GL_API void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageO
|
||||
GLEGLIMAGETARGETTEXTURE2DOES_ID,
|
||||
RPC_ENUM(target),
|
||||
RPC_EGLID(image));
|
||||
- RPC_FLUSH(thread);
|
||||
#if EGL_BRCM_global_image
|
||||
}
|
||||
#endif
|
||||
--
|
||||
2.9.0
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
From c4217231fd78daee83b0c0f312c1d392aa6e0f47 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 6 Feb 2016 13:12:47 -0800
|
||||
Subject: [PATCH 09/13] fix cmake dependency race
|
||||
|
||||
Fixes errors like
|
||||
|
||||
/a/builder/mnt/build-oe/tmp-glibc/work/raspberrypi2-oe-linux-gnueabi/userland/git-r5/git/interface/vmcs_host/vc_vchi_dispmanx.h:72:66:
|
||||
fatal error: interface/vmcs_host/wayland-dispmanx-server-protocol.h: No
|
||||
such file or directory
|
||||
compilation terminated.
|
||||
interface/khronos/CMakeFiles/EGL_static.dir/build.make:773: recipe for
|
||||
target 'interface/khronos/CMakeFiles/EGL_static.dir/ext/egl_wayland.c.o'
|
||||
failed
|
||||
make[2]: ***
|
||||
[interface/khronos/CMakeFiles/EGL_static.dir/ext/egl_wayland.c.o] Error 1
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
interface/vcos/pthreads/CMakeLists.txt | 8 ++++++++
|
||||
interface/vmcs_host/CMakeLists.txt | 8 --------
|
||||
interface/vmcs_host/vc_vchi_dispmanx.h | 2 +-
|
||||
3 files changed, 9 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/interface/vcos/pthreads/CMakeLists.txt b/interface/vcos/pthreads/CMakeLists.txt
|
||||
index 1d81ca3..d6cd415 100644
|
||||
--- a/interface/vcos/pthreads/CMakeLists.txt
|
||||
+++ b/interface/vcos/pthreads/CMakeLists.txt
|
||||
@@ -33,6 +33,14 @@ set (SOURCES
|
||||
../generic/vcos_generic_blockpool.c
|
||||
)
|
||||
|
||||
+if (BUILD_WAYLAND)
|
||||
+wayland_add_protocol_server(
|
||||
+ SOURCES
|
||||
+ ../../../interface/wayland/dispmanx.xml
|
||||
+ dispmanx
|
||||
+)
|
||||
+endif ()
|
||||
+
|
||||
if (VCOS_PTHREADS_BUILD_SHARED)
|
||||
add_library (vcos SHARED ${SOURCES})
|
||||
target_link_libraries (vcos pthread dl rt)
|
||||
diff --git a/interface/vmcs_host/CMakeLists.txt b/interface/vmcs_host/CMakeLists.txt
|
||||
index 35150ed..22949a8 100755
|
||||
--- a/interface/vmcs_host/CMakeLists.txt
|
||||
+++ b/interface/vmcs_host/CMakeLists.txt
|
||||
@@ -17,14 +17,6 @@ set(VCHOSTIF_SOURCE
|
||||
# ${VMCS_TARGET}/vmcs_main.c
|
||||
# vc_vchi_haud.c
|
||||
|
||||
-if (BUILD_WAYLAND)
|
||||
-wayland_add_protocol_server(
|
||||
- VCHOSTIF_SOURCE
|
||||
- ../../interface/wayland/dispmanx.xml
|
||||
- dispmanx
|
||||
-)
|
||||
-endif ()
|
||||
-
|
||||
add_library(vchostif ${VCHOSTIF_SOURCE})
|
||||
|
||||
#add_library(bufman vc_vchi_bufman.c )
|
||||
diff --git a/interface/vmcs_host/vc_vchi_dispmanx.h b/interface/vmcs_host/vc_vchi_dispmanx.h
|
||||
index f0bae30..8c44c58 100644
|
||||
--- a/interface/vmcs_host/vc_vchi_dispmanx.h
|
||||
+++ b/interface/vmcs_host/vc_vchi_dispmanx.h
|
||||
@@ -69,7 +69,7 @@ typedef struct {
|
||||
#ifdef BUILD_WAYLAND
|
||||
/* XXX: This should be in a private header that can be included from EGL and vc_* */
|
||||
#include <wayland-server.h>
|
||||
-#include "interface/vmcs_host/wayland-dispmanx-server-protocol.h"
|
||||
+#include "interface/vcos/pthreads/wayland-dispmanx-server-protocol.h"
|
||||
struct wl_dispmanx_server_buffer {
|
||||
struct wl_resource *resource;
|
||||
struct wl_dispmanx *dispmanx;
|
||||
--
|
||||
2.9.0
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
From 377f6aada3b7569e3d662fc830e01b8c5ba8a15d Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Thu, 18 Feb 2016 09:04:46 +0000
|
||||
Subject: [PATCH 10/13] Fix enum conversion warnings
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
interface/mmal/openmaxil/mmalomx_core.c | 4 ++--
|
||||
interface/mmal/openmaxil/mmalomx_parameters.c | 6 +++---
|
||||
interface/mmal/openmaxil/mmalomx_util_params_video.c | 8 ++++----
|
||||
3 files changed, 9 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/interface/mmal/openmaxil/mmalomx_core.c b/interface/mmal/openmaxil/mmalomx_core.c
|
||||
index 9bc632b..20d4fc7 100644
|
||||
--- a/interface/mmal/openmaxil/mmalomx_core.c
|
||||
+++ b/interface/mmal/openmaxil/mmalomx_core.c
|
||||
@@ -281,7 +281,7 @@ static OMX_ERRORTYPE mmalomx_ComponentGetParameter(
|
||||
{
|
||||
OMX_PARAM_PORTDEFINITIONTYPE *param = (OMX_PARAM_PORTDEFINITIONTYPE *)pParam;
|
||||
PARAM_GET_PORT(port, component, param->nPortIndex);
|
||||
- return mmalil_error_to_mmal(mmalomx_get_port_settings(port, param));
|
||||
+ return mmalil_error_to_omx(mmalomx_get_port_settings(port, param));
|
||||
}
|
||||
return OMX_ErrorNone;
|
||||
break;
|
||||
@@ -475,7 +475,7 @@ static OMX_ERRORTYPE mmalomx_ComponentSetParameter(
|
||||
{
|
||||
OMX_PARAM_PORTDEFINITIONTYPE *param = (OMX_PARAM_PORTDEFINITIONTYPE *)pParam;
|
||||
PARAM_GET_PORT(port, component, param->nPortIndex);
|
||||
- return mmalil_error_to_mmal(mmalomx_set_port_settings(port, param));
|
||||
+ return mmalil_error_to_omx(mmalomx_set_port_settings(port, param));
|
||||
}
|
||||
return OMX_ErrorNone;
|
||||
break;
|
||||
diff --git a/interface/mmal/openmaxil/mmalomx_parameters.c b/interface/mmal/openmaxil/mmalomx_parameters.c
|
||||
index a20a5bd..c4f97d4 100644
|
||||
--- a/interface/mmal/openmaxil/mmalomx_parameters.c
|
||||
+++ b/interface/mmal/openmaxil/mmalomx_parameters.c
|
||||
@@ -170,7 +170,7 @@ static OMX_ERRORTYPE mmalomx_parameter_get_xlat(MMALOMX_COMPONENT_T *component,
|
||||
|
||||
if (xlat->fn.custom)
|
||||
{
|
||||
- return mmalil_error_to_mmal(xlat->fn.custom(MMALOMX_PARAM_MAPPING_TO_OMX, xlat, mmal_header,
|
||||
+ return mmalil_error_to_omx(xlat->fn.custom(MMALOMX_PARAM_MAPPING_TO_OMX, xlat, mmal_header,
|
||||
pParam, mmal_port));
|
||||
}
|
||||
|
||||
@@ -554,14 +554,14 @@ OMX_ERRORTYPE mmalomx_parameter_set(MMALOMX_COMPONENT_T *component,
|
||||
port->mmal->format->es->video.par.num = param->nX;
|
||||
port->mmal->format->es->video.par.den = param->nY;
|
||||
mmal_rational_simplify(&port->mmal->format->es->video.par);
|
||||
- return mmalil_error_to_mmal(mmal_port_format_commit(port->mmal));
|
||||
+ return mmalil_error_to_omx(mmal_port_format_commit(port->mmal));
|
||||
}
|
||||
case OMX_IndexParamColorSpace:
|
||||
{
|
||||
OMX_PARAM_COLORSPACETYPE *param = (OMX_PARAM_COLORSPACETYPE *)pParam;
|
||||
PARAM_GET_PORT(port, component, param->nPortIndex);
|
||||
port->mmal->format->es->video.color_space = mmalil_omx_color_space_to_mmal(param->eColorSpace);
|
||||
- return mmalil_error_to_mmal(mmal_port_format_commit(port->mmal));
|
||||
+ return mmalil_error_to_omx(mmal_port_format_commit(port->mmal));
|
||||
}
|
||||
case OMX_IndexParamBrcmVideoCroppingDisable:
|
||||
{
|
||||
diff --git a/interface/mmal/openmaxil/mmalomx_util_params_video.c b/interface/mmal/openmaxil/mmalomx_util_params_video.c
|
||||
index f088296..83e3724 100644
|
||||
--- a/interface/mmal/openmaxil/mmalomx_util_params_video.c
|
||||
+++ b/interface/mmal/openmaxil/mmalomx_util_params_video.c
|
||||
@@ -56,11 +56,11 @@ static MMAL_STATUS_T mmalomx_param_mapping_displayregion(MMALOMX_PARAM_MAPPING_D
|
||||
mmal->set = omx->set;
|
||||
mmal->display_num = omx->num;
|
||||
mmal->fullscreen = omx->fullscreen;
|
||||
- mmal->transform = omx->transform;
|
||||
+ mmal->transform = (MMAL_DISPLAYTRANSFORM_T)omx->transform;
|
||||
rect_to_mmal(&mmal->dest_rect, &omx->dest_rect);
|
||||
rect_to_mmal(&mmal->src_rect, &omx->src_rect);
|
||||
mmal->noaspect = omx->noaspect;
|
||||
- mmal->mode = omx->mode;
|
||||
+ mmal->mode = (MMAL_DISPLAYMODE_T)omx->mode;
|
||||
mmal->pixel_x = omx->pixel_x;
|
||||
mmal->pixel_y = omx->pixel_y;
|
||||
mmal->layer = omx->layer;
|
||||
@@ -72,11 +72,11 @@ static MMAL_STATUS_T mmalomx_param_mapping_displayregion(MMALOMX_PARAM_MAPPING_D
|
||||
omx->set = mmal->set;
|
||||
omx->num = mmal->display_num;
|
||||
omx->fullscreen = mmal->fullscreen;
|
||||
- omx->transform = mmal->transform;
|
||||
+ omx->transform = (OMX_DISPLAYTRANSFORMTYPE)mmal->transform;
|
||||
rect_to_omx(&omx->dest_rect, &mmal->dest_rect);
|
||||
rect_to_omx(&omx->src_rect, &mmal->src_rect);
|
||||
omx->noaspect = mmal->noaspect;
|
||||
- omx->mode = mmal->mode;
|
||||
+ omx->mode = (OMX_DISPLAYMODETYPE)mmal->mode;
|
||||
omx->pixel_x = mmal->pixel_x;
|
||||
omx->pixel_y = mmal->pixel_y;
|
||||
omx->layer = mmal->layer;
|
||||
--
|
||||
2.9.0
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
From 6e634184ee4b3d2c98c3213a3931845ec3014754 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Tue, 29 Mar 2016 20:38:30 -0700
|
||||
Subject: [PATCH 11/13] Fix for framerate with nested composition
|
||||
|
||||
frame rate appears irregular and lower than expected when using nested composition.
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
interface/khronos/egl/egl_client.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/interface/khronos/egl/egl_client.c b/interface/khronos/egl/egl_client.c
|
||||
index 024f3ed..83970ec 100644
|
||||
--- a/interface/khronos/egl/egl_client.c
|
||||
+++ b/interface/khronos/egl/egl_client.c
|
||||
@@ -2342,6 +2342,9 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf)
|
||||
surface->back_wl_buffer = buffer;
|
||||
}
|
||||
|
||||
+ glFlush();
|
||||
+ glFinish();
|
||||
+
|
||||
RPC_CALL7(eglIntSwapBuffers_impl,
|
||||
thread,
|
||||
EGLINTSWAPBUFFERS_ID_V2,
|
||||
@@ -2353,6 +2356,8 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf)
|
||||
RPC_UINT(khrn_platform_get_window_position(surface->win)),
|
||||
RPC_INT(surface->back_wl_buffer->resource));
|
||||
|
||||
+ RPC_FLUSH(thread);
|
||||
+
|
||||
surface->front_wl_buffer->in_use = 1;
|
||||
wl_surface_attach(wl_egl_window->wl_surface,
|
||||
surface->front_wl_buffer->wl_buffer,
|
||||
@@ -2360,11 +2365,13 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf)
|
||||
wl_surface_damage(wl_egl_window->wl_surface, 0, 0,
|
||||
surface->width, surface->height);
|
||||
wl_surface_commit(wl_egl_window->wl_surface);
|
||||
+ wl_display_flush(wl_display);
|
||||
|
||||
while(ret != -1 && surface->back_wl_buffer->in_use)
|
||||
ret = wl_display_dispatch_queue(wl_display, process->wl_queue);
|
||||
} else
|
||||
#endif
|
||||
+ {
|
||||
RPC_CALL6(eglIntSwapBuffers_impl,
|
||||
thread,
|
||||
EGLINTSWAPBUFFERS_ID,
|
||||
@@ -2376,6 +2383,7 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf)
|
||||
RPC_UINT(khrn_platform_get_window_position(surface->win)));
|
||||
|
||||
RPC_FLUSH(thread);
|
||||
+ }
|
||||
|
||||
#ifdef ANDROID
|
||||
CLIENT_UNLOCK();
|
||||
--
|
||||
2.9.0
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
From 559209ce15027b3370466ccb56223a7a66d2a40c Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 2 Apr 2016 10:37:24 -0700
|
||||
Subject: [PATCH 12/13] build shared library for vchostif
|
||||
|
||||
Fixes #149
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
interface/vmcs_host/CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/interface/vmcs_host/CMakeLists.txt b/interface/vmcs_host/CMakeLists.txt
|
||||
index 22949a8..f8c2f2f 100755
|
||||
--- a/interface/vmcs_host/CMakeLists.txt
|
||||
+++ b/interface/vmcs_host/CMakeLists.txt
|
||||
@@ -17,7 +17,7 @@ set(VCHOSTIF_SOURCE
|
||||
# ${VMCS_TARGET}/vmcs_main.c
|
||||
# vc_vchi_haud.c
|
||||
|
||||
-add_library(vchostif ${VCHOSTIF_SOURCE})
|
||||
+add_library(vchostif SHARED ${VCHOSTIF_SOURCE})
|
||||
|
||||
#add_library(bufman vc_vchi_bufman.c )
|
||||
|
||||
--
|
||||
2.9.0
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
From 5b55a152651eece345d9ea1e0e40ecd9fc4ca2d5 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 2 Apr 2016 10:54:59 -0700
|
||||
Subject: [PATCH 13/13] implement buffer wrapping interface for dispmanx
|
||||
|
||||
Courtesy: Zan Dobersek
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
interface/khronos/ext/egl_wayland.c | 42 +++++++++++++++++++++++++++++++++++++
|
||||
interface/wayland/dispmanx.xml | 10 +++++++++
|
||||
2 files changed, 52 insertions(+)
|
||||
|
||||
diff --git a/interface/khronos/ext/egl_wayland.c b/interface/khronos/ext/egl_wayland.c
|
||||
index 5730743..9ef89cd 100644
|
||||
--- a/interface/khronos/ext/egl_wayland.c
|
||||
+++ b/interface/khronos/ext/egl_wayland.c
|
||||
@@ -133,8 +133,50 @@ dispmanx_create_buffer(struct wl_client *client, struct wl_resource *resource,
|
||||
buffer->handle);
|
||||
}
|
||||
|
||||
+static void
|
||||
+dispmanx_wrap_buffer(struct wl_client *client, struct wl_resource *resource,
|
||||
+ uint32_t id, uint32_t handle, int32_t width, int32_t height,
|
||||
+ uint32_t stride, uint32_t buffer_height, uint32_t format)
|
||||
+{
|
||||
+ struct wl_dispmanx_server_buffer *buffer;
|
||||
+ VC_IMAGE_TYPE_T vc_format = get_vc_format(format);
|
||||
+ uint32_t dummy;
|
||||
+
|
||||
+ if(vc_format == VC_IMAGE_MIN) {
|
||||
+ wl_resource_post_error(resource,
|
||||
+ WL_DISPMANX_ERROR_INVALID_FORMAT,
|
||||
+ "invalid format");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ buffer = calloc(1, sizeof *buffer);
|
||||
+ if (buffer == NULL) {
|
||||
+ wl_resource_post_no_memory(resource);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ buffer->handle = handle;
|
||||
+ buffer->width = width;
|
||||
+ buffer->height = height;
|
||||
+ buffer->format = format;
|
||||
+
|
||||
+ buffer->resource = wl_resource_create(resource->client, &wl_buffer_interface,
|
||||
+ 1, id);
|
||||
+ if (!buffer->resource) {
|
||||
+ wl_resource_post_no_memory(resource);
|
||||
+ vc_dispmanx_resource_delete(buffer->handle);
|
||||
+ free(buffer);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ wl_resource_set_implementation(buffer->resource,
|
||||
+ (void (**)(void)) &dispmanx_buffer_interface,
|
||||
+ buffer, destroy_buffer);
|
||||
+}
|
||||
+
|
||||
static const struct wl_dispmanx_interface dispmanx_interface = {
|
||||
dispmanx_create_buffer,
|
||||
+ dispmanx_wrap_buffer,
|
||||
};
|
||||
|
||||
static void
|
||||
diff --git a/interface/wayland/dispmanx.xml b/interface/wayland/dispmanx.xml
|
||||
index c18626d..11ed1ef 100644
|
||||
--- a/interface/wayland/dispmanx.xml
|
||||
+++ b/interface/wayland/dispmanx.xml
|
||||
@@ -118,6 +118,16 @@
|
||||
<arg name="buffer" type="object" interface="wl_buffer"/>
|
||||
<arg name="handle" type="uint"/>
|
||||
</event>
|
||||
+
|
||||
+ <request name="wrap_buffer">
|
||||
+ <arg name="id" type="new_id" interface="wl_buffer"/>
|
||||
+ <arg name="handle" type="uint"/>
|
||||
+ <arg name="width" type="int"/>
|
||||
+ <arg name="height" type="int"/>
|
||||
+ <arg name="stride" type="uint"/>
|
||||
+ <arg name="buffer_height" type="uint"/>
|
||||
+ <arg name="format" type="uint"/>
|
||||
+ </request>
|
||||
</interface>
|
||||
|
||||
</protocol>
|
||||
--
|
||||
2.9.0
|
||||
|
||||
@@ -2,38 +2,74 @@ DESCRIPTION = "This repository contains the source code for the ARM side \
|
||||
libraries used on Raspberry Pi. These typically are installed in /opt/vc/lib \
|
||||
and includes source for the ARM side code to interface to: EGL, mmal, GLESv2,\
|
||||
vcos, openmaxil, vchiq_arm, bcm_host, WFC, OpenVG."
|
||||
LICENSE = "Broadcom"
|
||||
LIC_FILES_CHKSUM = "file://LICENCE;md5=957f6640d5e2d2acfce73a36a56cb32f"
|
||||
LICENSE = "BSD-3-Clause"
|
||||
LIC_FILES_CHKSUM = "file://LICENCE;md5=0448d6488ef8cc380632b1569ee6d196"
|
||||
|
||||
PR = "r1"
|
||||
PR = "r5"
|
||||
|
||||
PROVIDES = "virtual/libgles2 \
|
||||
virtual/egl"
|
||||
|
||||
RPROVIDES_${PN} += "libgles2 libgl"
|
||||
|
||||
COMPATIBLE_MACHINE = "raspberrypi"
|
||||
|
||||
SRCREV = "8700279495e266378d36092ccf86424f0ee2539f"
|
||||
SRC_URI = "git://github.com/raspberrypi/userland.git;protocol=git;branch=master \
|
||||
"
|
||||
SRCBRANCH = "master"
|
||||
SRCFORK = "raspberrypi"
|
||||
SRCREV = "0147f98bdd4fdc822d25d8a70cf5adc5adb89096"
|
||||
|
||||
SRC_URI = "\
|
||||
git://github.com/${SRCFORK}/userland.git;protocol=git;branch=${SRCBRANCH} \
|
||||
file://0001-Allow-applications-to-set-next-resource-handle.patch \
|
||||
file://0002-wayland-Add-support-for-the-Wayland-winsys.patch \
|
||||
file://0003-wayland-Add-Wayland-example.patch \
|
||||
file://0004-wayland-egl-Add-bcm_host-to-dependencies.patch \
|
||||
file://0005-interface-remove-faulty-assert-to-make-weston-happy-.patch \
|
||||
file://0006-zero-out-wl-buffers-in-egl_surface_free.patch \
|
||||
file://0007-initialize-front-back-wayland-buffers.patch \
|
||||
file://0008-Remove-RPC_FLUSH.patch \
|
||||
file://0009-fix-cmake-dependency-race.patch \
|
||||
file://0010-Fix-enum-conversion-warnings.patch \
|
||||
file://0011-Fix-for-framerate-with-nested-composition.patch \
|
||||
file://0012-build-shared-library-for-vchostif.patch \
|
||||
file://0013-implement-buffer-wrapping-interface-for-dispmanx.patch \
|
||||
"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit cmake
|
||||
inherit cmake pkgconfig
|
||||
|
||||
EXTRA_OECMAKE = " \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
"
|
||||
# The compiled binaries don't provide sonames.
|
||||
SOLIBS = "${SOLIBSDEV}"
|
||||
EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS='-Wl,--no-as-needed' \
|
||||
-DVMCS_INSTALL_PREFIX=${exec_prefix} \
|
||||
"
|
||||
|
||||
do_install_append() {
|
||||
mkdir -p ${D}/${prefix}
|
||||
mv ${D}/opt/vc/* ${D}/${prefix}
|
||||
rm -rf ${D}/opt
|
||||
PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}"
|
||||
|
||||
PACKAGECONFIG[wayland] = "-DBUILD_WAYLAND=TRUE -DWAYLAND_SCANNER_EXECUTABLE:FILEPATH=${STAGING_BINDIR_NATIVE}/wayland-scanner,,wayland-native wayland"
|
||||
|
||||
CFLAGS_append = " -fPIC"
|
||||
|
||||
do_install_append () {
|
||||
for f in `find ${D}${includedir}/interface/vcos/ -name "*.h"`; do
|
||||
sed -i 's/include "vcos_platform.h"/include "pthreads\/vcos_platform.h"/g' ${f}
|
||||
sed -i 's/include "vcos_futex_mutex.h"/include "pthreads\/vcos_futex_mutex.h"/g' ${f}
|
||||
sed -i 's/include "vcos_platform_types.h"/include "pthreads\/vcos_platform_types.h"/g' ${f}
|
||||
done
|
||||
}
|
||||
|
||||
FILES_${PN} += "${libdir}/*${SOLIBS}"
|
||||
FILES_${PN}-dev = "${includedir} \
|
||||
# Shared libs from userland package build aren't versioned, so we need
|
||||
# to force the .so files into the runtime package (and keep them
|
||||
# out of -dev package).
|
||||
FILES_SOLIBSDEV = ""
|
||||
INSANE_SKIP_${PN} += "dev-so"
|
||||
|
||||
FILES_${PN} += " \
|
||||
${libdir}/*.so \
|
||||
${libdir}/plugins"
|
||||
FILES_${PN}-dev += "${includedir} \
|
||||
${prefix}/src"
|
||||
FILES_${PN}-doc += "${datadir}/install"
|
||||
FILES_${PN}-dbg += "${libdir}/plugins/.debug"
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
|
||||
RDEPENDS_${PN} += "bash"
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
|
||||
CONFLICTS = "vc-graphics"
|
||||
|
||||
VCDIR = "hardfp/opt/vc"
|
||||
require vc-graphics.inc
|
||||
|
||||
PR = "${INCPR}.0"
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
|
||||
CONFLICTS = "vc-graphics-hardfp"
|
||||
|
||||
VCDIR = "opt/vc"
|
||||
require vc-graphics.inc
|
||||
|
||||
PR = "${INCPR}.0"
|
||||
|
||||
@@ -6,13 +6,14 @@ LIC_FILES_CHKSUM = "file://LICENCE;md5=86e53f5f5909ee66900418028de11780"
|
||||
PROVIDES = "virtual/libgles2 virtual/egl"
|
||||
COMPATIBLE_MACHINE = "raspberrypi"
|
||||
|
||||
include ../common/firmware.inc
|
||||
include recipes-bsp/common/firmware.inc
|
||||
|
||||
SRC_URI = "git://github.com/raspberrypi/firmware.git;protocol=git;branch=master\
|
||||
file://egl.pc \
|
||||
file://vchiq.sh"
|
||||
SRC_URI += " \
|
||||
file://egl.pc \
|
||||
file://vchiq.sh \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/git/${VCDIR}"
|
||||
S = "${RPIFW_S}/${VCDIR}"
|
||||
|
||||
INCPR = "r1"
|
||||
|
||||
@@ -48,6 +49,8 @@ INITSCRIPT_PARAMS = "start 03 S ."
|
||||
FILES_${PN} = "${bindir}/* \
|
||||
${sbindir}/* \
|
||||
${libdir}/lib*.so \
|
||||
${sysconfdir}/init.d"
|
||||
${sysconfdir}/init.d \
|
||||
${libdir}/plugins"
|
||||
FILES_${PN}-dev = "${libdir}/pkgconfig \
|
||||
${includedir}"
|
||||
FILES_${PN}-dbg += "${libdir}/plugins/.debug"
|
||||
4
recipes-graphics/wayland/weston_%.bbappend
Normal file
4
recipes-graphics/wayland/weston_%.bbappend
Normal file
@@ -0,0 +1,4 @@
|
||||
EXTRA_OECONF_append_rpi = "\
|
||||
--enable-rpi-compositor \
|
||||
WESTON_NATIVE_BACKEND=rpi-backend.so \
|
||||
"
|
||||
7
recipes-graphics/weston/weston_%.bbappend
Normal file
7
recipes-graphics/weston/weston_%.bbappend
Normal file
@@ -0,0 +1,7 @@
|
||||
EXTRA_OECONF += "--enable-rpi-compositor \
|
||||
--disable-resize-optimization \
|
||||
--disable-setuid-install \
|
||||
--disable-xwayland-test \
|
||||
--disable-simple-egl-clients \
|
||||
WESTON_NATIVE_BACKEND=rpi-backend.so \
|
||||
"
|
||||
@@ -0,0 +1,5 @@
|
||||
Section "Device"
|
||||
Identifier "Adafruit PiTFT"
|
||||
Driver "fbdev"
|
||||
Option "fbdev" "/dev/fb1"
|
||||
EndSection
|
||||
@@ -0,0 +1,6 @@
|
||||
Section "InputClass"
|
||||
Identifier "calibration"
|
||||
MatchProduct "stmpe-ts"
|
||||
Option "Calibration" "3800 200 200 3800"
|
||||
Option "SwapAxes" "1"
|
||||
EndSection
|
||||
@@ -1,16 +1,19 @@
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
# Don't forget to bump PRINC if you update the extra files.
|
||||
PRINC := "${@int(PRINC) + 5}"
|
||||
SRC_URI_append_rpi = " file://xorg.conf.d/10-evdev.conf \
|
||||
file://xorg.conf.d/98-pitft.conf \
|
||||
file://xorg.conf.d/99-calibration.conf \
|
||||
"
|
||||
|
||||
THISDIR := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
|
||||
FILESPATH =. "${@base_set_filespath(["${THISDIR}/${PN}"], d)}:"
|
||||
|
||||
SRC_URI_append_raspberrypi = " file://xorg.conf.d/* "
|
||||
|
||||
do_install_append_raspberrypi () {
|
||||
do_install_append_rpi () {
|
||||
install -d ${D}/${sysconfdir}/X11/xorg.conf.d/
|
||||
install -m 0644 ${WORKDIR}/xorg.conf.d/* ${D}/${sysconfdir}/X11/xorg.conf.d/
|
||||
install -m 0644 ${WORKDIR}/xorg.conf.d/10-evdev.conf ${D}/${sysconfdir}/X11/xorg.conf.d/
|
||||
|
||||
PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
|
||||
if [ "${PITFT}" = "1" ]; then
|
||||
install -m 0644 ${WORKDIR}/xorg.conf.d/98-pitft.conf ${D}/${sysconfdir}/X11/xorg.conf.d/
|
||||
install -m 0644 ${WORKDIR}/xorg.conf.d/99-calibration.conf ${D}/${sysconfdir}/X11/xorg.conf.d/
|
||||
fi
|
||||
}
|
||||
|
||||
FILES_${PN}_raspberrypi += "${sysconfdir}/X11/xorg.conf ${sysconfdir}/X11/xorg.conf.d/*"
|
||||
FILES_${PN}_rpi += "${sysconfdir}/X11/xorg.conf ${sysconfdir}/X11/xorg.conf.d/*"
|
||||
|
||||
@@ -0,0 +1,205 @@
|
||||
SOFTWARE LICENSE AGREEMENT
|
||||
|
||||
Unless you and Broadcom Corporation (“Broadcom”) execute a separate written
|
||||
software license agreement governing use of the accompanying software, this
|
||||
software is licensed to you under the terms of this Software License Agreement
|
||||
(“Agreement”).
|
||||
|
||||
ANY USE, REPRODUCTION OR DISTRIBUTION OF THE SOFTWARE CONSTITUTES YOUR
|
||||
ACCEPTANCE OF THIS AGREEMENT.
|
||||
|
||||
1. DEFINITIONS.
|
||||
|
||||
1.1. “Broadcom Product” means any of the proprietary integrated circuit
|
||||
product(s) sold by Broadcom with which the Software was designed to be used, or
|
||||
their successors.
|
||||
|
||||
1.2. “Licensee” means you or if you are accepting on behalf of an entity
|
||||
then the entity and its affiliates exercising rights under, and complying with
|
||||
all of the terms of this Agreement.
|
||||
|
||||
1.3. “Software” shall mean that software made available by Broadcom to
|
||||
Licensee in binary code form with this Agreement.
|
||||
|
||||
2. LICENSE GRANT; OWNERSHIP
|
||||
|
||||
2.1. License Grants. Subject to the terms and conditions of this Agreement,
|
||||
Broadcom hereby grants to Licensee a non-exclusive, non-transferable,
|
||||
royalty-free license (i) to use and integrate the Software in conjunction with
|
||||
any other software; and (ii) to reproduce and distribute the Software complete,
|
||||
unmodified and as provided by Broadcom, and only for use with a Broadcom
|
||||
Product.
|
||||
|
||||
2.2. Restriction on Modification. Licensee may not make any modifications
|
||||
to the Software.
|
||||
|
||||
2.3. Restriction on Distribution. Licensee shall only distribute the
|
||||
Software under the terms of this Agreement and a copy of this Agreement
|
||||
accompanies such distribution.
|
||||
|
||||
2.4. Proprietary Notices. Licensee shall not remove, efface or obscure any
|
||||
copyright or trademark notices from the Software. Licensee shall include
|
||||
reproductions of the Broadcom copyright notice with each copy of the Software,
|
||||
except where such Software is embedded in a manner not readily accessible to
|
||||
the end user. Licensee acknowledges that any symbols, trademarks, tradenames,
|
||||
and service marks adopted by Broadcom to identify the Software belong to
|
||||
Broadcom and that Licensee shall have no rights therein.
|
||||
|
||||
2.5. Ownership. Broadcom shall retain all right, title and interest,
|
||||
including all intellectual property rights, in and to the Software. Licensee
|
||||
hereby covenants that it will not assert any claim that the Software created by
|
||||
or for Broadcom infringe any intellectual property right owned or controlled by
|
||||
Licensee; provided however, the foregoing shall not apply in case the Agreement
|
||||
is terminated.
|
||||
|
||||
2.6. No Other Rights Granted; Restrictions. Apart from the license rights
|
||||
expressly set forth in this Agreement, Broadcom does not grant and Licensee
|
||||
does not receive any ownership right, title or interest nor any security
|
||||
interest or other interest in any intellectual property rights relating to the
|
||||
Software, nor in any copy of any part of the foregoing. No license is granted
|
||||
to Licensee in any human readable code of the Software (source code). Licensee
|
||||
shall not (i) use, license, sell or otherwise distribute the Software except as
|
||||
provided in this Agreement, (ii) attempt to modify in any way, reverse
|
||||
engineer, decompile or disassemble any portion of the Software; or (iii) use
|
||||
the Software or other material in violation of any applicable law or
|
||||
regulation, including but not limited to any regulatory agency, such as FCC,
|
||||
rules.
|
||||
|
||||
3. NO WARRANTY OR SUPPORT
|
||||
|
||||
3.1. No Warranty. THE SOFTWARE IS OFFERED “AS IS,” AND BROADCOM GRANTS AND
|
||||
LICENSEE RECEIVES NO WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, BY STATUTE,
|
||||
COMMUNICATION OR CONDUCT WITH LICENSEE, OR OTHERWISE. BROADCOM SPECIFICALLY
|
||||
DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A SPECIFIC
|
||||
PURPOSE OR NONINFRINGEMENT CONCERNING THE SOFTWARE OR ANY UPGRADES TO OR
|
||||
DOCUMENTATION FOR THE SOFTWARE. WITHOUT LIMITATION OF THE ABOVE, BROADCOM
|
||||
GRANTS NO WARRANTY THAT THE SOFTWARE IS ERROR-FREE OR WILL OPERATE WITHOUT
|
||||
INTERRUPTION, AND GRANTS NO WARRANTY REGARDING ITS USE OR THE RESULTS THEREFROM
|
||||
INCLUDING, WITHOUT LIMITATION, ITS CORRECTNESS, ACCURACY OR RELIABILITY.
|
||||
|
||||
3.2. No Support. Nothing in this agreement shall obligate Broadcom to
|
||||
provide any support for the Software. Broadcom may, but shall be under no
|
||||
obligation to, correct any defects in the Software and/or provide updates to
|
||||
licensees of the Software. Licensee shall make reasonable efforts to promptly
|
||||
report to Broadcom any defects it finds in the Software, as an aid to creating
|
||||
improved revisions of the Software.
|
||||
|
||||
3.3. Dangerous Applications. The Software is not designed, intended, or
|
||||
certified for use in components of systems intended for the operation of
|
||||
weapons, weapons systems, nuclear installations, means of mass transportation,
|
||||
aviation, life-support computers or equipment (including resuscitation
|
||||
equipment and surgical implants), pollution control, hazardous substances
|
||||
management, or for any other dangerous application in which the failure of the
|
||||
Software could create a situation where personal injury or death may occur.
|
||||
Licensee understands that use of the Software in such applications is fully at
|
||||
the risk of Licensee.
|
||||
|
||||
4. TERM AND TERMINATION
|
||||
|
||||
4.1. Termination. This Agreement will automatically terminate if Licensee
|
||||
fails to comply with any of the terms and conditions hereof. In such event,
|
||||
Licensee must destroy all copies of the Software and all of its component
|
||||
parts.
|
||||
|
||||
4.2. Effect Of Termination. Upon any termination of this Agreement, the
|
||||
rights and licenses granted to Licensee under this Agreement shall immediately
|
||||
terminate.
|
||||
|
||||
4.3. Survival. The rights and obligations under this Agreement which by
|
||||
their nature should survive termination will remain in effect after expiration
|
||||
or termination of this Agreement.
|
||||
|
||||
5. CONFIDENTIALITY
|
||||
|
||||
5.1. Obligations. Licensee acknowledges and agrees that any documentation
|
||||
relating to the Software, and any other information (if such other information
|
||||
is identified as confidential or should be recognized as confidential under the
|
||||
circumstances) provided to Licensee by Broadcom hereunder (collectively,
|
||||
“Confidential Information”) constitute the confidential and proprietary
|
||||
information of Broadcom, and that Licensee’s protection thereof is an essential
|
||||
condition to Licensee’s use and possession of the Software. Licensee shall
|
||||
retain all Confidential Information in strict confidence and not disclose it to
|
||||
any third party or use it in any way except under a written agreement with
|
||||
terms and conditions at least as protective as the terms of this Section.
|
||||
Licensee will exercise at least the same amount of diligence in preserving the
|
||||
secrecy of the Confidential Information as it uses in preserving the secrecy of
|
||||
its own most valuable confidential information, but in no event less than
|
||||
reasonable diligence. Information shall not be considered Confidential
|
||||
Information if and to the extent that it: (i) was in the public domain at the
|
||||
time it was disclosed or has entered the public domain through no fault of
|
||||
Licensee; (ii) was known to Licensee, without restriction, at the time of
|
||||
disclosure as proven by the files of Licensee in existence at the time of
|
||||
disclosure; or (iii) becomes known to Licensee, without restriction, from a
|
||||
source other than Broadcom without breach of this Agreement by Licensee and
|
||||
otherwise not in violation of Broadcom’s rights.
|
||||
|
||||
5.2. Return of Confidential Information. Notwithstanding the foregoing, all
|
||||
documents and other tangible objects containing or representing Broadcom
|
||||
Confidential Information and all copies thereof which are in the possession of
|
||||
Licensee shall be and remain the property of Broadcom, and shall be promptly
|
||||
returned to Broadcom upon written request by Broadcom or upon termination of
|
||||
this Agreement.
|
||||
|
||||
6. LIMITATION OF LIABILITY TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO
|
||||
EVENT SHALL BROADCOM OR ANY OF BROADCOM’S LICENSORS HAVE ANY LIABILITY FOR ANY
|
||||
INDIRECT, INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER FOR BREACH OF CONTRACT, TORT (INCLUDING
|
||||
NEGLIGENCE) OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, INCLUDING BUT NOT
|
||||
LIMITED TO LOSS OF PROFITS, EVEN IF SUCH PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES. IN NO EVENT WILL BROADCOM’S LIABILITY WHETHER IN
|
||||
CONTRACT, TORT (INCLUDING NEGLIGENCE), OR OTHERWISE, EXCEED THE AMOUNT PAID BY
|
||||
LICENSEE FOR SOFTWARE UNDER THIS AGREEMENT. THESE LIMITATIONS SHALL APPLY
|
||||
NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF ANY LIMITED REMEDY.
|
||||
|
||||
7. MISCELLANEOUS
|
||||
|
||||
7.1. Export Regulations. YOU UNDERSTAND AND AGREE THAT THE SOFTWARE IS
|
||||
SUBJECT TO UNITED STATES AND OTHER APPLICABLE EXPORT-RELATED LAWS AND
|
||||
REGULATIONS AND THAT YOU MAY NOT EXPORT, RE-EXPORT OR TRANSFER THE SOFTWARE OR
|
||||
ANY DIRECT PRODUCT OF THE SOFTWARE EXCEPT AS PERMITTED UNDER THOSE LAWS.
|
||||
WITHOUT LIMITING THE FOREGOING, EXPORT, RE-EXPORT OR TRANSFER OF THE SOFTWARE
|
||||
TO CUBA, IRAN, NORTH KOREA, SUDAN AND SYRIA IS PROHIBITED.
|
||||
|
||||
7.2 Assignment. This Agreement shall be binding upon and inure to the
|
||||
benefit of the parties and their respective successors and assigns, provided,
|
||||
however that Licensee may not assign this Agreement or any rights or obligation
|
||||
hereunder, directly or indirectly, by operation of law or otherwise, without
|
||||
the prior written consent of Broadcom, and any such attempted assignment shall
|
||||
be void. Notwithstanding the foregoing, Licensee may assign this Agreement to
|
||||
a successor to all or substantially all of its business or assets to which this
|
||||
Agreement relates that is not a competitor of Broadcom.
|
||||
|
||||
7.3. Governing Law; Venue. This Agreement shall be governed by the laws of
|
||||
California without regard to any conflict-of-laws rules, and the United Nations
|
||||
Convention on Contracts for the International Sale of Goods is hereby excluded.
|
||||
The sole jurisdiction and venue for actions related to the subject matter
|
||||
hereof shall be the state and federal courts located in the County of Orange,
|
||||
California, and both parties hereby consent to such jurisdiction and venue.
|
||||
|
||||
7.4. Severability. All terms and provisions of this Agreement shall, if
|
||||
possible, be construed in a manner which makes them valid, but in the event any
|
||||
term or provision of this Agreement is found by a court of competent
|
||||
jurisdiction to be illegal or unenforceable, the validity or enforceability of
|
||||
the remainder of this Agreement shall not be affected if the illegal or
|
||||
unenforceable provision does not materially affect the intent of this
|
||||
Agreement. If the illegal or unenforceable provision materially affects the
|
||||
intent of the parties to this Agreement, this Agreement shall become
|
||||
terminated.
|
||||
|
||||
7.5. Equitable Relief. Licensee hereby acknowledges that its breach of this
|
||||
Agreement would cause irreparable harm and significant injury to Broadcom that
|
||||
may be difficult to ascertain and that a remedy at law would be inadequate.
|
||||
Accordingly, Licensee agrees that Broadcom shall have the right to seek and
|
||||
obtain immediate injunctive relief to enforce obligations under the Agreement
|
||||
in addition to any other rights and remedies it may have.
|
||||
|
||||
7.6. Waiver. The waiver of, or failure to enforce, any breach or default
|
||||
hereunder shall not constitute the waiver of any other or subsequent breach or
|
||||
default.
|
||||
|
||||
7.7. Entire Agreement. This Agreement sets forth the entire Agreement
|
||||
between the parties and supersedes any and all prior proposals, agreements and
|
||||
representations between them, whether written or oral concerning the Software.
|
||||
This Agreement may be changed only by mutual agreement of the parties in
|
||||
writing.
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,66 @@
|
||||
# NVRAM file for BCM943430WLPTH
|
||||
# 2.4 GHz, 20 MHz BW mode
|
||||
|
||||
# The following parameter values are just placeholders, need to be updated.
|
||||
manfid=0x2d0
|
||||
prodid=0x0727
|
||||
vendid=0x14e4
|
||||
devid=0x43e2
|
||||
boardtype=0x0727
|
||||
boardrev=0x1101
|
||||
boardnum=22
|
||||
macaddr=00:90:4c:c5:12:38
|
||||
sromrev=11
|
||||
boardflags=0x00404201
|
||||
boardflags3=0x08000000
|
||||
xtalfreq=37400
|
||||
nocrc=1
|
||||
ag0=255
|
||||
aa2g=1
|
||||
ccode=ALL
|
||||
|
||||
pa0itssit=0x20
|
||||
extpagain2g=0
|
||||
#PA parameters for 2.4GHz, measured at CHIP OUTPUT
|
||||
pa2ga0=-168,7161,-820
|
||||
AvVmid_c0=0x0,0xc8
|
||||
cckpwroffset0=5
|
||||
|
||||
# PPR params
|
||||
maxp2ga0=84
|
||||
txpwrbckof=6
|
||||
cckbw202gpo=0
|
||||
legofdmbw202gpo=0x66111111
|
||||
mcsbw202gpo=0x77711111
|
||||
propbw202gpo=0xdd
|
||||
|
||||
# OFDM IIR :
|
||||
ofdmdigfilttype=18
|
||||
ofdmdigfilttypebe=18
|
||||
# PAPD mode:
|
||||
papdmode=1
|
||||
papdvalidtest=1
|
||||
pacalidx2g=42
|
||||
papdepsoffset=-22
|
||||
papdendidx=58
|
||||
|
||||
# LTECX flags
|
||||
ltecxmux=0
|
||||
ltecxpadnum=0x0102
|
||||
ltecxfnsel=0x44
|
||||
ltecxgcigpio=0x01
|
||||
|
||||
il0macaddr=00:90:4c:c5:12:38
|
||||
wl0id=0x431b
|
||||
|
||||
deadman_to=0xffffffff
|
||||
# muxenab: 0x1 for UART enable, 0x2 for GPIOs, 0x8 for JTAG
|
||||
muxenab=0x1
|
||||
# CLDO PWM voltage settings - 0x4 - 1.1 volt
|
||||
#cldo_pwm=0x4
|
||||
|
||||
#VCO freq 326.4MHz
|
||||
spurconfig=0x3
|
||||
|
||||
edonthd20l=-75
|
||||
edoffthd20ul=-80
|
||||
33
recipes-kernel/linux-firmware/linux-firmware_git.bbappend
Normal file
33
recipes-kernel/linux-firmware/linux-firmware_git.bbappend
Normal file
@@ -0,0 +1,33 @@
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
LICENSE_append = " & Firmware-broadcom_brcm80211"
|
||||
|
||||
LIC_FILES_CHKSUM_append = " file://${WORKDIR}/LICENSE.broadcom_brcm80211;md5=8cba1397cda6386db37210439a0da3eb"
|
||||
|
||||
NO_GENERIC_LICENSE[Firmware-broadcom_brcm80211] = "LICENSE.broadcom_brcm80211"
|
||||
|
||||
SRC_URI_append = " \
|
||||
file://brcmfmac43430-sdio.bin \
|
||||
file://brcmfmac43430-sdio.txt \
|
||||
file://LICENSE.broadcom_brcm80211 \
|
||||
"
|
||||
|
||||
do_install_append() {
|
||||
cp ${WORKDIR}/brcmfmac43430-sdio.* ${D}/lib/firmware/brcm/
|
||||
cp ${WORKDIR}/LICENSE.broadcom_brcm80211 ${D}/lib/firmware/
|
||||
}
|
||||
|
||||
PACKAGES =+ "${PN}-brcm43430 ${PN}-brcm43430-license"
|
||||
|
||||
LICENSE_${PN}-brcm43430 = "Firmware-broadcom_brcm80211"
|
||||
FILES_${PN}-brcm43430-license = "/lib/firmware/LICENSE.broadcom_brcm80211"
|
||||
FILES_${PN}-brcm43430 = " \
|
||||
/lib/firmware/brcm/brcmfmac43430-sdio.bin \
|
||||
/lib/firmware/brcm/brcmfmac43430-sdio.txt \
|
||||
"
|
||||
|
||||
RDEPENDS_${PN}-brcm43430 += "${PN}-brcm43430-license"
|
||||
|
||||
ALTERNATIVE_LINK_NAME[brcmfmac-sdio.bin] = "/lib/firmware/brcm/brcmfmac-sdio.bin"
|
||||
ALTERNATIVE_TARGET_linux-firmware-brcm43430[brcmfmac-sdio.bin] = "/lib/firmware/brcm/brcmfmac43430-sdio.bin"
|
||||
ALTERNATIVE_linux-firmware-brcm43430 = "brcmfmac-sdio.bin"
|
||||
@@ -1,12 +0,0 @@
|
||||
require recipes-kernel/linux-libc-headers/linux-libc-headers.inc
|
||||
|
||||
PR = "r0"
|
||||
|
||||
PROVIDES = "linux-libc-headers"
|
||||
RPROVIDES_${PN}-dev = "linux-libc-headers-dev"
|
||||
RPROVIDES_${PN}-dbg = "linux-libc-headers-dbg"
|
||||
|
||||
SRCREV = "10182a3bc434b27740f81c2b836a1af943060241"
|
||||
SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.2.27 \
|
||||
"
|
||||
S = "${WORKDIR}/git"
|
||||
@@ -0,0 +1,110 @@
|
||||
From 2f44861e2a2d651a9aa62a75343a032fee33e93b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petter=20Mab=C3=A4cker?= <petter@technux.se>
|
||||
Date: Fri, 8 Jan 2016 09:02:44 +0100
|
||||
Subject: [PATCH] dts: add overlay for pitft22 in linux 3.18
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Add the pitft22 overlay from adafruit Adafruit-Pi-Kernel-o-Matic repo:
|
||||
https://github.com/adafruit/Adafruit-Pi-Kernel-o-Matic
|
||||
|
||||
Signed-off-by: Petter Mabäcker <petter@technux.se>
|
||||
---
|
||||
arch/arm/boot/dts/overlays/Makefile | 1 +
|
||||
arch/arm/boot/dts/overlays/pitft22-overlay.dts | 69 ++++++++++++++++++++++++++
|
||||
2 files changed, 70 insertions(+)
|
||||
create mode 100755 arch/arm/boot/dts/overlays/pitft22-overlay.dts
|
||||
|
||||
diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile
|
||||
index c766616..1eaaf81 100644
|
||||
--- a/arch/arm/boot/dts/overlays/Makefile
|
||||
+++ b/arch/arm/boot/dts/overlays/Makefile
|
||||
@@ -27,6 +27,7 @@ dtb-$(RPI_DT_OVERLAYS) += mcp2515-can0-overlay.dtb
|
||||
dtb-$(RPI_DT_OVERLAYS) += mmc-overlay.dtb
|
||||
dtb-$(RPI_DT_OVERLAYS) += mz61581-overlay.dtb
|
||||
dtb-$(RPI_DT_OVERLAYS) += piscreen-overlay.dtb
|
||||
+dtb-$(RPI_DT_OVERLAYS) += pitft22-overlay.dtb
|
||||
dtb-$(RPI_DT_OVERLAYS) += pitft28-resistive-overlay.dtb
|
||||
dtb-$(RPI_DT_OVERLAYS) += pps-gpio-overlay.dtb
|
||||
dtb-$(RPI_DT_OVERLAYS) += rpi-dac-overlay.dtb
|
||||
diff --git a/arch/arm/boot/dts/overlays/pitft22-overlay.dts b/arch/arm/boot/dts/overlays/pitft22-overlay.dts
|
||||
new file mode 100755
|
||||
index 0000000..894ba22
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlays/pitft22-overlay.dts
|
||||
@@ -0,0 +1,69 @@
|
||||
+/*
|
||||
+ * Device Tree overlay for pitft by Adafruit
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+/plugin/;
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
|
||||
+
|
||||
+ fragment@0 {
|
||||
+ target = <&spi0>;
|
||||
+ __overlay__ {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ spidev@0{
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ spidev@1{
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ fragment@1 {
|
||||
+ target = <&gpio>;
|
||||
+ __overlay__ {
|
||||
+ pitft_pins: pitft_pins {
|
||||
+ brcm,pins = <25>;
|
||||
+ brcm,function = <1>; /* out */
|
||||
+ brcm,pull = <0>; /* none */
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ fragment@2 {
|
||||
+ target = <&spi0>;
|
||||
+ __overlay__ {
|
||||
+ /* needed to avoid dtc warning */
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ pitft: pitft@0{
|
||||
+ compatible = "ilitek,ili9340";
|
||||
+ reg = <0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pitft_pins>;
|
||||
+
|
||||
+ spi-max-frequency = <32000000>;
|
||||
+ rotate = <90>;
|
||||
+ fps = <25>;
|
||||
+ bgr;
|
||||
+ buswidth = <8>;
|
||||
+ dc-gpios = <&gpio 25 0>;
|
||||
+ debug = <0>;
|
||||
+ };
|
||||
+
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ __overrides__ {
|
||||
+ speed = <&pitft>,"spi-max-frequency:0";
|
||||
+ rotate = <&pitft>,"rotate:0";
|
||||
+ fps = <&pitft>,"fps:0";
|
||||
+ debug = <&pitft>,"debug:0";
|
||||
+ };
|
||||
+};
|
||||
--
|
||||
1.9.1
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
From a28bd410022b32a64e208f04b45add6326990332 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petter=20Mab=C3=A4cker?= <petter@technux.se>
|
||||
Date: Fri, 8 Jan 2016 09:02:44 +0100
|
||||
Subject: [PATCH] dts: add overlay for pitft22
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Add the pitft22 overlay from adafruit Adafruit-Pi-Kernel-o-Matic repo:
|
||||
https://github.com/adafruit/Adafruit-Pi-Kernel-o-Matic
|
||||
|
||||
Signed-off-by: Petter Mabäcker <petter@technux.se>
|
||||
---
|
||||
arch/arm/boot/dts/overlays/Makefile | 1 +
|
||||
arch/arm/boot/dts/overlays/pitft22-overlay.dts | 69 ++++++++++++++++++++++++++
|
||||
2 files changed, 70 insertions(+)
|
||||
create mode 100755 arch/arm/boot/dts/overlays/pitft22-overlay.dts
|
||||
|
||||
diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile
|
||||
index 1a60e9c..a2535a2 100644
|
||||
--- a/arch/arm/boot/dts/overlays/Makefile
|
||||
+++ b/arch/arm/boot/dts/overlays/Makefile
|
||||
@@ -37,6 +37,7 @@ dtb-$(RPI_DT_OVERLAYS) += mmc-overlay.dtb
|
||||
dtb-$(RPI_DT_OVERLAYS) += mz61581-overlay.dtb
|
||||
dtb-$(RPI_DT_OVERLAYS) += piscreen-overlay.dtb
|
||||
dtb-$(RPI_DT_OVERLAYS) += piscreen2r-overlay.dtb
|
||||
+dtb-$(RPI_DT_OVERLAYS) += pitft22-overlay.dtb
|
||||
dtb-$(RPI_DT_OVERLAYS) += pitft28-capacitive-overlay.dtb
|
||||
dtb-$(RPI_DT_OVERLAYS) += pitft28-resistive-overlay.dtb
|
||||
dtb-$(RPI_DT_OVERLAYS) += pps-gpio-overlay.dtb
|
||||
diff --git a/arch/arm/boot/dts/overlays/pitft22-overlay.dts b/arch/arm/boot/dts/overlays/pitft22-overlay.dts
|
||||
new file mode 100755
|
||||
index 0000000..894ba22
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/overlays/pitft22-overlay.dts
|
||||
@@ -0,0 +1,69 @@
|
||||
+/*
|
||||
+ * Device Tree overlay for pitft by Adafruit
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+/plugin/;
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
|
||||
+
|
||||
+ fragment@0 {
|
||||
+ target = <&spi0>;
|
||||
+ __overlay__ {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ spidev@0{
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ spidev@1{
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ fragment@1 {
|
||||
+ target = <&gpio>;
|
||||
+ __overlay__ {
|
||||
+ pitft_pins: pitft_pins {
|
||||
+ brcm,pins = <25>;
|
||||
+ brcm,function = <1>; /* out */
|
||||
+ brcm,pull = <0>; /* none */
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ fragment@2 {
|
||||
+ target = <&spi0>;
|
||||
+ __overlay__ {
|
||||
+ /* needed to avoid dtc warning */
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ pitft: pitft@0{
|
||||
+ compatible = "ilitek,ili9340";
|
||||
+ reg = <0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pitft_pins>;
|
||||
+
|
||||
+ spi-max-frequency = <32000000>;
|
||||
+ rotate = <90>;
|
||||
+ fps = <25>;
|
||||
+ bgr;
|
||||
+ buswidth = <8>;
|
||||
+ dc-gpios = <&gpio 25 0>;
|
||||
+ debug = <0>;
|
||||
+ };
|
||||
+
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ __overrides__ {
|
||||
+ speed = <&pitft>,"spi-max-frequency:0";
|
||||
+ rotate = <&pitft>,"rotate:0";
|
||||
+ fps = <&pitft>,"fps:0";
|
||||
+ debug = <&pitft>,"debug:0";
|
||||
+ };
|
||||
+};
|
||||
--
|
||||
1.9.1
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
The code using it also ifdef'ed with 0, anyyd gcc 6
|
||||
complains
|
||||
|
||||
error: 'sm_cache_map_vector' defined but not used
|
||||
|
||||
The code using it also ifdef'ed out
|
||||
|
||||
Upstream-status: Denied [https://github.com/raspberrypi/linux/pull/1528]
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
drivers/char/broadcom/vc_sm/vmcs_sm.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/drivers/char/broadcom/vc_sm/vmcs_sm.c
|
||||
+++ b/drivers/char/broadcom/vc_sm/vmcs_sm.c
|
||||
@@ -197,12 +197,14 @@ struct SM_STATE_T {
|
||||
static struct SM_STATE_T *sm_state;
|
||||
static int sm_inited;
|
||||
|
||||
+#if 0
|
||||
static const char *const sm_cache_map_vector[] = {
|
||||
"(null)",
|
||||
"host",
|
||||
"videocore",
|
||||
"host+videocore",
|
||||
};
|
||||
+#endif
|
||||
|
||||
/* ---- Private Function Prototypes -------------------------------------- */
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
Fix compile with GCC6
|
||||
|
||||
Upstream-status: Denied [https://github.com/raspberrypi/linux/pull/1528]
|
||||
|
||||
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
|
||||
|
||||
Index: source/include/linux/compiler-gcc6.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ source/include/linux/compiler-gcc6.h
|
||||
@@ -0,0 +1,67 @@
|
||||
+#ifndef __LINUX_COMPILER_H
|
||||
+#error "Please don't include <linux/compiler-gcc5.h> directly, include <linux/compiler.h> instead."
|
||||
+#endif
|
||||
+
|
||||
+#define __used __attribute__((__used__))
|
||||
+#define __must_check __attribute__((warn_unused_result))
|
||||
+#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
|
||||
+
|
||||
+/* Mark functions as cold. gcc will assume any path leading to a call
|
||||
+ to them will be unlikely. This means a lot of manual unlikely()s
|
||||
+ are unnecessary now for any paths leading to the usual suspects
|
||||
+ like BUG(), printk(), panic() etc. [but let's keep them for now for
|
||||
+ older compilers]
|
||||
+
|
||||
+ Early snapshots of gcc 4.3 don't support this and we can't detect this
|
||||
+ in the preprocessor, but we can live with this because they're unreleased.
|
||||
+ Maketime probing would be overkill here.
|
||||
+
|
||||
+ gcc also has a __attribute__((__hot__)) to move hot functions into
|
||||
+ a special section, but I don't see any sense in this right now in
|
||||
+ the kernel context */
|
||||
+#define __cold __attribute__((__cold__))
|
||||
+
|
||||
+#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
|
||||
+
|
||||
+#ifndef __CHECKER__
|
||||
+# define __compiletime_warning(message) __attribute__((warning(message)))
|
||||
+# define __compiletime_error(message) __attribute__((error(message)))
|
||||
+#endif /* __CHECKER__ */
|
||||
+
|
||||
+/*
|
||||
+ * Mark a position in code as unreachable. This can be used to
|
||||
+ * suppress control flow warnings after asm blocks that transfer
|
||||
+ * control elsewhere.
|
||||
+ *
|
||||
+ * Early snapshots of gcc 4.5 don't support this and we can't detect
|
||||
+ * this in the preprocessor, but we can live with this because they're
|
||||
+ * unreleased. Really, we need to have autoconf for the kernel.
|
||||
+ */
|
||||
+#define unreachable() __builtin_unreachable()
|
||||
+
|
||||
+/* Mark a function definition as prohibited from being cloned. */
|
||||
+#define __noclone __attribute__((__noclone__))
|
||||
+
|
||||
+/*
|
||||
+ * Tell the optimizer that something else uses this function or variable.
|
||||
+ */
|
||||
+#define __visible __attribute__((externally_visible))
|
||||
+
|
||||
+/*
|
||||
+ * GCC 'asm goto' miscompiles certain code sequences:
|
||||
+ *
|
||||
+ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
|
||||
+ *
|
||||
+ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek.
|
||||
+ *
|
||||
+ * (asm goto is automatically volatile - the naming reflects this.)
|
||||
+ */
|
||||
+#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
|
||||
+
|
||||
+#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
|
||||
+#define __HAVE_BUILTIN_BSWAP32__
|
||||
+#define __HAVE_BUILTIN_BSWAP64__
|
||||
+#define __HAVE_BUILTIN_BSWAP16__
|
||||
+#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */
|
||||
+
|
||||
+#define KASAN_ABI_VERSION 4
|
||||
69
recipes-kernel/linux/linux-raspberrypi.inc
Normal file
69
recipes-kernel/linux/linux-raspberrypi.inc
Normal file
@@ -0,0 +1,69 @@
|
||||
require linux-rpi.inc
|
||||
inherit linux-raspberrypi-base
|
||||
|
||||
DESCRIPTION = "Linux Kernel for Raspberry Pi"
|
||||
SECTION = "kernel"
|
||||
LICENSE = "GPLv2"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
|
||||
|
||||
SRC_URI += " \
|
||||
file://defconfig \
|
||||
"
|
||||
|
||||
COMPATIBLE_MACHINE = "raspberrypi"
|
||||
|
||||
PE = "1"
|
||||
PV = "${LINUX_VERSION}+git${SRCPV}"
|
||||
|
||||
# NOTE: For now we pull in the default config from the RPi kernel GIT tree.
|
||||
KERNEL_DEFCONFIG_raspberrypi ?= "bcmrpi_defconfig"
|
||||
KERNEL_DEFCONFIG_raspberrypi2 ?= "bcm2709_defconfig"
|
||||
|
||||
# CMDLINE for raspberrypi
|
||||
CMDLINE = "dwc_otg.lpm_enable=0 console=serial0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
|
||||
|
||||
# Add the kernel debugger over console kernel command line option if enabled
|
||||
CMDLINE_append = ' ${@base_conditional("ENABLE_KGDB", "1", "kgdboc=serial0,115200", "", d)}'
|
||||
|
||||
UDEV_GE_141 ?= "1"
|
||||
|
||||
KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains("MACHINE_FEATURES", "pitft28r", "stmpe-ts", "", d)}"
|
||||
|
||||
# Set programmatically some variables during recipe parsing
|
||||
# See http://www.yoctoproject.org/docs/current/bitbake-user-manual/bitbake-user-manual.html#anonymous-python-functions
|
||||
python __anonymous () {
|
||||
kerneltype = d.getVar('KERNEL_IMAGETYPE', True)
|
||||
kerneldt = get_dts(d, d.getVar('LINUX_VERSION', True))
|
||||
d.setVar("KERNEL_DEVICETREE", kerneldt)
|
||||
}
|
||||
|
||||
do_kernel_configme_prepend() {
|
||||
install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig || die "No default configuration for ${MACHINE} / ${KERNEL_DEFCONFIG} available."
|
||||
}
|
||||
|
||||
do_install_prepend() {
|
||||
install -d ${D}/lib/firmware
|
||||
}
|
||||
|
||||
do_deploy_append() {
|
||||
# Deploy cmdline.txt
|
||||
install -d ${DEPLOYDIR}/bcm2835-bootfiles
|
||||
PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
|
||||
if [ ${PITFT} = "1" ]; then
|
||||
PITFT_PARAMS="fbcon=map:10 fbcon=font:VGA8x8"
|
||||
fi
|
||||
echo "${CMDLINE}${PITFT_PARAMS}" > ${DEPLOYDIR}/bcm2835-bootfiles/cmdline.txt
|
||||
}
|
||||
|
||||
do_bundle_initramfs_append() {
|
||||
if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then
|
||||
if test "x${KERNEL_IMAGETYPE}" != "xuImage" ; then
|
||||
if test -n "${KERNEL_DEVICETREE}"; then
|
||||
# Add RPi bootloader trailer to kernel image to enable DeviceTree support
|
||||
for type in ${KERNEL_IMAGETYPES} ; do
|
||||
${STAGING_BINDIR_NATIVE}/mkknlimg --dtok ${KERNEL_OUTPUT_DIR}/$type.initramfs ${KERNEL_OUTPUT_DIR}/$type.initramfs
|
||||
done
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
1
recipes-kernel/linux/linux-raspberrypi/defconfig
Normal file
1
recipes-kernel/linux/linux-raspberrypi/defconfig
Normal file
@@ -0,0 +1 @@
|
||||
# Dummy file to get through do_kernel_configme.
|
||||
14
recipes-kernel/linux/linux-raspberrypi_3.18.bb
Normal file
14
recipes-kernel/linux/linux-raspberrypi_3.18.bb
Normal file
@@ -0,0 +1,14 @@
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
|
||||
|
||||
LINUX_VERSION ?= "3.18.16"
|
||||
|
||||
SRCREV = "1bb18c8f721ef674a447f3622273f2e2de7a205c"
|
||||
SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.18.y \
|
||||
file://0001-dts-add-overlay-for-pitft22.patch \
|
||||
"
|
||||
require linux-raspberrypi.inc
|
||||
|
||||
# Create missing out of tree 'overlays' directory prior to install step
|
||||
do_compile_prepend() {
|
||||
mkdir -p ${B}/arch/arm/boot/dts/overlays
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
require linux.inc
|
||||
|
||||
DESCRIPTION = "Linux kernel for the RaspberryPi board"
|
||||
COMPATIBLE_MACHINE = "raspberrypi"
|
||||
|
||||
PR = "r6"
|
||||
PV_append = "+git${SRCREV}"
|
||||
|
||||
SRCREV = "10182a3bc434b27740f81c2b836a1af943060241"
|
||||
SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.2.27 \
|
||||
"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
# NOTE: For now we pull in the default config from the RPi kernel GIT tree.
|
||||
KERNEL_DEFCONFIG = "bcmrpi_defconfig"
|
||||
|
||||
# CMDLINE for raspberrypi
|
||||
CMDLINE_raspberrypi = "dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
|
||||
|
||||
UDEV_GE_141 ?= "1"
|
||||
|
||||
do_configure_prepend() {
|
||||
install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig || die "No default configuration for ${MACHINE} / ${KERNEL_DEFCONFIG} available."
|
||||
}
|
||||
|
||||
do_install_prepend() {
|
||||
install -d ${D}/lib/firmware
|
||||
}
|
||||
|
||||
do_deploy_append() {
|
||||
# Deploy cmdline.txt
|
||||
install -d ${DEPLOYDIR}/bcm2835-bootfiles
|
||||
echo "${CMDLINE}" > ${DEPLOYDIR}/bcm2835-bootfiles/cmdline.txt
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
require linux.inc
|
||||
|
||||
DESCRIPTION = "Linux kernel for the RaspberryPi board"
|
||||
COMPATIBLE_MACHINE = "raspberrypi"
|
||||
|
||||
PR = "r6"
|
||||
PV_append = "+git${SRCREV}"
|
||||
|
||||
SRCREV = "31a951046155b27361127d9cf85a1f58719fe9b3"
|
||||
SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.6.y \
|
||||
"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
# NOTE: For now we pull in the default config from the RPi kernel GIT tree.
|
||||
KERNEL_DEFCONFIG = "bcmrpi_defconfig"
|
||||
|
||||
# CMDLINE for raspberrypi
|
||||
CMDLINE_raspberrypi = "dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
|
||||
|
||||
UDEV_GE_141 ?= "1"
|
||||
|
||||
do_configure_prepend() {
|
||||
install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig || die "No default configuration for ${MACHINE} / ${KERNEL_DEFCONFIG} available."
|
||||
}
|
||||
|
||||
do_install_prepend() {
|
||||
install -d ${D}/lib/firmware
|
||||
}
|
||||
|
||||
do_deploy_append() {
|
||||
# Deploy cmdline.txt
|
||||
install -d ${DEPLOYDIR}/bcm2835-bootfiles
|
||||
echo "${CMDLINE}" > ${DEPLOYDIR}/bcm2835-bootfiles/cmdline.txt
|
||||
}
|
||||
12
recipes-kernel/linux/linux-raspberrypi_4.1.bb
Normal file
12
recipes-kernel/linux/linux-raspberrypi_4.1.bb
Normal file
@@ -0,0 +1,12 @@
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
|
||||
|
||||
LINUX_VERSION ?= "4.1.21"
|
||||
|
||||
SRCREV = "ff45bc0e8917c77461b2901e2743e6339bb70413"
|
||||
SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-4.1.y \
|
||||
file://0001-dts-add-overlay-for-pitft22.patch \
|
||||
file://0002-vmcs-Remove-unused-sm_cache_map_vector-definition.patch \
|
||||
file://0003-fix-gcc6.patch \
|
||||
"
|
||||
|
||||
require linux-raspberrypi.inc
|
||||
8
recipes-kernel/linux/linux-raspberrypi_4.4.bb
Normal file
8
recipes-kernel/linux/linux-raspberrypi_4.4.bb
Normal file
@@ -0,0 +1,8 @@
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
|
||||
|
||||
LINUX_VERSION ?= "4.4.13"
|
||||
|
||||
SRCREV = "680be5e27a9593cf26079c6e5744a04cc2809d13"
|
||||
SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-4.4.y \
|
||||
"
|
||||
require linux-raspberrypi.inc
|
||||
138
recipes-kernel/linux/linux-rpi.inc
Normal file
138
recipes-kernel/linux/linux-rpi.inc
Normal file
@@ -0,0 +1,138 @@
|
||||
DESCRIPTION = "Linux Kernel"
|
||||
SECTION = "kernel"
|
||||
LICENSE = "GPLv2"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
|
||||
|
||||
inherit kernel siteinfo
|
||||
require recipes-kernel/linux/linux-yocto.inc
|
||||
|
||||
# Enable OABI compat for people stuck with obsolete userspace
|
||||
ARM_KEEP_OABI ?= "1"
|
||||
|
||||
# Quirk for udev greater or equal 141
|
||||
UDEV_GE_141 ?= "1"
|
||||
|
||||
# Set the verbosity of kernel messages during runtime
|
||||
# You can define CMDLINE_DEBUG in your local.conf or distro.conf to override this behaviour
|
||||
CMDLINE_DEBUG ?= '${@base_conditional("DISTRO_TYPE", "release", "quiet", "debug", d)}'
|
||||
CMDLINE_append = " ${CMDLINE_DEBUG}"
|
||||
|
||||
KERNEL_INITRAMFS ?= '${@base_conditional("INITRAMFS_IMAGE_BUNDLE", "1", "1", "", d)}'
|
||||
|
||||
# Set a variable in .configure
|
||||
# $1 - Configure variable to be set
|
||||
# $2 - value [n/y/value]
|
||||
kernel_configure_variable() {
|
||||
# Remove the config
|
||||
CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_$1[ =]/d;"
|
||||
if test "$2" = "n"
|
||||
then
|
||||
echo "# CONFIG_$1 is not set" >> ${B}/.config
|
||||
else
|
||||
echo "CONFIG_$1=$2" >> ${B}/.config
|
||||
fi
|
||||
}
|
||||
|
||||
do_configure_prepend() {
|
||||
# Clean .config
|
||||
echo "" > ${B}/.config
|
||||
CONF_SED_SCRIPT=""
|
||||
|
||||
# oabi / eabi support
|
||||
kernel_configure_variable AEABI y
|
||||
if [ "${ARM_KEEP_OABI}" = "1" ] ; then
|
||||
kernel_configure_variable OABI_COMPAT y
|
||||
else
|
||||
kernel_configure_variable OABI_COMPAT n
|
||||
fi
|
||||
|
||||
# Set cmdline
|
||||
kernel_configure_variable CMDLINE "\"${CMDLINE}\""
|
||||
|
||||
# Localversion
|
||||
kernel_configure_variable LOCALVERSION "\"\""
|
||||
kernel_configure_variable LOCALVERSION_AUTO n
|
||||
|
||||
# Udev quirks
|
||||
# Newer versions of udev mandate that sysfs doesn't have deprecated entries
|
||||
if [ "${UDEV_GE_141}" = "1" ] ; then
|
||||
kernel_configure_variable SYSFS_DEPRECATED n
|
||||
kernel_configure_variable SYSFS_DEPRECATED_V2 n
|
||||
kernel_configure_variable HOTPLUG y
|
||||
kernel_configure_variable UEVENT_HELPER_PATH "\"\""
|
||||
kernel_configure_variable UNIX y
|
||||
kernel_configure_variable SYSFS y
|
||||
kernel_configure_variable PROC_FS y
|
||||
kernel_configure_variable TMPFS y
|
||||
kernel_configure_variable INOTIFY_USER y
|
||||
kernel_configure_variable SIGNALFD y
|
||||
kernel_configure_variable TMPFS_POSIX_ACL y
|
||||
kernel_configure_variable BLK_DEV_BSG y
|
||||
kernel_configure_variable DEVTMPFS y
|
||||
kernel_configure_variable DEVTMPFS_MOUNT y
|
||||
fi
|
||||
|
||||
# Newer inits like systemd need cgroup support
|
||||
if [ "${KERNEL_ENABLE_CGROUPS}" = "1" ] ; then
|
||||
kernel_configure_variable CGROUP_SCHED y
|
||||
kernel_configure_variable CGROUPS y
|
||||
kernel_configure_variable CGROUP_NS y
|
||||
kernel_configure_variable CGROUP_FREEZER y
|
||||
kernel_configure_variable CGROUP_DEVICE y
|
||||
kernel_configure_variable CPUSETS y
|
||||
kernel_configure_variable PROC_PID_CPUSET y
|
||||
kernel_configure_variable CGROUP_CPUACCT y
|
||||
kernel_configure_variable RESOURCE_COUNTERS y
|
||||
fi
|
||||
|
||||
# root-over-nfs-over-usb-eth support. Limited, but should cover some cases
|
||||
# Enable this by setting a proper CMDLINE_NFSROOT_USB.
|
||||
if [ ! -z "${CMDLINE_NFSROOT_USB}" ]; then
|
||||
oenote "Configuring the kernel for root-over-nfs-over-usb-eth with CMDLINE ${CMDLINE_NFSROOT_USB}"
|
||||
kernel_configure_variable INET y
|
||||
kernel_configure_variable IP_PNP y
|
||||
kernel_configure_variable USB_GADGET y
|
||||
kernel_configure_variable USB_GADGET_SELECTED y
|
||||
kernel_configure_variable USB_ETH y
|
||||
kernel_configure_variable NFS_FS y
|
||||
kernel_configure_variable ROOT_NFS y
|
||||
kernel_configure_variable ROOT_NFS y
|
||||
kernel_configure_variable CMDLINE "\"${CMDLINE_NFSROOT_USB}\""
|
||||
fi
|
||||
if [ ! -z "${KERNEL_INITRAMFS}" ]; then
|
||||
kernel_configure_variable BLK_DEV_INITRD y
|
||||
kernel_configure_variable INITRAMFS_SOURCE ""
|
||||
kernel_configure_variable RD_GZIP y
|
||||
kernel_configure_variable OVERLAY_FS y
|
||||
kernel_configure_variable SQUASHFS y
|
||||
kernel_configure_variable UBIFS_FS y
|
||||
fi
|
||||
# Activate CONFIG_LEGACY_PTYS
|
||||
kernel_configure_variable LEGACY_PTYS y
|
||||
|
||||
# Keep this the last line
|
||||
# Remove all modified configs and add the rest to .config
|
||||
sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${B}/.config'
|
||||
|
||||
yes '' | oe_runmake oldconfig
|
||||
}
|
||||
|
||||
# Automatically depend on lzop-native if CONFIG_KERNEL_LZO is enabled
|
||||
python () {
|
||||
try:
|
||||
defconfig = bb.fetch2.localpath('file://defconfig', d)
|
||||
except bb.fetch2.FetchError:
|
||||
return
|
||||
|
||||
try:
|
||||
configfile = open(defconfig)
|
||||
except IOError:
|
||||
return
|
||||
|
||||
if 'CONFIG_KERNEL_LZO=y\n' in configfile.readlines():
|
||||
depends = d.getVar('DEPENDS', False)
|
||||
d.setVar('DEPENDS', depends + ' lzop-native')
|
||||
|
||||
configfile.close()
|
||||
}
|
||||
@@ -1,131 +0,0 @@
|
||||
DESCRIPTION = "Linux Kernel"
|
||||
SECTION = "kernel"
|
||||
LICENSE = "GPLv2"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
|
||||
|
||||
inherit kernel siteinfo
|
||||
|
||||
# Enable OABI compat for people stuck with obsolete userspace
|
||||
ARM_KEEP_OABI ?= "1"
|
||||
|
||||
# Quirk for udev greater or equal 141
|
||||
UDEV_GE_141 ?= "1"
|
||||
|
||||
# Set the verbosity of kernel messages during runtime
|
||||
# You can define CMDLINE_DEBUG in your local.conf or distro.conf to override this behaviour
|
||||
CMDLINE_DEBUG ?= '${@base_conditional("DISTRO_TYPE", "release", "quiet", "debug", d)}'
|
||||
CMDLINE_append = " ${CMDLINE_DEBUG}"
|
||||
|
||||
# Set a variable in .configure
|
||||
# $1 - Configure variable to be set
|
||||
# $2 - value [n/y/value]
|
||||
kernel_configure_variable() {
|
||||
# Remove the config
|
||||
CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_$1[ =]/d;"
|
||||
if test "$2" = "n"
|
||||
then
|
||||
echo "# CONFIG_$1 is not set" >> ${S}/.config
|
||||
else
|
||||
echo "CONFIG_$1=$2" >> ${S}/.config
|
||||
fi
|
||||
}
|
||||
|
||||
do_configure_prepend() {
|
||||
# Clean .config
|
||||
echo "" > ${S}/.config
|
||||
CONF_SED_SCRIPT=""
|
||||
|
||||
# oabi / eabi support
|
||||
if [ "${TARGET_OS}" = "linux-gnueabi" -o "${TARGET_OS}" = "linux-uclibceabi" ]; then
|
||||
kernel_configure_variable AEABI y
|
||||
if [ "${ARM_KEEP_OABI}" = "1" ] ; then
|
||||
kernel_configure_variable OABI_COMPAT y
|
||||
else
|
||||
kernel_configure_variable OABI_COMPAT n
|
||||
fi
|
||||
else
|
||||
kernel_configure_variable AEABI n
|
||||
kernel_configure_variable OABI_COMPAT n
|
||||
fi
|
||||
|
||||
# Set cmdline
|
||||
kernel_configure_variable CMDLINE "\"${CMDLINE}\""
|
||||
|
||||
# Localversion
|
||||
kernel_configure_variable LOCALVERSION "\"\""
|
||||
kernel_configure_variable LOCALVERSION_AUTO n
|
||||
|
||||
# Udev quirks
|
||||
# Newer versions of udev mandate that sysfs doesn't have deprecated entries
|
||||
if [ "${UDEV_GE_141}" = "1" ] ; then
|
||||
kernel_configure_variable SYSFS_DEPRECATED n
|
||||
kernel_configure_variable SYSFS_DEPRECATED_V2 n
|
||||
kernel_configure_variable HOTPLUG y
|
||||
kernel_configure_variable UEVENT_HELPER_PATH "\"\""
|
||||
kernel_configure_variable UNIX y
|
||||
kernel_configure_variable SYSFS y
|
||||
kernel_configure_variable PROC_FS y
|
||||
kernel_configure_variable TMPFS y
|
||||
kernel_configure_variable INOTIFY_USER y
|
||||
kernel_configure_variable SIGNALFD y
|
||||
kernel_configure_variable TMPFS_POSIX_ACL y
|
||||
kernel_configure_variable BLK_DEV_BSG y
|
||||
kernel_configure_variable DEVTMPFS y
|
||||
kernel_configure_variable DEVTMPFS_MOUNT y
|
||||
fi
|
||||
|
||||
# Newer inits like systemd need cgroup support
|
||||
if [ "${KERNEL_ENABLE_CGROUPS}" = "1" ] ; then
|
||||
kernel_configure_variable CGROUP_SCHED y
|
||||
kernel_configure_variable CGROUPS y
|
||||
kernel_configure_variable CGROUP_NS y
|
||||
kernel_configure_variable CGROUP_FREEZER y
|
||||
kernel_configure_variable CGROUP_DEVICE y
|
||||
kernel_configure_variable CPUSETS y
|
||||
kernel_configure_variable PROC_PID_CPUSET y
|
||||
kernel_configure_variable CGROUP_CPUACCT y
|
||||
kernel_configure_variable RESOURCE_COUNTERS y
|
||||
fi
|
||||
|
||||
# root-over-nfs-over-usb-eth support. Limited, but should cover some cases
|
||||
# Enable this by setting a proper CMDLINE_NFSROOT_USB.
|
||||
if [ ! -z "${CMDLINE_NFSROOT_USB}" ]; then
|
||||
oenote "Configuring the kernel for root-over-nfs-over-usb-eth with CMDLINE ${CMDLINE_NFSROOT_USB}"
|
||||
kernel_configure_variable INET y
|
||||
kernel_configure_variable IP_PNP y
|
||||
kernel_configure_variable USB_GADGET y
|
||||
kernel_configure_variable USB_GADGET_SELECTED y
|
||||
kernel_configure_variable USB_ETH y
|
||||
kernel_configure_variable NFS_FS y
|
||||
kernel_configure_variable ROOT_NFS y
|
||||
kernel_configure_variable ROOT_NFS y
|
||||
kernel_configure_variable CMDLINE "\"${CMDLINE_NFSROOT_USB}\""
|
||||
fi
|
||||
|
||||
# Activate CONFIG_LEGACY_PTYS
|
||||
kernel_configure_variable LEGACY_PTYS y
|
||||
|
||||
# Keep this the last line
|
||||
# Remove all modified configs and add the rest to .config
|
||||
sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${S}/.config'
|
||||
|
||||
yes '' | oe_runmake oldconfig
|
||||
}
|
||||
|
||||
# Automatically depend on lzop-native if CONFIG_KERNEL_LZO is enabled
|
||||
python () {
|
||||
try:
|
||||
defconfig = bb.fetch2.localpath('file://defconfig', d)
|
||||
except bb.fetch2.FetchError:
|
||||
return
|
||||
|
||||
try:
|
||||
configfile = open(defconfig)
|
||||
except IOError:
|
||||
return
|
||||
|
||||
if 'CONFIG_KERNEL_LZO=y\n' in configfile.readlines():
|
||||
depends = d.getVar('DEPENDS', False)
|
||||
d.setVar('DEPENDS', depends + ' lzop-native')
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user