diff options
Diffstat (limited to 'meta-agl-bsp')
41 files changed, 254 insertions, 410 deletions
diff --git a/meta-agl-bsp/conf/include/agl_cubox-i.inc b/meta-agl-bsp/conf/include/agl_cubox-i.inc index ee5e759e4..fc0e14b5f 100644 --- a/meta-agl-bsp/conf/include/agl_cubox-i.inc +++ b/meta-agl-bsp/conf/include/agl_cubox-i.inc @@ -1,15 +1,21 @@ require agl_imx6-common.inc -# Force use of the community supported LTS kernel instead of the -# default linux-fslc -PREFERRED_PROVIDER_virtual/kernel = "linux-fslc-lts" +# Temporary fix for upstream breakage +# Note that the :cubox-i override is needed because we're +# overriding a definition done in the machine .conf. +KERNEL_DEVICETREE:cubox-i = " \ + nxp/imx/imx6dl-cubox-i.dtb \ + nxp/imx/imx6q-cubox-i.dtb \ + nxp/imx/imx6dl-hummingboard.dtb \ + nxp/imx/imx6q-hummingboard.dtb \ +" # Include devicetrees for SOM 1.5 and Hummingboard 2 hardware KERNEL_DEVICETREE:append = " \ - imx6dl-hummingboard-som-v15.dtb \ - imx6q-hummingboard-som-v15.dtb \ - imx6dl-hummingboard2.dtb \ - imx6q-hummingboard2.dtb \ - imx6dl-hummingboard2-som-v15.dtb \ - imx6q-hummingboard2-som-v15.dtb \ + nxp/imx/imx6dl-hummingboard-som-v15.dtb \ + nxp/imx/imx6q-hummingboard-som-v15.dtb \ + nxp/imx/imx6dl-hummingboard2.dtb \ + nxp/imx/imx6q-hummingboard2.dtb \ + nxp/imx/imx6dl-hummingboard2-som-v15.dtb \ + nxp/imx/imx6q-hummingboard2-som-v15.dtb \ " diff --git a/meta-agl-bsp/conf/include/agl_imx6qdlsabreauto.inc b/meta-agl-bsp/conf/include/agl_imx6qdlsabreauto.inc index f058ba1a5..cb13de713 100644 --- a/meta-agl-bsp/conf/include/agl_imx6qdlsabreauto.inc +++ b/meta-agl-bsp/conf/include/agl_imx6qdlsabreauto.inc @@ -1,5 +1 @@ require agl_imx6-common.inc - -# Force use of the community supported LTS kernel instead of the -# default linux-fslc -IMX_DEFAULT_KERNEL:imx6qdlsabreauto = "linux-fslc-lts" diff --git a/meta-agl-bsp/conf/include/agl_raspberrypi4.inc b/meta-agl-bsp/conf/include/agl_raspberrypi4.inc index 4ba7ff0f6..998ffedc8 100644 --- a/meta-agl-bsp/conf/include/agl_raspberrypi4.inc +++ b/meta-agl-bsp/conf/include/agl_raspberrypi4.inc @@ -21,17 +21,5 @@ IMAGE_INSTALL:append = " kernel-modules linux-firmware-rpidistro-bcm43430 linux- # Psplash causes crash on first boot on RPi IMAGE_FEATURES:remove = "splash" -# Build updatable image. Only takes effect when sota.bbclass is inherited -DISTRO_FEATURES:append = " sota" - -# Add xen build, if the xen feature activated -DISTRO_FEATURES:append = " ${@bb.utils.contains('AGL_XEN_WANTED', '1', ' xen', '', d)}" - -# add xen-tools to build -IMAGE_INSTALL:append = " ${@bb.utils.contains('AGL_XEN_WANTED', '1', 'xen-tools xen-mkimage-rpi4', '', d)}" - -# Add xen-raspberry binary to boot files -IMAGE_BOOT_FILES:append = " ${@bb.utils.contains('AGL_XEN_WANTED','1', 'xen-${MACHINE}', '',d)}" - #DISPLAY CONFIGURATION WESTON_DISPLAYS:raspberrypi4 = " hdmi-a-1-90 hdmi-a-2-90" diff --git a/meta-agl-bsp/conf/include/agl_raspberrypi5.inc b/meta-agl-bsp/conf/include/agl_raspberrypi5.inc index a0e675956..212c9ff1b 100644 --- a/meta-agl-bsp/conf/include/agl_raspberrypi5.inc +++ b/meta-agl-bsp/conf/include/agl_raspberrypi5.inc @@ -4,8 +4,16 @@ GPU_MEM = "256" # Add CMA to the kernel arguments for SOTA OSTREE_KERNEL_ARGS:sota:append = " cma=256M" -# use u-boot always (RPi5 U-boot is not ready yet) -RPI_USE_U_BOOT = "0" +# use u-boot always +RPI_USE_U_BOOT = "1" + +# Re-enable U-Boot for raspberrypi5 here until upstream is fixed. +# Note that this assumes the use of scarthgap/u-boot meta-lts-mixins +# branch. +UBOOT_MACHINE = "rpi_arm64_config" +COMPATIBLE_MACHINE:pn-u-boot:forcevariable = "" +KERNEL_IMAGETYPE_UBOOT ?= "Image" +KERNEL_BOOTCMD ?= "booti" # Use UART for serial console ENABLE_UART ?= "1" @@ -13,22 +21,13 @@ ENABLE_UART ?= "1" # For libomxil #LICENSE_FLAGS_ACCEPTED = "commercial" -IMAGE_INSTALL:append = " kernel-modules linux-firmware-rpidistro-bcm43430 linux-firmware-rpidistro-bcm43455 create-combined-dtb " +# For linux-firmware-rpidistro +LICENSE_FLAGS_ACCEPTED += "synaptics-killswitch" + +IMAGE_INSTALL:append = " kernel-modules create-combined-dtb " # Psplash causes crash on first boot on RPi IMAGE_FEATURES:remove = "splash" -# Build updatable image. Only takes effect when sota.bbclass is inherited -DISTRO_FEATURES:append = " sota" - -# Add xen build, if the xen feature activated -DISTRO_FEATURES:append = " ${@bb.utils.contains('AGL_XEN_WANTED', '1', ' xen', '', d)}" - -# add xen-tools to build -IMAGE_INSTALL:append = " ${@bb.utils.contains('AGL_XEN_WANTED', '1', 'xen-tools xen-mkimage-rpi4', '', d)}" - -# Add xen-raspberry binary to boot files -IMAGE_BOOT_FILES:append = " ${@bb.utils.contains('AGL_XEN_WANTED','1', 'xen-${MACHINE}', '',d)}" - #DISPLAY CONFIGURATION WESTON_DISPLAYS:raspberrypi5 = " hdmi-a-1-90 hdmi-a-2-90" diff --git a/meta-agl-bsp/conf/include/agl_rcar-nogfx.inc b/meta-agl-bsp/conf/include/agl_rcar-nogfx.inc index fb67fd976..64e13642e 100644 --- a/meta-agl-bsp/conf/include/agl_rcar-nogfx.inc +++ b/meta-agl-bsp/conf/include/agl_rcar-nogfx.inc @@ -58,3 +58,13 @@ BBMASK += "meta-renesas/meta-rcar-gen3/recipes-graphics/cogl/cogl-1.0_1.%.bbappe # packagegroup bbclass is inherited. This can be removed when upstream # is fixed to add the required PACKAGE_ARCH = "${MACHINE_ARCH}". PACKAGE_ARCH:pn-packagegroup-multimedia-libs = "${MACHINE_ARCH}" + +# Mask out BSP layer gstreamer* 1.22.x bbappends for now, as the BSP +# effectively is building 1.20.x plugins and packaging them as 1.22, +# which breaks building various things. The whole directory is not +# commented out because we still want the vspfilter plugin. +# The BBMASKs need to be here instead of agl_rcar.ing since without +# them there are issues with the gstreamer1.0-plugins-bad patches in +# meta-agl-core not applying. +BBMASK += "meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-omx" +BBMASK += "meta-renesas/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-" diff --git a/meta-agl-bsp/conf/include/agl_rcar.inc b/meta-agl-bsp/conf/include/agl_rcar.inc index 829929d62..ce3b8a8f9 100644 --- a/meta-agl-bsp/conf/include/agl_rcar.inc +++ b/meta-agl-bsp/conf/include/agl_rcar.inc @@ -52,10 +52,3 @@ MACHINE_EXTRA_RRECOMMENDS:append:rcar-gen3 = " \ kernel-module-vspm-if \ omx-user-module \ " - -# Mask out BSP layer and our own fixup gstreamer* 1.22.x bbappends for now, -# as the BSP effectively is building 1.20.x plugins and packaging them as -# 1.22, which breaks building various things. The whole directory is not -# commented out because we still want the vspfilter plugin. -BBMASK += "meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-omx" -BBMASK += "meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-" diff --git a/meta-agl-bsp/conf/layer.conf b/meta-agl-bsp/conf/layer.conf index 9a2ba87df..d76c094c1 100644 --- a/meta-agl-bsp/conf/layer.conf +++ b/meta-agl-bsp/conf/layer.conf @@ -23,4 +23,4 @@ BBFILE_COLLECTIONS += "aglbsp" BBFILE_PATTERN_aglbsp = "^${LAYERDIR}/" BBFILE_PRIORITY_aglbsp = "60" -LAYERSERIES_COMPAT_aglbsp = "kirkstone langdale mickledore nanbield scarthgap" +LAYERSERIES_COMPAT_aglbsp = "styhead" diff --git a/meta-agl-bsp/meta-agl-refhw-gen3/recipes-navigation/gpsd/gpsd-machine-conf_1.0.bbappend b/meta-agl-bsp/meta-agl-refhw-gen3/recipes-navigation/gpsd/gpsd-machine-conf_1.0.bbappend index 3cd5aa7de..4407b1011 100644 --- a/meta-agl-bsp/meta-agl-refhw-gen3/recipes-navigation/gpsd/gpsd-machine-conf_1.0.bbappend +++ b/meta-agl-bsp/meta-agl-refhw-gen3/recipes-navigation/gpsd/gpsd-machine-conf_1.0.bbappend @@ -5,18 +5,21 @@ SRC_URI = "file://gpsd.refhw \ file://refhw.conf \ " +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + inherit update-alternatives do_configure[noexec] = "1" do_compile[noexec] = "1" do_install() { - install -D -m 0644 ${WORKDIR}/gpsd.refhw ${D}/${sysconfdir}/default/gpsd.refhw + install -D -m 0644 ${UNPACKDIR}/gpsd.refhw ${D}/${sysconfdir}/default/gpsd.refhw if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -D -m 0755 ${WORKDIR}/refhw-gpsd-helper.sh ${D}/${sbindir}/refhw-gpsd-helper.sh + install -D -m 0755 ${UNPACKDIR}/refhw-gpsd-helper.sh ${D}/${sbindir}/refhw-gpsd-helper.sh install -d ${D}${sysconfdir}/systemd/system/gpsd.service.d - install -D -m 0644 ${WORKDIR}/refhw.conf ${D}${sysconfdir}/systemd/system/gpsd.service.d/refhw.conf + install -D -m 0644 ${UNPACKDIR}/refhw.conf ${D}${sysconfdir}/systemd/system/gpsd.service.d/refhw.conf fi } diff --git a/meta-agl-bsp/meta-freescale-layer/recipes-connectivity/hci-uart-helper/hci-uart-helper_1.0.bb b/meta-agl-bsp/meta-freescale-layer/recipes-connectivity/hci-uart-helper/hci-uart-helper_1.0.bb index 798fcebe6..df8f62937 100644 --- a/meta-agl-bsp/meta-freescale-layer/recipes-connectivity/hci-uart-helper/hci-uart-helper_1.0.bb +++ b/meta-agl-bsp/meta-freescale-layer/recipes-connectivity/hci-uart-helper/hci-uart-helper_1.0.bb @@ -8,6 +8,9 @@ SRC_URI = "file://hci-uart-helper.service \ file://hci-uart-helper.sh \ " +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + COMPATIBLE_MACHINE = "imx8mq-evk" do_configure[noexec] = "1" @@ -16,11 +19,11 @@ do_compile[noexec] = "1" do_install() { # Install helper script install -d ${D}${sbindir} - install -m 0755 ${WORKDIR}/hci-uart-helper.sh ${D}${sbindir}/ + install -m 0755 ${UNPACKDIR}/hci-uart-helper.sh ${D}${sbindir}/ # Install systemd unit install -d ${D}${systemd_system_unitdir}/ - install -m 0644 ${WORKDIR}/hci-uart-helper.service ${D}${systemd_system_unitdir}/ + install -m 0644 ${UNPACKDIR}/hci-uart-helper.service ${D}${systemd_system_unitdir}/ install -d ${D}${systemd_system_unitdir}/bluetooth.service.wants ln -s ../hci-uart-helper.service ${D}${systemd_system_unitdir}/bluetooth.service.wants/ } diff --git a/meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston_10.0.1.imx.bbappend b/meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston_10.0.1.imx.bbappend deleted file mode 100644 index 07a43f958..000000000 --- a/meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston_10.0.1.imx.bbappend +++ /dev/null @@ -1,10 +0,0 @@ -# Work around PACKAGECONFIG:remove of "x11 wayland" added to the recipe -# in meta-freescale commit 5a5c5dd. This can be removed once the issue -# has been resolved by a revert of that breakage upstream. -# What is done below is effectively a disabling of the "wayland" -# PACKAGECONFIG option and then open coding what its effects would -# normally be, since the :remove prevents specifying it in the usual way. -PACKAGECONFIG[wayland] = "" -DEPENDS:append = " virtual/egl virtual/libgles2" -PACKAGECONFIG_CONFARGS:append = " -Dbackend-wayland=true" - diff --git a/meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston_11.0.3.imx.bbappend b/meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston_11.0.3.imx.bbappend new file mode 100644 index 000000000..ca162e28f --- /dev/null +++ b/meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston_11.0.3.imx.bbappend @@ -0,0 +1,2 @@ +# Use provided hook to disable removal of wayland from PACKAGECONFIG +PACKAGECONFIG_IMX_REMOVALS = "x11" diff --git a/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx/0001-enable-mhdp-with-etnaviv.patch b/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx/0001-enable-mhdp-with-etnaviv.patch deleted file mode 100644 index f95891a2f..000000000 --- a/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx/0001-enable-mhdp-with-etnaviv.patch +++ /dev/null @@ -1,22 +0,0 @@ -Tweak MHDP driver Kconfig so it can be enabled with etnaviv - -The MHDP driver is needed for using HDMI on the i.MX8MQ EVK, tweak its -Kconfig entry so that it can be enabled when using etnaviv, not just -Vivante. - -Upstream-Status: pending -Signed-off-by: Scott Murray <scott.murray@konsulko.com> ---- - -diff --git a/drivers/gpu/drm/imx/mhdp/Kconfig b/drivers/gpu/drm/imx/mhdp/Kconfig -index 225ccc3638a8..164b42f04e94 100644 ---- a/drivers/gpu/drm/imx/mhdp/Kconfig -+++ b/drivers/gpu/drm/imx/mhdp/Kconfig -@@ -7,6 +7,6 @@ config DRM_IMX_CDNS_MHDP - select DRM_CDNS_HDMI - select DRM_CDNS_AUDIO - select DRM_CDNS_HDMI_HDCP -- depends on DRM_IMX -+ depends on DRM_IMX || DRM_ETNAVIV - help - Choose this if you want to use HDMI on i.MX8. diff --git a/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx_%.bbappend b/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx_%.bbappend index 0772a98a8..7fa055b40 100644 --- a/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx_%.bbappend +++ b/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx_%.bbappend @@ -4,11 +4,10 @@ require linux-fslc.inc # These patches and the configuration fragment below will need to be # revisited if/when using IMX_DEFAULT_BSP = "mainline" with i.MX8 -# becomes more feasible with upstream meta-freescale. -SRC_URI:append:etnaviv = " \ - file://0001-enable-mhdp-with-etnaviv.patch \ - file://0002-dts-enable-etnaviv.patch \ -" +# becomes feasible with the linux-fslc kernel. +#SRC_URI:append:etnaviv = " \ +# file://0002-dts-enable-etnaviv.patch \ +#" # Support for i.MX8MQ EVKB (e.g. Broadcom wifi) AGL_KCONFIG_FRAGMENTS:append:imx8mq-evk = " imx8mq-evkb.cfg" diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/files/boot_xen.cmd b/meta-agl-bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/files/boot_xen.cmd deleted file mode 100644 index 24cfb1658..000000000 --- a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/files/boot_xen.cmd +++ /dev/null @@ -1,45 +0,0 @@ -# -# SPDX-License-Identifier: MIT -# -# Copyright (c) 2020, MERA -# -# Author: Leonid Lazarev -# -# Xen Boot Script -# -# https://www.raspberrypi.org/documentation/configuration/device-tree.md -# We do not set fdt_addr, because device tree initially is loaded by raspberry pi firmware loader and the particular -# modification are performed. The prepared DTS is propagated to u-boot and this prepared device tree has to be reused. - -setenv kernel_addr_r 0x00480000 # 16M -setenv xen_addr_r 0x00200000 # 2M - -# Load xen to ${xen_addr_r}. -fatload mmc 0:1 ${xen_addr_r} /xen-@@MACHINE@@ - -#configure dom0 -fdt addr ${fdt_addr} - -#read prepared bootargs, rapsberry pi prepared initial list of the parameters for loading -fdt get value bootargs /chosen bootargs -fdt resize 8192 - -# add device type for raspberry -fdt set pcie0 device_type "pci" - -fdt chosen -fdt set /chosen \#address-cells <1> -fdt set /chosen \#size-cells <1> - -# Load Linux Image to ${kernel_addr_r} -fatload mmc 0:1 ${kernel_addr_r} /@@KERNEL_IMAGETYPE@@ - -# we load dom0 with 1512 MB of memory -fdt mknod /chosen dom0 -fdt set /chosen xen,xen-bootargs "console=dtuart dtuart=/soc/serial@7e215040 sync_console dom0_mem=1512M bootscrub=0" -fdt set /chosen xen,dom0-bootargs "${bootargs}" - -fdt set /chosen/dom0 compatible "xen,linux-zimage", "xen,multiboot-module" -fdt set /chosen/dom0 reg <${kernel_addr_r} 0x${filesize} > - -@@KERNEL_BOOTCMD@@ ${xen_addr_r} - ${fdt_addr} 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 deleted file mode 100644 index 1e9f47d23..000000000 --- a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bbappend +++ /dev/null @@ -1,18 +0,0 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/files:" - -SRC_URI:append =" \ - ${@bb.utils.contains('AGL_XEN_WANTED','1',' file://boot_xen.cmd','',d)} \ -" - -do_compile:append() { - - # if xen feature is activated we overwirte the boot script with xen specific one - if [ "${AGL_XEN_WANTED}" = "1" ]; then - sed -e 's/@@KERNEL_IMAGETYPE@@/${KERNEL_IMAGETYPE}/' \ - -e 's/@@KERNEL_BOOTCMD@@/${KERNEL_BOOTCMD}/' \ - -e 's/@@MACHINE@@/${MACHINE}/' \ - "${WORKDIR}/boot_xen.cmd" > "${WORKDIR}/boot.cmd" - - mkimage -A arm -T script -C none -n "Boot script" -d "${WORKDIR}/boot.cmd" boot.scr - fi -}
\ No newline at end of file diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript.bb b/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript.bb deleted file mode 100644 index ccaefc715..000000000 --- a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript.bb +++ /dev/null @@ -1,32 +0,0 @@ -DESCRIPTION = "Boot script for launching OTA-enabled images on raspberrypi" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" - -DEPENDS = "u-boot-mkimage-native" - -COMPATIBLE_MACHINE = "raspberrypi" - -SRC_URI = "file://boot.scr \ - file://uEnv.txt \ - file://uEnv.cma.txt \ - " - -S = "${WORKDIR}" - -inherit deploy - -do_deploy() { - install -d ${DEPLOYDIR}/bcm2835-bootfiles - - mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "Ostree boot script" -d ${S}/boot.scr ${DEPLOYDIR}/bcm2835-bootfiles/boot.scr - if [ "${ENABLE_CMA}" = "1" ]; then - install -m 0755 ${S}/uEnv.cma.txt ${DEPLOYDIR}/bcm2835-bootfiles/uEnv.txt - else - install -m 0755 ${S}/uEnv.txt ${DEPLOYDIR}/bcm2835-bootfiles/uEnv.txt - fi -} - -addtask deploy before do_package after do_install -do_deploy[dirs] += "${DEPLOYDIR}/bcm2835-bootfiles" - -PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/boot.scr b/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/boot.scr deleted file mode 100644 index dc13f85b2..000000000 --- a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/boot.scr +++ /dev/null @@ -1,3 +0,0 @@ -fatload mmc 0:1 $loadaddr /uEnv.txt -env import -t $loadaddr $filesize -run bootcmd diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.cma.txt b/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.cma.txt deleted file mode 100644 index 062bddb93..000000000 --- a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.cma.txt +++ /dev/null @@ -1,21 +0,0 @@ -bootcmd_resetvars=setenv kernel_image; setenv bootargs; setenv kernel_image2; setenv bootargs2 -bootcmd_otenv=run bootcmd_resetvars; load mmc 0:2 $loadaddr /boot/loader/uEnv.txt; env import -t $loadaddr $filesize -bootcmd_rollbackenv=setenv kernel_image ${kernel_image2}; setenv bootargs ${bootargs2} - -bootcmd_args=setenv bootargs "$bootargs $bootargs_fdt ostree_root=/dev/mmcblk0p2 root=/dev/ram0 rw rootwait rootdelay=2 ramdisk_size=8192 panic=1 coherent_pool=6M smsc95xx.turbo_mode=N" - -bootcmd_getroot=setexpr ostree_root gsub "^.*ostree=([^ ]*).*$" "\\\\1" "${bootargs}"; - -bootcmd_fitconf=run bootcmd_getroot; if test -e mmc 0:2 "${ostree_root}/usr/lib/fit_conf"; then load mmc 0:2 $loadaddr "${ostree_root}/usr/lib/fit_conf"; env import -t $loadaddr $filesize; fi - -bootcmd_load=load mmc 0:2 $ramdisk_addr_r "/boot"$kernel_image -bootcmd_run=bootm "${ramdisk_addr_r}${fit_conf}" - -bootcmd_create_envfile=if test ! -e mmc 0:1 uboot.env; then saveenv; fi; - -bootlimit=3 - -bootcmd=if test "${rollback}" = "1"; then run altbootcmd; else run bootcmd_create_envfile; run bootcmd_otenv; run bootcmd_args; run bootcmd_fitconf; run bootcmd_load; run bootcmd_run; if ! "${upgrade_available}" = "1"; then setenv upgrade_available 1; saveenv; fi; reset; fi - -bootcmd_set_rollback=if test ! "${rollback}" = "1"; then setenv rollback 1; setenv upgrade_available 0; saveenv; fi -altbootcmd=run bootcmd_create_envfile; run bootcmd_otenv; run bootcmd_set_rollback; if test -n "${kernel_image2}"; then run bootcmd_rollbackenv; fi; run bootcmd_args; run bootcmd_fitconf; run bootcmd_load; run bootcmd_run; reset diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.txt b/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.txt deleted file mode 100644 index 436fe95fe..000000000 --- a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot-otascript/u-boot-otascript/uEnv.txt +++ /dev/null @@ -1,21 +0,0 @@ -bootcmd_resetvars=setenv kernel_image; setenv bootargs; setenv kernel_image2; setenv bootargs2 -bootcmd_otenv=run bootcmd_resetvars; load mmc 0:2 $loadaddr /boot/loader/uEnv.txt; env import -t $loadaddr $filesize -bootcmd_rollbackenv=setenv kernel_image ${kernel_image2}; setenv bootargs ${bootargs2} - -bootcmd_args=setenv bootargs "$bootargs $bootargs_fdt ostree_root=/dev/mmcblk0p2 root=/dev/ram0 rw rootwait rootdelay=2 ramdisk_size=8192 panic=1" - -bootcmd_getroot=setexpr ostree_root gsub "^.*ostree=([^ ]*).*$" "\\\\1" "${bootargs}"; - -bootcmd_fitconf=run bootcmd_getroot; if test -e mmc 0:2 "${ostree_root}/usr/lib/fit_conf"; then load mmc 0:2 $loadaddr "${ostree_root}/usr/lib/fit_conf"; env import -t $loadaddr $filesize; fi - -bootcmd_load=load mmc 0:2 $ramdisk_addr_r "/boot"$kernel_image -bootcmd_run=bootm "${ramdisk_addr_r}${fit_conf}" - -bootcmd_create_envfile=if test ! -e mmc 0:1 uboot.env; then saveenv; fi; - -bootlimit=3 - -bootcmd=if test "${rollback}" = "1"; then run altbootcmd; else run bootcmd_create_envfile; run bootcmd_otenv; run bootcmd_args; run bootcmd_fitconf; run bootcmd_load; run bootcmd_run; if ! "${upgrade_available}" = "1"; then setenv upgrade_available 1; saveenv; fi; reset; fi - -bootcmd_set_rollback=if test ! "${rollback}" = "1"; then setenv rollback 1; setenv upgrade_available 0; saveenv; fi -altbootcmd=run bootcmd_create_envfile; run bootcmd_otenv; run bootcmd_set_rollback; if test -n "${kernel_image2}"; then run bootcmd_rollbackenv; fi; run bootcmd_args; run bootcmd_fitconf; run bootcmd_load; run bootcmd_run; reset 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 c5edbe1dc..464ae3f6f 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 @@ -1,16 +1,13 @@ SUMMARY = "Combine dtb and dtbo" DESCRIPTION = "Combine specified dtb and one or more dtbo into specified filename found in deploydir" SECTION = "bootloader" -PR = "r1" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" DEPENDS = "dtc-native" -ALLOW_EMPTY:${PN} = "1" -FILES:${PN} = "" - -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" do_compile[depends] += "virtual/kernel:do_deploy" @@ -41,3 +38,6 @@ do_deploy () { } addtask deploy after do_install + +ALLOW_EMPTY:${PN} = "1" +FILES:${PN} = "" diff --git a/meta-agl-bsp/meta-rcar-gen3-adas/conf/layer.conf b/meta-agl-bsp/meta-rcar-gen3-adas/conf/layer.conf index 96aa7ac27..d270a2213 100644 --- a/meta-agl-bsp/meta-rcar-gen3-adas/conf/layer.conf +++ b/meta-agl-bsp/meta-rcar-gen3-adas/conf/layer.conf @@ -15,4 +15,4 @@ BBFILE_COLLECTIONS += "rcar-gen3-cogent" BBFILE_PATTERN_rcar-gen3-cogent := "^${LAYERDIR}/" BBFILE_PRIORITY_rcar-gen3-cogent = "7" -LAYERSERIES_COMPAT_rcar-gen3-cogent = "kirkstone langdale mickledore nanbield scarthgap" +LAYERSERIES_COMPAT_rcar-gen3-cogent = "styhead" diff --git a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/si-tools/si-init_1.0.bb b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/si-tools/si-init_1.0.bb index b53504400..6804fbbb9 100644 --- a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/si-tools/si-init_1.0.bb +++ b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/si-tools/si-init_1.0.bb @@ -6,12 +6,15 @@ inherit systemd SRC_URI = "file://si-init.service" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + do_configure[noexec] = "1" do_compile[noexec] = "1" do_install() { install -d ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/si-init.service ${D}${systemd_system_unitdir} + install -m 0644 ${UNPACKDIR}/si-init.service ${D}${systemd_system_unitdir} # Add symlink to sysinit.target.wants install -d ${D}${sysconfdir}/systemd/system/sysinit.target.wants diff --git a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/ti-bt/ti-bt_%.bbappend b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/ti-bt/ti-bt_%.bbappend index 55d570fc7..eb89d63d0 100644 --- a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/ti-bt/ti-bt_%.bbappend +++ b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/ti-bt/ti-bt_%.bbappend @@ -6,7 +6,6 @@ SRC_URI += "file://ti-uim.service" SYSTEMD_SERVICE:${PN} = "ti-uim.service" -PR = "r0" PV = "0.1+git${SRCPV}" do_install:append() { @@ -14,5 +13,5 @@ do_install:append() { rm -f ${D}/${sysconfdir}/modprobe.d/ti_bt.conf install -d ${D}${systemd_unitdir}/system/ - install -m 0644 ${WORKDIR}/ti-uim.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/ti-uim.service ${D}${systemd_unitdir}/system } diff --git a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-navigation/gpsd/gpsd-machine-conf_1.0.bbappend b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-navigation/gpsd/gpsd-machine-conf_1.0.bbappend index 51604706c..f82e17170 100644 --- a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-navigation/gpsd/gpsd-machine-conf_1.0.bbappend +++ b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-navigation/gpsd/gpsd-machine-conf_1.0.bbappend @@ -2,6 +2,9 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/files:" SRC_URI = "file://gpsd.kingfisher" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" + inherit update-alternatives do_configure[noexec] = "1" @@ -9,7 +12,7 @@ do_compile[noexec] = "1" do_install() { install -d ${D}/${sysconfdir}/default - install -m 0644 ${WORKDIR}/gpsd.kingfisher ${D}/${sysconfdir}/default/gpsd.kingfisher + install -m 0644 ${UNPACKDIR}/gpsd.kingfisher ${D}/${sysconfdir}/default/gpsd.kingfisher } COMPATIBLE_MACHINE = "ulcb" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/bootfiles/renesas-ota-bootfiles.bb b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/bootfiles/renesas-ota-bootfiles.bb deleted file mode 100644 index d46f4d885..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/bootfiles/renesas-ota-bootfiles.bb +++ /dev/null @@ -1,27 +0,0 @@ -DESCRIPTION = "Boot files (bootscripts etc.) for Renesas RCar-M3 board" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" - -inherit deploy - -COMPATIBLE_MACHINE = "(salvator-x|m3ulcb|h3ulcb|ebisu)" - -S = "${WORKDIR}" - -SRC_URI:append:sota = " file://uEnv-ota-m3ulcb.txt \ - file://uEnv-ota-h3ulcb.txt \ - file://uEnv-ota-h3-salvator-xs \ - file://uEnv-ota-m3-salvator-xs" -do_deploy() { - install -d ${DEPLOYDIR}/${PN} -} - -do_deploy:append:sota() { - install -m 0755 ${WORKDIR}/uEnv-ota-${BOARD_NAME}.txt ${DEPLOYDIR}/${PN}/uEnv.txt -} - -addtask deploy before do_package after do_install -do_deploy[dirs] += "${DEPLOYDIR}/${PN}" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.22.%.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.22.%.bbappend deleted file mode 100644 index d91281c18..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.22.%.bbappend +++ /dev/null @@ -1 +0,0 @@ -do_unpack[network] = "1" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.22.%.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.22.%.bbappend index d91281c18..eee123cf4 100644 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.22.%.bbappend +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.22.%.bbappend @@ -1 +1,5 @@ -do_unpack[network] = "1" +# Enable here for now due to meta-rcar-gen3 bbappends being masked +# out, can be removed once gstreamer 1.22.x is properly supported +# there. +EXTRA_OECONF += "--enable-kms" +PACKAGECONFIG:append = " kms" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.%.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.%.bbappend deleted file mode 100644 index d91281c18..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.%.bbappend +++ /dev/null @@ -1 +0,0 @@ -do_unpack[network] = "1" diff --git a/meta-agl-bsp/meta-sifive/recipes-bsp/u-boot/files/0001-WIP-Make-BSP-work-under-YP-kirkstone.patch b/meta-agl-bsp/meta-sifive/recipes-bsp/u-boot/files/0001-WIP-Make-BSP-work-under-YP-kirkstone.patch deleted file mode 100644 index 7fce516f0..000000000 --- a/meta-agl-bsp/meta-sifive/recipes-bsp/u-boot/files/0001-WIP-Make-BSP-work-under-YP-kirkstone.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 57575ce80a96411bce828be6fc84ebd2ed003810 Mon Sep 17 00:00:00 2001 -From: Jan-Simon Moeller <jsmoeller@linuxfoundation.org> -Date: Tue, 12 Sep 2023 22:50:28 +0200 -Subject: [PATCH] [WIP] Make BSP work under YP kirkstone - -This fixes build issues when using the layer with YP 'kirkstone' branch. - -check-config.sh can be solved differently as well. -binman/control.py needs a little investigation - -Upstream-Status: Inappropriate -Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org> ---- - scripts/check-config.sh | 2 +- - tools/binman/control.py | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/scripts/check-config.sh b/scripts/check-config.sh -index cc1c9a54d9..633c69eb76 100755 ---- a/scripts/check-config.sh -+++ b/scripts/check-config.sh -@@ -57,7 +57,7 @@ if [ -s ${new_adhoc} ]; then - echo >&2 "Please add these via Kconfig instead. Find a suitable Kconfig" - echo >&2 "file and add a 'config' or 'menuconfig' option." - # Don't delete the temporary files in case they are useful -- exit 1 -+ exit 0 - else - rm ${suspects} ${ok} ${new_adhoc} - fi -diff --git a/tools/binman/control.py b/tools/binman/control.py -index 47aac207b4..3d013dea17 100644 ---- a/tools/binman/control.py -+++ b/tools/binman/control.py -@@ -8,7 +8,7 @@ - from collections import OrderedDict - import glob - import os --import pkg_resources -+#import pkg_resources - import re - - import sys --- -2.35.3 - diff --git a/meta-agl-bsp/meta-sifive/recipes-bsp/u-boot/u-boot-sifive_2023.07.02.bbappend b/meta-agl-bsp/meta-sifive/recipes-bsp/u-boot/u-boot-sifive_2023.07.02.bbappend deleted file mode 100644 index 30bf957cf..000000000 --- a/meta-agl-bsp/meta-sifive/recipes-bsp/u-boot/u-boot-sifive_2023.07.02.bbappend +++ /dev/null @@ -1,3 +0,0 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/files:" - -SRC_URI:append = " file://0001-WIP-Make-BSP-work-under-YP-kirkstone.patch " diff --git a/meta-agl-bsp/openembedded-layer/recipes-devtools/abseil-cpp/abseil-cpp/0001-PR-1644-unscaledcycleclock-remove-RISC-V-support.patch b/meta-agl-bsp/openembedded-layer/recipes-devtools/abseil-cpp/abseil-cpp/0001-PR-1644-unscaledcycleclock-remove-RISC-V-support.patch new file mode 100644 index 000000000..461df7a60 --- /dev/null +++ b/meta-agl-bsp/openembedded-layer/recipes-devtools/abseil-cpp/abseil-cpp/0001-PR-1644-unscaledcycleclock-remove-RISC-V-support.patch @@ -0,0 +1,82 @@ +From 7335a36d0b5c1c597566f9aa3f458a5b6817c3b4 Mon Sep 17 00:00:00 2001 +From: aurel32 <aurelien@aurel32.net> +Date: Fri, 22 Mar 2024 14:21:13 -0700 +Subject: [PATCH] PR #1644: unscaledcycleclock: remove RISC-V support + +Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1644 + +Starting with Linux 6.6 [1], RDCYCLE is a privileged instruction on RISC-V and can't be used directly from userland. There is a sysctl option to change that as a transition period, but it will eventually disappear. + +The RDTIME instruction is another less accurate alternative, however its frequency varies from board to board, and there is currently now way to get its frequency from userland [2]. + +Therefore this patch just removes the code for unscaledcycleclock on RISC-V. Without processor specific implementation, abseil relies on std::chrono::steady_clock::now().time_since_epoch() which is basically a wrapper around clock_gettime (CLOCK_MONOTONIC), which in turns use __vdso_clock_gettime(). On RISC-V this VDSO is just a wrapper around RDTIME correctly scaled to use nanoseconds units. + +This fixes the testsuite on riscv64, tested on a VisionFive 2 board. + +[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cc4c07c89aada16229084eeb93895c95b7eabaa3 +[2] https://github.com/abseil/abseil-cpp/pull/1631 +Merge 43356a2548cfde76e164d446cb69004b488c6a71 into 76f8011beabdaee872b5fde7546e02407b220cb1 + +Merging this change closes #1644 + +COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1644 from aurel32:rv64-no-unscaledcycleclock 43356a2548cfde76e164d446cb69004b488c6a71 +PiperOrigin-RevId: 618286262 +Change-Id: Ie4120a727e7d0bb185df6e06ea145c780ebe6652 + +Upstream-Status: Backport [https://github.com/abseil/abseil-cpp/commit/7335a36d] +[Adapted to apply on top of meta-oe's patch stack] +Signed-off-by: Scott Murray <scott.murray@konsulko.com> +--- + absl/base/internal/unscaledcycleclock.cc | 12 ------------ + absl/base/internal/unscaledcycleclock_config.h | 5 ++--- + 2 files changed, 2 insertions(+), 15 deletions(-) + +diff --git a/absl/base/internal/unscaledcycleclock.cc b/absl/base/internal/unscaledcycleclock.cc +index f11fecb3..103b4f6a 100644 +--- a/absl/base/internal/unscaledcycleclock.cc ++++ b/absl/base/internal/unscaledcycleclock.cc +@@ -121,18 +121,6 @@ double UnscaledCycleClock::Frequency() { + return aarch64_timer_frequency; + } + +-#elif defined(__riscv) +- +-int64_t UnscaledCycleClock::Now() { +- int64_t virtual_timer_value; +- asm volatile("rdcycle %0" : "=r"(virtual_timer_value)); +- return virtual_timer_value; +-} +- +-double UnscaledCycleClock::Frequency() { +- return base_internal::NominalCPUFrequency(); +-} +- + #elif defined(_M_IX86) || defined(_M_X64) + + #pragma intrinsic(__rdtsc) +diff --git a/absl/base/internal/unscaledcycleclock_config.h b/absl/base/internal/unscaledcycleclock_config.h +index 5e232c1a..83552fc5 100644 +--- a/absl/base/internal/unscaledcycleclock_config.h ++++ b/absl/base/internal/unscaledcycleclock_config.h +@@ -22,7 +22,6 @@ + // The following platforms have an implementation of a hardware counter. + #if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || \ + ((defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)) || \ +- defined(__riscv) || \ + defined(_M_IX86) || (defined(_M_X64) && !defined(_M_ARM64EC)) + #define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 1 + #else +@@ -54,8 +53,8 @@ + #if ABSL_USE_UNSCALED_CYCLECLOCK + // This macro can be used to test if UnscaledCycleClock::Frequency() + // is NominalCPUFrequency() on a particular platform. +-#if (defined(__i386__) || defined(__x86_64__) || defined(__riscv) || \ +- defined(_M_IX86) || defined(_M_X64)) ++#if (defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || \ ++ defined(_M_X64)) + #define ABSL_INTERNAL_UNSCALED_CYCLECLOCK_FREQUENCY_IS_CPU_FREQUENCY + #endif + #endif +-- +2.44.0 + diff --git a/meta-agl-bsp/openembedded-layer/recipes-devtools/abseil-cpp/abseil-cpp_20240116.2.bbappend b/meta-agl-bsp/openembedded-layer/recipes-devtools/abseil-cpp/abseil-cpp_20240116.2.bbappend new file mode 100644 index 000000000..2bf47126f --- /dev/null +++ b/meta-agl-bsp/openembedded-layer/recipes-devtools/abseil-cpp/abseil-cpp_20240116.2.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" + +SRC_URI += "file://0001-PR-1644-unscaledcycleclock-remove-RISC-V-support.patch" diff --git a/meta-agl-bsp/openembedded-layer/recipes-devtools/python/python3-grpcio/0001-PR-1644-unscaledcycleclock-remove-RISC-V-support.patch b/meta-agl-bsp/openembedded-layer/recipes-devtools/python/python3-grpcio/0001-PR-1644-unscaledcycleclock-remove-RISC-V-support.patch new file mode 100644 index 000000000..82f15f88c --- /dev/null +++ b/meta-agl-bsp/openembedded-layer/recipes-devtools/python/python3-grpcio/0001-PR-1644-unscaledcycleclock-remove-RISC-V-support.patch @@ -0,0 +1,82 @@ +From 7335a36d0b5c1c597566f9aa3f458a5b6817c3b4 Mon Sep 17 00:00:00 2001 +From: aurel32 <aurelien@aurel32.net> +Date: Fri, 22 Mar 2024 14:21:13 -0700 +Subject: [PATCH] PR #1644: unscaledcycleclock: remove RISC-V support + +Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1644 + +Starting with Linux 6.6 [1], RDCYCLE is a privileged instruction on RISC-V and can't be used directly from userland. There is a sysctl option to change that as a transition period, but it will eventually disappear. + +The RDTIME instruction is another less accurate alternative, however its frequency varies from board to board, and there is currently now way to get its frequency from userland [2]. + +Therefore this patch just removes the code for unscaledcycleclock on RISC-V. Without processor specific implementation, abseil relies on std::chrono::steady_clock::now().time_since_epoch() which is basically a wrapper around clock_gettime (CLOCK_MONOTONIC), which in turns use __vdso_clock_gettime(). On RISC-V this VDSO is just a wrapper around RDTIME correctly scaled to use nanoseconds units. + +This fixes the testsuite on riscv64, tested on a VisionFive 2 board. + +[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cc4c07c89aada16229084eeb93895c95b7eabaa3 +[2] https://github.com/abseil/abseil-cpp/pull/1631 +Merge 43356a2548cfde76e164d446cb69004b488c6a71 into 76f8011beabdaee872b5fde7546e02407b220cb1 + +Merging this change closes #1644 + +COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1644 from aurel32:rv64-no-unscaledcycleclock 43356a2548cfde76e164d446cb69004b488c6a71 +PiperOrigin-RevId: 618286262 +Change-Id: Ie4120a727e7d0bb185df6e06ea145c780ebe6652 + +Upstream-Status: Backport [https://github.com/abseil/abseil-cpp/commit/7335a36d] +[Adapted to apply on top of meta-oe's patch stack] +Signed-off-by: Scott Murray <scott.murray@konsulko.com> +--- + .../absl/base/internal/unscaledcycleclock.cc | 12 ------------ + .../absl/base/internal/unscaledcycleclock_config.h | 5 ++--- + 2 files changed, 2 insertions(+), 15 deletions(-) + +diff --git a/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc b/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc +index f11fecb..103b4f6 100644 +--- a/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc ++++ b/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc +@@ -121,18 +121,6 @@ double UnscaledCycleClock::Frequency() { + return aarch64_timer_frequency; + } + +-#elif defined(__riscv) +- +-int64_t UnscaledCycleClock::Now() { +- int64_t virtual_timer_value; +- asm volatile("rdcycle %0" : "=r"(virtual_timer_value)); +- return virtual_timer_value; +-} +- +-double UnscaledCycleClock::Frequency() { +- return base_internal::NominalCPUFrequency(); +-} +- + #elif defined(_M_IX86) || defined(_M_X64) + + #pragma intrinsic(__rdtsc) +diff --git a/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock_config.h b/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock_config.h +index 5e232c1..83552fc 100644 +--- a/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock_config.h ++++ b/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock_config.h +@@ -22,7 +22,6 @@ + // The following platforms have an implementation of a hardware counter. + #if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || \ + ((defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)) || \ +- defined(__riscv) || \ + defined(_M_IX86) || (defined(_M_X64) && !defined(_M_ARM64EC)) + #define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 1 + #else +@@ -54,8 +53,8 @@ + #if ABSL_USE_UNSCALED_CYCLECLOCK + // This macro can be used to test if UnscaledCycleClock::Frequency() + // is NominalCPUFrequency() on a particular platform. +-#if (defined(__i386__) || defined(__x86_64__) || defined(__riscv) || \ +- defined(_M_IX86) || defined(_M_X64)) ++#if (defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || \ ++ defined(_M_X64)) + #define ABSL_INTERNAL_UNSCALED_CYCLECLOCK_FREQUENCY_IS_CPU_FREQUENCY + #endif + #endif +-- +2.44.0 + diff --git a/meta-agl-bsp/openembedded-layer/recipes-devtools/python/python3-grpcio_1.62.%.bbappend b/meta-agl-bsp/openembedded-layer/recipes-devtools/python/python3-grpcio_1.62.%.bbappend new file mode 100644 index 000000000..2bf47126f --- /dev/null +++ b/meta-agl-bsp/openembedded-layer/recipes-devtools/python/python3-grpcio_1.62.%.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" + +SRC_URI += "file://0001-PR-1644-unscaledcycleclock-remove-RISC-V-support.patch" diff --git a/meta-agl-bsp/virtualization-layer/recipes-extended/xen/files/0001-XEN-on-RPi4-1GB-lmitation-workaround-XEN-tries-to-al.patch b/meta-agl-bsp/virtualization-layer/recipes-extended/xen/files/0001-XEN-on-RPi4-1GB-lmitation-workaround-XEN-tries-to-al.patch deleted file mode 100644 index d83c65257..000000000 --- a/meta-agl-bsp/virtualization-layer/recipes-extended/xen/files/0001-XEN-on-RPi4-1GB-lmitation-workaround-XEN-tries-to-al.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 2701d65271686dff0cb39ab7da1e821f5dede61e Mon Sep 17 00:00:00 2001 -From: Leonid Lazarev <leonid.lazarev@mera.com> -Date: Tue, 21 Apr 2020 17:28:16 +0300 -Subject: [PATCH] XEN on RPi4 1GB lmitation workaround: XEN tries to allocated - the memopry for dom0 within first 4GB, but for some reason raspberry pi only - allows to load kernel from 1st GB. Push XEN to allocate first bank for dom0 - from 1st GB - ---- - xen/arch/arm/domain_build.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c -index dd9c3b73ba..8501a8c8aa 100644 ---- a/xen/arch/arm/domain_build.c -+++ b/xen/arch/arm/domain_build.c -@@ -281,7 +281,7 @@ static void __init allocate_memory_11(struct domain *d, - */ - while ( order >= min_low_order ) - { -- for ( bits = order ; bits <= (lowmem ? 32 : PADDR_BITS); bits++ ) -+ for ( bits = order ; bits <= (lowmem ? 30 : PADDR_BITS); bits++ ) - { - pg = alloc_domheap_pages(d, order, MEMF_bits(bits)); - if ( pg != NULL ) --- -2.17.1 - diff --git a/meta-agl-bsp/virtualization-layer/recipes-extended/xen/xen-mkimage-rpi4.bb b/meta-agl-bsp/virtualization-layer/recipes-extended/xen/xen-mkimage-rpi4.bb deleted file mode 100644 index b857cb19f..000000000 --- a/meta-agl-bsp/virtualization-layer/recipes-extended/xen/xen-mkimage-rpi4.bb +++ /dev/null @@ -1,29 +0,0 @@ -DESCRIPTION = "Xen hypervisor u-boot image" -LICENSE = "GPL-2.0-only" -SECTION = "console/tools" - -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" - - - -ALLOW_EMPTY:${PN} = "1" -FILES:${PN} = "" -S = "${WORKDIR}" - -DEPENDS = "u-boot-mkimage-native " - -# Only for aarch64 -COMPATIBLE_MACHINE = "(-)" -COMPATIBLE_MACHINE:aarch64 = "(.*)" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -do_configure[noexec] = "1" -do_deploy[noexec] = "1" - -do_compile[depends] += "xen:do_deploy" - -# Uboot compatible image -do_compile () { - uboot-mkimage -A arm64 -C none -T kernel -a 0x48080000 -e 0x48080000 -n "XEN" -d ${DEPLOY_DIR_IMAGE}/xen-${MACHINE} ${DEPLOY_DIR_IMAGE}/xen-${MACHINE}.uImage -} diff --git a/meta-agl-bsp/virtualization-layer/recipes-extended/xen/xen-tools_git.bbappend b/meta-agl-bsp/virtualization-layer/recipes-extended/xen/xen-tools_git.bbappend deleted file mode 100644 index a67200618..000000000 --- a/meta-agl-bsp/virtualization-layer/recipes-extended/xen/xen-tools_git.bbappend +++ /dev/null @@ -1,11 +0,0 @@ - -# make the package specific to the machine for now -PACKAGE_ARCH = "${MACHINE_ARCH}" - -# rpi4 -LIC_FILES_CHKSUM:raspberrypi4 = "file://COPYING;md5=4295d895d4b5ce9d070263d52f030e49" -XEN_REL:raspberrypi4 = "4.13" -SRCREV:raspberrypi4 = "721f2c323ca55c77857c93e7275b4a93a0e15e1f" -SRC_URI:raspberrypi4 = " \ - git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \ - " diff --git a/meta-agl-bsp/virtualization-layer/recipes-extended/xen/xen_git.bbappend b/meta-agl-bsp/virtualization-layer/recipes-extended/xen/xen_git.bbappend deleted file mode 100644 index 2d63e1841..000000000 --- a/meta-agl-bsp/virtualization-layer/recipes-extended/xen/xen_git.bbappend +++ /dev/null @@ -1,18 +0,0 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/files:" - -# make the package machine-specific -PACKAGE_ARCH = "${MACHINE_ARCH}" - -# rpi4 specifics -LIC_FILES_CHKSUM:raspberrypi4 = "file://COPYING;md5=4295d895d4b5ce9d070263d52f030e49" -XEN_REL:raspberrypi4 = "4.13" - -SRCREV:raspberrypi4 = "721f2c323ca55c77857c93e7275b4a93a0e15e1f" -SRC_URI:append:raspberrypi4 = " file://0001-XEN-on-RPi4-1GB-lmitation-workaround-XEN-tries-to-al.patch" - -#due to incorrect xen binary preparation in external library, we add additional deploy -do_deploy:append:raspberrypi4() { - if [ -f ${B}/xen/xen ]; then - install -m 0644 ${B}/xen/xen ${DEPLOYDIR}/xen-${MACHINE} - fi -} diff --git a/meta-agl-bsp/virtualization-layer/recipes-graphics/mesa/mesa/0001-virgl-virgl_driinfo.h.in-Disable-by-default-emulated.patch b/meta-agl-bsp/virtualization-layer/recipes-graphics/mesa/mesa/0001-virgl-virgl_driinfo.h.in-Disable-by-default-emulated.patch index 8bc102c92..d27696056 100644 --- a/meta-agl-bsp/virtualization-layer/recipes-graphics/mesa/mesa/0001-virgl-virgl_driinfo.h.in-Disable-by-default-emulated.patch +++ b/meta-agl-bsp/virtualization-layer/recipes-graphics/mesa/mesa/0001-virgl-virgl_driinfo.h.in-Disable-by-default-emulated.patch @@ -1,7 +1,8 @@ -From 39dea63ebce2764c683c8c2eddbb10cf07a970c4 Mon Sep 17 00:00:00 2001 +From 737ccb36c0faf275037e5e96a263c89a44886ddd Mon Sep 17 00:00:00 2001 From: Marius Vlad <marius.vlad@collabora.com> Date: Mon, 19 Dec 2022 11:51:28 +0200 Subject: [PATCH] virgl/virgl_driinfo.h.in: Disable by default emulated BGRA + and swizzling Workaround in place for virtio aarch64 to avoid graphical artefacts when @@ -16,10 +17,10 @@ Signed-off-by: Marius Vlad <marius.vlad@collabora.com> 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/virgl/virgl_driinfo.h.in b/src/gallium/drivers/virgl/virgl_driinfo.h.in -index f57e5880965..1c06f932c5c 100644 +index ec688f5..244021e 100644 --- a/src/gallium/drivers/virgl/virgl_driinfo.h.in +++ b/src/gallium/drivers/virgl/virgl_driinfo.h.in -@@ -8,7 +8,7 @@ +@@ -8,8 +8,8 @@ // 5. Implement the tweak in virglrenderer DRI_CONF_SECTION_MISCELLANEOUS DRI_CONF_FORMAT_L8_SRGB_ENABLE_READBACK(false) @@ -28,7 +29,8 @@ index f57e5880965..1c06f932c5c 100644 + DRI_CONF_GLES_EMULATE_BGRA(false) + DRI_CONF_GLES_APPLY_BGRA_DEST_SWIZZLE(false) DRI_CONF_GLES_SAMPLES_PASSED_VALUE(1024, 1, 400000000) - DRI_CONF_SECTION_END + + /* -- -2.35.1 +2.30.2 diff --git a/meta-agl-bsp/virtualization-layer/recipes-graphics/mesa/mesa_22.%.bbappend b/meta-agl-bsp/virtualization-layer/recipes-graphics/mesa/mesa_24.%.bbappend index 0a6606ebf..0a6606ebf 100644 --- a/meta-agl-bsp/virtualization-layer/recipes-graphics/mesa/mesa_22.%.bbappend +++ b/meta-agl-bsp/virtualization-layer/recipes-graphics/mesa/mesa_24.%.bbappend diff --git a/meta-agl-bsp/virtualization-layer/recipes-kernel/linux/linux-yocto_5.15.bbappend b/meta-agl-bsp/virtualization-layer/recipes-kernel/linux/linux-yocto_6.6.bbappend index 6952436a3..6952436a3 100644 --- a/meta-agl-bsp/virtualization-layer/recipes-kernel/linux/linux-yocto_5.15.bbappend +++ b/meta-agl-bsp/virtualization-layer/recipes-kernel/linux/linux-yocto_6.6.bbappend |