76 Commits

Author SHA1 Message Date
Martin Jansa
e5e976da0b python3-adafruit-*: fix branch parameter
* master branch was renamed to main

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2021-07-15 18:21:19 +03:00
Martin Jansa
e6e604616d layer.conf: Remove older releases from LAYERSERIES_COMPAT
* since
  36c3c2e7ca
  which renamed gstreamer1.0-omx_1.14%.bbappend to gstreamer1.0-omx_1.16%.bbappend it didn't
  parse with zeus and older
* with zeus it parses OK, but I believe people who use meta-raspberrypi
  from dunfell branch in zeus builds should rather ask for backports they
  are missing in zeus branch

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2021-06-07 13:00:27 +01:00
Martin Jansa
0e2baa7656 linux-raspberrypi-dev: use static SRCREV when not selected with PREFERRED_PROVIDER_virtual/kernel
* the anonymous python function was supposed to prevent AUTOREV
  being parsed when not selected, but that doesn't work, use
  the same trick with static SRCREV as linux-yocto-dev is using:
  https://git.openembedded.org/openembedded-core/commit/?id=5e8cf6e568ab90365894478a272b5c28dc941031

* Use LINUX_RPI_KMETA_BRANCH yocto-5.10 instead of master, because that's
  where static SRCREV_meta is contained.

* fixes "git ls-remote git://git.yoctoproject.org/yocto-kernel-cache"
  being called to resolve AUTOREV in SRCPV even when PREFERRED_PROVIDER_virtual/kernel
  is set to linux-raspberrypi not linux-raspberrypi-dev.

* I've noticed this in a build which was stuck in parsing for 15 minutes before
  the connection timeout:

Loaded 0 entries from dependency cache.
Parsing recipes...ERROR: ExpansionError during parsing /jenkins/home/workspace/jansa/webos-foxy-honister/webos-foxy-honister/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-dev.bb
Traceback (most recent call last):
  File "/jenkins/home/workspace/jansa/webos-foxy-honister/webos-foxy-honister/bitbake/lib/bb/fetch2/__init__.py", line 1172, in srcrev_internal_helper(ud=<bb.fetch2.FetchData object at 0x7f8422a6ef60>, d=<bb.data_smart.DataSmart object at 0x7f8422b25a20>, name='meta'):
         if srcrev == "AUTOINC":
    >        srcrev = ud.method.latest_revision(ud, d, name)

  File "/jenkins/home/workspace/jansa/webos-foxy-honister/webos-foxy-honister/bitbake/lib/bb/fetch2/__init__.py", line 1581, in Git.latest_revision(ud=<bb.fetch2.FetchData object at 0x7f8422a6ef60>, d=<bb.data_smart.DataSmart object at 0x7f8422b25a20>, name='meta'):
             except KeyError:
    >            revs[key] = rev = self._latest_revision(ud, d, name)
                 return rev
  File "/jenkins/home/workspace/jansa/webos-foxy-honister/webos-foxy-honister/bitbake/lib/bb/fetch2/git.py", line 694, in Git._latest_revision(ud=<bb.fetch2.FetchData object at 0x7f8422a6ef60>, d=<bb.data_smart.DataSmart object at 0x7f8422b25a20>, name='meta'):
             """
    >        output = self._lsremote(ud, d, "")
             # Tags of the form ^{} may not work, need to fallback to other form
  File "/jenkins/home/workspace/jansa/webos-foxy-honister/webos-foxy-honister/bitbake/lib/bb/fetch2/git.py", line 683, in Git._lsremote(ud=<bb.fetch2.FetchData object at 0x7f8422a6ef60>, d=<bb.data_smart.DataSmart object at 0x7f8422b25a20>, search=''):
                     bb.fetch2.check_network_access(d, cmd, repourl)
    >            output = runfetchcmd(cmd, d, True)
                 if not output:
  File "/jenkins/home/workspace/jansa/webos-foxy-honister/webos-foxy-honister/bitbake/lib/bb/fetch2/__init__.py", line 889, in runfetchcmd(cmd='export PSEUDO_DISABLED=1; export PATH="/jenkins/home/workspace/jansa/webos-foxy-honister/webos-foxy-honister/meta-webosose/meta-webos/scripts:/jenkins/home/workspace/jansa/webos-foxy-honister/webos-foxy-honister/openembedded-core/scripts:/jenkins/home/workspace/jansa/webos-foxy-honister/webos-foxy-honister/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/linux-raspberrypi-dev/1_fetcheravoidrecurse-fetcheravoidrecurse/recipe-sysroot-native/usr/bin/arm-webos-linux-gnueabi:/jenkins/home/workspace/jansa/webos-foxy-honister/webos-foxy-honister/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/linux-raspberrypi-dev/1_fetcheravoidrecurse-fetcheravoidrecurse/recipe-sysroot/usr/bin/crossscripts:/jenkins/home/workspace/jansa/webos-foxy-honister/webos-foxy-honister/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/linux-raspberrypi-dev/1_fetcheravoidrecurse-fetcheravoidrecurse/recipe-sysroot-native/usr/sbin:/jenkins/home/workspace/jansa/webos-foxy-honister/webos-foxy-honister/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/linux-raspberrypi-dev/1_fetcheravoidrecurse-fetcheravoidrecurse/recipe-sysroot-native/usr/bin:/jenkins/home/workspace/jansa/webos-foxy-honister/webos-foxy-honister/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/linux-raspberrypi-dev/1_fetcheravoidrecurse-fetcheravoidrecurse/recipe-sysroot-native/sbin:/jenkins/home/workspace/jansa/webos-foxy-honister/webos-foxy-honister/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/linux-raspberrypi-dev/1_fetcheravoidrecurse-fetcheravoidrecurse/recipe-sysroot-native/bin:/jenkins/home/workspace/jansa/webos-foxy-honister/webos-foxy-honister/bitbake/bin:/jenkins/home/workspace/jansa/webos-foxy-honister/webos-foxy-honister/tmp-glibc/hosttools"; export HOME="/home/jenkins"; git -c core.fsyncobjectfiles=0 ls-remote git://git.yoctoproject.org/yocto-kernel-cache ', d=<bb.data_smart.DataSmart object at 0x7f8422b58e80>, quiet=True, cleanup=[], log=None, workdir=None):

    >        raise FetchError(error_message)

bb.data_smart.ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export PATH="/jenkins/home/workspace/jansa/webos-foxy-honister/webos-foxy-honister/meta-webosose/meta-webos/scripts:/jenkins/home/workspace/jansa/webos-foxy-honister/webos-foxy-honister/openembedded-core/scripts:/jenkins/home/workspace/jansa/webos-foxy-honister/webos-foxy-honister/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/linux-raspberrypi-dev/1_fetcheravoidrecurse-fetcheravoidrecurse/recipe-sysroot-native/usr/bin/arm-webos-linux-gnueabi:/jenkins/home/workspace/jansa/webos-foxy-honister/webos-foxy-honister/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/linux-raspberrypi-dev/1_fetcheravoidrecurse-fetcheravoidrecurse/recipe-sysroot/usr/bin/crossscripts:/jenkins/home/workspace/jansa/webos-foxy-honister/webos-foxy-honister/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/linux-raspberrypi-dev/1_fetcheravoidrecurse-fetcheravoidrecurse/recipe-sysroot-native/usr/sbin:/jenkins/home/workspace/jansa/webos-foxy-honister/webos-foxy-honister/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/linux-raspberrypi-dev/1_fetcheravoidrecurse-fetcheravoidrecurse/recipe-sysroot-native/usr/bin:/jenkins/home/workspace/jansa/webos-foxy-honister/webos-foxy-honister/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/linux-raspberrypi-dev/1_fetcheravoidrecurse-fetcheravoidrecurse/recipe-sysroot-native/sbin:/jenkins/home/workspace/jansa/webos-foxy-honister/webos-foxy-honister/tmp-glibc/work/raspberrypi4-webos-linux-gnueabi/linux-raspberrypi-dev/1_fetcheravoidrecurse-fetcheravoidrecurse/recipe-sysroot-native/bin:/jenkins/home/workspace/jansa/webos-foxy-honister/webos-foxy-honister/bitbake/bin:/jenkins/home/workspace/jansa/webos-foxy-honister/webos-foxy-honister/tmp-glibc/hosttools"; export HOME="/home/jenkins"; git -c core.fsyncobjectfiles=0 ls-remote git://git.yoctoproject.org/yocto-kernel-cache  failed with exit code 128, output:
fatal: read error: Connection timed out

* it's easily reproducible locally by adding git.yoctoproject.org to /etc/hosts (e.g. in this case 127.0.1.1),
  then it refuses the connection immediately instead of getting stuck waiting for timeout:

oe-core$ bitbake -k linux-raspberrypi
Loading cache: 100% |                                                                                                                                                                                                                                                                 | ETA:  --:--:--
Loaded 0 entries from dependency cache.
ERROR: ExpansionError during parsing /OE/build/oe-core/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-dev.bb                                                                                                                                                                  | ETA:  0:00:14
Traceback (most recent call last):
  File "/OE/bitbake/lib/bb/fetch2/__init__.py", line 1172, in srcrev_internal_helper(ud=<bb.fetch2.FetchData object at 0x7ff35e059430>, d=<bb.data_smart.DataSmart object at 0x7ff35dfd7760>, name='meta'):
         if srcrev == "AUTOINC":
    >        srcrev = ud.method.latest_revision(ud, d, name)

  File "/OE/bitbake/lib/bb/fetch2/__init__.py", line 1581, in Git.latest_revision(ud=<bb.fetch2.FetchData object at 0x7ff35e059430>, d=<bb.data_smart.DataSmart object at 0x7ff35dfd7760>, name='meta'):
             except KeyError:
    >            revs[key] = rev = self._latest_revision(ud, d, name)
                 return rev
  File "/OE/bitbake/lib/bb/fetch2/git.py", line 694, in Git._latest_revision(ud=<bb.fetch2.FetchData object at 0x7ff35e059430>, d=<bb.data_smart.DataSmart object at 0x7ff35dfd7760>, name='meta'):
             """
    >        output = self._lsremote(ud, d, "")
             # Tags of the form ^{} may not work, need to fallback to other form
  File "/OE/bitbake/lib/bb/fetch2/git.py", line 683, in Git._lsremote(ud=<bb.fetch2.FetchData object at 0x7ff35e059430>, d=<bb.data_smart.DataSmart object at 0x7ff35dfd7760>, search=''):
                     bb.fetch2.check_network_access(d, cmd, repourl)
    >            output = runfetchcmd(cmd, d, True)
                 if not output:
  File "/OE/bitbake/lib/bb/fetch2/__init__.py", line 889, in runfetchcmd(cmd='export PSEUDO_DISABLED=1; export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"; export SSH_AUTH_SOCK="/run/user/1000/keyring/ssh"; export PATH="/OE/build/oe-core/openembedded-core/scripts:/OE/build/oe-core/tmp-glibc/work/raspberrypi4-oe-linux-gnueabi/linux-raspberrypi-dev/1_fetcheravoidrecurse-fetcheravoidrecurse/recipe-sysroot-native/usr/bin/arm-oe-linux-gnueabi:/OE/build/oe-core/tmp-glibc/work/raspberrypi4-oe-linux-gnueabi/linux-raspberrypi-dev/1_fetcheravoidrecurse-fetcheravoidrecurse/recipe-sysroot/usr/bin/crossscripts:/OE/build/oe-core/tmp-glibc/work/raspberrypi4-oe-linux-gnueabi/linux-raspberrypi-dev/1_fetcheravoidrecurse-fetcheravoidrecurse/recipe-sysroot-native/usr/sbin:/OE/build/oe-core/tmp-glibc/work/raspberrypi4-oe-linux-gnueabi/linux-raspberrypi-dev/1_fetcheravoidrecurse-fetcheravoidrecurse/recipe-sysroot-native/usr/bin:/OE/build/oe-core/tmp-glibc/work/raspberrypi4-oe-linux-gnueabi/linux-raspberrypi-dev/1_fetcheravoidrecurse-fetcheravoidrecurse/recipe-sysroot-native/sbin:/OE/build/oe-core/tmp-glibc/work/raspberrypi4-oe-linux-gnueabi/linux-raspberrypi-dev/1_fetcheravoidrecurse-fetcheravoidrecurse/recipe-sysroot-native/bin:/OE/build/oe-core/bitbake/bin:/OE/build/oe-core/tmp-glibc/hosttools"; export HOME="/home/martin"; git -c core.fsyncobjectfiles=0 ls-remote git://git.yoctoproject.org/yocto-kernel-cache ', d=<bb.data_smart.DataSmart object at 0x7ff35dfb4fa0>, quiet=True, cleanup=[], log=None, workdir=None):

    >        raise FetchError(error_message)

bb.data_smart.ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"; export SSH_AUTH_SOCK="/run/user/1000/keyring/ssh"; export PATH="/OE/build/oe-core/openembedded-core/scripts:/OE/build/oe-core/tmp-glibc/work/raspberrypi4-oe-linux-gnueabi/linux-raspberrypi-dev/1_fetcheravoidrecurse-fetcheravoidrecurse/recipe-sysroot-native/usr/bin/arm-oe-linux-gnueabi:/OE/build/oe-core/tmp-glibc/work/raspberrypi4-oe-linux-gnueabi/linux-raspberrypi-dev/1_fetcheravoidrecurse-fetcheravoidrecurse/recipe-sysroot/usr/bin/crossscripts:/OE/build/oe-core/tmp-glibc/work/raspberrypi4-oe-linux-gnueabi/linux-raspberrypi-dev/1_fetcheravoidrecurse-fetcheravoidrecurse/recipe-sysroot-native/usr/sbin:/OE/build/oe-core/tmp-glibc/work/raspberrypi4-oe-linux-gnueabi/linux-raspberrypi-dev/1_fetcheravoidrecurse-fetcheravoidrecurse/recipe-sysroot-native/usr/bin:/OE/build/oe-core/tmp-glibc/work/raspberrypi4-oe-linux-gnueabi/linux-raspberrypi-dev/1_fetcheravoidrecurse-fetcheravoidrecurse/recipe-sysroot-native/sbin:/OE/build/oe-core/tmp-glibc/work/raspberrypi4-oe-linux-gnueabi/linux-raspberrypi-dev/1_fetcheravoidrecurse-fetcheravoidrecurse/recipe-sysroot-native/bin:/OE/build/oe-core/bitbake/bin:/OE/build/oe-core/tmp-glibc/hosttools"; export HOME="/home/martin"; git -c core.fsyncobjectfiles=0 ls-remote git://git.yoctoproject.org/yocto-kernel-cache  failed with exit code 128, output:
fatal: unable to connect to git.yoctoproject.org:
git.yoctoproject.org[0: 127.0.1.1]: errno=Connection refused

Summary: There was 1 ERROR message shown, returning a non-zero exit code.

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2021-06-07 13:00:27 +01:00
Martin Jansa
08ed92fd31 linux-raspberrypi-dev: drop protocol=git and add LINUX_RPI_KMETA_BRANCH
* update SRC_URI format to use the same as linux-raspberrypi_5.10.bb
  and linux-raspberrypi_5.4.bb by dropping protocol=git and using
  LINUX_RPI_KMETA_BRANCH

* protocol=git was dropped from other linux-raspberrypi recipes in:

  commit 0381ac4d08
  Author: Timm Eversmeyer <saeugetier@googlemail.com>
  Date:   Wed Sep 11 07:08:50 2019 +0200

    raspberrypi-linux: removed protocoll setting from SRC_URI

    Default protocoll for git will be used. Default setting is in the most case https.

    Signed-off-by: Timm Eversmeyer saeugetier@gmail.com

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2021-06-07 13:00:27 +01:00
Martin Jansa
46314ed89c linux-raspberrypi: allow to change the yocto-kernel-cache branch with LINUX_RPI_KMETA_BRANCH
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2021-06-07 13:00:27 +01:00
Andrei Gherzan
fdfe2ec50f layer.conf: Define LAYERDEPENDS
We should currently only depend on core - everything should be handled
through dynamic layers.

Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
2021-06-07 13:00:27 +01:00
Mike Looijmans
3ae135e590 rpi-base: Add missing overlay_map.dtb and vc4-kms-v3d-pi4.dtbo
overlay_map.dtb arranges that when config.txt requests "vc4-kms-v3d"
the rpi4 will actually load "vc4-kms-v3d-pi4" and fixups like that.
It is present on the official distros, and must be put into the
overlays subdirectory in the boot partition.
For a detailed description of the overlay_map.dts file see:
  https://www.raspberrypi.org/documentation/configuration/device-tree.md#part2.2.10

vc4-kms-v3d-pi4 is required for the arm based kms driver on the rpi4.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
(cherry picked from commit fdf02accfe)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Mike Looijmans
f270194db9 linux-raspberrypi: Upgrade to 5.10.17
This fixes, amongst others, issues with I2C controller interrupts on the RPI4
that prevented a touch panel from functioning.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
(cherry picked from commit ef04a3a523)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Mike Looijmans
c12b6f5ecd raspberrypi-firmware: Update to 2021-02-25
This version is compatible with the 5.10.17 kernel
5985247fb7

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
(cherry picked from commit 0b4a73ebad)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Martin Jansa
e46407bbfb sdcard_image-rpi.bbclass: shorten the default BOOTDD_VOLUME_ID
* raspberrypi4-64 is 15 characters and with dosfstools-4.2 it breaks rootfs.rpi-sdimg with:
  mkfs.vfat: Label can be no longer than 11 characters
  mkfs.fat 4.2 (2021-01-31)

* introduced in:
  https://github.com/dosfstools/dosfstools/commit/c598354

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
(cherry picked from commit 853ccd7440)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Mike Looijmans
55a48792f2 overlays: Add "vc4-kms-dsi-7inch.dtbo"
In theory, this would allow one to use the official 7-inch touchscreen
in combination with the (non-firmware) kms driver by adding the
following lines to config.txt:

