summaryrefslogtreecommitdiff
path: root/meta-raspberrypi
diff options
context:
space:
mode:
Diffstat (limited to 'meta-raspberrypi')
-rw-r--r--meta-raspberrypi/docs/extra-build-config.md38
-rw-r--r--meta-raspberrypi/recipes-bsp/bootfiles/rpi-cmdline.bb13
-rw-r--r--meta-raspberrypi/recipes-graphics/userland/files/0001-mmal-Do-not-use-Werror.patch33
-rw-r--r--meta-raspberrypi/recipes-graphics/userland/userland_git.bb7
-rw-r--r--meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0002-Libraries-and-headers-from-ffmpeg-are-installed-in-u.patch16
-rw-r--r--meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer_git.bb2
-rw-r--r--meta-raspberrypi/recipes-multimedia/picamera-libs/picamera-libs.bb2
7 files changed, 93 insertions, 18 deletions
diff --git a/meta-raspberrypi/docs/extra-build-config.md b/meta-raspberrypi/docs/extra-build-config.md
index ab87637dfe..6c546794b7 100644
--- a/meta-raspberrypi/docs/extra-build-config.md
+++ b/meta-raspberrypi/docs/extra-build-config.md
@@ -278,6 +278,18 @@ the header extension should set the following in local.conf:
ENABLE_DWC2_HOST = "1"
+## Set CPUs to be isolated from the standard Linux scheduler
+
+By default Linux will use all available CPUs for scheduling tasks. For real time
+purposes there can be an advantage to isolating one or more CPUs from the
+standard scheduler. It should be noted that CPU 0 is special, it is the only CPU
+available during the early stages of the boot process and cannot be isolated.
+
+The string assigned to this variable may be a single CPU number, a comma
+separated list ("1,2"), a range("1-3"), or a mixture of these ("1,3-5")
+
+ ISOLATED_CPUS = "1-2"
+
## Enable Openlabs 802.15.4 radio module
When using device tree kernels, set this variable to enable the 802.15.4 hat:
@@ -290,13 +302,13 @@ See: <https://openlabs.co/OSHW/Raspberry-Pi-802.15.4-radio>
In order to use CAN with an MCP2515-based module, set the following variables:
- ENABLE_SPI_BUS = "1"
- ENABLE_CAN = "1"
+ ENABLE_SPI_BUS = "1"
+ ENABLE_CAN = "1"
In case of dual CAN module (e.g. PiCAN2 Duo), set following variables instead:
ENABLE_SPI_BUS = "1"
- ENABLE_DUAL_CAN = "1"
+ ENABLE_DUAL_CAN = "1"
Some modules may require setting the frequency of the crystal oscillator used on the particular board. The frequency is usually marked on the package of the crystal. By default, it is set to 16 MHz. To change that to 8 MHz, the following variable also has to be set:
@@ -388,3 +400,23 @@ You may need to adjust volume and toggle switches that are off by default
```
Audio capture on ReSpeaker 2 / 4 / 6 Mics Pi HAT from Seeed Studio is very noisy.
+
+## Support for RTC devices
+
+The RaspberryPi boards don't feature an RTC module and the machine
+configurations provided in this BSP layer have this assumption (until, if at
+all, some later boards will come with one).
+
+`rtc` is handled as a `MACHINE_FEATURES` in the context of the build system
+which means that if an attached device is provided for which support is needed,
+the recommended way forward is to write a new machine configuration based on an
+existing one. Check the documentation for
+`MACHINE_FEATURES_BACKFILL_CONSIDERED` for how this is disabled for the
+relevant machines.
+
+Even when `MACHINE_FEATURES` is tweaked to include the needed `rtc` string,
+make sure that your kernel configuration is supporting the attached device and
+the device tree is properly tweaked. Also, mind the runtime components that
+take advantage of your RTC device. You can do that by checking what is
+included/configured in the build system based on the inclusion of `rtc` in
+`MACHINE_FEATURES`.
diff --git a/meta-raspberrypi/recipes-bsp/bootfiles/rpi-cmdline.bb b/meta-raspberrypi/recipes-bsp/bootfiles/rpi-cmdline.bb
index 50c2b53185..413ca4d527 100644
--- a/meta-raspberrypi/recipes-bsp/bootfiles/rpi-cmdline.bb
+++ b/meta-raspberrypi/recipes-bsp/bootfiles/rpi-cmdline.bb
@@ -29,6 +29,18 @@ CMDLINE_LOGO ?= '${@oe.utils.conditional("DISABLE_RPI_BOOT_LOGO", "1", "logo.nol
# to enable kernel debugging.
CMDLINE_DEBUG ?= ""
+# Add a request to isolate processors from the Linux scheduler. ISOLATED_CPUS
+# may have the form of a comma separated list of processor numbers "0,1,3", a
+# range "0-2", a combination of the two "0-1,3", or a single processor you may
+# not specify ALL processors simultaneously
+def setup_isolcpus(d):
+ string = ""
+ if d.getVar('ISOLATED_CPUS'):
+ string = 'isolcpus=' + d.getVar('ISOLATED_CPUS')
+ return string
+
+CMDLINE_ISOL_CPUS ?= "${@setup_isolcpus(d)}"
+
# Add RNDIS capabilities (must be after rootwait)
# example:
# CMDLINE_RNDIS = "modules-load=dwc2,g_ether g_ether.host_addr=<some MAC
@@ -37,6 +49,7 @@ CMDLINE_DEBUG ?= ""
CMDLINE_RNDIS ?= ""
CMDLINE = " \
+ ${CMDLINE_ISOL_CPUS} \
${CMDLINE_DWC_OTG} \
${CMDLINE_SERIAL} \
${CMDLINE_ROOTFS} \
diff --git a/meta-raspberrypi/recipes-graphics/userland/files/0001-mmal-Do-not-use-Werror.patch b/meta-raspberrypi/recipes-graphics/userland/files/0001-mmal-Do-not-use-Werror.patch
new file mode 100644
index 0000000000..ff00d8b749
--- /dev/null
+++ b/meta-raspberrypi/recipes-graphics/userland/files/0001-mmal-Do-not-use-Werror.patch
@@ -0,0 +1,33 @@
+From 15fbe266af3dcc5b7660397204b06d04364a953a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 2 Apr 2022 21:37:42 -0700
+Subject: [PATCH] mmal: Do not use -Werror
+
+Clang warns about unused-but-set variables
+interface/mmal/vc/mmal_vc_api.c:395:18: error: variable 'status' set but not used [-We
+rror,-Wunused-but-set-variable]
+| MMAL_STATUS_T status;
+| ^
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ interface/mmal/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/interface/mmal/CMakeLists.txt b/interface/mmal/CMakeLists.txt
+index 46f149d..c5c1642 100644
+--- a/interface/mmal/CMakeLists.txt
++++ b/interface/mmal/CMakeLists.txt
+@@ -3,7 +3,7 @@ if (NOT DEFINED LIBRARY_TYPE)
+ set(LIBRARY_TYPE SHARED)
+ endif (NOT DEFINED LIBRARY_TYPE)
+
+-add_definitions(-Wall -Werror)
++add_definitions(-Wall)
+
+ add_library(mmal SHARED util/mmal_util.c)
+
+--
+2.35.1
+
diff --git a/meta-raspberrypi/recipes-graphics/userland/userland_git.bb b/meta-raspberrypi/recipes-graphics/userland/userland_git.bb
index 5676c31fb6..d8265d48fa 100644
--- a/meta-raspberrypi/recipes-graphics/userland/userland_git.bb
+++ b/meta-raspberrypi/recipes-graphics/userland/userland_git.bb
@@ -13,14 +13,15 @@ COMPATIBLE_MACHINE = "^rpi$"
SRCBRANCH = "master"
SRCFORK = "raspberrypi"
-SRCREV = "97bc8180ad682b004ea224d1db7b8e108eda4397"
+SRCREV = "c4fd1b8986c6d6d4ae5cd51e65a8bbeb495dfa4e"
# Use the date of the above commit as the package version. Update this when
# SRCREV is changed.
-PV = "20210623"
+PV = "20220323"
SRC_URI = "\
git://github.com/${SRCFORK}/userland.git;protocol=https;branch=${SRCBRANCH} \
+ file://0001-mmal-Do-not-use-Werror.patch \
file://0001-Allow-applications-to-set-next-resource-handle.patch \
file://0002-wayland-Add-support-for-the-Wayland-winsys.patch \
file://0003-wayland-Add-Wayland-example.patch \
@@ -67,7 +68,7 @@ PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland',
PACKAGECONFIG[wayland] = "-DBUILD_WAYLAND=TRUE -DWAYLAND_SCANNER_EXECUTABLE:FILEPATH=${STAGING_BINDIR_NATIVE}/wayland-scanner,,wayland-native wayland"
PACKAGECONFIG[allapps] = "-DALL_APPS=true,,,"
-CFLAGS:append = " -fPIC"
+CFLAGS:append = " -fPIC -Wno-unused-but-set-variable"
do_install:append () {
for f in `find ${D}${includedir}/interface/vcos/ -name "*.h"`; do
diff --git a/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0002-Libraries-and-headers-from-ffmpeg-are-installed-in-u.patch b/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0002-Libraries-and-headers-from-ffmpeg-are-installed-in-u.patch
index dd1d4f3d70..e4946506a7 100644
--- a/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0002-Libraries-and-headers-from-ffmpeg-are-installed-in-u.patch
+++ b/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/0002-Libraries-and-headers-from-ffmpeg-are-installed-in-u.patch
@@ -15,10 +15,8 @@ Signed-off-by: Jonathan Liu <net147@gmail.com>
Makefile.ffmpeg | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
-Index: git/Makefile
-===================================================================
---- git.orig/Makefile
-+++ git/Makefile
+--- a/Makefile
++++ b/Makefile
@@ -2,9 +2,9 @@ CFLAGS=-pipe -mfloat-abi=hard -mcpu=arm1
CFLAGS+=-std=c++0x -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CMAKE_CONFIG -D__VIDEOCORE4__ -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_OPT_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DHAVE_LIBSWRESAMPLE_SWRESAMPLE_H -DOMX -DOMX_SKIP64BIT -ftree-vectorize -DUSE_EXTERNAL_OMX -DTARGET_RASPBERRY_PI -DUSE_EXTERNAL_LIBBCM_HOST
@@ -27,11 +25,11 @@ Index: git/Makefile
+LDFLAGS+=-L./ -Lffmpeg_compiled/usr/lib/ -lc -lbrcmGLESv2 -lbrcmEGL -lbcm_host -lopenmaxil -lfreetype -lz -lasound
-INCLUDES+=-I./ -Ilinux -Iffmpeg_compiled/usr/local/include/ -I /usr/include/dbus-1.0 -I /usr/lib/arm-linux-gnueabihf/dbus-1.0/include -I/usr/include/freetype2 -isystem$(SDKSTAGE)/opt/vc/include -isystem$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads
-+INCLUDES+=-I./ -Ilinux
++INCLUDES+=-I./ -Ilinux -I./ffmpeg
DIST ?= omxplayer-dist
STRIP ?= strip
-@@ -90,7 +90,7 @@ dist: omxplayer.bin omxplayer.1
+@@ -91,7 +91,7 @@ dist: omxplayer.bin omxplayer.1
cp COPYING $(DIST)/usr/share/doc/omxplayer
cp README.md $(DIST)/usr/share/doc/omxplayer/README
cp omxplayer.1 $(DIST)/usr/share/man/man1
@@ -40,10 +38,8 @@ Index: git/Makefile
cd $(DIST); tar -czf ../$(DIST).tgz *
install:
-Index: git/Makefile.ffmpeg
-===================================================================
---- git.orig/Makefile.ffmpeg
-+++ git/Makefile.ffmpeg
+--- a/Makefile.ffmpeg
++++ b/Makefile.ffmpeg
@@ -238,7 +238,8 @@ configure:
--disable-decoder=xbin \
--disable-decoder=idf \
diff --git a/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer_git.bb b/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer_git.bb
index 25196929f5..c15b40b4af 100644
--- a/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer_git.bb
+++ b/meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer_git.bb
@@ -7,7 +7,7 @@ SECTION = "console/utils"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=00a27da7ac0f9bcd17320ec29ef4bbf6"
-DEPENDS = "libpcre libav virtual/egl boost freetype dbus openssl libssh virtual/libomxil coreutils-native curl-native userland"
+DEPENDS = "alsa-lib libpcre virtual/egl boost freetype dbus openssl libssh virtual/libomxil coreutils-native curl-native userland"
PR = "r5"
diff --git a/meta-raspberrypi/recipes-multimedia/picamera-libs/picamera-libs.bb b/meta-raspberrypi/recipes-multimedia/picamera-libs/picamera-libs.bb
index c1356f00ae..2ebe413942 100644
--- a/meta-raspberrypi/recipes-multimedia/picamera-libs/picamera-libs.bb
+++ b/meta-raspberrypi/recipes-multimedia/picamera-libs/picamera-libs.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://opt/vc/LICENCE;md5=86e53f5f5909ee66900418028de11780"
include recipes-bsp/common/raspberrypi-firmware.inc
-S = "${WORKDIR}/firmware-${SRCREV}"
+S = "${WORKDIR}/raspberrypi-firmware-1.${PV}"
do_install(){
install -m 0755 -d ${D}${libdir}