mirror of
https://github.com/agherzan/meta-raspberrypi.git
synced 2025-12-06 06:19:11 +00:00
Compare commits
82 Commits
a3b23e5cb8
...
warrior
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
65b95ce742 | ||
|
|
5551792e64 | ||
|
|
c8ba244278 | ||
|
|
38c9c9a985 | ||
|
|
615a1a8339 | ||
|
|
2f0fa9a087 | ||
|
|
943ec3c046 | ||
|
|
5cb49f4d76 | ||
|
|
0750d5d2bc | ||
|
|
a87975cdab | ||
|
|
81c7d62914 | ||
|
|
96c8459c93 | ||
|
|
3194c0bccf | ||
|
|
bfa90d0cf6 | ||
|
|
11eedec46a | ||
|
|
e7cbaed500 | ||
|
|
b48cc66703 | ||
|
|
a88c431f81 | ||
|
|
fd561a1a03 | ||
|
|
a504f28998 | ||
|
|
bb6195ba47 | ||
|
|
8fb340a1e7 | ||
|
|
be8b4c44f3 | ||
|
|
0c8875210a | ||
|
|
0ecf714569 | ||
|
|
a374ab0e4e | ||
|
|
f961726634 | ||
|
|
eebcfc1eca | ||
|
|
559287aed9 | ||
|
|
c2f2eaf445 | ||
|
|
e9e3ad1920 | ||
|
|
a982858993 | ||
|
|
ca13d79422 | ||
|
|
220c3bf096 | ||
|
|
95d528b07a | ||
|
|
a969efd2e3 | ||
|
|
690bdca574 | ||
|
|
b76252c985 | ||
|
|
290c152a22 | ||
|
|
43c1696ea5 | ||
|
|
ccf0efea63 | ||
|
|
7064e3c9bb | ||
|
|
a4a3f958f9 | ||
|
|
2b30e66f08 | ||
|
|
a4cb3c40e2 | ||
|
|
35db3d24b2 | ||
|
|
672d666294 | ||
|
|
c775e7ff3a | ||
|
|
5d412e616c | ||
|
|
740c64c9ad | ||
|
|
589483c89c | ||
|
|
210cbd8f8f | ||
|
|
8dae8e3459 | ||
|
|
7adb852dd1 | ||
|
|
d3b780f941 | ||
|
|
d108982cb5 | ||
|
|
549006b58f | ||
|
|
284664b755 | ||
|
|
9e73b9eb9f | ||
|
|
d15e627049 | ||
|
|
33f810f434 | ||
|
|
242b1f53c0 | ||
|
|
004a1ef2c2 | ||
|
|
f30d4cfe70 | ||
|
|
e00578fd1c | ||
|
|
6585c518b7 | ||
|
|
37aa050d5a | ||
|
|
e9388ca169 | ||
|
|
b85775a16a | ||
|
|
9649833a2c | ||
|
|
174fafd16b | ||
|
|
e6a52cd548 | ||
|
|
16f465bc67 | ||
|
|
2a05603313 | ||
|
|
34ffb26f6c | ||
|
|
8d9275d753 | ||
|
|
510f7c8672 | ||
|
|
e18023cd9d | ||
|
|
fe7725eb97 | ||
|
|
adbad84b64 | ||
|
|
6c73694912 | ||
|
|
1c842e21c2 |
@@ -5,7 +5,7 @@ Yocto BSP layer for the Raspberry Pi boards - <http://www.raspberrypi.org/>.
|
||||
[](https://yocto-ci.resin.io/job/meta-raspberrypi1)
|
||||
[](https://yocto-ci.resin.io/job/meta-raspberrypi2)
|
||||
[](https://yocto-ci.resin.io/job/meta-raspberrypi3)
|
||||
[](https://gitter.im/agherzan/meta-raspberrypi)
|
||||
[](https://matrix.to/#/#meta-raspberrypi:cub.icu)
|
||||
|
||||
## Quick links
|
||||
|
||||
|
||||
@@ -55,6 +55,7 @@ do_image_rpi_sdimg[depends] = " \
|
||||
dosfstools-native:do_populate_sysroot \
|
||||
virtual/kernel:do_deploy \
|
||||
${IMAGE_BOOTLOADER}: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', 'rpi-u-boot-scr:do_deploy', '',d)} \
|
||||
"
|
||||
@@ -112,48 +113,51 @@ IMAGE_CMD_rpi-sdimg () {
|
||||
BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG} unit b print | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }')
|
||||
rm -f ${WORKDIR}/boot.img
|
||||
mkfs.vfat -F32 -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/
|
||||
mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/ || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* into boot.img"
|
||||
if [ "${@bb.utils.contains("MACHINE_FEATURES", "armstub", "1", "0", d)}" = "1" ]; then
|
||||
mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/armstubs/${ARMSTUB} ::/ || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/armstubs/${ARMSTUB} into boot.img"
|
||||
fi
|
||||
if test -n "${DTS}"; then
|
||||
# Copy board device trees to root folder
|
||||
for dtbf in ${@split_overlays(d, True)}; do
|
||||
dtb=`basename $dtbf`
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/$dtb ::$dtb
|
||||
mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/$dtb ::$dtb || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/$dtb into boot.img"
|
||||
done
|
||||
|
||||
# Copy device tree overlays to dedicated folder
|
||||
mmd -i ${WORKDIR}/boot.img overlays
|
||||
for dtbf in ${@split_overlays(d, False)}; do
|
||||
dtb=`basename $dtbf`
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/$dtb ::overlays/$dtb
|
||||
mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/$dtb ::overlays/$dtb || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/$dtb into boot.img"
|
||||
done
|
||||
fi
|
||||
if [ "${RPI_USE_U_BOOT}" = "1" ]; then
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.bin ::${SDIMG_KERNELIMAGE}
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/boot.scr ::boot.scr
|
||||
mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.bin ::${SDIMG_KERNELIMAGE} || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/u-boot.bin into boot.img"
|
||||
mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/boot.scr ::boot.scr || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/boot.scr into boot.img"
|
||||
if [ ! -z "${INITRAMFS_IMAGE}" -a "${INITRAMFS_IMAGE_BUNDLE}" = "1" ]; then
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${INITRAMFS_LINK_NAME}.bin ::${KERNEL_IMAGETYPE}
|
||||
mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${INITRAMFS_LINK_NAME}.bin ::${KERNEL_IMAGETYPE} || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${INITRAMFS_LINK_NAME}.bin into boot.img"
|
||||
else
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} ::${KERNEL_IMAGETYPE}
|
||||
mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} ::${KERNEL_IMAGETYPE} || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} into boot.img"
|
||||
fi
|
||||
else
|
||||
if [ ! -z "${INITRAMFS_IMAGE}" -a "${INITRAMFS_IMAGE_BUNDLE}" = "1" ]; then
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${INITRAMFS_LINK_NAME}.bin ::${SDIMG_KERNELIMAGE}
|
||||
mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${INITRAMFS_LINK_NAME}.bin ::${SDIMG_KERNELIMAGE} || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${INITRAMFS_LINK_NAME}.bin into boot.img"
|
||||
else
|
||||
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} ::${SDIMG_KERNELIMAGE}
|
||||
mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} ::${SDIMG_KERNELIMAGE} || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} into boot.img"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n ${FATPAYLOAD} ] ; then
|
||||
if [ -n "${FATPAYLOAD}" ] ; then
|
||||
echo "Copying payload into VFAT"
|
||||
for entry in ${FATPAYLOAD} ; do
|
||||
# add the || true to stop aborting on vfat issues like not supporting .~lock files
|
||||
mcopy -i ${WORKDIR}/boot.img -s -v ${IMAGE_ROOTFS}$entry :: || true
|
||||
# use bbwarn instead of bbfatal to stop aborting on vfat issues like not supporting .~lock files
|
||||
mcopy -v -i ${WORKDIR}/boot.img -s ${IMAGE_ROOTFS}$entry :: || bbwarn "mcopy cannot copy ${IMAGE_ROOTFS}$entry into boot.img"
|
||||
done
|
||||
fi
|
||||
|
||||
# Add stamp file
|
||||
echo "${IMAGE_NAME}" > ${WORKDIR}/image-version-info
|
||||
mcopy -i ${WORKDIR}/boot.img -v ${WORKDIR}/image-version-info ::
|
||||
mcopy -v -i ${WORKDIR}/boot.img ${WORKDIR}/image-version-info :: || bbfatal "mcopy cannot copy ${WORKDIR}/image-version-info into boot.img"
|
||||
|
||||
# Deploy vfat partition
|
||||
if [ "${SDIMG_VFAT_DEPLOY}" = "1" ]; then
|
||||
|
||||
@@ -27,6 +27,8 @@ BBFILES += "${@' '.join('${LAYERDIR}/dynamic-layers/%s/recipes*/*/*.bb' % layer
|
||||
BBFILES_DYNAMIC += " \
|
||||
openembedded-layer:${LAYERDIR}/dynamic-layers/openembedded-layer/*/*/*.bb \
|
||||
openembedded-layer:${LAYERDIR}/dynamic-layers/openembedded-layer/*/*/*.bbappend \
|
||||
networking-layer:${LAYERDIR}/dynamic-layers/networking-layer/*/*/*.bb \
|
||||
networking-layer:${LAYERDIR}/dynamic-layers/networking-layer/*/*/*.bbappend \
|
||||
qt5-layer:${LAYERDIR}/dynamic-layers/qt5-layer/*/*/*.bb \
|
||||
qt5-layer:${LAYERDIR}/dynamic-layers/qt5-layer/*/*/*.bbappend \
|
||||
"
|
||||
|
||||
@@ -35,17 +35,19 @@ RPI_KERNEL_DEVICETREE_OVERLAYS ?= " \
|
||||
overlays/rpi-ft5406.dtbo \
|
||||
overlays/rpi-poe.dtbo \
|
||||
overlays/vc4-kms-v3d.dtbo \
|
||||
overlays/vc4-fkms-v3d.dtbo \
|
||||
overlays/w1-gpio-pullup.dtbo \
|
||||
overlays/w1-gpio.dtbo \
|
||||
"
|
||||
|
||||
RPI_KERNEL_DEVICETREE ?= " \
|
||||
bcm2708-rpi-0-w.dtb \
|
||||
bcm2708-rpi-zero-w.dtb \
|
||||
bcm2708-rpi-b.dtb \
|
||||
bcm2708-rpi-b-plus.dtb \
|
||||
bcm2709-rpi-2-b.dtb \
|
||||
bcm2710-rpi-3-b.dtb \
|
||||
bcm2710-rpi-3-b-plus.dtb \
|
||||
bcm2711-rpi-4-b.dtb \
|
||||
bcm2708-rpi-cm.dtb \
|
||||
bcm2710-rpi-cm3.dtb \
|
||||
"
|
||||
@@ -68,7 +70,7 @@ KERNEL_IMAGETYPE_DIRECT ??= "zImage"
|
||||
KERNEL_IMAGETYPE ?= "${@bb.utils.contains('RPI_USE_U_BOOT', '1', \
|
||||
'${KERNEL_IMAGETYPE_UBOOT}', '${KERNEL_IMAGETYPE_DIRECT}', d)}"
|
||||
|
||||
MACHINE_FEATURES += "apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio"
|
||||
MACHINE_FEATURES += "apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio ${@bb.utils.contains('DISABLE_VC4GRAPHICS', '1', '', 'vc4graphics', d)}"
|
||||
|
||||
# Raspberry Pi has no hardware clock
|
||||
MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc"
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# RaspberryPi BSP default versions
|
||||
|
||||
PREFERRED_VERSION_linux-raspberrypi ??= "4.14.%"
|
||||
PREFERRED_VERSION_linux-raspberrypi ??= "4.19.%"
|
||||
|
||||
@@ -4,3 +4,5 @@
|
||||
|
||||
MACHINEOVERRIDES = "raspberrypi:${MACHINE}"
|
||||
include conf/machine/raspberrypi.conf
|
||||
|
||||
ARMSTUB ?= "armstub.bin"
|
||||
|
||||
@@ -10,3 +10,5 @@ KBUILD_DEFCONFIG ?= "bcm2709_defconfig"
|
||||
SDIMG_KERNELIMAGE ?= "kernel7.img"
|
||||
UBOOT_MACHINE = "rpi_3_32b_config"
|
||||
SERIAL_CONSOLES ?= "115200;ttyAMA0"
|
||||
|
||||
ARMSTUB ?= "armstub.bin"
|
||||
|
||||
@@ -10,3 +10,5 @@ include conf/machine/include/rpi-base.inc
|
||||
SERIAL_CONSOLES ?= "115200;ttyAMA0"
|
||||
|
||||
UBOOT_MACHINE = "rpi_config"
|
||||
|
||||
ARMSTUB ?= "armstub.bin"
|
||||
|
||||
@@ -14,3 +14,5 @@ MACHINE_EXTRA_RRECOMMENDS += "\
|
||||
SDIMG_KERNELIMAGE ?= "kernel.img"
|
||||
UBOOT_MACHINE ?= "rpi_0_w_defconfig"
|
||||
SERIAL_CONSOLES ?= "115200;ttyS0"
|
||||
|
||||
ARMSTUB ?= "armstub.bin"
|
||||
|
||||
@@ -10,3 +10,5 @@ include conf/machine/include/rpi-base.inc
|
||||
SERIAL_CONSOLES ?= "115200;ttyAMA0"
|
||||
|
||||
UBOOT_MACHINE = "rpi_2_config"
|
||||
|
||||
ARMSTUB ?= "armstub7.bin"
|
||||
|
||||
@@ -23,7 +23,6 @@ RPI_KERNEL_DEVICETREE = " \
|
||||
SERIAL_CONSOLES ?= "115200;ttyS0"
|
||||
|
||||
UBOOT_MACHINE = "rpi_3_config"
|
||||
MACHINE_FEATURES_append = " vc4graphics"
|
||||
|
||||
# When u-boot is enabled we need to use the "Image" format and the "booti"
|
||||
# command to load the kernel
|
||||
@@ -31,3 +30,5 @@ KERNEL_IMAGETYPE_UBOOT ?= "Image"
|
||||
# "zImage" not supported on arm64 and ".gz" images not supported by bootloader yet
|
||||
KERNEL_IMAGETYPE_DIRECT ?= "Image"
|
||||
KERNEL_BOOTCMD ?= "booti"
|
||||
|
||||
ARMSTUB ?= "armstub8.bin"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: RaspberryPi 3 Development Board
|
||||
#@DESCRIPTION: Machine configuration for the RaspberryPi 3
|
||||
#@NAME: RaspberryPi 3 Development Board (32bit)
|
||||
#@DESCRIPTION: Machine configuration for the RaspberryPi 3 in 32 bits mode
|
||||
|
||||
DEFAULTTUNE ?= "cortexa7thf-neon-vfpv4"
|
||||
require conf/machine/include/tune-cortexa7.inc
|
||||
@@ -16,3 +16,5 @@ MACHINE_EXTRA_RRECOMMENDS += "\
|
||||
SDIMG_KERNELIMAGE ?= "kernel7.img"
|
||||
UBOOT_MACHINE = "rpi_3_32b_config"
|
||||
SERIAL_CONSOLES ?= "115200;ttyS0"
|
||||
|
||||
ARMSTUB ?= "armstub7.bin"
|
||||
|
||||
35
conf/machine/raspberrypi4-64.conf
Normal file
35
conf/machine/raspberrypi4-64.conf
Normal file
@@ -0,0 +1,35 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: RaspberryPi 4 Development Board (64bit)
|
||||
#@DESCRIPTION: Machine configuration for the RaspberryPi 4 in 64 bits mode
|
||||
|
||||
MACHINEOVERRIDES = "raspberrypi4:${MACHINE}"
|
||||
|
||||
MACHINE_EXTRA_RRECOMMENDS += "\
|
||||
linux-firmware-rpidistro-bcm43455 \
|
||||
bluez-firmware-rpidistro-bcm4345c0-hcd \
|
||||
"
|
||||
|
||||
require conf/machine/include/tune-cortexa72.inc
|
||||
include conf/machine/include/rpi-base.inc
|
||||
|
||||
RPI_KERNEL_DEVICETREE = " \
|
||||
broadcom/bcm2711-rpi-4-b.dtb \
|
||||
"
|
||||
|
||||
SDIMG_KERNELIMAGE ?= "kernel8.img"
|
||||
SERIAL_CONSOLES ?= "115200;ttyS0"
|
||||
|
||||
UBOOT_MACHINE = "rpi_4_config"
|
||||
|
||||
VC4DTBO ?= "vc4-fkms-v3d"
|
||||
|
||||
# When u-boot is enabled we need to use the "Image" format and the "booti"
|
||||
# command to load the kernel
|
||||
KERNEL_IMAGETYPE_UBOOT ?= "Image"
|
||||
# "zImage" not supported on arm64 and ".gz" images not supported by bootloader yet
|
||||
KERNEL_IMAGETYPE_DIRECT ?= "Image"
|
||||
KERNEL_BOOTCMD ?= "booti"
|
||||
|
||||
RPI_EXTRA_CONFIG ?= "\n# Force arm in 64bit mode. See: https://github.com/raspberrypi/firmware/issues/1193.\narm_64bit=1"
|
||||
|
||||
ARMSTUB ?= "armstub8-gic.bin"
|
||||
20
conf/machine/raspberrypi4.conf
Normal file
20
conf/machine/raspberrypi4.conf
Normal file
@@ -0,0 +1,20 @@
|
||||
#@TYPE: Machine
|
||||
#@NAME: RaspberryPi 4 Development Board (32bit)
|
||||
#@DESCRIPTION: Machine configuration for the RaspberryPi 4 in 32 bit mode
|
||||
|
||||
DEFAULTTUNE ?= "cortexa7thf-neon-vfpv4"
|
||||
require conf/machine/include/tune-cortexa7.inc
|
||||
include conf/machine/include/rpi-base.inc
|
||||
|
||||
MACHINE_EXTRA_RRECOMMENDS += "\
|
||||
linux-firmware-rpidistro-bcm43455 \
|
||||
bluez-firmware-rpidistro-bcm4345c0-hcd \
|
||||
"
|
||||
|
||||
# 'l' stands for LPAE
|
||||
SDIMG_KERNELIMAGE ?= "kernel7l.img"
|
||||
UBOOT_MACHINE = "rpi_4_32b_config"
|
||||
SERIAL_CONSOLES ?= "115200;ttyS0"
|
||||
|
||||
VC4DTBO ?= "vc4-fkms-v3d"
|
||||
ARMSTUB ?= "armstub7.bin"
|
||||
@@ -31,6 +31,10 @@ Accommodate the values above to your own needs (ex: ext3 / ext4).
|
||||
|
||||
See: <https://www.raspberrypi.org/documentation/configuration/config-txt/memory.md>
|
||||
|
||||
## VC4
|
||||
|
||||
By default, each machine uses `vc4` for graphics. This will in turn sets mesa as provider for `gl` libraries. `DISABLE_VC4GRAPHICS` can be set to `1` to disable this behaviour falling back to using `userland`. Be aware that `userland` has not support for 64-bit arch. If you disable `vc4` on a 64-bit Raspberry Pi machine, expect build breakage.
|
||||
|
||||
## Add purchased license codecs
|
||||
|
||||
To add you own licenses use variables `KEY_DECODE_MPG2` and `KEY_DECODE_WVC1` in
|
||||
@@ -219,7 +223,7 @@ needs a fixed core frequency and enable_uart wil set it to the minimum. Certain
|
||||
operations - 60fps h264 decode, high quality deinterlace - which aren't
|
||||
performed on the ARM may be affected, and we wouldn't want to do that to users
|
||||
who don't want to use the serial port. Users who want serial console support on
|
||||
RaspberryPi3 will have to explicitly set in local.conf:
|
||||
RaspberryPi 0 Wifi or 3 will have to explicitly set in local.conf:
|
||||
|
||||
ENABLE_UART = "1"
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
COMPATIBLE_MACHINE_rpi = "(null)"
|
||||
32
recipes-bsp/armstubs/armstubs.bb
Normal file
32
recipes-bsp/armstubs/armstubs.bb
Normal file
@@ -0,0 +1,32 @@
|
||||
DESCRIPTION = "Boot strap code that the GPU puts on memory to start running the boot loader"
|
||||
LICENSE = "Proprietary"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://armstub.S;beginline=1;endline=26;md5=9888f34ac06a676129416c952a6a521e"
|
||||
|
||||
inherit deploy nopackages
|
||||
|
||||
include recipes-bsp/common/raspberrypi-tools.inc
|
||||
|
||||
COMPATIBLE_MACHINE = "^rpi$"
|
||||
|
||||
S = "${RPITOOLS_S}/armstubs"
|
||||
|
||||
export CC8="${CC}"
|
||||
export LD8="${LD}"
|
||||
export OBJCOPY8="${OBJCOPY}"
|
||||
export OBJDUMP8="${OBJDUMP} -maarch64"
|
||||
|
||||
do_compile() {
|
||||
[ -z "${ARMSTUB}" ] && bbfatal "No ARMSTUB defined for your machine."
|
||||
oe_runmake ${ARMSTUB}
|
||||
}
|
||||
|
||||
do_deploy() {
|
||||
install -d ${DEPLOYDIR}/${PN}
|
||||
cp ${S}/armstub*.bin ${DEPLOYDIR}/${PN}
|
||||
}
|
||||
|
||||
addtask deploy before do_build after do_install
|
||||
do_deploy[dirs] += "${DEPLOYDIR}/${PN}"
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENCE.broadcom;md5=4a4d169737c0786fb9482bb6d30401d1
|
||||
|
||||
inherit deploy nopackages
|
||||
|
||||
include recipes-bsp/common/firmware.inc
|
||||
include recipes-bsp/common/raspberrypi-firmware.inc
|
||||
|
||||
INHIBIT_DEFAULT_DEPS = "1"
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ do_deploy() {
|
||||
if [ -n "${DISABLE_OVERSCAN}" ]; then
|
||||
sed -i '/#disable_overscan=/ c\disable_overscan=${DISABLE_OVERSCAN}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
if [ -n "${DISABLE_SPLASH}" ]; then
|
||||
if [ "${DISABLE_SPLASH}" = "1" ]; then
|
||||
sed -i '/#disable_splash=/ c\disable_splash=${DISABLE_SPLASH}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
|
||||
@@ -111,25 +111,25 @@ do_deploy() {
|
||||
fi
|
||||
|
||||
# Video camera support
|
||||
if [ -n "${VIDEO_CAMERA}" ]; then
|
||||
if [ "${VIDEO_CAMERA}" = "1" ]; then
|
||||
echo "# Enable video camera" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
echo "start_x=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
|
||||
# Offline compositing support
|
||||
if [ -n "${DISPMANX_OFFLINE}" ]; then
|
||||
if [ "${DISPMANX_OFFLINE}" = "1" ]; then
|
||||
echo "# Enable offline compositing" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
echo "dispmanx_offline=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
|
||||
# SPI bus support
|
||||
if [ -n "${ENABLE_SPI_BUS}" ] || [ "${PITFT}" = "1" ]; then
|
||||
if [ "${ENABLE_SPI_BUS}" = "1" ] || [ "${PITFT}" = "1" ]; then
|
||||
echo "# Enable SPI bus" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
echo "dtparam=spi=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
fi
|
||||
|
||||
# I2C support
|
||||
if [ -n "${ENABLE_I2C}" ] || [ "${PITFT}" = "1" ]; then
|
||||
if [ "${ENABLE_I2C}" = "1" ] || [ "${PITFT}" = "1" ]; then
|
||||
echo "# Enable I2C" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
echo "dtparam=i2c1=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
echo "dtparam=i2c_arm=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
@@ -191,6 +191,17 @@ do_deploy() {
|
||||
|
||||
# Append extra config if the user has provided any
|
||||
printf "${RPI_EXTRA_CONFIG}\n" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
|
||||
# Handle setup with armstub file
|
||||
if [ "${@bb.utils.contains("MACHINE_FEATURES", "armstub", "1", "0", d)}" = "1" ]; then
|
||||
echo "\n# ARM stub configuration" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
echo "armstub=${ARMSTUB}" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
case "${ARMSTUB}" in
|
||||
*-gic.bin)
|
||||
echo "enable_gic=1" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
do_deploy_append_raspberrypi3-64() {
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
RPIFW_DATE ?= "20190220"
|
||||
SRCREV ?= "ebf7b40cdc6effe7ffa3fd5195e8be01b94f80da"
|
||||
RPIFW_SRC_URI ?= "https://github.com/raspberrypi/firmware/archive/${SRCREV}.tar.gz"
|
||||
RPIFW_S ?= "${WORKDIR}/firmware-${SRCREV}"
|
||||
|
||||
SRC_URI = "${RPIFW_SRC_URI}"
|
||||
SRC_URI[md5sum] = "611077d343e3802496dd99118ca4e977"
|
||||
SRC_URI[sha256sum] = "e911f6342ea8aa9380cae97c6f5ac4ddd370527265f23d5b5d4b2c6f679d4ba8"
|
||||
|
||||
PV = "${RPIFW_DATE}"
|
||||
10
recipes-bsp/common/raspberrypi-firmware.inc
Normal file
10
recipes-bsp/common/raspberrypi-firmware.inc
Normal file
@@ -0,0 +1,10 @@
|
||||
RPIFW_DATE ?= "20191021"
|
||||
SRCREV ?= "ed238d3329e39a68bde03bbc2dfc293c0c3dc93a"
|
||||
RPIFW_SRC_URI ?= "https://github.com/raspberrypi/firmware/archive/${SRCREV}.tar.gz"
|
||||
RPIFW_S ?= "${WORKDIR}/firmware-${SRCREV}"
|
||||
|
||||
SRC_URI = "${RPIFW_SRC_URI}"
|
||||
SRC_URI[md5sum] = "d18066531018a972ed927a6cc136cfff"
|
||||
SRC_URI[sha256sum] = "82048cf88f4f50f7cf83e34d93923ceb5147885761d33ee5f4dc980b4a7a426a"
|
||||
|
||||
PV = "${RPIFW_DATE}"
|
||||
9
recipes-bsp/common/raspberrypi-tools.inc
Normal file
9
recipes-bsp/common/raspberrypi-tools.inc
Normal file
@@ -0,0 +1,9 @@
|
||||
SRCREV ?= "76f64a28dc4685507d12f57fe5cfc89f6c32f8e6"
|
||||
RPITOOLS_SRC_URI ?= "https://github.com/raspberrypi/tools/archive/${SRCREV}.tar.gz"
|
||||
RPITOOLS_S ?= "${WORKDIR}/tools-${SRCREV}"
|
||||
|
||||
SRC_URI = "${RPITOOLS_SRC_URI}"
|
||||
SRC_URI[md5sum] = "e2d4709b62e1536aeaaeabcbae82a03e"
|
||||
SRC_URI[sha256sum] = "5f1c5eb8af9dff71b7cae30ffa6541d689d269a7b86013b365215adfb4c1c27d"
|
||||
|
||||
PV = "0.0+git${SRCREV}"
|
||||
@@ -0,0 +1,73 @@
|
||||
From e4617bdb29e9c88e85f056f3aea46a2c8a5312e2 Mon Sep 17 00:00:00 2001
|
||||
From: akaher <akaher@vmware.com>
|
||||
Date: Thu, 11 Apr 2019 05:23:50 +0000
|
||||
Subject: [PATCH] Fix compilation error if CONFIG_USB is disabled
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This patch is to fix the following compilation error when
|
||||
disabling CONFIG_USB for Rpi3:
|
||||
|
||||
include/config_distro_bootcmd.h:242:2: error: expected ‘}’
|
||||
before ‘BOOT_TARGET_DEVICES_references_USB_without_CONFIG_CMD_USB’
|
||||
BOOT_TARGET_DEVICES_references_USB_without_CONFIG_CMD_USB
|
||||
|
||||
Signed-off-by: Ajay Kaher <akaher@vmware.com>
|
||||
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
|
||||
Upstream-status: Backport
|
||||
---
|
||||
include/configs/rpi.h | 36 +++++++++++++++++++++++++++++++-----
|
||||
1 file changed, 31 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/include/configs/rpi.h b/include/configs/rpi.h
|
||||
index 9ce41767a9..f76c7d18ef 100644
|
||||
--- a/include/configs/rpi.h
|
||||
+++ b/include/configs/rpi.h
|
||||
@@ -146,12 +146,38 @@
|
||||
"fdt_addr_r=0x02600000\0" \
|
||||
"ramdisk_addr_r=0x02700000\0"
|
||||
|
||||
+#if CONFIG_IS_ENABLED(CMD_MMC)
|
||||
+ #define BOOT_TARGET_MMC(func) \
|
||||
+ func(MMC, mmc, 0) \
|
||||
+ func(MMC, mmc, 1)
|
||||
+#else
|
||||
+ #define BOOT_TARGET_MMC(func)
|
||||
+#endif
|
||||
+
|
||||
+#if CONFIG_IS_ENABLED(CMD_USB)
|
||||
+ #define BOOT_TARGET_USB(func) func(USB, usb, 0)
|
||||
+#else
|
||||
+ #define BOOT_TARGET_USB(func)
|
||||
+#endif
|
||||
+
|
||||
+#if CONFIG_IS_ENABLED(CMD_PXE)
|
||||
+ #define BOOT_TARGET_PXE(func) func(PXE, pxe, na)
|
||||
+#else
|
||||
+ #define BOOT_TARGET_PXE(func)
|
||||
+#endif
|
||||
+
|
||||
+#if CONFIG_IS_ENABLED(CMD_DHCP)
|
||||
+ #define BOOT_TARGET_DHCP(func) func(DHCP, dhcp, na)
|
||||
+#else
|
||||
+ #define BOOT_TARGET_DHCP(func)
|
||||
+#endif
|
||||
+
|
||||
#define BOOT_TARGET_DEVICES(func) \
|
||||
- func(MMC, mmc, 0) \
|
||||
- func(MMC, mmc, 1) \
|
||||
- func(USB, usb, 0) \
|
||||
- func(PXE, pxe, na) \
|
||||
- func(DHCP, dhcp, na)
|
||||
+ BOOT_TARGET_MMC(func) \
|
||||
+ BOOT_TARGET_USB(func) \
|
||||
+ BOOT_TARGET_PXE(func) \
|
||||
+ BOOT_TARGET_DHCP(func)
|
||||
+
|
||||
#include <config_distro_bootcmd.h>
|
||||
|
||||
#define CONFIG_EXTRA_ENV_SETTINGS \
|
||||
--
|
||||
2.22.0
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
From e8eb46a49317750bc6033b505cb5c07b4e06c9ee Mon Sep 17 00:00:00 2001
|
||||
From: Andrei Gherzan <andrei@balena.io>
|
||||
Date: Wed, 17 Jul 2019 15:32:11 +0100
|
||||
Subject: [PATCH 1/7] configs: rpi4: Add defconfigs for rpi4 (32/64)
|
||||
|
||||
This defines a minimum defconfig for each of the two Raspberry Pi 4
|
||||
variants. One notable difference is that we don't have a embedded dt for
|
||||
this board given that the fw supplies us with one which we can reuse.
|
||||
Furthermore, the ram size is not queryable through mbox interface as the
|
||||
maximum reported size is 1G. The fw patches the dt with the right
|
||||
memory configuration and uboot uses it as it is. We avoid u-boot
|
||||
touching this configuration by making sure CONFIG_ARCH_FIXUP_FDT_MEMORY
|
||||
is deactivated.
|
||||
|
||||
Signed-off-by: Andrei Gherzan <andrei@balena.io>
|
||||
Upstream-status: Pending
|
||||
---
|
||||
configs/rpi_4_32b_defconfig | 33 +++++++++++++++++++++++++++++++++
|
||||
configs/rpi_4_defconfig | 33 +++++++++++++++++++++++++++++++++
|
||||
2 files changed, 66 insertions(+)
|
||||
create mode 100644 configs/rpi_4_32b_defconfig
|
||||
create mode 100644 configs/rpi_4_defconfig
|
||||
|
||||
diff --git a/configs/rpi_4_32b_defconfig b/configs/rpi_4_32b_defconfig
|
||||
new file mode 100644
|
||||
index 0000000000..a31a617a5f
|
||||
--- /dev/null
|
||||
+++ b/configs/rpi_4_32b_defconfig
|
||||
@@ -0,0 +1,33 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_ARCH_BCM283X=y
|
||||
+CONFIG_SYS_TEXT_BASE=0x00008000
|
||||
+CONFIG_TARGET_RPI_4_32B=y
|
||||
+CONFIG_SYS_MALLOC_F_LEN=0x2000
|
||||
+CONFIG_DISTRO_DEFAULTS=y
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
|
||||
+CONFIG_OF_BOARD=y
|
||||
+CONFIG_OF_BOARD_SETUP=y
|
||||
+CONFIG_MISC_INIT_R=y
|
||||
+# CONFIG_DISPLAY_CPUINFO is not set
|
||||
+# CONFIG_DISPLAY_BOARDINFO is not set
|
||||
+CONFIG_SYS_PROMPT="U-Boot> "
|
||||
+# CONFIG_CMD_FLASH is not set
|
||||
+CONFIG_CMD_GPIO=y
|
||||
+CONFIG_CMD_MMC=y
|
||||
+CONFIG_CMD_FS_UUID=y
|
||||
+CONFIG_ENV_FAT_INTERFACE="mmc"
|
||||
+CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
|
||||
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
+CONFIG_DM_KEYBOARD=y
|
||||
+CONFIG_DM_MMC=y
|
||||
+CONFIG_MMC_SDHCI=y
|
||||
+CONFIG_MMC_SDHCI_BCM2835=y
|
||||
+CONFIG_PINCTRL=y
|
||||
+# CONFIG_PINCTRL_GENERIC is not set
|
||||
+# CONFIG_REQUIRE_SERIAL_CONSOLE is not set
|
||||
+CONFIG_DM_VIDEO=y
|
||||
+CONFIG_SYS_WHITE_ON_BLACK=y
|
||||
+CONFIG_CONSOLE_SCROLL_LINES=10
|
||||
+CONFIG_PHYS_TO_BUS=y
|
||||
+CONFIG_OF_LIBFDT_OVERLAY=y
|
||||
diff --git a/configs/rpi_4_defconfig b/configs/rpi_4_defconfig
|
||||
new file mode 100644
|
||||
index 0000000000..da8c960a2a
|
||||
--- /dev/null
|
||||
+++ b/configs/rpi_4_defconfig
|
||||
@@ -0,0 +1,33 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_ARCH_BCM283X=y
|
||||
+CONFIG_SYS_TEXT_BASE=0x00080000
|
||||
+CONFIG_TARGET_RPI_4=y
|
||||
+CONFIG_SYS_MALLOC_F_LEN=0x2000
|
||||
+CONFIG_DISTRO_DEFAULTS=y
|
||||
+CONFIG_NR_DRAM_BANKS=1
|
||||
+# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
|
||||
+CONFIG_OF_BOARD=y
|
||||
+CONFIG_OF_BOARD_SETUP=y
|
||||
+CONFIG_MISC_INIT_R=y
|
||||
+# CONFIG_DISPLAY_CPUINFO is not set
|
||||
+# CONFIG_DISPLAY_BOARDINFO is not set
|
||||
+CONFIG_SYS_PROMPT="U-Boot> "
|
||||
+# CONFIG_CMD_FLASH is not set
|
||||
+CONFIG_CMD_GPIO=y
|
||||
+CONFIG_CMD_MMC=y
|
||||
+CONFIG_CMD_FS_UUID=y
|
||||
+CONFIG_ENV_FAT_INTERFACE="mmc"
|
||||
+CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
|
||||
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
+CONFIG_DM_KEYBOARD=y
|
||||
+CONFIG_DM_MMC=y
|
||||
+CONFIG_MMC_SDHCI=y
|
||||
+CONFIG_MMC_SDHCI_BCM2835=y
|
||||
+CONFIG_PINCTRL=y
|
||||
+# CONFIG_PINCTRL_GENERIC is not set
|
||||
+# CONFIG_REQUIRE_SERIAL_CONSOLE is not set
|
||||
+CONFIG_DM_VIDEO=y
|
||||
+CONFIG_SYS_WHITE_ON_BLACK=y
|
||||
+CONFIG_CONSOLE_SCROLL_LINES=10
|
||||
+CONFIG_PHYS_TO_BUS=y
|
||||
+CONFIG_OF_LIBFDT_OVERLAY=y
|
||||
--
|
||||
2.22.0
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
From 960fd526d0ce4d54fe40cfbdbc215a54c18c7100 Mon Sep 17 00:00:00 2001
|
||||
From: Matthias Brugger <mbrugger@suse.com>
|
||||
Date: Fri, 12 Jul 2019 18:20:53 +0200
|
||||
Subject: [PATCH 2/7] ARM: bcm283x: Add BCM283x_BASE define
|
||||
|
||||
Devices of bcm283x have different base address, depending if they are on
|
||||
bcm2835 or bcm2836/7. Use BCM283x_BASE depending on the SoC you want to
|
||||
build and only add the offset in the header files.
|
||||
|
||||
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
|
||||
Signed-off-by: Andrei Gherzan <andrei@balena.io>
|
||||
Upstream-status: Pending
|
||||
---
|
||||
arch/arm/mach-bcm283x/Kconfig | 5 +++++
|
||||
arch/arm/mach-bcm283x/include/mach/mbox.h | 6 +-----
|
||||
arch/arm/mach-bcm283x/include/mach/sdhci.h | 6 +-----
|
||||
arch/arm/mach-bcm283x/include/mach/timer.h | 6 +-----
|
||||
arch/arm/mach-bcm283x/include/mach/wdog.h | 6 +-----
|
||||
5 files changed, 9 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach-bcm283x/Kconfig
|
||||
index 821caedbf7..d702f17f4b 100644
|
||||
--- a/arch/arm/mach-bcm283x/Kconfig
|
||||
+++ b/arch/arm/mach-bcm283x/Kconfig
|
||||
@@ -141,4 +141,9 @@ config SYS_SOC
|
||||
config SYS_CONFIG_NAME
|
||||
default "rpi"
|
||||
|
||||
+config BCM283x_BASE
|
||||
+ hex
|
||||
+ default "0x20000000" if BCM2835
|
||||
+ default "0x3f000000" if BCM2836 || BCM2837
|
||||
+
|
||||
endmenu
|
||||
diff --git a/arch/arm/mach-bcm283x/include/mach/mbox.h b/arch/arm/mach-bcm283x/include/mach/mbox.h
|
||||
index 2776a396c7..81cd5780e4 100644
|
||||
--- a/arch/arm/mach-bcm283x/include/mach/mbox.h
|
||||
+++ b/arch/arm/mach-bcm283x/include/mach/mbox.h
|
||||
@@ -37,11 +37,7 @@
|
||||
|
||||
/* Raw mailbox HW */
|
||||
|
||||
-#ifndef CONFIG_BCM2835
|
||||
-#define BCM2835_MBOX_PHYSADDR 0x3f00b880
|
||||
-#else
|
||||
-#define BCM2835_MBOX_PHYSADDR 0x2000b880
|
||||
-#endif
|
||||
+#define BCM2835_MBOX_PHYSADDR (CONFIG_BCM283x_BASE + 0x0000b880)
|
||||
|
||||
struct bcm2835_mbox_regs {
|
||||
u32 read;
|
||||
diff --git a/arch/arm/mach-bcm283x/include/mach/sdhci.h b/arch/arm/mach-bcm283x/include/mach/sdhci.h
|
||||
index 5cb6ec3340..b443c379d8 100644
|
||||
--- a/arch/arm/mach-bcm283x/include/mach/sdhci.h
|
||||
+++ b/arch/arm/mach-bcm283x/include/mach/sdhci.h
|
||||
@@ -6,11 +6,7 @@
|
||||
#ifndef _BCM2835_SDHCI_H_
|
||||
#define _BCM2835_SDHCI_H_
|
||||
|
||||
-#ifndef CONFIG_BCM2835
|
||||
-#define BCM2835_SDHCI_BASE 0x3f300000
|
||||
-#else
|
||||
-#define BCM2835_SDHCI_BASE 0x20300000
|
||||
-#endif
|
||||
+#define BCM2835_SDHCI_BASE (CONFIG_BCM283x_BASE + 0x00300000)
|
||||
|
||||
int bcm2835_sdhci_init(u32 regbase, u32 emmc_freq);
|
||||
|
||||
diff --git a/arch/arm/mach-bcm283x/include/mach/timer.h b/arch/arm/mach-bcm283x/include/mach/timer.h
|
||||
index 56b0c356bb..014355e759 100644
|
||||
--- a/arch/arm/mach-bcm283x/include/mach/timer.h
|
||||
+++ b/arch/arm/mach-bcm283x/include/mach/timer.h
|
||||
@@ -6,11 +6,7 @@
|
||||
#ifndef _BCM2835_TIMER_H
|
||||
#define _BCM2835_TIMER_H
|
||||
|
||||
-#ifndef CONFIG_BCM2835
|
||||
-#define BCM2835_TIMER_PHYSADDR 0x3f003000
|
||||
-#else
|
||||
-#define BCM2835_TIMER_PHYSADDR 0x20003000
|
||||
-#endif
|
||||
+#define BCM2835_TIMER_PHYSADDR (CONFIG_BCM283x_BASE + 0x00003000)
|
||||
|
||||
#define BCM2835_TIMER_CS_M3 (1 << 3)
|
||||
#define BCM2835_TIMER_CS_M2 (1 << 2)
|
||||
diff --git a/arch/arm/mach-bcm283x/include/mach/wdog.h b/arch/arm/mach-bcm283x/include/mach/wdog.h
|
||||
index 99c88e5df7..00b5e06c3a 100644
|
||||
--- a/arch/arm/mach-bcm283x/include/mach/wdog.h
|
||||
+++ b/arch/arm/mach-bcm283x/include/mach/wdog.h
|
||||
@@ -6,11 +6,7 @@
|
||||
#ifndef _BCM2835_WDOG_H
|
||||
#define _BCM2835_WDOG_H
|
||||
|
||||
-#ifndef CONFIG_BCM2835
|
||||
-#define BCM2835_WDOG_PHYSADDR 0x3f100000
|
||||
-#else
|
||||
-#define BCM2835_WDOG_PHYSADDR 0x20100000
|
||||
-#endif
|
||||
+#define BCM2835_WDOG_PHYSADDR (CONFIG_BCM283x_BASE + 0x00100000)
|
||||
|
||||
struct bcm2835_wdog_regs {
|
||||
u32 unknown0[7];
|
||||
--
|
||||
2.22.0
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
From 83f8a3a98ea268873e45a1b3868b2f5bdcc3b5f1 Mon Sep 17 00:00:00 2001
|
||||
From: Andrei Gherzan <andrei@balena.io>
|
||||
Date: Wed, 17 Jul 2019 15:33:01 +0100
|
||||
Subject: [PATCH 3/7] arm: mach-bcm283x: Define configs for RaspberryPi 4
|
||||
|
||||
Define two target configs for Raspberry Pi 4 (32 and 64bit) and the
|
||||
corresponding BCM2838* configs.
|
||||
|
||||
Be aware of the current limitation in firmware which requires an
|
||||
explicit configuration to force the arm in 64bit mode when the
|
||||
respective target is used.
|
||||
|
||||
Signed-off-by: Andrei Gherzan <andrei@balena.io>
|
||||
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
|
||||
Upstream-status: Pending
|
||||
---
|
||||
arch/arm/mach-bcm283x/Kconfig | 62 +++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 62 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach-bcm283x/Kconfig
|
||||
index d702f17f4b..a3311500fa 100644
|
||||
--- a/arch/arm/mach-bcm283x/Kconfig
|
||||
+++ b/arch/arm/mach-bcm283x/Kconfig
|
||||
@@ -26,6 +26,23 @@ config BCM2837_64B
|
||||
select BCM2837
|
||||
select ARM64
|
||||
|
||||
+config BCM2838
|
||||
+ bool "Broadcom BCM2838 SoC support"
|
||||
+ depends on ARCH_BCM283X
|
||||
+
|
||||
+config BCM2838_32B
|
||||
+ bool "Broadcom BCM2838 SoC 32-bit support"
|
||||
+ depends on ARCH_BCM283X
|
||||
+ select BCM2838
|
||||
+ select ARMV7_LPAE
|
||||
+ select CPU_V7A
|
||||
+
|
||||
+config BCM2838_64B
|
||||
+ bool "Broadcom BCM2838 SoC 64-bit support"
|
||||
+ depends on ARCH_BCM283X
|
||||
+ select BCM2838
|
||||
+ select ARM64
|
||||
+
|
||||
menu "Broadcom BCM283X family"
|
||||
depends on ARCH_BCM283X
|
||||
|
||||
@@ -127,6 +144,50 @@ config TARGET_RPI_3
|
||||
This option creates a build targetting the ARMv8/AArch64 ISA.
|
||||
select BCM2837_64B
|
||||
|
||||
+config TARGET_RPI_4_32B
|
||||
+ bool "Raspberry Pi 4 32-bit build"
|
||||
+ help
|
||||
+ Support for all BCM2838-based Raspberry Pi variants, such as
|
||||
+ the RPi 4 model B, in AArch32 (32-bit) mode.
|
||||
+
|
||||
+ This option assumes the VideoCore firmware is configured to use the
|
||||
+ mini UART (rather than PL011) for the serial console. This is the
|
||||
+ default on the RPi 4. To enable the UART console, the following non-
|
||||
+ default option must be present in config.txt: enable_uart=1. This is
|
||||
+ required for U-Boot to operate correctly, even if you only care
|
||||
+ about the HDMI/usbkbd console.
|
||||
+
|
||||
+ Due to hardware incompatibilities, this can't be used with
|
||||
+ BCM283/5/6/7.
|
||||
+
|
||||
+ This option creates a build targeting the ARMv7/AArch32 ISA.
|
||||
+ select BCM2838_32B
|
||||
+
|
||||
+config TARGET_RPI_4
|
||||
+ bool "Raspberry Pi 4 64-bit build"
|
||||
+ help
|
||||
+ Support for all BCM2838-based Raspberry Pi variants, such as
|
||||
+ the RPi 4 model B, in AArch64 (64-bit) mode.
|
||||
+
|
||||
+ This option assumes the VideoCore firmware is configured to use the
|
||||
+ mini UART (rather than PL011) for the serial console. This is the
|
||||
+ default on the RPi 4. To enable the UART console, the following non-
|
||||
+ default option must be present in config.txt: enable_uart=1. This is
|
||||
+ required for U-Boot to operate correctly, even if you only care
|
||||
+ about the HDMI/usbkbd console.
|
||||
+
|
||||
+ Due to hardware incompatibilities, this can't be used with
|
||||
+ BCM283/5/6/7.
|
||||
+
|
||||
+ Also, due to a bug in firmware, switching to 64bit mode doesn't
|
||||
+ happen automatically based on the kernel's image filename. See
|
||||
+ https://github.com/raspberrypi/firmware/issues/1193 for more details.
|
||||
+ Until that is resolved, the configuration (config.txt) needs to
|
||||
+ explicitly set: arm_64bit=1.
|
||||
+
|
||||
+ This option creates a build targeting the ARMv8/AArch64 ISA.
|
||||
+ select BCM2838_64B
|
||||
+
|
||||
endchoice
|
||||
|
||||
config SYS_BOARD
|
||||
@@ -145,5 +206,6 @@ config BCM283x_BASE
|
||||
hex
|
||||
default "0x20000000" if BCM2835
|
||||
default "0x3f000000" if BCM2836 || BCM2837
|
||||
+ default "0xfe000000" if BCM2838
|
||||
|
||||
endmenu
|
||||
--
|
||||
2.22.0
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From c1f29f486b08ab6d90fe2c191157274f6dea0443 Mon Sep 17 00:00:00 2001
|
||||
From: Andrei Gherzan <andrei@balena.io>
|
||||
Date: Wed, 17 Jul 2019 15:34:18 +0100
|
||||
Subject: [PATCH 4/7] rpi: Add entry for Raspberry Pi 4 model B
|
||||
|
||||
The Raspebrry Pi 4 uses the new revision code scheme as documented by
|
||||
the foundation. This change adds an entry for this board as well.
|
||||
|
||||
Signed-off-by: Andrei Gherzan <andrei@balena.io>
|
||||
Upstream-status: Pending
|
||||
---
|
||||
board/raspberrypi/rpi/rpi.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
|
||||
index 153a1fdcb7..5510ea25c1 100644
|
||||
--- a/board/raspberrypi/rpi/rpi.c
|
||||
+++ b/board/raspberrypi/rpi/rpi.c
|
||||
@@ -143,6 +143,11 @@ static const struct rpi_model rpi_models_new_scheme[] = {
|
||||
DTB_DIR "bcm2837-rpi-3-a-plus.dtb",
|
||||
false,
|
||||
},
|
||||
+ [0x11] = {
|
||||
+ "4 Model B",
|
||||
+ DTB_DIR "bcm2838-rpi-4-b.dtb",
|
||||
+ true,
|
||||
+ },
|
||||
};
|
||||
|
||||
static const struct rpi_model rpi_models_old_scheme[] = {
|
||||
--
|
||||
2.22.0
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
From 8251fd2c39a40886e521ecfc115ef975b5956fd5 Mon Sep 17 00:00:00 2001
|
||||
From: Andrei Gherzan <andrei@balena.io>
|
||||
Date: Fri, 12 Jul 2019 11:26:10 +0100
|
||||
Subject: [PATCH 5/7] arm: bcm283x: Include definition for additional emmc
|
||||
clock
|
||||
|
||||
This clock has a different mbox ID so have this included in the relevant
|
||||
header file.
|
||||
|
||||
Signed-off-by: Andrei Gherzan <andrei@balena.io>
|
||||
Upstream-status: Pending
|
||||
---
|
||||
arch/arm/mach-bcm283x/include/mach/mbox.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/arch/arm/mach-bcm283x/include/mach/mbox.h b/arch/arm/mach-bcm283x/include/mach/mbox.h
|
||||
index 81cd5780e4..36d2621408 100644
|
||||
--- a/arch/arm/mach-bcm283x/include/mach/mbox.h
|
||||
+++ b/arch/arm/mach-bcm283x/include/mach/mbox.h
|
||||
@@ -230,6 +230,7 @@ struct bcm2835_mbox_tag_set_power_state {
|
||||
#define BCM2835_MBOX_CLOCK_ID_SDRAM 8
|
||||
#define BCM2835_MBOX_CLOCK_ID_PIXEL 9
|
||||
#define BCM2835_MBOX_CLOCK_ID_PWM 10
|
||||
+#define BCM2835_MBOX_CLOCK_ID_EMMC2 12
|
||||
|
||||
struct bcm2835_mbox_tag_get_clock_rate {
|
||||
struct bcm2835_mbox_tag_hdr tag_hdr;
|
||||
--
|
||||
2.22.0
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
From e789ab00b2e03b810571de6226c5e1e009d9036b Mon Sep 17 00:00:00 2001
|
||||
From: Matthias Brugger <mbrugger@suse.com>
|
||||
Date: Wed, 10 Jul 2019 13:24:36 +0200
|
||||
Subject: [PATCH 6/7] mmc: bcm2835_sdhci: Add support for bcm2711 device
|
||||
|
||||
The bcm2711 has two emmc controller. The difference is the clocks
|
||||
they use. Add support for the second emmc contoller.
|
||||
|
||||
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
|
||||
Signed-off-by: Andrei Gherzan <andrei@balena.io>
|
||||
Upstream-status: Pending
|
||||
---
|
||||
drivers/mmc/bcm2835_sdhci.c | 12 ++++++++++--
|
||||
1 file changed, 10 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c
|
||||
index 08bddd410e..e68dec3be7 100644
|
||||
--- a/drivers/mmc/bcm2835_sdhci.c
|
||||
+++ b/drivers/mmc/bcm2835_sdhci.c
|
||||
@@ -178,12 +178,13 @@ static int bcm2835_sdhci_probe(struct udevice *dev)
|
||||
fdt_addr_t base;
|
||||
int emmc_freq;
|
||||
int ret;
|
||||
+ int clock_id = (int)dev_get_driver_data(dev);
|
||||
|
||||
base = devfdt_get_addr(dev);
|
||||
if (base == FDT_ADDR_T_NONE)
|
||||
return -EINVAL;
|
||||
|
||||
- ret = bcm2835_get_mmc_clock(BCM2835_MBOX_CLOCK_ID_EMMC);
|
||||
+ ret = bcm2835_get_mmc_clock(clock_id);
|
||||
if (ret < 0) {
|
||||
debug("%s: Failed to set MMC clock (err=%d)\n", __func__, ret);
|
||||
return ret;
|
||||
@@ -228,7 +229,14 @@ static int bcm2835_sdhci_probe(struct udevice *dev)
|
||||
}
|
||||
|
||||
static const struct udevice_id bcm2835_sdhci_match[] = {
|
||||
- { .compatible = "brcm,bcm2835-sdhci" },
|
||||
+ {
|
||||
+ .compatible = "brcm,bcm2835-sdhci",
|
||||
+ .data = BCM2835_MBOX_CLOCK_ID_EMMC
|
||||
+ },
|
||||
+ {
|
||||
+ .compatible = "brcm,bcm2711-emmc2",
|
||||
+ .data = BCM2835_MBOX_CLOCK_ID_EMMC2
|
||||
+ },
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
|
||||
--
|
||||
2.22.0
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
From cfb82f8e75438979565617d323eb2c2849e486ce Mon Sep 17 00:00:00 2001
|
||||
From: Andrei Gherzan <andrei@balena.io>
|
||||
Date: Fri, 12 Jul 2019 14:27:31 +0100
|
||||
Subject: [PATCH 7/7] rpi: Add memory map for bcm2838
|
||||
|
||||
Define the memory map for the BCM2838 based on the dt configuration
|
||||
available in the Raspberry Pi kernel fork.
|
||||
|
||||
Signed-off-by: Andrei Gherzan <andrei@balena.io>
|
||||
Upstream-status: Pending
|
||||
---
|
||||
board/raspberrypi/rpi/rpi.c | 27 ++++++++++++++++++++++++---
|
||||
1 file changed, 24 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
|
||||
index 5510ea25c1..9dac64b920 100644
|
||||
--- a/board/raspberrypi/rpi/rpi.c
|
||||
+++ b/board/raspberrypi/rpi/rpi.c
|
||||
@@ -244,7 +244,8 @@ static uint32_t rev_type;
|
||||
static const struct rpi_model *model;
|
||||
|
||||
#ifdef CONFIG_ARM64
|
||||
-static struct mm_region bcm2837_mem_map[] = {
|
||||
+#ifndef CONFIG_BCM2838
|
||||
+static struct mm_region bcm283x_mem_map[] = {
|
||||
{
|
||||
.virt = 0x00000000UL,
|
||||
.phys = 0x00000000UL,
|
||||
@@ -263,8 +264,28 @@ static struct mm_region bcm2837_mem_map[] = {
|
||||
0,
|
||||
}
|
||||
};
|
||||
-
|
||||
-struct mm_region *mem_map = bcm2837_mem_map;
|
||||
+#else
|
||||
+static struct mm_region bcm283x_mem_map[] = {
|
||||
+ {
|
||||
+ .virt = 0x00000000UL,
|
||||
+ .phys = 0x00000000UL,
|
||||
+ .size = 0xfe000000UL,
|
||||
+ .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
|
||||
+ PTE_BLOCK_INNER_SHARE
|
||||
+ }, {
|
||||
+ .virt = 0xfe000000UL,
|
||||
+ .phys = 0xfe000000UL,
|
||||
+ .size = 0x01800000UL,
|
||||
+ .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
|
||||
+ PTE_BLOCK_NON_SHARE |
|
||||
+ PTE_BLOCK_PXN | PTE_BLOCK_UXN
|
||||
+ }, {
|
||||
+ /* List terminator */
|
||||
+ 0,
|
||||
+ }
|
||||
+};
|
||||
+#endif
|
||||
+struct mm_region *mem_map = bcm283x_mem_map;
|
||||
#endif
|
||||
|
||||
int dram_init(void)
|
||||
--
|
||||
2.22.0
|
||||
|
||||
2
recipes-bsp/u-boot/u-boot-fw-utils_2019.01.bbappend
Normal file
2
recipes-bsp/u-boot/u-boot-fw-utils_2019.01.bbappend
Normal file
@@ -0,0 +1,2 @@
|
||||
# Apply the same patches for rpi4 as u-boot recipe
|
||||
require u-boot-rpi4-${PV}.inc
|
||||
13
recipes-bsp/u-boot/u-boot-rpi4-2019.01.inc
Normal file
13
recipes-bsp/u-boot/u-boot-rpi4-2019.01.inc
Normal file
@@ -0,0 +1,13 @@
|
||||
FILESEXTRAPATHS_prepend_raspberrypi4 := "${THISDIR}/u-boot-2019.01:"
|
||||
UBOOT_RPI4_SUPPORT_PATCHES = " \
|
||||
file://0001-Fix-compilation-error-if-CONFIG_USB-is-disabled.patch \
|
||||
file://0001-configs-rpi4-Add-defconfigs-for-rpi4-32-64.patch \
|
||||
file://0002-ARM-bcm283x-Add-BCM283x_BASE-define.patch \
|
||||
file://0003-arm-mach-bcm283x-Define-configs-for-RaspberryPi-4.patch \
|
||||
file://0004-rpi-Add-entry-for-Raspberry-Pi-4-model-B.patch \
|
||||
file://0005-arm-bcm283x-Include-definition-for-additional-emmc-c.patch \
|
||||
file://0006-mmc-bcm2835_sdhci-Add-support-for-bcm2711-device.patch \
|
||||
file://0007-rpi-Add-memory-map-for-bcm2838.patch \
|
||||
"
|
||||
|
||||
SRC_URI_append_raspberrypi4 = "${UBOOT_RPI4_SUPPORT_PATCHES}"
|
||||
2
recipes-bsp/u-boot/u-boot_2019.01.bbappend
Normal file
2
recipes-bsp/u-boot/u-boot_2019.01.bbappend
Normal file
@@ -0,0 +1,2 @@
|
||||
# Apply the same patches for rpi4 as u-boot recipe
|
||||
require u-boot-rpi4-${PV}.inc
|
||||
@@ -1,6 +1,6 @@
|
||||
FILESEXTRAPATHS_prepend_rpi := "${THISDIR}/${PN}:"
|
||||
|
||||
RC_URI_append_rpi = "\
|
||||
SRC_URI_append_rpi = "\
|
||||
file://0001-bcm43xx-Add-bcm43xx-3wire-variant.patch \
|
||||
file://0002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch \
|
||||
file://0003-Increase-firmware-load-timeout-to-30s.patch \
|
||||
|
||||
@@ -19,7 +19,7 @@ RDEPENDS_${PN} = "\
|
||||
python-sense-hat \
|
||||
connman \
|
||||
connman-client \
|
||||
crda \
|
||||
wireless-regdb \
|
||||
bluez5 \
|
||||
"
|
||||
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
# as default. To state out clearly that Raspi needs dri3 and to avoid surprises
|
||||
# in case oe-core changes this default, we set dri3 explicitly.
|
||||
PACKAGECONFIG_append_rpi = " gallium ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 dri3', '', d)}"
|
||||
GALLIUMDRIVERS_append_rpi = ",vc4"
|
||||
GALLIUMDRIVERS_append_rpi = ",vc4,v3d,kmsro"
|
||||
DRIDRIVERS_rpi = ""
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 829dff626d423ad34c8e710cd10d5fc9a4ea80b3 Mon Sep 17 00:00:00 2001
|
||||
From ccb7f6f1a2bc491a24c0402616a2d24b85e3933a 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/18] Allow applications to set next resource handle
|
||||
Subject: [PATCH 01/19] Allow applications to set next resource handle
|
||||
|
||||
This patch adds provisions in userland to
|
||||
let apps callers set the next rendereing dispmanx resource.
|
||||
@@ -204,5 +204,5 @@ index 8a5734c..51b3580 100644
|
||||
|
||||
FN(void, eglIntGetColorData_impl, (EGL_SURFACE_ID_T s, KHRN_IMAGE_FORMAT_T format, uint32_t width, uint32_t height, int32_t stride, uint32_t y_offset, void *data))
|
||||
--
|
||||
2.20.1
|
||||
2.22.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 469840d211beb22085e57934bda3caabb71a4695 Mon Sep 17 00:00:00 2001
|
||||
From 7432d49ddca97b34e402d0108221d34ec69bcd66 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/18] wayland: Add support for the Wayland winsys
|
||||
Subject: [PATCH 02/19] wayland: Add support for the Wayland winsys
|
||||
|
||||
* Adds EGL_WL_bind_wayland_display extension
|
||||
* Adds wayland-egl library
|
||||
@@ -91,11 +91,11 @@ index cfc8ae5..673a5ad 100644
|
||||
|
||||
# Global include paths
|
||||
diff --git a/README.md b/README.md
|
||||
index de5754d..2097036 100644
|
||||
index 404e4d4..97a6b8f 100644
|
||||
--- a/README.md
|
||||
+++ b/README.md
|
||||
@@ -6,3 +6,7 @@ Use buildme to build. It requires cmake to be installed and an arm cross compile
|
||||
https://github.com/raspberrypi/tools/tree/master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian
|
||||
@@ -8,3 +8,7 @@ https://github.com/raspberrypi/tools/tree/master/arm-bcm2708/gcc-linaro-arm-linu
|
||||
Whilst 64-bit userspace is not officially supported, some of the libraries will work for it. To cross compile, install gcc-aarch64-linux-gnu and g++-aarch64-linux-gnu first. For both native and cross compiles, add the option ```--aarch64``` to the buildme command.
|
||||
|
||||
Note that this repository does not contain the source for the edidparser and vcdbg binaries due to licensing restrictions.
|
||||
+
|
||||
@@ -103,10 +103,10 @@ index de5754d..2097036 100644
|
||||
+
|
||||
+$ BUILD_WAYLAND=1 ./buildme.
|
||||
diff --git a/buildme b/buildme
|
||||
index b8fd440..a780bb6 100755
|
||||
index cee90a6..d1d76a7 100755
|
||||
--- a/buildme
|
||||
+++ b/buildme
|
||||
@@ -8,6 +8,10 @@ fi
|
||||
@@ -17,6 +17,10 @@ fi
|
||||
|
||||
BUILDSUBDIR=`echo $BUILDTYPE | tr '[A-Z]' '[a-z]'`;
|
||||
|
||||
@@ -114,10 +114,10 @@ index b8fd440..a780bb6 100755
|
||||
+ WAYLAND_VARS="-DBUILD_WAYLAND=TRUE"
|
||||
+fi
|
||||
+
|
||||
if [ "armv6l" = `arch` ] || [ "armv7l" = `arch` ]; then
|
||||
if [ $ARCH = "armv6l" ] || [ $ARCH = "armv7l" ] || [ $ARCH = "aarch64" ]; then
|
||||
# Native compile on the Raspberry Pi
|
||||
mkdir -p build/raspberry/$BUILDSUBDIR
|
||||
@@ -32,9 +36,13 @@ elif [ "$1" = "--native" ]; then
|
||||
@@ -41,9 +45,13 @@ elif [ "$1" = "--native" ]; then
|
||||
make -j `nproc` $*
|
||||
else
|
||||
# Cross compile on a more capable machine
|
||||
@@ -127,8 +127,8 @@ index b8fd440..a780bb6 100755
|
||||
+ fi
|
||||
mkdir -p build/arm-linux/$BUILDSUBDIR
|
||||
pushd build/arm-linux/$BUILDSUBDIR
|
||||
- cmake -DCMAKE_TOOLCHAIN_FILE=../../../makefiles/cmake/toolchains/arm-linux-gnueabihf.cmake -DCMAKE_BUILD_TYPE=$BUILDTYPE ../../..
|
||||
+ cmake -DCMAKE_TOOLCHAIN_FILE=../../../makefiles/cmake/toolchains/arm-linux-gnueabihf.cmake -DCMAKE_BUILD_TYPE=$BUILDTYPE $WAYLAND_VARS ../../..
|
||||
- cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE -DCMAKE_BUILD_TYPE=$BUILDTYPE -DARM64=$ARM64 ../../..
|
||||
+ cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE -DCMAKE_BUILD_TYPE=$BUILDTYPE -DARM64=$ARM64 $WAYLAND_VARS ../../..
|
||||
make -j `nproc`
|
||||
|
||||
if [ "$1" != "" ]; then
|
||||
@@ -1551,12 +1551,12 @@ 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 fde18da..6718215 100755
|
||||
index a157db1..55b6ace 100755
|
||||
--- a/interface/vmcs_host/CMakeLists.txt
|
||||
+++ b/interface/vmcs_host/CMakeLists.txt
|
||||
@@ -9,13 +9,24 @@ add_definitions(-fno-strict-aliasing)
|
||||
|
||||
include_directories(${VMCS_TARGET}/vcfiled)
|
||||
@@ -7,13 +7,24 @@
|
||||
# vc_vchi_gencmd.c has a type-punning problem in vc_gencmd_read_response
|
||||
add_definitions(-fno-strict-aliasing)
|
||||
|
||||
-add_library(vchostif
|
||||
- ${VMCS_TARGET}/vcfilesys.c ${VMCS_TARGET}/vcmisc.c
|
||||
@@ -1894,5 +1894,5 @@ index 0000000..ad90d30
|
||||
+ set(${_sources} ${${_sources}} PARENT_SCOPE)
|
||||
+endfunction()
|
||||
--
|
||||
2.20.1
|
||||
2.22.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 2391bba64116135369147e930fb14b5824a9cef0 Mon Sep 17 00:00:00 2001
|
||||
From 481a9aeba3f84371668fdf8a1380a3cb23bfc502 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/18] wayland: Add Wayland example
|
||||
Subject: [PATCH 03/19] wayland: Add Wayland example
|
||||
|
||||
---
|
||||
.../linux/apps/hello_pi/CMakeLists.txt | 1 +
|
||||
@@ -19,10 +19,10 @@ Subject: [PATCH 03/18] wayland: Add Wayland example
|
||||
create mode 100644 host_applications/linux/apps/hello_pi/hello_wayland/triangle.c
|
||||
|
||||
diff --git a/host_applications/linux/apps/hello_pi/CMakeLists.txt b/host_applications/linux/apps/hello_pi/CMakeLists.txt
|
||||
index f2c6aef..0df78f7 100644
|
||||
index b28a94a..2849fad 100644
|
||||
--- a/host_applications/linux/apps/hello_pi/CMakeLists.txt
|
||||
+++ b/host_applications/linux/apps/hello_pi/CMakeLists.txt
|
||||
@@ -21,6 +21,7 @@ add_subdirectory(hello_encode)
|
||||
@@ -25,6 +25,7 @@ add_subdirectory(hello_encode)
|
||||
add_subdirectory(hello_jpeg)
|
||||
add_subdirectory(hello_videocube)
|
||||
add_subdirectory(hello_teapot)
|
||||
@@ -862,5 +862,5 @@ index 8225dd5..0be6ce7 100755
|
||||
make -C libs/ilclient
|
||||
make -C libs/vgfont
|
||||
@@ -31,4 +32,4 @@ make -C hello_videocube
|
||||
make -C hello_teapot
|
||||
make -C hello_teapot
|
||||
make -C hello_fft
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 3d1d046281b90d6777864b0d9a032657fad78d76 Mon Sep 17 00:00:00 2001
|
||||
From 4463e2732a09dbb721d0614e7147cbfaa9059930 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/18] wayland-egl: Add bcm_host to dependencies
|
||||
Subject: [PATCH 04/19] wayland-egl: Add bcm_host to dependencies
|
||||
|
||||
It uses headers like vcos_platform_types.h but does not
|
||||
depend on module which should add the required include paths
|
||||
@@ -24,5 +24,5 @@ index 8bafc15..fd259c9 100644
|
||||
Libs: -L${libdir} -lwayland-egl
|
||||
Cflags: -I${includedir}
|
||||
--
|
||||
2.20.1
|
||||
2.22.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From d17e5b9285635dcbe1c6e5a7398f6e5b1560a0c0 Mon Sep 17 00:00:00 2001
|
||||
From 571c417c055a57cfd42c30a7a8279332397bad83 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/18] interface: remove faulty assert() to make weston happy
|
||||
Subject: [PATCH 05/19] interface: remove faulty assert() to make weston happy
|
||||
at runtime
|
||||
|
||||
This was removed after a discussion on IRC with the weston guys
|
||||
@@ -25,5 +25,5 @@ index eab146e..29e0dee 100755
|
||||
}
|
||||
} else {
|
||||
--
|
||||
2.20.1
|
||||
2.22.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 7d4559c2418f4997dfdddefa9281250d0d8082db Mon Sep 17 00:00:00 2001
|
||||
From 393e90beb9f5e535b5ce5d9eba4bc74907a96afe 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/18] zero-out wl buffers in egl_surface_free
|
||||
Subject: [PATCH 06/19] zero-out wl buffers in egl_surface_free
|
||||
|
||||
origins from buildroot
|
||||
|
||||
@@ -29,5 +29,5 @@ index 42350bf..1f923d9 100644
|
||||
#endif
|
||||
}
|
||||
--
|
||||
2.20.1
|
||||
2.22.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 19e63107670bb15833744402d68c8fcae9e53a12 Mon Sep 17 00:00:00 2001
|
||||
From 3e7e309de25d546a4836c59523060f286aadd87d 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/18] initialize front back wayland buffers
|
||||
Subject: [PATCH 07/19] initialize front back wayland buffers
|
||||
|
||||
origins from metrological wayland support
|
||||
|
||||
@@ -30,5 +30,5 @@ index 1f923d9..9a9582c 100644
|
||||
}
|
||||
#endif
|
||||
--
|
||||
2.20.1
|
||||
2.22.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 4312ce4f9320b25f513c4d8fa163f9d8faebfd97 Mon Sep 17 00:00:00 2001
|
||||
From a08887086cf4418fa0999a340c574b66a5ab4412 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/18] Remove RPC_FLUSH
|
||||
Subject: [PATCH 08/19] Remove RPC_FLUSH
|
||||
|
||||
Origins from buildroot
|
||||
|
||||
@@ -23,5 +23,5 @@ index f9b7287..b04ffef 100644
|
||||
}
|
||||
#endif
|
||||
--
|
||||
2.20.1
|
||||
2.22.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From cb454ad44fcb35fc28b823f05f3538c1f997e89e Mon Sep 17 00:00:00 2001
|
||||
From e14d2bfff42be64361a873e73674ce1205af3ee5 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/18] fix cmake dependency race
|
||||
Subject: [PATCH 09/19] fix cmake dependency race
|
||||
|
||||
Fixes errors like
|
||||
|
||||
@@ -42,10 +42,10 @@ 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 6718215..c415176 100755
|
||||
index 55b6ace..ae52495 100755
|
||||
--- a/interface/vmcs_host/CMakeLists.txt
|
||||
+++ b/interface/vmcs_host/CMakeLists.txt
|
||||
@@ -17,14 +17,6 @@ set(VCHOSTIF_SOURCE
|
||||
@@ -15,14 +15,6 @@ set(VCHOSTIF_SOURCE
|
||||
# ${VMCS_TARGET}/vmcs_main.c
|
||||
# vc_vchi_haud.c
|
||||
|
||||
@@ -74,5 +74,5 @@ index f0bae30..8c44c58 100644
|
||||
struct wl_resource *resource;
|
||||
struct wl_dispmanx *dispmanx;
|
||||
--
|
||||
2.20.1
|
||||
2.22.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 2f0b25266d0b4b04ef78b8950f5bd9749857b4f0 Mon Sep 17 00:00:00 2001
|
||||
From ea3f7c3822efd33cec96a79eb9a345544b942d9e 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/18] Fix for framerate with nested composition
|
||||
Subject: [PATCH 10/19] Fix for framerate with nested composition
|
||||
|
||||
frame rate appears irregular and lower than expected when using nested composition.
|
||||
|
||||
@@ -56,5 +56,5 @@ index 03fe67b..13a110c 100644
|
||||
#ifdef ANDROID
|
||||
CLIENT_UNLOCK();
|
||||
--
|
||||
2.20.1
|
||||
2.22.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 5bc4118e7861f35ead6565530cb4213987296fb9 Mon Sep 17 00:00:00 2001
|
||||
From 407ab0ed315b4c7b49d1a1dd3777d5af8e0b7e66 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/18] build shared library for vchostif
|
||||
Subject: [PATCH 11/19] build shared library for vchostif
|
||||
|
||||
Fixes #149
|
||||
|
||||
@@ -11,10 +11,10 @@ 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 c415176..d0cca1a 100755
|
||||
index ae52495..369758b 100755
|
||||
--- a/interface/vmcs_host/CMakeLists.txt
|
||||
+++ b/interface/vmcs_host/CMakeLists.txt
|
||||
@@ -17,7 +17,7 @@ set(VCHOSTIF_SOURCE
|
||||
@@ -15,7 +15,7 @@ set(VCHOSTIF_SOURCE
|
||||
# ${VMCS_TARGET}/vmcs_main.c
|
||||
# vc_vchi_haud.c
|
||||
|
||||
@@ -24,5 +24,5 @@ index c415176..d0cca1a 100755
|
||||
#add_library(bufman vc_vchi_bufman.c )
|
||||
|
||||
--
|
||||
2.20.1
|
||||
2.22.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 27194bc05a7a488827590208285a8757164edcef Mon Sep 17 00:00:00 2001
|
||||
From 48a946e24c3e7172f1044f5815e9cfed96982830 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/18] implement buffer wrapping interface for dispmanx
|
||||
Subject: [PATCH 12/19] implement buffer wrapping interface for dispmanx
|
||||
|
||||
Courtesy: Zan Dobersek
|
||||
|
||||
@@ -88,5 +88,5 @@ index c18626d..11ed1ef 100644
|
||||
|
||||
</protocol>
|
||||
--
|
||||
2.20.1
|
||||
2.22.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From e99b2eafba5260b8087fc1a85830b08ea3228292 Mon Sep 17 00:00:00 2001
|
||||
From 31e61d1a1d26442be9c90c479e2b14589acedb0e 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/18] Implement triple buffering for wayland
|
||||
Subject: [PATCH 13/19] Implement triple buffering for wayland
|
||||
|
||||
Change from double to triple buffering for wayland.
|
||||
This enables higher frame rates without tearing artifacts
|
||||
@@ -86,5 +86,5 @@ index e328b77..58a3184 100644
|
||||
back_wl_buffer
|
||||
|
||||
--
|
||||
2.20.1
|
||||
2.22.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From a9726c7fdcd386bd104b13c494d261f693dde792 Mon Sep 17 00:00:00 2001
|
||||
From 961cd03f4db37041ae068cd8535f11cf739e42c0 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/18] GLES2/gl2ext.h: Define GL_R8_EXT and GL_RG8_EXT
|
||||
Subject: [PATCH 14/19] GLES2/gl2ext.h: Define GL_R8_EXT and GL_RG8_EXT
|
||||
|
||||
weston code uses these defines
|
||||
Upstream-Status: Pending
|
||||
@@ -31,5 +31,5 @@ index 4eacf7f..b1acc9f 100644
|
||||
#ifndef GL_EXT_texture_type_2_10_10_10_REV
|
||||
#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368
|
||||
--
|
||||
2.20.1
|
||||
2.22.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 3ba79e86cdec88440885fefc7aadf793b301b000 Mon Sep 17 00:00:00 2001
|
||||
From 9568135c3e4c23e9056135a13cee58c37456aaac Mon Sep 17 00:00:00 2001
|
||||
From: Andrea Galbusera <gizero@gmail.com>
|
||||
Date: Fri, 14 Jul 2017 09:52:54 +0200
|
||||
Subject: [PATCH 15/18] EGL/glplatform.h: define EGL_CAST
|
||||
Subject: [PATCH 15/19] 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.
|
||||
@@ -28,5 +28,5 @@ index 1f7c930..c39d425 100644
|
||||
+
|
||||
#endif /* __eglplatform_h */
|
||||
--
|
||||
2.20.1
|
||||
2.22.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 5c53b2ff4d14b988ae9ab453fb2ef97b6a277ded Mon Sep 17 00:00:00 2001
|
||||
From 493b013cb702b821fdeaef7021ae25dea88900c6 Mon Sep 17 00:00:00 2001
|
||||
From: Jeff Wannamaker <jeff_wannamaker@cable.comcast.com>
|
||||
Date: Sat, 27 Jan 2018 12:28:31 -0500
|
||||
Subject: [PATCH 16/18] Allow multiple wayland compositor state data per
|
||||
Subject: [PATCH 16/19] Allow multiple wayland compositor state data per
|
||||
process
|
||||
|
||||
When eglBindWaylandDisplayWL is called store the wl_global
|
||||
@@ -141,5 +141,5 @@ index 9ef89cd..abd5ab3 100644
|
||||
CLIENT_UNLOCK();
|
||||
|
||||
--
|
||||
2.20.1
|
||||
2.22.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0d3c6b7ca5d352cc00d9501b9d5576c4ece70a83 Mon Sep 17 00:00:00 2001
|
||||
From cc25f8abd4498004a276a4ee40e37681fa42422a Mon Sep 17 00:00:00 2001
|
||||
From: Hugo Hromic <hhromic@gmail.com>
|
||||
Date: Sun, 13 May 2018 10:49:04 +0100
|
||||
Subject: [PATCH 17/18] khronos: backport typedef for
|
||||
Subject: [PATCH 17/19] 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
|
||||
@@ -34,5 +34,5 @@ index d7e5ba7..dcc90ce 100755
|
||||
#ifndef EGL_WL_bind_wayland_display
|
||||
#define EGL_WL_bind_wayland_display 1
|
||||
--
|
||||
2.20.1
|
||||
2.22.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0f98ccac128265b85af3c5e310413fc9fce9f78c Mon Sep 17 00:00:00 2001
|
||||
From e091388b4382d90494b5842e9f591043a45b2b21 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sun, 15 Jul 2018 00:48:38 -0700
|
||||
Subject: [PATCH 18/18] Add EGL_IMG_context_priority related defines
|
||||
Subject: [PATCH 18/19] Add EGL_IMG_context_priority related defines
|
||||
|
||||
These defines are needed for compiling weston 4.x
|
||||
taken from Khronos headers
|
||||
@@ -31,5 +31,5 @@ index dcc90ce..6842bf9 100755
|
||||
#define EGL_KHR_vg_parent_image 1
|
||||
#define EGL_VG_PARENT_IMAGE_KHR 0x30BA /* eglCreateImageKHR target */
|
||||
--
|
||||
2.20.1
|
||||
2.22.0
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
From 5229430874b5275547babdbef1e322922317456d 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/19] 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
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
opensrc/helpers/libfdt/libfdt_env.h | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/opensrc/helpers/libfdt/libfdt_env.h b/opensrc/helpers/libfdt/libfdt_env.h
|
||||
index 1c966b8..fc25ca6 100644
|
||||
--- a/opensrc/helpers/libfdt/libfdt_env.h
|
||||
+++ b/opensrc/helpers/libfdt/libfdt_env.h
|
||||
@@ -56,6 +56,10 @@
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
+#ifdef __bitwise
|
||||
+#undef __bitwise
|
||||
+#endif
|
||||
+
|
||||
#ifdef __CHECKER__
|
||||
#define __force __attribute__((force))
|
||||
#define __bitwise __attribute__((bitwise))
|
||||
--
|
||||
2.22.0
|
||||
|
||||
@@ -12,11 +12,11 @@ COMPATIBLE_MACHINE = "^rpi$"
|
||||
|
||||
SRCBRANCH = "master"
|
||||
SRCFORK = "raspberrypi"
|
||||
SRCREV = "e5803f2c986cbf8c919c60278b3231dcdf4271a6"
|
||||
SRCREV = "17d2fdc1abd370e09ba7074753294c7976dd6b0d"
|
||||
|
||||
# Use the date of the above commit as the package version. Update this when
|
||||
# SRCREV is changed.
|
||||
PV = "20190114"
|
||||
PV = "20190724"
|
||||
|
||||
SRC_URI = "\
|
||||
git://github.com/${SRCFORK}/userland.git;protocol=git;branch=${SRCBRANCH} \
|
||||
@@ -38,6 +38,7 @@ SRC_URI = "\
|
||||
file://0016-Allow-multiple-wayland-compositor-state-data-per-pro.patch \
|
||||
file://0017-khronos-backport-typedef-for-EGL_EXT_image_dma_buf_i.patch \
|
||||
file://0018-Add-EGL_IMG_context_priority-related-defines.patch \
|
||||
file://0019-libfdt-Undefine-__wordsize-if-already-defined.patch \
|
||||
"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
@@ -64,7 +65,6 @@ do_install_append () {
|
||||
sed -i 's/include "vcos_futex_mutex.h"/include "pthreads\/vcos_futex_mutex.h"/g' ${f}
|
||||
sed -i 's/include "vcos_platform_types.h"/include "pthreads\/vcos_platform_types.h"/g' ${f}
|
||||
done
|
||||
install -D -m 0755 ${D}${prefix}${sysconfdir}/init.d/vcfiled ${D}${sysconfdir}/init.d/vcfiled
|
||||
rm -rf ${D}${prefix}${sysconfdir}
|
||||
if [ "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}" = "1" ]; then
|
||||
rm -rf ${D}${libdir}/libEGL*
|
||||
|
||||
@@ -8,7 +8,7 @@ COMPATIBLE_MACHINE = "^rpi$"
|
||||
|
||||
INHIBIT_DEFAULT_DEPS = "1"
|
||||
|
||||
include recipes-bsp/common/firmware.inc
|
||||
include recipes-bsp/common/raspberrypi-firmware.inc
|
||||
|
||||
SRC_URI += " \
|
||||
file://egl.pc \
|
||||
@@ -25,9 +25,6 @@ do_install () {
|
||||
install -d ${D}${bindir}
|
||||
cp -R bin/* ${D}${bindir}
|
||||
|
||||
install -d ${D}${sbindir}
|
||||
cp -R sbin/* ${D}${sbindir}
|
||||
|
||||
install -d ${D}${libdir}
|
||||
# note: -H option to deref symlinked .so
|
||||
cp -R -H lib/* ${D}${libdir}
|
||||
@@ -49,7 +46,6 @@ INITSCRIPT_NAME = "vchiq.sh"
|
||||
INITSCRIPT_PARAMS = "start 03 S ."
|
||||
|
||||
FILES_${PN} = "${bindir}/* \
|
||||
${sbindir}/* \
|
||||
${libdir}/lib*.so \
|
||||
${sysconfdir}/init.d \
|
||||
${libdir}/plugins"
|
||||
|
||||
@@ -25,7 +25,7 @@ LICENSE = "\
|
||||
"
|
||||
LIC_FILES_CHKSUM = "\
|
||||
file://LICENCE.broadcom_bcm43xx;md5=3160c14df7228891b868060e1951dfbc \
|
||||
file://WHENCE;md5=a9c2c217f513c20e1d16b384b3e2c12d \
|
||||
file://WHENCE;md5=7b12b2224438186e4c97c4c7f3a5cc28 \
|
||||
"
|
||||
|
||||
# These are not common licenses, set NO_GENERIC_LICENSE for them
|
||||
@@ -34,7 +34,8 @@ NO_GENERIC_LICENSE[Firmware-broadcom_bcm43xx-rpidistro] = "LICENCE.broadcom_bcm4
|
||||
NO_GENERIC_LICENSE[WHENCE] = "WHENCE"
|
||||
|
||||
SRC_URI = "git://github.com/RPi-Distro/firmware-nonfree"
|
||||
SRCREV = "b518de45ced519e8f7a499f4778100173402ae43"
|
||||
|
||||
SRCREV = "f0ad1a42b051aa9da1d9e1dc606dd68ec2f163a5"
|
||||
PV = "0.0+git${SRCPV}"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# see emmc node
|
||||
CONFIG_MMC_SDHCI_IPROC=y
|
||||
6
recipes-kernel/linux/linux-raspberrypi-rt_4.19.bb
Normal file
6
recipes-kernel/linux/linux-raspberrypi-rt_4.19.bb
Normal file
@@ -0,0 +1,6 @@
|
||||
LINUX_VERSION ?= "4.19.71"
|
||||
LINUX_RPI_BRANCH ?= "rpi-4.19.y-rt"
|
||||
|
||||
SRCREV = "1532ea50263c8fd70f769b55e60fbc6a0c5778a0"
|
||||
|
||||
require linux-raspberrypi_4.19.inc
|
||||
@@ -19,6 +19,8 @@ KBUILD_DEFCONFIG_raspberrypi ?= "bcmrpi_defconfig"
|
||||
KBUILD_DEFCONFIG_raspberrypi2 ?= "bcm2709_defconfig"
|
||||
KBUILD_DEFCONFIG_raspberrypi3 ?= "bcm2709_defconfig"
|
||||
KBUILD_DEFCONFIG_raspberrypi3-64 ?= "bcmrpi3_defconfig"
|
||||
KBUILD_DEFCONFIG_raspberrypi4 ?= "bcm2711_defconfig"
|
||||
KBUILD_DEFCONFIG_raspberrypi4-64 ?= "bcm2711_defconfig"
|
||||
|
||||
# CMDLINE for raspberrypi
|
||||
SERIAL = "${@oe.utils.conditional("ENABLE_UART", "1", "console=serial0,115200", "", d)}"
|
||||
@@ -120,17 +122,21 @@ do_configure_prepend() {
|
||||
rm -f ${B}/.config.patched
|
||||
}
|
||||
|
||||
do_compile_append_raspberrypi3-64() {
|
||||
cc_extra=$(get_cc_option)
|
||||
oe_runmake dtbs CC="${KERNEL_CC} $cc_extra " LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS}
|
||||
do_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
|
||||
install -d ${DEPLOYDIR}/bcm2835-bootfiles
|
||||
PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
|
||||
if [ ${PITFT} = "1" ]; then
|
||||
PITFT_PARAMS="fbcon=map:10 fbcon=font:VGA8x8"
|
||||
# Deploy cmdline.txt for the main kernel package
|
||||
if [ ${KERNEL_PACKAGE_NAME} = "kernel" ]; then
|
||||
install -d ${DEPLOYDIR}/bcm2835-bootfiles
|
||||
PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
|
||||
if [ ${PITFT} = "1" ]; then
|
||||
PITFT_PARAMS="fbcon=map:10 fbcon=font:VGA8x8"
|
||||
fi
|
||||
echo "${CMDLINE}${PITFT_PARAMS}" > ${DEPLOYDIR}/bcm2835-bootfiles/cmdline.txt
|
||||
fi
|
||||
echo "${CMDLINE}${PITFT_PARAMS}" > ${DEPLOYDIR}/bcm2835-bootfiles/cmdline.txt
|
||||
}
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/linux-raspberrypi:"
|
||||
|
||||
LINUX_VERSION ?= "4.19.34"
|
||||
LINUX_VERSION ?= "4.19.88"
|
||||
LINUX_RPI_BRANCH ?= "rpi-4.19.y"
|
||||
|
||||
SRCREV = "ab8652c03fa081b27de7e28a74c2536cb2aa3e5b"
|
||||
SRC_URI = " \
|
||||
git://github.com/raspberrypi/linux.git;protocol=git;branch=${LINUX_RPI_BRANCH} \
|
||||
"
|
||||
require linux-raspberrypi.inc
|
||||
SRCREV = "988cc7beacc150756c3fbe40646afcf8438b741b"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
|
||||
require linux-raspberrypi_4.19.inc
|
||||
|
||||
12
recipes-kernel/linux/linux-raspberrypi_4.19.inc
Normal file
12
recipes-kernel/linux/linux-raspberrypi_4.19.inc
Normal file
@@ -0,0 +1,12 @@
|
||||
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'"
|
||||
@@ -20,7 +20,7 @@ Index: git/Makefile.ffmpeg
|
||||
@@ -1,5 +1,7 @@
|
||||
CFLAGS=-D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_HAVE_SBRK -D_LARGEFILE64_SOURCE -DHAVE_CMAKE_CONFIG -DHAVE_VMCS_CONFIG -D_REENTRANT -DUSE_VCHIQ_ARM -DVCHI_BULK_ALIGN=1 -DVCHI_BULK_GRANULARITY=1 -DEGL_SERVER_DISPMANX -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__VIDEOCORE4__ -DGRAPHICS_X_VG=1 -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DOMX -DOMX_SKIP64BIT
|
||||
|
||||
+FFMPEG_EXTRA_CFLAGS?=-mfpu=vfp -mfloat-abi=$(FLOAT) -mno-apcs-stack-check -mstructure-size-boundary=32 -mno-sched-prolog
|
||||
+FFMPEG_EXTRA_CFLAGS?=-mfpu=vfp -mfloat-abi=$(FLOAT)
|
||||
+
|
||||
WORK=$(PWD)
|
||||
|
||||
@@ -29,7 +29,7 @@ Index: git/Makefile.ffmpeg
|
||||
CFLAGS="$(CFLAGS) ${INCLUDES}" \
|
||||
LDFLAGS="" \
|
||||
./configure \
|
||||
- --extra-cflags="-mfpu=vfp -mfloat-abi=hard -mno-apcs-stack-check -mstructure-size-boundary=32 -mno-sched-prolog" \
|
||||
- --extra-cflags="-mfpu=vfp -mfloat-abi=hard" \
|
||||
+ --extra-cflags="$(FFMPEG_EXTRA_CFLAGS)" \
|
||||
+ --extra-ldflags="$(FFMPEG_EXTRA_LDFLAGS)" \
|
||||
--enable-shared \
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
--- a/Makefile 2019-06-20 15:04:53.390282996 +0200
|
||||
+++ b/Makefile 2019-06-20 15:03:45.538763872 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-CFLAGS=-pipe -mfloat-abi=hard -mcpu=arm1176jzf-s -fomit-frame-pointer -mabi=aapcs-linux -mtune=arm1176jzf-s -mfpu=vfp -Wno-psabi -g
|
||||
+CFLAGS+= -fomit-frame-pointer -mabi=aapcs-linux -Wno-psabi -g
|
||||
CFLAGS+=-std=c++0x -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CMAKE_CONFIG -D__VIDEOCORE4__ -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_OPT_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DHAVE_LIBSWRESAMPLE_SWRESAMPLE_H -DOMX -DOMX_SKIP64BIT -ftree-vectorize -DUSE_EXTERNAL_OMX -DTARGET_RASPBERRY_PI -DUSE_EXTERNAL_LIBBCM_HOST
|
||||
|
||||
LDFLAGS=-L$(SDKSTAGE)/opt/vc/lib/
|
||||
@@ -5,13 +5,13 @@ HOMEPAGE = "https://github.com/popcornmix/omxplayer"
|
||||
SECTION = "console/utils"
|
||||
|
||||
LICENSE = "GPLv2"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=00a27da7ac0f9bcd17320ec29ef4bbf6"
|
||||
|
||||
DEPENDS = "libpcre libav virtual/egl boost freetype dbus openssl libssh libomxil coreutils-native curl-native userland"
|
||||
|
||||
PR = "r4"
|
||||
PR = "r5"
|
||||
|
||||
SRCREV_default = "b4bbef8fac5e8c2ddafa895f98456ba715b39c6b"
|
||||
SRCREV_default = "f543a0d0e707ab56415f17b0ca6d397394ee8b63"
|
||||
|
||||
# omxplayer builds its own copy of ffmpeg from source instead of using the
|
||||
# system's ffmpeg library. This isn't ideal but it's ok for now. We do however
|
||||
@@ -33,6 +33,7 @@ SRC_URI = "git://github.com/popcornmix/omxplayer.git;protocol=git;branch=master
|
||||
file://0006-Prevent-ffmpeg-configure-compile-race-condition.patch \
|
||||
file://0001-Specify-cc-cxx-and-ld-variables-from-environment.patch \
|
||||
file://cross-crompile-ffmpeg.patch \
|
||||
file://0007-Remove-Makefile-hardcoded-arch-tune.patch \
|
||||
"
|
||||
|
||||
SRC_URI_append = "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", " file://0001-Fix-build-with-vc4-driver.patch ", "", d)}"
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
EXTRA_OECMAKE_append_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', ' -DUSE_GSTREAMER_GL=OFF ', '', d)}"
|
||||
Reference in New Issue
Block a user