ignore_lcd=1
dtoverlay=vc4-kms-v3d
dtoverlay=vc4-kms-dsi-7inch

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
(cherry picked from commit 68976061c5)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Khem Raj
85fa37e51a python3-adafruit-blinka: Delete microcontroller/bcm283x for non arm32 machines
It has prebuilt binary libgpiod_pulsein for rpi machines and these binary is 32bit
therefore we can not include it for 64bit machines even if they are rpi
based unless they have multilib enabled.

This patch makes it visible only on 32bit rpi

Fixes QA errors like
ERROR: QA Issue: Architecture did not match (ARM, expected AArch64) in /usr/lib/python3.9/site-packages/adafruit_blinka/microcontroller/bcm283x/pulseio/.debug/libgpiod_pulsein [arch]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 5e543bd817)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Khem Raj
cb60274634 python3-adafruit-blinka: Make rpi-gpio dependency conditional
https://github.com/agherzan/meta-raspberrypi/pull/815

introduced python3-adafruit-blinka and this recipe has added rdep on rpi-gpio,
however rpi-gpio is rpi specific package, and therefore should only be added
when building rpi based platforms, this makes the layer work in a
multi-bsp setup work

Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 0a83508fac)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Chris Laplante
61dbe0edd7 python3-adafruit-pureio: add recipe
Signed-off-by: Chris Laplante <mostthingsweb@gmail.com>
(cherry picked from commit f80b8d2dff)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Chris Laplante
a054cc3c4e python3-adafruit-platformdetect: add recipe
Signed-off-by: Chris Laplante <mostthingsweb@gmail.com>
(cherry picked from commit 0d0c563aa1)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Chris Laplante
c8f5aafb27 python3-adafruit-circuitpython-register: add recipe
Signed-off-by: Chris Laplante <mostthingsweb@gmail.com>
(cherry picked from commit ca70494511)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Chris Laplante
9a58fef61e python3-adafruit-circuitpython-pca9685: add recipe
Signed-off-by: Chris Laplante <mostthingsweb@gmail.com>
(cherry picked from commit 76656d27bb)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Chris Laplante
e3f817d25c python3-adafruit-circuitpython-motorkit: add recipe
Signed-off-by: Chris Laplante <mostthingsweb@gmail.com>
(cherry picked from commit 0a58422984)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Chris Laplante
f5919f60f7 python3-adafruit-circuitpython-motor: add recipe
Signed-off-by: Chris Laplante <mostthingsweb@gmail.com>
(cherry picked from commit b29eb27c5b)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Chris Laplante
699c577c68 python3-adafruit-circuitpython-busdevice: add recipe
Signed-off-by: Chris Laplante <mostthingsweb@gmail.com>
(cherry picked from commit 823220e648)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Chris Laplante
c757f8fbbd python3-adafruit-blinka: add recipe
Signed-off-by: Chris Laplante <mostthingsweb@gmail.com>
(cherry picked from commit c8f7eae1b8)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Martin Jansa
99a616f98e sdcard_image-rpi.bbclass: increase default boot partition size from 40MiB to 48MiB
* 5.10 kernel got a bit bigger especially for aarch64:
  5.10:   22M     deploy/images/raspberrypi4-64/Image-raspberrypi4-64.bin
  5.10:  7.0M     deploy/images/raspberrypi4/uImage-raspberrypi4.bin
  5.4:    16M     deploy/images/raspberrypi4-64/Image-raspberrypi4-64.bin
  5.4:   6.2M     deploy/images/raspberrypi4/uImage-raspberrypi4.bin

* and the space in fat boot partition was already tight:
  Filesystem      Size  Used Avail Use% Mounted on
  /dev/mmcblk0p1   40M   38M  1.7M  96% /

* increase the size to compensate for it, otherwise
  do_image_rpi_sdimg now fails with:

Creating filesystem with Boot partition 40960 KiB and RootFS 1822720 KiB
0+0 records in
0+0 records out
0 bytes copied, 0.000100992 s, 0.0 kB/s
Model:  (file)
Disk foo.rootfs.rpi-sdimg: 1913MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type     File system  Flags
 1      4194kB  46.1MB  41.9MB  primary               boot, lba
 2      46.1MB  1913MB  1866MB  primary

mkfs.fat: warning - lowercase labels might not work properly with DOS or Windows
mkfs.fat 4.1 (2017-01-24)
Copying bootcode.bin
Copying cmdline.txt
Copying config.txt
Copying fixup.dat
Copying fixup4.dat
Copying fixup4cd.dat
Copying fixup4db.dat
Copying fixup4x.dat
Copying fixup_cd.dat
Copying fixup_db.dat
Copying fixup_x.dat
Copying rpi-bootfiles-20210205.stamp
Copying start.elf
Copying start4.elf
Copying start4cd.elf
Copying start4db.elf
Copying start4x.elf
Copying start_cd.elf
Copying start_db.elf
Copying start_x.elf
Copying bcm2711-rpi-4-b.dtb
Copying at86rf233.dtbo
Copying disable-bt.dtbo
Copying dwc2.dtbo
Copying gpio-ir.dtbo
Copying gpio-ir-tx.dtbo
Copying gpio-key.dtbo
Copying hifiberry-amp.dtbo
Copying hifiberry-dac.dtbo
Copying hifiberry-dacplus.dtbo
Copying hifiberry-digi.dtbo
Copying justboom-both.dtbo
Copying justboom-dac.dtbo
Copying justboom-digi.dtbo
Copying i2c-rtc.dtbo
Copying imx219.dtbo
Copying iqaudio-dac.dtbo
Copying iqaudio-dacplus.dtbo
Copying mcp2515-can0.dtbo
Copying mcp2515-can1.dtbo
Copying miniuart-bt.dtbo
Copying pitft22.dtbo
Copying pitft28-capacitive.dtbo
Copying pitft28-resistive.dtbo
Copying pitft35-resistive.dtbo
Copying pps-gpio.dtbo
Copying rpi-ft5406.dtbo
Copying rpi-poe.dtbo
Copying vc4-fkms-v3d.dtbo
Copying vc4-kms-v3d.dtbo
Copying w1-gpio.dtbo
Copying w1-gpio-pullup.dtbo
Copying kernel8.img
Copying boot.scr
Copying Image
Disk full
ERROR: mcopy cannot copy /OE/build/luneos-hardknott/webos-ports/tmp-glibc/deploy/images/raspberrypi4-64/Image into boot.img
WARNING: exit code 1 from a shell command.

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
(cherry picked from commit 10d21b8022)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Bartłomiej Burdukiewicz
01bf094a8e rpi-cmdline: remove unnecessary spaces from cmdline.txt
With current recipe formatting CMDLINE variable contains
many unnecessary white spaces. This patch allow to drop
unnecessary spaces at the moment of writing them to
cmdline.txt. This will improve readability of cmdline.txt,
/proc/cmdline and dmesg output.

Signed-off-by: Bartłomiej Burdukiewicz <bartlomiej.burdukiewicz@gmail.com>
(cherry picked from commit f5fe02c30c)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Aaron Shaw
e42aa976ef overlays: add missing device overlays
add overlays for pi zero, bcm2710 based rpi2 and rpi b rev 1

Change-type: patch
Signed-off-by: Aaron Shaw <aaron@balena.io>
(cherry picked from commit 509ff8c732)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Aaron Shaw
9fe44981d9 overlays: add overlays for pi 400 and cm4
add overlays for pi 400 and cm4

Change-type: patch
Signed-off-by: Aaron Shaw <aaron@balena.io>
(cherry picked from commit 0c85f01506)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Aaron Shaw
b4155d8148 overlays: add overlay to allow 64 bit usage with CM3
add overlay to allow 64 bit usage with CM3

Change-type: patch
Signed-off-by: Aaron Shaw <aaron@balena.io>
(cherry picked from commit fc11c5d95c)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Martin Jansa
a660dc377e raspberrypi-firmware.inc: upgrade to latest for 5.10.13 kernel
7d91570f20

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
(cherry picked from commit b52d47c048)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Martin Jansa
12ff6a2ea6 rpi-default-versions: Switch default kernel to 5.10
* 5.10.11 is now considered stable:
  https://github.com/raspberrypi/firmware/blob/stable/extra/uname_string7
  8572bb50bf

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
(cherry picked from commit b947ce2148)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Martin Jansa
e3e4a6c947 linux-raspberrypi: update LIC_FILES_CHKSUM in .inc file and drop from 5.10 and dev recipe
* COPYING was changed only 4 times (last time in 5.6 with:
  https://github.com/torvalds/linux/commit/74835c7db0322 )
  so hopefully it will last for a while

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
(cherry picked from commit 7565931e23)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Martin Jansa
e974a2c2e6 linux-raspberrypi: add recipe for 5.10 version
* 5.10.11 is now considered stable:
  https://github.com/raspberrypi/firmware/blob/stable/extra/uname_string7
  8572bb50bf

Gatesgarth specific:
- Use KERNEL_EXTRA_ARG instead of KERNEL_DTC_FLAGS

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
(cherry picked from commit dd163e0856)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Aurelian Zanoschi
a5969a681d [documentation]Add USB host support in documentation
Signed-off-by: Aurelian Zanoschi <aurelian17@gmail.com>
(cherry picked from commit 48d081265d)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Aurelian Zanoschi
08bf4fddbe rpi-config: Add support for CM4 host USB
By default in case of CM4 IO board, the USB ports (header + built-in)
are disabled. In order to enable them the DWC2 mode needs to be set to
host.

Signed-off-by: Aurelian Zanoschi <aurelian17@gmail.com>
(cherry picked from commit 7193857284)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Jonas Vautherin
93120ad0d3 linux-raspberrypi: Superfluous 'inherit kernel'
'recipes-kernel/linux/linux-yocto.inc' already inherits 'kernel'.
This commit removes the superfluous one in 'linux-raspberrypi.inc'.

Signed-off-by: Jonas Vautherin <jonas.vautherin@protonmail.ch>
(cherry picked from commit 56ab926557)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Paul Barker
f09042dd78 linux-raspberrypi: Uprev yocto-kernel-cache
Signed-off-by: Paul Barker <pbarker@konsulko.com>
(cherry picked from commit 5570f2f55d)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Paul Barker
69521d71ea linux-raspberrypi: Uprev to v5.4.83
Signed-off-by: Paul Barker <pbarker@konsulko.com>
(cherry picked from commit b1d38437f5)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Paul Barker
ff6b4d4876 raspberrypi4-64: No need to force arm_64bit=1
This workaround is no longer needed with recent firmware.

Signed-off-by: Paul Barker <pbarker@konsulko.com>
(cherry picked from commit 2a9c3bb551)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Paul Barker
db1975714a conf: Use unified u-boot config for 64-bit targets
The rpi_arm64 configuration supports both Raspberry Pi 3 & 4 in 64-bit
mode. Switching to this config is a small step towards supporting a
unified build for these targets.

Signed-off-by: Paul Barker <pbarker@konsulko.com>
(cherry picked from commit a4a8ce9af4)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Aaron Shaw
0efe97f485 overlays: add justboom overlays
add justboom overlays

Change-type: patch
Signed-off-by: Aaron Shaw <shawaj@gmail.com>
(cherry picked from commit 9165aa52b6)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Aaron Shaw
4742634683 overlays: reorder in alphabetical order
reorder list to be in alphabetical order

Change-type: patch
Signed-off-by: Aaron Shaw <aaron@balena.io>
(cherry picked from commit 1c66732627)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Matt Spencer
e20e770049 linux-raspberrypi: Enable use of 'RPI_EXTRA_CONFIG += ...' in local.conf
Before this patch, use of RPI_EXTRA_CONFIG += in a local.conf would overwrite
the needed 'arm_64bit=1' defined in the core recipes. The net result would be
a system that did not boot.

This patch fixes the assignment of 'arm_64bit=1' even if RPI_EXTRA_CONFIG
has been set elsewhere.

Signed-off-by: matthew@thespencers.me.uk
(cherry picked from commit 881e603ca2)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Martin Jansa
22e9750971 rpi-config: use CONFIG shell variable
* instead of repeating //config.txt
  so many times, to make it a bit less error prone (as shown in previous commit)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
(cherry picked from commit 17eb1a2f00)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Martin Jansa
5da689d0af rpi-config: fix do_deploy
* in https://github.com/agherzan/meta-raspberrypi/pull/678 this line was acidentally changed
  from "${BOOTFILES_DIR_NAME}" to "bcm2835-bootfiles", causing do_deploy to fail finding config.txt

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
(cherry picked from commit 5c9309de87)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
SCVready
18fd207e70 rpi-config: Relocated "start_x=1" in config.txt
It seems like "start_x=1" needs to be earlier in the file to work properly on the Rapberry Pi 4 B.

Fixes: #670
Signed-off-by: SCVready <alejandro.solozabal@outlook.com>
(cherry picked from commit 74deec51de)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Christopher Clark
028e1e0e4d machine: use weak default for kernel and KERNEL_DEVICETREE settings
To allow other layers to easily provide a default kernel preference to
use with the Raspberry Pi MACHINEs, switch to use the ??= assignment
operator for setting the default kernel and the device tree value in
this layer.

This change is motivated by enabling Xen support in meta-virtualization
to use the raspberrypi4-64 MACHINE definition from this layer with the
Yocto Linux kernels.

Signed-off-by: Christopher Clark <christopher.w.clark@gmail.com>
(cherry picked from commit e0b4b8c5df)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Ovidiu Panait
48a500e7ee linux-raspberry: Drop 64-bit specific do_compile_append()
The functionality provided by this compile append is already present in
kernel-devicetree.bbclass since oe-core commit:
https://github.com/openembedded/openembedded-core/commit/74619de02774

The md5sums of the generated dtbs for raspberrypi3-64 and raspberrypi4-64 do
not change with this patch applied.

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
(cherry picked from commit a7cc636d4e)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Khem Raj
b8b5e80dd3 initramfs-image-bundle: Add MTD_UBI
CONFIG_UBIFS_FS is used as 'm' in defconfig and depends on MTD and MTD_UBI which
is also 'm', inorder for it to include in kernel proper, set MTD_UBI=y
and MTD=y as well.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 3e2a8534a6)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Andrei Gherzan
a6d1c87088 README.md: Mention build server sponsor
balena.io has been sponsoring the project with a build server for a
while now. It's only fair for us to mention this somewhere in our
README.

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
(cherry picked from commit 3fe1f79ea2)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Khem Raj
62cac69465 raspidmx: Disable for all non-rpi hosts
Currently its only disabled when vc4graphics is in use but this recipe
actually needs userland and therefore can not be used for non-rpi
machines as well.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 361f42e346)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Trevor Woerner
c6e203bac8 raspidmx: add
Add a recipe to build a set of dispmanx examples.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
(cherry picked from commit e4f5c32925)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Trevor Woerner
690ea73547 userland: fix invalid packageconfig
Fix the "allapps" PACKAGECONFIG to avoid the QA warning/error:

	userland-20201027-r0 do_configure: QA Issue: userland: invalid PACKAGECONFIG: allapps [invalid-packageconfig]

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
(cherry picked from commit 4b89f63699)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Aaron Shaw
17b122785b linux-firmware-rpidistro: Added firmware for BCM43456
The new Raspberry Pi 400 (and perhaps the CM4 as well) use the BCM43456 chip from Broadcom/Synaptics. This adds the necessary firmware.

Signed-off-by: Aaron Shaw <aaron@balena.io>
(cherry picked from commit f82376c444)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Khem Raj
9cb0883651 libglu: Fix build with userland graphics
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 1ae52a743c)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Khem Raj
4670102940 userland: Fix weston build with userland graphics
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 80bcc2e0ed)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Tobias Off
b4877ed7df linux-firmware-rpidistro: Missing link to firmware causes wifi not working on raspberrypi zero w
The link the brcmfmac is looking for was not created by the recipe for the raspberrypi zero w,
so the wifi was not working for this board. Adding link creation in the recipe solved the issue.

Signed-off-by: Tobias Off <sebastianoff@web.de>
(cherry picked from commit 8e35fbffb0)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Khem Raj
5d142b3bf5 mesa-gl: Enable swrast dri backend for rpi/userland
After mesa switched build system to meson, the logic to generate dri
related artifacts changed too, which means when no dri backend is
enabled then dri drivers and corresponding headers dont get generated
and hence we end up with missing pkgconfig files e.g. dri.pc which
usually will come from full mesa3d package, but in rpi when userland is
used we only build GL pieces of mesa.

This patch therefore enables swrast dri backend when using userland,
which gives us the needed header and .pc files to build packages like
Xorg server, since EGL driver will come from userland, the dri backend
would be unused and hence should not be effective at runtime.

Addresses issue report with https://github.com/agherzan/meta-raspberrypi/pull/773

there is no need to check for graphics stack since mesa-gl is only used
with userland graphics

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Trevor Woerner <twoerner@gmail.com>
(cherry picked from commit 6c1c9ff4ee)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Trevor Woerner
61a5101fcc userland: add knob for ALL_APPS
The userland sources include a bunch of sample applications. Add an "allapps"
PACKAGECONFIG to allow the user to build the additional optional applications.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
(cherry picked from commit 3a1fec22c0)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Paul Barker
49c06916ca linux-raspberrypi-dev: Update for testing v5.10.y
Linux 5.10 series will be the next LTS kernel so it's likely to be the
new stable branch for linux-raspberrypi within a couple of months. Let's
get set up to test it now.

Signed-off-by: Paul Barker <pbarker@konsulko.com>
(cherry picked from commit 7a6759e242)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Paul Barker
877d933322 linux-raspberrypi: Merge v5.4 recipe & inc file
There is no need for a separate inc file for the v5.4 kernel recipe.

Variable assignments are simplified where possible after merging.

Signed-off-by: Paul Barker <pbarker@konsulko.com>
(cherry picked from commit 8c5809ebbb)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Paul Barker
b5388c085a linux-raspberrypi: Drop unused rpi-kernel-misc config fragment
This config fragment was unconditionally disabled for the v5.4 kernel
so it can be dropped.

