Commit a9b583d7 authored by Timothy Pearson's avatar Timothy Pearson

Remove unnecessary non-free packages from base build system

parent 89ad2543
From 51a092ebb36dcc6180ceb93a9777258e826d9990 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 26 Sep 2018 18:11:10 -0700
Subject: [PATCH] netlib.c: Move including sched.h out og function
The shutdown_control() has this code where system headers are being
included inside function body and this results in compile errors on musl
especially when sched.h is included because sched.h defines a macro
which defines a static function. This means it ends up being a static
function inside another function and compiler calls it out
In function 'bind_to_specific_processor':
|
/mnt/a/yoe/build/tmp/work/i586-yoe-linux-musl/netperf/2.7.0+git999-r0/recipe-sysroot/usr/include/sched.h:102:1:
error: invalid storage class for function '__CPU_AND_S'
| __CPU_op_func_S(AND, &)
| ^~~~~~~~~~~~~~~
Moving the definition out of function definition fixes the problem
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/netlib.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/netlib.c b/src/netlib.c
index 9258424..60b032d 100644
--- a/src/netlib.c
+++ b/src/netlib.c
@@ -2262,6 +2262,10 @@ shutdown_control()
}
+#if HAVE_SCHED_SETAFFINITY
+#include <sched.h>
+#endif
+
/*
bind_to_specific_processor will bind the calling process to the
processor in "processor" It has lots of ugly ifdefs to deal with
@@ -2308,7 +2312,6 @@ bind_to_specific_processor(int processor_affinity, int use_cpu_map)
value will not tell you if you are bound vs unbound. */
bindprocessor(BINDPROCESS,getpid(),(cpu_t)mapped_affinity);
#elif HAVE_SCHED_SETAFFINITY
-#include <sched.h>
/* in theory this should cover systems with more CPUs than bits in a
long, without having to specify __USE_GNU. we "cheat" by taking
defines from /usr/include/bits/sched.h, which we ass-u-me is
Subject: [PATCH] netperf: fix CPU_SETSIZE to build with eglibc
Upstream-Status: Pending
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
---
src/netlib.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/netlib.c b/src/netlib.c
index 206e002..e33aae6 100644
--- a/src/netlib.c
+++ b/src/netlib.c
@@ -2265,7 +2265,12 @@ bind_to_specific_processor(int processor_affinity, int use_cpu_map)
fall-back on what we had before, which is to use just the size of
an unsigned long. raj 2006-09-14 */
-#if defined(__CPU_SETSIZE)
+#if defined(CPU_SETSIZE)
+#define NETPERF_CPU_SETSIZE CPU_SETSIZE
+#define NETPERF_CPU_SET(cpu, cpusetp) CPU_SET(cpu, cpusetp)
+#define NETPERF_CPU_ZERO(cpusetp) CPU_ZERO (cpusetp)
+ typedef cpu_set_t netperf_cpu_set_t;
+#elif defined(__CPU_SETSIZE)
#define NETPERF_CPU_SETSIZE __CPU_SETSIZE
#if defined(__CPU_SET_S)
#define NETPERF_CPU_SET(cpu, cpusetp) __CPU_SET_S(cpu, sizeof (cpu_set_t), cpusetp)
--
1.7.1.1
#!/bin/sh
#
#
# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
# Modified for Debian GNU/Linux by Ian Murdock <imurdock@gnu.org>.
# Modified for Debian by Christoph Lameter <clameter@debian.org>
# Modified for openembedded by Bruno Randolf <bruno.randolf@4g-systems.biz>
### BEGIN INIT INFO
# Provides: netperf
# Required-Start: $remote_fs $local_fs $time
# Required-Stop: $remote_fs $local_fs $time
# Should-Start: $network $named
# Should-Stop: $network $named
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: network benchmark
### END INIT INFO
PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=/usr/sbin/netserver
test -f $DAEMON || exit 0
case "$1" in
start)
echo -n "Starting network benchmark server: netserver"
start-stop-daemon -S -x $DAEMON > /dev/null 2>&1
echo "."
;;
stop)
echo -n "Stopping network benchmark server: netserver"
start-stop-daemon -K -x $DAEMON
echo "."
;;
#reload)
#
# If the daemon can reload its config files on the fly
# for example by sending it SIGHUP, do it here.
#
# If the daemon responds to changes in its config file
# directly anyway, make this a do-nothing entry.
#
# start-stop-daemon --stop --signal 1 --verbose --exec $DAEMON
# ;;
restart|force-reload)
#
# If the "reload" option is implemented, move the "force-reload"
# option to the "reload" entry above. If not, "force-reload" is
# just the same as "restart".
#
start-stop-daemon -K -x $DAEMON
sleep 1
start-stop-daemon -S -x $DAEMON
;;
*)
echo "Usage: /etc/init.d/netperf {start|stop|restart|force-reload}"
exit 1
;;
esac
exit 0
Subject: [PATCH] netperf: fix vfork/fork
Upstream-Status: Pending
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
---
src/netserver.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/netserver.c b/src/netserver.c
index 379a106..f6a8b09 100644
--- a/src/netserver.c
+++ b/src/netserver.c
@@ -1020,7 +1020,7 @@ process_requests()
void
spawn_child() {
-#if defined(HAVE_FORK)
+#if defined(HAVE_FORK) || defined(HAVE_VFORK)
if (debug) {
fprintf(where,
@@ -1038,7 +1038,11 @@ spawn_child() {
signal(SIGCLD,SIG_IGN);
+#if defined(HAVE_FORK)
switch (fork()) {
+#else
+ switch (vfork()) {
+#endif
case -1:
fprintf(where,
"%s: fork() error %s (errno %d)\n",
@@ -1405,7 +1409,7 @@ scan_netserver_args(int argc, char *argv[]) {
void
daemonize() {
-#if defined(HAVE_FORK)
+#if defined(HAVE_FORK) || defined(HAVE_VFORK)
if (debug) {
fprintf(where,
@@ -1419,7 +1423,11 @@ daemonize() {
fflush(stdout);
fflush(stderr);
+#if defined(HAVE_FORK)
switch (fork()) {
+#else
+ switch (vfork()) {
+#endif
case -1:
fprintf(stderr,
"%s: fork() error %s (errno %d)\n",
--
1.7.1.1
SUMMARY = "A networking benchmarking tool"
DESCRIPTION = "Network performance benchmark including tests for TCP, UDP, sockets, ATM and more."
SECTION = "net"
HOMEPAGE = "http://www.netperf.org/"
LICENSE = "netperf"
LICENSE_FLAGS = "non-commercial"
LIC_FILES_CHKSUM = "file://COPYING;md5=a0ab17253e7a3f318da85382c7d5d5d6"
PV = "2.7.0+git${SRCPV}"
SRC_URI = "git://github.com/HewlettPackard/netperf.git \
file://cpu_set.patch \
file://vfork.patch \
file://init \
file://0001-netlib.c-Move-including-sched.h-out-og-function.patch \
"
SRCREV = "f482bab49fcedee46fc5b755da127f608325cd13"
S = "${WORKDIR}/git"
inherit update-rc.d autotools
# cpu_set.patch plus _GNU_SOURCE makes src/netlib.c compile with CPU_ macros
CFLAGS_append = " -DDO_UNIX -DDO_IPV6 -D_GNU_SOURCE"
# set the "_FILE_OFFSET_BITS" preprocessor symbol to 64 to support files
# larger than 2GB
CFLAGS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', \
' -D_FILE_OFFSET_BITS=64', '', d)}"
PACKAGECONFIG ??= ""
PACKAGECONFIG[sctp] = "--enable-sctp,--disable-sctp,lksctp-tools,"
# autotools.bbclass attends to include m4 files with path depth <= 2 by
# "find ${S} -maxdepth 2 -name \*.m4", so move m4 files from m4/m4.
do_configure_prepend() {
test -d ${S}/m4/m4 && mv -f ${S}/m4/m4 ${S}/m4-files
}
do_install() {
sed -e 's#/usr/sbin/#${sbindir}/#g' -i ${WORKDIR}/init
install -d ${D}${sbindir} ${D}${bindir} ${D}${sysconfdir}/init.d
install -m 4755 src/netperf ${D}${bindir}
install -m 4755 src/netserver ${D}${sbindir}
install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/netperf
# man
install -d ${D}${mandir}/man1/
install -m 0644 ${S}/doc/netserver.man ${D}${mandir}/man1/netserver.1
install -m 0644 ${S}/doc/netperf.man ${D}${mandir}/man1/netperf.1
# move scripts to examples directory
install -d ${D}${docdir}/netperf/examples
install -m 0644 ${S}/doc/examples/*_script ${D}${docdir}/netperf/examples/
# docs ..
install -m 0644 ${S}/COPYING ${D}${docdir}/netperf
install -m 0644 ${S}/Release_Notes ${D}${docdir}/netperf
install -m 0644 ${S}/README ${D}${docdir}/netperf
install -m 0644 ${S}/doc/netperf_old.ps ${D}${docdir}/netperf
}
RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'sctp', 'kernel-module-sctp', '', d)}"
INITSCRIPT_NAME="netperf"
INITSCRIPT_PARAMS="defaults"
# Copyright (C) 2018 Krzysztof Kozlowski <krzk@kernel.org>
# Released under the MIT license (see COPYING.MIT for the terms)
SUMMARY = "Broadcom Bluetooth firmware files"
DESCRIPTION = "Firmware for Broadcom Bluetooth devices. Note that in case of BT+WiFi devices, separate WiFi firmware might be needed."
HOMEPAGE = "https://github.com/winterheart/broadcom-bt-firmware"
LICENSE = "Firmware-Broadcom-WIDCOMM"
NO_GENERIC_LICENSE[Firmware-Broadcom-WIDCOMM] = "LICENSE.broadcom_bcm20702"
LIC_FILES_CHKSUM = "file://LICENSE.broadcom_bcm20702;md5=c0d5ea0502b00df74173d0f8a48b619d"
SRC_URI = "git://github.com/winterheart/broadcom-bt-firmware.git"
SRCREV = "c0bd928b8ae5754b6077c99afe6ef5c949a58f32"
PE = "1"
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 brcm/*.hcd ${D}${nonarch_base_libdir}/firmware/brcm/
# For license package:
install -m 0644 LICENSE.broadcom_bcm20702 ${D}${nonarch_base_libdir}/firmware/brcm/
# For main package:
install -m 0644 DEVICES.md ${D}${nonarch_base_libdir}/firmware/brcm/
}
PACKAGES =+ " \
${PN}-bcm20702a1 \
${PN}-bcm20702b0 \
${PN}-bcm20703a1 \
${PN}-bcm43142a0 \
${PN}-bcm4335c0 \
${PN}-bcm4350c5 \
${PN}-bcm4356a2 \
${PN}-bcm4371c2 \
${PN}-license \
"
RDEPENDS_${PN}-bcm20702a1 = "${PN}-license"
RDEPENDS_${PN}-bcm20702b0 = "${PN}-license"
RDEPENDS_${PN}-bcm20703a1 = "${PN}-license"
RDEPENDS_${PN}-bcm43142a0 = "${PN}-license"
RDEPENDS_${PN}-bcm4335c0 = "${PN}-license"
RDEPENDS_${PN}-bcm4350c5 = "${PN}-license"
RDEPENDS_${PN}-bcm4356a2 = "${PN}-license"
RDEPENDS_${PN}-bcm4371c2 = "${PN}-license"
FILES_${PN}-bcm20702a1 = "${nonarch_base_libdir}/firmware/brcm/BCM20702A1*hcd"
FILES_${PN}-bcm20702b0 = "${nonarch_base_libdir}/firmware/brcm/BCM20702B0*hcd"
FILES_${PN}-bcm20703a1 = "${nonarch_base_libdir}/firmware/brcm/BCM20703A1*hcd"
FILES_${PN}-bcm43142a0 = "${nonarch_base_libdir}/firmware/brcm/BCM43142A0*hcd"
FILES_${PN}-bcm4335c0 = "${nonarch_base_libdir}/firmware/brcm/BCM4335C0*hcd"
FILES_${PN}-bcm4350c5 = "${nonarch_base_libdir}/firmware/brcm/BCM4350C5*hcd"
FILES_${PN}-bcm4356a2 = "${nonarch_base_libdir}/firmware/brcm/BCM4356A2*hcd"
FILES_${PN}-bcm4371c2 = "${nonarch_base_libdir}/firmware/brcm/BCM4371C2*hcd"
FILES_${PN}-license += "${nonarch_base_libdir}/firmware/brcm/LICENSE.broadcom_bcm20702"
FILES_${PN} += "${nonarch_base_libdir}/firmware/brcm/*"
RDEPENDS_${PN} += "${PN}-license"
# Make broadcom-bt-firmware depend on all of the split-out packages.
python populate_packages_prepend () {
firmware_pkgs = oe.utils.packages_filter_out_system(d)
d.appendVar('RDEPENDS_broadcom-bt-firmware', ' ' + ' '.join(firmware_pkgs))
}
DESCRIPTION = "Closed source binary files to help boot the ARM on the BCM2835."
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://LICENCE.broadcom;md5=4a4d169737c0786fb9482bb6d30401d1"
inherit deploy nopackages
include recipes-bsp/common/firmware.inc
INHIBIT_DEFAULT_DEPS = "1"
DEPENDS = "rpi-config"
COMPATIBLE_MACHINE = "^rpi$"
S = "${RPIFW_S}/boot"
PR = "r3"
do_deploy() {
install -d ${DEPLOYDIR}/${PN}
for i in ${S}/*.elf ; do
cp $i ${DEPLOYDIR}/${PN}
done
for i in ${S}/*.dat ; do
cp $i ${DEPLOYDIR}/${PN}
done
for i in ${S}/*.bin ; do
cp $i ${DEPLOYDIR}/${PN}
done
# Add stamp in deploy directory
touch ${DEPLOYDIR}/${PN}/${PN}-${PV}.stamp
}
addtask deploy before do_build after do_install
do_deploy[dirs] += "${DEPLOYDIR}/${PN}"
PACKAGE_ARCH = "${MACHINE_ARCH}"
DESCRIPTION = "Commented config.txt file for the Raspberry Pi. \
The Raspberry Pi config.txt file is read by the GPU before \
the ARM core is initialised. It can be used to set various \
system configuration parameters."
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
COMPATIBLE_MACHINE = "^rpi$"
SRCREV = "648ffc470824c43eb0d16c485f4c24816b32cd6f"
SRC_URI = "git://github.com/Evilpaul/RPi-config.git;protocol=git;branch=master \
"
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 nopackages
do_deploy() {
install -d ${DEPLOYDIR}/bcm2835-bootfiles
cp ${S}/config.txt ${DEPLOYDIR}/bcm2835-bootfiles/
if [ -n "${KEY_DECODE_MPG2}" ]; then
sed -i '/#decode_MPG2=/ c\decode_MPG2=${KEY_DECODE_MPG2}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
if [ -n "${KEY_DECODE_WVC1}" ]; then
sed -i '/#decode_WVC1=/ c\decode_WVC1=${KEY_DECODE_WVC1}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
if [ -n "${DISABLE_OVERSCAN}" ]; then
sed -i '/#disable_overscan=/ c\disable_overscan=${DISABLE_OVERSCAN}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
if [ -n "${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
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
fi
if [ -n "${SDRAM_FREQ}" ]; then
sed -i '/#sdram_freq=/ c\sdram_freq=${SDRAM_FREQ}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
if [ -n "${OVER_VOLTAGE}" ]; then
sed -i '/#over_voltage=/ c\over_voltage=${OVER_VOLTAGE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
# GPU memory
if [ -n "${GPU_MEM}" ]; then
sed -i '/#gpu_mem=/ c\gpu_mem=${GPU_MEM}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
if [ -n "${GPU_MEM_256}" ]; then
sed -i '/#gpu_mem_256=/ c\gpu_mem_256=${GPU_MEM_256}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
if [ -n "${GPU_MEM_512}" ]; then
sed -i '/#gpu_mem_512=/ c\gpu_mem_512=${GPU_MEM_512}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
if [ -n "${GPU_MEM_1024}" ]; then
sed -i '/#gpu_mem_1024=/ c\gpu_mem_1024=${GPU_MEM_1024}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
# 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
if [ -n "${VIDEO_CAMERA}" ]; then
echo "# Enable video camera" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
echo "start_x=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
# Offline compositing support
if [ -n "${DISPMANX_OFFLINE}" ]; then
echo "# Enable offline compositing" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
echo "dispmanx_offline=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
# SPI bus support
if [ -n "${ENABLE_SPI_BUS}" ] || [ "${PITFT}" = "1" ]; then
echo "# Enable SPI bus" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
echo "dtparam=spi=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
# 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
echo "dtparam=i2c_arm=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
# PiTFT22 display support
if [ "${PITFT22}" = "1" ]; then
echo "# Enable PITFT22 display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
echo "dtoverlay=pitft22,rotate=270,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
if [ "${PITFT28r}" = "1" ]; then
echo "# Enable PITFT28r display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
echo "dtoverlay=pitft28-resistive,rotate=90,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
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
fi
# UART support
if [ "${ENABLE_UART}" = "1" ]; then
echo "# Enable UART" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
echo "enable_uart=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
fi
# VC4 Graphics support
if [ "${VC4GRAPHICS}" = "1" ]; then
echo "# Enable VC4 Graphics" >> ${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)
if [ "${WAVESHARE_1024X600_C_2_1}" = "1" ]; then
echo "# Waveshare \"C\" 1024x600 7\" Rev2.1 IPS capacitive touch screen" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
echo "max_usb_current=1" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
echo "hdmi_group=2" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
echo "hdmi_mode=87" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
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
# ENABLE CAN
if [ "${ENABLE_CAN}" = "1" ]; then
echo "# Enable CAN" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
echo "dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25" >>${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() {
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_build after do_install
do_deploy[dirs] += "${DEPLOYDIR}/bcm2835-bootfiles"
PACKAGE_ARCH = "${MACHINE_ARCH}"
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: egl
Description: egl for RaspberryPI
Version: 0.0
Libs: -L${libdir} -lEGL -lGLESv2
Cflags: -I${includedir}/vc -I${includedir}/interface -I${includedir}/interface/vcos -I${includedir}/interface/vcos/pthreads
#!/bin/sh
### BEGIN INIT INFO
# Provides: vchiq.sh
# Required-Start: $remote_fs rmnologin
# Required-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: Create /dev/vchiq.
# Description: Get the major number from /proc/devices and use it
# ti create /dev/vchiq
### END INIT INFO
rm -f /dev/vchiq
#Get the major number
major=$(awk "\$2==\"vchiq\" {print \$1}" /proc/devices)
if [ -z "$major" ]; then
echo "Error: Cannot find vchiq in /proc/devices"
exit 2
else
mknod /dev/vchiq c "$major" 0
chmod a+w /dev/vchiq
fi
CONFLICTS = "vc-graphics"
VCDIR = "hardfp/opt/vc"
require vc-graphics.inc
PR = "${INCPR}.0"
CONFLICTS = "vc-graphics-hardfp"
VCDIR = "opt/vc"
require vc-graphics.inc
PR = "${INCPR}.0"
DESCRIPTION = "Graphics libraries for BCM2835."
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://LICENCE;md5=86e53f5f5909ee66900418028de11780"
PROVIDES = "virtual/libgles2 virtual/egl"
COMPATIBLE_MACHINE = "^rpi$"
INHIBIT_DEFAULT_DEPS = "1"
include recipes-bsp/common/firmware.inc
SRC_URI += " \
file://egl.pc \
file://vchiq.sh \
"
S = "${RPIFW_S}/${VCDIR}"
INCPR = "r1"
inherit pkgconfig update-rc.d
do_install () {
install -d ${D}${bindir}
cp -R bin/* ${D}${bindir}
install -d ${D}${sbindir}
cp -R sbin/* ${D}${sbindir}
install -d ${D}${libdir}
# note: -H option to deref symlinked .so
cp -R -H lib/* ${D}${libdir}
install -d ${D}${includedir}
cp -R include/* ${D}${includedir}
install -d ${D}${libdir}/pkgconfig
install -m 0644 ${WORKDIR}/egl.pc ${D}${libdir}/pkgconfig/
install -d ${D}/${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/vchiq