mirror of
https://github.com/agherzan/meta-raspberrypi.git
synced 2025-12-06 06:19:11 +00:00
Compare commits
267 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e5be97d75 | ||
|
|
89bdf97bea | ||
|
|
c71d79efc5 | ||
|
|
aa913d4580 | ||
|
|
da31d6f1ff | ||
|
|
a9be788e8f | ||
|
|
6c5e9d45f3 | ||
|
|
84d3561c74 | ||
|
|
4be82c166d | ||
|
|
72fe587b22 | ||
|
|
2b3693ea3a | ||
|
|
1bf03aef09 | ||
|
|
7b191e3dcf | ||
|
|
0a4d4dc17d | ||
|
|
0f832cb8a4 | ||
|
|
1822e9066e | ||
|
|
e70077a8d0 | ||
|
|
2e10111222 | ||
|
|
e89c1c7bfb | ||
|
|
77a5cc016a | ||
|
|
fb9599c5ec | ||
|
|
0a1d7c5f38 | ||
|
|
604905d5c8 | ||
|
|
22bc3422b4 | ||
|
|
d5d92f2cb7 | ||
|
|
a48743dc36 | ||
|
|
fa217ed21c | ||
|
|
48b2ab42de | ||
|
|
f752e92383 | ||
|
|
bfc35b773f | ||
|
|
10cee099bc | ||
|
|
7c94afee2b | ||
|
|
981376b1c4 | ||
|
|
b38a77938a | ||
|
|
e1ba4484c0 | ||
|
|
c8b6962487 | ||
|
|
1583815847 | ||
|
|
b589574d9e | ||
|
|
db02864e83 | ||
|
|
78259ad6e2 | ||
|
|
f661406e2d | ||
|
|
229363bbac | ||
|
|
0c14814f23 | ||
|
|
d05f559089 | ||
|
|
f7a2726cdf | ||
|
|
0f14d185d3 | ||
|
|
f61854f3c9 | ||
|
|
43bad59ab5 | ||
|
|
30200f75d6 | ||
|
|
16a8bb9da0 | ||
|
|
0b10f248d0 | ||
|
|
4f3a81e165 | ||
|
|
9da0723f4c | ||
|
|
c1aabba056 | ||
|
|
ab8a44d655 | ||
|
|
9bfbd7a26a | ||
|
|
19be0e76a2 | ||
|
|
d747f4cf47 | ||
|
|
165bdf8974 | ||
|
|
f98b279297 | ||
|
|
576ac27869 | ||
|
|
8218bec130 | ||
|
|
b660366a30 | ||
|
|
40a9a11794 | ||
|
|
2f7e6e9b0e | ||
|
|
2e23e17666 | ||
|
|
9a9931fe0c | ||
|
|
372c7bc16c | ||
|
|
39381720bd | ||
|
|
3623b89c53 | ||
|
|
effb6afeff | ||
|
|
7cd27ce83e | ||
|
|
c7999e8c2f | ||
|
|
6888a49ae8 | ||
|
|
0359c9714c | ||
|
|
0bea144135 | ||
|
|
9f523f5ecc | ||
|
|
a0beccee73 | ||
|
|
52255ae3af | ||
|
|
e8f9a4e8f8 | ||
|
|
efa848ca84 | ||
|
|
55aadae7aa | ||
|
|
4826d22580 | ||
|
|
c4400ca811 | ||
|
|
c9a4b5666f | ||
|
|
d5f7ff887d | ||
|
|
e713c3f60d | ||
|
|
3b6549a5e0 | ||
|
|
efa81bff3e | ||
|
|
19d0fcac21 | ||
|
|
b825f32ccd | ||
|
|
a477b29cc1 | ||
|
|
2b3526563e | ||
|
|
f8da9113fa | ||
|
|
71a040dc11 | ||
|
|
b2da4618b0 | ||
|
|
f51047bafb | ||
|
|
2ad9aa01e7 | ||
|
|
de597abc3b | ||
|
|
7f7bc9e778 | ||
|
|
1fb4dcc0b5 | ||
|
|
dd94917555 | ||
|
|
237e0c79c6 | ||
|
|
bf2a07be69 | ||
|
|
f3ecec38aa | ||
|
|
de8912cbcb | ||
|
|
5492c68403 | ||
|
|
53af636f88 | ||
|
|
2a0f25a71f | ||
|
|
6f8926e80e | ||
|
|
df53ac131a | ||
|
|
8aca17aa58 | ||
|
|
70d0c30824 | ||
|
|
d2015ceee0 | ||
|
|
a93a373c3e | ||
|
|
d3709fa688 | ||
|
|
07d06b04dd | ||
|
|
cf9971fa8b | ||
|
|
4d689a792c | ||
|
|
014408d1ac | ||
|
|
070c894321 | ||
|
|
693f36dded | ||
|
|
2c7eab2d0d | ||
|
|
d2ead7c039 | ||
|
|
66103edbb8 | ||
|
|
be2d9b1bf6 | ||
|
|
92aac38577 | ||
|
|
9b2cbacb07 | ||
|
|
e059aaffdf | ||
|
|
9e3a5ef513 | ||
|
|
2bea3356a9 | ||
|
|
51249c9c78 | ||
|
|
3175e7f3e2 | ||
|
|
5641ac3730 | ||
|
|
35234a0bfa | ||
|
|
4bf40b2d32 | ||
|
|
963761aac3 | ||
|
|
292e00099b | ||
|
|
519da94776 | ||
|
|
279b14730a | ||
|
|
3934ba7127 | ||
|
|
0059905a90 | ||
|
|
c717e7359a | ||
|
|
d5f252ef23 | ||
|
|
9209f20c7a | ||
|
|
e99afb0c89 | ||
|
|
857db4a496 | ||
|
|
a4c79714d6 | ||
|
|
63e53f9190 | ||
|
|
415c1998a6 | ||
|
|
f86f9f0013 | ||
|
|
790e100a90 | ||
|
|
4230fae1de | ||
|
|
712558c64e | ||
|
|
b588825238 | ||
|
|
79ea44b997 | ||
|
|
abd453d7da | ||
|
|
ad7693c9a0 | ||
|
|
0e1e2c6e0a | ||
|
|
207efc6fcf | ||
|
|
81a9e9d450 | ||
|
|
ad0443b3d2 | ||
|
|
37f6523aa1 | ||
|
|
8501a33253 | ||
|
|
69d9fa2a69 | ||
|
|
0deabddb14 | ||
|
|
0f145057c3 | ||
|
|
6d0830b26f | ||
|
|
72bc798ff5 | ||
|
|
a2ba56f74e | ||
|
|
ee668d8072 | ||
|
|
073f1e845e | ||
|
|
ea35d07b5b | ||
|
|
8643e28c3a | ||
|
|
dfa7f00bab | ||
|
|
1c9986257e | ||
|
|
6235b0a854 | ||
|
|
0202bc2881 | ||
|
|
f864b1068f | ||
|
|
15d2ea0f5a | ||
|
|
a50e19695f | ||
|
|
61c2a965a2 | ||
|
|
c47caaca32 | ||
|
|
ab5ef24ef8 | ||
|
|
58d86c0986 | ||
|
|
9c9c2bac61 | ||
|
|
f900a6568c | ||
|
|
24ffe9fb59 | ||
|
|
337a419c0e | ||
|
|
9bf918014b | ||
|
|
8124f87175 | ||
|
|
ea6dc59cd7 | ||
|
|
0c41915260 | ||
|
|
ef9c8cb092 | ||
|
|
14fd58b881 | ||
|
|
e0fe589092 | ||
|
|
9b1a796cb7 | ||
|
|
4d3a148b8e | ||
|
|
4c09f3e6db | ||
|
|
50fd319205 | ||
|
|
c07d7055e5 | ||
|
|
abe5e31a89 | ||
|
|
536c15bab9 | ||
|
|
76f5a7df71 | ||
|
|
6a7606a1e4 | ||
|
|
1ab83ec30a | ||
|
|
be340eec3f | ||
|
|
a1cfeb3324 | ||
|
|
fe99478aa9 | ||
|
|
9d84186870 | ||
|
|
f6fecae825 | ||
|
|
c716e0d30c | ||
|
|
70b9c3ec57 | ||
|
|
04b37dbdb7 | ||
|
|
e2432d3bb4 | ||
|
|
f1e2bf782f | ||
|
|
47da217fda | ||
|
|
c26e9d3df5 | ||
|
|
37e4e18f4a | ||
|
|
134e7dd943 | ||
|
|
e9bb7f0c6d | ||
|
|
43e0169ab7 | ||
|
|
129107837d | ||
|
|
49f1a94512 | ||
|
|
e7bac0bed5 | ||
|
|
46f78e37e3 | ||
|
|
cbd2412fb4 | ||
|
|
8311d16e59 | ||
|
|
b00d914e78 | ||
|
|
acd5869235 | ||
|
|
f2896b0e5c | ||
|
|
6c4de0b5fe | ||
|
|
bb51049ebe | ||
|
|
d31377b81a | ||
|
|
5a2b34e56c | ||
|
|
a120ece0e4 | ||
|
|
6abd752bd0 | ||
|
|
91f59ae288 | ||
|
|
aea2129fe3 | ||
|
|
50cbbb0151 | ||
|
|
b6b6ecb6cb | ||
|
|
fa82321af2 | ||
|
|
d2acb3ffda | ||
|
|
b934304e43 | ||
|
|
e59132bdcc | ||
|
|
7a7d871cc1 | ||
|
|
88478c3874 | ||
|
|
f70b24b1f1 | ||
|
|
2aa08e4f97 | ||
|
|
c098439ac1 | ||
|
|
94e2929f74 | ||
|
|
1a06502656 | ||
|
|
1b589998f4 | ||
|
|
ff02bf92e6 | ||
|
|
56d0bdb5fe | ||
|
|
ab4006bb2e | ||
|
|
f6a2ca21c7 | ||
|
|
1e1b50c55d | ||
|
|
4cff21e243 | ||
|
|
16a8384a9a | ||
|
|
04a33eadfb | ||
|
|
fc17cd7419 | ||
|
|
d9dbfe6536 | ||
|
|
ca77a583c3 | ||
|
|
a6bb80c935 | ||
|
|
11fec46133 | ||
|
|
df901c2915 |
@@ -10,10 +10,11 @@ Yocto BSP layer for the Raspberry Pi boards - <http://www.raspberrypi.org/>.
|
||||
## Quick links
|
||||
|
||||
* Git repository web frontend:
|
||||
<http://git.yoctoproject.org/cgit/cgit.cgi/meta-raspberrypi/>
|
||||
<https://github.com/agherzan/meta-raspberrypi>
|
||||
* Mailing list (yocto mailing list): <yocto@yoctoproject.org>
|
||||
* Issues management (Github Issues):
|
||||
<https://github.com/agherzan/meta-raspberrypi/issues>
|
||||
* Documentation: <http://meta-raspberrypi.readthedocs.io/en/latest/>
|
||||
|
||||
## Description
|
||||
|
||||
@@ -46,7 +47,7 @@ This layer depends on:
|
||||
1. source poky/oe-init-build-env rpi-build
|
||||
2. Add this layer to bblayers.conf and the dependencies above
|
||||
3. Set MACHINE in local.conf to one of the supported boards
|
||||
4. bitbake rpi-hwup-image
|
||||
4. bitbake core-image-base
|
||||
5. dd to a SD card the generated sdimg file (use xzcat if rpi-sdimg.xz is used)
|
||||
6. Boot your RPI.
|
||||
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
inherit linux-kernel-base
|
||||
|
||||
def get_dts(d, ver=None):
|
||||
import re
|
||||
|
||||
staging_dir = d.getVar("STAGING_KERNEL_BUILDDIR")
|
||||
dts = d.getVar("KERNEL_DEVICETREE")
|
||||
|
||||
# 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)
|
||||
|
||||
return dts
|
||||
|
||||
|
||||
def split_overlays(d, out, ver=None):
|
||||
dts = get_dts(d, ver)
|
||||
if out:
|
||||
overlays = oe.utils.str_filter_out('\S+\-overlay\.dtb$', dts, d)
|
||||
overlays = oe.utils.str_filter_out('\S+\.dtbo$', overlays, d)
|
||||
else:
|
||||
overlays = oe.utils.str_filter('\S+\-overlay\.dtb$', dts, d) + \
|
||||
" " + oe.utils.str_filter('\S+\.dtbo$', dts, d)
|
||||
|
||||
return overlays
|
||||
@@ -1,8 +1,7 @@
|
||||
inherit image_types
|
||||
inherit linux-raspberrypi-base
|
||||
|
||||
#
|
||||
# Create an image that can by written onto a SD card using dd.
|
||||
# Create an image that can be written onto a SD card using dd.
|
||||
#
|
||||
# The disk layout used is:
|
||||
#
|
||||
@@ -29,9 +28,6 @@ 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"
|
||||
@@ -48,16 +44,22 @@ IMAGE_ROOTFS_ALIGNMENT = "4096"
|
||||
|
||||
# Use an uncompressed ext3 by default as rootfs
|
||||
SDIMG_ROOTFS_TYPE ?= "ext3"
|
||||
SDIMG_ROOTFS = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.${SDIMG_ROOTFS_TYPE}"
|
||||
SDIMG_ROOTFS = "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${SDIMG_ROOTFS_TYPE}"
|
||||
|
||||
IMAGE_DEPENDS_rpi-sdimg = " \
|
||||
parted-native \
|
||||
mtools-native \
|
||||
dosfstools-native \
|
||||
virtual/kernel:do_deploy \
|
||||
${IMAGE_BOOTLOADER} \
|
||||
${@bb.utils.contains('KERNEL_IMAGETYPE', 'uImage', 'u-boot', '',d)} \
|
||||
"
|
||||
# For the names of kernel artifacts
|
||||
inherit kernel-artifact-names
|
||||
|
||||
do_image_rpi_sdimg[depends] = " \
|
||||
parted-native:do_populate_sysroot \
|
||||
mtools-native:do_populate_sysroot \
|
||||
dosfstools-native:do_populate_sysroot \
|
||||
virtual/kernel:do_deploy \
|
||||
${IMAGE_BOOTLOADER}:do_deploy \
|
||||
${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'u-boot:do_deploy', '',d)} \
|
||||
${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'rpi-u-boot-scr:do_deploy', '',d)} \
|
||||
"
|
||||
|
||||
do_image_rpi_sdimg[recrdeps] = "do_build"
|
||||
|
||||
# SD card image name
|
||||
SDIMG = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.rpi-sdimg"
|
||||
@@ -72,113 +74,134 @@ SDIMG = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.rpi-sdimg"
|
||||
# Additional files and/or directories to be copied into the vfat partition from the IMAGE_ROOTFS.
|
||||
FATPAYLOAD ?= ""
|
||||
|
||||
# SD card vfat partition image name
|
||||
SDIMG_VFAT_DEPLOY ?= "${RPI_USE_U_BOOT}"
|
||||
SDIMG_VFAT = "${IMAGE_NAME}.vfat"
|
||||
SDIMG_LINK_VFAT = "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.vfat"
|
||||
|
||||
def split_overlays(d, out, ver=None):
|
||||
dts = d.getVar("KERNEL_DEVICETREE")
|
||||
# Device Tree Overlays are assumed to be suffixed by '-overlay.dtb' (4.1.x) or by '.dtbo' (4.4.9+) string and will be put in a dedicated folder
|
||||
if out:
|
||||
overlays = oe.utils.str_filter_out('\S+\-overlay\.dtb$', dts, d)
|
||||
overlays = oe.utils.str_filter_out('\S+\.dtbo$', overlays, d)
|
||||
else:
|
||||
overlays = oe.utils.str_filter('\S+\-overlay\.dtb$', dts, d) + \
|
||||
" " + oe.utils.str_filter('\S+\.dtbo$', dts, d)
|
||||
|
||||
return overlays
|
||||
|
||||
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})
|
||||
SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} + ${BOOT_SPACE_ALIGNED} + $ROOTFS_SIZE)
|
||||
# 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})
|
||||
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 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)}"
|
||||
# Check if we are building with device tree support
|
||||
DTS="${KERNEL_DEVICETREE}"
|
||||
|
||||
# Initialize sdcard image file
|
||||
dd if=/dev/zero of=${SDIMG} bs=1024 count=0 seek=${SDIMG_SIZE}
|
||||
# Initialize sdcard image file
|
||||
dd if=/dev/zero of=${SDIMG} bs=1024 count=0 seek=${SDIMG_SIZE}
|
||||
|
||||
# Create partition table
|
||||
parted -s ${SDIMG} mklabel msdos
|
||||
# Create boot partition and mark it as bootable
|
||||
parted -s ${SDIMG} unit KiB mkpart primary fat32 ${IMAGE_ROOTFS_ALIGNMENT} $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT})
|
||||
parted -s ${SDIMG} set 1 boot on
|
||||
# Create rootfs partition to the end of disk
|
||||
parted -s ${SDIMG} -- unit KiB mkpart primary ext2 $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT}) -1s
|
||||
parted ${SDIMG} print
|
||||
# Create partition table
|
||||
parted -s ${SDIMG} mklabel msdos
|
||||
# Create boot partition and mark it as bootable
|
||||
parted -s ${SDIMG} unit KiB mkpart primary fat32 ${IMAGE_ROOTFS_ALIGNMENT} $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT})
|
||||
parted -s ${SDIMG} set 1 boot on
|
||||
# Create rootfs partition to the end of disk
|
||||
parted -s ${SDIMG} -- unit KiB mkpart primary ext2 $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT}) -1s
|
||||
parted ${SDIMG} print
|
||||
|
||||
# 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/* ::/
|
||||
if test -n "${DTS}"; then
|
||||
# Device Tree Overlays are assumed to be suffixed by '-overlay.dtb' (4.1.x) or by '.dtbo' (4.4.9+) string and will be put in a dedicated folder
|
||||
DT_OVERLAYS="${@split_overlays(d, 0)}"
|
||||
DT_ROOT="${@split_overlays(d, 1)}"
|
||||
# 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 -F32 -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/
|
||||
if test -n "${DTS}"; then
|
||||
# Copy board device trees to root folder
|
||||
for dtbf in ${@split_overlays(d, True)}; do
|
||||
dtb=`basename $dtbf`
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/$dtb ::$dtb
|
||||
done
|
||||
|
||||
# Copy board device trees to root folder
|
||||
for DTB in $DT_ROOT; do
|
||||
DTB_BASE_NAME=`basename ${DTB} .dtb`
|
||||
# Copy device tree overlays to dedicated folder
|
||||
mmd -i ${WORKDIR}/boot.img overlays
|
||||
for dtbf in ${@split_overlays(d, False)}; do
|
||||
dtb=`basename $dtbf`
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/$dtb ::overlays/$dtb
|
||||
done
|
||||
fi
|
||||
if [ "${RPI_USE_U_BOOT}" = "1" ]; then
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.bin ::${SDIMG_KERNELIMAGE}
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/boot.scr ::boot.scr
|
||||
if [ ! -z "${INITRAMFS_IMAGE}" -a "${INITRAMFS_IMAGE_BUNDLE}" = "1" ]; then
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${INITRAMFS_LINK_NAME}.bin ::${KERNEL_IMAGETYPE}
|
||||
else
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} ::${KERNEL_IMAGETYPE}
|
||||
fi
|
||||
else
|
||||
if [ ! -z "${INITRAMFS_IMAGE}" -a "${INITRAMFS_IMAGE_BUNDLE}" = "1" ]; then
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${INITRAMFS_LINK_NAME}.bin ::${SDIMG_KERNELIMAGE}
|
||||
else
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} ::${SDIMG_KERNELIMAGE}
|
||||
fi
|
||||
fi
|
||||
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB_BASE_NAME}.dtb ::${DTB_BASE_NAME}.dtb
|
||||
done
|
||||
if [ -n ${FATPAYLOAD} ] ; then
|
||||
echo "Copying payload into VFAT"
|
||||
for entry in ${FATPAYLOAD} ; do
|
||||
# add the || true to stop aborting on vfat issues like not supporting .~lock files
|
||||
mcopy -i ${WORKDIR}/boot.img -s -v ${IMAGE_ROOTFS}$entry :: || true
|
||||
done
|
||||
fi
|
||||
|
||||
# Copy device tree overlays to dedicated folder
|
||||
mmd -i ${WORKDIR}/boot.img overlays
|
||||
for DTB in $DT_OVERLAYS; do
|
||||
DTB_EXT=${DTB##*.}
|
||||
DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"`
|
||||
# Add stamp file
|
||||
echo "${IMAGE_NAME}" > ${WORKDIR}/image-version-info
|
||||
mcopy -i ${WORKDIR}/boot.img -v ${WORKDIR}/image-version-info ::
|
||||
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB_BASE_NAME}.${DTB_EXT} ::overlays/${DTB_BASE_NAME}.${DTB_EXT}
|
||||
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}/boot.scr ::boot.scr
|
||||
;;
|
||||
*)
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::${SDIMG_KERNELIMAGE}
|
||||
;;
|
||||
esac
|
||||
# Deploy vfat partition
|
||||
if [ "${SDIMG_VFAT_DEPLOY}" = "1" ]; then
|
||||
cp ${WORKDIR}/boot.img ${IMGDEPLOYDIR}/${SDIMG_VFAT}
|
||||
ln -sf ${SDIMG_VFAT} ${SDIMG_LINK_VFAT}
|
||||
fi
|
||||
|
||||
if [ -n ${FATPAYLOAD} ] ; then
|
||||
echo "Copying payload into VFAT"
|
||||
for entry in ${FATPAYLOAD} ; do
|
||||
# add the || true to stop aborting on vfat issues like not supporting .~lock files
|
||||
mcopy -i ${WORKDIR}/boot.img -s -v ${IMAGE_ROOTFS}$entry :: || true
|
||||
done
|
||||
fi
|
||||
# Burn Partitions
|
||||
dd if=${WORKDIR}/boot.img of=${SDIMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024)
|
||||
# If SDIMG_ROOTFS_TYPE is a .xz file use xzcat
|
||||
if echo "${SDIMG_ROOTFS_TYPE}" | egrep -q "*\.xz"
|
||||
then
|
||||
xzcat ${SDIMG_ROOTFS} | dd of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024)
|
||||
else
|
||||
dd if=${SDIMG_ROOTFS} of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024)
|
||||
fi
|
||||
|
||||
# Add stamp file
|
||||
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
|
||||
# If SDIMG_ROOTFS_TYPE is a .xz file use xzcat
|
||||
if echo "${SDIMG_ROOTFS_TYPE}" | egrep -q "*\.xz"
|
||||
then
|
||||
xzcat ${SDIMG_ROOTFS} | dd of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync
|
||||
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
|
||||
# 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 ; "
|
||||
|
||||
rpi_generate_sysctl_config() {
|
||||
# systemd sysctl config
|
||||
test -d ${IMAGE_ROOTFS}${sysconfdir}/sysctl.d && \
|
||||
echo "vm.min_free_kbytes = 8192" > ${IMAGE_ROOTFS}${sysconfdir}/sysctl.d/rpi-vm.conf
|
||||
# systemd sysctl config
|
||||
test -d ${IMAGE_ROOTFS}${sysconfdir}/sysctl.d && \
|
||||
echo "vm.min_free_kbytes = 8192" > ${IMAGE_ROOTFS}${sysconfdir}/sysctl.d/rpi-vm.conf
|
||||
|
||||
# sysv sysctl config
|
||||
IMAGE_SYSCTL_CONF="${IMAGE_ROOTFS}${sysconfdir}/sysctl.conf"
|
||||
test -e ${IMAGE_ROOTFS}${sysconfdir}/sysctl.conf && \
|
||||
sed -e "/vm.min_free_kbytes/d" -i ${IMAGE_SYSCTL_CONF}
|
||||
echo "" >> ${IMAGE_SYSCTL_CONF} && echo "vm.min_free_kbytes = 8192" >> ${IMAGE_SYSCTL_CONF}
|
||||
# sysv sysctl config
|
||||
IMAGE_SYSCTL_CONF="${IMAGE_ROOTFS}${sysconfdir}/sysctl.conf"
|
||||
test -e ${IMAGE_ROOTFS}${sysconfdir}/sysctl.conf && \
|
||||
sed -e "/vm.min_free_kbytes/d" -i ${IMAGE_SYSCTL_CONF}
|
||||
echo "" >> ${IMAGE_SYSCTL_CONF} && echo "vm.min_free_kbytes = 8192" >> ${IMAGE_SYSCTL_CONF}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,24 @@ BBFILE_COLLECTIONS += "raspberrypi"
|
||||
BBFILE_PATTERN_raspberrypi := "^${LAYERDIR}/"
|
||||
BBFILE_PRIORITY_raspberrypi = "9"
|
||||
|
||||
LAYERSERIES_COMPAT_raspberrypi = "sumo thud"
|
||||
|
||||
# Additional license directories.
|
||||
LICENSE_PATH += "${LAYERDIR}/files/custom-licenses"
|
||||
|
||||
# The dynamic-layers directory hosts the extensions and layer specific
|
||||
# modifications.
|
||||
#
|
||||
# The .bbappend and .bb files are included if the respective layer
|
||||
# collection is available.
|
||||
BBFILES += "${@' '.join('${LAYERDIR}/dynamic-layers/%s/recipes*/*/*.bbappend' % layer \
|
||||
for layer in BBFILE_COLLECTIONS.split())}"
|
||||
BBFILES += "${@' '.join('${LAYERDIR}/dynamic-layers/%s/recipes*/*/*.bb' % layer \
|
||||
for layer in BBFILE_COLLECTIONS.split())}"
|
||||
|
||||
BBFILES_DYNAMIC += " \
|
||||
openembedded-layer:${LAYERDIR}/dynamic-layers/openembedded-layer/*/*/*.bb \
|
||||
openembedded-layer:${LAYERDIR}/dynamic-layers/openembedded-layer/*/*/*.bbappend \
|
||||
qt5-layer:${LAYERDIR}/dynamic-layers/qt5-layer/*/*/*.bb \
|
||||
qt5-layer:${LAYERDIR}/dynamic-layers/qt5-layer/*/*/*.bbappend \
|
||||
"
|
||||
|
||||
@@ -6,6 +6,7 @@ SOC_FAMILY = "rpi"
|
||||
include conf/machine/include/soc-family.inc
|
||||
|
||||
IMAGE_FSTYPES ?= "tar.bz2 ext3 rpi-sdimg"
|
||||
WKS_FILE ?= "sdimage-raspberrypi.wks"
|
||||
|
||||
XSERVER = " \
|
||||
xserver-xorg \
|
||||
@@ -13,15 +14,10 @@ XSERVER = " \
|
||||
${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "xf86-video-modesetting", "xf86-video-fbdev", d)} \
|
||||
"
|
||||
|
||||
KERNEL_DEVICETREE ?= " \
|
||||
bcm2708-rpi-0-w.dtb \
|
||||
bcm2708-rpi-b.dtb \
|
||||
bcm2708-rpi-b-plus.dtb \
|
||||
bcm2709-rpi-2-b.dtb \
|
||||
bcm2710-rpi-3-b.dtb \
|
||||
bcm2708-rpi-cm.dtb \
|
||||
bcm2710-rpi-cm3.dtb \
|
||||
\
|
||||
RPI_KERNEL_DEVICETREE_OVERLAYS ?= " \
|
||||
overlays/at86rf233.dtbo \
|
||||
overlays/dwc2.dtbo \
|
||||
overlays/gpio-key.dtbo \
|
||||
overlays/hifiberry-amp.dtbo \
|
||||
overlays/hifiberry-dac.dtbo \
|
||||
overlays/hifiberry-dacplus.dtbo \
|
||||
@@ -30,25 +26,54 @@ KERNEL_DEVICETREE ?= " \
|
||||
overlays/iqaudio-dac.dtbo \
|
||||
overlays/iqaudio-dacplus.dtbo \
|
||||
overlays/lirc-rpi.dtbo \
|
||||
overlays/pi3-disable-bt.dtbo \
|
||||
overlays/pi3-miniuart-bt.dtbo \
|
||||
overlays/pitft22.dtbo \
|
||||
overlays/pitft28-resistive.dtbo \
|
||||
overlays/pitft35-resistive.dtbo \
|
||||
overlays/pps-gpio.dtbo \
|
||||
overlays/rpi-ft5406.dtbo \
|
||||
overlays/w1-gpio.dtbo \
|
||||
overlays/w1-gpio-pullup.dtbo \
|
||||
overlays/pi3-disable-bt.dtbo \
|
||||
overlays/pi3-miniuart-bt.dtbo \
|
||||
overlays/rpi-poe.dtbo \
|
||||
overlays/vc4-kms-v3d.dtbo \
|
||||
overlays/w1-gpio-pullup.dtbo \
|
||||
overlays/w1-gpio.dtbo \
|
||||
"
|
||||
KERNEL_IMAGETYPE ?= "Image"
|
||||
|
||||
RPI_KERNEL_DEVICETREE ?= " \
|
||||
bcm2708-rpi-0-w.dtb \
|
||||
bcm2708-rpi-b.dtb \
|
||||
bcm2708-rpi-b-plus.dtb \
|
||||
bcm2709-rpi-2-b.dtb \
|
||||
bcm2710-rpi-3-b.dtb \
|
||||
bcm2710-rpi-3-b-plus.dtb \
|
||||
bcm2708-rpi-cm.dtb \
|
||||
bcm2710-rpi-cm3.dtb \
|
||||
"
|
||||
|
||||
KERNEL_DEVICETREE ?= " \
|
||||
${RPI_KERNEL_DEVICETREE} \
|
||||
${RPI_KERNEL_DEVICETREE_OVERLAYS} \
|
||||
"
|
||||
|
||||
# By default:
|
||||
#
|
||||
# * When u-boot is disabled use the "Image" format which can be directly loaded
|
||||
# by the rpi firmware.
|
||||
#
|
||||
# * When u-boot is enabled use the "uImage" format and the "bootm" command
|
||||
# within u-boot to load the kernel.
|
||||
KERNEL_BOOTCMD ??= "bootm"
|
||||
KERNEL_IMAGETYPE_UBOOT ??= "uImage"
|
||||
KERNEL_IMAGETYPE_DIRECT ??= "zImage"
|
||||
KERNEL_IMAGETYPE ?= "${@bb.utils.contains('RPI_USE_U_BOOT', '1', \
|
||||
'${KERNEL_IMAGETYPE_UBOOT}', '${KERNEL_IMAGETYPE_DIRECT}', d)}"
|
||||
|
||||
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"
|
||||
MACHINE_EXTRA_RRECOMMENDS += " kernel-modules udev-rules-rpi"
|
||||
|
||||
# Set Raspberrypi splash image
|
||||
SPLASH = "psplash-raspberrypi"
|
||||
@@ -60,32 +85,35 @@ def make_dtb_boot_files(d):
|
||||
imgtyp = d.getVar('KERNEL_IMAGETYPE')
|
||||
|
||||
def transform(dtb):
|
||||
base = os.path.basename(dtb)
|
||||
if dtb.endswith('dtb'):
|
||||
# eg: whatever/bcm2708-rpi-b.dtb has:
|
||||
# DEPLOYDIR file: ${KERNEL_IMAGETYPE}-bcm2708-rpi-b.dtb
|
||||
# DEPLOYDIR file: bcm2708-rpi-b.dtb
|
||||
# destination: bcm2708-rpi-b.dtb
|
||||
base = os.path.basename(dtb)
|
||||
src = '{}-{}'.format(imgtyp, base)
|
||||
dst = base
|
||||
return '{};{}'.format(src, dst)
|
||||
return base
|
||||
elif dtb.endswith('dtbo'):
|
||||
# overlay dtb:
|
||||
# eg: overlays/hifiberry-amp.dtbo has:
|
||||
# DEPLOYDIR file: ${KERNEL_IMAGETYPE}-hifiberry-amp.dtbo
|
||||
# DEPLOYDIR file: hifiberry-amp.dtbo
|
||||
# destination: overlays/hifiberry-amp.dtbo
|
||||
base = os.path.basename(dtb)
|
||||
src = '{}-{}'.format(imgtyp, base)
|
||||
dst = dtb
|
||||
return '{};{}'.format(src, dtb)
|
||||
return '{};{}'.format(base, dtb)
|
||||
|
||||
return ' '.join([transform(dtb) for dtb in alldtbs.split(' ') if dtb])
|
||||
|
||||
|
||||
IMAGE_BOOT_FILES ?= "bcm2835-bootfiles/* \
|
||||
${@make_dtb_boot_files(d)} \
|
||||
${KERNEL_IMAGETYPE};${SDIMG_KERNELIMAGE} \
|
||||
${@bb.utils.contains('RPI_USE_U_BOOT', '1', \
|
||||
'${KERNEL_IMAGETYPE} u-boot.bin;${SDIMG_KERNELIMAGE} boot.scr', \
|
||||
'${KERNEL_IMAGETYPE};${SDIMG_KERNELIMAGE}', d)} \
|
||||
"
|
||||
do_image_wic[depends] += " \
|
||||
bcm2835-bootfiles:do_deploy \
|
||||
${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'u-boot:do_deploy', '',d)} \
|
||||
"
|
||||
|
||||
do_image_wic[recrdeps] = "do_build"
|
||||
|
||||
# The kernel image is installed into the FAT32 boot partition and does not need
|
||||
# to also be installed into the rootfs.
|
||||
RDEPENDS_kernel-base = ""
|
||||
RDEPENDS_${KERNEL_PACKAGE_NAME}-base = ""
|
||||
|
||||
@@ -6,5 +6,5 @@ PREFERRED_PROVIDER_virtual/egl ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4
|
||||
PREFERRED_PROVIDER_virtual/libgles2 ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "userland", d)}"
|
||||
PREFERRED_PROVIDER_virtual/libgl ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "mesa-gl", d)}"
|
||||
PREFERRED_PROVIDER_virtual/mesa ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "mesa-gl", d)}"
|
||||
PREFERRED_PROVIDER_libgbm ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "mesa-gl", d)}"
|
||||
PREFERRED_PROVIDER_virtual/libgbm ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "mesa-gl", d)}"
|
||||
PREFERRED_PROVIDER_jpeg ?= "jpeg"
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# RaspberryPi BSP default versions
|
||||
|
||||
PREFERRED_VERSION_linux-raspberrypi ??= "4.9.%"
|
||||
PREFERRED_VERSION_linux-raspberrypi ??= "4.14.%"
|
||||
|
||||
@@ -2,5 +2,11 @@
|
||||
#@NAME: RaspberryPi Compute Module 3 (CM3)
|
||||
#@DESCRIPTION: Machine configuration for the RaspberryPi Compute Module 3 (CM3)
|
||||
|
||||
MACHINEOVERRIDES = "raspberrypi2:${MACHINE}"
|
||||
include conf/machine/raspberrypi2.conf
|
||||
DEFAULTTUNE ?= "cortexa7thf-neon-vfpv4"
|
||||
require conf/machine/include/tune-cortexa7.inc
|
||||
include conf/machine/include/rpi-base.inc
|
||||
|
||||
KBUILD_DEFCONFIG ?= "bcm2709_defconfig"
|
||||
SDIMG_KERNELIMAGE ?= "kernel7.img"
|
||||
UBOOT_MACHINE = "rpi_3_32b_config"
|
||||
SERIAL_CONSOLES ?= "115200;ttyAMA0"
|
||||
|
||||
@@ -7,7 +7,6 @@ DEFAULTTUNE ?= "arm1176jzfshf"
|
||||
require conf/machine/include/tune-arm1176jzf-s.inc
|
||||
include conf/machine/include/rpi-base.inc
|
||||
|
||||
SERIAL_CONSOLE ?= "115200 ttyAMA0"
|
||||
SERIAL_CONSOLES ?= "115200;ttyAMA0"
|
||||
|
||||
UBOOT_MACHINE = "rpi_config"
|
||||
VC4_CMA_SIZE_raspberrypi ?= "cma-64"
|
||||
|
||||
@@ -6,10 +6,11 @@ DEFAULTTUNE ?= "arm1176jzfshf"
|
||||
require conf/machine/include/tune-arm1176jzf-s.inc
|
||||
include conf/machine/include/rpi-base.inc
|
||||
|
||||
MACHINE_EXTRA_RRECOMMENDS += "linux-firmware-bcm43430"
|
||||
MACHINE_EXTRA_RRECOMMENDS += "\
|
||||
linux-firmware-rpidistro-bcm43430 \
|
||||
bluez-firmware-rpidistro-bcm43430a1-hcd \
|
||||
"
|
||||
|
||||
SDIMG_KERNELIMAGE ?= "kernel.img"
|
||||
KERNEL_DEFCONFIG ?= "bcmrpi_defconfig"
|
||||
UBOOT_MACHINE ?= "rpi_config"
|
||||
SERIAL_CONSOLE ?= "115200 ttyS0"
|
||||
VC4_CMA_SIZE ?= "cma-128"
|
||||
UBOOT_MACHINE ?= "rpi_0_w_defconfig"
|
||||
SERIAL_CONSOLES ?= "115200;ttyS0"
|
||||
|
||||
@@ -5,5 +5,4 @@
|
||||
MACHINEOVERRIDES = "raspberrypi:${MACHINE}"
|
||||
include conf/machine/raspberrypi.conf
|
||||
|
||||
SERIAL_CONSOLE ?= "115200 ttyAMA0"
|
||||
VC4_CMA_SIZE ?= "cma-128"
|
||||
SERIAL_CONSOLES ?= "115200;ttyAMA0"
|
||||
|
||||
@@ -7,7 +7,6 @@ DEFAULTTUNE ?= "cortexa7thf-neon-vfpv4"
|
||||
require conf/machine/include/tune-cortexa7.inc
|
||||
include conf/machine/include/rpi-base.inc
|
||||
|
||||
SERIAL_CONSOLE ?= "115200 ttyAMA0"
|
||||
SERIAL_CONSOLES ?= "115200;ttyAMA0"
|
||||
|
||||
UBOOT_MACHINE = "rpi_2_config"
|
||||
VC4_CMA_SIZE ?= "cma-256"
|
||||
|
||||
@@ -2,39 +2,32 @@
|
||||
#@NAME: RaspberryPi 3 Development Board
|
||||
#@DESCRIPTION: Machine configuration for the RaspberryPi 3 in 64 bits mode
|
||||
|
||||
MACHINEOVERRIDES = "raspberrypi3:raspberrypi:${MACHINE}"
|
||||
MACHINEOVERRIDES = "raspberrypi3:${MACHINE}"
|
||||
|
||||
MACHINE_EXTRA_RRECOMMENDS += "linux-firmware-bcm43430"
|
||||
MACHINE_EXTRA_RRECOMMENDS += "\
|
||||
linux-firmware-rpidistro-bcm43430 \
|
||||
linux-firmware-rpidistro-bcm43455 \
|
||||
bluez-firmware-rpidistro-bcm43430a1-hcd \
|
||||
bluez-firmware-rpidistro-bcm4345c0-hcd \
|
||||
"
|
||||
|
||||
require conf/machine/include/arm/arch-armv8.inc
|
||||
include conf/machine/include/rpi-base.inc
|
||||
|
||||
KERNEL_DEVICETREE = " \
|
||||
RPI_KERNEL_DEVICETREE = " \
|
||||
broadcom/bcm2710-rpi-3-b.dtb \
|
||||
broadcom/bcm2710-rpi-3-b-plus.dtb \
|
||||
broadcom/bcm2837-rpi-3-b.dtb \
|
||||
\
|
||||
overlays/hifiberry-amp.dtbo \
|
||||
overlays/hifiberry-dac.dtbo \
|
||||
overlays/hifiberry-dacplus.dtbo \
|
||||
overlays/hifiberry-digi.dtbo \
|
||||
overlays/i2c-rtc.dtbo \
|
||||
overlays/iqaudio-dac.dtbo \
|
||||
overlays/iqaudio-dacplus.dtbo \
|
||||
overlays/lirc-rpi.dtbo \
|
||||
overlays/pitft22.dtbo \
|
||||
overlays/pitft28-resistive.dtbo \
|
||||
overlays/pitft35-resistive.dtbo \
|
||||
overlays/pps-gpio.dtbo \
|
||||
overlays/rpi-ft5406.dtbo \
|
||||
overlays/w1-gpio.dtbo \
|
||||
overlays/w1-gpio-pullup.dtbo \
|
||||
overlays/pi3-disable-bt.dtbo \
|
||||
overlays/pi3-miniuart-bt.dtbo \
|
||||
overlays/vc4-kms-v3d.dtbo \
|
||||
"
|
||||
|
||||
SERIAL_CONSOLE ?= "115200 ttyS0"
|
||||
VC4_CMA_SIZE ?= "cma-256"
|
||||
SERIAL_CONSOLES ?= "115200;ttyS0"
|
||||
|
||||
UBOOT_MACHINE = "rpi_3_config"
|
||||
MACHINE_FEATURES_append = " vc4graphics"
|
||||
|
||||
# When u-boot is enabled we need to use the "Image" format and the "booti"
|
||||
# command to load the kernel
|
||||
KERNEL_IMAGETYPE_UBOOT ?= "Image"
|
||||
# "zImage" not supported on arm64 and ".gz" images not supported by bootloader yet
|
||||
KERNEL_IMAGETYPE_DIRECT ?= "Image"
|
||||
KERNEL_BOOTCMD ?= "booti"
|
||||
|
||||
@@ -6,10 +6,13 @@ DEFAULTTUNE ?= "cortexa7thf-neon-vfpv4"
|
||||
require conf/machine/include/tune-cortexa7.inc
|
||||
include conf/machine/include/rpi-base.inc
|
||||
|
||||
MACHINE_EXTRA_RRECOMMENDS += "linux-firmware-bcm43430"
|
||||
MACHINE_EXTRA_RRECOMMENDS += "\
|
||||
linux-firmware-rpidistro-bcm43430 \
|
||||
linux-firmware-rpidistro-bcm43455 \
|
||||
bluez-firmware-rpidistro-bcm43430a1-hcd \
|
||||
bluez-firmware-rpidistro-bcm4345c0-hcd \
|
||||
"
|
||||
|
||||
SDIMG_KERNELIMAGE ?= "kernel7.img"
|
||||
KERNEL_DEFCONFIG ?= "bcm2709_defconfig"
|
||||
UBOOT_MACHINE = "rpi_3_32b_config"
|
||||
SERIAL_CONSOLE ?= "115200 ttyS0"
|
||||
VC4_CMA_SIZE ?= "cma-256"
|
||||
SERIAL_CONSOLES ?= "115200;ttyS0"
|
||||
|
||||
@@ -120,7 +120,7 @@ todo_include_todos = False
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
#
|
||||
html_theme = 'alabaster'
|
||||
# html_theme = 'alabaster'
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
|
||||
@@ -2,37 +2,108 @@
|
||||
|
||||
## Mailing list
|
||||
|
||||
The main communication tool we use is a mailing list:
|
||||
The main communication tool in use is the Yocto Project 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.
|
||||
Feel free to ask any kind of questions but please always prepend your email
|
||||
subject with `[meta-raspberrypi]` as this is the global *Yocto* mailing
|
||||
list and not a dedicated *meta-raspberrypi* mailing list.
|
||||
|
||||
## Patches and pull requests
|
||||
## Formatting patches
|
||||
|
||||
All the contributions should be compliant with the openembedded patch
|
||||
guidelines: <http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines>
|
||||
First and foremost, all of the contributions to the layer must be compliant
|
||||
with the standard openembedded patch guidelines:
|
||||
|
||||
To contribute to this project you should send pull requests to the github mirror
|
||||
(<https://github.com/agherzan/meta-raspberrypi>). **Additionally** you can send
|
||||
the patches for review to the above specified mailing list.
|
||||
* <http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines>
|
||||
|
||||
When creating patches for the mailing list, please use something like:
|
||||
In summary, your commit log messages should be formatted as follows:
|
||||
|
||||
<layer-component>: <short log/statement of what needed to be changed>
|
||||
|
||||
(Optional pointers to external resources, such as defect tracking)
|
||||
|
||||
The intent of your change.
|
||||
|
||||
(Optional: if it's not clear from above, how your change resolves
|
||||
the issues in the first part)
|
||||
|
||||
Signed-off-by: Your Name <yourname@youremail.com>
|
||||
|
||||
The `<layer-component>` is the layer component name that your changes affect.
|
||||
It is important that you choose it correctly. A simple guide for selecting a
|
||||
a good component name is the following:
|
||||
|
||||
* For changes that affect *layer recipes*, please just use the **base names**
|
||||
of the affected recipes, separated by commas (`,`), as the component name.
|
||||
For example: use `omxplayer` instead of `omxplayer_git.bb`. If you are
|
||||
adding new recipe(s), just use the new recipe(s) base name(s). An example
|
||||
for changes to multiple recipes would be `userland,vc-graphics,wayland`.
|
||||
* For changes that affect the *layer documentation*, please just use `docs`
|
||||
as the component name.
|
||||
* For changes that affect *other files*, i.e. under the `conf` directory,
|
||||
please use the full path as the component name, e.g. `conf/layer.conf`.
|
||||
* For changes that affect the *layer itself* and do not fall into any of
|
||||
the above cases, please use `meta-raspberrypi` as the component name.
|
||||
|
||||
A full example of a suitable commit log message is below:
|
||||
|
||||
foobar: Adjusted the foo setting in bar
|
||||
|
||||
When using foobar on systems with less than a gigabyte of RAM common
|
||||
usage patterns often result in an Out-of-memory condition causing
|
||||
slowdowns and unexpected application termination.
|
||||
|
||||
Low-memory systems should continue to function without running into
|
||||
memory-starvation conditions with minimal cost to systems with more
|
||||
available memory. High-memory systems will be less able to use the
|
||||
full extent of the system, a dynamically tunable option may be best,
|
||||
long-term.
|
||||
|
||||
The foo setting in bar was decreased from X to X-50% in order to
|
||||
ensure we don't exhaust all system memory with foobar threads.
|
||||
|
||||
Signed-off-by: Joe Developer <joe.developer@example.com>
|
||||
|
||||
A common issue during patch reviewing is commit log formatting, please review
|
||||
the above formatting guidelines carefully before sending your patches.
|
||||
|
||||
## Sending patches
|
||||
|
||||
The preferred method to contribute to this project is to send pull
|
||||
requests to the GitHub mirror of the layer:
|
||||
|
||||
* <https://github.com/agherzan/meta-raspberrypi>
|
||||
|
||||
**In addition**, you may send patches for review to the above specified
|
||||
mailing list. In this case, when creating patches using `git` please make
|
||||
sure to use the following formatting for the message subject:
|
||||
|
||||
git format-patch -s --subject-prefix='meta-raspberrypi][PATCH' origin
|
||||
|
||||
When sending patches to the mailing list, please use something like:
|
||||
Then, for sending patches to the mailing list, you may use this command:
|
||||
|
||||
git send-email --to yocto@yoctoproject.org <generated patch>
|
||||
|
||||
## Github issues
|
||||
## GitHub issues
|
||||
|
||||
In order to manage and trace the meta-raspberrypi issues, we use github issues:
|
||||
<https://github.com/agherzan/meta-raspberrypi/issues>
|
||||
In order to manage and track the layer issues more efficiently, the
|
||||
GitHub issues facility is used by this project:
|
||||
|
||||
* <https://github.com/agherzan/meta-raspberrypi/issues>
|
||||
|
||||
If you submit patches that have a GitHub issue associated, please make sure to
|
||||
use standard GitHub keywords, e.g. `closes`, `resolves` or `fixes`, before the
|
||||
"Signed-off-by" tag to close the relevant issues automatically:
|
||||
|
||||
foobar: Adjusted the foo setting in bar
|
||||
|
||||
Fixes: #324
|
||||
|
||||
Signed-off-by: Joe Developer <joe.developer@example.com>
|
||||
|
||||
More information on the available GitHub close keywords can be found here:
|
||||
|
||||
* <https://help.github.com/articles/closing-issues-using-keywords>
|
||||
|
||||
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]`
|
||||
|
||||
@@ -32,6 +32,8 @@ Accommodate the values above to your own needs (ex: ext3 / ext4).
|
||||
* `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.
|
||||
|
||||
See: <https://www.raspberrypi.org/documentation/configuration/config-txt/memory.md>
|
||||
|
||||
## Add purchased license codecs
|
||||
|
||||
To add you own licenses use variables `KEY_DECODE_MPG2` and `KEY_DECODE_WVC1` in
|
||||
@@ -44,6 +46,7 @@ You can supply more licenses separated by comma. Example:
|
||||
|
||||
KEY_DECODE_WVC1 = "0x12345678,0xabcdabcd,0x87654321"
|
||||
|
||||
See: <https://www.raspberrypi.org/documentation/configuration/config-txt/codeclicence.md>
|
||||
|
||||
## Disable overscan
|
||||
|
||||
@@ -53,18 +56,57 @@ local.conf:
|
||||
|
||||
DISABLE_OVERSCAN = "1"
|
||||
|
||||
## Disable splash screen
|
||||
|
||||
By default a rainbow splash screen is shown after the GPU firmware is loaded.
|
||||
To disable this set this variable in local.conf:
|
||||
|
||||
DISABLE_SPLASH = "1"
|
||||
|
||||
## Boot delay
|
||||
|
||||
The Raspberry Pi waits a number of seconds after loading the GPU firmware and
|
||||
before loading the kernel. By default it is one second. This is useful if your
|
||||
SD card needs a while to get ready before Linux is able to boot from it.
|
||||
To remove (or adjust) this delay set these variables in local.conf:
|
||||
|
||||
BOOT_DELAY = "0"
|
||||
BOOT_DELAY_MS = "0"
|
||||
|
||||
## Set overclocking options
|
||||
|
||||
The Raspberry PI can be overclocked. As of now overclocking up to the "Turbo
|
||||
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 turbo
|
||||
mode:
|
||||
the config.txt for a detailed description of options and modes. The following
|
||||
variables are supported in local.conf: `ARM_FREQ`, `GPU_FREQ`, `CORE_FREQ`,
|
||||
`SDRAM_FREQ` and `OVER_VOLTAGE`.
|
||||
|
||||
Example official settings for Turbo Mode in Raspberry Pi 2:
|
||||
|
||||
ARM_FREQ = "1000"
|
||||
CORE_FREQ = "500"
|
||||
SDRAM_FREQ = "500"
|
||||
OVER_VOLTAGE = "6"
|
||||
|
||||
See: <https://www.raspberrypi.org/documentation/configuration/config-txt/overclocking.md>
|
||||
|
||||
## HDMI and composite video options
|
||||
|
||||
The Raspberry Pi can output video over HDMI or SDTV composite (the RCA connector).
|
||||
By default the video mode for these is autodetected on boot: the HDMI mode is
|
||||
selected according to the connected monitor's EDID information and the composite
|
||||
mode is defaulted to NTSC using a 4:3 aspect ratio. Check the config.txt for a
|
||||
detailed description of options and modes. The following variables are supported in
|
||||
local.conf: `HDMI_FORCE_HOTPLUG`, `HDMI_DRIVE`, `HDMI_GROUP`, `HDMI_MODE`,
|
||||
`CONFIG_HDMI_BOOST`, `SDTV_MODE`, `SDTV_ASPECT` and `DISPLAY_ROTATE`.
|
||||
|
||||
Example to force HDMI output to 720p in CEA mode:
|
||||
|
||||
HDMI_GROUP = "1"
|
||||
HDMI_MODE = "4"
|
||||
|
||||
See: <https://www.raspberrypi.org/documentation/configuration/config-txt/video.md>
|
||||
|
||||
## Video camera support with V4L2 drivers
|
||||
|
||||
Set this variable to enable support for the video camera (Linux 3.12.4+
|
||||
@@ -95,30 +137,39 @@ this variable in local.conf:
|
||||
|
||||
ENABLE_KGDB = "1"
|
||||
|
||||
## Disable rpi boot logo
|
||||
|
||||
To disable rpi boot logo, set this variable in local.conf:
|
||||
|
||||
DISABLE_RPI_BOOT_LOGO = "1"
|
||||
|
||||
## Boot to U-Boot
|
||||
|
||||
To have u-boot load kernel image, set in your local.conf:
|
||||
|
||||
KERNEL_IMAGETYPE = "uImage"
|
||||
RPI_USE_U_BOOT = "1"
|
||||
|
||||
This will make kernel.img be u-boot image which will load uImage. By default,
|
||||
kernel.img is the actual kernel image (ex. Image).
|
||||
This will select the appropriate image format for use with u-boot automatically.
|
||||
For further customisation the KERNEL_IMAGETYPE and KERNEL_BOOTCMD variables can
|
||||
be overridden to select the exact kernel image type (eg. zImage) and u-boot
|
||||
command (eg. bootz) to be used.
|
||||
|
||||
## Image with Initramfs
|
||||
|
||||
To build an initramfs image:
|
||||
|
||||
* Set this 3 kernel variables (in linux-raspberrypi.inc for example)
|
||||
* Set this 3 kernel variables (in kernel's do_configure_prepend in linux-raspberrypi.inc after the line kernel_configure_variable LOCALVERSION "\"\""
|
||||
)
|
||||
- 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>"`
|
||||
* Set the yocto variables (e.g. in local.conf)
|
||||
- `INITRAMFS_IMAGE = "<name for your initramfs image>"`
|
||||
- `INITRAMFS_IMAGE_BUNDLE = "1"`
|
||||
|
||||
* Set the meta-rasberrypi variable (in raspberrypi.conf for example)
|
||||
- `KERNEL_INITRAMFS = "-initramfs"`
|
||||
- `BOOT_SPACE = "1073741"`
|
||||
- `INITRAMFS_MAXSIZE = "315400"`
|
||||
- `IMAGE_FSTYPES_pn-${INITRAMFS_IMAGE} = "${INITRAMFS_FSTYPES}"`
|
||||
|
||||
## Enable SPI bus
|
||||
|
||||
@@ -171,10 +222,42 @@ 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:
|
||||
RaspberryPi3 will have to explicitly set in local.conf:
|
||||
|
||||
ENABLE_UART = "1"
|
||||
|
||||
Ref.:
|
||||
* <https://github.com/raspberrypi/firmware/issues/553>
|
||||
* <https://github.com/RPi-Distro/repo/issues/22>
|
||||
|
||||
## Enable USB Peripheral (Gadget) support
|
||||
|
||||
The standard USB driver only supports host mode operations. Users who
|
||||
want to use gadget modules like g_ether should set the following in
|
||||
local.conf:
|
||||
|
||||
ENABLE_DWC2_PERIPHERAL = "1"
|
||||
|
||||
## Enable Openlabs 802.15.4 radio module
|
||||
|
||||
When using device tree kernels, set this variable to enable the 802.15.4 hat:
|
||||
|
||||
ENABLE_AT86RF = "1"
|
||||
|
||||
See: <https://openlabs.co/OSHW/Raspberry-Pi-802.15.4-radio>
|
||||
|
||||
## Manual additions to config.txt
|
||||
|
||||
The `RPI_EXTRA_CONFIG` variable can be used to manually add additional lines to
|
||||
the `config.txt` file if there is not a specific option above for the
|
||||
configuration you need. To add multiple lines you must include `\n` separators.
|
||||
If double-quotes are needed in the lines you are adding you can use single
|
||||
quotes around the whole string.
|
||||
|
||||
For example, to add a comment containing a double-quote and a configuration
|
||||
option:
|
||||
|
||||
RPI_EXTRA_CONFIG = ' \n \
|
||||
# Raspberry Pi 7\" display/touch screen \n \
|
||||
lcd_rotate=2 \n \
|
||||
'
|
||||
|
||||
@@ -9,16 +9,26 @@
|
||||
* raspberrypi3
|
||||
* raspberrypi3-64 (64 bit kernel & userspace)
|
||||
* raspberrypi-cm (dummy alias for raspberrypi)
|
||||
* raspberrypi-cm3 (dummy alias for raspberrypi2)
|
||||
* raspberrypi-cm3
|
||||
|
||||
Note: The raspberrypi3 machines include support for Raspberry Pi 3B+.
|
||||
|
||||
## 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
|
||||
* Image based on core-image-base which includes most of the packages in this
|
||||
layer and some media samples.
|
||||
|
||||
For other uses it's recommended to base images on `core-image-minimal` or
|
||||
`core-image-base` as appropriate. The old image names (`rpi-hwup-image` and
|
||||
`rpi-basic-image`) are deprecated.
|
||||
|
||||
## WiFi and Bluetooth Firmware
|
||||
|
||||
Be aware that the WiFi and Bluetooth firmware for the supported boards
|
||||
is not available in the base version of `linux-firmware` from OE-Core
|
||||
(poky). The files are added from Raspbian repositories in this layer's
|
||||
bbappends to that recipe. All machines define
|
||||
`MACHINE_EXTRA_RRECOMMENDS` to include the required wireless firmware;
|
||||
raspberrypi3 supports 3, 3B, and 3B+ and so include multiple firmware
|
||||
packages.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
RDEPENDS_packagegroup-meta-oe-kernel_remove_rpi = "bpftool"
|
||||
@@ -0,0 +1,3 @@
|
||||
# remove it when we upgrade to kernel > 4.14
|
||||
#
|
||||
COMPATIBLE_HOST_rpi = "null"
|
||||
17
dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
Normal file
17
dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
Normal file
@@ -0,0 +1,17 @@
|
||||
PACKAGECONFIG_GL_rpi = "${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'gl', \
|
||||
bb.utils.contains('DISTRO_FEATURES', 'opengl', 'eglfs gles2', \
|
||||
'', d), d)}"
|
||||
PACKAGECONFIG_GL_append_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', ' gbm kms', '', d)}"
|
||||
PACKAGECONFIG_FONTS_rpi = "fontconfig"
|
||||
PACKAGECONFIG_append_rpi = " libinput examples tslib xkb xkbcommon-evdev"
|
||||
PACKAGECONFIG_remove_rpi = "tests"
|
||||
|
||||
OE_QTBASE_EGLFS_DEVICE_INTEGRATION_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', 'eglfs_brcm', d)}"
|
||||
|
||||
do_configure_prepend_rpi() {
|
||||
# Add the appropriate EGLFS_DEVICE_INTEGRATION
|
||||
if [ "${@d.getVar('OE_QTBASE_EGLFS_DEVICE_INTEGRATION')}" != "" ]; then
|
||||
echo "EGLFS_DEVICE_INTEGRATION = ${OE_QTBASE_EGLFS_DEVICE_INTEGRATION}" >> ${S}/mkspecs/oe-device-extra.pri
|
||||
fi
|
||||
}
|
||||
RDEPENDS_${PN}_append_rpi = " userland"
|
||||
@@ -3,13 +3,15 @@ LICENSE = "Proprietary"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://LICENCE.broadcom;md5=4a4d169737c0786fb9482bb6d30401d1"
|
||||
|
||||
inherit deploy
|
||||
inherit deploy nopackages
|
||||
|
||||
include recipes-bsp/common/firmware.inc
|
||||
|
||||
RDEPENDS_${PN} = "rpi-config"
|
||||
INHIBIT_DEFAULT_DEPS = "1"
|
||||
|
||||
COMPATIBLE_MACHINE = "raspberrypi"
|
||||
DEPENDS = "rpi-config"
|
||||
|
||||
COMPATIBLE_MACHINE = "^rpi$"
|
||||
|
||||
S = "${RPIFW_S}/boot"
|
||||
|
||||
@@ -32,7 +34,7 @@ do_deploy() {
|
||||
touch ${DEPLOYDIR}/${PN}/${PN}-${PV}.stamp
|
||||
}
|
||||
|
||||
addtask deploy before do_package after do_install
|
||||
addtask deploy before do_build after do_install
|
||||
do_deploy[dirs] += "${DEPLOYDIR}/${PN}"
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
|
||||
@@ -3,9 +3,9 @@ DESCRIPTION = "Commented config.txt file for the Raspberry Pi. \
|
||||
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"
|
||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||
|
||||
COMPATIBLE_MACHINE = "raspberrypi"
|
||||
COMPATIBLE_MACHINE = "^rpi$"
|
||||
|
||||
SRCREV = "648ffc470824c43eb0d16c485f4c24816b32cd6f"
|
||||
SRC_URI = "git://github.com/Evilpaul/RPi-config.git;protocol=git;branch=master \
|
||||
@@ -15,14 +15,17 @@ S = "${WORKDIR}/git"
|
||||
|
||||
PR = "r5"
|
||||
|
||||
INHIBIT_DEFAULT_DEPS = "1"
|
||||
|
||||
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)}"
|
||||
PITFT35r="${@bb.utils.contains("MACHINE_FEATURES", "pitft35r", "1", "0", d)}"
|
||||
|
||||
VC4GRAPHICS="${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}"
|
||||
VC4DTBO ?= "vc4-kms-v3d"
|
||||
|
||||
inherit deploy
|
||||
inherit deploy nopackages
|
||||
|
||||
do_deploy() {
|
||||
install -d ${DEPLOYDIR}/bcm2835-bootfiles
|
||||
@@ -30,25 +33,33 @@ do_deploy() {
|
||||
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
|
||||
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
|
||||
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
|
||||
sed -i '/#disable_overscan=/ c\disable_overscan=${DISABLE_OVERSCAN}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
if [ -n "${DISABLE_SPLASH}" ]; then
|
||||
sed -i '/#disable_splash=/ c\disable_splash=${DISABLE_SPLASH}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
|
||||
# Set overclocking options
|
||||
if [ -n "${ARM_FREQ}" ]; then
|
||||
sed -i '/#arm_freq/ c\arm_freq=${ARM_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
sed -i '/#arm_freq=/ c\arm_freq=${ARM_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
if [ -n "${GPU_FREQ}" ]; then
|
||||
sed -i '/#gpu_freq=/ c\gpu_freq=${GPU_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
|
||||
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
|
||||
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
|
||||
sed -i '/#over_voltage=/ c\over_voltage=${OVER_VOLTAGE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
|
||||
# GPU memory
|
||||
@@ -56,13 +67,47 @@ do_deploy() {
|
||||
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
|
||||
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
|
||||
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
|
||||
sed -i '/#gpu_mem_1024=/ c\gpu_mem_1024=${GPU_MEM_1024}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
|
||||
# Set boot delay
|
||||
if [ -n "${BOOT_DELAY}" ]; then
|
||||
sed -i '/#boot_delay=/ c\boot_delay=${BOOT_DELAY}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
if [ -n "${BOOT_DELAY_MS}" ]; then
|
||||
sed -i '/#boot_delay_ms=/ c\boot_delay_ms=${BOOT_DELAY_MS}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
|
||||
# Set HDMI and composite video options
|
||||
if [ -n "${HDMI_FORCE_HOTPLUG}" ]; then
|
||||
sed -i '/#hdmi_force_hotplug=/ c\hdmi_force_hotplug=${HDMI_FORCE_HOTPLUG}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
if [ -n "${HDMI_DRIVE}" ]; then
|
||||
sed -i '/#hdmi_drive=/ c\hdmi_drive=${HDMI_DRIVE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
if [ -n "${HDMI_GROUP}" ]; then
|
||||
sed -i '/#hdmi_group=/ c\hdmi_group=${HDMI_GROUP}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
if [ -n "${HDMI_MODE}" ]; then
|
||||
sed -i '/#hdmi_mode=/ c\hdmi_mode=${HDMI_MODE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
if [ -n "${CONFIG_HDMI_BOOST}" ]; then
|
||||
sed -i '/#config_hdmi_boost=/ c\config_hdmi_boost=${CONFIG_HDMI_BOOST}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
if [ -n "${SDTV_MODE}" ]; then
|
||||
sed -i '/#sdtv_mode=/ c\sdtv_mode=${SDTV_MODE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
if [ -n "${SDTV_ASPECT}" ]; then
|
||||
sed -i '/#sdtv_aspect=/ c\sdtv_aspect=${SDTV_ASPECT}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
if [ -n "${DISPLAY_ROTATE}" ]; then
|
||||
sed -i '/#display_rotate=/ c\display_rotate=${DISPLAY_ROTATE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
|
||||
# Video camera support
|
||||
@@ -83,6 +128,7 @@ do_deploy() {
|
||||
echo "dtparam=spi=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
|
||||
# I2C support
|
||||
if [ -n "${ENABLE_I2C}" ] || [ "${PITFT}" = "1" ]; then
|
||||
echo "# Enable I2C" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
echo "dtparam=i2c1=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
@@ -94,12 +140,10 @@ do_deploy() {
|
||||
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
|
||||
|
||||
if [ "${PITFT35r}" = "1" ]; then
|
||||
echo "# Enable PITFT35r display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
echo "dtoverlay=pitft35-resistive,rotate=90,speed=42000000,fps=20" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
@@ -114,7 +158,7 @@ do_deploy() {
|
||||
# VC4 Graphics support
|
||||
if [ "${VC4GRAPHICS}" = "1" ]; then
|
||||
echo "# Enable VC4 Graphics" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
echo "dtoverlay=vc4-kms-v3d,${VC4_CMA_SIZE}" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
echo "dtoverlay=${VC4DTBO}" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
|
||||
# Waveshare "C" 1024x600 7" Rev2.1 IPS capacitive touch (http://www.waveshare.com/7inch-HDMI-LCD-C.htm)
|
||||
@@ -126,15 +170,32 @@ do_deploy() {
|
||||
echo "hdmi_cvt 1024 600 60 6 0 0 0" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
echo "hdmi_drive=1" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
|
||||
# DWC2 USB peripheral support
|
||||
if [ "${ENABLE_DWC2_PERIPHERAL}" = "1" ]; then
|
||||
echo "# Enable USB peripheral mode" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
echo "dtoverlay=dwc2,dr_mode=peripheral" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
|
||||
# AT86RF23X support
|
||||
if [ "${ENABLE_AT86RF}" = "1" ]; then
|
||||
echo "# Enable AT86RF23X" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
echo "dtoverlay=at86rf233,speed=3000000" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
|
||||
# Append extra config if the user has provided any
|
||||
printf "${RPI_EXTRA_CONFIG}\n" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
}
|
||||
|
||||
do_deploy_append_raspberrypi3-64() {
|
||||
# Device Tree support
|
||||
echo "# Load correct Device Tree for Aarch64" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
echo "device_tree=bcm2710-rpi-3-b.dtb" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
echo "# have a properly sized image" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
echo "disable_overscan=1" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
|
||||
echo "# Enable audio (loads snd_bcm2835)" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
echo "dtparam=audio=on" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
}
|
||||
|
||||
addtask deploy before do_package after do_install
|
||||
addtask deploy before do_build after do_install
|
||||
do_deploy[dirs] += "${DEPLOYDIR}/bcm2835-bootfiles"
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
RPIFW_DATE ?= "20170405"
|
||||
RPIFW_SRC_URI ?= "https://github.com/raspberrypi/firmware/archive/1.${RPIFW_DATE}.tar.gz"
|
||||
RPIFW_S ?= "${WORKDIR}/firmware-1.${RPIFW_DATE}"
|
||||
RPIFW_DATE ?= "20190212"
|
||||
SRCREV ?= "83977fe3b6ef54c1d29c83b0a778d330f523441f"
|
||||
RPIFW_SRC_URI ?= "https://github.com/raspberrypi/firmware/archive/${SRCREV}.tar.gz"
|
||||
RPIFW_S ?= "${WORKDIR}/firmware-${SRCREV}"
|
||||
|
||||
SRC_URI = "${RPIFW_SRC_URI}"
|
||||
SRC_URI[md5sum] = "ea82d14a7cd8cfae9b78e00d4e56bc71"
|
||||
SRC_URI[sha256sum] = "2f4e5bddbac1372590db203002c35cbba3fb9d6172a93c314ee27bf05ae13bff"
|
||||
SRC_URI[md5sum] = "5ccdb5447cbdd3ee0158a514f7b76cb9"
|
||||
SRC_URI[sha256sum] = "9a34ccc4a51695a33206cc6c8534f615ba5a30fcbce5fa3add400ecc6b80ad8a"
|
||||
|
||||
|
||||
PV = "${RPIFW_DATE}"
|
||||
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
fdt addr ${fdt_addr} && fdt get value bootargs /chosen bootargs
|
||||
fatload mmc 0:1 ${kernel_addr_r} uImage
|
||||
bootm ${kernel_addr_r} - ${fdt_addr}
|
||||
3
recipes-bsp/rpi-u-boot-scr/files/boot.cmd.in
Normal file
3
recipes-bsp/rpi-u-boot-scr/files/boot.cmd.in
Normal file
@@ -0,0 +1,3 @@
|
||||
fdt addr ${fdt_addr} && fdt get value bootargs /chosen bootargs
|
||||
fatload mmc 0:1 ${kernel_addr_r} @@KERNEL_IMAGETYPE@@
|
||||
@@KERNEL_BOOTCMD@@ ${kernel_addr_r} - ${fdt_addr}
|
||||
@@ -1,17 +1,22 @@
|
||||
SUMMARY = "U-boot boot scripts for Raspberry Pi"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
|
||||
COMPATIBLE_MACHINE = "rpi"
|
||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||
COMPATIBLE_MACHINE = "^rpi$"
|
||||
|
||||
DEPENDS = "u-boot-mkimage-native"
|
||||
|
||||
SRC_URI = "file://boot.cmd"
|
||||
INHIBIT_DEFAULT_DEPS = "1"
|
||||
|
||||
SRC_URI = "file://boot.cmd.in"
|
||||
|
||||
do_compile() {
|
||||
sed -e 's/@@KERNEL_IMAGETYPE@@/${KERNEL_IMAGETYPE}/' \
|
||||
-e 's/@@KERNEL_BOOTCMD@@/${KERNEL_BOOTCMD}/' \
|
||||
"${WORKDIR}/boot.cmd.in" > "${WORKDIR}/boot.cmd"
|
||||
mkimage -A arm -T script -C none -n "Boot script" -d "${WORKDIR}/boot.cmd" boot.scr
|
||||
}
|
||||
|
||||
inherit deploy
|
||||
inherit deploy nopackages
|
||||
|
||||
do_deploy() {
|
||||
install -d ${DEPLOYDIR}
|
||||
|
||||
@@ -1 +1 @@
|
||||
RDEPENDS_${PN}_append_rpi = " rpi-u-boot-scr"
|
||||
DEPENDS_append_rpi = " rpi-u-boot-scr"
|
||||
|
||||
Binary file not shown.
@@ -1,12 +0,0 @@
|
||||
[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
|
||||
@@ -1,26 +1,16 @@
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
SRC_URI_append_raspberrypi3 = " \
|
||||
file://BCM43430A1.hcd \
|
||||
BCM_BT_SOURCES = " \
|
||||
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
|
||||
BCM_BT_RDEPENDS = "pi-bluetooth"
|
||||
|
||||
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
|
||||
}
|
||||
SRC_URI_append_raspberrypi0-wifi = " ${BCM_BT_SOURCES}"
|
||||
SRC_URI_append_raspberrypi3 = " ${BCM_BT_SOURCES}"
|
||||
|
||||
FILES_${PN}_append_raspberrypi3 = " \
|
||||
/lib/firmware/brcm/BCM43430A1.hcd \
|
||||
"
|
||||
|
||||
SYSTEMD_SERVICE_${PN}_append_raspberrypi3 = " brcm43438.service"
|
||||
RDEPENDS_${PN}_append_raspberrypi0-wifi = " ${BCM_BT_RDEPENDS}"
|
||||
RDEPENDS_${PN}_append_raspberrypi3 = " ${BCM_BT_RDEPENDS}"
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
From af91c96951a11f81f5cea88a0010161592c89310 Mon Sep 17 00:00:00 2001
|
||||
From: "Peter A. Bigot" <pab@pabigot.com>
|
||||
Date: Wed, 14 Nov 2018 09:19:51 -0600
|
||||
Subject: [PATCH] bthelper: correct path for hciconfig under Yocto
|
||||
|
||||
Upstream-Status: Inapproprate [OE-specific]
|
||||
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
|
||||
---
|
||||
usr/bin/bthelper | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/usr/bin/bthelper b/usr/bin/bthelper
|
||||
index 255fdeb..4e1a1a4 100755
|
||||
--- a/usr/bin/bthelper
|
||||
+++ b/usr/bin/bthelper
|
||||
@@ -10,7 +10,7 @@ fi
|
||||
|
||||
dev="$1"
|
||||
# Need to bring hci up before looking at MAC as it can be all zeros during init
|
||||
-/bin/hciconfig "$dev" up
|
||||
-/bin/hciconfig "$dev" |grep -q "BD Address: B8:27:EB:" || exit 0
|
||||
+/usr/bin/hciconfig "$dev" up
|
||||
+/usr/bin/hciconfig "$dev" |grep -q "BD Address: B8:27:EB:" || exit 0
|
||||
/usr/bin/hcitool -i "$dev" cmd 0x3f 0x1c 0x01 0x02 0x00 0x01 0x01 > /dev/null
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
||||
46
recipes-connectivity/pi-bluetooth/pi-bluetooth_git.bb
Normal file
46
recipes-connectivity/pi-bluetooth/pi-bluetooth_git.bb
Normal file
@@ -0,0 +1,46 @@
|
||||
SUMMARY = "Script to properly configure BT-HCI on Raspberry Pi"
|
||||
HOMEPAGE = "https://github.com/RPi-Distro/pi-bluetooth"
|
||||
SECTION = "kernel"
|
||||
LICENSE = "BSD-3-Clause"
|
||||
LIC_FILES_CHKSUM = "\
|
||||
file://debian/copyright;md5=6af8de3c8ee71f8e91e9b22f84ff2022 \
|
||||
"
|
||||
|
||||
SRC_URI = "\
|
||||
git://github.com/RPi-Distro/pi-bluetooth \
|
||||
file://0001-bthelper-correct-path-for-hciconfig-under-Yocto.patch \
|
||||
"
|
||||
SRCREV = "2e1a393955910aea67bbf3c921be35a66e8a8fbe"
|
||||
PV = "1.1+git${SRCPV}"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
# hciuart.service replaces what was brcm43438.service
|
||||
inherit systemd
|
||||
SYSTEMD_SERVICE_${PN} = "\
|
||||
hciuart.service \
|
||||
bthelper@.service \
|
||||
"
|
||||
|
||||
inherit allarch
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${sysconfdir}/udev/rules.d
|
||||
install -m 0644 ${S}/lib/udev/rules.d/* ${D}${sysconfdir}/udev/rules.d
|
||||
|
||||
install -d ${D}${bindir}
|
||||
install -m 0755 ${S}/usr/bin/bthelper ${D}${bindir}
|
||||
install -m 0755 ${S}/usr/bin/btuart ${D}${bindir}
|
||||
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
|
||||
install -d ${D}${systemd_system_unitdir}
|
||||
install -m 0644 ${S}/debian/pi-bluetooth.bthelper@.service ${D}${systemd_system_unitdir}/bthelper@.service
|
||||
install -m 0644 ${S}/debian/pi-bluetooth.hciuart.service ${D}${systemd_system_unitdir}/hciuart.service
|
||||
fi
|
||||
}
|
||||
|
||||
FILES_${PN} = "\
|
||||
${bindir} \
|
||||
${sysconfdir} \
|
||||
${systemd_unitdir}/system \
|
||||
"
|
||||
@@ -1,6 +1,15 @@
|
||||
# Base this image on rpi-hwup-image
|
||||
include rpi-hwup-image.bb
|
||||
# Base this image on core-image-minimal
|
||||
include recipes-core/images/core-image-minimal.bb
|
||||
|
||||
# Include modules in rootfs
|
||||
IMAGE_INSTALL += " \
|
||||
kernel-modules \
|
||||
"
|
||||
|
||||
SPLASH = "psplash-raspberrypi"
|
||||
|
||||
IMAGE_FEATURES += "ssh-server-dropbear splash"
|
||||
|
||||
do_image_prepend() {
|
||||
bb.warn("The image 'rpi-basic-image' is deprecated, please use 'core-image-base' instead")
|
||||
}
|
||||
|
||||
@@ -5,3 +5,7 @@ include recipes-core/images/core-image-minimal.bb
|
||||
IMAGE_INSTALL += " \
|
||||
kernel-modules \
|
||||
"
|
||||
|
||||
do_image_prepend() {
|
||||
bb.warn("The image 'rpi-hwup-image' is deprecated, please use 'core-image-base' instead")
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
# Base this image on rpi-basic-image
|
||||
include rpi-basic-image.bb
|
||||
# Base this image on core-image-base
|
||||
include recipes-core/images/core-image-base.bb
|
||||
|
||||
COMPATIBLE_MACHINE = "^rpi$"
|
||||
|
||||
IMAGE_INSTALL_append = " packagegroup-rpi-test"
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# mesa-demos needs gles1 and userland driver does not have it, works ok with vc4 graphics driver
|
||||
X11GLTOOLS_remove_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', 'mesa-demos', d)}"
|
||||
@@ -1,11 +1,15 @@
|
||||
DESCRIPTION = "RaspberryPi Test Packagegroup"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
|
||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||
|
||||
inherit packagegroup
|
||||
|
||||
COMPATIBLE_MACHINE = "^rpi$"
|
||||
|
||||
OMXPLAYER = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', 'omxplayer', d)}"
|
||||
|
||||
RDEPENDS_${PN} = "\
|
||||
omxplayer \
|
||||
${OMXPLAYER} \
|
||||
bcm2835-tests \
|
||||
wiringpi \
|
||||
rpio \
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
|
||||
SPLASH_IMAGES_append_rpi = " file://psplash-raspberrypi-img.h;outsuffix=raspberrypi"
|
||||
ALTERNATIVE_PRIORITY_psplash-raspberrypi[psplash] = "10"
|
||||
|
||||
ALTERNATIVE_PRIORITY_psplash-raspberrypi[psplash] = "200"
|
||||
@@ -1,11 +1,13 @@
|
||||
DESCRIPTION = "udev rules for Raspberry Pi Boards"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
|
||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||
|
||||
SRC_URI = " file://99-com.rules"
|
||||
|
||||
S = "${WORKDIR}"
|
||||
|
||||
INHIBIT_DEFAULT_DEPS = "1"
|
||||
|
||||
do_install () {
|
||||
install -d ${D}${sysconfdir}/udev/rules.d
|
||||
install -m 0644 ${WORKDIR}/99-com.rules ${D}${sysconfdir}/udev/rules.d/
|
||||
|
||||
10
recipes-core/udev/udev-rules-udisks-rpi/80-udisks-rpi.rules
Normal file
10
recipes-core/udev/udev-rules-udisks-rpi/80-udisks-rpi.rules
Normal file
@@ -0,0 +1,10 @@
|
||||
##############################################################################################################
|
||||
|
||||
# Partitions which desktops should not display
|
||||
#
|
||||
|
||||
# boot partition
|
||||
ENV{ID_FS_TYPE}=="vfat", ENV{ID_FS_LABEL}=="raspberrypi", \
|
||||
ENV{UDISKS_PRESENTATION_HIDE}="1", ENV{UDISKS_IGNORE}="1"
|
||||
|
||||
##############################################################################################################
|
||||
13
recipes-core/udev/udev-rules-udisks-rpi_1.0.bb
Normal file
13
recipes-core/udev/udev-rules-udisks-rpi_1.0.bb
Normal file
@@ -0,0 +1,13 @@
|
||||
DESCRIPTION = "add udisk/udev rule to hide boot partition from udev"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||
SRC_URI = "file://80-udisks-rpi.rules"
|
||||
|
||||
INHIBIT_DEFAULT_DEPS = "1"
|
||||
|
||||
do_install () {
|
||||
install -d ${D}${base_libdir}/udev/rules.d
|
||||
install -m 644 ${WORKDIR}/80-udisks-rpi.rules ${D}${base_libdir}/udev/rules.d
|
||||
}
|
||||
|
||||
FILES_${PN} = "${base_libdir}/udev/rules.d"
|
||||
@@ -8,7 +8,7 @@ AUTHOR = "Mike McCauley (mikem@open.com.au)"
|
||||
LICENSE = "GPLv2"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
|
||||
|
||||
COMPATIBLE_MACHINE = "raspberrypi"
|
||||
COMPATIBLE_MACHINE = "^rpi$"
|
||||
|
||||
SRC_URI = "http://www.airspayce.com/mikem/bcm2835/bcm2835-${PV}.tar.gz"
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
From 6a6b705ff5cba960c54bdb4d4bcdaa3b00a854a2 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 11 Aug 2018 10:24:24 -0700
|
||||
Subject: [PATCH] pi-blaster: Include sys/sysmacros.h for makedev()
|
||||
|
||||
In glibc 2.28+ this header is not included indirectly anymore
|
||||
|
||||
fixes
|
||||
|
||||
ld: pi-blaster.o: in function `mbox_open':
|
||||
pi-blaster.c:(.text+0x28): undefined reference to `makedev'
|
||||
collect2: error: ld returned 1 exit status
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/sarfata/pi-blaster/pull/100]
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
pi-blaster.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/pi-blaster.c b/pi-blaster.c
|
||||
index 6cfd010..fc4e686 100644
|
||||
--- a/pi-blaster.c
|
||||
+++ b/pi-blaster.c
|
||||
@@ -41,6 +41,7 @@ static char VERSION[] = "SNAPSHOT";
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
+#include <sys/sysmacros.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/mman.h>
|
||||
#include "mailbox.h"
|
||||
@@ -1,13 +1,28 @@
|
||||
Remove dependencies on LSB functions
|
||||
From 1338f98a279616f4e5e9ea30a25d1dfa0c7df5d6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petter=20Mab=C3=A4cker?= <petter@technux.se>
|
||||
Date: Sun, 4 Jun 2017 12:22:40 +0200
|
||||
Subject: [PATCH] Remove dependencies on LSB functions
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
See this as a rebase of the previous 'Remove dependencies on LSB
|
||||
functions patch' with only minor modifications from the original version,
|
||||
based on the work done by Alex Lennon <ajlennon@dynamicdevices.co.uk> in
|
||||
'25fd817 pi-blaster: Added recipe'.
|
||||
|
||||
Upstream-Status: Inappropriate [configuration]
|
||||
|
||||
Signed-off-by: Alex Lennon <ajlennon@dynamicdevices.co.uk>
|
||||
Signed-off-by: Petter Mabäcker <petter@technux.se>
|
||||
---
|
||||
debian/pi-blaster.init | 38 +++++++-------------------------------
|
||||
1 file changed, 7 insertions(+), 31 deletions(-)
|
||||
|
||||
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 @@
|
||||
diff --git a/debian/pi-blaster.init b/debian/pi-blaster.init
|
||||
index b142d70..01a686c 100644
|
||||
--- a/debian/pi-blaster.init
|
||||
+++ b/debian/pi-blaster.init
|
||||
@@ -28,12 +28,12 @@ SCRIPTNAME=/etc/init.d/$NAME
|
||||
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
|
||||
|
||||
# Load the VERBOSE setting and other rcS variables
|
||||
@@ -22,7 +37,7 @@ diff -ur git.org/pi-blaster.boot.sh git/pi-blaster.boot.sh
|
||||
|
||||
#
|
||||
# Function that starts the daemon/service
|
||||
@@ -77,48 +77,23 @@
|
||||
@@ -77,48 +77,24 @@ do_stop()
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
@@ -52,6 +67,7 @@ diff -ur git.org/pi-blaster.boot.sh git/pi-blaster.boot.sh
|
||||
# 'force-reload' alias
|
||||
#
|
||||
- log_daemon_msg "Restarting $DESC" "$NAME"
|
||||
+ echo "Restarting $DESC" "$NAME"
|
||||
do_stop
|
||||
- case "$?" in
|
||||
- 0|1)
|
||||
@@ -67,11 +83,14 @@ diff -ur git.org/pi-blaster.boot.sh git/pi-blaster.boot.sh
|
||||
- log_end_msg 1
|
||||
- ;;
|
||||
- esac
|
||||
+ do_start
|
||||
+ do_start
|
||||
;;
|
||||
*)
|
||||
- echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
|
||||
+ echo "Usage: $SCRIPTNAME {start|stop|restart}" >&2
|
||||
+ echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
--
|
||||
1.9.1
|
||||
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
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}"
|
||||
@@ -1,3 +1,24 @@
|
||||
require pi-blaster.inc
|
||||
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=244;endline=268;md5=86d10e4bcf4b4014d306dde7c1d2a80d"
|
||||
|
||||
SRCREV = "ec5e1b4c6191d8f9a538497dbbb86f9cf0de7016"
|
||||
SRC_URI = "git://github.com/sarfata/pi-blaster \
|
||||
file://remove-initscript-lsb-dependency.patch \
|
||||
file://0001-pi-blaster-Include-sys-sysmacros.h-for-makedev.patch \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
SRCREV = "e981aa5d7624c75a4d4afcddcbd235f25e32ffe4"
|
||||
|
||||
inherit update-rc.d autotools
|
||||
|
||||
INITSCRIPT_PACKAGES = "${PN}"
|
||||
INITSCRIPT_NAME_${PN} = "${PN}.boot.sh"
|
||||
INITSCRIPT_PARAMS_${PN} = "defaults 15 85"
|
||||
|
||||
COMPATIBLE_MACHINE = "^rpi$"
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
|
||||
@@ -4,16 +4,12 @@ SECTION = "devel/python"
|
||||
LICENSE = "BSD"
|
||||
LIC_FILES_CHKSUM = "file://LICENCE.txt;md5=d80fe312e1ff5fbd97369b093bf21cda"
|
||||
|
||||
SRCNAME = "sense-hat"
|
||||
inherit setuptools pypi
|
||||
|
||||
SRC_URI = "https://pypi.python.org/packages/source/s/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
|
||||
PYPI_PACKAGE = "sense-hat"
|
||||
|
||||
SRC_URI[md5sum] = "71217f15ea963040f06e2f50722186ca"
|
||||
SRC_URI[sha256sum] = "c6c76707c0ea514e4b0f1f96f1b5b79755875891aae037df7434b6aad7b9dbca"
|
||||
|
||||
S = "${WORKDIR}/${SRCNAME}-${PV}"
|
||||
|
||||
inherit setuptools
|
||||
SRC_URI[md5sum] = "69929250cb72349a8a82edf2584b1d83"
|
||||
SRC_URI[sha256sum] = "f000998d042d96ed722d459312e1bebd0107f9f3015cd34b3e4fabcab9c800af"
|
||||
|
||||
DEPENDS += " \
|
||||
jpeg \
|
||||
@@ -1,21 +0,0 @@
|
||||
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=9b95630a648966b142f1a0dcea001cb7"
|
||||
|
||||
SRCNAME = "RPi.GPIO"
|
||||
|
||||
SRC_URI = "\
|
||||
http://pypi.python.org/packages/source/R/RPi.GPIO/${SRCNAME}-${PV}.tar.gz \
|
||||
file://0001-Remove-nested-functions.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "9db86fd5f3bae872de9dbb068ee0b096"
|
||||
SRC_URI[sha256sum] = "82acff0ef6bbe3cdf6f4dbdd73d96add5294bb94baf7f51c1d901861af3c2392"
|
||||
|
||||
S = "${WORKDIR}/${SRCNAME}-${PV}"
|
||||
|
||||
inherit distutils
|
||||
|
||||
COMPATIBLE_MACHINE = "raspberrypi"
|
||||
|
||||
14
recipes-devtools/python/rpi-gpio_0.6.3.bb
Normal file
14
recipes-devtools/python/rpi-gpio_0.6.3.bb
Normal file
@@ -0,0 +1,14 @@
|
||||
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=9b95630a648966b142f1a0dcea001cb7"
|
||||
|
||||
PYPI_PACKAGE = "RPi.GPIO"
|
||||
inherit pypi distutils
|
||||
|
||||
SRC_URI += "file://0001-Remove-nested-functions.patch"
|
||||
SRC_URI[md5sum] = "e4abe1cfb5eacebe53078032256eb837"
|
||||
SRC_URI[sha256sum] = "a5fc0eb5e401963b6c0a03650da6b42c4005f02d962b81241d96c98d0a578516"
|
||||
|
||||
COMPATIBLE_MACHINE = "^rpi$"
|
||||
@@ -5,16 +5,19 @@ SECTION = "devel/python"
|
||||
LICENSE = "LGPLv3+"
|
||||
LIC_FILES_CHKSUM = "file://README.rst;beginline=41;endline=53;md5=d5d95d7486a4d98c999675c23196b25a"
|
||||
|
||||
SRCNAME = "RPIO"
|
||||
PYPI_PACKAGE = "RPIO"
|
||||
inherit pypi
|
||||
|
||||
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}"
|
||||
SRC_URI += "file://0001-include-sys-types.h-explicitly-for-getting-caddr_t-d.patch"
|
||||
|
||||
inherit setuptools
|
||||
|
||||
COMPATIBLE_MACHINE = "raspberrypi"
|
||||
COMPATIBLE_MACHINE = "^rpi$"
|
||||
|
||||
RDEPENDS_${PN} = "\
|
||||
python-logging \
|
||||
python-threading \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "cefc45422833dcafcd59b78dffc540f4"
|
||||
SRC_URI[sha256sum] = "b89f75dec9de354681209ebfaedfe22b7c178aacd91a604a7bd6d92024e4cf7e"
|
||||
|
||||
16
recipes-devtools/raspi-gpio/raspi-gpio_git.bb
Normal file
16
recipes-devtools/raspi-gpio/raspi-gpio_git.bb
Normal file
@@ -0,0 +1,16 @@
|
||||
DESCRIPTION = "Tool to help debug / hack at the BCM283x GPIO"
|
||||
HOMEPAGE = "https://github.com/RPi-Distro/raspi-gpio"
|
||||
SECTION = "devel/libs"
|
||||
LICENSE = "BSD-3-Clause"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=a14affa234debc057b47cdca615b2192"
|
||||
|
||||
COMPATIBLE_MACHINE = "^rpi$"
|
||||
|
||||
inherit autotools
|
||||
|
||||
SRCREV = "2df7b8684e2e36b080cda315d78d5ba16f8f18b0"
|
||||
SRC_URI = "git://github.com/RPi-Distro/raspi-gpio.git;protocol=https;branch=master \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
@@ -1,29 +1,33 @@
|
||||
From 4ed727aa9e528f130fdc8798df771037a1f22fc9 Mon Sep 17 00:00:00 2001
|
||||
From: Andrea Galbusera <gizero@gmail.com>
|
||||
Date: Mon, 3 Apr 2017 14:48:14 +0200
|
||||
Subject: [PATCH] =?UTF-8?q?Add=20initial=20cross=20compile=20support=20(re?=
|
||||
=?UTF-8?q?base=20from=20Petter=20Mab=C3=A4cker=20<petter@technux.se>=20ve?=
|
||||
=?UTF-8?q?rsion)?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
From 32f3cad3c41161693659a902062fa0c01c0338ed Mon Sep 17 00:00:00 2001
|
||||
From: ErikHH <erik.hoogeveen@outlook.com>
|
||||
Date: Thu, 20 Dec 2018 15:33:45 +0100
|
||||
Subject: [PATCH 1/1] Add initial cross compile support
|
||||
|
||||
Signed-off-by: ErikHH <erik.hoogeveen@outlook.com>
|
||||
---
|
||||
devLib/Makefile | 54 +++++++++++++++++++++++++--------------------
|
||||
examples/Gertboard/Makefile | 20 +++++++++++------
|
||||
examples/Makefile | 20 +++++++++++------
|
||||
examples/PiFace/Makefile | 20 +++++++++++------
|
||||
examples/PiGlow/Makefile | 4 ++--
|
||||
examples/q2w/Makefile | 4 ++--
|
||||
gpio/Makefile | 29 ++++++++++++------------
|
||||
wiringPi/Makefile | 50 +++++++++++++++++++++++------------------
|
||||
8 files changed, 116 insertions(+), 85 deletions(-)
|
||||
devLib/Makefile | 55 +++++++++++++++++++++----------------
|
||||
examples/Gertboard/Makefile | 22 +++++++++------
|
||||
examples/Makefile | 22 +++++++++------
|
||||
examples/PiFace/Makefile | 22 +++++++++------
|
||||
examples/PiGlow/Makefile | 4 +--
|
||||
examples/q2w/Makefile | 4 +--
|
||||
gpio/Makefile | 29 +++++++++----------
|
||||
wiringPi/Makefile | 47 +++++++++++++++++--------------
|
||||
8 files changed, 119 insertions(+), 86 deletions(-)
|
||||
|
||||
diff --git a/devLib/Makefile b/devLib/Makefile
|
||||
index cf665d6..040c03a 100644
|
||||
index cf665d6..d193a9d 100644
|
||||
--- a/devLib/Makefile
|
||||
+++ b/devLib/Makefile
|
||||
@@ -31,15 +31,19 @@ ifneq ($V,1)
|
||||
@@ -22,6 +22,7 @@
|
||||
#################################################################################
|
||||
|
||||
VERSION=$(shell cat ../VERSION)
|
||||
+DYN_VERS_MAJ=$(word 1,$(subst ., ,$(VERSION)))
|
||||
DESTDIR?=/usr
|
||||
PREFIX?=/local
|
||||
|
||||
@@ -31,15 +32,19 @@ ifneq ($V,1)
|
||||
Q ?= @
|
||||
endif
|
||||
|
||||
@@ -51,7 +55,7 @@ index cf665d6..040c03a 100644
|
||||
|
||||
LIBS =
|
||||
|
||||
@@ -68,16 +72,16 @@ $(STATIC): $(OBJ)
|
||||
@@ -68,16 +73,16 @@ $(STATIC): $(OBJ)
|
||||
|
||||
$(DYNAMIC): $(OBJ)
|
||||
$Q echo "[Link (Dynamic)]"
|
||||
@@ -71,7 +75,7 @@ index cf665d6..040c03a 100644
|
||||
|
||||
.PHONY: tags
|
||||
tags: $(SRC)
|
||||
@@ -88,22 +92,22 @@ tags: $(SRC)
|
||||
@@ -88,22 +93,22 @@ tags: $(SRC)
|
||||
.PHONY: install
|
||||
install: $(DYNAMIC)
|
||||
$Q echo "[Install Headers]"
|
||||
@@ -104,7 +108,7 @@ index cf665d6..040c03a 100644
|
||||
|
||||
.PHONY: install-deb
|
||||
install-deb: $(DYNAMIC)
|
||||
@@ -118,9 +122,11 @@ install-deb: $(DYNAMIC)
|
||||
@@ -118,9 +123,11 @@ install-deb: $(DYNAMIC)
|
||||
.PHONY: uninstall
|
||||
uninstall:
|
||||
$Q echo "[UnInstall]"
|
||||
@@ -132,11 +136,12 @@ index 1939ad6..98d1415 100644
|
||||
-CC = gcc
|
||||
-INCLUDE = -I/usr/local/include
|
||||
-CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
|
||||
+DESTDIR?=/usr
|
||||
+PREFIX?=/local
|
||||
|
||||
-
|
||||
-LDFLAGS = -L/usr/local/lib
|
||||
-LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm
|
||||
+DESTDIR?=/usr
|
||||
+PREFIX?=/local
|
||||
+
|
||||
+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include
|
||||
+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib
|
||||
+
|
||||
@@ -164,11 +169,12 @@ index 6d87885..8623816 100644
|
||||
-CC = gcc
|
||||
-INCLUDE = -I/usr/local/include
|
||||
-CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
|
||||
+DESTDIR?=/usr
|
||||
+PREFIX?=/local
|
||||
|
||||
-
|
||||
-LDFLAGS = -L/usr/local/lib
|
||||
-LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm -lcrypt -lrt
|
||||
+DESTDIR?=/usr
|
||||
+PREFIX?=/local
|
||||
+
|
||||
+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include
|
||||
+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib
|
||||
+
|
||||
@@ -196,11 +202,12 @@ index f937c14..ad030b3 100644
|
||||
-CC = gcc
|
||||
-INCLUDE = -I/usr/local/include
|
||||
-CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe
|
||||
+DESTDIR?=/usr
|
||||
+PREFIX?=/local
|
||||
|
||||
-
|
||||
-LDFLAGS = -L/usr/local/lib
|
||||
-LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm
|
||||
+DESTDIR?=/usr
|
||||
+PREFIX?=/local
|
||||
+
|
||||
+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include
|
||||
+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib
|
||||
+
|
||||
@@ -250,7 +257,7 @@ index 8f773bf..14aa6e4 100644
|
||||
|
||||
###############################################################################
|
||||
diff --git a/gpio/Makefile b/gpio/Makefile
|
||||
index f41a005..22753ee 100644
|
||||
index 9ec160d..a294242 100644
|
||||
--- a/gpio/Makefile
|
||||
+++ b/gpio/Makefile
|
||||
@@ -30,13 +30,17 @@ ifneq ($V,1)
|
||||
@@ -286,8 +293,8 @@ index f41a005..22753ee 100644
|
||||
- $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 mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1
|
||||
- $Q cp gpio.1 $(DESTDIR)$(PREFIX)/share/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
|
||||
@@ -301,14 +308,18 @@ index f41a005..22753ee 100644
|
||||
$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
|
||||
$Q rm -f $(DESTDIR)$(PREFIX)/share/man/man1/gpio.1
|
||||
|
||||
.PHONY: depend
|
||||
diff --git a/wiringPi/Makefile b/wiringPi/Makefile
|
||||
index e1868b9..e39f75a 100644
|
||||
index 287fa58..3423d3f 100644
|
||||
--- a/wiringPi/Makefile
|
||||
+++ b/wiringPi/Makefile
|
||||
@@ -25,19 +25,23 @@ VERSION=$(shell cat ../VERSION)
|
||||
@@ -22,25 +22,30 @@
|
||||
#################################################################################
|
||||
|
||||
VERSION=$(shell cat ../VERSION)
|
||||
+DYN_VERS_MAJ=$(word 1,$(subst ., ,$(VERSION)))
|
||||
DESTDIR?=/usr
|
||||
PREFIX?=/local
|
||||
|
||||
@@ -336,19 +347,24 @@ index e1868b9..e39f75a 100644
|
||||
+CC ?= gcc
|
||||
+INCLUDE ?= -I.
|
||||
DEFS = -D_GNU_SOURCE
|
||||
CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Wextra -Winline $(INCLUDE) -pipe -fPIC
|
||||
-CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Wextra -Winline $(INCLUDE) -pipe -fPIC
|
||||
-#CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Wextra -Wconversion -Winline $(INCLUDE) -pipe -fPIC
|
||||
+CFLAGS = $(DEBUG) $(DEFS) $(INCLUDE) -Wformat=2 -Wall -Wextra -Winline -pipe -fPIC
|
||||
+#CFLAGS = $(DEBUG) $(DEFS) $(INCLUDE) -Wformat=2 -Wall -Wextra -Wconversion -Winline -pipe -fPIC
|
||||
|
||||
@@ -78,17 +82,17 @@ $(STATIC): $(OBJ)
|
||||
LIBS = -lm -lpthread -lrt -lcrypt
|
||||
|
||||
@@ -75,17 +80,17 @@ static:
|
||||
|
||||
$(DYNAMIC): $(OBJ)
|
||||
$Q echo "[Link (Dynamic)]"
|
||||
- $Q $(CC) -shared -Wl,-soname,libwiringPi.so$(WIRINGPI_SONAME_SUFFIX) -o libwiringPi.so.$(VERSION) $(LIBS) $(OBJ)
|
||||
+ $Q $(CC) $(LDFLAGS) -shared -Wl,-soname,$(BASE_NAME).so.$(DYN_VERS_MAJ) -o $(BASE_NAME).so $(LIBS) $(OBJ)
|
||||
+ $Q $(CC) $(LDFLAGS) -shared -Wl,-soname,$(BASE_NAME).so.$(DYN_VERS_MAJ) -o $(BASE_NAME).so $(OBJ) $(LIBS)
|
||||
|
||||
.c.o:
|
||||
$Q echo [Compile] $<
|
||||
- $Q $(CC) -c $(CFLAGS) $< -o $@
|
||||
+ $Q $(CC) -c $(CFLAGS) -fPIC $< -o $@
|
||||
+ $Q $(CC) $(CFLAGS) $(LIBS) -c $< -o $@
|
||||
|
||||
|
||||
.PHONY: clean
|
||||
@@ -359,7 +375,7 @@ index e1868b9..e39f75a 100644
|
||||
|
||||
.PHONY: tags
|
||||
tags: $(SRC)
|
||||
@@ -99,22 +103,22 @@ tags: $(SRC)
|
||||
@@ -96,13 +101,13 @@ tags: $(SRC)
|
||||
.PHONY: install
|
||||
install: $(DYNAMIC)
|
||||
$Q echo "[Install Headers]"
|
||||
@@ -377,22 +393,9 @@ index e1868b9..e39f75a 100644
|
||||
+ $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)
|
||||
@@ -129,9 +133,11 @@ install-deb: $(DYNAMIC)
|
||||
@@ -117,9 +122,11 @@ install-deb: $(DYNAMIC)
|
||||
.PHONY: uninstall
|
||||
uninstall:
|
||||
$Q echo "[UnInstall]"
|
||||
@@ -408,5 +411,5 @@ index e1868b9..e39f75a 100644
|
||||
|
||||
.PHONY: depend
|
||||
--
|
||||
2.7.4
|
||||
2.19.1
|
||||
|
||||
@@ -4,8 +4,10 @@ SECTION = "devel/libs"
|
||||
LICENSE = "LGPLv3+"
|
||||
LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02"
|
||||
|
||||
# tag 2.44
|
||||
SRCREV = "96344ff7125182989f98d3be8d111952a8f74e15"
|
||||
DEPENDS += "virtual/crypt"
|
||||
|
||||
# tag 2.46
|
||||
SRCREV = "8d188fa0e00bb8c6ff6eddd07bf92857e9bd533a"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
@@ -13,7 +15,7 @@ SRC_URI = "git://git.drogon.net/wiringPi \
|
||||
file://0001-Add-initial-cross-compile-support.patch \
|
||||
"
|
||||
|
||||
COMPATIBLE_MACHINE = "raspberrypi"
|
||||
COMPATIBLE_MACHINE = "^rpi$"
|
||||
|
||||
CFLAGS_prepend = "-I${S}/wiringPi -I${S}/devLib "
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
EGLINFO_DEVICE_rpi = "raspberrypi"
|
||||
COMPATIBLE_HOST_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', 'null', '"(.*)"', d)}"
|
||||
COMPATIBLE_HOST_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', 'null', '(.*)', d)}"
|
||||
|
||||
2
recipes-graphics/kmscube/kmscube_%.bbappend
Normal file
2
recipes-graphics/kmscube/kmscube_%.bbappend
Normal file
@@ -0,0 +1,2 @@
|
||||
# userland driver EGL implementation does not have all needed bits for it so remove it from build
|
||||
COMPATIBLE_HOST_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '(.*)', 'null', d)}"
|
||||
2
recipes-graphics/mesa/mesa-demos_%.bbappend
Normal file
2
recipes-graphics/mesa/mesa-demos_%.bbappend
Normal file
@@ -0,0 +1,2 @@
|
||||
# mesa-demos need libgles1 and userland driver does not have it
|
||||
COMPATIBLE_HOST_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '(.*)', 'null', d)}"
|
||||
@@ -1,3 +1,7 @@
|
||||
PACKAGECONFIG_append_rpi = " gallium"
|
||||
GALLIUMDRIVERS_rpi = "vc4"
|
||||
# DRI3 note:
|
||||
# With oe-core commit 8509e2e1a87578882b71948ccef3b50ccf1228b3 dri3 is set
|
||||
# as default. To state out clearly that Raspi needs dri3 and to avoid surprises
|
||||
# in case oe-core changes this default, we set dri3 explicitly.
|
||||
PACKAGECONFIG_append_rpi = " gallium ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 dri3', '', d)}"
|
||||
GALLIUMDRIVERS_append_rpi = ",vc4"
|
||||
DRIDRIVERS_rpi = ""
|
||||
|
||||
5
recipes-graphics/piglit/piglit_%.bbappend
Normal file
5
recipes-graphics/piglit/piglit_%.bbappend
Normal file
@@ -0,0 +1,5 @@
|
||||
# mesa-demos need libgles1 and userland driver does not have it so remove it from piglit rdeps
|
||||
RDEPENDS_${PN}_remove_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', 'mesa-demos', d)}"
|
||||
# it needs EGL >= 11 but userland says it provided version 10, remove it from build
|
||||
# | -- Requested 'egl >= 11.0' but version of EGL is 10
|
||||
COMPATIBLE_HOST_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '(.*)', 'null', d)}"
|
||||
@@ -1,7 +1,7 @@
|
||||
From f6540119d5b064361ffcb370373794932f97bfdd Mon Sep 17 00:00:00 2001
|
||||
From 08d56c1174e27573ae8df2a7b9e6632afd0bfe86 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
|
||||
Subject: [PATCH 01/18] Allow applications to set next resource handle
|
||||
|
||||
This patch adds provisions in userland to
|
||||
let apps callers set the next rendereing dispmanx resource.
|
||||
@@ -9,10 +9,10 @@ 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.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 +++--
|
||||
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
|
||||
@@ -204,5 +204,5 @@ index 8a5734c..51b3580 100644
|
||||
|
||||
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.12.0
|
||||
2.19.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 61a9d792ed774af43e592aa8fdb2a18488696d0f Mon Sep 17 00:00:00 2001
|
||||
From da60a2a34a48e2b324fceae608964814488cc8fb Mon Sep 17 00:00:00 2001
|
||||
From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
|
||||
Date: Tue, 1 Oct 2013 13:19:20 +0200
|
||||
Subject: [PATCH 02/13] wayland: Add support for the Wayland winsys
|
||||
Subject: [PATCH 02/18] wayland: Add support for the Wayland winsys
|
||||
|
||||
* Adds EGL_WL_bind_wayland_display extension
|
||||
* Adds wayland-egl library
|
||||
@@ -16,38 +16,40 @@ a DispmanX display from the clients.
|
||||
TODO: wl_dispmanx_server_buffer should probably be defined in a
|
||||
private header that can be included from EGL and vc_* instead of in
|
||||
vc_vchi_dispmanx.h
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
.gitignore | 2 +
|
||||
CMakeLists.txt | 11 +
|
||||
README.md | 4 +
|
||||
buildme | 10 +-
|
||||
.../linux/apps/raspicam/CMakeLists.txt | 2 +-
|
||||
interface/khronos/CMakeLists.txt | 53 ++++-
|
||||
interface/khronos/common/khrn_client.c | 15 ++
|
||||
interface/khronos/common/khrn_client.h | 10 +
|
||||
interface/khronos/common/khrn_client_mangle.h | 3 +
|
||||
interface/khronos/common/khrn_client_platform.h | 8 +
|
||||
interface/khronos/common/khrn_client_unmangle.h | 3 +
|
||||
.../common/linux/khrn_client_platform_linux.c | 115 ++++++++--
|
||||
interface/khronos/common/linux/khrn_wayland.c | 215 ++++++++++++++++++
|
||||
.../common/linux/khrn_wayland.h} | 46 +---
|
||||
interface/khronos/egl/egl_client.c | 92 +++++---
|
||||
interface/khronos/egl/egl_client_get_proc.c | 11 +
|
||||
interface/khronos/egl/egl_client_surface.c | 42 +++-
|
||||
interface/khronos/egl/egl_client_surface.h | 38 +++-
|
||||
interface/khronos/egl/egl_int_impl.h | 2 +-
|
||||
interface/khronos/ext/egl_wayland.c | 246 +++++++++++++++++++++
|
||||
interface/khronos/include/EGL/eglext.h | 23 ++
|
||||
interface/khronos/wayland-egl/wayland-egl-priv.h | 53 +++++
|
||||
interface/khronos/wayland-egl/wayland-egl.c | 59 +++++
|
||||
interface/khronos/wayland-egl/wayland-egl.pc.in | 10 +
|
||||
interface/vmcs_host/CMakeLists.txt | 21 +-
|
||||
interface/vmcs_host/vc_dispmanx.h | 10 +
|
||||
interface/vmcs_host/vc_vchi_dispmanx.c | 42 ++++
|
||||
interface/vmcs_host/vc_vchi_dispmanx.h | 15 ++
|
||||
interface/wayland/dispmanx.xml | 123 +++++++++++
|
||||
makefiles/cmake/Wayland.cmake | 72 ++++++
|
||||
30 files changed, 1258 insertions(+), 98 deletions(-)
|
||||
.gitignore | 1 +
|
||||
CMakeLists.txt | 11 +
|
||||
README.md | 4 +
|
||||
buildme | 10 +-
|
||||
.../linux/apps/raspicam/CMakeLists.txt | 2 +-
|
||||
interface/khronos/CMakeLists.txt | 54 +++-
|
||||
interface/khronos/common/khrn_client.c | 15 ++
|
||||
interface/khronos/common/khrn_client.h | 10 +
|
||||
interface/khronos/common/khrn_client_mangle.h | 3 +
|
||||
.../khronos/common/khrn_client_platform.h | 8 +
|
||||
.../khronos/common/khrn_client_unmangle.h | 3 +
|
||||
.../common/linux/khrn_client_platform_linux.c | 115 +++++++-
|
||||
interface/khronos/common/linux/khrn_wayland.c | 215 +++++++++++++++
|
||||
.../common/linux/khrn_wayland.h} | 46 +---
|
||||
interface/khronos/egl/egl_client.c | 92 +++++--
|
||||
interface/khronos/egl/egl_client_get_proc.c | 11 +
|
||||
interface/khronos/egl/egl_client_surface.c | 42 ++-
|
||||
interface/khronos/egl/egl_client_surface.h | 38 ++-
|
||||
interface/khronos/egl/egl_int_impl.h | 2 +-
|
||||
interface/khronos/ext/egl_wayland.c | 246 ++++++++++++++++++
|
||||
interface/khronos/include/EGL/eglext.h | 23 ++
|
||||
.../khronos/wayland-egl/wayland-egl-priv.h | 53 ++++
|
||||
interface/khronos/wayland-egl/wayland-egl.c | 59 +++++
|
||||
.../khronos/wayland-egl/wayland-egl.pc.in | 10 +
|
||||
interface/vmcs_host/CMakeLists.txt | 21 +-
|
||||
interface/vmcs_host/vc_dispmanx.h | 10 +
|
||||
interface/vmcs_host/vc_vchi_dispmanx.c | 42 +++
|
||||
interface/vmcs_host/vc_vchi_dispmanx.h | 15 ++
|
||||
interface/wayland/dispmanx.xml | 123 +++++++++
|
||||
makefiles/cmake/Wayland.cmake | 72 +++++
|
||||
30 files changed, 1257 insertions(+), 99 deletions(-)
|
||||
create mode 100644 interface/khronos/common/linux/khrn_wayland.c
|
||||
copy interface/{vmcs_host/vc_vchi_dispmanx.h => khronos/common/linux/khrn_wayland.h} (56%)
|
||||
create mode 100644 interface/khronos/ext/egl_wayland.c
|
||||
@@ -58,14 +60,13 @@ vc_vchi_dispmanx.h
|
||||
create mode 100644 makefiles/cmake/Wayland.cmake
|
||||
|
||||
diff --git a/.gitignore b/.gitignore
|
||||
index 4a88665..5da71a9 100644
|
||||
index 63570f1..1459436 100644
|
||||
--- a/.gitignore
|
||||
+++ b/.gitignore
|
||||
@@ -13,3 +13,5 @@ build/
|
||||
*.lai
|
||||
*.la
|
||||
*.a
|
||||
+
|
||||
@@ -30,3 +30,4 @@ build/
|
||||
*.pts
|
||||
*.ppm
|
||||
*.mkv
|
||||
+*~
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index cfc8ae5..673a5ad 100644
|
||||
@@ -90,13 +91,13 @@ index cfc8ae5..673a5ad 100644
|
||||
|
||||
# Global include paths
|
||||
diff --git a/README.md b/README.md
|
||||
index 358d2b4..4da4448 100644
|
||||
index 94b93b8..50b90b1 100644
|
||||
--- a/README.md
|
||||
+++ b/README.md
|
||||
@@ -4,3 +4,7 @@ EGL, mmal, GLESv2, vcos, openmaxil, vchiq_arm, bcm_host, WFC, OpenVG.
|
||||
|
||||
Use buildme to build. It requires cmake to be installed and an arm cross compiler. It is set up to use this one:
|
||||
@@ -6,3 +6,7 @@ Use buildme to build. It requires cmake to be installed and an arm cross compile
|
||||
https://github.com/raspberrypi/tools/tree/master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian
|
||||
|
||||
Note that this repository does not contain the source for the edid_parser and vcdbg binaries due to licensing restrictions.
|
||||
+
|
||||
+To build support for the Wayland winsys in EGL, execute the buildme script like this:
|
||||
+
|
||||
@@ -132,20 +133,20 @@ index b8fd440..a780bb6 100755
|
||||
|
||||
if [ "$1" != "" ]; then
|
||||
diff --git a/host_applications/linux/apps/raspicam/CMakeLists.txt b/host_applications/linux/apps/raspicam/CMakeLists.txt
|
||||
index e6aa6b8..69059cb 100644
|
||||
index 42636e8..d47ad55 100644
|
||||
--- a/host_applications/linux/apps/raspicam/CMakeLists.txt
|
||||
+++ b/host_applications/linux/apps/raspicam/CMakeLists.txt
|
||||
@@ -28,7 +28,7 @@ add_executable(raspividyuv ${COMMON_SOURCES} RaspiVidYUV.c)
|
||||
@@ -33,7 +33,7 @@ add_executable(raspividyuv ${COMMON_SOURCES} RaspiVidYUV.c)
|
||||
|
||||
set (MMAL_LIBS mmal_core mmal_util mmal_vc_client)
|
||||
|
||||
-target_link_libraries(raspistill ${MMAL_LIBS} vcos bcm_host brcmGLESv2 brcmEGL m)
|
||||
+target_link_libraries(raspistill ${MMAL_LIBS} vcos bcm_host brcmGLESv2 brcmEGL m ${WAYLAND_SERVER_LIBRARIES} ${WAYLAND_CLIENT_LIBRARIES})
|
||||
-target_link_libraries(raspistill ${MMAL_LIBS} vcos bcm_host brcmGLESv2 brcmEGL m dl)
|
||||
+target_link_libraries(raspistill ${MMAL_LIBS} vcos bcm_host brcmGLESv2 brcmEGL m dl ${WAYLAND_SERVER_LIBRARIES} ${WAYLAND_CLIENT_LIBRARIES})
|
||||
target_link_libraries(raspiyuv ${MMAL_LIBS} vcos bcm_host)
|
||||
target_link_libraries(raspivid ${MMAL_LIBS} vcos bcm_host)
|
||||
target_link_libraries(raspividyuv ${MMAL_LIBS} vcos bcm_host)
|
||||
diff --git a/interface/khronos/CMakeLists.txt b/interface/khronos/CMakeLists.txt
|
||||
index 9ad615b..3d3571a 100644
|
||||
index 9ad615b..95c0e11 100644
|
||||
--- a/interface/khronos/CMakeLists.txt
|
||||
+++ b/interface/khronos/CMakeLists.txt
|
||||
@@ -6,6 +6,12 @@
|
||||
@@ -161,7 +162,7 @@ index 9ad615b..3d3571a 100644
|
||||
set(EGL_SOURCE
|
||||
egl/egl_client_config.c
|
||||
egl/egl_client_context.c
|
||||
@@ -55,12 +61,56 @@ set(CLIENT_SOURCE
|
||||
@@ -55,12 +61,55 @@ set(CLIENT_SOURCE
|
||||
common/khrn_int_hash_asm.s
|
||||
common/khrn_client_cache.c)
|
||||
|
||||
@@ -169,8 +170,7 @@ index 9ad615b..3d3571a 100644
|
||||
+ khrn_client
|
||||
+ vchiq_arm
|
||||
+ vcos
|
||||
+ bcm_host
|
||||
+ -lm)
|
||||
+ bcm_host)
|
||||
+
|
||||
+if (BUILD_WAYLAND)
|
||||
+ set(EGL_SOURCE
|
||||
@@ -218,16 +218,25 @@ index 9ad615b..3d3571a 100644
|
||||
# TODO do we need EGL_static and GLESv2_static now that khrn_static exists?
|
||||
add_library(EGL_static STATIC ${EGL_SOURCE})
|
||||
add_library(GLESv2_static STATIC ${GLES_SOURCE})
|
||||
@@ -72,8 +122,7 @@ include_directories (../../host_applications/linux/libs/sm )
|
||||
@@ -72,8 +121,7 @@ include_directories (../../host_applications/linux/libs/sm )
|
||||
set(VCSM_LIBS vcsm)
|
||||
add_definitions(-DKHRONOS_HAVE_VCSM)
|
||||
endif()
|
||||
-
|
||||
-target_link_libraries(EGL khrn_client vchiq_arm vcos bcm_host ${VCSM_LIBS} -lm)
|
||||
+target_link_libraries(EGL ${EGL_LIBS} ${VCSM_LIBS})
|
||||
+target_link_libraries(EGL ${EGL_LIBS} ${VCSM_LIBS} -lm)
|
||||
target_link_libraries(GLESv2 EGL khrn_client vcos)
|
||||
target_link_libraries(WFC EGL)
|
||||
target_link_libraries(OpenVG EGL)
|
||||
@@ -87,7 +135,7 @@ add_library(brcmGLESv2 ${SHARED} ${GLES_SOURCE})
|
||||
add_library(brcmOpenVG ${SHARED} ${VG_SOURCE})
|
||||
add_library(brcmWFC ${SHARED} ${WFC_SOURCE})
|
||||
|
||||
-target_link_libraries(brcmEGL khrn_client vchiq_arm vcos bcm_host ${VCSM_LIBS} -lm)
|
||||
+target_link_libraries(brcmEGL ${EGL_LIBS} ${VCSM_LIBS} -lm)
|
||||
target_link_libraries(brcmGLESv2 brcmEGL khrn_client vcos)
|
||||
target_link_libraries(brcmWFC brcmEGL)
|
||||
target_link_libraries(brcmOpenVG brcmEGL)
|
||||
diff --git a/interface/khronos/common/khrn_client.c b/interface/khronos/common/khrn_client.c
|
||||
index ef4babd..d7e798e 100644
|
||||
--- a/interface/khronos/common/khrn_client.c
|
||||
@@ -808,16 +817,16 @@ index b8bb374..03fe67b 100644
|
||||
/*
|
||||
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?)
|
||||
@@ -451,6 +444,9 @@ EGLAPI const char EGLAPIENTRY * eglQueryString(EGLDisplay dpy, EGLint name)
|
||||
@@ -450,6 +443,9 @@ EGLAPI const char EGLAPIENTRY * eglQueryString(EGLDisplay dpy, EGLint name)
|
||||
#ifdef EGL_KHR_fence_sync
|
||||
"EGL_KHR_fence_sync "
|
||||
#endif
|
||||
#endif
|
||||
+#endif
|
||||
+#if EGL_WL_bind_wayland_display
|
||||
+ "EGL_WL_bind_wayland_display "
|
||||
+#endif
|
||||
#endif
|
||||
;
|
||||
break;
|
||||
case EGL_VENDOR:
|
||||
@@ -655,8 +651,7 @@ EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig c
|
||||
false,
|
||||
EGL_NO_TEXTURE,
|
||||
@@ -1885,5 +1894,5 @@ index 0000000..ad90d30
|
||||
+ set(${_sources} ${${_sources}} PARENT_SCOPE)
|
||||
+endfunction()
|
||||
--
|
||||
2.12.2
|
||||
2.19.1
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
From 08679675740d92f022e0fd46207a42589c9f6c51 Mon Sep 17 00:00:00 2001
|
||||
From 976cc9355fe18487cd84e313e76f397ab47a4bf8 Mon Sep 17 00:00:00 2001
|
||||
From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
|
||||
Date: Tue, 1 Oct 2013 13:19:20 +0200
|
||||
Subject: [PATCH 03/13] wayland: Add Wayland example
|
||||
Subject: [PATCH 03/18] wayland: Add Wayland example
|
||||
|
||||
---
|
||||
.../linux/apps/hello_pi/CMakeLists.txt | 1 +
|
||||
.../apps/hello_pi/hello_wayland/CMakeLists.txt | 8 +
|
||||
.../apps/hello_pi/hello_wayland/Djenne_128_128.raw | 3 +
|
||||
.../linux/apps/hello_pi/hello_wayland/Makefile | 5 +
|
||||
.../hello_wayland/cube_texture_and_coords.h | 100 ++++
|
||||
.../linux/apps/hello_pi/hello_wayland/triangle.c | 666 +++++++++++++++++++++
|
||||
host_applications/linux/apps/hello_pi/rebuild.sh | 3 +-
|
||||
.../linux/apps/hello_pi/CMakeLists.txt | 1 +
|
||||
.../hello_pi/hello_wayland/CMakeLists.txt | 8 +
|
||||
.../hello_pi/hello_wayland/Djenne_128_128.raw | 3 +
|
||||
.../apps/hello_pi/hello_wayland/Makefile | 5 +
|
||||
.../hello_wayland/cube_texture_and_coords.h | 100 +++
|
||||
.../apps/hello_pi/hello_wayland/triangle.c | 666 ++++++++++++++++++
|
||||
.../linux/apps/hello_pi/rebuild.sh | 3 +-
|
||||
7 files changed, 785 insertions(+), 1 deletion(-)
|
||||
create mode 100644 host_applications/linux/apps/hello_pi/hello_wayland/CMakeLists.txt
|
||||
create mode 100644 host_applications/linux/apps/hello_pi/hello_wayland/Djenne_128_128.raw
|
||||
@@ -862,5 +862,5 @@ index 8225dd5..0be6ce7 100755
|
||||
-
|
||||
+make -C hello_wayland
|
||||
--
|
||||
2.12.0
|
||||
2.19.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From eb9d0eb386b9b3df519a299887b45962c03e732c Mon Sep 17 00:00:00 2001
|
||||
From c379bd2dc575256084d9e36fc11a347e20660130 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
|
||||
Subject: [PATCH 04/18] 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
|
||||
@@ -24,5 +24,5 @@ index 8bafc15..fd259c9 100644
|
||||
Libs: -L${libdir} -lwayland-egl
|
||||
Cflags: -I${includedir}
|
||||
--
|
||||
2.12.0
|
||||
2.19.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From ef3162e061a3231fbf836208f98c38c7c5581a9e Mon Sep 17 00:00:00 2001
|
||||
From bd940c32878d401f311215270579ff513c2f3999 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
|
||||
Subject: [PATCH 05/18] interface: remove faulty assert() to make weston happy
|
||||
at runtime
|
||||
|
||||
This was removed after a discussion on IRC with the weston guys
|
||||
@@ -13,7 +13,7 @@ Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/interface/vmcs_host/vc_vchi_dispmanx.c b/interface/vmcs_host/vc_vchi_dispmanx.c
|
||||
index 45f4cff..5d0368c 100755
|
||||
index eab146e..29e0dee 100755
|
||||
--- a/interface/vmcs_host/vc_vchi_dispmanx.c
|
||||
+++ b/interface/vmcs_host/vc_vchi_dispmanx.c
|
||||
@@ -1306,7 +1306,6 @@ static void *dispmanx_notify_func( void *arg ) {
|
||||
@@ -25,5 +25,5 @@ index 45f4cff..5d0368c 100755
|
||||
}
|
||||
} else {
|
||||
--
|
||||
2.12.0
|
||||
2.19.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 846e9271cf6a264e7e1f4e33be64df990ff39a74 Mon Sep 17 00:00:00 2001
|
||||
From 466f28ce302f68ac39be750f4b55285791f43ab1 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
|
||||
Subject: [PATCH 06/18] zero-out wl buffers in egl_surface_free
|
||||
|
||||
origins from buildroot
|
||||
|
||||
@@ -29,5 +29,5 @@ index 42350bf..1f923d9 100644
|
||||
#endif
|
||||
}
|
||||
--
|
||||
2.12.0
|
||||
2.19.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 15510fdf1c753c967b509046616b1e1a11b5b772 Mon Sep 17 00:00:00 2001
|
||||
From b4a2967513f7d0f5f3caee8cf6cbc7a7a085ebac 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
|
||||
Subject: [PATCH 07/18] initialize front back wayland buffers
|
||||
|
||||
origins from metrological wayland support
|
||||
|
||||
@@ -30,5 +30,5 @@ index 1f923d9..9a9582c 100644
|
||||
}
|
||||
#endif
|
||||
--
|
||||
2.12.0
|
||||
2.19.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 1df080ab9528b82321cf87d71927314294ef7121 Mon Sep 17 00:00:00 2001
|
||||
From 14c22987dfa9fec02794856cd15b2d64b4b81c32 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
|
||||
Subject: [PATCH 08/18] Remove RPC_FLUSH
|
||||
|
||||
Origins from buildroot
|
||||
|
||||
@@ -23,5 +23,5 @@ index f9b7287..b04ffef 100644
|
||||
}
|
||||
#endif
|
||||
--
|
||||
2.12.0
|
||||
2.19.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 11842307cc0e32bac6ef7622e7791ca7a0e9fa61 Mon Sep 17 00:00:00 2001
|
||||
From e510be221276d06e630ab93452ecb712d3921790 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
|
||||
Subject: [PATCH 09/18] fix cmake dependency race
|
||||
|
||||
Fixes errors like
|
||||
|
||||
@@ -74,5 +74,5 @@ index f0bae30..8c44c58 100644
|
||||
struct wl_resource *resource;
|
||||
struct wl_dispmanx *dispmanx;
|
||||
--
|
||||
2.12.0
|
||||
2.19.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 532dc7dc11877a9dae0f3d101c9bfdacc50840ca Mon Sep 17 00:00:00 2001
|
||||
From 8e6cde08077eadfe563dc17c19995ebc48e30b97 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 10/13] Fix for framerate with nested composition
|
||||
Subject: [PATCH 10/18] Fix for framerate with nested composition
|
||||
|
||||
frame rate appears irregular and lower than expected when using nested composition.
|
||||
|
||||
@@ -56,5 +56,5 @@ index 03fe67b..13a110c 100644
|
||||
#ifdef ANDROID
|
||||
CLIENT_UNLOCK();
|
||||
--
|
||||
2.12.0
|
||||
2.19.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 37ff90075102407d3abb3899b8c6ef64f6230207 Mon Sep 17 00:00:00 2001
|
||||
From 9a97d60262999093d6ce8cb688279506c210d802 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 11/13] build shared library for vchostif
|
||||
Subject: [PATCH 11/18] build shared library for vchostif
|
||||
|
||||
Fixes #149
|
||||
|
||||
@@ -24,5 +24,5 @@ index c415176..d0cca1a 100755
|
||||
#add_library(bufman vc_vchi_bufman.c )
|
||||
|
||||
--
|
||||
2.12.0
|
||||
2.19.1
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
From ce130bff946c3b78fc4dbbf98d9b16b5152f2e85 Mon Sep 17 00:00:00 2001
|
||||
From fedd7668152049c15ed58c7058e5f4a9c1fac7cb 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 12/13] implement buffer wrapping interface for dispmanx
|
||||
Subject: [PATCH 12/18] 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 +++++++++
|
||||
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
|
||||
@@ -88,5 +88,5 @@ index c18626d..11ed1ef 100644
|
||||
|
||||
</protocol>
|
||||
--
|
||||
2.12.0
|
||||
2.19.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 14d915a63a4e69290966543ce12edd615bfa9a25 Mon Sep 17 00:00:00 2001
|
||||
From 65f8bca55aead676cd06fc3210aeffef1f2158c6 Mon Sep 17 00:00:00 2001
|
||||
From: Jeff Wannamaker <jeff_wannamaker@cable.comcast.com>
|
||||
Date: Thu, 19 Jan 2017 18:56:07 +0000
|
||||
Subject: [PATCH 13/13] Implement triple buffering for wayland
|
||||
Subject: [PATCH 13/18] Implement triple buffering for wayland
|
||||
|
||||
Change from double to triple buffering for wayland.
|
||||
This enables higher frame rates without tearing artifacts
|
||||
@@ -67,10 +67,11 @@ diff --git a/interface/khronos/egl/egl_client_surface.h b/interface/khronos/egl/
|
||||
index e328b77..58a3184 100644
|
||||
--- a/interface/khronos/egl/egl_client_surface.h
|
||||
+++ b/interface/khronos/egl/egl_client_surface.h
|
||||
@@ -313,6 +313,17 @@ typedef struct {
|
||||
@@ -312,6 +312,17 @@ typedef struct {
|
||||
*/
|
||||
struct wl_dispmanx_client_buffer *front_wl_buffer;
|
||||
|
||||
/*
|
||||
+ /*
|
||||
+ middle_wl_buffer
|
||||
+
|
||||
+ Validity:
|
||||
@@ -81,10 +82,9 @@ index e328b77..58a3184 100644
|
||||
+ */
|
||||
+ struct wl_dispmanx_client_buffer *middle_wl_buffer;
|
||||
+
|
||||
+ /*
|
||||
/*
|
||||
back_wl_buffer
|
||||
|
||||
Validity:
|
||||
--
|
||||
2.12.0
|
||||
2.19.1
|
||||
|
||||
@@ -1,30 +1,35 @@
|
||||
From 55a66f56a14eb8c3ae8294860e49efc9c9598c46 Mon Sep 17 00:00:00 2001
|
||||
From dc1d07d835e1fe70c957a655d6fbb8cde65775af Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Wed, 10 May 2017 06:39:34 +0000
|
||||
Subject: [PATCH] GLES2/gl2ext.h: Define GL_R8_EXT and GL_RG8_EXT
|
||||
Subject: [PATCH 14/18] GLES2/gl2ext.h: Define GL_R8_EXT and GL_RG8_EXT
|
||||
|
||||
weston code uses these defines
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
interface/khronos/include/GLES2/gl2ext.h | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
interface/khronos/include/GLES2/gl2ext.h | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/interface/khronos/include/GLES2/gl2ext.h b/interface/khronos/include/GLES2/gl2ext.h
|
||||
index 4eacf7f..283e3e1 100644
|
||||
index 4eacf7f..b1acc9f 100644
|
||||
--- a/interface/khronos/include/GLES2/gl2ext.h
|
||||
+++ b/interface/khronos/include/GLES2/gl2ext.h
|
||||
@@ -327,6 +327,9 @@ typedef void* GLeglImageOES;
|
||||
@@ -327,6 +327,14 @@ typedef void* GLeglImageOES;
|
||||
#define GL_RGBX_BRCM 0x80EE
|
||||
#endif
|
||||
|
||||
+#ifndef GL_EXT_texture_rg
|
||||
+#define GL_EXT_texture_rg 1
|
||||
+#define GL_RED_EXT 0x1903
|
||||
+#define GL_RG_EXT 0x8227
|
||||
+#define GL_R8_EXT 0x8229
|
||||
+#define GL_RG8_EXT 0x822B
|
||||
+#endif /* GL_EXT_texture_rg */
|
||||
+
|
||||
/* GL_EXT_texture_type_2_10_10_10_REV */
|
||||
#ifndef GL_EXT_texture_type_2_10_10_10_REV
|
||||
#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368
|
||||
--
|
||||
1.9.1
|
||||
2.19.1
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
From b5fa294c0d8fcb6dd5bfbfb96a0885dd9f3ae609 Mon Sep 17 00:00:00 2001
|
||||
From: Andrea Galbusera <gizero@gmail.com>
|
||||
Date: Fri, 14 Jul 2017 09:52:54 +0200
|
||||
Subject: [PATCH 15/18] EGL/glplatform.h: define EGL_CAST
|
||||
|
||||
C++ / C typecast macros for special EGL handle values: used by libepoxy code
|
||||
The definition comes from the updated version of this header in mesa.
|
||||
|
||||
Upstream-Status: Pending
|
||||
---
|
||||
interface/khronos/include/EGL/eglplatform.h | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/interface/khronos/include/EGL/eglplatform.h b/interface/khronos/include/EGL/eglplatform.h
|
||||
index 1f7c930..c39d425 100644
|
||||
--- a/interface/khronos/include/EGL/eglplatform.h
|
||||
+++ b/interface/khronos/include/EGL/eglplatform.h
|
||||
@@ -202,4 +202,11 @@ EGLAPI void EGLAPIENTRY BEGL_GetDefaultDriverInterfaces(BEGL_DriverInterfaces *i
|
||||
#include "interface/khronos/common/khrn_client_mangle.h"
|
||||
#endif
|
||||
|
||||
+/* C++ / C typecast macros for special EGL handle values */
|
||||
+#if defined(__cplusplus)
|
||||
+#define EGL_CAST(type, value) (static_cast<type>(value))
|
||||
+#else
|
||||
+#define EGL_CAST(type, value) ((type) (value))
|
||||
+#endif
|
||||
+
|
||||
#endif /* __eglplatform_h */
|
||||
--
|
||||
2.19.1
|
||||
|
||||
@@ -0,0 +1,145 @@
|
||||
From bff03f92c0d8bae113e0c7234c719f8385808b38 Mon Sep 17 00:00:00 2001
|
||||
From: Jeff Wannamaker <jeff_wannamaker@cable.comcast.com>
|
||||
Date: Sat, 27 Jan 2018 12:28:31 -0500
|
||||
Subject: [PATCH 16/18] Allow multiple wayland compositor state data per
|
||||
process
|
||||
|
||||
When eglBindWaylandDisplayWL is called store the wl_global
|
||||
created in a list associated with the wayland display.
|
||||
This allows multiple wayland compositor instances to be
|
||||
created and used per process. This scenario is common for
|
||||
applications integrating externl process UI elements
|
||||
via embedded composition e.g. westeros
|
||||
|
||||
Signed-off-by: Jeff Wannamaker <jeff_wannamaker@cable.comcast.com>
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
interface/khronos/common/khrn_client.c | 2 +-
|
||||
interface/khronos/common/khrn_client.h | 11 +++++-
|
||||
interface/khronos/ext/egl_wayland.c | 50 ++++++++++++++++++++++----
|
||||
3 files changed, 55 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/interface/khronos/common/khrn_client.c b/interface/khronos/common/khrn_client.c
|
||||
index d7e798e..60bdb63 100644
|
||||
--- a/interface/khronos/common/khrn_client.c
|
||||
+++ b/interface/khronos/common/khrn_client.c
|
||||
@@ -147,7 +147,7 @@ bool client_process_state_init(CLIENT_PROCESS_STATE_T *process)
|
||||
{
|
||||
if (!process->inited) {
|
||||
#ifdef BUILD_WAYLAND
|
||||
- process->wl_global = NULL;
|
||||
+ process->wlStateMap = NULL;
|
||||
#endif
|
||||
|
||||
if (!khrn_pointer_map_init(&process->contexts, 64))
|
||||
diff --git a/interface/khronos/common/khrn_client.h b/interface/khronos/common/khrn_client.h
|
||||
index 615f7b4..4fa86f7 100644
|
||||
--- a/interface/khronos/common/khrn_client.h
|
||||
+++ b/interface/khronos/common/khrn_client.h
|
||||
@@ -170,6 +170,15 @@ static INLINE CLIENT_THREAD_STATE_T *CLIENT_GET_CHECK_THREAD_STATE(void)
|
||||
return (CLIENT_THREAD_STATE_T *)platform_tls_get_check(client_tls);
|
||||
}
|
||||
|
||||
+#ifdef BUILD_WAYLAND
|
||||
+typedef struct WAYLAND_STATE
|
||||
+{
|
||||
+ struct WAYLAND_STATE *next;
|
||||
+ struct wl_display *display;
|
||||
+ struct wl_global *wl_global;
|
||||
+} WAYLAND_STATE_T;
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
per-process state
|
||||
|
||||
@@ -318,7 +327,7 @@ struct CLIENT_PROCESS_STATE {
|
||||
struct wl_event_queue *wl_queue;
|
||||
|
||||
/* Compositor-side Wayland state */
|
||||
- struct wl_global *wl_global;
|
||||
+ WAYLAND_STATE_T *wlStateMap;
|
||||
#endif
|
||||
};
|
||||
|
||||
diff --git a/interface/khronos/ext/egl_wayland.c b/interface/khronos/ext/egl_wayland.c
|
||||
index 9ef89cd..abd5ab3 100644
|
||||
--- a/interface/khronos/ext/egl_wayland.c
|
||||
+++ b/interface/khronos/ext/egl_wayland.c
|
||||
@@ -208,17 +208,38 @@ eglBindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display)
|
||||
{
|
||||
CLIENT_THREAD_STATE_T *thread;
|
||||
CLIENT_PROCESS_STATE_T *process;
|
||||
+ WAYLAND_STATE_T *stateIter;
|
||||
+ WAYLAND_STATE_T *stateNew;
|
||||
+ struct wl_global *wl_global;
|
||||
|
||||
if (!CLIENT_LOCK_AND_GET_STATES(dpy, &thread, &process))
|
||||
return EGL_FALSE;
|
||||
|
||||
- if (process->wl_global != NULL)
|
||||
+ stateIter= process->wlStateMap;
|
||||
+ while( stateIter )
|
||||
+ {
|
||||
+ if ( stateIter->display == display )
|
||||
+ goto error;
|
||||
+ stateIter= stateIter->next;
|
||||
+ }
|
||||
+
|
||||
+ wl_global = wl_global_create(display, &wl_dispmanx_interface, 1,
|
||||
+ NULL, bind_dispmanx);
|
||||
+ if (wl_global == NULL)
|
||||
goto error;
|
||||
|
||||
- process->wl_global = wl_global_create(display, &wl_dispmanx_interface, 1,
|
||||
- NULL, bind_dispmanx);
|
||||
- if (process->wl_global == NULL)
|
||||
+ stateNew= (WAYLAND_STATE_T*)calloc( 1, sizeof(WAYLAND_STATE_T));
|
||||
+ if (stateNew == NULL )
|
||||
+ {
|
||||
+ wl_global_destroy(wl_global);
|
||||
goto error;
|
||||
+ }
|
||||
+
|
||||
+ stateNew->next= process->wlStateMap;
|
||||
+ stateNew->display= display;
|
||||
+ stateNew->wl_global= wl_global;
|
||||
+ process->wlStateMap= stateNew;
|
||||
+ CLIENT_UNLOCK();
|
||||
|
||||
return EGL_TRUE;
|
||||
|
||||
@@ -232,12 +253,29 @@ eglUnbindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display)
|
||||
{
|
||||
CLIENT_THREAD_STATE_T *thread;
|
||||
CLIENT_PROCESS_STATE_T *process;
|
||||
+ WAYLAND_STATE_T *stateIter;
|
||||
+ WAYLAND_STATE_T *statePrev;
|
||||
|
||||
if (!CLIENT_LOCK_AND_GET_STATES(dpy, &thread, &process))
|
||||
return EGL_FALSE;
|
||||
|
||||
- wl_global_destroy(process->wl_global);
|
||||
- process->wl_global = NULL;
|
||||
+ statePrev= NULL;
|
||||
+ stateIter= process->wlStateMap;
|
||||
+ while( stateIter )
|
||||
+ {
|
||||
+ if ( stateIter->display == display )
|
||||
+ {
|
||||
+ wl_global_destroy(stateIter->wl_global);
|
||||
+ if ( statePrev )
|
||||
+ statePrev->next= stateIter->next;
|
||||
+ else
|
||||
+ process->wlStateMap= stateIter->next;
|
||||
+ free( stateIter );
|
||||
+ break;
|
||||
+ }
|
||||
+ statePrev= stateIter;
|
||||
+ stateIter= stateIter->next;
|
||||
+ }
|
||||
|
||||
CLIENT_UNLOCK();
|
||||
|
||||
--
|
||||
2.19.1
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
From 8efd81e96bdd3be68063a6fd32be4755225e93b2 Mon Sep 17 00:00:00 2001
|
||||
From: Hugo Hromic <hhromic@gmail.com>
|
||||
Date: Sun, 13 May 2018 10:49:04 +0100
|
||||
Subject: [PATCH 17/18] khronos: backport typedef for
|
||||
EGL_EXT_image_dma_buf_import
|
||||
|
||||
The `gstreamer1.0-plugins-base` package version `1.14` uses `EGL_EXT_image_dma_buf_import`, which
|
||||
expects the `EGLuint64KHR` typedef that is present in recent versions of Khronos.
|
||||
However, the older version included in userland does not provide it.
|
||||
|
||||
This patch backports the missing typedef from recent Khronos into userland.
|
||||
See: <https://www.khronos.org/registry/EGL/api/EGL/eglext.h>
|
||||
|
||||
Submitted to userland in <https://github.com/raspberrypi/userland/pull/467>
|
||||
|
||||
Upstream-Status: Submitted
|
||||
---
|
||||
interface/khronos/include/EGL/eglext.h | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/interface/khronos/include/EGL/eglext.h b/interface/khronos/include/EGL/eglext.h
|
||||
index d7e5ba7..dcc90ce 100755
|
||||
--- a/interface/khronos/include/EGL/eglext.h
|
||||
+++ b/interface/khronos/include/EGL/eglext.h
|
||||
@@ -190,6 +190,10 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSy
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
|
||||
#endif
|
||||
|
||||
+#ifndef EGL_KHR_uint64_typedef
|
||||
+#define EGL_KHR_uint64_typedef 1
|
||||
+typedef khronos_uint64_t EGLuint64KHR;
|
||||
+#endif /* EGL_KHR_uint64_typedef */
|
||||
|
||||
#ifndef EGL_WL_bind_wayland_display
|
||||
#define EGL_WL_bind_wayland_display 1
|
||||
--
|
||||
2.19.1
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
From 9cfea4761ba68776fd9bfac671b74c7174f99029 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sun, 15 Jul 2018 00:48:38 -0700
|
||||
Subject: [PATCH 18/18] Add EGL_IMG_context_priority related defines
|
||||
|
||||
These defines are needed for compiling weston 4.x
|
||||
taken from Khronos headers
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
interface/khronos/include/EGL/eglext.h | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/interface/khronos/include/EGL/eglext.h b/interface/khronos/include/EGL/eglext.h
|
||||
index dcc90ce..6842bf9 100755
|
||||
--- a/interface/khronos/include/EGL/eglext.h
|
||||
+++ b/interface/khronos/include/EGL/eglext.h
|
||||
@@ -93,6 +93,14 @@ typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGL
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image);
|
||||
#endif
|
||||
|
||||
+#ifndef EGL_IMG_context_priority
|
||||
+#define EGL_IMG_context_priority 1
|
||||
+#define EGL_CONTEXT_PRIORITY_LEVEL_IMG 0x3102
|
||||
+#define EGL_CONTEXT_PRIORITY_HIGH_IMG 0x3101
|
||||
+#define EGL_CONTEXT_PRIORITY_MEDIUM_IMG 0x3102
|
||||
+#define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103
|
||||
+#endif /* EGL_IMG_context_priority */
|
||||
+
|
||||
#ifndef EGL_KHR_vg_parent_image
|
||||
#define EGL_KHR_vg_parent_image 1
|
||||
#define EGL_VG_PARENT_IMAGE_KHR 0x30BA /* eglCreateImageKHR target */
|
||||
--
|
||||
2.19.1
|
||||
|
||||
@@ -5,18 +5,18 @@ vcos, openmaxil, vchiq_arm, bcm_host, WFC, OpenVG."
|
||||
LICENSE = "BSD-3-Clause"
|
||||
LIC_FILES_CHKSUM = "file://LICENCE;md5=0448d6488ef8cc380632b1569ee6d196"
|
||||
|
||||
PR = "r5"
|
||||
PROVIDES += "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "", "virtual/libgles2 virtual/egl", d)}"
|
||||
|
||||
PROVIDES = "virtual/libgles2 \
|
||||
virtual/egl"
|
||||
|
||||
RPROVIDES_${PN} += "libgles2 egl"
|
||||
|
||||
COMPATIBLE_MACHINE = "raspberrypi"
|
||||
RPROVIDES_${PN} += "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "", "libgles2 egl libegl libegl1 libglesv2-2", d)}"
|
||||
COMPATIBLE_MACHINE = "^rpi$"
|
||||
|
||||
SRCBRANCH = "master"
|
||||
SRCFORK = "raspberrypi"
|
||||
SRCREV = "50d3cb5f4ee95a9513bb9f94d661947e9e6ac085"
|
||||
SRCREV = "d574b51a60a075baefe863670466ee24e6c4256e"
|
||||
|
||||
# Use the date of the above commit as the package version. Update this when
|
||||
# SRCREV is changed.
|
||||
PV = "20181120"
|
||||
|
||||
SRC_URI = "\
|
||||
git://github.com/${SRCFORK}/userland.git;protocol=git;branch=${SRCBRANCH} \
|
||||
@@ -34,6 +34,10 @@ SRC_URI = "\
|
||||
file://0012-implement-buffer-wrapping-interface-for-dispmanx.patch \
|
||||
file://0013-Implement-triple-buffering-for-wayland.patch \
|
||||
file://0014-GLES2-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch \
|
||||
file://0015-EGL-glplatform.h-define-EGL_CAST.patch \
|
||||
file://0016-Allow-multiple-wayland-compositor-state-data-per-pro.patch \
|
||||
file://0017-khronos-backport-typedef-for-EGL_EXT_image_dma_buf_i.patch \
|
||||
file://0018-Add-EGL_IMG_context_priority-related-defines.patch \
|
||||
"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
@@ -60,6 +64,14 @@ do_install_append () {
|
||||
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
|
||||
if [ "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}" = "1" ]; then
|
||||
rm -rf ${D}${libdir}/libEGL*
|
||||
rm -rf ${D}${libdir}/libGLES*
|
||||
rm -rf ${D}${libdir}/libwayland-*
|
||||
rm -rf ${D}${libdir}/pkgconfig/egl.pc ${D}${libdir}/pkgconfig/glesv2.pc \
|
||||
${D}${libdir}/pkgconfig/wayland-egl.pc
|
||||
rm -rf ${D}${includedir}/EGL ${D}${includedir}/GLES* ${D}${includedir}/KHR
|
||||
fi
|
||||
}
|
||||
|
||||
# Shared libs from userland package build aren't versioned, so we need
|
||||
@@ -79,3 +91,4 @@ FILES_${PN}-dbg += "${libdir}/plugins/.debug"
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
|
||||
RDEPENDS_${PN} += "bash"
|
||||
RDEPENDS_${PN} += "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "libegl-mesa", "", d)}"
|
||||
|
||||
@@ -4,7 +4,9 @@ LICENSE = "Proprietary"
|
||||
LIC_FILES_CHKSUM = "file://LICENCE;md5=86e53f5f5909ee66900418028de11780"
|
||||
|
||||
PROVIDES = "virtual/libgles2 virtual/egl"
|
||||
COMPATIBLE_MACHINE = "raspberrypi"
|
||||
COMPATIBLE_MACHINE = "^rpi$"
|
||||
|
||||
INHIBIT_DEFAULT_DEPS = "1"
|
||||
|
||||
include recipes-bsp/common/firmware.inc
|
||||
|
||||
|
||||
7
recipes-graphics/wayland/wayland_%.bbappend
Normal file
7
recipes-graphics/wayland/wayland_%.bbappend
Normal file
@@ -0,0 +1,7 @@
|
||||
# until fully tested, prefer `libwayland-egl` provided by `userland` instead of `wayland` when not using vc4graphics
|
||||
do_install_append_rpi () {
|
||||
if [ "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}" = "0" ]; then
|
||||
rm -f ${D}${libdir}/libwayland-egl*
|
||||
rm -f ${D}${libdir}/pkgconfig/wayland-egl.pc
|
||||
fi
|
||||
}
|
||||
@@ -1,12 +1,10 @@
|
||||
EXTRA_OECONF_append_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', ' --enable-rpi-compositor WESTON_NATIVE_BACKEND=rpi-backend.so', d)}"
|
||||
|
||||
PACKAGECONFIG_remove_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', 'fbdev', '', d)}"
|
||||
|
||||
EXTRA_OECONF += "--disable-xwayland-test \
|
||||
--disable-simple-egl-clients \
|
||||
EXTRA_OECONF_append_rpi = " \
|
||||
--disable-xwayland-test \
|
||||
--disable-simple-egl-clients \
|
||||
${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', ' \
|
||||
--disable-resize-optimization \
|
||||
--disable-setuid-install \
|
||||
', d)} \
|
||||
"
|
||||
|
||||
EXTRA_OECONF += "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', '--enable-rpi-compositor', d)}"
|
||||
EXTRA_OECONF += "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', '--disable-resize-optimization', d)}"
|
||||
EXTRA_OECONF += "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', '--disable-setuid-install', d)}"
|
||||
EXTRA_OECONF += "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', 'WESTON_NATIVE_BACKEND=rpi-backend.so', d)}"
|
||||
|
||||
@@ -4,7 +4,6 @@ SRC_URI_append_rpi = " \
|
||||
file://xorg.conf.d/98-pitft.conf \
|
||||
file://xorg.conf.d/99-calibration.conf \
|
||||
"
|
||||
|
||||
do_install_append_rpi () {
|
||||
PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
|
||||
if [ "${PITFT}" = "1" ]; then
|
||||
@@ -0,0 +1,84 @@
|
||||
SUMMARY = "Linux kernel Bluetooth firmware files from Raspbian distribution"
|
||||
DESCRIPTION = "Updated Bluetooth firmware files for RaspberryPi hardware. \
|
||||
RPi-Distro obtains these directly from Cypress; they are not submitted \
|
||||
to linux-firmware for general use."
|
||||
HOMEPAGE = "https://github.com/RPi-Distro/bluez-firmware"
|
||||
SECTION = "kernel"
|
||||
|
||||
# Upstream has provided[^1] licensing information in the Debian
|
||||
# copyright file. The wording of the Cypress license subsequently
|
||||
# changed in linux-firmware.
|
||||
#
|
||||
# Rather than make assumptions about what's supposed to be what, we'll
|
||||
# use the license implied by the source of these files, named to avoid
|
||||
# conflicts with linux-firmware.
|
||||
#
|
||||
# [^1]: https://github.com/RPi-Distro/bluez-firmware/issues/1
|
||||
LICENSE = "Firmware-cypress-rpidistro"
|
||||
LIC_FILES_CHKSUM = "\
|
||||
file://LICENCE.cypress-rpidistro;md5=852f9d10cbedba1f6c439729bd0617b4 \
|
||||
"
|
||||
|
||||
# These are not common licenses, set NO_GENERIC_LICENSE for them
|
||||
# so that the license files will be copied from fetched source
|
||||
NO_GENERIC_LICENSE[Firmware-cypress-rpidistro] = "LICENCE.cypress-rpidistro"
|
||||
|
||||
SRC_URI = "git://github.com/RPi-Distro/bluez-firmware"
|
||||
SRCREV = "96eefffcccc725425fd83be5e0704a5c32b79e54"
|
||||
PV = "0.0+git${SRCPV}"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit allarch
|
||||
|
||||
CLEANBROKEN = "1"
|
||||
|
||||
do_extract_lic() {
|
||||
# Extract the license from the Debian copyright file
|
||||
sed -e '1,23d' ${S}/debian/copyright > ${S}/LICENCE.cypress-rpidistro
|
||||
}
|
||||
# Must be before both do_install and do_populate_lic. Putting it before
|
||||
# their common ancestor works; other approaches do not.
|
||||
addtask extract_lic after do_unpack before do_patch
|
||||
|
||||
do_compile() {
|
||||
:
|
||||
}
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${nonarch_base_libdir}/firmware/brcm
|
||||
|
||||
cp LICENCE.cypress-rpidistro ${D}${nonarch_base_libdir}/firmware
|
||||
install -m 0644 broadcom/BCM434*.hcd ${D}${nonarch_base_libdir}/firmware/brcm/
|
||||
}
|
||||
|
||||
PACKAGES = "\
|
||||
${PN}-cypress-license \
|
||||
${PN}-bcm43430a1-hcd \
|
||||
${PN}-bcm4345c0-hcd \
|
||||
"
|
||||
|
||||
LICENSE_${PN}-bcm43430a1-hcd = "Firmware-cypress-rpidistro"
|
||||
LICENSE_${PN}-bcm4345c0-hcd = "Firmware-cypress-rpidistro"
|
||||
LICENSE_${PN}-cypress-license = "Firmware-cypress-rpidistro"
|
||||
|
||||
FILES_${PN}-cypress-license = "\
|
||||
${nonarch_base_libdir}/firmware/LICENCE.cypress-rpidistro \
|
||||
"
|
||||
FILES_${PN}-bcm43430a1-hcd = "\
|
||||
${nonarch_base_libdir}/firmware/brcm/BCM43430A1.hcd \
|
||||
"
|
||||
FILES_${PN}-bcm4345c0-hcd = "\
|
||||
${nonarch_base_libdir}/firmware/brcm/BCM4345C0.hcd \
|
||||
"
|
||||
|
||||
RDEPENDS_${PN}-bcm43430a1-hcd += "${PN}-cypress-license"
|
||||
RDEPENDS_${PN}-bcm4345c0-hcd += "${PN}-cypress-license"
|
||||
RCONFLICTS_${PN}-bcm43430a1-hcd = "linux-firmware-bcm43430a1-hcd"
|
||||
RREPLACES_${PN}-bcm43430a1-hcd = "linux-firmware-bcm43430a1-hcd"
|
||||
RCONFLICTS_${PN}-bcm43435c0-hcd = "linux-firmware-bcm4345c0-hcd"
|
||||
RREPLACES_${PN}-bcm43435c0-hcd = "linux-firmware-bcm4345c0-hcd"
|
||||
|
||||
# Firmware files are generally not run on the CPU, so they can be
|
||||
# allarch despite being architecture specific
|
||||
INSANE_SKIP = "arch"
|
||||
@@ -0,0 +1,96 @@
|
||||
SUMMARY = "Linux kernel firmware files from Raspbian distribution"
|
||||
DESCRIPTION = "Updated firmware files for RaspberryPi hardware. \
|
||||
RPi-Distro obtains these directly from Cypress; they are not submitted \
|
||||
to linux-firmware for general use."
|
||||
HOMEPAGE = "https://github.com/RPi-Distro/firmware-nonfree"
|
||||
SECTION = "kernel"
|
||||
|
||||
# In maintained upstream linux-firmware:
|
||||
# * brcmfmac43430-sdio falls under LICENCE.cypress
|
||||
# * brcmfmac43455-sdio falls under LICENCE.broadcom_bcm43xx
|
||||
#
|
||||
# It is likely[^1] that both of these should be under LICENCE.cypress.
|
||||
# Further, at this time the text of LICENCE.broadcom_bcm43xx is the same
|
||||
# in linux-firmware and RPi-Distro/firmware-nonfree, but this may
|
||||
# change.
|
||||
#
|
||||
# Rather than make assumptions about what's supposed to be what, we'll
|
||||
# use the license implied by the source of these files, named to avoid
|
||||
# conflicts with linux-firmware.
|
||||
#
|
||||
# [^1]: https://github.com/RPi-Distro/bluez-firmware/issues/1
|
||||
LICENSE = "\
|
||||
Firmware-broadcom_bcm43xx-rpidistro \
|
||||
& WHENCE \
|
||||
"
|
||||
LIC_FILES_CHKSUM = "\
|
||||
file://LICENCE.broadcom_bcm43xx;md5=3160c14df7228891b868060e1951dfbc \
|
||||
file://WHENCE;md5=a9c2c217f513c20e1d16b384b3e2c12d \
|
||||
"
|
||||
|
||||
# These are not common licenses, set NO_GENERIC_LICENSE for them
|
||||
# so that the license files will be copied from fetched source
|
||||
NO_GENERIC_LICENSE[Firmware-broadcom_bcm43xx-rpidistro] = "LICENCE.broadcom_bcm43xx"
|
||||
NO_GENERIC_LICENSE[WHENCE] = "WHENCE"
|
||||
|
||||
SRC_URI = "git://github.com/RPi-Distro/firmware-nonfree"
|
||||
SRCREV = "b518de45ced519e8f7a499f4778100173402ae43"
|
||||
PV = "0.0+git${SRCPV}"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit allarch
|
||||
|
||||
CLEANBROKEN = "1"
|
||||
|
||||
do_compile() {
|
||||
:
|
||||
}
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${nonarch_base_libdir}/firmware/brcm
|
||||
|
||||
cp ./LICENCE.broadcom_bcm43xx ${D}${nonarch_base_libdir}/firmware/LICENCE.broadcom_bcm43xx-rpidistro
|
||||
|
||||
# Replace outdated linux-firmware files with updated ones from
|
||||
# raspbian firmware-nonfree. Raspbian adds blobs and nvram
|
||||
# definitions that are also necessary so copy those too.
|
||||
for fw in brcmfmac43430-sdio brcmfmac43455-sdio ; do
|
||||
install -m 0644 brcm/${fw}.* ${D}${nonarch_base_libdir}/firmware/brcm/
|
||||
done
|
||||
}
|
||||
|
||||
PACKAGES = "\
|
||||
${PN}-broadcom-license \
|
||||
${PN}-bcm43430 \
|
||||
${PN}-bcm43455 \
|
||||
"
|
||||
|
||||
LICENSE_${PN}-bcm43430 = "Firmware-broadcom_bcm43xx-rpidistro"
|
||||
LICENSE_${PN}-bcm43455 = "Firmware-broadcom_bcm43xx-rpidistro"
|
||||
LICENSE_${PN}-broadcom-license = "Firmware-broadcom_bcm43xx-rpidistro"
|
||||
FILES_${PN}-broadcom-license = "${nonarch_base_libdir}/firmware/LICENCE.broadcom_bcm43xx-rpidistro"
|
||||
FILES_${PN}-bcm43430 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43430*"
|
||||
FILES_${PN}-bcm43455 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43455*"
|
||||
RDEPENDS_${PN}-bcm43430 += "${PN}-broadcom-license"
|
||||
RDEPENDS_${PN}-bcm43455 += "${PN}-broadcom-license"
|
||||
RCONFLICTS_${PN}-bcm43430 = "\
|
||||
linux-firmware-bcm43430 \
|
||||
linux-firmware-raspbian-bcm43430 \
|
||||
"
|
||||
RREPLACES_${PN}-bcm43430 = "\
|
||||
linux-firmware-bcm43430 \
|
||||
linux-firmware-raspbian-bcm43430 \
|
||||
"
|
||||
RCONFLICTS_${PN}-bcm43455 = "\
|
||||
linux-firmware-bcm43455 \
|
||||
linux-firmware-raspbian-bcm43455 \
|
||||
"
|
||||
RREPLACES_${PN}-bcm43455 = "\
|
||||
linux-firmware-bcm43455 \
|
||||
linux-firmware-raspbian-bcm43455 \
|
||||
"
|
||||
|
||||
# Firmware files are generally not run on the CPU, so they can be
|
||||
# allarch despite being architecture specific
|
||||
INSANE_SKIP = "arch"
|
||||
@@ -1,66 +0,0 @@
|
||||
# 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
|
||||
@@ -1,12 +0,0 @@
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
|
||||
|
||||
SRC_URI += "file://brcmfmac43430-sdio.txt"
|
||||
|
||||
do_install_append() {
|
||||
install -D -m 0644 ${WORKDIR}/brcmfmac43430-sdio.txt ${D}/lib/firmware/brcm/brcmfmac43430-sdio.txt
|
||||
}
|
||||
|
||||
FILES_${PN}-bcm43430 += " \
|
||||
/lib/firmware/brcm/brcmfmac43430-sdio.txt \
|
||||
"
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
From e6ebc8e654bba53f28af5229a1069fc74fa58b7b Mon Sep 17 00:00:00 2001
|
||||
From: Jason Wessel <jason.wessel@windriver.com>
|
||||
Date: Thu, 25 Sep 2014 11:26:49 -0700
|
||||
Subject: [PATCH] menuconfig,check-lxdiaglog.sh: Allow specification of ncurses
|
||||
location
|
||||
|
||||
In some cross build environments such as the Yocto Project build
|
||||
environment it provides an ncurses library that is compiled
|
||||
differently than the host's version. This causes display corruption
|
||||
problems when the host's curses includes are used instead of the
|
||||
includes from the provided compiler are overridden. There is a second
|
||||
case where there is no curses libraries at all on the host system and
|
||||
menuconfig will just fail entirely.
|
||||
|
||||
The solution is simply to allow an override variable in
|
||||
check-lxdialog.sh for environments such as the Yocto Project. Adding
|
||||
a CROSS_CURSES_LIB and CROSS_CURSES_INC solves the issue and allowing
|
||||
compiling and linking against the right headers and libraries.
|
||||
|
||||
Upstream-Status: submitted [https://lkml.org/lkml/2013/3/3/103]
|
||||
|
||||
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
|
||||
cc: Michal Marek <mmarek@suse.cz>
|
||||
cc: linux-kbuild@vger.kernel.org
|
||||
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
||||
Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
|
||||
---
|
||||
scripts/kconfig/lxdialog/check-lxdialog.sh | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
mode change 100755 => 100644 scripts/kconfig/lxdialog/check-lxdialog.sh
|
||||
|
||||
diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh
|
||||
old mode 100755
|
||||
new mode 100644
|
||||
index 5075ebf2d3b9..ba9242101190
|
||||
--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
|
||||
+++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
|
||||
@@ -4,6 +4,10 @@
|
||||
# What library to link
|
||||
ldflags()
|
||||
{
|
||||
+ if [ "$CROSS_CURSES_LIB" != "" ]; then
|
||||
+ echo "$CROSS_CURSES_LIB"
|
||||
+ exit
|
||||
+ fi
|
||||
pkg-config --libs ncursesw 2>/dev/null && exit
|
||||
pkg-config --libs ncurses 2>/dev/null && exit
|
||||
for ext in so a dll.a dylib ; do
|
||||
@@ -21,6 +25,10 @@ ldflags()
|
||||
# Where is ncurses.h?
|
||||
ccflags()
|
||||
{
|
||||
+ if [ x"$CROSS_CURSES_INC" != x ]; then
|
||||
+ echo "$CROSS_CURSES_INC"
|
||||
+ exit
|
||||
+ fi
|
||||
if pkg-config --cflags ncursesw 2>/dev/null; then
|
||||
echo '-DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1'
|
||||
elif pkg-config --cflags ncurses 2>/dev/null; then
|
||||
--
|
||||
2.14.3
|
||||
|
||||
1
recipes-kernel/linux/files/rpi-kernel-misc.cfg
Normal file
1
recipes-kernel/linux/files/rpi-kernel-misc.cfg
Normal file
@@ -0,0 +1 @@
|
||||
CONFIG_SENSORS_RPI_POE_FAN=m
|
||||
@@ -7,20 +7,16 @@ python __anonymous() {
|
||||
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/linux-raspberrypi:"
|
||||
|
||||
LINUX_VERSION ?= "4.11"
|
||||
LINUX_RPI_DEV_BRANCH ?= "rpi-4.11.y"
|
||||
LINUX_VERSION ?= "4.16"
|
||||
LINUX_RPI_DEV_BRANCH ?= "rpi-4.16.y"
|
||||
|
||||
SRCREV = "${AUTOREV}"
|
||||
SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=${LINUX_RPI_DEV_BRANCH} \
|
||||
file://0001-build-arm64-Add-rules-for-.dtbo-files-for-dts-overla.patch \
|
||||
"
|
||||
SRC_URI = " \
|
||||
git://github.com/raspberrypi/linux.git;protocol=git;branch=${LINUX_RPI_DEV_BRANCH} \
|
||||
file://0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch \
|
||||
"
|
||||
require linux-raspberrypi.inc
|
||||
|
||||
# A LOADADDR is needed when building a uImage format kernel. This value is not
|
||||
# set by default in rpi-4.8.y and later branches so we need to provide it
|
||||
# manually. This value unused if KERNEL_IMAGETYPE is not uImage.
|
||||
KERNEL_EXTRA_ARGS += "LOADADDR=0x00008000"
|
||||
|
||||
# Disable version check so that we don't have to edit this recipe every time
|
||||
# upstream bumps the version
|
||||
KERNEL_VERSION_SANITY_SKIP = "1"
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
From 922ce1fd0eb810b713f6ffa9a7ab97c11b6e38cf Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Fri, 10 Feb 2017 17:57:08 -0800
|
||||
Subject: [PATCH] build/arm64: Add rules for .dtbo files for dts overlays
|
||||
|
||||
We now create overlays as .dtbo files.
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
arch/arm64/Makefile | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
|
||||
index 3635b8662724..822fefeb1cd0 100644
|
||||
--- a/arch/arm64/Makefile
|
||||
+++ b/arch/arm64/Makefile
|
||||
@@ -113,6 +113,9 @@ zinstall install:
|
||||
%.dtb: scripts
|
||||
$(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
|
||||
|
||||
+%.dtbo: | scripts
|
||||
+ $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@
|
||||
+
|
||||
PHONY += dtbs dtbs_install
|
||||
|
||||
dtbs: prepare scripts
|
||||
--
|
||||
2.11.1
|
||||
|
||||
9
recipes-kernel/linux/linux-raspberrypi-rt_4.14.bb
Normal file
9
recipes-kernel/linux/linux-raspberrypi-rt_4.14.bb
Normal file
@@ -0,0 +1,9 @@
|
||||
LINUX_VERSION ?= "4.14.81"
|
||||
|
||||
SRCREV = "acf578d07d57480674d5361df9171fe9528765cb"
|
||||
SRC_URI = " \
|
||||
git://github.com/raspberrypi/linux.git;branch=rpi-4.14.y-rt \
|
||||
file://0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch \
|
||||
"
|
||||
|
||||
require linux-raspberrypi.inc
|
||||
@@ -1,49 +1,128 @@
|
||||
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"
|
||||
COMPATIBLE_MACHINE = "^rpi$"
|
||||
|
||||
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"
|
||||
KERNEL_DEFCONFIG_raspberrypi3-64 ?= "bcmrpi3_defconfig"
|
||||
inherit kernel siteinfo
|
||||
require recipes-kernel/linux/linux-yocto.inc
|
||||
|
||||
SRC_URI += "file://rpi-kernel-misc.cfg"
|
||||
|
||||
KCONFIG_MODE = "--alldefconfig"
|
||||
KBUILD_DEFCONFIG_raspberrypi0-wifi ?= "bcmrpi_defconfig"
|
||||
KBUILD_DEFCONFIG_raspberrypi ?= "bcmrpi_defconfig"
|
||||
KBUILD_DEFCONFIG_raspberrypi2 ?= "bcm2709_defconfig"
|
||||
KBUILD_DEFCONFIG_raspberrypi3 ?= "bcm2709_defconfig"
|
||||
KBUILD_DEFCONFIG_raspberrypi3-64 ?= "bcmrpi3_defconfig"
|
||||
|
||||
# CMDLINE for raspberrypi
|
||||
CMDLINE ?= "dwc_otg.lpm_enable=0 console=serial0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
|
||||
SERIAL = "${@oe.utils.conditional("ENABLE_UART", "1", "console=serial0,115200", "", d)}"
|
||||
CMDLINE ?= "dwc_otg.lpm_enable=0 ${SERIAL} 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)}'
|
||||
CMDLINE_append = ' ${@oe.utils.conditional("ENABLE_KGDB", "1", "kgdboc=serial0,115200", "", d)}'
|
||||
|
||||
UDEV_GE_141 ?= "1"
|
||||
# Disable rpi logo on boot
|
||||
CMDLINE_append += ' ${@oe.utils.conditional("DISABLE_RPI_BOOT_LOGO", "1", "logo.nologo", "", d)}'
|
||||
|
||||
# You can define CMDLINE_DEBUG as "debug" in your local.conf or distro.conf
|
||||
# to enable kernel debugging.
|
||||
CMDLINE_DEBUG ?= ""
|
||||
CMDLINE_append = " ${CMDLINE_DEBUG}"
|
||||
|
||||
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')
|
||||
kerneldt = get_dts(d, d.getVar('LINUX_VERSION'))
|
||||
d.setVar("KERNEL_DEVICETREE", kerneldt)
|
||||
# A LOADADDR is needed when building a uImage format kernel. This value is not
|
||||
# set by default in rpi-4.8.y and later branches so we need to provide it
|
||||
# manually. This value unused if KERNEL_IMAGETYPE is not uImage.
|
||||
KERNEL_EXTRA_ARGS += "LOADADDR=0x00008000"
|
||||
|
||||
# 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_kernel_configme_prepend() {
|
||||
install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig || die "No default configuration for ${MACHINE} / ${KERNEL_DEFCONFIG} available."
|
||||
config_setup() {
|
||||
# From kernel.bbclass. Unfortunately, this is needed to support builds that
|
||||
# use devtool. The reason is as follows:
|
||||
#
|
||||
# - In devtool builds, externalsrc.bbclass gets inherited and sets a list of
|
||||
# SRCTREECOVEREDTASKS, which don't get run because they affect the source
|
||||
# tree and, when using devtool, we want the developer's changes to be the
|
||||
# single source of truth. kernel-yocto.bbclass adds do_kernel_configme to
|
||||
# SRCTREECOVEREDTASKS, so it doesn't run in a devtool build., In a normal
|
||||
# non-devtool build, do_kernel_configme creates ${B}.config.
|
||||
#
|
||||
# - Normally (e.g. in linux-yocto), it would be OK that do_kernel_configme
|
||||
# doesn't run, because the first few lines of do_configure in kernel.bbclass
|
||||
# populate ${B}.config from either ${S}.config (if it exists) for custom
|
||||
# developer changes, or otherwise from ${WORDIR}/defconfig.
|
||||
#
|
||||
# - In linux-raspberrypi, we add do_configure_prepend, which tweaks
|
||||
# ${B}.config. Since this runs *before* the kernel.bbclass do_configure,
|
||||
# ${B}.config doesn't yet exist and we hit an error. Thus we need to move
|
||||
# the logic from do_configure up to before our do_configure_prepend. Because
|
||||
# we are copying only a portion of do_configure and not the whole thing,
|
||||
# there is no clean way to do it using OE functionality, so we just
|
||||
# copy-and-paste.
|
||||
if [ "${S}" != "${B}" ] && [ -f "${S}/.config" ] && [ ! -f "${B}/.config" ]; then
|
||||
mv "${S}/.config" "${B}/.config"
|
||||
fi
|
||||
|
||||
# Copy defconfig to .config if .config does not exist. This allows
|
||||
# recipes to manage the .config themselves in do_configure_prepend().
|
||||
if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${B}/.config" ]; then
|
||||
cp "${WORKDIR}/defconfig" "${B}/.config"
|
||||
fi
|
||||
}
|
||||
|
||||
do_install_prepend() {
|
||||
install -d ${D}/lib/firmware
|
||||
do_configure_prepend() {
|
||||
config_setup
|
||||
|
||||
mv -f ${B}/.config ${B}/.config.patched
|
||||
CONF_SED_SCRIPT=""
|
||||
|
||||
# Localversion
|
||||
kernel_configure_variable LOCALVERSION "\"\""
|
||||
|
||||
if [ "${INITRAMFS_IMAGE_BUNDLE}" = "1" ]; then
|
||||
kernel_configure_variable OVERLAY_FS y
|
||||
kernel_configure_variable SQUASHFS y
|
||||
kernel_configure_variable UBIFS_FS y
|
||||
fi
|
||||
|
||||
# Activate the configuration options for VC4
|
||||
VC4GRAPHICS="${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}"
|
||||
if [ "${VC4GRAPHICS}" = "1" ]; then
|
||||
kernel_configure_variable I2C_BCM2835 y
|
||||
kernel_configure_variable DRM y
|
||||
kernel_configure_variable DRM_FBDEV_EMULATION y
|
||||
kernel_configure_variable DRM_VC4 y
|
||||
fi
|
||||
|
||||
# Keep this the last line
|
||||
# Remove all modified configs and add the rest to .config
|
||||
sed -e "${CONF_SED_SCRIPT}" < '${B}/.config.patched' >> '${B}/.config'
|
||||
rm -f ${B}/.config.patched
|
||||
}
|
||||
|
||||
do_compile_append_raspberrypi3-64() {
|
||||
cc_extra=$(get_cc_option)
|
||||
oe_runmake dtbs CC="${KERNEL_CC} $cc_extra " LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS}
|
||||
}
|
||||
|
||||
do_deploy_append() {
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
# Dummy file to get through do_kernel_configme.
|
||||
9
recipes-kernel/linux/linux-raspberrypi_4.14.bb
Normal file
9
recipes-kernel/linux/linux-raspberrypi_4.14.bb
Normal file
@@ -0,0 +1,9 @@
|
||||
LINUX_VERSION ?= "4.14.112"
|
||||
|
||||
SRCREV = "6b5c4a2508403839af29ef44059d04acbe0ee204"
|
||||
SRC_URI = " \
|
||||
git://github.com/raspberrypi/linux.git;branch=rpi-4.14.y \
|
||||
file://0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch \
|
||||
"
|
||||
|
||||
require linux-raspberrypi.inc
|
||||
@@ -1,13 +1,11 @@
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
|
||||
|
||||
LINUX_VERSION ?= "4.9.27"
|
||||
LINUX_VERSION ?= "4.9.80"
|
||||
|
||||
SRCREV = "9a5f215eda12bad29b35040dff00d0346fe517e2"
|
||||
SRC_URI = "git://github.com/raspberrypi/linux.git;branch=rpi-4.9.y"
|
||||
SRCREV = "7f9c648dad6473469b4133898fa6bb8d818ecff9"
|
||||
SRC_URI = " \
|
||||
git://github.com/raspberrypi/linux.git;branch=rpi-4.9.y \
|
||||
file://0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch \
|
||||
"
|
||||
|
||||
require linux-raspberrypi.inc
|
||||
|
||||
# A LOADADDR is needed when building a uImage format kernel. This value is not
|
||||
# set by default in rpi-4.8.y and later branches so we need to provide it
|
||||
# manually. This value unused if KERNEL_IMAGETYPE is not uImage.
|
||||
KERNEL_EXTRA_ARGS += "LOADADDR=0x00008000"
|
||||
|
||||
@@ -1,148 +0,0 @@
|
||||
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"
|
||||
|
||||
# You can define CMDLINE_DEBUG as "debug" in your local.conf or distro.conf
|
||||
# to enable kernel debugging.
|
||||
CMDLINE_DEBUG ?= ""
|
||||
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
|
||||
|
||||
# Activate the configuration options for VC4
|
||||
VC4GRAPHICS="${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}"
|
||||
if [ ${VC4GRAPHICS} = "1" ]; then
|
||||
kernel_configure_variable I2C_BCM2835 y
|
||||
kernel_configure_variable DRM y
|
||||
kernel_configure_variable DRM_FBDEV_EMULATION y
|
||||
kernel_configure_variable DRM_VC4 y
|
||||
kernel_configure_variable FB_BCM2708 n
|
||||
fi
|
||||
|
||||
# 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,16 +0,0 @@
|
||||
diff --git a/omx/gstomx.c b/omx/gstomx.c
|
||||
index 69696c4..c382019 100644
|
||||
--- a/omx/gstomx.c
|
||||
+++ b/omx/gstomx.c
|
||||
@@ -1508,8 +1508,8 @@ gst_omx_port_set_flushing (GstOMXPort * port, GstClockTime timeout,
|
||||
last_error = OMX_ErrorNone;
|
||||
gst_omx_component_handle_messages (comp);
|
||||
while (signalled && last_error == OMX_ErrorNone && !port->flushed
|
||||
- && port->buffers
|
||||
- && port->buffers->len > g_queue_get_length (&port->pending_buffers)) {
|
||||
+ /* && port->buffers
|
||||
+ && port->buffers->len > g_queue_get_length (&port->pending_buffers) */) {
|
||||
signalled = gst_omx_component_wait_message (comp, timeout);
|
||||
if (signalled)
|
||||
gst_omx_component_handle_messages (comp);
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
|
||||
index 0d4e7a1..a0d9c74 100644
|
||||
--- a/omx/gstomxvideodec.c
|
||||
+++ b/omx/gstomxvideodec.c
|
||||
@@ -1697,9 +1697,9 @@ gst_omx_video_dec_stop (GstVideoDecoder * decoder)
|
||||
g_cond_broadcast (&self->drain_cond);
|
||||
g_mutex_unlock (&self->drain_lock);
|
||||
|
||||
- gst_omx_component_get_state (self->dec, 5 * GST_SECOND);
|
||||
+ gst_omx_component_get_state (self->dec, 0);
|
||||
#if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL)
|
||||
- gst_omx_component_get_state (self->egl_render, 1 * GST_SECOND);
|
||||
+ gst_omx_component_get_state (self->egl_render, 0);
|
||||
#endif
|
||||
|
||||
gst_buffer_replace (&self->codec_data, NULL);
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user