Signed-off-by: Paul Barker <pbarker@konsulko.com>
(cherry picked from commit 64f6a1b7cc)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Paul Barker
e7d00a9768 linux-raspberrypi: Remove obsolete kernel versions
Signed-off-by: Paul Barker <pbarker@konsulko.com>
(cherry picked from commit 2afeee9b82)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Paul Barker
6529a81bc7 rpi-bootfiles: Rename recipe to avoid ambiguity
The name `bootfiles` is too generic, we should use `rpi-bootfiles`
instead.

Signed-off-by: Paul Barker <pbarker@konsulko.com>
(cherry picked from commit ba3a417fbb)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Paul Barker
b197758225 bootfiles: Use BOOTFILES_DIR_NAME variable
This variable is set in rpi-base.inc and referenced by other recipes
which need to know the location of the bootfiles. If this is overridden
for any reason we need to ensure that the bootfiles recipe deploys to
the correct path.

Signed-off-by: Paul Barker <pbarker@konsulko.com>
(cherry picked from commit b8440b3d26)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Paul Barker
ccb72fc995 rpi-cmdline: Move cmdline.txt generation to a separate recipe
Instead of generating cmdline.txt in the kernel recipe, it is generated
in a standalone recipe and pulled in as a dependency of the bootfiles
recipe. This simplifies the process of using a linux-yocto,
linux-mainline or similiar kernel recipe instead of linux-raspberrypi.

In the rpi-cmdline recipe the command line is built from fragments which
can all be easily overridden. The variables `SERIAL` and `CMA` are
renamed to `CMDLINE_SERIAL` and `CMDLINE_CMA` for consistency. The
cmdline.txt file is created in the do_compile step to allow further
customisation via do_compile_append if needed.

Signed-off-by: Paul Barker <pbarker@konsulko.com>
(cherry picked from commit 8827040d9c)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Paul Barker
4d54d6f9c1 sdcard_image-rpi: Drop redundant dependency on rpi-config:do_deploy
The bootfiles:do_deploy task already depends on rpi-config:do_deploy so
we do not explicitly need to list the dependency again in the
sdcard_image-rpi class.

Signed-off-by: Paul Barker <pbarker@konsulko.com>
(cherry picked from commit ba6a809a55)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Paul Barker
2381e39764 linux-raspberrypi: Convert dynamic config patching to config fragments
This allows us to drop all of the custom config patching in
linux-raspberrypi.inc. It also allows the kernel config to be checked
during the build for any discrepancies between the selected config
options and the resulting .config file - this identified that
`CONFIG_DRM_VC4` depends on `CONFIG_SND` and `CONFIG_SND_SOC`.

Signed-off-by: Paul Barker <pbarker@konsulko.com>
(cherry picked from commit 1c8ad80861)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Ming Liu
3234e955df rpi-u-boot-scr: drop hard-coded 'arm'
Let's inherit kernel-arch and use ${UBOOT_ARCH} to replace the
hard-coded 'arm'.

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
(cherry picked from commit 26a888d669)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Khem Raj
494c4ded6f packagegroup-rpi-test: Add python3-sense-hat in a meta-python specific bbappend
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 25d1eb4146)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Khem Raj
84a922e4ed armstubs: Always use gcc compiler
it uses assembly files .S which needs to be processed with gcc alone
until they are made portable use gcc

Fixes
| armstub7.S:175:2: error: instruction requires: thumb
|  cbz r6, 9f @ Skip this section if we are core 0
|  ^

Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 5db97b41a8)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Khem Raj
d9e042771b raspberrypi-tools: Update to latest on master
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit dcdd0e4a20)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Khem Raj
1c88645b90 userland: Upgrade to latest as of 20201027
refresh patches

Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit fd83102af7)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Khem Raj
6fdb8a5f56 raspberrypi-firmware: Update to latest to take 5.4.79 prebuilts
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 6a53db2fb6)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Khem Raj
ca02fb8a51 linux-raspberrypi_5.4.bb: Update to 5.4.79
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 07a4d28f1d)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Khem Raj
c6b0082306 python3-sense-hat: Move to dynamic-layers
Only active when meta-python is in layermix, this recipe rdeps on
python3-pillow, which comes from meta-python, until that moves to
oe-core lets hide this recipe unless meta-python is used

Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 08d27cd799)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Jan-Simon Moeller
16eb6ec2b0 python3-sense-hat: Switch to using pillow instead of imaging module
while meta-python does rprovide python3-imaging via python3-pillow, its
better to not rely on that bridge, since this might disappear in future

Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 07fc972c60)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Khem Raj
8c69288c7d linux-raspberrypi: Do not use += with append
append operator and += when used together results in undefined behaviour
in bitbake

Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 2e0b2d41cf)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
Madhavan Krishnan
c448bcd074 libcamera: Enabled camera overlays define based
Added imx219.dtbo file in the overlays, and added dtoverlay in
/boot/config.txt define based.

To enable Sony Raspberry pi camera imx219 sensor, need to set
the variable RASPBERRYPI_CAMERA_V2 as 1.

In future, we can add any camera overlays here to support and
use them with libcamera.

Signed-off-by: Madhavan Krishnan <madhavan.krishnan@linaro.org>
(cherry picked from commit b70c7b9021)
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
2021-03-16 22:25:08 +00:00
80 changed files with 1358 additions and 596 deletions

View File

