summaryrefslogtreecommitdiffstats
path: root/meta-agl-bsp/meta-raspberrypi
diff options
context:
space:
mode:
Diffstat (limited to 'meta-agl-bsp/meta-raspberrypi')
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bbappend1
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend43
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bbappend6
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/files/0001-board-raspberrypi-add-serial-and-revision-to-the-dev-2019.07.patch82
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot_2020.01.bbappend7
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston-ini-conf.bbappend7
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston-ini-conf/dsi.cfg5
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-270-720p.cfg7
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb42
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-kernel/dtc/dtc_1.7.0.bbappend3
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-kernel/dtc/files/0001-fdtoverlay-Prevent-overlays-from-modifying-phandle-p.patch154
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/files/0002-Disable-DMA-in-sdhci-driver.patch25
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/files/0003-Fix-PCIe-in-dom0-for-RPi4.patch31
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0001-mconf-menuconfig.patch48
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/xen-be.cfg (renamed from meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/files/xen-be.cfg)0
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend57
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.bbappend20
-rw-r--r--meta-agl-bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend2
18 files changed, 266 insertions, 274 deletions
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bbappend b/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bbappend
deleted file mode 100644
index adb19c09c..000000000
--- a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bbappend
+++ /dev/null
@@ -1 +0,0 @@
-RDEPENDS_${PN}_append_sota += " u-boot-otascript"
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend b/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend
index 9891fa200..248623699 100644
--- a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend
+++ b/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend
@@ -1,53 +1,46 @@
DISABLE_OVERSCAN = "1"
TOTAL_BOARD_MEM = "3072"
-do_deploy_append_raspberrypi4() {
+do_deploy:append:raspberrypi4() {
# ENABLE CAN
if [ "${ENABLE_CAN}" = "1" ]; then
- echo "# Enable CAN" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ echo "# Enable CAN" >>${DEPLOYDIR}/bootfiles/config.txt
+ echo "dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25" >>${DEPLOYDIR}/bootfiles/config.txt
fi
# Handle setup with armstub file
if [ -n "${ARMSTUB}" ]; then
- echo "\n# ARM stub configuration" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "armstub=${ARMSTUB}" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ echo "\n# ARM stub configuration" >> ${DEPLOYDIR}/bootfiles/config.txt
+ echo "armstub=${ARMSTUB}" >> ${DEPLOYDIR}/bootfiles/config.txt
case "${ARMSTUB}" in
*-gic.bin)
- echo "enable_gic=1" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ echo "enable_gic=1" >> ${DEPLOYDIR}/bootfiles/config.txt
;;
esac
fi
if [ "${AGL_XEN_WANTED}" = "1" ]; then
- echo "total_mem=${TOTAL_BOARD_MEM}" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ echo "total_mem=${TOTAL_BOARD_MEM}" >> ${DEPLOYDIR}/bootfiles/config.txt
fi
}
-do_deploy_append() {
+do_deploy:append() {
if [ "${ENABLE_CMA}" = "1" ] && [ -n "${CMA_LWM}" ]; then
- sed -i '/#cma_lwm/ c\cma_lwm=${CMA_LWM}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ sed -i '/#cma_lwm/ c\cma_lwm=${CMA_LWM}' ${DEPLOYDIR}/bootfiles/config.txt
fi
if [ "${ENABLE_CMA}" = "1" ] && [ -n "${CMA_HWM}" ]; then
- sed -i '/#cma_hwm/ c\cma_hwm=${CMA_HWM}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ sed -i '/#cma_hwm/ c\cma_hwm=${CMA_HWM}' ${DEPLOYDIR}/bootfiles/config.txt
fi
- echo "avoid_warnings=2" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "mask_gpu_interrupt0=0x400" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "dtoverlay=vc4-kms-v3d-overlay,cma-256" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "dtoverlay=rpi-ft5406-overlay" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "dtparam=audio=on" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+ echo "avoid_warnings=2" >> ${DEPLOYDIR}/bootfiles/config.txt
+ echo "mask_gpu_interrupt0=0x400" >> ${DEPLOYDIR}/bootfiles/config.txt
+ echo "dtoverlay=vc4-kms-v3d-overlay,cma-256" >> ${DEPLOYDIR}/bootfiles/config.txt
+ echo "dtoverlay=rpi-ft5406-overlay" >> ${DEPLOYDIR}/bootfiles/config.txt
+ echo "dtparam=audio=on" >> ${DEPLOYDIR}/bootfiles/config.txt
}
-do_deploy_append_raspberrypi4() {
- echo -e "\n[pi4]" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "max_framebuffers=2" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+do_deploy:append:raspberrypi4() {
+ echo -e "\n[pi4]" >> ${DEPLOYDIR}/bootfiles/config.txt
+ echo "max_framebuffers=2" >> ${DEPLOYDIR}/bootfiles/config.txt
}
-
-do_deploy_append_sota() {
- echo "device_tree_address=0x0c800000" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
-}
-
-ENABLE_UART_raspberrypi3 = "1"
-ENABLE_UART_raspberrypi4 = "1"
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bbappend b/meta-agl-bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bbappend
index 2437d9a84..1e9f47d23 100644
--- a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bbappend
+++ b/meta-agl-bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bbappend
@@ -1,10 +1,10 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
-SRC_URI_append =" \
+SRC_URI:append =" \
${@bb.utils.contains('AGL_XEN_WANTED','1',' file://boot_xen.cmd','',d)} \
"
-do_compile_append() {
+do_compile:append() {
# if xen feature is activated we overwirte the boot script with xen specific one
if [ "${AGL_XEN_WANTED}" = "1" ]; then
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/files/0001-board-raspberrypi-add-serial-and-revision-to-the-dev-2019.07.patch b/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/files/0001-board-raspberrypi-add-serial-and-revision-to-the-dev-2019.07.patch
deleted file mode 100644
index 964cdb7a2..000000000
--- a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/files/0001-board-raspberrypi-add-serial-and-revision-to-the-dev-2019.07.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From 86cc911aaa958fedf2ea9cb04b4af17f5357815d Mon Sep 17 00:00:00 2001
-From: Anton Gerasimov <anton.gerasimov@here.com>
-Date: Fri, 1 Feb 2019 14:39:48 +0100
-Subject: [PATCH] board: raspberrypi: add serial and revision to the device
- tree
-
-Raspberry Pi bootloader adds this node to fdt, but if u-boot script
-doesn't reuse the tree provided by it, this information is lost.
-
-Revision and serial are displayed in /proc/cpuinfo after boot.
-
-Signed-off-by: Anton Gerasimov <anton.gerasimov@here.com>
----
- board/raspberrypi/rpi/rpi.c | 31 +++++++++++++++++++++++++++++--
- 1 file changed, 29 insertions(+), 2 deletions(-)
-
-diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
-index 35f5939552..114178397e 100644
---- a/board/raspberrypi/rpi/rpi.c
-+++ b/board/raspberrypi/rpi/rpi.c
-@@ -241,6 +241,8 @@ static uint32_t rev_scheme;
- static uint32_t rev_type;
- static const struct rpi_model *model;
-
-+uint64_t serial;
-+
- #ifdef CONFIG_ARM64
- static struct mm_region bcm2837_mem_map[] = {
- {
-@@ -384,8 +386,8 @@ static void set_serial_number(void)
- return;
- }
-
-- snprintf(serial_string, sizeof(serial_string), "%016llx",
-- msg->get_board_serial.body.resp.serial);
-+ serial = msg->get_board_serial.body.resp.serial;
-+ snprintf(serial_string, sizeof(serial_string), "%016llx", serial);
- env_set("serial#", serial_string);
- }
-
-@@ -478,6 +480,29 @@ void *board_fdt_blob_setup(void)
- return (void *)fw_dtb_pointer;
- }
-
-+static int ft_add_revision_info(void *blob) {
-+ int off;
-+ int ret;
-+
-+ off = fdt_subnode_offset(blob, 0, "system");
-+
-+ if (off < 0) {
-+ off = fdt_add_subnode(blob, 0, "system");
-+ if (off < 0)
-+ return -1;
-+ }
-+
-+ ret = fdt_setprop_u64(blob, off, "linux,serial", serial);
-+ if (ret < 0)
-+ return -1;
-+
-+ ret = fdt_setprop_u32(blob, off, "linux,revision", revision);
-+ if (ret < 0)
-+ return -1;
-+
-+ return 0;
-+}
-+
- int ft_board_setup(void *blob, bd_t *bd)
- {
- /*
-@@ -487,6 +512,8 @@ int ft_board_setup(void *blob, bd_t *bd)
- */
- lcd_dt_simplefb_add_node(blob);
-
-+ ft_add_revision_info(blob);
-+
- #ifdef CONFIG_EFI_LOADER
- /* Reserve the spin table */
- efi_add_memory_map(0, 1, EFI_RESERVED_MEMORY_TYPE, 0);
---
-2.17.1
-
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot_2020.01.bbappend b/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot_2020.01.bbappend
deleted file mode 100644
index ba2ecb599..000000000
--- a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot_2020.01.bbappend
+++ /dev/null
@@ -1,7 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-# Update the patch for u-boot 2019.07
-SRC_URI_remove_sota = "file://0001-board-raspberrypi-add-serial-and-revision-to-the-dev.patch"
-SRC_URI_append_sota = "file://0001-board-raspberrypi-add-serial-and-revision-to-the-dev-2019.07.patch"
-
-DEPENDS_append_rpi = " rpi-u-boot-scr"
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston-ini-conf.bbappend b/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston-ini-conf.bbappend
deleted file mode 100644
index dd01c4e5d..000000000
--- a/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston-ini-conf.bbappend
+++ /dev/null
@@ -1,7 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-
-SRC_URI += "file://dsi.cfg"
-
-# Reduce the screen resolution to HD Ready (720p)
-SRC_URI_remove = "file://hdmi-a-1-270.cfg"
-SRC_URI_append = " file://hdmi-a-1-270-720p.cfg"
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston-ini-conf/dsi.cfg b/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston-ini-conf/dsi.cfg
deleted file mode 100644
index 72a6d2bf8..000000000
--- a/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston-ini-conf/dsi.cfg
+++ /dev/null
@@ -1,5 +0,0 @@
-# Support the Raspberry Pi Foundation 7" tablet which uses the DSI connector
-# rather than HDMI.
-[output]
-name=DSI-1
-transform=270
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-270-720p.cfg b/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-270-720p.cfg
deleted file mode 100644
index e1c9db1a8..000000000
--- a/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-270-720p.cfg
+++ /dev/null
@@ -1,7 +0,0 @@
-# A display is connected to HDMI-A-1 and needs to be rotated 270 degrees
-# to have a proper orientation of the homescreen. For example the various sizes
-# of the GeChic display or the Dell display.
-[output]
-name=HDMI-A-1
-transform=270
-mode=1280x720
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb
index c82e6fd22..c5edbe1dc 100644
--- a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb
+++ b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb
@@ -7,35 +7,27 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384
DEPENDS = "dtc-native"
-ALLOW_EMPTY_${PN} = "1"
-FILES_${PN} = ""
+ALLOW_EMPTY:${PN} = "1"
+FILES:${PN} = ""
S = "${WORKDIR}"
do_compile[depends] += "virtual/kernel:do_deploy"
do_compile () {
- # Official touchscreen setup (rpi3b/rpi3b dtb, VC4DTBO and ft5406)
- if [ -f "${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b-plus.dtb" ]; then
- fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b-plus.dtb -o bcm2710-rpi-3-b-plus+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE}/rpi-ft5406.dtbo ${DEPLOY_DIR_IMAGE}/${VC4DTBO}.dtbo
- fi
- if [ -f "${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b.dtb" ]; then
- fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b.dtb -o bcm2710-rpi-3-b+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE}/rpi-ft5406.dtbo ${DEPLOY_DIR_IMAGE}/${VC4DTBO}.dtbo
- fi
+ # Plain VC4 (HDMI)
if [ -f "${DEPLOY_DIR_IMAGE}/bcm2711-rpi-4-b.dtb" ]; then
- fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2711-rpi-4-b.dtb -o bcm2711-rpi-4-b+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE}/rpi-ft5406.dtbo ${DEPLOY_DIR_IMAGE}/${VC4DTBO}.dtbo
+ fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2711-rpi-4-b.dtb -o bcm2711-rpi-4-b+vc4.dtb \
+ ${DEPLOY_DIR_IMAGE}/${VC4DTBO}-pi4.dtbo
fi
- # HDMI screen setup (rpi3b/rpi3b dtb and VC4DTBO)
- if [ -f "${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b-plus.dtb" ]; then
- fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b-plus.dtb -o bcm2710-rpi-3-b-plus+vc4.dtb ${DEPLOY_DIR_IMAGE}/${VC4DTBO}.dtbo
- fi
- if [ -f "${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b.dtb" ]; then
- fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b.dtb -o bcm2710-rpi-3-b+vc4.dtb ${DEPLOY_DIR_IMAGE}/${VC4DTBO}.dtbo
- fi
- if [ -f "${DEPLOY_DIR_IMAGE}/bcm2711-rpi-4-b.dtb" ]; then
- fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2711-rpi-4-b.dtb -o bcm2711-rpi-4-b+vc4.dtb ${DEPLOY_DIR_IMAGE}/${VC4DTBO}.dtbo
+ # VC4 + LCD
+ if [ -f "${DEPLOY_DIR_IMAGE}/bcm2711-rpi-4-b.dtb" -a -f "${DEPLOY_DIR_IMAGE}/rpi-ft5406.dtbo" ]; then
+ fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2711-rpi-4-b.dtb -o bcm2711-rpi-4-b+vc4+ft5406.dtb \
+ ${DEPLOY_DIR_IMAGE}/rpi-ft5406.dtbo \
+ ${DEPLOY_DIR_IMAGE}/${VC4DTBO}-pi4.dtbo
fi
+
}
do_deploy () {
@@ -43,21 +35,9 @@ do_deploy () {
if [ -f "${S}/bcm2711-rpi-4-b+vc4+ft5406.dtb" ]; then
install -m 0644 ${S}/bcm2711-rpi-4-b+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE}
fi
- if [ -f "${S}/bcm2710-rpi-3-b+vc4+ft5406.dtb" ]; then
- install -m 0644 ${S}/bcm2710-rpi-3-b+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE}
- fi
- if [ -f "${S}/bcm2710-rpi-3+vc4+ft5406.dtb" ]; then
- install -m 0644 ${S}/bcm2710-rpi-3+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE}
- fi
if [ -f "${S}/bcm2711-rpi-4-b+vc4.dtb" ]; then
install -m 0644 ${S}/bcm2711-rpi-4-b+vc4.dtb ${DEPLOY_DIR_IMAGE}
fi
- if [ -f "${S}/bcm2710-rpi-3-b+vc4.dtb" ]; then
- install -m 0644 ${S}/bcm2710-rpi-3-b+vc4.dtb ${DEPLOY_DIR_IMAGE}
- fi
- if [ -f "${S}/bcm2710-rpi-3+vc4.dtb" ]; then
- install -m 0644 ${S}/bcm2710-rpi-3+vc4.dtb ${DEPLOY_DIR_IMAGE}
- fi
}
addtask deploy after do_install
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/dtc/dtc_1.7.0.bbappend b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/dtc/dtc_1.7.0.bbappend
new file mode 100644
index 000000000..a28a9e748
--- /dev/null
+++ b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/dtc/dtc_1.7.0.bbappend
@@ -0,0 +1,3 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
+
+SRC_URI += "file://0001-fdtoverlay-Prevent-overlays-from-modifying-phandle-p.patch"
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/dtc/files/0001-fdtoverlay-Prevent-overlays-from-modifying-phandle-p.patch b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/dtc/files/0001-fdtoverlay-Prevent-overlays-from-modifying-phandle-p.patch
new file mode 100644
index 000000000..0f275f1ac
--- /dev/null
+++ b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/dtc/files/0001-fdtoverlay-Prevent-overlays-from-modifying-phandle-p.patch
@@ -0,0 +1,154 @@
+From caba0117dc30f2357eac6d04f3510095dcbaa7f4 Mon Sep 17 00:00:00 2001
+From: Paul Barker <pbarker@konsulko.com>
+Date: Fri, 18 Dec 2020 23:00:07 +0000
+Subject: [PATCH] fdtoverlay: Prevent overlays from modifying phandle
+ properties
+To: David Gibson <david@gibson.dropbear.id.au>,
+ Jon Loeliger <jdl@jdl.com>,
+ devicetree-compiler@vger.kernel.org
+Cc: Rob Herring <robh@kernel.org>,
+ Pantelis Antoniou <pantelis.antoniou@konsulko.com>,
+ Scott Murray <scott.murray@konsulko.com>,
+ Jan Simon Moeller <jsmoeller@linuxfoundation.org>
+
+When applying an overlay fragment, we should take care not to overwrite
+an existing phandle property of the target node as this could break
+references to the target node elsewhere in the base dtb.
+
+In addition to potentially breaking references within the resulting fdt,
+if the overlay is built with symbols enabled (`-@` option to dtc) then
+fdtoverlay will be unable to merge the overlay with a base dtb file.
+
+A new test case is added to check how fdtoverlay handles this case.
+Attempting to apply this test overlay without the fix in this patch
+results in the following output:
+
+ input = tests/overlay_base_ref.test.dtb
+ output = tests/overlay_overlay_ref.fdtoverlay.dtb
+ overlay[0] = tests/overlay_overlay_ref.test.dtb
+
+ Failed to apply 'tests/overlay_overlay_ref.test.dtb': FDT_ERR_NOTFOUND
+
+In this test case the __overlay__ node in question does not explicitly
+contain a phandle property in the dts file, the phandle is added during
+compilation as it is referenced by another node within the overlay dts.
+
+This failure occurs due to a sequence of events in the functions called
+by fdt_overlay_apply():
+
+1) In overlay_fixup_phandles(), the target of the overlay fragment is
+ looked up and the target property is set to the phandle of the target
+ node.
+
+2) In overlay_merge(), the target node is looked up by phandle via
+ overlay_get_target(). As the __overlay__ node in this test case
+ itself has a phandle property, the phandle of the target node is
+ modified.
+
+3) In overlay_symbol_update(), the target node is again looked up by
+ phandle via overlay_get_target(). But this time the target node
+ cannot be found as its phandle property was modified.
+
+The fix for this issue is to skip modification of the phandle property
+of the target node in step (2) of the above sequence. If the target node
+doesn't already contain a phandle property, we can add one without risk.
+
+Upstream-Status: Submitted
+ https://www.spinics.net/lists/devicetree-compiler/msg03537.html
+Signed-off-by: Paul Barker <pbarker@konsulko.com>
+---
+ libfdt/fdt_overlay.c | 2 ++
+ tests/overlay_base_ref.dts | 19 +++++++++++++++++++
+ tests/overlay_overlay_ref.dts | 24 ++++++++++++++++++++++++
+ tests/run_tests.sh | 5 +++++
+ 4 files changed, 50 insertions(+)
+ create mode 100644 tests/overlay_base_ref.dts
+ create mode 100644 tests/overlay_overlay_ref.dts
+
+diff --git a/libfdt/fdt_overlay.c b/libfdt/fdt_overlay.c
+index d217e79..b3c217a 100644
+--- a/libfdt/fdt_overlay.c
++++ b/libfdt/fdt_overlay.c
+@@ -573,6 +573,8 @@ static int overlay_apply_node(void *fdt, int target,
+ if (prop_len < 0)
+ return prop_len;
+
++ if (!strcmp(name, "phandle") && fdt_getprop(fdt, target, name, NULL))
++ continue;
+ ret = fdt_setprop(fdt, target, name, prop, prop_len);
+ if (ret)
+ return ret;
+diff --git a/tests/overlay_base_ref.dts b/tests/overlay_base_ref.dts
+new file mode 100644
+index 0000000..1fc02a2
+--- /dev/null
++++ b/tests/overlay_base_ref.dts
+@@ -0,0 +1,19 @@
++/*
++ * Copyright (c) 2016 NextThing Co
++ * Copyright (c) 2016 Free Electrons
++ * Copyright (c) 2016 Konsulko Inc.
++ *
++ * SPDX-License-Identifier: GPL-2.0+
++ */
++
++/dts-v1/;
++
++/ {
++ test: test-node {
++ test-int-property = <42>;
++ };
++
++ test-refs {
++ refs = <&test>;
++ };
++};
+diff --git a/tests/overlay_overlay_ref.dts b/tests/overlay_overlay_ref.dts
+new file mode 100644
+index 0000000..a45c95d
+--- /dev/null
++++ b/tests/overlay_overlay_ref.dts
+@@ -0,0 +1,24 @@
++/*
++ * Copyright (c) 2016 NextThing Co
++ * Copyright (c) 2016 Free Electrons
++ * Copyright (c) 2016 Konsulko Inc.
++ *
++ * SPDX-License-Identifier: GPL-2.0+
++ */
++
++/dts-v1/;
++/plugin/;
++
++/ {
++ fragment@0 {
++ target = <&test>;
++
++ frag0: __overlay__ {
++ test-int-property = <43>;
++ };
++ };
++
++ test-ref {
++ ref = <&frag0>;
++ };
++};
+diff --git a/tests/run_tests.sh b/tests/run_tests.sh
+index 294585b..a65b166 100755
+--- a/tests/run_tests.sh
++++ b/tests/run_tests.sh
+@@ -329,6 +329,11 @@ dtc_overlay_tests () {
+ run_test check_path overlay_base_with_aliases.dtb not-exists "/__symbols__"
+ run_test check_path overlay_base_with_aliases.dtb not-exists "/__fixups__"
+ run_test check_path overlay_base_with_aliases.dtb not-exists "/__local_fixups__"
++
++ # Test taking a reference to an overlay fragment
++ run_dtc_test -@ -I dts -O dtb -o overlay_base_ref.test.dtb "$SRCDIR/overlay_base_ref.dts"
++ run_dtc_test -@ -I dts -O dtb -o overlay_overlay_ref.test.dtb "$SRCDIR/overlay_overlay_ref.dts"
++ run_wrap_test $FDTOVERLAY -i overlay_base_ref.test.dtb overlay_overlay_ref.test.dtb -o overlay_overlay_ref.fdtoverlay.dtb
+ }
+
+ tree1_tests () {
+--
+2.26.2
+
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/files/0002-Disable-DMA-in-sdhci-driver.patch b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/files/0002-Disable-DMA-in-sdhci-driver.patch
deleted file mode 100644
index 04a8733f2..000000000
--- a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/files/0002-Disable-DMA-in-sdhci-driver.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 758bc9b917469bc4e527dc3aae821c91cbc3d426 Mon Sep 17 00:00:00 2001
-From: Stewart Hildebrand <stewart.hildebrand@dornerworks.com>
-Date: Thu, 18 Jul 2019 00:01:27 -0400
-Subject: [PATCH 2/4] Disable DMA in sdhci driver
-
----
- drivers/mmc/host/sdhci-iproc.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c
-index 983cddce9..150f7bfc8 100644
---- a/drivers/mmc/host/sdhci-iproc.c
-+++ b/drivers/mmc/host/sdhci-iproc.c
-@@ -252,6 +252,8 @@ static const struct sdhci_iproc_data bcm2835_data = {
-
- static const struct sdhci_pltfm_data sdhci_bcm2838_pltfm_data = {
- .ops = &sdhci_iproc_32only_ops,
-+ .quirks = SDHCI_QUIRK_BROKEN_DMA |
-+ SDHCI_QUIRK_BROKEN_ADMA,
- };
-
- static const struct sdhci_iproc_data bcm2838_data = {
---
-2.17.1
-
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/files/0003-Fix-PCIe-in-dom0-for-RPi4.patch b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/files/0003-Fix-PCIe-in-dom0-for-RPi4.patch
deleted file mode 100644
index 835f36da3..000000000
--- a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/files/0003-Fix-PCIe-in-dom0-for-RPi4.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 77765c2a47ce43911b8fe7b09f037c9bc13008ca Mon Sep 17 00:00:00 2001
-From: Jeff Kubascik <jeff.kubascik@dornerworks.com>
-Date: Tue, 30 Jul 2019 08:49:56 -0400
-Subject: [PATCH 3/4] Fix PCIe in dom0 for RPi4
-
-There is an issue where the Broadcom PCIe driver and Xen swiotlb layer
-invoke each other's dma alloc function recursively until the stack blows
-up. The cause appears to be due to arch_setup_dma_ops being called
-more than once for the device, possibly through of_dma_configure, and
-screwing up the dma_ops pointers. This patch adds a check to make sure
-that the xen_dma_ops are applied only once for a device.
----
- arch/arm64/mm/dma-mapping.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c
-index d3a5bb16f..243a3b9be 100644
---- a/arch/arm64/mm/dma-mapping.c
-+++ b/arch/arm64/mm/dma-mapping.c
-@@ -895,7 +895,7 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
- __iommu_setup_dma_ops(dev, dma_base, size, iommu);
-
- #ifdef CONFIG_XEN
-- if (xen_initial_domain()) {
-+ if (!dev->archdata.dev_dma_ops && xen_initial_domain()) {
- dev->archdata.dev_dma_ops = dev->dma_ops;
- dev->dma_ops = xen_dma_ops;
- }
---
-2.17.1
-
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0001-mconf-menuconfig.patch b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0001-mconf-menuconfig.patch
new file mode 100644
index 000000000..7f0979ca9
--- /dev/null
+++ b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0001-mconf-menuconfig.patch
@@ -0,0 +1,48 @@
+From bebd63730a433ba62549a80114a9851328aa8897 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@windriver.com>
+Date: Mon, 2 Jul 2018 23:10:28 -0400
+Subject: [PATCH] menuconfig,mconf-cfg: 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.
+
+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>
+---
+ scripts/kconfig/mconf-cfg.sh | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/scripts/kconfig/mconf-cfg.sh b/scripts/kconfig/mconf-cfg.sh
+index c812872d7f9d..42d20819025c 100755
+--- a/scripts/kconfig/mconf-cfg.sh
++++ b/scripts/kconfig/mconf-cfg.sh
+@@ -4,6 +4,14 @@
+ PKG="ncursesw"
+ PKG2="ncurses"
+
++if [ "$CROSS_CURSES_LIB" != "" ]; then
++ echo libs=\'$CROSS_CURSES_LIB\'
++ if [ x"$CROSS_CURSES_INC" != x ]; then
++ echo cflags=\'$CROSS_CURSES_INC\'
++ fi
++ exit 0
++fi
++
+ if [ -n "$(command -v ${HOSTPKG_CONFIG})" ]; then
+ if ${HOSTPKG_CONFIG} --exists $PKG; then
+ echo cflags=\"$(${HOSTPKG_CONFIG} --cflags $PKG)\"
+--
+2.17.1
+
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/files/xen-be.cfg b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/xen-be.cfg
index 36f390187..36f390187 100644
--- a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/files/xen-be.cfg
+++ b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/xen-be.cfg
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend
index f78e0b5eb..ec3fa910b 100644
--- a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend
+++ b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend
@@ -1,47 +1,46 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
+FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"
-require recipes-kernel/linux/linux-agl.inc
+require recipes-kernel/linux/linux-yocto-agl.inc
-SRC_URI_append = "\
+SRC_URI:append = " \
${@oe.utils.conditional('USE_FAYTECH_MONITOR', '1', 'file://0002-faytech-fix-rpi.patch', '', d)} \
+ file://0001-mconf-menuconfig.patch \
"
-#take in account that linux under xen should use the hvc0 console
-SERIAL_OPTION = "${@bb.utils.contains('AGL_XEN_WANTED','1','hvc0','115200;ttyS0',d)}"
+
+# Enable support for Pi foundation touchscreen
+AGL_KCONFIG_FRAGMENTS += "raspberrypi-panel.cfg"
+
+# Enable bt hci uart
+AGL_KCONFIG_FRAGMENTS += "raspberrypi-hciuart.cfg"
+
+# ENABLE NETWORK (built-in)
+AGL_KCONFIG_FRAGMENTS += "raspberrypi_network.cfg"
+
+# For Xen
+AGL_KCONFIG_FRAGMENTS += " \
+ ${@bb.utils.contains('AGL_XEN_WANTED','1','xen-be.cfg','',d)} \
+"
+
+# Take in account that linux under Xen should use the hvc0 console
+SERIAL_OPTION = "${@bb.utils.contains('AGL_XEN_WANTED','1','hvc0','ttyS0,115200',d)}"
SERIAL = "${@oe.utils.conditional("ENABLE_UART", "1", "console=${SERIAL_OPTION}", "", d)}"
CMDLINE_DEBUG = ""
-#XEN related option
-CMDLINE_append = ' ${@bb.utils.contains('AGL_XEN_WANTED','1','clk_ignore_unused','',d)}'
+# Xen related option
+CMDLINE:append = ' ${@bb.utils.contains('AGL_XEN_WANTED','1','clk_ignore_unused','',d)}'
-#workaround for crash during brcmfmac loading. Disable it at this moment
-CMDLINE_append = ' ${@bb.utils.contains('AGL_XEN_WANTED','1','modprobe.blacklist=brcmfmac','',d)}'
+# Workaround for crash during brcmfmac loading. Disable it at this moment
+CMDLINE:append = ' ${@bb.utils.contains('AGL_XEN_WANTED','1','modprobe.blacklist=brcmfmac','',d)}'
-CMDLINE_append = " usbhid.mousepoll=0"
+CMDLINE:append = " usbhid.mousepoll=0"
# Add options to allow CMA to operate
-CMDLINE_append = ' ${@oe.utils.conditional("ENABLE_CMA", "1", "coherent_pool=6M smsc95xx.turbo_mode=N", "", d)}'
+CMDLINE:append = '${@oe.utils.conditional("ENABLE_CMA", "1", " coherent_pool=6M smsc95xx.turbo_mode=N", "", d)}'
KERNEL_MODULE_AUTOLOAD += "snd-bcm2835"
KERNEL_MODULE_AUTOLOAD += "hid-multitouch"
-RDEPENDS_${PN} += "kernel-module-snd-bcm2835"
PACKAGES += "kernel-module-snd-bcm2835"
-# Enable support for usb video class for usb camera devices
-KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/uvc.cfg"
-
-# Enable support for joystick devices
-KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/joystick.cfg"
-
-# Enable support for Pi foundation touchscreen
-SRC_URI_append = " file://raspberrypi-panel.cfg"
-KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/raspberrypi-panel.cfg"
-
-# Enable bt hci uart
-SRC_URI_append = " file://raspberrypi-hciuart.cfg"
-KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/raspberrypi-hciuart.cfg"
-
-# ENABLE NETWORK (built-in)
-SRC_URI_append = " file://raspberrypi_network.cfg"
-KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/raspberrypi_network.cfg"
+RDEPENDS:${PN} += "kernel-module-snd-bcm2835"
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.bbappend b/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.bbappend
deleted file mode 100644
index 7f17f0c3f..000000000
--- a/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.bbappend
+++ /dev/null
@@ -1,20 +0,0 @@
-require recipes-kernel/linux/linux-agl-4.19.inc
-
-ENABLE_UART_raspberrypi4 = "1"
-
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-
-# For Xen
-
-SRC_URI_append =" \
- ${@bb.utils.contains('AGL_XEN_WANTED','1','file://0002-Disable-DMA-in-sdhci-driver.patch','',d)} \
-"
-
-SRC_URI_append =" \
- ${@bb.utils.contains('AGL_XEN_WANTED','1','file://0003-Fix-PCIe-in-dom0-for-RPi4.patch','',d)} \
-"
-
-SRC_URI_append = " \
- ${@bb.utils.contains('AGL_XEN_WANTED','1','file://xen-be.cfg','',d)} \
-"
diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend b/meta-agl-bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend
index e48a380a3..2e045c1f2 100644
--- a/meta-agl-bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend
+++ b/meta-agl-bsp/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend
@@ -1,2 +1,2 @@
# Disable faad by default to avoid licensing issues
-PACKAGECONFIG_remove_rpi = "faad"
+PACKAGECONFIG:remove:rpi = "faad"