@@ -9,6 +9,10 @@ Yocto BSP layer for the Raspberry Pi boards - <http://www.raspberrypi.org/>.
[![Documentation Status](https://readthedocs.org/projects/meta-raspberrypi/badge/?version=latest)](https://meta-raspberrypi.readthedocs.io/en/latest/?badge=latest)
[![Matrix](https://img.shields.io/matrix/meta-raspberrypi:cub.icu.svg?server_fqdn=matrix.cub.icu)](https://matrix.to/#/#meta-raspberrypi:cub.icu)
| | |
|:-: | :-: |
| Build server sponsored by | [![balena.io](./img/balena.png)](https://www.balena.io/). |
## Quick links
* Git repository web frontend:

View File

@@ -13,31 +13,30 @@ inherit image_types
# Default Free space = 1.3x
# Use IMAGE_OVERHEAD_FACTOR to add more space
# <--------->
# 4MiB 40MiB SDIMG_ROOTFS
# 4MiB 48MiB SDIMG_ROOTFS
# <-----------------------> <----------> <---------------------->
# ------------------------ ------------ ------------------------
# | IMAGE_ROOTFS_ALIGNMENT | BOOT_SPACE | ROOTFS_SIZE |
# ------------------------ ------------ ------------------------
# ^ ^ ^ ^
# | | | |
# 0 4MiB 4MiB + 40MiB 4MiB + 40Mib + SDIMG_ROOTFS
# 0 4MiB 4MiB + 48MiB 4MiB + 48Mib + SDIMG_ROOTFS
# This image depends on the rootfs image
IMAGE_TYPEDEP_rpi-sdimg = "${SDIMG_ROOTFS_TYPE}"
# Set kernel and boot loader
IMAGE_BOOTLOADER ?= "bootfiles"
# Kernel image name
SDIMG_KERNELIMAGE_raspberrypi ?= "kernel.img"
SDIMG_KERNELIMAGE_raspberrypi2 ?= "kernel7.img"
SDIMG_KERNELIMAGE_raspberrypi3-64 ?= "kernel8.img"
# Boot partition volume id
BOOTDD_VOLUME_ID ?= "${MACHINE}"
# Shorten raspberrypi to just rpi to keep it under 11 characters
# now enforced by mkfs.vfat from dosfstools-4.2
BOOTDD_VOLUME_ID ?= "${@d.getVar('MACHINE').replace('raspberrypi', 'rpi')}"
# Boot partition size [in KiB] (will be rounded up to IMAGE_ROOTFS_ALIGNMENT)
BOOT_SPACE ?= "40960"
BOOT_SPACE ?= "49152"
# Set alignment to 4MB [in KiB]
IMAGE_ROOTFS_ALIGNMENT = "4096"
@@ -56,8 +55,7 @@ do_image_rpi_sdimg[depends] = " \
mtools-native:do_populate_sysroot \
dosfstools-native:do_populate_sysroot \
virtual/kernel:do_deploy \
${IMAGE_BOOTLOADER}:do_deploy \
rpi-config:do_deploy \
rpi-bootfiles:do_deploy \
${@bb.utils.contains('MACHINE_FEATURES', 'armstub', 'armstubs:do_deploy', '' ,d)} \
${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'u-boot:do_deploy', '',d)} \
${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'u-boot-default-script:do_deploy', '',d)} \

View File

@@ -9,7 +9,8 @@ BBFILE_COLLECTIONS += "raspberrypi"
BBFILE_PATTERN_raspberrypi := "^${LAYERDIR}/"
BBFILE_PRIORITY_raspberrypi = "9"
LAYERSERIES_COMPAT_raspberrypi = "sumo thud warrior zeus dunfell gatesgarth"
LAYERSERIES_COMPAT_raspberrypi = "dunfell gatesgarth"
LAYERDEPENDS_raspberrypi = "core"
# Additional license directories.
LICENSE_PATH += "${LAYERDIR}/files/custom-licenses"

View File

@@ -15,48 +15,60 @@ XSERVER = " \
"
RPI_KERNEL_DEVICETREE_OVERLAYS ?= " \
overlays/overlay_map.dtb \
overlays/at86rf233.dtbo \
overlays/disable-bt.dtbo \
overlays/dwc2.dtbo \
overlays/gpio-ir.dtbo \
overlays/gpio-ir-tx.dtbo \
overlays/gpio-key.dtbo \
overlays/hifiberry-amp.dtbo \
overlays/hifiberry-dac.dtbo \
overlays/hifiberry-dacplus.dtbo \
overlays/hifiberry-digi.dtbo \
overlays/justboom-both.dtbo \
overlays/justboom-dac.dtbo \
overlays/justboom-digi.dtbo \
overlays/i2c-rtc.dtbo \
overlays/imx219.dtbo \
overlays/iqaudio-dac.dtbo \
overlays/iqaudio-dacplus.dtbo \
overlays/miniuart-bt.dtbo \
overlays/mcp2515-can0.dtbo \
overlays/mcp2515-can1.dtbo \
overlays/miniuart-bt.dtbo \
overlays/pitft22.dtbo \
overlays/pitft28-resistive.dtbo \
overlays/pitft28-capacitive.dtbo \
overlays/pitft28-resistive.dtbo \
overlays/pitft35-resistive.dtbo \
overlays/pps-gpio.dtbo \
overlays/rpi-ft5406.dtbo \
overlays/rpi-poe.dtbo \
overlays/vc4-kms-v3d.dtbo \
overlays/vc4-fkms-v3d.dtbo \
overlays/w1-gpio-pullup.dtbo \
overlays/vc4-kms-v3d.dtbo \
overlays/vc4-kms-v3d-pi4.dtbo \
overlays/vc4-kms-dsi-7inch.dtbo \
overlays/w1-gpio.dtbo \
overlays/gpio-ir.dtbo \
overlays/gpio-ir-tx.dtbo \
overlays/w1-gpio-pullup.dtbo \
"
RPI_KERNEL_DEVICETREE ?= " \
bcm2708-rpi-zero.dtb \
bcm2708-rpi-zero-w.dtb \
bcm2708-rpi-b.dtb \
bcm2708-rpi-b-rev1.dtb \
bcm2708-rpi-b-plus.dtb \
bcm2709-rpi-2-b.dtb \
bcm2710-rpi-2-b.dtb \
bcm2710-rpi-3-b.dtb \
bcm2710-rpi-3-b-plus.dtb \
bcm2711-rpi-4-b.dtb \
bcm2711-rpi-400.dtb \
bcm2708-rpi-cm.dtb \
bcm2710-rpi-cm3.dtb \
bcm2711-rpi-cm4.dtb \
"
KERNEL_DEVICETREE ?= " \
KERNEL_DEVICETREE ??= " \
${RPI_KERNEL_DEVICETREE} \
${RPI_KERNEL_DEVICETREE_OVERLAYS} \
"
@@ -100,17 +112,17 @@ def make_dtb_boot_files(d):
def transform(dtb):
base = os.path.basename(dtb)
if dtb.endswith('dtb'):
# eg: whatever/bcm2708-rpi-b.dtb has:
# DEPLOYDIR file: bcm2708-rpi-b.dtb
# destination: bcm2708-rpi-b.dtb
return base
elif dtb.endswith('dtbo'):
if dtb.endswith('dtbo') or base == 'overlay_map.dtb':
# overlay dtb:
# eg: overlays/hifiberry-amp.dtbo has:
# DEPLOYDIR file: hifiberry-amp.dtbo
# destination: overlays/hifiberry-amp.dtbo
return '{};{}'.format(base, dtb)
elif dtb.endswith('dtb'):
# eg: whatever/bcm2708-rpi-b.dtb has:
# DEPLOYDIR file: bcm2708-rpi-b.dtb
# destination: bcm2708-rpi-b.dtb
return base
return ' '.join([transform(dtb) for dtb in alldtbs.split(' ') if dtb])
@@ -122,7 +134,7 @@ IMAGE_BOOT_FILES ?= "${BOOTFILES_DIR_NAME}/* \
'${KERNEL_IMAGETYPE};${SDIMG_KERNELIMAGE}', d)} \
"
do_image_wic[depends] += " \
bootfiles:do_deploy \
rpi-bootfiles:do_deploy \
${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'u-boot:do_deploy', '',d)} \
"

View File

@@ -1,6 +1,6 @@
# RaspberryPi BSP default providers
PREFERRED_PROVIDER_virtual/kernel ?= "linux-raspberrypi"
PREFERRED_PROVIDER_virtual/kernel ??= "linux-raspberrypi"
PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
PREFERRED_PROVIDER_virtual/egl ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "userland", d)}"
PREFERRED_PROVIDER_virtual/libgles2 ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "userland", d)}"

View File

@@ -1,3 +1,3 @@
# RaspberryPi BSP default versions
PREFERRED_VERSION_linux-raspberrypi ??= "5.4.%"
PREFERRED_VERSION_linux-raspberrypi ??= "5.10.%"

View File

@@ -18,11 +18,12 @@ RPI_KERNEL_DEVICETREE = " \
broadcom/bcm2710-rpi-3-b.dtb \
broadcom/bcm2710-rpi-3-b-plus.dtb \
broadcom/bcm2837-rpi-3-b.dtb \
broadcom/bcm2710-rpi-cm3.dtb \
"
SERIAL_CONSOLES ?= "115200;ttyS0"
UBOOT_MACHINE = "rpi_3_config"
UBOOT_MACHINE = "rpi_arm64_config"
# When u-boot is enabled we need to use the "Image" format and the "booti"
# command to load the kernel

View File

@@ -15,12 +15,14 @@ include conf/machine/include/rpi-base.inc
RPI_KERNEL_DEVICETREE = " \
broadcom/bcm2711-rpi-4-b.dtb \
broadcom/bcm2711-rpi-400.dtb \
broadcom/bcm2711-rpi-cm4.dtb \
"
SDIMG_KERNELIMAGE ?= "kernel8.img"
SERIAL_CONSOLES ?= "115200;ttyS0"
UBOOT_MACHINE = "rpi_4_config"
UBOOT_MACHINE = "rpi_arm64_config"
VC4DTBO ?= "vc4-fkms-v3d"
@@ -31,6 +33,4 @@ KERNEL_IMAGETYPE_UBOOT ?= "Image"
KERNEL_IMAGETYPE_DIRECT ?= "Image"
KERNEL_BOOTCMD ?= "booti"
RPI_EXTRA_CONFIG ?= "\n# Force arm in 64bit mode. See: https://github.com/raspberrypi/firmware/issues/1193.\narm_64bit=1"
ARMSTUB ?= "armstub8-gic.bin"

View File

@@ -269,6 +269,15 @@ local.conf:
ENABLE_DWC2_PERIPHERAL = "1"
## Enable USB host support
By default in case of the Compute Module 4 IO Board the standard USB driver
that usually supports host mode operations is disabled for power saving reasons.
Users who want to use the 2 USB built-in ports or the other ports provided via
the header extension should set the following in local.conf:
ENABLE_DWC2_HOST = "1"
## Enable Openlabs 802.15.4 radio module
When using device tree kernels, set this variable to enable the 802.15.4 hat:
@@ -326,3 +335,17 @@ option:
# Raspberry Pi 7\" display/touch screen \n \
lcd_rotate=2 \n \
'
## Enable Raspberrypi Camera V2
RaspberryPi does not have the unicam device ( RaspberryPi Camera ) enabled by default.
Because this unicam device ( bcm2835-unicam ) as of now is used by libcamera opensource.
So we have to explicitly set in local.conf.
RASPBERRYPI_CAMERA_V2 = "1"
This will add the device tree overlays imx219 ( RaspberryPi Camera sensor V2 driver ) to config.txt.
Also, this will enable adding Contiguous Memory Allocation value in the cmdline.txt.
Ref.:
* <https://github.com/raspberrypi/documentation/blob/master/linux/software/libcamera/README.md>
* <https://www.raspberrypi.org/blog/an-open-source-camera-stack-for-raspberry-pi-using-libcamera/>

View File

@@ -0,0 +1,4 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
RDEPENDS_${PN} += "python3-sense-hat"

View File

@@ -20,5 +20,5 @@ DEPENDS += " \
RDEPENDS_${PN} += " \
${PYTHON_PN}-numpy \
${PYTHON_PN}-rtimu \
${PYTHON_PN}-imaging \
${PYTHON_PN}-pillow \
"

BIN
img/balena.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

@@ -34,3 +34,5 @@ addtask deploy before do_build after do_install
do_deploy[dirs] += "${DEPLOYDIR}/${PN}"
PACKAGE_ARCH = "${MACHINE_ARCH}"
TOOLCHAIN = "gcc"

View File

@@ -9,7 +9,7 @@ include recipes-bsp/common/raspberrypi-firmware.inc
INHIBIT_DEFAULT_DEPS = "1"
DEPENDS = "rpi-config"
DEPENDS = "rpi-config rpi-cmdline"
COMPATIBLE_MACHINE = "^rpi$"
@@ -18,26 +18,26 @@ S = "${RPIFW_S}/boot"
PR = "r3"
do_deploy() {
install -d ${DEPLOYDIR}/${PN}
install -d ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}
for i in ${S}/*.elf ; do
cp $i ${DEPLOYDIR}/${PN}
cp $i ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}
done
for i in ${S}/*.dat ; do
cp $i ${DEPLOYDIR}/${PN}
cp $i ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}
done
for i in ${S}/*.bin ; do
cp $i ${DEPLOYDIR}/${PN}
cp $i ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}
done
# Add stamp in deploy directory
touch ${DEPLOYDIR}/${PN}/${PN}-${PV}.stamp
touch ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/${PN}-${PV}.stamp
}
do_deploy[depends] += "rpi-config:do_deploy"
do_deploy[depends] += "rpi-config:do_deploy rpi-cmdline:do_deploy"
addtask deploy before do_build after do_install
do_deploy[dirs] += "${DEPLOYDIR}/${PN}"
do_deploy[dirs] += "${DEPLOYDIR}/${BOOTFILES_DIR_NAME}"
PACKAGE_ARCH = "${MACHINE_ARCH}"

View File

@@ -0,0 +1,49 @@
SUMMARY = "cmdline.txt file used to boot the kernel on a Raspberry Pi device"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
COMPATIBLE_MACHINE = "^rpi$"
INHIBIT_DEFAULT_DEPS = "1"
inherit deploy nopackages
CMDLINE_DWC_OTG ?= "dwc_otg.lpm_enable=0"
CMDLINE_ROOTFS ?= "root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
CMDLINE_SERIAL ?= "${@oe.utils.conditional("ENABLE_UART", "1", "console=serial0,115200", "", d)}"
CMDLINE_CMA ?= "${@oe.utils.conditional("RASPBERRYPI_CAMERA_V2", "1", "cma=64M", "", d)}"
CMDLINE_PITFT ?= "${@bb.utils.contains("MACHINE_FEATURES", "pitft", "fbcon=map:10 fbcon=font:VGA8x8", "", d)}"
# Add the kernel debugger over console kernel command line option if enabled
CMDLINE_KGDB ?= '${@oe.utils.conditional("ENABLE_KGDB", "1", "kgdboc=serial0,115200", "", d)}'
# Disable rpi logo on boot
CMDLINE_LOGO ?= '${@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 = " \
${CMDLINE_DWC_OTG} \
${CMDLINE_SERIAL} \
${CMDLINE_ROOTFS} \
${CMDLINE_CMA} \
${CMDLINE_KGDB} \
${CMDLINE_LOGO} \
${CMDLINE_PITFT} \
${CMDLINE_DEBUG} \
"
do_compile() {
echo "${@' '.join('${CMDLINE}'.split())}" > "${WORKDIR}/cmdline.txt"
}
do_deploy() {
install -d "${DEPLOYDIR}/${BOOTFILES_DIR_NAME}"
install -m 0644 "${WORKDIR}/cmdline.txt" "${DEPLOYDIR}/${BOOTFILES_DIR_NAME}"
}
addtask deploy before do_build after do_install
do_deploy[dirs] += "${DEPLOYDIR}/${BOOTFILES_DIR_NAME}"

View File

@@ -34,204 +34,220 @@ inherit deploy nopackages
do_deploy() {
install -d ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}
CONFIG=${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
cp ${S}/config.txt ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/
cp ${S}/config.txt $CONFIG
if [ -n "${KEY_DECODE_MPG2}" ]; then
sed -i '/#decode_MPG2=/ c\decode_MPG2=${KEY_DECODE_MPG2}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
sed -i '/#decode_MPG2=/ c\decode_MPG2=${KEY_DECODE_MPG2}' $CONFIG
fi
if [ -n "${KEY_DECODE_WVC1}" ]; then
sed -i '/#decode_WVC1=/ c\decode_WVC1=${KEY_DECODE_WVC1}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
sed -i '/#decode_WVC1=/ c\decode_WVC1=${KEY_DECODE_WVC1}' $CONFIG
fi
if [ -n "${DISABLE_OVERSCAN}" ]; then
sed -i '/#disable_overscan=/ c\disable_overscan=${DISABLE_OVERSCAN}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
sed -i '/#disable_overscan=/ c\disable_overscan=${DISABLE_OVERSCAN}' $CONFIG
fi
if [ "${DISABLE_SPLASH}" = "1" ]; then
sed -i '/#disable_splash=/ c\disable_splash=${DISABLE_SPLASH}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
sed -i '/#disable_splash=/ c\disable_splash=${DISABLE_SPLASH}' $CONFIG
fi
# Set overclocking options
if [ -n "${ARM_FREQ}" ]; then
sed -i '/#arm_freq=/ c\arm_freq=${ARM_FREQ}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
sed -i '/#arm_freq=/ c\arm_freq=${ARM_FREQ}' $CONFIG
fi
if [ -n "${GPU_FREQ}" ]; then
sed -i '/#gpu_freq=/ c\gpu_freq=${GPU_FREQ}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
sed -i '/#gpu_freq=/ c\gpu_freq=${GPU_FREQ}' $CONFIG
fi
if [ -n "${CORE_FREQ}" ]; then
sed -i '/#core_freq=/ c\core_freq=${CORE_FREQ}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
sed -i '/#core_freq=/ c\core_freq=${CORE_FREQ}' $CONFIG
fi
if [ -n "${SDRAM_FREQ}" ]; then
sed -i '/#sdram_freq=/ c\sdram_freq=${SDRAM_FREQ}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
sed -i '/#sdram_freq=/ c\sdram_freq=${SDRAM_FREQ}' $CONFIG
fi
if [ -n "${OVER_VOLTAGE}" ]; then
sed -i '/#over_voltage=/ c\over_voltage=${OVER_VOLTAGE}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
sed -i '/#over_voltage=/ c\over_voltage=${OVER_VOLTAGE}' $CONFIG
fi
# GPU memory
if [ -n "${GPU_MEM}" ]; then
sed -i '/#gpu_mem=/ c\gpu_mem=${GPU_MEM}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
sed -i '/#gpu_mem=/ c\gpu_mem=${GPU_MEM}' $CONFIG
fi
if [ -n "${GPU_MEM_256}" ]; then
sed -i '/#gpu_mem_256=/ c\gpu_mem_256=${GPU_MEM_256}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
sed -i '/#gpu_mem_256=/ c\gpu_mem_256=${GPU_MEM_256}' $CONFIG
fi
if [ -n "${GPU_MEM_512}" ]; then
sed -i '/#gpu_mem_512=/ c\gpu_mem_512=${GPU_MEM_512}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
sed -i '/#gpu_mem_512=/ c\gpu_mem_512=${GPU_MEM_512}' $CONFIG
fi
if [ -n "${GPU_MEM_1024}" ]; then
sed -i '/#gpu_mem_1024=/ c\gpu_mem_1024=${GPU_MEM_1024}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
sed -i '/#gpu_mem_1024=/ c\gpu_mem_1024=${GPU_MEM_1024}' $CONFIG
fi
# Set boot delay
if [ -n "${BOOT_DELAY}" ]; then
sed -i '/#boot_delay=/ c\boot_delay=${BOOT_DELAY}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
sed -i '/#boot_delay=/ c\boot_delay=${BOOT_DELAY}' $CONFIG
fi
if [ -n "${BOOT_DELAY_MS}" ]; then
sed -i '/#boot_delay_ms=/ c\boot_delay_ms=${BOOT_DELAY_MS}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
sed -i '/#boot_delay_ms=/ c\boot_delay_ms=${BOOT_DELAY_MS}' $CONFIG
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}/${BOOTFILES_DIR_NAME}/config.txt
sed -i '/#hdmi_force_hotplug=/ c\hdmi_force_hotplug=${HDMI_FORCE_HOTPLUG}' $CONFIG
fi
if [ -n "${HDMI_DRIVE}" ]; then
sed -i '/#hdmi_drive=/ c\hdmi_drive=${HDMI_DRIVE}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
sed -i '/#hdmi_drive=/ c\hdmi_drive=${HDMI_DRIVE}' $CONFIG
fi
if [ -n "${HDMI_GROUP}" ]; then
sed -i '/#hdmi_group=/ c\hdmi_group=${HDMI_GROUP}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
sed -i '/#hdmi_group=/ c\hdmi_group=${HDMI_GROUP}' $CONFIG
fi
if [ -n "${HDMI_MODE}" ]; then
sed -i '/#hdmi_mode=/ c\hdmi_mode=${HDMI_MODE}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
sed -i '/#hdmi_mode=/ c\hdmi_mode=${HDMI_MODE}' $CONFIG
fi
if [ -n "${CONFIG_HDMI_BOOST}" ]; then
sed -i '/#config_hdmi_boost=/ c\config_hdmi_boost=${CONFIG_HDMI_BOOST}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
sed -i '/#config_hdmi_boost=/ c\config_hdmi_boost=${CONFIG_HDMI_BOOST}' $CONFIG
fi
if [ -n "${SDTV_MODE}" ]; then
sed -i '/#sdtv_mode=/ c\sdtv_mode=${SDTV_MODE}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
sed -i '/#sdtv_mode=/ c\sdtv_mode=${SDTV_MODE}' $CONFIG
fi
if [ -n "${SDTV_ASPECT}" ]; then
sed -i '/#sdtv_aspect=/ c\sdtv_aspect=${SDTV_ASPECT}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
sed -i '/#sdtv_aspect=/ c\sdtv_aspect=${SDTV_ASPECT}' $CONFIG
fi
if [ -n "${DISPLAY_ROTATE}" ]; then
sed -i '/#display_rotate=/ c\display_rotate=${DISPLAY_ROTATE}' ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
sed -i '/#display_rotate=/ c\display_rotate=${DISPLAY_ROTATE}' $CONFIG
fi
# Video camera support
if [ "${VIDEO_CAMERA}" = "1" ]; then
echo "# Enable video camera" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "start_x=1" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
# TODO: It has been observed that Raspberry Pi 4B 4GB may fail to enable the camera if "start_x=1" is at the end
# of the file. The underlying cause is unknown, but it can be related with a file size limitation affecting
# this variable. Therefore, "start_x=1" has been set to replace the original occurrence in config.txt,
# which is at the middle of the file.
sed -i '/#start_x=/ c\start_x=1' $CONFIG
fi
# Offline compositing support
if [ "${DISPMANX_OFFLINE}" = "1" ]; then
echo "# Enable offline compositing" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "dispmanx_offline=1" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "# Enable offline compositing" >>$CONFIG
echo "dispmanx_offline=1" >>$CONFIG
fi
# SPI bus support
if [ "${ENABLE_SPI_BUS}" = "1" ] || [ "${PITFT}" = "1" ]; then
echo "# Enable SPI bus" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "dtparam=spi=on" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "# Enable SPI bus" >>$CONFIG
echo "dtparam=spi=on" >>$CONFIG
fi
# I2C support
if [ "${ENABLE_I2C}" = "1" ] || [ "${PITFT}" = "1" ]; then
echo "# Enable I2C" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "dtparam=i2c1=on" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "dtparam=i2c_arm=on" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "# Enable I2C" >>$CONFIG
echo "dtparam=i2c1=on" >>$CONFIG
echo "dtparam=i2c_arm=on" >>$CONFIG
fi
# PiTFT22 display support
if [ "${PITFT22}" = "1" ]; then
echo "# Enable PITFT22 display" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "dtoverlay=pitft22,rotate=270,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "# Enable PITFT22 display" >>$CONFIG
echo "dtoverlay=pitft22,rotate=270,speed=32000000,txbuflen=32768" >>$CONFIG
fi
if [ "${PITFT28r}" = "1" ]; then
echo "# Enable PITFT28r display" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "dtoverlay=pitft28-resistive,rotate=90,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "# Enable PITFT28r display" >>$CONFIG
echo "dtoverlay=pitft28-resistive,rotate=90,speed=32000000,txbuflen=32768" >>$CONFIG
fi
if [ "${PITFT28c}" = "1" ]; then
echo "# Enable PITFT28c display" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "dtoverlay=pitft28-capacitive,rotate=90,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "dtoverlay=pitft28-capacitive,touch-swapxy,touch-invx" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "# Enable PITFT28c display" >>$CONFIG
echo "dtoverlay=pitft28-capacitive,rotate=90,speed=32000000,txbuflen=32768" >>$CONFIG
echo "dtoverlay=pitft28-capacitive,touch-swapxy,touch-invx" >>$CONFIG
fi
if [ "${PITFT35r}" = "1" ]; then
echo "# Enable PITFT35r display" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "dtoverlay=pitft35-resistive,rotate=90,speed=42000000,fps=20" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "# Enable PITFT35r display" >>$CONFIG
echo "dtoverlay=pitft35-resistive,rotate=90,speed=42000000,fps=20" >>$CONFIG
fi
# UART support
if [ "${ENABLE_UART}" = "1" ]; then
echo "# Enable UART" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "enable_uart=1" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "# Enable UART" >>$CONFIG
echo "enable_uart=1" >>$CONFIG
fi
# Infrared support
if [ "${ENABLE_IR}" = "1" ]; then
echo "# Enable infrared" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "dtoverlay=gpio-ir,gpio_pin=${GPIO_IR}" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "dtoverlay=gpio-ir-tx,gpio_pin=${GPIO_IR_TX}" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "# Enable infrared" >>$CONFIG
echo "dtoverlay=gpio-ir,gpio_pin=${GPIO_IR}" >>$CONFIG
echo "dtoverlay=gpio-ir-tx,gpio_pin=${GPIO_IR_TX}" >>$CONFIG
fi
# VC4 Graphics support
if [ "${VC4GRAPHICS}" = "1" ]; then
echo "# Enable VC4 Graphics" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "dtoverlay=${VC4DTBO}" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "# Enable VC4 Graphics" >> $CONFIG
echo "dtoverlay=${VC4DTBO}" >> $CONFIG
fi
# Choose Camera Sensor to be used, default imx219 sensor
if [ "${RASPBERRYPI_CAMERA_V2}" = "1" ]; then
echo "# Enable Sony RaspberryPi Camera" >> $CONFIG
echo "dtoverlay=imx219" >> $CONFIG
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}/${BOOTFILES_DIR_NAME}/config.txt
echo "max_usb_current=1" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "hdmi_group=2" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "hdmi_mode=87" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "hdmi_cvt 1024 600 60 6 0 0 0" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "hdmi_drive=1" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "# Waveshare \"C\" 1024x600 7\" Rev2.1 IPS capacitive touch screen" >> $CONFIG
echo "max_usb_current=1" >> $CONFIG
echo "hdmi_group=2" >> $CONFIG
echo "hdmi_mode=87" >> $CONFIG
echo "hdmi_cvt 1024 600 60 6 0 0 0" >> $CONFIG
echo "hdmi_drive=1" >> $CONFIG
fi
# DWC2 USB peripheral support
if [ "${ENABLE_DWC2_PERIPHERAL}" = "1" ]; then
echo "# Enable USB peripheral mode" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "dtoverlay=dwc2,dr_mode=peripheral" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "# Enable USB peripheral mode" >> $CONFIG
echo "dtoverlay=dwc2,dr_mode=peripheral" >> $CONFIG
fi
# DWC2 USB host mode support
if [ "${ENABLE_DWC2_HOST}" = "1" ]; then
echo "# Enable USB host mode" >> $CONFIG
echo "dtoverlay=dwc2,dr_mode=host" >> $CONFIG
fi
# AT86RF23X support
if [ "${ENABLE_AT86RF}" = "1" ]; then
echo "# Enable AT86RF23X" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "dtoverlay=at86rf233,speed=3000000" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "# Enable AT86RF23X" >>$CONFIG
echo "dtoverlay=at86rf233,speed=3000000" >>$CONFIG
fi
# ENABLE DUAL CAN
if [ "${ENABLE_DUAL_CAN}" = "1" ]; then
echo "# Enable DUAL CAN" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "dtoverlay=mcp2515-can0,oscillator=${CAN_OSCILLATOR},interrupt=25" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "dtoverlay=mcp2515-can1,oscillator=${CAN_OSCILLATOR},interrupt=24" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "# Enable DUAL CAN" >>$CONFIG
echo "dtoverlay=mcp2515-can0,oscillator=${CAN_OSCILLATOR},interrupt=25" >>$CONFIG
echo "dtoverlay=mcp2515-can1,oscillator=${CAN_OSCILLATOR},interrupt=24" >>$CONFIG
# ENABLE CAN
elif [ "${ENABLE_CAN}" = "1" ]; then
echo "# Enable CAN" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "dtoverlay=mcp2515-can0,oscillator=${CAN_OSCILLATOR},interrupt=25" >>${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "# Enable CAN" >>$CONFIG
echo "dtoverlay=mcp2515-can0,oscillator=${CAN_OSCILLATOR},interrupt=25" >>$CONFIG
fi
# Append extra config if the user has provided any
printf "${RPI_EXTRA_CONFIG}\n" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
printf "${RPI_EXTRA_CONFIG}\n" >> $CONFIG
# Handle setup with armstub file
if [ "${@bb.utils.contains("MACHINE_FEATURES", "armstub", "1", "0", d)}" = "1" ]; then
echo "\n# ARM stub configuration" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "armstub=${ARMSTUB}" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "\n# ARM stub configuration" >> $CONFIG
echo "armstub=${ARMSTUB}" >> $CONFIG
case "${ARMSTUB}" in
*-gic.bin)
echo "enable_gic=1" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "enable_gic=1" >> $CONFIG
;;
esac
fi
}
do_deploy_append_raspberrypi3-64() {
echo "# have a properly sized image" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "disable_overscan=1" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "# have a properly sized image" >> $CONFIG
echo "disable_overscan=1" >> $CONFIG
echo "# Enable audio (loads snd_bcm2835)" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "dtparam=audio=on" >> ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/config.txt
echo "# Enable audio (loads snd_bcm2835)" >> $CONFIG
echo "dtparam=audio=on" >> $CONFIG
}
addtask deploy before do_build after do_install

View File

@@ -1,9 +1,9 @@
RPIFW_DATE ?= "20201002"
SRCREV ?= "11e3c314bc2b64f7d862bac00ff3d9f42f3c5a50"
RPIFW_DATE ?= "20210225"
SRCREV ?= "5985247fb75681985547641d66196c77499f26b9"
RPIFW_SRC_URI ?= "https://github.com/raspberrypi/firmware/archive/${SRCREV}.tar.gz;downloadfilename=raspberrypi-firmware-${SRCREV}.tar.gz"
RPIFW_S ?= "${WORKDIR}/firmware-${SRCREV}"
SRC_URI = "${RPIFW_SRC_URI}"
SRC_URI[sha256sum] = "b8c9f5a3e987f418f11526cbf59f6a6c8103e8f5e94bccffb9ef3fd7ae834f98"
SRC_URI[sha256sum] = "3e2c00e1473bd70e808134925e1b25cd765789d9f0e0683749135b124d835000"
PV = "${RPIFW_DATE}"

View File

@@ -1,9 +1,9 @@
RPITOOLS_DATE ?= "20200803"
SRCREV ?= "0c39cb5b5ac9851312a38c54f5aea770d976de7a"
RPITOOLS_DATE ?= "20201008"
SRCREV ?= "fc0e73c13865450e95edd046200e42a6e52d8256"
RPITOOLS_SRC_URI ?= "https://github.com/raspberrypi/tools/archive/${SRCREV}.tar.gz;downloadfilename=raspberrypi-tools-${SRCREV}.tar.gz"
RPITOOLS_S ?= "${WORKDIR}/tools-${SRCREV}"
SRC_URI = "${RPITOOLS_SRC_URI}"
SRC_URI[sha256sum] = "ef56a891eef387d2278e6f9d20b462021faace14aceeb2048b5e5973069c25c0"
SRC_URI[sha256sum] = "05217b942150830225e8ee04a8f16b8ecc2ffbbe5dd815541b15333f783e805e"
PV = "${RPITOOLS_DATE}"

View File

@@ -13,10 +13,10 @@ 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
mkimage -A ${UBOOT_ARCH} -T script -C none -n "Boot script" -d "${WORKDIR}/boot.cmd" boot.scr
}
inherit deploy nopackages
inherit kernel-arch deploy nopackages
do_deploy() {
install -d ${DEPLOYDIR}

View File

@@ -17,7 +17,6 @@ RDEPENDS_${PN} = "\
rpi-gpio \
pi-blaster \
python3-rtimu \
python3-sense-hat \
connman \
connman-client \
wireless-regdb-static \

View File

@@ -0,0 +1,30 @@
SUMMARY = "CircuitPython APIs for non-CircuitPython versions of Python such as CPython on Linux and MicroPython."
HOMEPAGE = "https://github.com/adafruit/Adafruit_Blinka"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=660e614bc7efb0697cc793d8a22a55c2"
SRC_URI = "git://github.com/adafruit/Adafruit_Blinka.git;branch=main"
SRCREV = "dc688f354fe779c9267c208b99f310af87e79272"
S = "${WORKDIR}/git"
inherit setuptools3
DEPENDS += "python3-setuptools-scm-native"
do_install_append() {
# it ships ./bcm283x/pulseio/libgpiod_pulsein which is a prebuilt
# 32bit binary therefore we should make this specific to 32bit rpi machines (based on bcm283x) only
if [ ${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '1', '0', d)} = "0" ]; then
rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}/adafruit_blinka/microcontroller/bcm283x
fi
}
RDEPENDS_${PN} += " \
libgpiod \
python3-adafruit-platformdetect \
python3-adafruit-pureio \
python3-core \
"
RDEPENDS_${PN}_append_rpi = " rpi-gpio"

View File

@@ -0,0 +1,18 @@
SUMMARY = "CircuitPython bus device classes to manage bus sharing."
HOMEPAGE = "https://github.com/adafruit/Adafruit_CircuitPython_BusDevice"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=6ec69d6e9e6c85adfb7799d7f8cf044e"
SRC_URI = "git://github.com/adafruit/Adafruit_CircuitPython_BusDevice.git;branch=main"
SRCREV = "1bfe8005293205e2f7b2cc498ab5a946f1133b40"
S = "${WORKDIR}/git"
inherit setuptools3
DEPENDS += "python3-setuptools-scm-native"
RDEPENDS_${PN} += " \
python3-adafruit-blinka \
python3-core \
"

View File

@@ -0,0 +1,18 @@
SUMMARY = "CircuitPython helper library provides higher level objects to control motors and servos."
HOMEPAGE = "https://github.com/adafruit/Adafruit_CircuitPython_Motor"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=b72678307cc7c10910b5ef460216af07"
SRC_URI = "git://github.com/adafruit/Adafruit_CircuitPython_Motor.git;branch=main"
SRCREV = "2251bfc0501d0acfb96c0a43f4f2b4c6a10ca14e"
S = "${WORKDIR}/git"
inherit setuptools3
DEPENDS += "python3-setuptools-scm-native"
RDEPENDS_${PN} += " \
python3-adafruit-blinka \
python3-core \
"

View File

@@ -0,0 +1,22 @@
SUMMARY = "CircuitPython helper library for DC & Stepper Motor FeatherWing, Shield, and Pi Hat kits."
HOMEPAGE = "https://github.com/adafruit/Adafruit_CircuitPython_MotorKit"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=6ad4a8854b39ad474755ef1aea813bac"
SRC_URI = "git://github.com/adafruit/Adafruit_CircuitPython_MotorKit.git;branch=main"
SRCREV = "8c1462b4129b21f6db156d1517abb017bb74b982"
S = "${WORKDIR}/git"
inherit setuptools3
DEPENDS += "python3-setuptools-scm-native"
RDEPENDS_${PN} += " \
python3-adafruit-blinka \
python3-adafruit-circuitpython-busdevice \
python3-adafruit-circuitpython-motor \
python3-adafruit-circuitpython-pca9685 \
python3-adafruit-circuitpython-register \
python3-core \
"

View File

@@ -0,0 +1,20 @@
SUMMARY = "CircuitPython driver for motor, stepper, and servo based on PCA9685."
HOMEPAGE = "https://github.com/adafruit/Adafruit_CircuitPython_PCA9685"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e7eb6b599fb0cfb06485c64cd4242f62"
SRC_URI = "git://github.com/adafruit/Adafruit_CircuitPython_PCA9685.git;branch=main"
SRCREV = "2780c4102f4c23fbab252aa1198b61ba7e2d1b2c"
S = "${WORKDIR}/git"
inherit setuptools3
DEPENDS += "python3-setuptools-scm-native"
RDEPENDS_${PN} += " \
python3-adafruit-blinka \
python3-adafruit-circuitpython-busdevice \
python3-adafruit-circuitpython-register \
python3-core \
"

View File

@@ -0,0 +1,15 @@
SUMMARY = "CircuitPython data descriptor classes to represent hardware registers on I2C and SPI devices."
HOMEPAGE = "https://github.com/adafruit/Adafruit_CircuitPython_Register"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=6ec69d6e9e6c85adfb7799d7f8cf044e"
SRC_URI = "git://github.com/adafruit/Adafruit_CircuitPython_Register.git;branch=main"
S = "${WORKDIR}/git"
SRCREV = "5fee6e0c3878110844bc51e16063eeae7d94c457"
DEPENDS += "python3-setuptools-scm-native"
inherit setuptools3
RDEPENDS_${PN} += "python3-core"

View File

@@ -0,0 +1,15 @@
SUMMARY = "Platform detection for use by libraries like Adafruit-Blinka."
HOMEPAGE = "https://github.com/adafruit/Adafruit_Python_PlatformDetect"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=fccd531dce4b989c05173925f0bbb76c"
SRC_URI = "git://github.com/adafruit/Adafruit_Python_PlatformDetect.git;branch=main"
SRCREV = "e0fe1b012898fa824944d6805ca74be0fa027968"
S = "${WORKDIR}/git"
inherit setuptools3
DEPENDS += "python3-setuptools-scm-native"
RDEPENDS_${PN} += "python3-core"

View File

@@ -0,0 +1,19 @@
SUMMARY = "Pure python (i.e. no native extensions) access to Linux IO including I2C and SPI. Drop in replacement for smbus and spidev modules."
HOMEPAGE = "https://github.com/adafruit/Adafruit_Python_PureIO"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=2a21fcca821a506d4c36f7bbecc0d009"
SRC_URI = "git://github.com/adafruit/Adafruit_Python_PureIO.git;branch=main"
SRCREV = "f4d0973da05b8b21905ff6bab69cdb652128f342"
S = "${WORKDIR}/git"
inherit setuptools3
DEPENDS += "python3-setuptools-scm-native"
RDEPENDS_${PN} += " \
python3-core \
python3-ctypes \
python3-fcntl \
"

View File

@@ -0,0 +1,3 @@
# when using userland graphic KHR/khrplatform.h is provided by userland but virtual/libgl is provided by mesa-gl where
# we explicitly delete KHR/khrplatform.h since its already coming from userland package
DEPENDS_append_rpi = " ${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', 'userland', d)}"

View File

@@ -1,6 +1,8 @@
PACKAGECONFIG_append_rpi = " gbm"
PROVIDES_append_rpi = " virtual/libgbm"
DRIDRIVERS_append_rpi = ",swrast"
do_install_append_rpi() {
rm -rf ${D}${includedir}/KHR/khrplatform.h
}

View File

@@ -0,0 +1,24 @@
From 070b114fd54b6ad38b4eff04279fe89ccaaef61b Mon Sep 17 00:00:00 2001
From: Trevor Woerner <twoerner@gmail.com>
Date: Fri, 4 Dec 2020 01:39:30 -0500
Subject: [PATCH] gitignore: add archives from lib directory
The build creates two *.a files in the lib directory, add these to .gitignore.
Upstream-status: submitted [https://github.com/AndrewFromMelbourne/raspidmx/pull/29]
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index 633f325..4a1ca0c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,5 +21,6 @@ test_pattern/test_pattern
worms/worms
# other directories
+lib/*.a
*_/

View File

@@ -0,0 +1,214 @@
From 3b60fa1598385fb36fef1c47f59cb08d3a6fba35 Mon Sep 17 00:00:00 2001
From: Trevor Woerner <twoerner@gmail.com>
Date: Fri, 4 Dec 2020 01:54:37 -0500
Subject: [PATCH] add "install" targets to Makefiles
Upstream-status: submitted [https://github.com/AndrewFromMelbourne/raspidmx/pull/29]
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
Makefile | 3 +++
game/Makefile | 4 ++++
lib/Makefile | 1 +
life/Makefile | 4 ++++
mandelbrot/Makefile | 4 ++++
offscreen/Makefile | 4 ++++
pngview/Makefile | 4 ++++
radar_sweep/Makefile | 4 ++++
radar_sweep_alpha/Makefile | 4 ++++
rgb_triangle/Makefile | 4 ++++
spriteview/Makefile | 4 ++++
test_pattern/Makefile | 4 ++++
worms/Makefile | 4 ++++
13 files changed, 48 insertions(+)
diff --git a/Makefile b/Makefile
index 4e14e18..4a06de9 100644
--- a/Makefile
+++ b/Makefile
@@ -16,6 +16,9 @@ default :all
all:
for target in $(TARGETS); do ($(MAKE) -C $$target); done
+install:
+ for target in $(TARGETS); do ($(MAKE) -C $$target install); done
+
clean:
for target in $(TARGETS); do ($(MAKE) -C $$target clean); done
diff --git a/game/Makefile b/game/Makefile
index ced9cce..6da6a6d 100644
--- a/game/Makefile
+++ b/game/Makefile
@@ -15,6 +15,10 @@ all: $(BIN)
$(BIN): $(OBJS)
$(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -Wl,--no-whole-archive -rdynamic
+install: $(BIN)
+ install -d $(DESTDIR)/usr/bin
+ install -m 0755 $(BIN) $(DESTDIR)/usr/bin
+
clean:
@rm -f $(OBJS)
@rm -f $(BIN)
diff --git a/lib/Makefile b/lib/Makefile
index 15d7c37..2765c91 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -29,6 +29,7 @@ $(LIB): $(OBJS)
$(LIBPNG): $(OBJSPNG)
$(AR) rcs lib$(LIBPNG).a $(OBJSPNG)
+install:
clean:
@rm -f $(OBJS)
diff --git a/life/Makefile b/life/Makefile
index 2fcb034..44f1edb 100644
--- a/life/Makefile
+++ b/life/Makefile
@@ -15,6 +15,10 @@ all: $(BIN)
$(BIN): $(OBJS)
$(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -pthread -Wl,--no-whole-archive -rdynamic
+install: $(BIN)
+ install -d $(DESTDIR)/usr/bin
+ install -m 0755 $(BIN) $(DESTDIR)/usr/bin
+
clean:
@rm -f $(OBJS)
@rm -f $(BIN)
diff --git a/mandelbrot/Makefile b/mandelbrot/Makefile
index e61beb3..a6e6735 100644
--- a/mandelbrot/Makefile
+++ b/mandelbrot/Makefile
@@ -15,6 +15,10 @@ all: $(BIN)
$(BIN): $(OBJS)
$(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -pthread -Wl,--no-whole-archive -rdynamic
+install: $(BIN)
+ install -d $(DESTDIR)/usr/bin
+ install -m 0755 $(BIN) $(DESTDIR)/usr/bin
+
clean:
@rm -f $(OBJS)
@rm -f $(BIN)
diff --git a/offscreen/Makefile b/offscreen/Makefile
index 2bc81b9..8d23354 100644
--- a/offscreen/Makefile
+++ b/offscreen/Makefile
@@ -15,6 +15,10 @@ all: $(BIN)
$(BIN): $(OBJS)
$(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -Wl,--no-whole-archive -rdynamic
+install: $(BIN)
+ install -d $(DESTDIR)/usr/bin
+ install -m 0755 $(BIN) $(DESTDIR)/usr/bin
+
clean:
@rm -f $(OBJS)
@rm -f $(BIN)
diff --git a/pngview/Makefile b/pngview/Makefile
index f947320..8c037ec 100644
--- a/pngview/Makefile
+++ b/pngview/Makefile
@@ -15,6 +15,10 @@ all: $(BIN)
$(BIN): $(OBJS)
$(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -Wl,--no-whole-archive -rdynamic
+install: $(BIN)
+ install -d $(DESTDIR)/usr/bin
+ install -m 0755 $(BIN) $(DESTDIR)/usr/bin
+
clean:
@rm -f $(OBJS)
@rm -f $(BIN)
diff --git a/radar_sweep/Makefile b/radar_sweep/Makefile
index 3a46150..5f814b7 100644
--- a/radar_sweep/Makefile
+++ b/radar_sweep/Makefile
@@ -15,6 +15,10 @@ all: $(BIN)
$(BIN): $(OBJS)
$(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -Wl,--no-whole-archive -rdynamic
+install: $(BIN)
+ install -d $(DESTDIR)/usr/bin
+ install -m 0755 $(BIN) $(DESTDIR)/usr/bin
+
clean:
@rm -f $(OBJS)
@rm -f $(BIN)
diff --git a/radar_sweep_alpha/Makefile b/radar_sweep_alpha/Makefile
index 5680b9b..f66c338 100644
--- a/radar_sweep_alpha/Makefile
+++ b/radar_sweep_alpha/Makefile
@@ -15,6 +15,10 @@ all: $(BIN)
$(BIN): $(OBJS)
$(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -Wl,--no-whole-archive -rdynamic
+install: $(BIN)
+ install -d $(DESTDIR)/usr/bin
+ install -m 0755 $(BIN) $(DESTDIR)/usr/bin
+
clean:
@rm -f $(OBJS)
@rm -f $(BIN)
diff --git a/rgb_triangle/Makefile b/rgb_triangle/Makefile
index 2017956..2ce779d 100644
--- a/rgb_triangle/Makefile
+++ b/rgb_triangle/Makefile
@@ -15,6 +15,10 @@ all: $(BIN)
$(BIN): $(OBJS)
$(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -Wl,--no-whole-archive -rdynamic
+install: $(BIN)
+ install -d $(DESTDIR)/usr/bin
+ install -m 0755 $(BIN) $(DESTDIR)/usr/bin
+
clean:
@rm -f $(OBJS)
@rm -f $(BIN)
diff --git a/spriteview/Makefile b/spriteview/Makefile
index 2713936..ada9277 100644
--- a/spriteview/Makefile
+++ b/spriteview/Makefile
@@ -15,6 +15,10 @@ all: $(BIN)
$(BIN): $(OBJS)
$(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -Wl,--no-whole-archive -rdynamic
+install: $(BIN)
+ install -d $(DESTDIR)/usr/bin
+ install -m 0755 $(BIN) $(DESTDIR)/usr/bin
+
clean:
@rm -f $(OBJS)
@rm -f $(BIN)
diff --git a/test_pattern/Makefile b/test_pattern/Makefile
index be434d9..1e02b0a 100644
--- a/test_pattern/Makefile
+++ b/test_pattern/Makefile
@@ -15,6 +15,10 @@ all: $(BIN)
$(BIN): $(OBJS)
$(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -Wl,--no-whole-archive -rdynamic
+install: $(BIN)
+ install -d $(DESTDIR)/usr/bin
+ install -m 0755 $(BIN) $(DESTDIR)/usr/bin
+
clean:
@rm -f $(OBJS)
@rm -f $(BIN)
diff --git a/worms/Makefile b/worms/Makefile
index 2a21a4b..c249c8c 100644
--- a/worms/Makefile
+++ b/worms/Makefile
@@ -15,6 +15,10 @@ all: $(BIN)
$(BIN): $(OBJS)
$(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -Wl,--no-whole-archive -rdynamic
+install: $(BIN)
+ install -d $(DESTDIR)/usr/bin
+ install -m 0755 $(BIN) $(DESTDIR)/usr/bin
+
clean:
@rm -f $(OBJS)
@rm -f $(BIN)

View File

@@ -0,0 +1,114 @@
From 314fbde187e9187b1b3e18e50dd937c070e93633 Mon Sep 17 00:00:00 2001
From: Trevor Woerner <twoerner@gmail.com>
Date: Fri, 4 Dec 2020 01:58:59 -0500
Subject: [PATCH] switch to "pkg-config"
I get a build error saying:
ERROR: /usr/bin/libpng16-config should not be used, use an alternative such as pkg-config
Therefore switch to the more common and more generic "pkg-config" instead of
using a libpng-specific tool for flags and libraries.
Upstream-status: submitted [https://github.com/AndrewFromMelbourne/raspidmx/pull/29]
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
game/Makefile | 4 ++--
lib/Makefile | 4 ++--
mandelbrot/Makefile | 4 ++--
offscreen/Makefile | 4 ++--
pngview/Makefile | 4 ++--
spriteview/Makefile | 4 ++--
6 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/game/Makefile b/game/Makefile
index 6da6a6d..0a90a38 100644
--- a/game/Makefile
+++ b/game/Makefile
@@ -1,8 +1,8 @@
OBJS=main.o
BIN=game
-CFLAGS+=-Wall -g -O3 -I../common $(shell libpng-config --cflags)
-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell libpng-config --ldflags) -L../lib -lraspidmx -lraspidmxPng
+CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
+LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
diff --git a/lib/Makefile b/lib/Makefile
index 2765c91..1e8c759 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -11,9 +11,9 @@ OBJS=../common/backgroundLayer.o ../common/imageGraphics.o ../common/key.o \
OBJSPNG=../common/spriteLayer.o ../common/loadpng.o ../common/savepng.o ../common/scrollingLayer.o
-CFLAGS+=-Wall -g -O3 -I../common $(shell libpng-config --cflags)
+CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm
-LDFLAGSPNG=${LDFLAGS} $(shell libpng-config --ldflags)
+LDFLAGSPNG=${LDFLAGS} $(shell pkg-config --libs libpng)
INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
diff --git a/mandelbrot/Makefile b/mandelbrot/Makefile
index a6e6735..82910bb 100644
--- a/mandelbrot/Makefile
+++ b/mandelbrot/Makefile
@@ -1,8 +1,8 @@
OBJS=main.o mandelbrot.o info.o
BIN=mandelbrot
-CFLAGS+=-Wall -g -O3 -I../common $(shell libpng-config --cflags)
-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell libpng-config --ldflags) -L../lib -lraspidmx -lraspidmxPng
+CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
+LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
diff --git a/offscreen/Makefile b/offscreen/Makefile
index 8d23354..0120796 100644
--- a/offscreen/Makefile
+++ b/offscreen/Makefile
@@ -1,8 +1,8 @@
OBJS=pngresize.o resizeDispmanX.o
BIN=pngresize
-CFLAGS+=-Wall -g -O3 -I../common $(shell libpng-config --cflags)
-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell libpng-config --ldflags) -L../lib -lraspidmx -lraspidmxPng
+CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
+LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
diff --git a/pngview/Makefile b/pngview/Makefile
index 8c037ec..71a5d76 100644
--- a/pngview/Makefile
+++ b/pngview/Makefile
@@ -1,8 +1,8 @@
OBJS=pngview.o
BIN=pngview
-CFLAGS+=-Wall -g -O3 -I../common $(shell libpng-config --cflags)
-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell libpng-config --ldflags) -L../lib -lraspidmx -lraspidmxPng
+CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
+LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
diff --git a/spriteview/Makefile b/spriteview/Makefile
index ada9277..904c1e8 100644
--- a/spriteview/Makefile
+++ b/spriteview/Makefile
@@ -1,8 +1,8 @@
OBJS=spriteview.o
BIN=spriteview
-CFLAGS+=-Wall -g -O3 -I../common $(shell libpng-config --cflags)
-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell libpng-config --ldflags) -L../lib -lraspidmx -lraspidmxPng
+CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
+LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux

View File

@@ -0,0 +1,170 @@
From bde71fc22bde61ef8fe319c60f478ec370f5bc5d Mon Sep 17 00:00:00 2001
From: Trevor Woerner <twoerner@gmail.com>
Date: Fri, 4 Dec 2020 02:13:39 -0500
Subject: [PATCH] add libvchostif to link
I end up with link errors of the type:
libvchostif.so: error adding symbols: DSO missing from command line
Which is caused by not having -lvchostif in the link.
Upstream-status: submitted [https://github.com/AndrewFromMelbourne/raspidmx/pull/29]
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
game/Makefile | 2 +-
life/Makefile | 2 +-
mandelbrot/Makefile | 2 +-
offscreen/Makefile | 2 +-
pngview/Makefile | 2 +-
radar_sweep/Makefile | 2 +-
radar_sweep_alpha/Makefile | 2 +-
rgb_triangle/Makefile | 2 +-
spriteview/Makefile | 2 +-
test_pattern/Makefile | 2 +-
worms/Makefile | 2 +-
11 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/game/Makefile b/game/Makefile
index 0a90a38..b756fa2 100644
--- a/game/Makefile
+++ b/game/Makefile
@@ -2,7 +2,7 @@ OBJS=main.o
BIN=game
CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
+LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
diff --git a/life/Makefile b/life/Makefile
index 44f1edb..2addf69 100644
--- a/life/Makefile
+++ b/life/Makefile
@@ -2,7 +2,7 @@ OBJS=main.o life.o info.o
BIN=life
CFLAGS+=-Wall -g -O3 -I../common
-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -L../lib -lraspidmx
+LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -L../lib -lraspidmx
INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
diff --git a/mandelbrot/Makefile b/mandelbrot/Makefile
index 82910bb..31097f2 100644
--- a/mandelbrot/Makefile
+++ b/mandelbrot/Makefile
@@ -2,7 +2,7 @@ OBJS=main.o mandelbrot.o info.o
BIN=mandelbrot
CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
+LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
diff --git a/offscreen/Makefile b/offscreen/Makefile
index 0120796..4f13fd0 100644
--- a/offscreen/Makefile
+++ b/offscreen/Makefile
@@ -2,7 +2,7 @@ OBJS=pngresize.o resizeDispmanX.o
BIN=pngresize
CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
+LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
diff --git a/pngview/Makefile b/pngview/Makefile
index 71a5d76..cce8d63 100644
--- a/pngview/Makefile
+++ b/pngview/Makefile
@@ -2,7 +2,7 @@ OBJS=pngview.o
BIN=pngview
CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
+LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
diff --git a/radar_sweep/Makefile b/radar_sweep/Makefile
index 5f814b7..aa1d32c 100644
--- a/radar_sweep/Makefile
+++ b/radar_sweep/Makefile
@@ -2,7 +2,7 @@ OBJS=radar_sweep.o
BIN=radar_sweep
CFLAGS+=-Wall -O3 -g -I../common
-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm -L../lib -lraspidmx
+LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx
INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
diff --git a/radar_sweep_alpha/Makefile b/radar_sweep_alpha/Makefile
index f66c338..571d47b 100644
--- a/radar_sweep_alpha/Makefile
+++ b/radar_sweep_alpha/Makefile
@@ -2,7 +2,7 @@ OBJS=radar_sweep_alpha.o
BIN=radar_sweep_alpha
CFLAGS+=-Wall -O3 -g -I../common
-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm -L../lib -lraspidmx
+LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx
INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
diff --git a/rgb_triangle/Makefile b/rgb_triangle/Makefile
index 2ce779d..0266715 100644
--- a/rgb_triangle/Makefile
+++ b/rgb_triangle/Makefile
@@ -2,7 +2,7 @@ OBJS=rgb_triangle.o
BIN=rgb_triangle
CFLAGS+=-Wall -O3 -g -I../common
-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm -L../lib -lraspidmx
+LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx
INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
diff --git a/spriteview/Makefile b/spriteview/Makefile
index 904c1e8..d2fb3c8 100644
--- a/spriteview/Makefile
+++ b/spriteview/Makefile
@@ -2,7 +2,7 @@ OBJS=spriteview.o
BIN=spriteview
CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
+LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
diff --git a/test_pattern/Makefile b/test_pattern/Makefile
index 1e02b0a..c231fb6 100644
--- a/test_pattern/Makefile
+++ b/test_pattern/Makefile
@@ -2,7 +2,7 @@ OBJS=test_pattern.o
BIN=test_pattern
CFLAGS+=-Wall -g -O3 -I../common
-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm -L../lib -lraspidmx
+LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx
INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
diff --git a/worms/Makefile b/worms/Makefile
index c249c8c..3b6c830 100644
--- a/worms/Makefile
+++ b/worms/Makefile
@@ -2,7 +2,7 @@ OBJS=main.o worms.o
BIN=worms
CFLAGS+=-Wall -g -O3 -I../common
-LDFLAGS+=-L/opt/vc/lib/ -lbcm_host -lm -L../lib -lraspidmx
+LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx
INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux

View File

@@ -0,0 +1,87 @@
From 07e7b727b7df7fc5bf0e1f296ba136e0653202ea Mon Sep 17 00:00:00 2001
From: Trevor Woerner <twoerner@gmail.com>
Date: Fri, 4 Dec 2020 03:25:08 -0500
Subject: [PATCH] change library linking order
Since -lraspidmxPng requires the png library (libpng), re-arrange the order of
linking so that it succeeds. Otherwise I get errors like the following:
undefined reference to `png_create_write_struct'
...as well as undefined references to various other libpng objects.
Upstream-status: submitted [https://github.com/AndrewFromMelbourne/raspidmx/pull/29]
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
game/Makefile | 2 +-
mandelbrot/Makefile | 2 +-
offscreen/Makefile | 2 +-
pngview/Makefile | 2 +-
spriteview/Makefile | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/game/Makefile b/game/Makefile
index b756fa2..f33916d 100644
--- a/game/Makefile
+++ b/game/Makefile
@@ -2,7 +2,7 @@ OBJS=main.o
BIN=game
CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
-LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
+LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx -lraspidmxPng $(shell pkg-config --libs libpng)
INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
diff --git a/mandelbrot/Makefile b/mandelbrot/Makefile
index 31097f2..08d1113 100644
--- a/mandelbrot/Makefile
+++ b/mandelbrot/Makefile
@@ -2,7 +2,7 @@ OBJS=main.o mandelbrot.o info.o
BIN=mandelbrot
CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
-LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
+LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx -lraspidmxPng $(shell pkg-config --libs libpng)
INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
diff --git a/offscreen/Makefile b/offscreen/Makefile
index 4f13fd0..49fc744 100644
--- a/offscreen/Makefile
+++ b/offscreen/Makefile
@@ -2,7 +2,7 @@ OBJS=pngresize.o resizeDispmanX.o
BIN=pngresize
CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
-LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
+LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx -lraspidmxPng $(shell pkg-config --libs libpng)
INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
diff --git a/pngview/Makefile b/pngview/Makefile
index cce8d63..bd6c154 100644
--- a/pngview/Makefile
+++ b/pngview/Makefile
@@ -2,7 +2,7 @@ OBJS=pngview.o
BIN=pngview
CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
-LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
+LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx -lraspidmxPng $(shell pkg-config --libs libpng)
INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux
diff --git a/spriteview/Makefile b/spriteview/Makefile
index d2fb3c8..89d9e01 100644
--- a/spriteview/Makefile
+++ b/spriteview/Makefile
@@ -2,7 +2,7 @@ OBJS=spriteview.o
BIN=spriteview
CFLAGS+=-Wall -g -O3 -I../common $(shell pkg-config --cflags libpng)
-LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm $(shell pkg-config --libs libpng) -L../lib -lraspidmx -lraspidmxPng
+LDFLAGS+=-L/opt/vc/lib/ -lvchostif -lbcm_host -lm -L../lib -lraspidmx -lraspidmxPng $(shell pkg-config --libs libpng)
INCLUDES+=-I/opt/vc/include/ -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux

View File

@@ -0,0 +1,24 @@
From 1868a111450be0053ab124df501cfcb7542f5e77 Mon Sep 17 00:00:00 2001
From: Trevor Woerner <twoerner@gmail.com>
Date: Fri, 4 Dec 2020 03:47:17 -0500
Subject: [PATCH] game/Makefile: install sample png files
Upstream-status: submitted [https://github.com/AndrewFromMelbourne/raspidmx/pull/29]
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
game/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/game/Makefile b/game/Makefile
index f33916d..d007972 100644
--- a/game/Makefile
+++ b/game/Makefile
@@ -18,6 +18,8 @@ $(BIN): $(OBJS)
install: $(BIN)
install -d $(DESTDIR)/usr/bin
install -m 0755 $(BIN) $(DESTDIR)/usr/bin
+ install -d $(DESTDIR)/usr/share/raspidmx
+ install -m 444 spotlight.png sprite.png texture.png $(DESTDIR)/usr/share/raspidmx
clean:
@rm -f $(OBJS)

View File

@@ -0,0 +1,57 @@
From f195ffffb133c9cda88d5eac41c0f584fd4540c9 Mon Sep 17 00:00:00 2001
From: Trevor Woerner <twoerner@gmail.com>
Date: Fri, 4 Dec 2020 03:48:36 -0500
Subject: [PATCH] Makefile: reorganize
Reorganize the main Makefile in order to:
1. be able to build in parallel
2. have build failures in subdirectories stop the build
Now the "-j <#threads>" option can be used with 'make'.
Also, if a build failure occurs in a subdirectory, this new arrangement will
cause the build to stop and fail instead of silently ignoring it.
To build simply invoke 'make' with or without a -j option.
To install simply invoke: make TARGET=install
To clean simply invoke: make TARGET=clean
Upstream-status: submitted [https://github.com/AndrewFromMelbourne/raspidmx/pull/29]
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
Makefile | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/Makefile b/Makefile
index 4a06de9..1f9f7c4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,4 @@
-TARGETS=lib \
- life \
+TARGETS=life \
mandelbrot \
offscreen \
pngview \
@@ -10,15 +9,11 @@ TARGETS=lib \
spriteview \
test_pattern \
worms
+.PHONY: all lib install clean $(TARGETS)
-default :all
-
-all:
- for target in $(TARGETS); do ($(MAKE) -C $$target); done
-
-install:
- for target in $(TARGETS); do ($(MAKE) -C $$target install); done
-
-clean:
- for target in $(TARGETS); do ($(MAKE) -C $$target clean); done
+all: $(TARGETS)
+$(TARGETS): lib
+ $(MAKE) -C $@ $(TARGET)
+lib:
+ $(MAKE) -C $@ $(TARGET)

View File

@@ -0,0 +1,31 @@
SUMMARY = "Some examples using the DispmanX API on the Raspberry Pi"
HOMEPAGE = "https://github.com/AndrewFromMelbourne/raspidmx"
SECTION = "graphics"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=52962875ab02c36df6cde47b1f463024"
COMPATIBLE_HOST = "null"
COMPATIBLE_HOST_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', 'null', '(.*)', d)}"
SRC_URI = "git://github.com/AndrewFromMelbourne/raspidmx;protocol=https \
file://0001-gitignore-add-archives-from-lib-directory.patch \
file://0002-add-install-targets-to-Makefiles.patch \
file://0003-switch-to-pkg-config.patch \
file://0004-add-libvchostif-to-link.patch \
file://0005-change-library-linking-order.patch \
file://0006-game-Makefile-install-sample-png-files.patch \
file://0007-Makefile-reorganize.patch \
"
PV = "0.0+git${SRCPV}"
SRCREV = "e2ee6faa0d01a5ece06bcc74a47f37d7e6837310"
S = "${WORKDIR}/git"
inherit pkgconfig
DEPENDS += "libpng userland"
do_install () {
oe_runmake 'DESTDIR=${D}' 'TARGET=install'
}

View File

@@ -1,7 +1,7 @@
From d0956d198ceaf611314d61a0835fb5924b8a3577 Mon Sep 17 00:00:00 2001
From 8a734f44beea9b10548ba696eaea1f5a76148fd5 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/21] Allow applications to set next resource handle
Subject: [PATCH] Allow applications to set next resource handle
This patch adds provisions in userland to
let apps callers set the next rendereing dispmanx resource.
@@ -203,6 +203,3 @@ index 8a5734c..51b3580 100644
FN(void, eglIntSelectMipmap_impl, (EGL_SURFACE_ID_T s, int level))
FN(void, eglIntGetColorData_impl, (EGL_SURFACE_ID_T s, KHRN_IMAGE_FORMAT_T format, uint32_t width, uint32_t height, int32_t stride, uint32_t y_offset, void *data))
--
2.27.0

View File

@@ -1,7 +1,7 @@
From 75eb8ab4bec3e462607214d2e14c9f2eef73435f Mon Sep 17 00:00:00 2001
From 3c1566e9c3b356cfcd8327fed0e537ed978c8e78 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/21] wayland: Add support for the Wayland winsys
Subject: [PATCH] wayland: Add support for the Wayland winsys
* Adds EGL_WL_bind_wayland_display extension
* Adds wayland-egl library
@@ -43,13 +43,13 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
.../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/CMakeLists.txt | 13 +-
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(-)
30 files changed, 1253 insertions(+), 95 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
@@ -1551,7 +1551,7 @@ index 0000000..8bafc15
+Libs: -L${libdir} -lwayland-egl
+Cflags: -I${includedir}
diff --git a/interface/vmcs_host/CMakeLists.txt b/interface/vmcs_host/CMakeLists.txt
index 4a914a7..c202204 100755
index cbef80c..552312a 100755
--- a/interface/vmcs_host/CMakeLists.txt
+++ b/interface/vmcs_host/CMakeLists.txt
@@ -7,13 +7,24 @@
@@ -1559,15 +1559,11 @@ index 4a914a7..c202204 100755
add_definitions(-fno-strict-aliasing)
-add_library(vchostif
- ${VMCS_TARGET}/vcfilesys.c ${VMCS_TARGET}/vcmisc.c
- vc_vchi_gencmd.c vc_vchi_filesys.c vc_vchi_gpuserv.c
- vc_vchi_tvservice.c vc_vchi_cecservice.c
- vc_vchi_dispmanx.c vc_service_common.c)
+set(VCHOSTIF_SOURCE
+ ${VMCS_TARGET}/vcfilesys.c ${VMCS_TARGET}/vcmisc.c
+ vc_vchi_gencmd.c vc_vchi_filesys.c vc_vchi_gpuserv.c
+ vc_vchi_tvservice.c vc_vchi_cecservice.c
+ vc_vchi_dispmanx.c vc_service_common.c)
${VMCS_TARGET}/vcmisc.c
vc_vchi_gencmd.c vc_vchi_gpuserv.c
vc_vchi_tvservice.c vc_vchi_cecservice.c
vc_vchi_dispmanx.c vc_service_common.c)
# ${VMCS_TARGET}/vmcs_main.c
# vc_vchi_haud.c
+
@@ -1893,6 +1889,3 @@ index 0000000..ad90d30
+ list(APPEND ${_sources} "${_server_header}")
+ set(${_sources} ${${_sources}} PARENT_SCOPE)
+endfunction()
--
2.27.0

View File

@@ -1,7 +1,7 @@
From 3b568db9460c0359e8bda8256aa2161e5aafe07c Mon Sep 17 00:00:00 2001
From 03053b119a625a03e28a86be0f0ab2aa9e2a6a49 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/21] wayland: Add Wayland example
Subject: [PATCH] wayland: Add Wayland example
---
.../linux/apps/hello_pi/CMakeLists.txt | 1 +
@@ -861,6 +861,3 @@ index 0000000..1a7bfc4
+
+ ret = wl_display_dispatch(state.wl_display);
+ }
+
+ exit_func(&state);
+

View File

@@ -1,7 +1,7 @@
From 3ce83fc1d4974d4db15ff72b4e856a29c60dbb83 Mon Sep 17 00:00:00 2001
From 73e338f99f89bc85fe384759a385d95e904adb7f 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/21] wayland-egl: Add bcm_host to dependencies
Subject: [PATCH] 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
@@ -23,6 +23,3 @@ index 8bafc15..fd259c9 100644
+Requires: bcm_host
Libs: -L${libdir} -lwayland-egl
Cflags: -I${includedir}
--
2.27.0

View File

@@ -1,8 +1,8 @@
From cf4d2dba7150aad7f85eb7f5df0b0cfa9389da57 Mon Sep 17 00:00:00 2001
From 8e79662e7b396325bee3f310a9406c74110cc7f4 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/21] interface: remove faulty assert() to make weston happy
at runtime
Subject: [PATCH] interface: remove faulty assert() to make weston happy at
runtime
This was removed after a discussion on IRC with the weston guys
('daniels' on irc.freenode.net/#wayland).
@@ -24,6 +24,3 @@ index eab146e..29e0dee 100755
dispmanx_client.update_callback(handle, dispmanx_client.update_callback_param);
}
} else {
--
2.27.0

View File

@@ -1,7 +1,7 @@
From ce90048cb25a0c2c49c585ce3a4cd8c73a8ff55b Mon Sep 17 00:00:00 2001
From 22652fec1206eb6e5b3c05e2c4933feffce922e8 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/21] zero-out wl buffers in egl_surface_free
Subject: [PATCH] zero-out wl buffers in egl_surface_free
origins from buildroot
@@ -28,6 +28,3 @@ index 42350bf..1f923d9 100644
}
#endif
}
--
2.27.0

View File

@@ -1,7 +1,7 @@
From 7f7e5b87104134b6710985c5f1c5936a59cccc98 Mon Sep 17 00:00:00 2001
From 5c0fb637f8b1286da19b904c7be1692a4aa61244 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/21] initialize front back wayland buffers
Subject: [PATCH] initialize front back wayland buffers
origins from metrological wayland support
@@ -29,6 +29,3 @@ index 1f923d9..9a9582c 100644
resource = DISPMANX_NO_HANDLE;
}
#endif
--
2.27.0

View File

@@ -1,7 +1,7 @@
From 2291cf20017c297e6ed3afd56945cf8768c9901e Mon Sep 17 00:00:00 2001
From 18839d288b60aa3592ba5a3ac4ac44eb8328a793 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/21] Remove RPC_FLUSH
Subject: [PATCH] Remove RPC_FLUSH
Origins from buildroot
@@ -22,6 +22,3 @@ index f9b7287..b04ffef 100644
#if EGL_BRCM_global_image
}
#endif
--
2.27.0

View File

@@ -1,7 +1,7 @@
From 736f489743b4a761afc928cbac197b28b3209bf1 Mon Sep 17 00:00:00 2001
From f324e2724973aa76d054c3662d5d0903fd405390 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/21] fix cmake dependency race
Subject: [PATCH] fix cmake dependency race
Fixes errors like
@@ -42,7 +42,7 @@ index 1d81ca3..d6cd415 100644
add_library (vcos SHARED ${SOURCES})
target_link_libraries (vcos pthread dl rt)
diff --git a/interface/vmcs_host/CMakeLists.txt b/interface/vmcs_host/CMakeLists.txt
index c202204..16d3184 100755
index 552312a..775742d 100755
--- a/interface/vmcs_host/CMakeLists.txt
+++ b/interface/vmcs_host/CMakeLists.txt
@@ -15,14 +15,6 @@ set(VCHOSTIF_SOURCE
@@ -73,6 +73,3 @@ index f0bae30..8c44c58 100644
struct wl_dispmanx_server_buffer {
struct wl_resource *resource;
struct wl_dispmanx *dispmanx;
--
2.27.0

View File

@@ -1,7 +1,7 @@
From 450341ccd98801be1c3dc648e18211177f81a60d Mon Sep 17 00:00:00 2001
From 09de2ce12ed8a879cc822cd20c5f2756d030808a 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/21] Fix for framerate with nested composition
Subject: [PATCH] Fix for framerate with nested composition
frame rate appears irregular and lower than expected when using nested composition.
@@ -55,6 +55,3 @@ index 03fe67b..13a110c 100644
#ifdef ANDROID
CLIENT_UNLOCK();
--
2.27.0

View File

@@ -1,7 +1,7 @@
From 13f2a4d1c6b6e79389ac3aa64512d78882a11b2f Mon Sep 17 00:00:00 2001
From 140df8cbf93fc3295f57bffeb254adeb0b17d3a0 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/21] build shared library for vchostif
Subject: [PATCH] build shared library for vchostif
Fixes #149
@@ -11,7 +11,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/interface/vmcs_host/CMakeLists.txt b/interface/vmcs_host/CMakeLists.txt
index 16d3184..e54f046 100755
index 775742d..76813c9 100755
--- a/interface/vmcs_host/CMakeLists.txt
+++ b/interface/vmcs_host/CMakeLists.txt
@@ -15,7 +15,7 @@ set(VCHOSTIF_SOURCE
@@ -23,6 +23,3 @@ index 16d3184..e54f046 100755
#add_library(bufman vc_vchi_bufman.c )
set(INSTALL_TARGETS vchostif)
--
2.27.0

View File

@@ -1,7 +1,7 @@
From a09feea5ceb0af717c17a3a7df8a638f8e858f52 Mon Sep 17 00:00:00 2001
From bdb5bbe994b91a7c64ca6103fbf2bbd590e6b8e5 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/21] implement buffer wrapping interface for dispmanx
Subject: [PATCH] implement buffer wrapping interface for dispmanx
Courtesy: Zan Dobersek
@@ -87,6 +87,3 @@ index c18626d..11ed1ef 100644
</interface>
</protocol>
--
2.27.0

View File

@@ -1,7 +1,7 @@
From dd8017ebccfa9c439a4e8dd501872e2052016f10 Mon Sep 17 00:00:00 2001
From ffdcdf7605f4f266b408cf161e7c76dab54d689b 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/21] Implement triple buffering for wayland
Subject: [PATCH] Implement triple buffering for wayland
Change from double to triple buffering for wayland.
This enables higher frame rates without tearing artifacts
@@ -85,6 +85,3 @@ index e328b77..58a3184 100644
/*
back_wl_buffer
--
2.27.0

View File

@@ -1,7 +1,7 @@
From afe3917b1a236c08b1ed01053e3da9ab283db1ec Mon Sep 17 00:00:00 2001
From 4624c934d1a783968306e61ded4389c153e3d009 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 14/21] GLES2/gl2ext.h: Define GL_R8_EXT and GL_RG8_EXT
Subject: [PATCH] GLES2/gl2ext.h: Define GL_R8_EXT and GL_RG8_EXT
weston code uses these defines
Upstream-Status: Pending
@@ -30,6 +30,3 @@ index 4eacf7f..b1acc9f 100644
/* 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
--
2.27.0

View File

@@ -1,7 +1,7 @@
From 47972590947e5da25d77cae0ce060f7b8d022a10 Mon Sep 17 00:00:00 2001
From 528a439539a77e67bf136d425eac3240ca6f1cd7 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/21] EGL/glplatform.h: define EGL_CAST
Subject: [PATCH] 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.
@@ -27,6 +27,3 @@ index 1f7c930..c39d425 100644
+#endif
+
#endif /* __eglplatform_h */
--
2.27.0

View File

@@ -1,8 +1,7 @@
From 1eb8bdb4d45e3de9582145c120b0d3ede187c7a9 Mon Sep 17 00:00:00 2001
From c5969e5e5c50e2c9b32c6f945040a8e5763ba06c 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/21] Allow multiple wayland compositor state data per
process
Subject: [PATCH] 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.
@@ -140,6 +139,3 @@ index 9ef89cd..abd5ab3 100644
CLIENT_UNLOCK();
--
2.27.0

View File

@@ -1,8 +1,7 @@
From 99a210c93019d37dd7f044102c4314c8cb988ed4 Mon Sep 17 00:00:00 2001
From 8091dac73f792fb000e7ec97de6be23cd84b7cb7 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/21] khronos: backport typedef for
EGL_EXT_image_dma_buf_import
Subject: [PATCH] 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.
@@ -33,6 +32,3 @@ index d7e5ba7..dcc90ce 100755
#ifndef EGL_WL_bind_wayland_display
#define EGL_WL_bind_wayland_display 1
--
2.27.0

View File

@@ -1,7 +1,7 @@
From 82cf4bc5623c5220dfa1c096ea192f2509837782 Mon Sep 17 00:00:00 2001
From 214f1895db14e3a88d5b2b3b6c844af3890e2eba 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/21] Add EGL_IMG_context_priority related defines
Subject: [PATCH] Add EGL_IMG_context_priority related defines
These defines are needed for compiling weston 4.x
taken from Khronos headers
@@ -30,6 +30,3 @@ index dcc90ce..6842bf9 100755
#ifndef EGL_KHR_vg_parent_image
#define EGL_KHR_vg_parent_image 1
#define EGL_VG_PARENT_IMAGE_KHR 0x30BA /* eglCreateImageKHR target */
--
2.27.0

View File

@@ -1,7 +1,7 @@
From 1112539d9fde6428c1230b4fc9ea479623e9f968 Mon Sep 17 00:00:00 2001
From bcdc525b2e4403f9e878e93cbd0d146ce9e37bb8 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 25 Jul 2019 23:30:27 -0700
Subject: [PATCH 19/21] libfdt: Undefine __wordsize if already defined
Subject: [PATCH] libfdt: Undefine __wordsize if already defined
glibc 2.30+ defines __wordsize, which is same so its easier to compile
for multiple versions of glibc even ones which does not have this define
@@ -26,6 +26,3 @@ index f4608be..5e83a27 100644
#ifdef __CHECKER__
#define FDT_FORCE __attribute__((force))
#define FDT_BITWISE __attribute__((bitwise))
--
2.27.0

View File

@@ -1,7 +1,7 @@
From 488916a6b366bfa5da2907b5892798eb2306a17d Mon Sep 17 00:00:00 2001
From 372b3b75945300604c9b7b012ecb25c0548a1495 Mon Sep 17 00:00:00 2001
From: Martin Jansa <martin.jansa@lge.com>
Date: Wed, 13 Jun 2018 18:22:22 +0000
Subject: [PATCH 20/21] openmaxil: add pkg-config file
Subject: [PATCH] openmaxil: add pkg-config file
---
CMakeLists.txt | 2 +-
@@ -38,6 +38,3 @@ index 0000000..8793a61
+Version: 1
+Libs: -L${libdir} -lopenmaxil -lvcos -lvchiq_arm -pthread
+Cflags: -I${includedir} -I${includedir}/IL -I${includedir}/interface/vmcs_host/linux -I${includedir}/interface/vcos/pthreads -DUSE_VCHIQ_ARM
--
2.27.0

View File

@@ -1,7 +1,7 @@
From ee842886f3c0589d6df5a0687973beb18a3be524 Mon Sep 17 00:00:00 2001
From d08003ab30452b4268121bcf82e03fdf21c89cdd Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 31 Mar 2020 11:51:02 -0700
Subject: [PATCH 21/21] cmake: Disable format-overflow warning as error
Subject: [PATCH] cmake: Disable format-overflow warning as error
gcc10 complains about a check which could potentially be null
@@ -20,7 +20,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/host_applications/linux/libs/bcm_host/CMakeLists.txt b/host_applications/linux/libs/bcm_host/CMakeLists.txt
index a863cb6..f358135 100644
index 2f4beb9..7a4ab06 100644
--- a/host_applications/linux/libs/bcm_host/CMakeLists.txt
+++ b/host_applications/linux/libs/bcm_host/CMakeLists.txt
@@ -3,7 +3,7 @@ if (WIN32)
@@ -32,6 +32,3 @@ index a863cb6..f358135 100644
endif ()
# set this as we want all the source of vchostif to be available in libbcm_host
--
2.27.0

View File

@@ -0,0 +1,30 @@
From 451e8458e45926e4e1c0433864ac4cf8b05d792b Mon Sep 17 00:00:00 2001
From: Trevor Woerner <twoerner@gmail.com>
Date: Fri, 27 Nov 2020 03:12:26 -0500
Subject: [PATCH] all host_applications: remove non-existent projects
The ALL_APPS symbol will optionally build an additional set of projects,
however, several of them don't exist anymore. Remove them from the list of
ALL_APPS.
Upstream-status: submitted [https://github.com/raspberrypi/userland/pull/661]
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
host_applications/linux/CMakeLists.txt | 4 ----
1 file changed, 4 deletions(-)
diff --git a/host_applications/linux/CMakeLists.txt b/host_applications/linux/CMakeLists.txt
index 928b637..554ae46 100644
--- a/host_applications/linux/CMakeLists.txt
+++ b/host_applications/linux/CMakeLists.txt
@@ -14,10 +14,6 @@ add_subdirectory(apps/dtoverlay)
add_subdirectory(apps/dtmerge)
if(ALL_APPS)
- add_subdirectory(apps/vcdbg)
- add_subdirectory(libs/elftoolchain)
- # add_subdirectory(apps/smct)
- add_subdirectory(apps/edid_parser)
add_subdirectory(apps/hello_pi)
endif()

View File

@@ -0,0 +1,28 @@
From 5f4324a0008c2e8e1f511432f98bf85c9fffd35c Mon Sep 17 00:00:00 2001
From: Trevor Woerner <twoerner@gmail.com>
Date: Fri, 27 Nov 2020 03:18:50 -0500
Subject: [PATCH] hello_pi: optionally build wayland-specific app
Only build the wayland-specific hello_pi app when building for wayland.
Upstream-status: inappropriate [the wayland example is not part of upstream]
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
host_applications/linux/apps/hello_pi/CMakeLists.txt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/host_applications/linux/apps/hello_pi/CMakeLists.txt b/host_applications/linux/apps/hello_pi/CMakeLists.txt
index 2849fad..7de3265 100644
--- a/host_applications/linux/apps/hello_pi/CMakeLists.txt
+++ b/host_applications/linux/apps/hello_pi/CMakeLists.txt
@@ -25,7 +25,9 @@ add_subdirectory(hello_encode)
add_subdirectory(hello_jpeg)
add_subdirectory(hello_videocube)
add_subdirectory(hello_teapot)
-add_subdirectory(hello_wayland)
+if (BUILD_WAYLAND)
+ add_subdirectory(hello_wayland)
+endif()
if(BUILD_FONT)
set(VGFONT_SRCS libs/vgfont/font.c libs/vgfont/vgft.c libs/vgfont/graphics.c)

View File

@@ -0,0 +1,38 @@
From 4a3e515d3ea7ff0fc4063b9677b056af4ee7a3f6 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 2 Dec 2020 14:28:01 -0800
Subject: [PATCH] userland: Sync needed defines for weston build
eglext.h from userland is not sufficient to compile latest weston,
therefore import needed defines and typedefs from latest mesa
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
interface/khronos/include/EGL/eglext.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/interface/khronos/include/EGL/eglext.h b/interface/khronos/include/EGL/eglext.h
index 6842bf9..7118e92 100755
--- a/interface/khronos/include/EGL/eglext.h
+++ b/interface/khronos/include/EGL/eglext.h
@@ -225,6 +225,20 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYWAYLANDBUFFERWL) (EGLDisplay dpy, st
#endif
+typedef void* EGLSyncKHR;
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSETDAMAGEREGIONKHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
+typedef EGLint (EGLAPIENTRYP PFNEGLWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags);
+#ifndef EGL_ANDROID_native_fence_sync
+#define EGL_ANDROID_native_fence_sync 1
+#define EGL_SYNC_NATIVE_FENCE_ANDROID 0x3144
+#define EGL_SYNC_NATIVE_FENCE_FD_ANDROID 0x3145
+#define EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID 0x3146
+#define EGL_NO_NATIVE_FENCE_FD_ANDROID -1
+typedef EGLint (EGLAPIENTRYP PFNEGLDUPNATIVEFENCEFDANDROIDPROC) (EGLDisplay dpy, EGLSyncKHR sync);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID (EGLDisplay dpy, EGLSyncKHR sync);
+#endif
+#endif /* EGL_ANDROID_native_fence_sync */
#ifdef __cplusplus
}

View File

@@ -13,11 +13,11 @@ COMPATIBLE_MACHINE = "^rpi$"
SRCBRANCH = "master"
SRCFORK = "raspberrypi"
SRCREV = "188d3bfe4a0ac36b119a2cee35a6be8d0c68e09e"
SRCREV = "9f3f9054a692e53b60fca54221a402414e030335"
# Use the date of the above commit as the package version. Update this when
# SRCREV is changed.
PV = "20200624"
PV = "20201027"
SRC_URI = "\
git://github.com/${SRCFORK}/userland.git;protocol=git;branch=${SRCBRANCH} \
@@ -42,6 +42,9 @@ SRC_URI = "\
file://0019-libfdt-Undefine-__wordsize-if-already-defined.patch \
file://0020-openmaxil-add-pkg-config-file.patch \
file://0021-cmake-Disable-format-overflow-warning-as-error.patch \
file://0022-all-host_applications-remove-non-existent-projects.patch \
file://0023-hello_pi-optionally-build-wayland-specific-app.patch \
file://0024-userland-Sync-needed-defines-for-weston-build.patch \
"
SRC_URI_remove_toolchain-clang = "file://0021-cmake-Disable-format-overflow-warning-as-error.patch"
@@ -62,6 +65,7 @@ EXTRA_OECMAKE_append_aarch64 = " -DARM64=ON "
PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}"
PACKAGECONFIG[wayland] = "-DBUILD_WAYLAND=TRUE -DWAYLAND_SCANNER_EXECUTABLE:FILEPATH=${STAGING_BINDIR_NATIVE}/wayland-scanner,,wayland-native wayland"
PACKAGECONFIG[allapps] = "-DALL_APPS=true,,,"
CFLAGS_append = " -fPIC"

View File

@@ -8,6 +8,7 @@ SECTION = "kernel"
# In maintained upstream linux-firmware:
# * brcmfmac43430-sdio falls under LICENCE.cypress
# * brcmfmac43455-sdio falls under LICENCE.broadcom_bcm43xx
# * brcmfmac43456-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
@@ -35,8 +36,8 @@ NO_GENERIC_LICENSE[WHENCE] = "WHENCE"
SRC_URI = "git://github.com/RPi-Distro/firmware-nonfree"
SRCREV = "98e815735e2c805d65994ccc608f399595b74438"
PV = "20190114-1+rpt8"
SRCREV = "b66ab26cebff689d0d3257f56912b9bb03c20567"
PV = "20190114-1+rpt10"
S = "${WORKDIR}/git"
@@ -56,7 +57,7 @@ do_install() {
# 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
for fw in brcmfmac43430-sdio brcmfmac43455-sdio brcmfmac43456-sdio ; do
install -m 0644 brcm/${fw}.* ${D}${nonarch_base_libdir}/firmware/brcm/
done
# add compat links. Fixes errors like
@@ -64,22 +65,27 @@ do_install() {
ln -s brcmfmac43455-sdio.txt ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt
ln -s brcmfmac43455-sdio.txt ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt
ln -s brcmfmac43430-sdio.txt ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.txt
ln -s brcmfmac43430-sdio.txt ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.raspberrypi,model-zero-w.txt
}
PACKAGES = "\
${PN}-broadcom-license \
${PN}-bcm43430 \
${PN}-bcm43455 \
${PN}-bcm43456 \
"
LICENSE_${PN}-bcm43430 = "Firmware-broadcom_bcm43xx-rpidistro"
LICENSE_${PN}-bcm43455 = "Firmware-broadcom_bcm43xx-rpidistro"
LICENSE_${PN}-bcm43456 = "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*"
FILES_${PN}-bcm43456 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43456*"
RDEPENDS_${PN}-bcm43430 += "${PN}-broadcom-license"
RDEPENDS_${PN}-bcm43455 += "${PN}-broadcom-license"
RDEPENDS_${PN}-bcm43456 += "${PN}-broadcom-license"
RCONFLICTS_${PN}-bcm43430 = "\
linux-firmware-bcm43430 \
linux-firmware-raspbian-bcm43430 \
@@ -96,6 +102,14 @@ RREPLACES_${PN}-bcm43455 = "\
linux-firmware-bcm43455 \
linux-firmware-raspbian-bcm43455 \
"
RCONFLICTS_${PN}-bcm43456 = "\
linux-firmware-bcm43456 \
linux-firmware-raspbian-bcm43456 \
"
RREPLACES_${PN}-bcm43456 = "\
linux-firmware-bcm43456 \
linux-firmware-raspbian-bcm43456 \
"
# Firmware files are generally not run on the CPU, so they can be
# allarch despite being architecture specific

View File

@@ -1,62 +0,0 @@
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

View File

@@ -1,57 +0,0 @@
From e66a0be4fac135d67ab228a6fd1453b9e36a3644 Mon Sep 17 00:00:00 2001
From: Changbin Du <changbin.du@gmail.com>
Date: Tue, 28 Jan 2020 23:29:38 +0800
Subject: [PATCH] perf: Make perf able to build with latest libbfd
libbfd has changed the bfd_section_* macros to inline functions
bfd_section_<field> since 2019-09-18. See below two commits:
o http://www.sourceware.org/ml/gdb-cvs/2019-09/msg00064.html
o https://www.sourceware.org/ml/gdb-cvs/2019-09/msg00072.html
This fix make perf able to build with both old and new libbfd.
Signed-off-by: Changbin Du <changbin.du@gmail.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20200128152938.31413-1-changbin.du@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/srcline.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/srcline.c b/tools/perf/util/srcline.c
index af3f9b9f1e8b..b8e77617fdc4 100644
--- a/tools/perf/util/srcline.c
+++ b/tools/perf/util/srcline.c
@@ -191,16 +191,30 @@ static void find_address_in_section(bfd *abfd, asection *section, void *data)
bfd_vma pc, vma;
bfd_size_type size;
struct a2l_data *a2l = data;
+ flagword flags;
if (a2l->found)
return;
- if ((bfd_get_section_flags(abfd, section) & SEC_ALLOC) == 0)
+#ifdef bfd_get_section_flags
+ flags = bfd_get_section_flags(abfd, section);
+#else
+ flags = bfd_section_flags(section);
+#endif
+ if ((flags & SEC_ALLOC) == 0)
return;
pc = a2l->addr;
+#ifdef bfd_get_section_vma
vma = bfd_get_section_vma(abfd, section);
+#else
+ vma = bfd_section_vma(section);
+#endif
+#ifdef bfd_get_section_size
size = bfd_get_section_size(section);
+#else
+ size = bfd_section_size(section);
+#endif
if (pc < vma || pc >= vma + size)
return;

View File

@@ -1,40 +0,0 @@
From 4cd12df48b83cef9cc7d6b80b128afbf68746718 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 14 Mar 2020 07:31:34 -0700
Subject: [PATCH] selftest/bpf: Use CHECK macro instead of RET_IF
backporting 634efb750435d0a489dc58477d4fcb88b2692942 causes build
failures because RET_IF is defined in 7ee0d4e97b889c0478af9c1a6e5af658b181423f
but that is not backported
Upstream-Status: Submitted
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Jakub Sitnicki <jakub@cloudflare.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
---
tools/testing/selftests/bpf/test_select_reuseport.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/bpf/test_select_reuseport.c b/tools/testing/selftests/bpf/test_select_reuseport.c
index 079d0f5a2909..7e4c91f2238d 100644
--- a/tools/testing/selftests/bpf/test_select_reuseport.c
+++ b/tools/testing/selftests/bpf/test_select_reuseport.c
@@ -668,12 +668,12 @@ static void cleanup_per_test(void)
for (i = 0; i < NR_RESULTS; i++) {
err = bpf_map_update_elem(result_map, &i, &zero, BPF_ANY);
- RET_IF(err, "reset elem in result_map",
+ CHECK(err, "reset elem in result_map",
"i:%u err:%d errno:%d\n", i, err, errno);
}
err = bpf_map_update_elem(linum_map, &zero, &zero, BPF_ANY);
- RET_IF(err, "reset line number in linum_map", "err:%d errno:%d\n",
+ CHECK(err, "reset line number in linum_map", "err:%d errno:%d\n",
err, errno);
for (i = 0; i < REUSEPORT_ARRAY_SIZE; i++)
--
2.26.0

View File

@@ -0,0 +1,5 @@
CONFIG_OVERLAY_FS=y
CONFIG_SQUASHFS=y
CONFIG_MTD=y
CONFIG_MTD_UBI=y
CONFIG_UBIFS_FS=y

View File

@@ -1 +0,0 @@
CONFIG_SENSORS_RPI_POE_FAN=m

View File

@@ -0,0 +1,6 @@
CONFIG_I2C_BCM2835=y
CONFIG_DRM=y
CONFIG_DRM_FBDEV_EMULATION=y
CONFIG_DRM_VC4=y
CONFIG_SND=y
CONFIG_SND_SOC=y

View File

@@ -5,19 +5,31 @@ python __anonymous() {
raise bb.parse.SkipRecipe(msg)
}
FILESEXTRAPATHS_prepend := "${THISDIR}/linux-raspberrypi:"
LINUX_VERSION ?= "5.10.y"
LINUX_RPI_BRANCH ?= "rpi-5.10.y"
LINUX_RPI_KMETA_BRANCH ?= "yocto-5.10"
LINUX_VERSION ?= "4.19"
LINUX_RPI_BRANCH ?= "rpi-4.19.y"
# Set default SRCREVs. Both the machine and meta SRCREVs are statically set
# to the as in 5.10 recipe, and hence prevent network access during parsing. If
# linux-yocto-dev is the preferred provider, they will be overridden to
# AUTOREV in following anonymous python routine and resolved when the
# variables are finalized.
SRCREV_machine ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-raspberrypi-dev", "${AUTOREV}", "89399e6e7e33d6260a954603ca03857df594ffd3", d)}'
SRCREV_meta ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-raspberrypi-dev", "${AUTOREV}", "a19886b00ea7d874fdd60d8e3435894bb16e6434", d)}'
KMETA = "kernel-meta"
SRCREV = "${AUTOREV}"
SRC_URI = " \
git://github.com/raspberrypi/linux.git;protocol=git;branch=${LINUX_RPI_BRANCH} \
git://github.com/raspberrypi/linux.git;name=machine;branch=${LINUX_RPI_BRANCH} \
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=${LINUX_RPI_KMETA_BRANCH};destsuffix=${KMETA} \
file://powersave.cfg \
file://android-drivers.cfg \
"
require linux-raspberrypi.inc
KERNEL_EXTRA_ARGS += "DTC_FLAGS='-@ -H epapr'"
# Disable version check so that we don't have to edit this recipe every time
# upstream bumps the version
KERNEL_VERSION_SANITY_SKIP = "1"
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"

View File

@@ -1,9 +0,0 @@
LINUX_VERSION ?= "4.14.91"
SRCREV = "0b520d5f1f580d36a742a9457a5673fa1578fff3"
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

View File

@@ -1,6 +0,0 @@
LINUX_VERSION ?= "4.19.71"
LINUX_RPI_BRANCH ?= "rpi-4.19.y-rt"
SRCREV = "e2e9cec6fb061ba58304fd391ef76747f2963557"
require linux-raspberrypi_4.19.inc

View File

@@ -1,17 +1,20 @@
DESCRIPTION = "Linux Kernel for Raspberry Pi"
SECTION = "kernel"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
COMPATIBLE_MACHINE = "^rpi$"
PE = "1"
PV = "${LINUX_VERSION}+git${SRCPV}"
inherit kernel siteinfo
inherit siteinfo
require recipes-kernel/linux/linux-yocto.inc
SRC_URI += "file://rpi-kernel-misc.cfg"
SRC_URI += " \
${@bb.utils.contains("INITRAMFS_IMAGE_BUNDLE", "1", "file://initramfs-image-bundle.cfg", "", d)} \
${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "file://vc4graphics.cfg", "", d)} \
"
KCONFIG_MODE = "--alldefconfig"
KBUILD_DEFCONFIG_raspberrypi0-wifi ?= "bcmrpi_defconfig"
@@ -25,118 +28,9 @@ KBUILD_DEFCONFIG_raspberrypi4-64 ?= "bcm2711_defconfig"
LINUX_VERSION_EXTENSION ?= ""
# CMDLINE for raspberrypi
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 = ' ${@oe.utils.conditional("ENABLE_KGDB", "1", "kgdboc=serial0,115200", "", d)}'
# 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)}"
# 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
}
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_configure_prepend() {
config_setup
mv -f ${B}/.config ${B}/.config.patched
CONF_SED_SCRIPT=""
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() {
if [ "${SITEINFO_BITS}" = "64" ]; then
cc_extra=$(get_cc_option)
oe_runmake dtbs CC="${KERNEL_CC} $cc_extra " LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS}
fi
}
do_deploy_append() {
# Deploy cmdline.txt only for the main kernel package
if [ ${KERNEL_PACKAGE_NAME} = "kernel" ]; then
install -d ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}
PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
if [ ${PITFT} = "1" ]; then
PITFT_PARAMS="fbcon=map:10 fbcon=font:VGA8x8"
fi
echo "${CMDLINE}${PITFT_PARAMS}" > ${DEPLOYDIR}/${BOOTFILES_DIR_NAME}/cmdline.txt
fi
}

View File

@@ -1,9 +0,0 @@
LINUX_VERSION ?= "4.14.114"
SRCREV = "7688b39276ff9952df381d79de63b258e73971ce"
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

View File

@@ -1,10 +0,0 @@
LINUX_VERSION ?= "4.19.126"
LINUX_RPI_BRANCH ?= "rpi-4.19.y"
SRCREV = "f6b3ac28f0a9137d4c24c0b8832e693bbd16f5b7"
require linux-raspberrypi_4.19.inc
SRC_URI += "file://0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch \
file://0001-selftest-bpf-Use-CHECK-macro-instead-of-RET_IF.patch \
"

View File

@@ -1,12 +0,0 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/linux-raspberrypi:"
SRC_URI = " \
git://github.com/raspberrypi/linux.git;branch=${LINUX_RPI_BRANCH} \
"
SRC_URI_append_raspberrypi4-64 = " file://rpi4-64-kernel-misc.cfg"
require linux-raspberrypi.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
KERNEL_EXTRA_ARGS_append_rpi = " DTC_FLAGS='-@ -H epapr'"

View File

@@ -0,0 +1,19 @@
LINUX_VERSION ?= "5.10.17"
LINUX_RPI_BRANCH ?= "rpi-5.10.y"
LINUX_RPI_KMETA_BRANCH ?= "yocto-5.10"
SRCREV_machine = "ec967eb45f8d4ed59bebafb5748da38118383be7"
SRCREV_meta = "5833ca701711d487c9094bd1efc671e8ef7d001e"
KMETA = "kernel-meta"
SRC_URI = " \
git://github.com/raspberrypi/linux.git;name=machine;branch=${LINUX_RPI_BRANCH} \
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=${LINUX_RPI_KMETA_BRANCH};destsuffix=${KMETA} \
file://powersave.cfg \
file://android-drivers.cfg \
"
require linux-raspberrypi.inc
KERNEL_EXTRA_ARGS += "DTC_FLAGS='-@ -H epapr'"

View File

@@ -1,13 +1,23 @@
LINUX_VERSION ?= "5.4.72"
LINUX_VERSION ?= "5.4.83"
LINUX_RPI_BRANCH ?= "rpi-5.4.y"
LINUX_RPI_KMETA_BRANCH ?= "yocto-5.4"
SRCREV_machine = "154de7bbd5844a824a635d4f9e3f773c15c6ce11"
SRCREV_meta = "5d52d9eea95fa09d404053360c2351b2b91b323b"
SRCREV_machine = "08ae2dd9e7dc89c20bff823a3ef045de09bfd090"
SRCREV_meta = "d676bf5ff7b7071e14f44498d2482c0a596f14cd"
require linux-raspberrypi_5.4.inc
KMETA = "kernel-meta"
SRC_URI += "file://0001-Revert-selftests-bpf-Skip-perf-hw-events-test-if-the.patch \
file://0002-Revert-selftests-bpf-Fix-perf_buffer-test-on-systems.patch \
file://powersave.cfg \
file://android-drivers.cfg \
"
SRC_URI = " \
git://github.com/raspberrypi/linux.git;name=machine;branch=${LINUX_RPI_BRANCH} \
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=${LINUX_RPI_KMETA_BRANCH};destsuffix=${KMETA} \
file://0001-Revert-selftests-bpf-Skip-perf-hw-events-test-if-the.patch \
file://0002-Revert-selftests-bpf-Fix-perf_buffer-test-on-systems.patch \
file://powersave.cfg \
file://android-drivers.cfg \
"
require linux-raspberrypi.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
KERNEL_EXTRA_ARGS += "DTC_FLAGS='-@ -H epapr'"

View File

@@ -1,15 +0,0 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/linux-raspberrypi:"
KMETA = "kernel-meta"
SRC_URI = " \
git://github.com/raspberrypi/linux.git;name=machine;branch=${LINUX_RPI_BRANCH} \
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.4;destsuffix=${KMETA} \
"
SRC_URI_remove = "file://rpi-kernel-misc.cfg"
require linux-raspberrypi.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
KERNEL_EXTRA_ARGS_append_rpi = " DTC_FLAGS='-@ -H epapr'"