diff options
Diffstat (limited to 'meta-agl-bsp')
262 files changed, 1508 insertions, 8195 deletions
diff --git a/meta-agl-bsp/README b/meta-agl-bsp/README new file mode 100644 index 000000000..69ca72c9d --- /dev/null +++ b/meta-agl-bsp/README @@ -0,0 +1,19 @@ +This is meta-agl-bsp. + +This layer holds the 'impedance-mismatch' between AGL and the BSP's. + +/dream on +In an ideal world, this would be empty! +/dream off + +Maintenance +----------- + +All patches must be submitted via the AGL Gerrit instance at +https://gerrit.automotivelinux.org. See this wiki page for +details: + +https://wiki.automotivelinux.org/agl-distro/contributing + +Layer maintainers: + Jan-Simon Möller <jsmoeller@linuxfoundation.org> diff --git a/meta-agl-bsp/conf/include/agl_am62xx-evm.inc b/meta-agl-bsp/conf/include/agl_am62xx-evm.inc new file mode 100644 index 000000000..24fd95141 --- /dev/null +++ b/meta-agl-bsp/conf/include/agl_am62xx-evm.inc @@ -0,0 +1,8 @@ +# am62xx-evm has a k3r5 BBMULTICONFIG to build its bootloader +# firmware, need to use an override to set DEFAULTTUNE back to +# what that machine configuration needs. +DEFAULTTUNE:k3r5:forcedefaulttune = "armv7athf" + +# meta-ti-bsp layer conf does break expectations wrt common folders +# meta-ti-bsp/conf/layer.conf:TI_COMMON_DEPLOY ?= "${TOPDIR}/deploy-ti" +TI_COMMON_DEPLOY := "${TMPDIR}/deploy" diff --git a/meta-agl-bsp/conf/include/agl_bbe.inc b/meta-agl-bsp/conf/include/agl_bbe.inc index 5c28bea20..5252c558b 100644 --- a/meta-agl-bsp/conf/include/agl_bbe.inc +++ b/meta-agl-bsp/conf/include/agl_bbe.inc @@ -6,35 +6,19 @@ CORE_IMAGE_EXTRA_INSTALL += "packagegroup-machine-base" #------------------------------------------------- -## Graphics section ## -#------------------------------------------------- -PACKAGES_GFX = "ti-sgx-ddk-km" -IMAGE_INSTALL_append = " ${PACKAGES_GFX}" - - -# Enable Gfx Pkgs -MACHINE_FEATURES_append = " sgx" -MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" - -DEPENDS_remove = "virtual/libgl" - -# Preferred providers -PREFERRED_PROVIDER_virtual/libgles1 = "" -PREFERRED_PROVIDER_virtual/libgles2 = "ti-sgx-ddk-um" -PREFERRED_PROVIDER_virtual/egl = "ti-sgx-ddk-um" -PREFERRED_PROVIDER_virtual/libgbm = "ti-sgx-ddk-um" -PREFERRED_PROVIDER_virtual/mesa = "mesa-gl" - -#------------------------------------------------- ## Multimedia section ## #------------------------------------------------- # DEFAULTTUNE for cortex-a8 -DISTRO_FEATURES_append = " agl-medium-arm-compiler" - -SECURITY_CFLAGS_pn-mozjs = "" -SECURITY_LDFLAGS_pn-mozjs = "" -SECURITY_CFLAGS_pn-gpm = "" -SECURITY_LDFLAGS_pn-gpm = "" -SECURITY_CFLAGS_pn-libatasmart = "" -SECURITY_LDFLAGS_pn-libatasmart = "" +DISTRO_FEATURES:append = " agl-medium-arm-compiler" + +SECURITY_CFLAGS:pn-mozjs = "" +SECURITY_LDFLAGS:pn-mozjs = "" +SECURITY_CFLAGS:pn-gpm = "" +SECURITY_LDFLAGS:pn-gpm = "" +SECURITY_CFLAGS:pn-libatasmart = "" +SECURITY_LDFLAGS:pn-libatasmart = "" + +# meta-ti-bsp layer conf does break expectations wrt common folders +# meta-ti-bsp/conf/layer.conf:TI_COMMON_DEPLOY ?= "${TOPDIR}/deploy-ti" +TI_COMMON_DEPLOY := "${TMPDIR}/deploy"
\ No newline at end of file diff --git a/meta-agl-bsp/conf/include/agl_beaglebone-ai64.inc b/meta-agl-bsp/conf/include/agl_beaglebone-ai64.inc new file mode 100644 index 000000000..1e03b70ff --- /dev/null +++ b/meta-agl-bsp/conf/include/agl_beaglebone-ai64.inc @@ -0,0 +1,6 @@ +# beaglebone-ai64 has a k3r5 BBMULTICONFIG to build its bootloader +# and firmware, need to use an override to set DEFAULTTUNE back to +# what that machine configuration needs. +DEFAULTTUNE:k3r5:forcedefaulttune = "armv7athf" + +TI_COMMON_DEPLOY := "${TMPDIR}/deploy" diff --git a/meta-agl-bsp/conf/include/agl_beaglebone.inc b/meta-agl-bsp/conf/include/agl_beaglebone.inc index cfd189df3..ec3a3a448 100644 --- a/meta-agl-bsp/conf/include/agl_beaglebone.inc +++ b/meta-agl-bsp/conf/include/agl_beaglebone.inc @@ -1,40 +1,10 @@ # This config is for the beaglebone (inspired from the vayu config). -#------------------------------------------------- -## Graphics section ## -#------------------------------------------------- -PACKAGES_GFX = "ti-sgx-ddk-km" -IMAGE_INSTALL_append = " ${PACKAGES_GFX}" - - -# Enable Gfx Pkgs -MACHINE_FEATURES_append = " sgx" -MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" - -DEPENDS_remove = "virtual/libgl" - -# Preferred providers -PREFERRED_PROVIDER_virtual/libgles1 = "" -PREFERRED_PROVIDER_virtual/libgles2 = "ti-sgx-ddk-um" -PREFERRED_PROVIDER_virtual/egl = "ti-sgx-ddk-um" -PREFERRED_PROVIDER_virtual/libgbm = "ti-sgx-ddk-um" -PREFERRED_PROVIDER_virtual/mesa = "mesa-gl" - -#------------------------------------------------- -## Multimedia section ## -#------------------------------------------------- - -PREFERRED_PROVIDER_virtual/kernel = "linux-ti-staging" -PREFERRED_VERSION_virtual/kernel = "4.9" - # DEFAULTTUNE for cortex-a8 -DISTRO_FEATURES_append = " agl-medium-arm-compiler" - -SECURITY_CFLAGS_pn-mozjs = "" -SECURITY_LDFLAGS_pn-mozjs = "" -SECURITY_CFLAGS_pn-gpm = "" -SECURITY_LDFLAGS_pn-gpm = "" -SECURITY_CFLAGS_pn-libatasmart = "" -SECURITY_LDFLAGS_pn-libatasmart = "" +DISTRO_FEATURES:append = " agl-medium-arm-compiler" WKS_FILE = "sdimage-bootpart-uuid.wks" + +# meta-ti-bsp layer conf does break expectations wrt common folders +# meta-ti-bsp/conf/layer.conf:TI_COMMON_DEPLOY ?= "${TOPDIR}/deploy-ti" +TI_COMMON_DEPLOY := "${TMPDIR}/deploy"
\ No newline at end of file diff --git a/meta-agl-bsp/conf/include/agl_beagleplay.inc b/meta-agl-bsp/conf/include/agl_beagleplay.inc new file mode 100644 index 000000000..77b669bb7 --- /dev/null +++ b/meta-agl-bsp/conf/include/agl_beagleplay.inc @@ -0,0 +1,6 @@ +# beagleplay has a k3r5 BBMULTICONFIG to build its bootloader +# and firmware, need to use an override to set DEFAULTTUNE back to +# what that machine configuration needs. +DEFAULTTUNE:k3r5:forcedefaulttune = "armv7athf" + +TI_COMMON_DEPLOY := "${TMPDIR}/deploy" diff --git a/meta-agl-bsp/conf/include/agl_cubox-i.inc b/meta-agl-bsp/conf/include/agl_cubox-i.inc index 46464325b..ee5e759e4 100644 --- a/meta-agl-bsp/conf/include/agl_cubox-i.inc +++ b/meta-agl-bsp/conf/include/agl_cubox-i.inc @@ -1,24 +1,15 @@ -DISTRO_FEATURES_append = " agl-medium-arm-compiler" +require agl_imx6-common.inc -# This disables the Freescale/NXP Vivante GPU driver and enables -# etnaviv support. -MACHINEOVERRIDES .= ":use-mainline-bsp" - -# Disable meta-freescale package architecure mangling, as it causes -# issues with AGL's explicit setting of DEFAULTTUNE. -INHERIT_remove = "fsl-dynamic-packagearch" -MACHINE_SOCARCH = "${TUNE_PKGARCH}" +# Force use of the community supported LTS kernel instead of the +# default linux-fslc +PREFERRED_PROVIDER_virtual/kernel = "linux-fslc-lts" # 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 \ +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 \ " - -# Disable the meta-freescale weston-init bbappend as it conflicts -# with AGL's. -BBMASK = "meta-freescale/recipes-graphics/wayland/weston-init" - -# Set CMA size large enough to work with AGL -UBOOT_EXTLINUX_KERNEL_ARGS_append = " cma=512M" diff --git a/meta-agl-bsp/conf/include/agl_cyclone5.inc b/meta-agl-bsp/conf/include/agl_cyclone5.inc index 7ebd4090c..3f12a2a92 100644 --- a/meta-agl-bsp/conf/include/agl_cyclone5.inc +++ b/meta-agl-bsp/conf/include/agl_cyclone5.inc @@ -1,7 +1,7 @@ OSTREE_BOOTLOADER ?= "u-boot" # DEFAULTTUNE for cortex-a9 -DISTRO_FEATURES_append = " agl-medium-arm-compiler" +DISTRO_FEATURES:append = " agl-medium-arm-compiler" # Use the AGL default ext4.xz to generate the rpi-sdimg SDIMG_ROOTFS_TYPE = "ext4.xz" diff --git a/meta-agl-bsp/conf/include/agl_dra7xx-evm.inc b/meta-agl-bsp/conf/include/agl_dra7xx-evm.inc deleted file mode 100644 index ccc8feb9a..000000000 --- a/meta-agl-bsp/conf/include/agl_dra7xx-evm.inc +++ /dev/null @@ -1,42 +0,0 @@ - -#------------------------------------------------- -## Graphics section ## -#------------------------------------------------- -PACKAGES_GFX_${MACHINE} = "ti-sgx-ddk-km" - -# Enable Gfx Pkgs -MACHINE_FEATURES_append = " sgx" -MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" - -DEPENDS_remove = "virtual/libgl" - -# Preferred providers -PREFERRED_PROVIDER_virtual/libgles1 = "" -PREFERRED_PROVIDER_virtual/libgles2 = "ti-sgx-ddk-um" -PREFERRED_PROVIDER_virtual/egl = "ti-sgx-ddk-um" -PREFERRED_PROVIDER_virtual/libgbm = "ti-sgx-ddk-um" -PREFERRED_PROVIDER_virtual/mesa = "mesa-gl" - -#------------------------------------------------- -## Multimedia section ## -#------------------------------------------------- - -PACKAGES_MULTIMEDIA = " \ - ipumm-fw \ - ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio-misc' , '', d)} \ -" - -PREFERRED_PROVIDER_virtual/kernel = "linux-ti-staging" -PREFERRED_VERSION_virtual/kernel = "4.9" - -# Distribution-specific runtime components -IMAGE_INSTALL_append = " \ - ${PACKAGES_GFX} \ - ${PACKAGES_MULTIMEDIA} \ - cmem \ -" - -# Include WIC support based on beaglebone -do_image_wic[depends] += "mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot" -WKS_FILE = "sdimage-bootpart-uuid.wks" -IMAGE_BOOT_FILES = "MLO u-boot.img uEnv.txt" diff --git a/meta-agl-bsp/conf/include/agl_dragonboard-410c.inc b/meta-agl-bsp/conf/include/agl_dragonboard-410c.inc deleted file mode 100644 index f66265369..000000000 --- a/meta-agl-bsp/conf/include/agl_dragonboard-410c.inc +++ /dev/null @@ -1,3 +0,0 @@ -# Install 96boards-tools for resizing partition -# Add systemd unit file for the qcom_q6v5_pil kernel module -IMAGE_INSTALL_append = " 96boards-tools q6v5-pil" diff --git a/meta-agl-bsp/conf/include/agl_dragonboard-820c.inc b/meta-agl-bsp/conf/include/agl_dragonboard-820c.inc deleted file mode 100644 index f74d703fa..000000000 --- a/meta-agl-bsp/conf/include/agl_dragonboard-820c.inc +++ /dev/null @@ -1,2 +0,0 @@ -# Install 96boards-tools for resizing partition -IMAGE_INSTALL_append = " 96boards-tools" diff --git a/meta-agl-bsp/conf/include/agl_ebisu.inc b/meta-agl-bsp/conf/include/agl_ebisu.inc index 2ac93adf0..d684f814d 100644 --- a/meta-agl-bsp/conf/include/agl_ebisu.inc +++ b/meta-agl-bsp/conf/include/agl_ebisu.inc @@ -4,10 +4,10 @@ BOARD_NAME = "ebisu" DTB_SUFFIX = "r8a77990-ebisu" -DISTRO_FEATURES_remove = " use_eva_pkg" +DISTRO_FEATURES:remove = " use_eva_pkg" # Configuration for USB 3.0 -MACHINE_FEATURES_append = " usb3" +MACHINE_FEATURES:append = " usb3" -IMAGE_INSTALL_append = " gstreamer1.0-omx gstreamer1.0-plugin-vspfilter" -IMAGE_INSTALL_append = " kernel-module-mmngr kernel-module-mmngrbuf kernel-module-uvcs-drv kernel-module-vspmif" +IMAGE_INSTALL:append = " gstreamer1.0-omx gstreamer1.0-plugin-vspfilter" +IMAGE_INSTALL:append = " kernel-module-mmngr kernel-module-mmngrbuf kernel-module-uvcs-drv kernel-module-vspm-if" diff --git a/meta-agl-bsp/conf/include/agl_h3-salvator-x-nogfx.inc b/meta-agl-bsp/conf/include/agl_h3-salvator-x-nogfx.inc index c12026351..4ff103df8 100644 --- a/meta-agl-bsp/conf/include/agl_h3-salvator-x-nogfx.inc +++ b/meta-agl-bsp/conf/include/agl_h3-salvator-x-nogfx.inc @@ -1,10 +1,9 @@ -require conf/include/agl_rcar-nogfx.inc +require conf/include/agl_salvator-nogfx.inc SOC_FAMILY = "r8a7795" BOARD_NAME = "h3-salvator-x" -DTB_SUFFIX = "r8a7795-salvator-xs" +DTB_SUFFIX = "r8a77951-salvator-xs" -# Mask graphic Pkgs -BBMASK += "gles-user-module|kernel-module-gles|wayland-kms|libgbm" -# Mask MMP recipes -BBMASK += "kernel-module-uvcs-drv|omx-user-module" +# do use software rendering to display the compositor +# used for images w/o binary-only driver +WESTON_USE_PIXMAN = "1" diff --git a/meta-agl-bsp/conf/include/agl_h3-salvator-x.inc b/meta-agl-bsp/conf/include/agl_h3-salvator-x.inc index d338a5663..134b1dd1f 100644 --- a/meta-agl-bsp/conf/include/agl_h3-salvator-x.inc +++ b/meta-agl-bsp/conf/include/agl_h3-salvator-x.inc @@ -1,9 +1,6 @@ -require conf/include/agl_rcar.inc +require conf/include/agl_salvator.inc SOC_FAMILY = "r8a7795" BOARD_NAME = "h3-salvator-x" -DTB_SUFFIX = "r8a7795-salvator-xs" +DTB_SUFFIX = "r8a77951-salvator-xs" -IMAGE_INSTALL_append_rcar-gen3 = " \ - kernel-module-vspmif \ -" diff --git a/meta-agl-bsp/conf/include/agl_h3ulcb-nogfx.inc b/meta-agl-bsp/conf/include/agl_h3ulcb-nogfx.inc index 25755d247..5f288fca5 100644 --- a/meta-agl-bsp/conf/include/agl_h3ulcb-nogfx.inc +++ b/meta-agl-bsp/conf/include/agl_h3ulcb-nogfx.inc @@ -2,9 +2,24 @@ require conf/include/agl_rcar-nogfx.inc SOC_FAMILY = "r8a7795" BOARD_NAME = "h3ulcb" -DTB_SUFFIX = "r8a7795-h3ulcb" +DTB_SUFFIX = "r8a77951-ulcb" # Mask graphic Pkgs BBMASK += "gles-user-module|kernel-module-gles|wayland-kms|libgbm" # Mask MMP recipes BBMASK += "kernel-module-uvcs-drv|omx-user-module" + +# Work around use of obsolete Weston backend-fbdev in meta-rcar-gen3 +# when building without the proprietary driver stack. Masking out the +# weston_%.bbappend seems the simplest approach for now, as forcing +# USE_GLES = "1" to disable the adding of -Dbackend-default="fbdev" to +# EXTRA_OEMESON triggers adding "libgbm" to DEPENDS, which breaks due +# to that being a component specific to the proprietary stack we are +# explicitly disabling. If the "libgbm" usage in the bbappend was +# instead "virtual/libgbm" as is now used in poky, it might be possible +# to just tweak PREFERRED_PROVIDER_virtual/libgbm = "mesa". +BBMASK += "meta-rcar-gen3/recipes-graphics/wayland/weston_%.bbappend" + +# do use software rendering to display the compositor +# used for images w/o binary-only driver +WESTON_USE_PIXMAN = "1" diff --git a/meta-agl-bsp/conf/include/agl_h3ulcb.inc b/meta-agl-bsp/conf/include/agl_h3ulcb.inc index eb3836abb..b958d767c 100644 --- a/meta-agl-bsp/conf/include/agl_h3ulcb.inc +++ b/meta-agl-bsp/conf/include/agl_h3ulcb.inc @@ -2,4 +2,5 @@ require conf/include/agl_rcar.inc SOC_FAMILY = "r8a7795" BOARD_NAME = "h3ulcb" -DTB_SUFFIX = "r8a7795-h3ulcb" +#ws2.0 +DTB_SUFFIX = "r8a77951-ulcb" diff --git a/meta-agl-bsp/conf/include/agl_hsdk.inc b/meta-agl-bsp/conf/include/agl_hsdk.inc deleted file mode 100644 index 075cea53e..000000000 --- a/meta-agl-bsp/conf/include/agl_hsdk.inc +++ /dev/null @@ -1,4 +0,0 @@ -KERNEL_IMAGETYPE = "uImage" -WKS_FILE = "sdimage-hsdk.wks" -IMAGE_BOOT_FILES = "uImage uboot.env" -IMAGE_INSTALL_append = " kernel-modules" diff --git a/meta-agl-bsp/conf/include/agl_imx-common.inc b/meta-agl-bsp/conf/include/agl_imx-common.inc new file mode 100644 index 000000000..b58a99589 --- /dev/null +++ b/meta-agl-bsp/conf/include/agl_imx-common.inc @@ -0,0 +1,8 @@ +# Disable meta-freescale package architecure mangling, as it causes +# issues with AGL's explicit setting of DEFAULTTUNE. +INHERIT:remove = "fsl-dynamic-packagearch" +MACHINE_SOCARCH = "${TUNE_PKGARCH}" + +# Disable the meta-freescale weston-init bbappend as it conflicts +# with AGL's. +BBMASK += "meta-freescale/recipes-graphics/wayland/weston-init" diff --git a/meta-agl-bsp/conf/include/agl_imx6-common.inc b/meta-agl-bsp/conf/include/agl_imx6-common.inc new file mode 100644 index 000000000..7b22282dd --- /dev/null +++ b/meta-agl-bsp/conf/include/agl_imx6-common.inc @@ -0,0 +1,14 @@ +require agl_imx-common.inc + +DISTRO_FEATURES:append = " agl-medium-arm-compiler" + +# This disables the Freescale/NXP Vivante GPU driver and enables +# etnaviv support. This is the default for the i.MX6 platforms in +# meta-freescale, but not for all the ones in meta-freescale-3rdparty, +# so set it here to give a consistent default. +IMX_DEFAULT_BSP = "mainline" + +# Set CMA size large enough to work with AGL +UBOOT_EXTLINUX_KERNEL_ARGS:append = " cma=512M" + +AGL_DEFAULT_INITRAMFS_FSTYPES := "" diff --git a/meta-agl-bsp/conf/include/agl_imx6qdlsabreauto.inc b/meta-agl-bsp/conf/include/agl_imx6qdlsabreauto.inc index 0d8c6f239..f058ba1a5 100644 --- a/meta-agl-bsp/conf/include/agl_imx6qdlsabreauto.inc +++ b/meta-agl-bsp/conf/include/agl_imx6qdlsabreauto.inc @@ -1,19 +1,5 @@ -DISTRO_FEATURES_append = " agl-medium-arm-compiler" +require agl_imx6-common.inc -# This disables the Freescale/NXP Vivante GPU driver and enables -# etnaviv support. -MACHINEOVERRIDES .= ":use-mainline-bsp" - -# Disable meta-freescale package architecure mangling, as it causes -# issues with AGL's explicit setting of DEFAULTTUNE. -INHERIT_remove = "fsl-dynamic-packagearch" -MACHINE_SOCARCH = "${TUNE_PKGARCH}" - -# Disable the meta-freescale weston-init bbappend as it conflicts -# with AGL's. -BBMASK = "meta-freescale/recipes-graphics/wayland/weston-init" - -# Set CMA size large enough to work with AGL -UBOOT_EXTLINUX_KERNEL_ARGS_append = " cma=512M" - -AGL_DEFAULT_INITRAMFS_FSTYPES := "" +# 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_imx8mq-evk-common.inc b/meta-agl-bsp/conf/include/agl_imx8mq-evk-common.inc new file mode 100644 index 000000000..b3faadd0a --- /dev/null +++ b/meta-agl-bsp/conf/include/agl_imx8mq-evk-common.inc @@ -0,0 +1,8 @@ +require agl_imx-common.inc + +# Add helper to drive setting up HCI UART device +# NOTE: Disabled 2023/05 due to kernel oops, further investigation +# required, see SPEC-4807 in JIRA. +#MACHINE_EXTRA_RRECOMMENDS:append = " hci-uart-helper" + +AGL_DEFAULT_INITRAMFS_FSTYPES := "" diff --git a/meta-agl-bsp/conf/include/agl_imx8mq-evk-viv.inc b/meta-agl-bsp/conf/include/agl_imx8mq-evk-viv.inc new file mode 100644 index 000000000..3988fcd6f --- /dev/null +++ b/meta-agl-bsp/conf/include/agl_imx8mq-evk-viv.inc @@ -0,0 +1,8 @@ +require agl_imx8mq-evk-common.inc + +IMX_DEFAULT_BSP = "nxp" + +# NOTE: +# There is some potential benefit to using the community supported +# linux-fslc-imx hybrid kernel here, but keeping the configuration +# close to upstream to ease maintenance seems worthwhile. diff --git a/meta-agl-bsp/conf/include/agl_imx8mq-evk.inc b/meta-agl-bsp/conf/include/agl_imx8mq-evk.inc new file mode 100644 index 000000000..620ee0fdd --- /dev/null +++ b/meta-agl-bsp/conf/include/agl_imx8mq-evk.inc @@ -0,0 +1,23 @@ +require agl_imx8mq-evk-common.inc + +# NOTE: +# Currently using the upstream default of IMX_DEFAULT_BSP = "mainline", +# since we want to use the etnaviv driver and upstream Mesa + weston +# stack. More tweaks are required to accomplish that if the BSP is set +# to "nxp". + +# Force use of the community supported hybrid NXP/LTS kernel instead of +# the default linux-fslc. This is required to get the drivers required +# for HDMI output. +IMX_DEFAULT_KERNEL:imx8mq-evk = "linux-fslc-imx" + +# Tweaks to allow using linux-fslc-imx on its own without the whole +# NXP BSP. Just the DISTROOVERRIDES change on its own is not enough, +# as COMPATIBLE_MACHINE is evaluated early enough that the recipe is +# not seen as compatible without an explicit override. +COMPATIBLE_MACHINE:pn-linux-fslc-imx = "(imx8mq-evk)" +DISTROOVERRIDES:pn-linux-fslc-imx:append = "mx8-nxp-bsp" + +# Add our own over-ride for use in a few recipes where there is +# conflicting Vivante vs etnaviv configuration. +MACHINEOVERRIDES .= ":etnaviv" diff --git a/meta-agl-bsp/conf/include/agl_imx8mqevk-common.inc b/meta-agl-bsp/conf/include/agl_imx8mqevk-common.inc deleted file mode 100644 index 50567583c..000000000 --- a/meta-agl-bsp/conf/include/agl_imx8mqevk-common.inc +++ /dev/null @@ -1,19 +0,0 @@ -DISTRO_FEATURES_append = " agl-medium-arm-compiler" - -# Force use of the community supported LTS kernel instead of the -# default linux-imx -IMX_DEFAULT_KERNEL_imx8mqevk = "linux-fslc-imx" - -# For EVKB wifi support -MACHINE_FEATURES_append = " bcm4356" - -# Disable meta-freescale package architecure mangling, as it causes -# issues with AGL's explicit setting of DEFAULTTUNE. -INHERIT_remove = "fsl-dynamic-packagearch" -MACHINE_SOCARCH = "${TUNE_PKGARCH}" - -# Disable the meta-freescale weston-init bbappend as it conflicts -# with AGL's. -BBMASK = "meta-freescale/recipes-graphics/wayland/weston-init" - -AGL_DEFAULT_INITRAMFS_FSTYPES := "" diff --git a/meta-agl-bsp/conf/include/agl_imx8mqevk-viv.inc b/meta-agl-bsp/conf/include/agl_imx8mqevk-viv.inc deleted file mode 100644 index 8227f5c06..000000000 --- a/meta-agl-bsp/conf/include/agl_imx8mqevk-viv.inc +++ /dev/null @@ -1 +0,0 @@ -include agl_imx8mqevk-common.inc diff --git a/meta-agl-bsp/conf/include/agl_imx8mqevk.inc b/meta-agl-bsp/conf/include/agl_imx8mqevk.inc deleted file mode 100644 index 88c06336c..000000000 --- a/meta-agl-bsp/conf/include/agl_imx8mqevk.inc +++ /dev/null @@ -1,23 +0,0 @@ -include agl_imx8mqevk-common.inc - -# NOTE: currently not using IMX_DEFAULT_BSP = "mainline", as it -# requires more changes than this approach of disabling -# Vivante. - -# Add our own over-ride for use in a few recipes where there is -# conflicting Vivante vs etnaviv configuration. -MACHINEOVERRIDES .= ":etnaviv" - -# Knock out Vivante overrides -MACHINEOVERRIDES_EXTENDER_mx8mq_forcevariable = "" -PREFERRED_VERSION_weston_mx8 = "8.0.0" -PREFERRED_VERSION_wayland-protocols_mx8 = "1.20" -PREFERRED_VERSION_libdrm_mx8 = "2.4.100" - -CORE_IMAGE_EXTRA_INSTALL += "libdrm-etnaviv" - -PREFERRED_VERSION_gstreamer1.0_mx8 = "1.16.2" -PREFERRED_VERSION_gstreamer1.0-plugins-base_mx8 = "1.16.2" -PREFERRED_VERSION_gstreamer1.0-plugins-good_mx8 = "1.16.2" -PREFERRED_VERSION_gstreamer1.0-plugins-bad_mx8 = "1.16.2" -PREFERRED_VERSION_gstreamer1.0-plugins-ugly_mx8 = "1.16.2" diff --git a/meta-agl-bsp/conf/include/agl_j721e-evm.inc b/meta-agl-bsp/conf/include/agl_j721e-evm.inc new file mode 100644 index 000000000..963b5697d --- /dev/null +++ b/meta-agl-bsp/conf/include/agl_j721e-evm.inc @@ -0,0 +1,11 @@ +# j721e-evm has a k3r5 BBMULTICONFIG to build its bootloader +# firmware, need to use an override to set DEFAULTTUNE back to +# what that machine configuration needs. +DEFAULTTUNE:k3r5:forcedefaulttune = "armv7athf" + +# Workaround for recipe assumption of poky location +LIC_FILES_CHKSUM:pn-ti-rtos-firmware = "file://${THISDIR}/../../licenses/TI-TFL;md5=a1b59cb7ba626b9dbbcbf00f3fbc438a" + +# meta-ti-bsp layer conf does break expectations wrt common folders +# meta-ti-bsp/conf/layer.conf:TI_COMMON_DEPLOY ?= "${TOPDIR}/deploy-ti" +TI_COMMON_DEPLOY := "${TMPDIR}/deploy"
\ No newline at end of file diff --git a/meta-agl-bsp/conf/include/agl_m3-salvator-x-nogfx.inc b/meta-agl-bsp/conf/include/agl_m3-salvator-x-nogfx.inc index 7f1248065..ebbb3006a 100644 --- a/meta-agl-bsp/conf/include/agl_m3-salvator-x-nogfx.inc +++ b/meta-agl-bsp/conf/include/agl_m3-salvator-x-nogfx.inc @@ -1,10 +1,6 @@ -require conf/include/agl_rcar-nogfx.inc +require conf/include/agl_salvator-nogfx.inc SOC_FAMILY = "r8a7796" BOARD_NAME = "m3-salvator-x" DTB_SUFFIX = "r8a7796-salvator-xs" -# Mask graphic Pkgs -BBMASK += "gles-user-module|kernel-module-gles|wayland-kms|libgbm" -# Mask MMP recipes -BBMASK += "kernel-module-uvcs-drv|omx-user-module" diff --git a/meta-agl-bsp/conf/include/agl_m3-salvator-x.inc b/meta-agl-bsp/conf/include/agl_m3-salvator-x.inc index 5dcb5373d..355040ba9 100644 --- a/meta-agl-bsp/conf/include/agl_m3-salvator-x.inc +++ b/meta-agl-bsp/conf/include/agl_m3-salvator-x.inc @@ -1,9 +1,6 @@ -require conf/include/agl_rcar.inc +require conf/include/agl_salvator.inc SOC_FAMILY = "r8a7796" BOARD_NAME = "m3-salvator-x" DTB_SUFFIX = "r8a7796-salvator-xs" -IMAGE_INSTALL_append_rcar-gen3 = " \ - kernel-module-vspmif \ -" diff --git a/meta-agl-bsp/conf/include/agl_m3ulcb-nogfx.inc b/meta-agl-bsp/conf/include/agl_m3ulcb-nogfx.inc index 5092c4bcb..31d99c342 100644 --- a/meta-agl-bsp/conf/include/agl_m3ulcb-nogfx.inc +++ b/meta-agl-bsp/conf/include/agl_m3ulcb-nogfx.inc @@ -2,13 +2,27 @@ require conf/include/agl_rcar-nogfx.inc SOC_FAMILY = "r8a7796" BOARD_NAME = "m3ulcb" -DTB_SUFFIX = "r8a7796-m3ulcb" +DTB_SUFFIX = "r8a77960-ulcb" # Mask graphic Pkgs BBMASK += "gles-user-module|kernel-module-gles|wayland-kms|libgbm" # Mask MMP recipes BBMASK += "kernel-module-uvcs-drv|omx-user-module" -DISTRO_FEATURES_append = "${@bb.utils.contains('AGL_XEN_WANTED', '1', ' xen', '', d)}" -IMAGE_INSTALL_append = "${@bb.utils.contains('AGL_XEN_WANTED', '1', ' xen-base xen-mkimage', '', d)}" +# Work around use of obsolete Weston backend-fbdev in meta-rcar-gen3 +# when building without the proprietary driver stack. Masking out the +# weston_%.bbappend seems the simplest approach for now, as forcing +# USE_GLES = "1" to disable the adding of -Dbackend-default="fbdev" to +# EXTRA_OEMESON triggers adding "libgbm" to DEPENDS, which breaks due +# to that being a component specific to the proprietary stack we are +# explicitly disabling. If the "libgbm" usage in the bbappend was +# instead "virtual/libgbm" as is now used in poky, it might be possible +# to just tweak PREFERRED_PROVIDER_virtual/libgbm = "mesa". +BBMASK += "meta-rcar-gen3/recipes-graphics/wayland/weston_%.bbappend" +# do use software rendering to display the compositor +# used for images w/o binary-only driver +WESTON_USE_PIXMAN = "1" + +DISTRO_FEATURES:append = "${@bb.utils.contains('AGL_XEN_WANTED', '1', ' xen', '', d)}" +IMAGE_INSTALL:append = "${@bb.utils.contains('AGL_XEN_WANTED', '1', ' xen-base xen-mkimage', '', d)}" diff --git a/meta-agl-bsp/conf/include/agl_m3ulcb.inc b/meta-agl-bsp/conf/include/agl_m3ulcb.inc index b845e8c3c..4f788324c 100644 --- a/meta-agl-bsp/conf/include/agl_m3ulcb.inc +++ b/meta-agl-bsp/conf/include/agl_m3ulcb.inc @@ -2,7 +2,7 @@ require conf/include/agl_rcar.inc SOC_FAMILY = "r8a7796" BOARD_NAME = "m3ulcb" -DTB_SUFFIX = "r8a7796-m3ulcb" +DTB_SUFFIX = "r8a77960-ulcb" -DISTRO_FEATURES_append = "${@bb.utils.contains('AGL_XEN_WANTED', '1', ' xen', '', d)}" -IMAGE_INSTALL_append = "${@bb.utils.contains('AGL_XEN_WANTED', '1', ' xen-base xen-mkimage', '', d)}"
\ No newline at end of file +DISTRO_FEATURES:append = "${@bb.utils.contains('AGL_XEN_WANTED', '1', ' xen', '', d)}" +IMAGE_INSTALL:append = "${@bb.utils.contains('AGL_XEN_WANTED', '1', ' xen-base xen-mkimage', '', d)}" diff --git a/meta-agl-bsp/conf/include/agl_nitrogen6x.inc b/meta-agl-bsp/conf/include/agl_nitrogen6x.inc deleted file mode 100644 index 77eb97342..000000000 --- a/meta-agl-bsp/conf/include/agl_nitrogen6x.inc +++ /dev/null @@ -1,20 +0,0 @@ -DISTRO_FEATURES_append = " agl-medium-arm-compiler" - -# This disables the Freescale/NXP Vivante GPU driver and enables -# etnaviv support. -MACHINEOVERRIDES .= ":use-mainline-bsp" - -# Disable meta-freescale package architecure mangling, as it causes -# issues with AGL's explicit setting of DEFAULTTUNE. -INHERIT_remove = "fsl-dynamic-packagearch" -MACHINE_SOCARCH = "${TUNE_PKGARCH}" - -# Disable the meta-freescale weston-init bbappend as it conflicts -# with AGL's. -BBMASK = "meta-freescale/recipes-graphics/wayland/weston-init" - -# Set CMA size large enough to work with AGL -UBOOT_EXTLINUX_KERNEL_ARGS_append = " cma=512M" - -#WKS_FILE = "imx-uboot.wks" -AGL_DEFAULT_INITRAMFS_FSTYPES := "" diff --git a/meta-agl-bsp/conf/include/agl_qemuarm.inc b/meta-agl-bsp/conf/include/agl_qemuarm.inc index 739eb8dd0..2449e1800 100644 --- a/meta-agl-bsp/conf/include/agl_qemuarm.inc +++ b/meta-agl-bsp/conf/include/agl_qemuarm.inc @@ -1,14 +1,20 @@ -# Configuration for serial console -#QB_KERNEL_CMDLINE_APPEND_append = " console=ttyAMA0,115200n8" -# -# All boot message will be off -QB_KERNEL_CMDLINE_APPEND_append = " quiet" - # Build updatable image. Only takes effect when sota.bbclass is inherited -#DISTRO_FEATURES_append = " sota" +#DISTRO_FEATURES:append = " sota" # Root device ROOT_VM = "root=PARTUUID=${DISK_SIGNATURE}-02" # Use our own wks file WKS_FILE="directdisk.wks.in" + +# Use pixman as software renderer to avoid high cpu consumption by GL-renderer +WESTON_USE_PIXMAN = "1" + +# Over-ride setting in oe-core's qemuboot.bbclass +QB_MEM:qemuarm = "-m 2048" + +# Changes to make runqemu work out-of-the-box +QB_AUDIO_DRV:qemuarm := "alsa" +QB_MACHINE:qemuarm := "-machine virt-2.11 -smp 4" +QB_OPT_APPEND:qemuarm := "-show-cursor -device VGA,vgamem_mb=64,edid=on -device qemu-xhci -device usb-tablet -device usb-kbd -object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0" +QB_KERNEL_CMDLINE_APPEND:qemuarm := "console=ttyAMA0 verbose vmalloc=256M" diff --git a/meta-agl-bsp/conf/include/agl_qemuarm64.inc b/meta-agl-bsp/conf/include/agl_qemuarm64.inc index ca2cc947e..46d3b4c39 100644 --- a/meta-agl-bsp/conf/include/agl_qemuarm64.inc +++ b/meta-agl-bsp/conf/include/agl_qemuarm64.inc @@ -1,17 +1,20 @@ -# Configuration for serial console -#QB_KERNEL_CMDLINE_APPEND_append = " console=ttyAMA0,115200n8" - -# All boot message will be off -QB_KERNEL_CMDLINE_APPEND_append = " quiet" - # Build updatable image. Only takes effect when sota.bbclass is inherited -DISTRO_FEATURES_append = " sota" +#DISTRO_FEATURES:append = " sota" # Root device ROOT_VM = "root=PARTUUID=${DISK_SIGNATURE}-02" -# Over-ride setting in oe-core's qemuarm64.conf -QB_MEM_qemuarm64 = "-m 2048" - # Use our own wks file WKS_FILE="directdisk.wks.in" + +# Use pixman as software renderer to avoid high cpu consumption by GL-renderer +WESTON_USE_PIXMAN = "1" + +# Over-ride setting in oe-core's qemuboot.bbclass +QB_MEM:qemuarm64 = "-m 2048" + +# Changes to make runqemu work out-of-the-box +QB_AUDIO_DRV:qemuarm64 := "alsa" +QB_MACHINE:qemuarm64 := "-machine virt -smp 4" +QB_OPT_APPEND:qemuarm64 := " -show-cursor -device VGA,vgamem_mb=64,edid=on -device qemu-xhci -device usb-tablet -device usb-kbd -object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0" +QB_KERNEL_CMDLINE_APPEND:qemuarm64 := "console=ttyAMA0,115200n8 verbose"
\ No newline at end of file diff --git a/meta-agl-bsp/conf/include/agl_qemuriscv64.inc b/meta-agl-bsp/conf/include/agl_qemuriscv64.inc new file mode 100644 index 000000000..1ffc3cf0e --- /dev/null +++ b/meta-agl-bsp/conf/include/agl_qemuriscv64.inc @@ -0,0 +1,11 @@ +# Build updatable image. Only takes effect when sota.bbclass is inherited +DISTRO_FEATURES:append = " sota" + +# Root device +ROOT_VM = "root=PARTUUID=${DISK_SIGNATURE}-02" + +# Over-ride setting in oe-core's qemuriscv64.conf +QB_MEM:qemuriscv64 = "-m 2048" + +# Use our own wks file +WKS_FILE="directdisk.wks.in" diff --git a/meta-agl-bsp/conf/include/agl_qemux86-64.inc b/meta-agl-bsp/conf/include/agl_qemux86-64.inc index 3915a5e47..cb40b8b37 100644 --- a/meta-agl-bsp/conf/include/agl_qemux86-64.inc +++ b/meta-agl-bsp/conf/include/agl_qemux86-64.inc @@ -12,17 +12,17 @@ UVESA_MODE = "1280x1024-32" # kernel command line. # # Configuration for serial console -QB_KERNEL_CMDLINE_APPEND_append = " console=ttyS0,115200n8" +QB_KERNEL_CMDLINE_APPEND:append = " console=ttyS0,115200n8" # # All boot message will be off -QB_KERNEL_CMDLINE_APPEND_append = " quiet" +QB_KERNEL_CMDLINE_APPEND:append = " quiet" # Build updatable image. Only takes effect when sota.bbclass is inherited -DISTRO_FEATURES_append = " sota" +DISTRO_FEATURES:append = " sota" # Add firmware required by Up^2 board and default Intel mPCIe wifi card # sold by upshop.org -MACHINE_EXTRA_RRECOMMENDS_append = " \ +MACHINE_EXTRA_RRECOMMENDS:append = " \ linux-firmware-i915 \ linux-firmware-rtl8168 \ linux-firmware-ibt-hw-37-8 \ @@ -34,14 +34,17 @@ MACHINE_EXTRA_RRECOMMENDS_append = " \ # NOTE: wic.{xz,bmap} are here since qemu targets override # AGL_DEFAULT_IMAGE_FSTYPES to not include them, but for Intel # we actually do want them for use on physical hardware. -AGL_EXTRA_IMAGE_FSTYPES = "wic.xz wic.bmap ${@bb.utils.contains('DISTRO_FEATURES', 'AGLCI', 'wic.vmdk.xz', 'wic.vmdk', d)}" -IMAGE_BOOT_FILES_sota = "u-boot-qemux86-64.rom" +AGL_EXTRA_IMAGE_FSTYPES = "wic.xz wic.bmap ${@bb.utils.contains('AGL_FEATURES', 'AGLCI', 'wic.vmdk.xz', 'wic.vmdk', d)}" +IMAGE_BOOT_FILES:sota = "u-boot-qemux86-64.rom" # Root device ROOT_VM = "root=PARTUUID=${DISK_SIGNATURE}-02" # Force the virtio video device as 'vmware' doesn't always work -QB_OPT_APPEND_append = " -vga virtio" +QB_OPT_APPEND:append = " -vga virtio" + +# DRM device weston/compositor systemd unit should depend upon +WESTON_DRM_DEVICE = "dev-dri-card0.device" # Use our own wks file WKS_FILE="systemd-intel-corei7-64-bootdisk.wks" diff --git a/meta-agl-bsp/conf/include/agl_raspberrypi3.inc b/meta-agl-bsp/conf/include/agl_raspberrypi3.inc deleted file mode 100644 index a4989b79a..000000000 --- a/meta-agl-bsp/conf/include/agl_raspberrypi3.inc +++ /dev/null @@ -1,27 +0,0 @@ -# Maximum memory allowed to be assigned -GPU_MEM = "256" - -# Add CMA to the kernel arguments for SOTA -OSTREE_KERNEL_ARGS_sota_append = " cma=256M" - -#MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" - -# use u-boot always -RPI_USE_U_BOOT = "1" - -#RPI_KERNEL_DEVICETREE_remove_raspberrypi3 = "bcm2708-rpi-0-w.dtb" -#RPI_KERNEL_DEVICETREE_OVERLAYS_remove_raspberrypi3 = "overlays/lirc-rpi.dtbo" -#RPI_KERNEL_DEVICETREE_OVERLAYS_append_raspberrypi3 = " overlays/vc4-fkms-v3d.dtbo" - -MACHINE_FEATURES += "vc4graphics" - -# For libomxil -#LICENSE_FLAGS_WHITELIST = "commercial" - -IMAGE_INSTALL_append = " kernel-modules linux-firmware-rpidistro-bcm43430 linux-firmware-rpidistro-bcm43455 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" diff --git a/meta-agl-bsp/conf/include/agl_raspberrypi4.inc b/meta-agl-bsp/conf/include/agl_raspberrypi4.inc index ae302aae1..4ba7ff0f6 100644 --- a/meta-agl-bsp/conf/include/agl_raspberrypi4.inc +++ b/meta-agl-bsp/conf/include/agl_raspberrypi4.inc @@ -2,27 +2,36 @@ GPU_MEM = "256" # Add CMA to the kernel arguments for SOTA -OSTREE_KERNEL_ARGS_sota_append = " cma=256M" +OSTREE_KERNEL_ARGS:sota:append = " cma=256M" # use u-boot always RPI_USE_U_BOOT = "1" +# Use UART for serial console +ENABLE_UART ?= "1" + # For libomxil -#LICENSE_FLAGS_WHITELIST = "commercial" +#LICENSE_FLAGS_ACCEPTED += "commercial" + +# For linux-firmware-rpidistro +LICENSE_FLAGS_ACCEPTED += "synaptics-killswitch" -IMAGE_INSTALL_append = " kernel-modules linux-firmware-rpidistro-bcm43430 linux-firmware-rpidistro-bcm43455 create-combined-dtb " +IMAGE_INSTALL:append = " kernel-modules linux-firmware-rpidistro-bcm43430 linux-firmware-rpidistro-bcm43455 create-combined-dtb " # Psplash causes crash on first boot on RPi -IMAGE_FEATURES_remove = "splash" +IMAGE_FEATURES:remove = "splash" # Build updatable image. Only takes effect when sota.bbclass is inherited -DISTRO_FEATURES_append = " sota" +DISTRO_FEATURES:append = " sota" # Add xen build, if the xen feature activated -DISTRO_FEATURES_append = " ${@bb.utils.contains('AGL_XEN_WANTED', '1', ' xen', '', d)}" +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)}" +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)}" +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 new file mode 100644 index 000000000..a0e675956 --- /dev/null +++ b/meta-agl-bsp/conf/include/agl_raspberrypi5.inc @@ -0,0 +1,34 @@ +# Maximum memory allowed to be assigned +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 UART for serial console +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 " + +# 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 a7fabfac8..fb67fd976 100644 --- a/meta-agl-bsp/conf/include/agl_rcar-nogfx.inc +++ b/meta-agl-bsp/conf/include/agl_rcar-nogfx.inc @@ -1,9 +1,60 @@ -DISTRO_FEATURES_append = " sota" +DISTRO_FEATURES:append = " sota" OSTREE_KERNEL = "Image" -IMAGE_BOOT_FILES_sota = "renesas-ota-bootfiles/* ${DTB_SUFFIX}.dtb" +IMAGE_BOOT_FILES:sota = "renesas-ota-bootfiles/* ${DTB_SUFFIX}.dtb" OSTREE_BOOTLOADER ?= "u-boot" -WKS_FILE = "singlepart-noloader.wks" +WKS_FILE:rcar-gen3 = "singlepart-noloader.wks" RENESAS_DATADIR = "/usr" + +IMAGE_INSTALL:append:rcar-gen3 = " \ + kernel-devicetree \ +" + +# +# Workaround to avoid pseudo aborts triggered by the kernel module +# recipes writing to KERNELSRC in do_install, errors are of the form +# (from pseudo.log): +# +# path mismatch [27 links]: ino 19366408 db 'NAMELESS FILE' req 'build/tmp/work-shared/h3ulcb/kernel-source/include'. +# +# See the commit messages in poky commits 4e7c211 and 3b7f2c6 and the +# wiki page at: +# +# https://wiki.yoctoproject.org/wiki/Pseudo_Abort +# +# for details on the pseudo change. These can potentially be moved +# to the recipes in the BSP, or removed if the recipes are changed to +# shift the module headers and symbols to their dev packages. +# +PSEUDO_IGNORE_PATHS:append:pn-kernel-module-avb-mch = ",${KERNELSRC}" +PSEUDO_IGNORE_PATHS:append:pn-kernel-module-avb-mse = ",${KERNELSRC}" +PSEUDO_IGNORE_PATHS:append:pn-kernel-module-avb-streaming = ",${KERNELSRC}" +PSEUDO_IGNORE_PATHS:append:pn-kernel-module-scu-src = ",${KERNELSRC}" +PSEUDO_IGNORE_PATHS:append:pn-kernel-module-ssp = ",${KERNELSRC}" +PSEUDO_IGNORE_PATHS:append:pn-kernel-module-tddmac = ",${KERNELSRC}" +PSEUDO_IGNORE_PATHS:append:pn-kernel-module-tsif = ",${KERNELSRC}" +PSEUDO_IGNORE_PATHS:append:pn-kernel-module-mmngr = ",${KERNELSRC}" +PSEUDO_IGNORE_PATHS:append:pn-kernel-module-mmngrbuf = ",${KERNELSRC}" +PSEUDO_IGNORE_PATHS:append:pn-kernel-module-qos = ",${KERNELSRC}" +PSEUDO_IGNORE_PATHS:append:pn-kernel-module-vsp2driver = ",${KERNELSRC}" +PSEUDO_IGNORE_PATHS:append:pn-kernel-module-vspmif = ",${KERNELSRC}" +PSEUDO_IGNORE_PATHS:append:pn-kernel-module-vspm = ",${KERNELSRC}" + +# Mask out base-files and systemd bbappends to avoid changing systemd-tmpfiles +# behavior, see SPEC-4256 for a more involved explanation. +BBMASK += "meta-renesas/meta-rcar-gen3/recipes-core/base-files/ meta-renesas/meta-rcar-gen3/recipes-core/systemd/" + +# Mask out cogl bbappend to avoid meta-gnome dependency +BBMASK += "meta-renesas/meta-rcar-gen3/recipes-graphics/cogl/cogl-1.0_1.%.bbappend" + +# Provide default value that avoids errors from a new packaging QA +# check with respect to packagegroups depending on versioned library +# packages needing to be machine-specific. +# +# Note that this needs to be done here in global configuration space as +# opposed to in a bbappend because the value needs to be set before the +# 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}" diff --git a/meta-agl-bsp/conf/include/agl_rcar.inc b/meta-agl-bsp/conf/include/agl_rcar.inc index dd64ae772..01314f8c9 100644 --- a/meta-agl-bsp/conf/include/agl_rcar.inc +++ b/meta-agl-bsp/conf/include/agl_rcar.inc @@ -1,33 +1,36 @@ require conf/include/agl_rcar-nogfx.inc # Enable AGL virtualization features -MACHINE_FEATURES_append = " agl-egvirt" +MACHINE_FEATURES:append:rcar-gen3 = " agl-egvirt" # Enable Gfx Pkgs -MACHINE_FEATURES_append = " gsx" -MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" +MACHINE_FEATURES:append:rcar-gen3 = " gsx" +BB_MULTI_PROVIDER_ALLOWED:append:rcar-gen3 = " virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2" # for Wayland/Weston -PREFERRED_PROVIDER_virtual/libgles1 = "" -PREFERRED_PROVIDER_virtual/libgles2 = "virtual-gles-user-module" -PREFERRED_PROVIDER_virtual/egl = "virtual-gles-user-module" -PREFERRED_PROVIDER_virtual/libgl = "" -PREFERRED_PROVIDER_virtual/mesa = "mesa" -PREFERRED_PROVIDER_libgbm = "libgbm" -PREFERRED_RPROVIDER_libgbm-dev = "libgbm" +PREFERRED_PROVIDER_virtual/libgles1:rcar-gen3 = "" +PREFERRED_PROVIDER_virtual/libgles2:rcar-gen3 = "virtual-gles-user-module" +PREFERRED_PROVIDER_virtual/egl:rcar-gen3 = "virtual-gles-user-module" +PREFERRED_PROVIDER_virtual/libgl:rcar-gen3 = "" +PREFERRED_PROVIDER_virtual/mesa:rcar-gen3 = "mesa" -PREFERRED_RPROVIDER_libomxil = "omx-user-module" -PREFERRED_PROVIDER_virtual/libomxil = "omx-user-module" +PREFERRED_PROVIDER_libgbm:rcar-gen3 = "libgbm" +PREFERRED_PROVIDER_virtual/libgbm:rcar-gen3 = "libgbm" +PREFERRED_RPROVIDER_libgbm-dev:rcar-gen3 = "libgbm" + +PREFERRED_RPROVIDER_libomxil:rcar-gen3 = "omx-user-module" +PREFERRED_PROVIDER_virtual/libomxil:rcar-gen3 = "omx-user-module" +VIRTUAL-RUNTIME_libomxil:rcar-gen3 = "omx-user-module" # Add for gstreamer plugins ugly -LICENSE_FLAGS_WHITELIST = "commercial" +LICENSE_FLAGS_ACCEPTED:rcar-gen3 = "commercial" -MACHINE_FEATURES_append = " multimedia" +MACHINE_FEATURES:append:rcar-gen3 = " multimedia" -DISTRO_FEATURES_append = " use_eva_pkg" +DISTRO_FEATURES:append:rcar-gen3 = " use_eva_pkg" -#DISTRO_FEATURES_append = " h265dec_lib mpeg2dec_lib" -DISTRO_FEATURES_append = " h264dec_lib h264enc_lib aaclcdec_lib aaclcdec_mdw" +#DISTRO_FEATURES:append:rcar-gen3 = " h265dec_lib mpeg2dec_lib" +DISTRO_FEATURES:append:rcar-gen3 = " h264dec_lib h264enc_lib aaclcdec_lib aaclcdec_mdw" # Mask out meta-renesas-rcar-gen3's tweaks to weston-init, as they do # not seem necessary for anything in AGL, and the addition of @@ -38,13 +41,21 @@ DISTRO_FEATURES_append = " h264dec_lib h264enc_lib aaclcdec_lib aaclcdec_mdw" # getting weston started. There is no clear rationale expressed in the # meta-renesas-rcar-gen3 commit history for the extra dependencies, and # testing shows no issues on H3ULCB when not having them. -BBMASK += "meta-rcar-gen3/recipes-graphics/wayland/weston-init.bbappend" +BBMASK += "meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston-init.bbappend" -IMAGE_INSTALL_append_rcar-gen3 = " \ - kernel-devicetree \ +# Add graphics and decoder drivers to packagegroup-machine-base +# recommendation. +MACHINE_EXTRA_RRECOMMENDS:append:rcar-gen3 = " \ kernel-module-pvrsrvkm \ kernel-module-vsp2 \ kernel-module-vspm \ kernel-module-vspm-if \ omx-user-module \ " + +# 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. +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_refhw-h3.inc b/meta-agl-bsp/conf/include/agl_refhw-h3.inc new file mode 100644 index 000000000..6eee8149f --- /dev/null +++ b/meta-agl-bsp/conf/include/agl_refhw-h3.inc @@ -0,0 +1,16 @@ +AGL_FEATURES:append:h3ulcb = " agl-refhw-h3" + +# Reference hardware has USB3 +MACHINE_FEATURES:append:h3ulcb = " usb3" + +KERNEL_DEVICETREE:append:h3ulcb = " renesas/r8a77951-agl-refhw.dtb" + +UBOOT_CONFIG:append:h3ulcb = " agl-refhw" +UBOOT_CONFIG[agl-refhw] = "rcar3_salvator-x_defconfig" + +MACHINE_EXTRA_RRECOMMENDS:append:h3ulcb = " \ + linux-firmware-wl18xx \ + ti-bt-firmware \ + wlconf \ + wireless-regdb-static \ +" diff --git a/meta-agl-bsp/conf/include/agl_s4sk.inc b/meta-agl-bsp/conf/include/agl_s4sk.inc new file mode 100644 index 000000000..8f4a91b44 --- /dev/null +++ b/meta-agl-bsp/conf/include/agl_s4sk.inc @@ -0,0 +1,9 @@ +SOC_FAMILY = "r8a779f0" +BOARD_NAME = "s4sk" + +#ws2.0 +DTB_SUFFIX = "r8a779f0-s4sk" +WKS_FILE = "singlepart-noloader.wks" +IMAGE_INSTALL:append = " \ + kernel-devicetree \ +" diff --git a/meta-agl-bsp/conf/include/agl_salvator-nogfx.inc b/meta-agl-bsp/conf/include/agl_salvator-nogfx.inc new file mode 100644 index 000000000..06e635ca0 --- /dev/null +++ b/meta-agl-bsp/conf/include/agl_salvator-nogfx.inc @@ -0,0 +1,17 @@ +require conf/include/agl_rcar-nogfx.inc + +# Mask graphic Pkgs +BBMASK += "gles-user-module|kernel-module-gles|wayland-kms|libgbm" +# Mask MMP recipes +BBMASK += "kernel-module-uvcs-drv|omx-user-module" +# Work around use of obsolete Weston backend-fbdev in meta-rcar-gen3 +# when building without the proprietary driver stack. Masking out the +# weston_%.bbappend seems the simplest approach for now, as forcing +# USE_GLES = "1" to disable the adding of -Dbackend-default="fbdev" to +# EXTRA_OEMESON triggers adding "libgbm" to DEPENDS, which breaks due +# to that being a component specific to the proprietary stack we are +# explicitly disabling. If the "libgbm" usage in the bbappend was +# instead "virtual/libgbm" as is now used in poky, it might be possible +# to just tweak PREFERRED_PROVIDER_virtual/libgbm = "mesa". +BBMASK += "meta-rcar-gen3/recipes-graphics/wayland/weston_%.bbappend" + diff --git a/meta-agl-bsp/conf/include/agl_salvator.inc b/meta-agl-bsp/conf/include/agl_salvator.inc new file mode 100644 index 000000000..78457868a --- /dev/null +++ b/meta-agl-bsp/conf/include/agl_salvator.inc @@ -0,0 +1,6 @@ +require conf/include/agl_rcar.inc + +IMAGE_INSTALL:append:rcar-gen3 = " \ + kernel-module-vspm-if \ +" + diff --git a/meta-agl-bsp/conf/include/agl_unmatched.inc b/meta-agl-bsp/conf/include/agl_unmatched.inc new file mode 100644 index 000000000..f7c9f75f2 --- /dev/null +++ b/meta-agl-bsp/conf/include/agl_unmatched.inc @@ -0,0 +1,4 @@ +# firmware for graphics +MACHINE_EXTRA_RRECOMMENDS:append = " linux-firmware-radeon linux-firmware-amdgpu " + +# diff --git a/meta-agl-bsp/conf/include/agl_virtio-aarch64.inc b/meta-agl-bsp/conf/include/agl_virtio-aarch64.inc new file mode 100644 index 000000000..5093d0bd5 --- /dev/null +++ b/meta-agl-bsp/conf/include/agl_virtio-aarch64.inc @@ -0,0 +1,14 @@ +# Build updatable image. Only takes effect when sota.bbclass is inherited +DISTRO_FEATURES:append = " sota" + +# Root device +ROOT_VM = "root=PARTUUID=${DISK_SIGNATURE}-02" + +# Use our own wks file +WKS_FILE = "directdisk.wks.in" + +# Simplest possible option +AGL_DEFAULT_IMAGE_FSTYPES = "ext4" + +# Need to run QEMU with virtio-gpu device +PACKAGECONFIG:append:pn-qemu-system-native = " virglrenderer glx gtk+" diff --git a/meta-agl-bsp/conf/layer.conf b/meta-agl-bsp/conf/layer.conf index 2a999ddd5..036cde7a7 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 = "dunfell" +LAYERSERIES_COMPAT_aglbsp = "scarthgap" diff --git a/meta-agl-bsp/conf/machine/include/virtio.inc b/meta-agl-bsp/conf/machine/include/virtio.inc new file mode 100644 index 000000000..6f8a638a0 --- /dev/null +++ b/meta-agl-bsp/conf/machine/include/virtio.inc @@ -0,0 +1,23 @@ +PREFERRED_PROVIDER_virtual/egl ?= "mesa" +PREFERRED_PROVIDER_virtual/libgl ?= "mesa" +PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa" +PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa" + +MACHINE_FEATURES = "alsa usbgadget screen vfat" + +MACHINEOVERRIDES =. "virtio-all:" + +IMAGE_FSTYPES += "tar.bz2 ext4" + +# Don't include kernels in standard images +RDEPENDS:${KERNEL_PACKAGE_NAME}-base = "" + +# Use a common kernel recipe for all VirtIO machines +PREFERRED_PROVIDER_virtual/kernel ??= "linux-yocto" + +# Use newer kernel +PREFERRED_VERSION_linux-yocto = "5.15.%" + +EXTRA_IMAGEDEPENDS += "qemu-native qemu-helper-native" + +IMAGE_CLASSES += "qemuboot" diff --git a/meta-agl-bsp/conf/machine/virtio-aarch64.conf b/meta-agl-bsp/conf/machine/virtio-aarch64.conf new file mode 100644 index 000000000..d92d43943 --- /dev/null +++ b/meta-agl-bsp/conf/machine/virtio-aarch64.conf @@ -0,0 +1,36 @@ +#@TYPE: Machine +#@NAME: VirtIO ARMv8 machine +#@DESCRIPTION: Machine configuration for running an ARMv8 system on VirtIO based platform + +require conf/machine/include/arm/arch-armv8a.inc +require conf/machine/include/virtio.inc + +KERNEL_IMAGETYPE = "Image" + +SERIAL_CONSOLES ?= "115200;ttyAMA0 115200;hvc0" +SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" + +# For runqemu +QB_SYSTEM_NAME = "qemu-system-aarch64" +QB_MACHINE = "-machine virt" +QB_CPU = "-cpu cortex-a57" +QB_CPU_KVM = "-cpu host -machine gic-version=3" +QB_MEM = "-m 2048" +# Standard Serial console +QB_KERNEL_CMDLINE_APPEND = "console=ttyAMA0" +# Ensure virtio-mmio support VirtIO 1.0 required by virtio-gpu +QB_OPT_APPEND = "-global virtio-mmio.force-legacy=false" +# TODO: upstream to OE-core runqemu +QB_OPT_APPEND += "-device virtio-gpu-device -display gtk,gl=on -show-cursor" +# Virtio input +QB_OPT_APPEND += "-device virtio-mouse-device -device virtio-keyboard-device" +# Add the 'virtio-rng-device' device otherwise the guest may run out of entropy +QB_OPT_APPEND += "-object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-device,rng=rng0" +# Virtio Networking support +QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no" +QB_NETWORK_DEVICE = "-device virtio-net-device,netdev=net0,mac=@MAC@" +# Virtio block device +QB_ROOTFS_OPT = "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device virtio-blk-device,drive=disk0" +# Virtio serial console +QB_SERIAL_OPT = "-device virtio-serial-device -chardev null,id=virtcon -device virtconsole,chardev=virtcon" +QB_TCPSERIAL_OPT = "-device virtio-serial-device -chardev socket,id=virtcon,port=@PORT@,host=127.0.0.1 -device virtconsole,chardev=virtcon" diff --git a/meta-agl-bsp/meta-agl-refhw-gen3/recipes-navigation/gpsd/files/gpsd.refhw b/meta-agl-bsp/meta-agl-refhw-gen3/recipes-navigation/gpsd/files/gpsd.refhw new file mode 100644 index 000000000..d22970681 --- /dev/null +++ b/meta-agl-bsp/meta-agl-refhw-gen3/recipes-navigation/gpsd/files/gpsd.refhw @@ -0,0 +1,5 @@ +# Default settings for gpsd. +START_DAEMON="true" +GPSD_OPTIONS="" +DEVICES="/dev/ttySC3" +GPSD_SOCKET="/var/run/gpsd.sock" diff --git a/meta-agl-bsp/meta-agl-refhw-gen3/recipes-navigation/gpsd/files/refhw-gpsd-helper.sh b/meta-agl-bsp/meta-agl-refhw-gen3/recipes-navigation/gpsd/files/refhw-gpsd-helper.sh new file mode 100644 index 000000000..d183ba43c --- /dev/null +++ b/meta-agl-bsp/meta-agl-refhw-gen3/recipes-navigation/gpsd/files/refhw-gpsd-helper.sh @@ -0,0 +1,35 @@ +#!/bin/sh +# +# Script to detect AGL Reference Hardware and switch gpsd +# configuration as necessary. +# +# NOTE: +# For the most part errors are ignored and the script returns +# 0/success so gpsd still be started if the script is somehow +# run on a board without the expected hardware. + +COMPAT=/sys/firmware/devicetree/base/compatible +GPSTTY=/dev/ttySC3 + +#if [ ! \( -f "$COMPAT" -a -c "$GPSTTY" -a -f /etc/default/gpsd.refhw \) ]; then +if [ ! \( -f "$COMPAT" -a -f /etc/default/gpsd.refhw \) ]; then + exit 0 +fi + +found=false +for c in `cat $COMPAT | tr '\0' ' '`; do + if echo $c | grep -q '^agl,refhw-h3$'; then + found=true + break + fi +done + +if $found; then + if [ ! -c "$GPSTTY" ]; then + exit 0 + fi + update-alternatives --install /etc/default/gpsd gpsd-defaults /etc/default/gpsd.refhw 20 +else + update-alternatives --install /etc/default/gpsd gpsd-defaults /etc/default/gpsd.refhw 5 +fi +exit 0 diff --git a/meta-agl-bsp/meta-agl-refhw-gen3/recipes-navigation/gpsd/files/refhw-gpsd-helper.sh.bak b/meta-agl-bsp/meta-agl-refhw-gen3/recipes-navigation/gpsd/files/refhw-gpsd-helper.sh.bak new file mode 100644 index 000000000..2c9089aa0 --- /dev/null +++ b/meta-agl-bsp/meta-agl-refhw-gen3/recipes-navigation/gpsd/files/refhw-gpsd-helper.sh.bak @@ -0,0 +1,32 @@ +#!/bin/sh +# +# Script to detect AGL Reference Hardware and switch gpdf configuration +# as needed. +# +# NOTE: +# For the most part errors are ignored and the script returns +# 0/success so gpsd still be started if the script is somehow +# run on a board without the expected hardware. + +COMPAT=/sys/firmware/devicetree/base/compatible +GPSTTY=/dev/ttySC3 + +if [ ! \( -f "$COMPAT" -a -c "$GPSTTY" -a -f /etc/default/gpsd.refhw \) ]; then + exit 0 +fi + +found=false +for c in `cat $COMPAT | tr '\0' ' '`; do + echo "c = $c" + if echo $c | grep -q '^agl,refhw-h3$'; then + found=true + break + fi +done + +if $found; then + update-alternatives --install /etc/default/gpsd gpsd-defaults /etc/default/gpsd.refhw 20 +else + update-alternatives --remove gpsd-defaults /etc/default/gpsd.refhw +fi +exit 0 diff --git a/meta-agl-bsp/meta-agl-refhw-gen3/recipes-navigation/gpsd/files/refhw.conf b/meta-agl-bsp/meta-agl-refhw-gen3/recipes-navigation/gpsd/files/refhw.conf new file mode 100644 index 000000000..b7e3a7b0d --- /dev/null +++ b/meta-agl-bsp/meta-agl-refhw-gen3/recipes-navigation/gpsd/files/refhw.conf @@ -0,0 +1,2 @@ +[Service] +ExecStartPre=-/usr/sbin/refhw-gpsd-helper.sh 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 new file mode 100644 index 000000000..3cd5aa7de --- /dev/null +++ b/meta-agl-bsp/meta-agl-refhw-gen3/recipes-navigation/gpsd/gpsd-machine-conf_1.0.bbappend @@ -0,0 +1,33 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" + +SRC_URI = "file://gpsd.refhw \ + file://refhw-gpsd-helper.sh \ + file://refhw.conf \ +" + +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 + + 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 ${D}${sysconfdir}/systemd/system/gpsd.service.d + install -D -m 0644 ${WORKDIR}/refhw.conf ${D}${sysconfdir}/systemd/system/gpsd.service.d/refhw.conf + fi +} + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +CONFFILES:${PN} = "${sysconfdir}/default/gpsd.refhw" + +ALTERNATIVE:${PN} = "gpsd-defaults" +ALTERNATIVE_LINK_NAME[gpsd-defaults] = "${sysconfdir}/default/gpsd" +ALTERNATIVE_TARGET[gpsd-defaults] = "${sysconfdir}/default/gpsd.refhw" +# NOTE: Priority needs to be below default of 10 to avoid overriding the +# default configuration. The script run by the systemd drop-in +# will tweak things on boot to handle h3ulcb vs refhw. +ALTERNATIVE_PRIORITY[gpsd-defaults] = "5" diff --git a/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/mesa/mesa_%.bbappend b/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/mesa/mesa_%.bbappend deleted file mode 100644 index 8ac343aa3..000000000 --- a/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/mesa/mesa_%.bbappend +++ /dev/null @@ -1,7 +0,0 @@ -# The gallium-llvm is recommended as software 3D graphics renderer -GALLIUM_LLVM = "gallium-llvm" -PACKAGECONFIG_append_qemux86 = " gallium ${GALLIUM_LLVM}" -PACKAGECONFIG_append_qemux86-64 = " gallium ${GALLIUM_LLVM}" -PACKAGECONFIG_append_intel-corei7-64 = " gallium ${GALLIUM_LLVM}" - -DRIDRIVERS_append_intel-corei7-64 = ",i965" diff --git a/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/libva_%.bbappend b/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/libva_%.bbappend deleted file mode 100644 index eda8de38a..000000000 --- a/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/libva_%.bbappend +++ /dev/null @@ -1,4 +0,0 @@ -# This patch correct a bug in libva1_1.7.0.bb 1.8 inmeta-intel (no clue when it will be fixed) -# libva.bb calls for an x11 runtime dependency even if wayland is selected -# -RDEPENDS_${PN}-egl_remove = "${@bb.utils.contains("DISTRO_FEATURES", "x11", "", "${PN}-x11", d)}" diff --git a/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/weston-ini-conf.bbappend b/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/weston-ini-conf.bbappend deleted file mode 100644 index 4a2dc80af..000000000 --- a/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/weston-ini-conf.bbappend +++ /dev/null @@ -1,7 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -# For virtual machines and intel-corei7-64 we want to support both the HDMI-A-1 -# and Virtual-1 outputs. This allows us to run virtual images on real hardware -# and vice versa. -SRC_URI_append_qemuall = " file://virtual.cfg" -SRC_URI_append_intel-corei7-64 = " file://virtual.cfg" diff --git a/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/weston-ini-conf/virtual.cfg b/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/weston-ini-conf/virtual.cfg deleted file mode 100644 index 25a8fae94..000000000 --- a/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/weston-ini-conf/virtual.cfg +++ /dev/null @@ -1,18 +0,0 @@ -[output] -name=Virtual-1 -transform=270 -mode=1920x1080 -#mode=1600x1200 -#mode=1680x1050 -#mode=1400x1050 -#mode=1600x900 -#mode=1280x1024 -#mode=1440x900 -#mode=1280x960 -#mode=1360x768 -#mode=1280x800 -#mode=1280x768 -#mode=1280x720 -#mode=800x600 -#mode=848x480 -#mode=640x480 diff --git a/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/weston_%.bbappend b/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/weston_%.bbappend deleted file mode 100644 index 9aaea5f69..000000000 --- a/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/weston_%.bbappend +++ /dev/null @@ -1,3 +0,0 @@ -RDEPENDS_${PN}_append_qemux86 = " mesa-megadriver" -RDEPENDS_${PN}_append_qemux86-64 = " mesa-megadriver" -RDEPENDS_${PN}_append_intel-corei7-64 = " mesa-megadriver" diff --git a/meta-agl-bsp/meta-core/recipes-core/ovmf/ovmf_git.bbappend b/meta-agl-bsp/meta-core/recipes-core/ovmf/ovmf_git.bbappend deleted file mode 100644 index 285847295..000000000 --- a/meta-agl-bsp/meta-core/recipes-core/ovmf/ovmf_git.bbappend +++ /dev/null @@ -1 +0,0 @@ -PARALLEL_MAKE = "" diff --git a/meta-agl-bsp/meta-core/recipes-graphics/mesa/mesa_%.bbappend b/meta-agl-bsp/meta-core/recipes-graphics/mesa/mesa_%.bbappend new file mode 100644 index 000000000..fb797a436 --- /dev/null +++ b/meta-agl-bsp/meta-core/recipes-graphics/mesa/mesa_%.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', '${BPN}_agl.inc', '', d)} diff --git a/meta-agl-bsp/meta-core/recipes-graphics/mesa/mesa_agl.inc b/meta-agl-bsp/meta-core/recipes-graphics/mesa/mesa_agl.inc new file mode 100644 index 000000000..e74761317 --- /dev/null +++ b/meta-agl-bsp/meta-core/recipes-graphics/mesa/mesa_agl.inc @@ -0,0 +1,7 @@ +# The gallium-llvm is recommended as software 3D graphics renderer +GALLIUM_LLVM = "gallium-llvm" +PACKAGECONFIG:append:qemux86 = " gallium ${GALLIUM_LLVM}" +PACKAGECONFIG:append:qemux86-64 = " gallium ${GALLIUM_LLVM}" +PACKAGECONFIG:append:intel-corei7-64 = " gallium ${GALLIUM_LLVM}" + +DRIDRIVERS:append:intel-corei7-64 = ",i965" diff --git a/meta-agl-bsp/meta-core/recipes-graphics/wayland/weston_%.bbappend b/meta-agl-bsp/meta-core/recipes-graphics/wayland/weston_%.bbappend new file mode 100644 index 000000000..3d5903d85 --- /dev/null +++ b/meta-agl-bsp/meta-core/recipes-graphics/wayland/weston_%.bbappend @@ -0,0 +1 @@ +require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', '${BPN}_agl.inc', '', d)} diff --git a/meta-agl-bsp/meta-core/recipes-graphics/wayland/weston_agl.inc b/meta-agl-bsp/meta-core/recipes-graphics/wayland/weston_agl.inc new file mode 100644 index 000000000..e3b36034f --- /dev/null +++ b/meta-agl-bsp/meta-core/recipes-graphics/wayland/weston_agl.inc @@ -0,0 +1,3 @@ +RDEPENDS:${PN}:append:qemux86 = " mesa-megadriver" +RDEPENDS:${PN}:append:qemux86-64 = " mesa-megadriver" +RDEPENDS:${PN}:append:intel-corei7-64 = " mesa-megadriver" diff --git a/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/hciattach.cfg b/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/hciattach.cfg deleted file mode 100755 index c9c4fe2ed..000000000 --- a/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/hciattach.cfg +++ /dev/null @@ -1,17 +0,0 @@ -# -# Bluetooth device drivers -# -CONFIG_BT_INTEL=m -CONFIG_BT_BCM=m -CONFIG_BT_RTL=m -CONFIG_BT_HCIBTUSB=m -CONFIG_BT_HCIBTUSB_BCM=y -CONFIG_BT_HCIBTUSB_RTL=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y - -# -# USB port drivers -# -CONFIG_USB_SERIAL_CP210X=y diff --git a/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/most_deps.cfg b/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/most_deps.cfg deleted file mode 100644 index 15ddbd21e..000000000 --- a/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/most_deps.cfg +++ /dev/null @@ -1,9 +0,0 @@ -CONFIG_I2C=y -CONFIG_USB=y -CONFIG_MEDIA_SUPPORT=m -CONFIG_MEDIA_CAMERA_SUPPORT=y -CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y -CONFIG_MEDIA_CONTROLLER=y -CONFIG_VIDEO_DEV=m -CONFIG_VIDEO_V4L2_SUBDEV_API=y -CONFIG_VIDEO_V4L2=m diff --git a/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/qemuarm.cfg b/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/qemuarm.cfg deleted file mode 100644 index e71c714d6..000000000 --- a/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/qemuarm.cfg +++ /dev/null @@ -1,6 +0,0 @@ -# Necessary configs for using the virt qemu machine -CONFIG_ARCH_MULTI_V7=y -CONFIG_ARCH_VIRT=y -CONFIG_SERIAL_AMBA_PL011=y -CONFIG_PCI_HOST_GENERIC=y -CONFIG_RTC_DRV_PL031=y diff --git a/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/virtio.cfg b/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/virtio.cfg deleted file mode 100644 index d042d7d64..000000000 --- a/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto/virtio.cfg +++ /dev/null @@ -1,6 +0,0 @@ -# qemu need a virtio storage for rootfs -CONFIG_BLK_MQ_VIRTIO=y -CONFIG_VIRTIO=y -CONFIG_VIRTIO_BLK=y -# qemuarm need virtionet -CONFIG_VIRTIO_NET=y diff --git a/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto_%.bbappend b/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto_%.bbappend deleted file mode 100644 index e97b8f9d1..000000000 --- a/meta-agl-bsp/meta-core/recipes-kernel/linux/linux-yocto_%.bbappend +++ /dev/null @@ -1,17 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/linux-yocto:" - -# Extra configuration options for the QEMU kernel -SRC_URI += "file://hciattach.cfg \ - file://virtio.cfg \ - " - -# Enable some things on qemuarm64 so MOST drivers will build and load. -SRC_URI_append_qemuarm64 = " file://most_deps.cfg" - -# Configuration for using the virt machine (and not versatilepb) -SRC_URI_append_qemuarm = " file://qemuarm.cfg" - -# Build a generic v7 kernel instead of the arm926j one that upstream -# qemuarm defaults to. -KBUILD_DEFCONFIG_qemuarm = "multi_v7_defconfig" -KCONFIG_MODE = "--alldefconfig" diff --git a/meta-agl-bsp/meta-freescale-layer/recipes-connectivity/hci-uart-helper/files/hci-uart-helper.service b/meta-agl-bsp/meta-freescale-layer/recipes-connectivity/hci-uart-helper/files/hci-uart-helper.service new file mode 100644 index 000000000..f8eda0cba --- /dev/null +++ b/meta-agl-bsp/meta-freescale-layer/recipes-connectivity/hci-uart-helper/files/hci-uart-helper.service @@ -0,0 +1,9 @@ +[Unit] +Description=Bluetooth HCI UART support +Requires=dev-ttymxc2.device +After=dev-ttymxc2.device +Before=bluetooth.service + +[Service] +Type=forking +ExecStart=/usr/sbin/hci-uart-helper.sh diff --git a/meta-agl-bsp/meta-freescale-layer/recipes-connectivity/hci-uart-helper/files/hci-uart-helper.sh b/meta-agl-bsp/meta-freescale-layer/recipes-connectivity/hci-uart-helper/files/hci-uart-helper.sh new file mode 100644 index 000000000..e1aa31c06 --- /dev/null +++ b/meta-agl-bsp/meta-freescale-layer/recipes-connectivity/hci-uart-helper/files/hci-uart-helper.sh @@ -0,0 +1,48 @@ +#!/bin/sh +# +# Script to attach HCI UART devices on i.MX8MQ EVK/EVKB +# +# NOTE: +# For the most part errors are ignored and the script returns +# 0/success so BlueZ will still be started if the script is somehow +# run on a board without the expected hardware. However, if the +# various probing succeeds and hciattach is run, the script returns +# the resulting exit code if hciattach fails. + +COMPAT=/sys/firmware/devicetree/base/compatible +HCITTY=/dev/ttymxc2 +PCIDEV=/sys/bus/pci/devices/0000:01:00.0 + +if [ ! \( -f "$COMPAT" -a -c "$HCITTY" \) ]; then + exit 0 +fi + +found=false +for c in `cat $COMPAT | tr '\0' ' '`; do + echo "c = $c" + if echo $c | grep -q '^fsl,imx8mq-evk$'; then + found=true + break + fi +done +if ! $found; then + echo "i.MX8MQ EVK not found!" + exit 0 +fi + +if [ -f "$PCIDEV/vendor" -a -f "$PCIDEV/device" ]; then + vendor=`cat $PCIDEV/vendor` + device=`cat $PCIDEV/device` +fi + +rc=0 +if [ "$vendor" = "0x14e4" -a "$device" = "0x43ec" ]; then + # Broadcom 5436 on EVKB + hciattach $HCITTY bcm43xx + rc=$? +elif [ "$vendor" = "0x168c" -a "$device" = "0x003e" ]; then + # Qualcomm (nee Atheros) 6174 on EVK + hciattach $HCITTY qualcomm + rc=$? +fi +exit $rc 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 new file mode 100644 index 000000000..798fcebe6 --- /dev/null +++ b/meta-agl-bsp/meta-freescale-layer/recipes-connectivity/hci-uart-helper/hci-uart-helper_1.0.bb @@ -0,0 +1,30 @@ +SUMMARY = "Helper for enabling UART connected HCI Bluetooth devices" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +inherit systemd allarch + +SRC_URI = "file://hci-uart-helper.service \ + file://hci-uart-helper.sh \ +" + +COMPATIBLE_MACHINE = "imx8mq-evk" + +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +do_install() { + # Install helper script + install -d ${D}${sbindir} + install -m 0755 ${WORKDIR}/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 -d ${D}${systemd_system_unitdir}/bluetooth.service.wants + ln -s ../hci-uart-helper.service ${D}${systemd_system_unitdir}/bluetooth.service.wants/ +} + +FILES:${PN} += "${systemd_system_unitdir}" + +RDEPENDS:${PN} += "bluez5" diff --git a/meta-agl-bsp/meta-freescale-layer/recipes-graphics/mesa/files/0001-kmsro-add-imx-dcss.patch b/meta-agl-bsp/meta-freescale-layer/recipes-graphics/mesa/files/0001-kmsro-add-imx-dcss.patch deleted file mode 100644 index 7f7ab9124..000000000 --- a/meta-agl-bsp/meta-freescale-layer/recipes-graphics/mesa/files/0001-kmsro-add-imx-dcss.patch +++ /dev/null @@ -1,34 +0,0 @@ -Add i.MX8MQ DCSS kmsro support - -Add required dummy entry for NXP's i.MX8MQ DCSS display controller DRM -driver to the kmsro configuration so that the loader will not think it -is a GPU. - -Upstream-Status: pending -Signed-off-by: Scott Murray <scott.murray@konsulko.com> ---- - -diff --git a/src/gallium/targets/dri/meson.build b/src/gallium/targets/dri/meson.build -index ae25a21..17379c7 100644 ---- a/src/gallium/targets/dri/meson.build -+++ b/src/gallium/targets/dri/meson.build -@@ -72,6 +72,7 @@ foreach d : [[with_gallium_kmsro, [ - 'hx8357d_dri.so', - 'ili9225_dri.so', - 'ili9341_dri.so', -+ 'imx-dcss_dri.so', - 'imx-drm_dri.so', - 'ingenic-drm_dri.so', - 'mcde_dri.so', -diff --git a/src/gallium/targets/dri/target.c b/src/gallium/targets/dri/target.c -index f71f690..41c5c75 100644 ---- a/src/gallium/targets/dri/target.c -+++ b/src/gallium/targets/dri/target.c -@@ -97,6 +97,7 @@ DEFINE_LOADER_DRM_ENTRYPOINT(exynos) - DEFINE_LOADER_DRM_ENTRYPOINT(hx8357d) - DEFINE_LOADER_DRM_ENTRYPOINT(ili9225) - DEFINE_LOADER_DRM_ENTRYPOINT(ili9341) -+DEFINE_LOADER_DRM_ENTRYPOINT(imx_dcss) - DEFINE_LOADER_DRM_ENTRYPOINT(imx_drm) - DEFINE_LOADER_DRM_ENTRYPOINT(ingenic_drm) - DEFINE_LOADER_DRM_ENTRYPOINT(mcde) diff --git a/meta-agl-bsp/meta-freescale-layer/recipes-graphics/mesa/mesa_%.bbappend b/meta-agl-bsp/meta-freescale-layer/recipes-graphics/mesa/mesa_%.bbappend deleted file mode 100644 index 636b75c53..000000000 --- a/meta-agl-bsp/meta-freescale-layer/recipes-graphics/mesa/mesa_%.bbappend +++ /dev/null @@ -1,10 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -SRC_URI += "file://0001-kmsro-add-imx-dcss.patch" - -# These over-rides should use "use-mainline-bsp" instead when that -# becomes more workable for i.MX8 in upstream meta-freescale. - -USE_OSMESA_ONLY_etnaviv = "no" - -PACKAGECONFIG_append_etnaviv = " gallium etnaviv kmsro" diff --git a/meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston-ini-conf/fbdev.cfg b/meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston-ini-conf/fbdev.cfg deleted file mode 100644 index b1a1f3cc9..000000000 --- a/meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston-ini-conf/fbdev.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[output] -name=fbdev -transform=270 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 new file mode 100644 index 000000000..07a43f958 --- /dev/null +++ b/meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston_10.0.1.imx.bbappend @@ -0,0 +1,10 @@ +# 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-kernel/linux/files/0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch b/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch deleted file mode 100644 index 1b17bc73f..000000000 --- a/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/0004-Smack-Assign-smack_known_web-label-for-kernel-thread.patch +++ /dev/null @@ -1,49 +0,0 @@ -From c8bbb0f916de54610513e376070aea531af19dd6 Mon Sep 17 00:00:00 2001 -From: jooseong lee <jooseong.lee@samsung.com> -Date: Thu, 3 Nov 2016 10:55:43 +0100 -Subject: [PATCH 4/4] Smack: Assign smack_known_web label for kernel thread's -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Assign smack_known_web label for kernel thread's socket in the sk_alloc_security hook - -Creating struct sock by sk_alloc function in various kernel subsystems -like bluetooth dosen't call smack_socket_post_create(). In such case, -received sock label is the floor('_') label and makes access deny. - -Refers-to: https://review.tizen.org/gerrit/#/c/80717/4 - -Change-Id: I2e5c9359bfede84a988fd4d4d74cdb9dfdfc52d8 -Signed-off-by: jooseong lee <jooseong.lee@samsung.com> -Signed-off-by: José Bollo <jose.bollo@iot.bzh> ---- - security/smack/smack_lsm.c | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c -index e45f0a3..a3f3ccc 100644 ---- a/security/smack/smack_lsm.c -+++ b/security/smack/smack_lsm.c -@@ -2107,8 +2107,16 @@ static int smack_sk_alloc_security(struct sock *sk, int family, gfp_t gfp_flags) - if (ssp == NULL) - return -ENOMEM; - -- ssp->smk_in = skp; -- ssp->smk_out = skp; -+ /* -+ * Sockets created by kernel threads receive web label. -+ */ -+ if (unlikely(current->flags & PF_KTHREAD)) { -+ ssp->smk_in = &smack_known_web; -+ ssp->smk_out = &smack_known_web; -+ } else { -+ ssp->smk_in = skp; -+ ssp->smk_out = skp; -+ } - ssp->smk_packet = NULL; - - sk->sk_security = ssp; --- -2.7.4 - diff --git a/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/fixups.cfg b/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/fixups.cfg index d6b3a30fd..29a25b798 100644 --- a/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/fixups.cfg +++ b/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/files/fixups.cfg @@ -6,3 +6,4 @@ # CONFIG_DEBUG_RWSEMS is not set # CONFIG_DEBUG_LOCK_ALLOC is not set # CONFIG_FW_LOADER_USER_HELPER is not set +# CONFIG_BTRFS_FS is not set 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 index 23ca0475a..f95891a2f 100644 --- 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 @@ -8,16 +8,15 @@ Upstream-Status: pending Signed-off-by: Scott Murray <scott.murray@konsulko.com> --- -diff --git a/drivers/gpu/drm/imx/Kconfig b/drivers/gpu/drm/imx/Kconfig -index 63d5f1b532ee..a18ba56aa218 100644 ---- a/drivers/gpu/drm/imx/Kconfig -+++ b/drivers/gpu/drm/imx/Kconfig -@@ -85,7 +85,7 @@ config DRM_IMX_CDNS_MHDP - select DRM_CDNS_DP +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/0002-dts-enable-etnaviv.patch b/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx/0002-dts-enable-etnaviv.patch index 4ce9b9d38..4ed4b685e 100644 --- a/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx/0002-dts-enable-etnaviv.patch +++ b/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx/0002-dts-enable-etnaviv.patch @@ -4,15 +4,14 @@ Some further investigation is required into how to manage this upstream in meta-freescale, as it is not required for the i.MX6 platforms AFAIK. Upstream-Status: pending - Signed-off-by: Scott Murray <scott.murray@konsulko.com> --- diff --git a/arch/arm64/boot/dts/freescale/imx8mq-evk.dts b/arch/arm64/boot/dts/freescale/imx8mq-evk.dts -index f2a7e4069a0d..c0b6c5052656 100755 +index c3f8a24c3943..754fbfe30f0a 100755 --- a/arch/arm64/boot/dts/freescale/imx8mq-evk.dts +++ b/arch/arm64/boot/dts/freescale/imx8mq-evk.dts -@@ -1074,7 +1074,7 @@ +@@ -1224,7 +1224,7 @@ &vpu_v4l2 { status = "okay"; }; diff --git a/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx/0003-drm-etnaviv-fix-TS-cache-flushing-on-GPUs-with-BLT-e.patch b/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx/0003-drm-etnaviv-fix-TS-cache-flushing-on-GPUs-with-BLT-e.patch deleted file mode 100644 index d7a1f85b8..000000000 --- a/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx/0003-drm-etnaviv-fix-TS-cache-flushing-on-GPUs-with-BLT-e.patch +++ /dev/null @@ -1,151 +0,0 @@ -From f232d9ec029ce3e2543b05213e2979e01e503408 Mon Sep 17 00:00:00 2001 -From: Lucas Stach <l.stach@pengutronix.de> -Date: Wed, 26 Feb 2020 16:27:08 +0100 -Subject: [PATCH] drm/etnaviv: fix TS cache flushing on GPUs with BLT engine - -As seen in the Vivante kernel driver, most GPUs with the BLT engine have -a broken TS cache flush. The workaround is to temporarily set the BLT -command to CLEAR_IMAGE, without actually executing the clear. Apparently -this state change is enough to trigger the required TS cache flush. As -the BLT engine is completely asychronous, we also need a few more stall -states to synchronize the flush with the frontend. - -Root-caused-by: Jonathan Marek <jonathan@marek.ca> -Signed-off-by: Lucas Stach <l.stach@pengutronix.de> ---- - drivers/gpu/drm/etnaviv/etnaviv_buffer.c | 60 ++++++++++++++++++++++-- - drivers/gpu/drm/etnaviv/state_blt.xml.h | 2 + - 2 files changed, 57 insertions(+), 5 deletions(-) - -diff --git a/drivers/gpu/drm/etnaviv/etnaviv_buffer.c b/drivers/gpu/drm/etnaviv/etnaviv_buffer.c -index 32d9fac587f9..76d38561c910 100644 ---- a/drivers/gpu/drm/etnaviv/etnaviv_buffer.c -+++ b/drivers/gpu/drm/etnaviv/etnaviv_buffer.c -@@ -12,6 +12,7 @@ - - #include "common.xml.h" - #include "state.xml.h" -+#include "state_blt.xml.h" - #include "state_hi.xml.h" - #include "state_3d.xml.h" - #include "cmdstream.xml.h" -@@ -233,6 +234,8 @@ void etnaviv_buffer_end(struct etnaviv_gpu *gpu) - struct etnaviv_cmdbuf *buffer = &gpu->buffer; - unsigned int waitlink_offset = buffer->user_size - 16; - u32 link_target, flush = 0; -+ bool has_blt = !!(gpu->identity.minor_features5 & -+ chipMinorFeatures5_BLT_ENGINE); - - lockdep_assert_held(&gpu->lock); - -@@ -248,16 +251,38 @@ void etnaviv_buffer_end(struct etnaviv_gpu *gpu) - if (flush) { - unsigned int dwords = 7; - -+ if (has_blt) -+ dwords += 10; -+ - link_target = etnaviv_buffer_reserve(gpu, buffer, dwords); - - CMD_SEM(buffer, SYNC_RECIPIENT_FE, SYNC_RECIPIENT_PE); - CMD_STALL(buffer, SYNC_RECIPIENT_FE, SYNC_RECIPIENT_PE); -+ if (has_blt) { -+ CMD_LOAD_STATE(buffer, VIVS_BLT_ENABLE, 0x1); -+ CMD_SEM(buffer, SYNC_RECIPIENT_FE, SYNC_RECIPIENT_BLT); -+ CMD_STALL(buffer, SYNC_RECIPIENT_FE, SYNC_RECIPIENT_BLT); -+ CMD_LOAD_STATE(buffer, VIVS_BLT_ENABLE, 0x0); -+ } - CMD_LOAD_STATE(buffer, VIVS_GL_FLUSH_CACHE, flush); -- if (gpu->exec_state == ETNA_PIPE_3D) -- CMD_LOAD_STATE(buffer, VIVS_TS_FLUSH_CACHE, -- VIVS_TS_FLUSH_CACHE_FLUSH); -+ if (gpu->exec_state == ETNA_PIPE_3D) { -+ if (has_blt) { -+ CMD_LOAD_STATE(buffer, VIVS_BLT_ENABLE, 0x1); -+ CMD_LOAD_STATE(buffer, VIVS_BLT_SET_COMMAND, 0x1); -+ CMD_LOAD_STATE(buffer, VIVS_BLT_ENABLE, 0x0); -+ } else { -+ CMD_LOAD_STATE(buffer, VIVS_TS_FLUSH_CACHE, -+ VIVS_TS_FLUSH_CACHE_FLUSH); -+ } -+ } - CMD_SEM(buffer, SYNC_RECIPIENT_FE, SYNC_RECIPIENT_PE); - CMD_STALL(buffer, SYNC_RECIPIENT_FE, SYNC_RECIPIENT_PE); -+ if (has_blt) { -+ CMD_LOAD_STATE(buffer, VIVS_BLT_ENABLE, 0x1); -+ CMD_SEM(buffer, SYNC_RECIPIENT_FE, SYNC_RECIPIENT_BLT); -+ CMD_STALL(buffer, SYNC_RECIPIENT_FE, SYNC_RECIPIENT_BLT); -+ CMD_LOAD_STATE(buffer, VIVS_BLT_ENABLE, 0x0); -+ } - CMD_END(buffer); - - etnaviv_buffer_replace_wait(buffer, waitlink_offset, -@@ -323,6 +348,8 @@ void etnaviv_buffer_queue(struct etnaviv_gpu *gpu, u32 exec_state, - bool switch_mmu_context = gpu->mmu_context != mmu_context; - unsigned int new_flush_seq = READ_ONCE(gpu->mmu_context->flush_seq); - bool need_flush = switch_mmu_context || gpu->flush_seq != new_flush_seq; -+ bool has_blt = !!(gpu->identity.minor_features5 & -+ chipMinorFeatures5_BLT_ENGINE); - - lockdep_assert_held(&gpu->lock); - -@@ -433,6 +460,15 @@ void etnaviv_buffer_queue(struct etnaviv_gpu *gpu, u32 exec_state, - * 2 semaphore stall + 1 event + 1 wait + 1 link. - */ - return_dwords = 7; -+ -+ /* -+ * When the BLT engine is present we need 6 more dwords in the return -+ * target: 3 enable/flush/disable + 4 enable/semaphore stall/disable, -+ * but we don't need the normal TS flush state. -+ */ -+ if (has_blt) -+ return_dwords += 6; -+ - return_target = etnaviv_buffer_reserve(gpu, buffer, return_dwords); - CMD_LINK(cmdbuf, return_dwords, return_target); - -@@ -447,11 +483,25 @@ void etnaviv_buffer_queue(struct etnaviv_gpu *gpu, u32 exec_state, - CMD_LOAD_STATE(buffer, VIVS_GL_FLUSH_CACHE, - VIVS_GL_FLUSH_CACHE_DEPTH | - VIVS_GL_FLUSH_CACHE_COLOR); -- CMD_LOAD_STATE(buffer, VIVS_TS_FLUSH_CACHE, -- VIVS_TS_FLUSH_CACHE_FLUSH); -+ if (has_blt) { -+ CMD_LOAD_STATE(buffer, VIVS_BLT_ENABLE, 0x1); -+ CMD_LOAD_STATE(buffer, VIVS_BLT_SET_COMMAND, 0x1); -+ CMD_LOAD_STATE(buffer, VIVS_BLT_ENABLE, 0x0); -+ } else { -+ CMD_LOAD_STATE(buffer, VIVS_TS_FLUSH_CACHE, -+ VIVS_TS_FLUSH_CACHE_FLUSH); -+ } - } - CMD_SEM(buffer, SYNC_RECIPIENT_FE, SYNC_RECIPIENT_PE); - CMD_STALL(buffer, SYNC_RECIPIENT_FE, SYNC_RECIPIENT_PE); -+ -+ if (has_blt) { -+ CMD_LOAD_STATE(buffer, VIVS_BLT_ENABLE, 0x1); -+ CMD_SEM(buffer, SYNC_RECIPIENT_FE, SYNC_RECIPIENT_BLT); -+ CMD_STALL(buffer, SYNC_RECIPIENT_FE, SYNC_RECIPIENT_BLT); -+ CMD_LOAD_STATE(buffer, VIVS_BLT_ENABLE, 0x0); -+ } -+ - CMD_LOAD_STATE(buffer, VIVS_GL_EVENT, VIVS_GL_EVENT_EVENT_ID(event) | - VIVS_GL_EVENT_FROM_PE); - CMD_WAIT(buffer); -diff --git a/drivers/gpu/drm/etnaviv/state_blt.xml.h b/drivers/gpu/drm/etnaviv/state_blt.xml.h -index daae55995def..0e8bcf9dcc93 100644 ---- a/drivers/gpu/drm/etnaviv/state_blt.xml.h -+++ b/drivers/gpu/drm/etnaviv/state_blt.xml.h -@@ -46,6 +46,8 @@ DEALINGS IN THE SOFTWARE. - - /* This is a cut-down version of the state_blt.xml.h file */ - -+#define VIVS_BLT_SET_COMMAND 0x000140ac -+ - #define VIVS_BLT_ENABLE 0x000140b8 - #define VIVS_BLT_ENABLE_ENABLE 0x00000001 - --- -2.20.1 - diff --git a/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx/0004-drm-sched-Fix-passing-zero-to-PTR_ERR-warning-v2.patch b/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx/0004-drm-sched-Fix-passing-zero-to-PTR_ERR-warning-v2.patch deleted file mode 100644 index 8c141a0f5..000000000 --- a/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx/0004-drm-sched-Fix-passing-zero-to-PTR_ERR-warning-v2.patch +++ /dev/null @@ -1,50 +0,0 @@ -From d7c5782acd354bdb5ed0fa10e1e397eaed558390 Mon Sep 17 00:00:00 2001 -From: Andrey Grodzovsky <andrey.grodzovsky@amd.com> -Date: Tue, 29 Oct 2019 11:03:05 -0400 -Subject: [PATCH] drm/sched: Fix passing zero to 'PTR_ERR' warning v2 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Fix a static code checker warning. - -v2: Drop PTR_ERR_OR_ZERO. - -Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> -Reviewed-by: Emily Deng <Emily.Deng@amd.com> -Reviewed-by: Christian König <christian.koenig@amd.com> -Signed-off-by: Alex Deucher <alexander.deucher@amd.com> ---- - drivers/gpu/drm/scheduler/sched_main.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c -index 2af64459b3d7..fbb6446c4f69 100644 ---- a/drivers/gpu/drm/scheduler/sched_main.c -+++ b/drivers/gpu/drm/scheduler/sched_main.c -@@ -496,8 +496,10 @@ void drm_sched_resubmit_jobs(struct drm_gpu_scheduler *sched) - fence = sched->ops->run_job(s_job); - - if (IS_ERR_OR_NULL(fence)) { -+ if (IS_ERR(fence)) -+ dma_fence_set_error(&s_fence->finished, PTR_ERR(fence)); -+ - s_job->s_fence->parent = NULL; -- dma_fence_set_error(&s_fence->finished, PTR_ERR(fence)); - } else { - s_job->s_fence->parent = fence; - } -@@ -746,8 +748,9 @@ static int drm_sched_main(void *param) - r); - dma_fence_put(fence); - } else { -+ if (IS_ERR(fence)) -+ dma_fence_set_error(&s_fence->finished, PTR_ERR(fence)); - -- dma_fence_set_error(&s_fence->finished, PTR_ERR(fence)); - drm_sched_process_job(NULL, &sched_job->cb); - } - --- -2.20.1 - 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 4dc51369a..0772a98a8 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 @@ -1,38 +1,17 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:${THISDIR}/files:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" -require recipes-kernel/linux/linux-agl.inc +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 = " \ +SRC_URI:append:etnaviv = " \ file://0001-enable-mhdp-with-etnaviv.patch \ file://0002-dts-enable-etnaviv.patch \ - file://0003-drm-etnaviv-fix-TS-cache-flushing-on-GPUs-with-BLT-e.patch \ - file://0004-drm-sched-Fix-passing-zero-to-PTR_ERR-warning-v2.patch \ " -# Make sure these are enabled so that AGL configurations work -SRC_URI_append = " file://tmpfs.cfg" -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/tmpfs.cfg" -SRC_URI_append = " file://namespace.cfg" -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/namespace.cfg" -SRC_URI_append = " file://cgroup.cfg" -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/cgroup.cfg" - -# Support for CFG80211 subsystem -SRC_URI_append = " file://cfg80211.cfg" -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/cfg80211.cfg" - # Support for i.MX8MQ EVKB (e.g. Broadcom wifi) -SRC_URI_append_imx8mqevk = " file://imx8mq-evkb.cfg" -KERNEL_CONFIG_FRAGMENTS_append_imx8mqevk = " ${WORKDIR}/imx8mq-evkb.cfg" +AGL_KCONFIG_FRAGMENTS:append:imx8mq-evk = " imx8mq-evkb.cfg" # Build in etnaviv if required -SRC_URI_append_etnaviv = " file://etnaviv.cfg" -KERNEL_CONFIG_FRAGMENTS_append_etnaviv = " ${WORKDIR}/etnaviv.cfg" - -# Turn off a couple of things enabled by default by Freescale -# (lock debugging and userspace firmware loader fallback) -SRC_URI_append = " file://fixups.cfg" -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/fixups.cfg" +AGL_KCONFIG_FRAGMENTS:append:etnaviv = " etnaviv.cfg" diff --git a/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-lts_%.bbappend b/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-lts_%.bbappend new file mode 100644 index 000000000..1007f3c7c --- /dev/null +++ b/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-lts_%.bbappend @@ -0,0 +1 @@ +require linux-fslc.inc diff --git a/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc.inc b/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc.inc new file mode 100644 index 000000000..948b8c22c --- /dev/null +++ b/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc.inc @@ -0,0 +1,22 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" + +require recipes-kernel/linux/linux-yocto-agl.inc + +# Make sure these are enabled so that AGL systemd configuration works +AGL_KCONFIG_FRAGMENTS += " \ + tmpfs.cfg \ + namespace.cfg \ + cgroup.cfg \ +" + +# Support for CFG80211 subsystem +AGL_KCONFIG_FRAGMENTS += "cfg80211.cfg" + +# Turn off a couple of things enabled by default by Freescale +# (lock debugging and userspace firmware loader fallback) +AGL_KCONFIG_FRAGMENTS += "fixups.cfg" + +do_install:append:cubox-i() { + # Add symlink to work with default Hummingboard 2 u-boot configuration + ln -sf imx6q-hummingboard2.dtb ${D}/boot/imx6q-hummingboard2-emmc.dtb +} diff --git a/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc_%.bbappend b/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc_%.bbappend index 640f9cfe5..1007f3c7c 100644 --- a/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc_%.bbappend +++ b/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc_%.bbappend @@ -1,25 +1 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -require recipes-kernel/linux/linux-agl.inc - -# Make sure these are enabled so that AGL configurations work -SRC_URI_append = " file://tmpfs.cfg" -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/tmpfs.cfg" -SRC_URI_append = " file://namespace.cfg" -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/namespace.cfg" -SRC_URI_append = " file://cgroup.cfg" -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/cgroup.cfg" - -# Support for CFG80211 subsystem -SRC_URI_append = " file://cfg80211.cfg" -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/cfg80211.cfg" - -# Turn off a couple of things enabled by default by Freescale -# (lock debugging and userspace firmware loader fallback) -SRC_URI_append = " file://fixups.cfg" -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/fixups.cfg" - -do_install_append_cubox-i() { - # Add symlink to work with default Hummingboard 2 u-boot configuration - ln -sf imx6q-hummingboard2.dtb ${D}/boot/imx6q-hummingboard2-emmc.dtb -} +require linux-fslc.inc diff --git a/meta-agl-bsp/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-embedded-c/aws-iot-device-sdk-embedded-c.bb b/meta-agl-bsp/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-embedded-c/aws-iot-device-sdk-embedded-c.bb deleted file mode 100644 index a3f67004e..000000000 --- a/meta-agl-bsp/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-embedded-c/aws-iot-device-sdk-embedded-c.bb +++ /dev/null @@ -1,40 +0,0 @@ -DESCRIPTION = "AWS IoT device SDK for embedded C" -AUTHOR = "AWS" -HOMEPAGE = "https://github.com/aws/aws-iot-device-sdk-embedded-C" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=acc7a1bf87c055789657b148939e4b40" - -SRC_URI = "\ - git://github.com/aws/aws-iot-device-sdk-embedded-C.git;protocol=https \ - file://Makefile.aws \ - file://aws_iot_config.h \ - file://awsiotsdk.pc \ -" -SRCREV = "d039f075e1cc2a2a7fc20edc6868f328d8d36b2f" - -S = "${WORKDIR}/git" -B = "${WORKDIR}/build" - -DEPENDS = "mbedtls" -RDEPENDS_${PN} += "mbedtls" - -do_configure_prepend() { - cp ${WORKDIR}/Makefile.aws ${S}/src - cp ${WORKDIR}/aws_iot_config.h ${S}/include - cp ${WORKDIR}/awsiotsdk.pc ${S} -} - -do_compile() { - cd ${S}/src - oe_runmake -f ./Makefile.aws DESTDIR=${D} all -} - -do_install() { - cd ${S}/src - oe_runmake -f ./Makefile.aws DESTDIR=${D} install -} - -BBCLASSEXTEND = "native nativesdk" - -ALLOW_EMPTY_${PN} = "1" - diff --git a/meta-agl-bsp/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-embedded-c/files/Makefile.aws b/meta-agl-bsp/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-embedded-c/files/Makefile.aws deleted file mode 100644 index d4f18c0f9..000000000 --- a/meta-agl-bsp/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-embedded-c/files/Makefile.aws +++ /dev/null @@ -1,62 +0,0 @@ -########################################################################### -# Copyright 2020 MERA -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -########################################################################### - -# Generated library name -NAME := awsiotsdk - -SRC = . -AWS_SDK_DIR = $(SRC)/.. -PLATFORM_DIR = $(AWS_SDK_DIR)/platform/linux/mbedtls -PLATFORM_COMMON_DIR = $(AWS_SDK_DIR)/platform/linux/common -AWS_INSTALL_HEADERS_DIR = /usr/include/awsiotsdk - - -CFLAGS += -I $(AWS_SDK_DIR)/include -CFLAGS += -I $(AWS_SDK_DIR)/external_libs/jsmn -CFLAGS += -I $(PLATFORM_COMMON_DIR) -CFLAGS += -I $(PLATFORM_DIR) -CFLAGS += -DENABLE_IOT_DEBUG -DENABLE_IOT_INFO -DENABLE_IOT_WARN -DENABLE_IOT_ERROR - - -# Source to compile -SRCS += $(wildcard $(SRC)/*.c) -SRCS += $(wildcard $(AWS_SDK_DIR)/external_libs/jsmn/*.c) -SRCS += $(wildcard $(PLATFORM_DIR)/*.c) -SRCS += $(wildcard $(PLATFORM_COMMON_DIR)/*.c) - -OBJS = $(SRCS:.c=.o) - - -.PHONY: all -all: lib$(NAME).a - -lib$(NAME).a: $(OBJS) - $(AR) -rcs $@ $(OBJS) - -.PHONY: install -install: lib$(NAME).a - install -D -m 0644 lib$(NAME).a $(DESTDIR)/usr/lib/lib$(NAME).a - install -d $(DESTDIR)$(AWS_INSTALL_HEADERS_DIR) - install -m 0644 $(AWS_SDK_DIR)/include/*.h $(DESTDIR)$(AWS_INSTALL_HEADERS_DIR)/ - install -m 0644 $(AWS_SDK_DIR)/external_libs/jsmn/*.h $(DESTDIR)$(AWS_INSTALL_HEADERS_DIR)/ - install -m 0644 $(PLATFORM_COMMON_DIR)/*.h $(DESTDIR)$(AWS_INSTALL_HEADERS_DIR)/ - install -m 0644 $(PLATFORM_DIR)/*.h $(DESTDIR)$(AWS_INSTALL_HEADERS_DIR)/ - install -d $(DESTDIR)/usr/lib/pkgconfig - install -m 0644 ../awsiotsdk.pc $(DESTDIR)/usr/lib/pkgconfig/ - -.PHONY: clean -clean: - -rm -f lib$(NAME).a $(OBJS) diff --git a/meta-agl-bsp/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-embedded-c/files/aws_iot_config.h b/meta-agl-bsp/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-embedded-c/files/aws_iot_config.h deleted file mode 100644 index e01189332..000000000 --- a/meta-agl-bsp/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-embedded-c/files/aws_iot_config.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - -/** - * @file aws_iot_config.h - * @brief AWS IoT specific configuration file - */ - -#ifndef AWS_IOT_CONFIG_H_ -#define AWS_IOT_CONFIG_H_ - -// Get from console -// ================================================= -#define AWS_IOT_MQTT_HOST "" ///< Customer specific MQTT HOST. The same will be used for Thing Shadow -#define AWS_IOT_MQTT_PORT 443 ///< default port for MQTT/S -#define AWS_IOT_MQTT_CLIENT_ID "" ///< MQTT client ID should be unique for every device -#define AWS_IOT_MY_THING_NAME "" ///< Thing Name of the Shadow this device is associated with -#define AWS_IOT_ROOT_CA_FILENAME "" ///< Root CA file name -#define AWS_IOT_CERTIFICATE_FILENAME "" ///< device signed certificate file name -#define AWS_IOT_PRIVATE_KEY_FILENAME "" ///< Device private key filename -// ================================================= - -// MQTT PubSub -#define AWS_IOT_MQTT_TX_BUF_LEN 10240 ///< Any time a message is sent out through the MQTT layer. The message is copied into this buffer anytime a publish is done. This will also be used in the case of Thing Shadow -#define AWS_IOT_MQTT_RX_BUF_LEN 10240 ///< Any message that comes into the device should be less than this buffer size. If a received message is bigger than this buffer size the message will be dropped. -#define AWS_IOT_MQTT_NUM_SUBSCRIBE_HANDLERS 5 ///< Maximum number of topic filters the MQTT client can handle at any given time. This should be increased appropriately when using Thing Shadow - -// Thing Shadow specific configs -#define SHADOW_MAX_SIZE_OF_RX_BUFFER (AWS_IOT_MQTT_RX_BUF_LEN+1) ///< Maximum size of the SHADOW buffer to store the received Shadow message, including terminating NULL byte. -#define MAX_SIZE_OF_UNIQUE_CLIENT_ID_BYTES 80 ///< Maximum size of the Unique Client Id. For More info on the Client Id refer \ref response "Acknowledgments" -#define MAX_SIZE_CLIENT_ID_WITH_SEQUENCE MAX_SIZE_OF_UNIQUE_CLIENT_ID_BYTES + 10 ///< This is size of the extra sequence number that will be appended to the Unique client Id -#define MAX_SIZE_CLIENT_TOKEN_CLIENT_SEQUENCE MAX_SIZE_CLIENT_ID_WITH_SEQUENCE + 20 ///< This is size of the the total clientToken key and value pair in the JSON -#define MAX_ACKS_TO_COMEIN_AT_ANY_GIVEN_TIME 10 ///< At Any given time we will wait for this many responses. This will correlate to the rate at which the shadow actions are requested -#define MAX_THINGNAME_HANDLED_AT_ANY_GIVEN_TIME 10 ///< We could perform shadow action on any thing Name and this is maximum Thing Names we can act on at any given time -#define MAX_JSON_TOKEN_EXPECTED 120 ///< These are the max tokens that is expected to be in the Shadow JSON document. Include the metadata that gets published -#define MAX_SHADOW_TOPIC_LENGTH_WITHOUT_THINGNAME 60 ///< All shadow actions have to be published or subscribed to a topic which is of the format $aws/things/{thingName}/shadow/update/accepted. This refers to the size of the topic without the Thing Name -#define MAX_SIZE_OF_THING_NAME 30 ///< The Thing Name should not be bigger than this value. Modify this if the Thing Name needs to be bigger -#define MAX_SHADOW_TOPIC_LENGTH_BYTES MAX_SHADOW_TOPIC_LENGTH_WITHOUT_THINGNAME + MAX_SIZE_OF_THING_NAME ///< This size includes the length of topic with Thing Name - -// Auto Reconnect specific config -#define AWS_IOT_MQTT_MIN_RECONNECT_WAIT_INTERVAL 1000 ///< Minimum time before the First reconnect attempt is made as part of the exponential back-off algorithm -#define AWS_IOT_MQTT_MAX_RECONNECT_WAIT_INTERVAL 128000 ///< Maximum time interval after which exponential back-off will stop attempting to reconnect. - -#define DISABLE_METRICS true ///< Disable the collection of metrics by setting this to true - -#endif /* AWS_IOT_CONFIG_H_ */ diff --git a/meta-agl-bsp/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-embedded-c/files/awsiotsdk.pc b/meta-agl-bsp/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-embedded-c/files/awsiotsdk.pc deleted file mode 100644 index f8384993b..000000000 --- a/meta-agl-bsp/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-embedded-c/files/awsiotsdk.pc +++ /dev/null @@ -1,27 +0,0 @@ -########################################################################### -# Copyright 2020 MERA -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -########################################################################### - -prefix=/usr -exec_prefix=${prefix} -libdir=${prefix}/lib -includedir=${prefix}/include/awsiotsdk - -Name: AWS IoT Device SDK for Embedded C -Description: AWS IoT SDK compiled into library (includes mbedTLS and jsmn code) -Version: 3.0.1 - -Cflags: -I${includedir} -DENABLE_IOT_DEBUG -DENABLE_IOT_INFO -DENABLE_IOT_WARN -DENABLE_IOT_ERROR -Libs: -L${libdir} -lawsiotsdk -lmbedtls -lmbedcrypto -lmbedx509 diff --git a/meta-agl-bsp/meta-iot-cloud/recipes-azure/azure-iot-sdk-c/azure-iot-sdk-c_%.bbappend b/meta-agl-bsp/meta-iot-cloud/recipes-azure/azure-iot-sdk-c/azure-iot-sdk-c_%.bbappend deleted file mode 100644 index ecd5fe2f6..000000000 --- a/meta-agl-bsp/meta-iot-cloud/recipes-azure/azure-iot-sdk-c/azure-iot-sdk-c_%.bbappend +++ /dev/null @@ -1,5 +0,0 @@ -# Disable the amqp transport, due to linking error in meta-iot repository for amqp -# symbols from amqp code are not included in the libiothub_client.so - -# NOTE: amqp is not used by AGL in IoT context at the moment -PACKAGECONFIG_remove = "amqp" diff --git a/meta-agl-bsp/meta-iot-cloud/recipes-azure/azure-macro-utils-c/azure-macro-utils-c_%.bbappend b/meta-agl-bsp/meta-iot-cloud/recipes-azure/azure-macro-utils-c/azure-macro-utils-c_%.bbappend deleted file mode 100644 index afe3e9cda..000000000 --- a/meta-agl-bsp/meta-iot-cloud/recipes-azure/azure-macro-utils-c/azure-macro-utils-c_%.bbappend +++ /dev/null @@ -1 +0,0 @@ -ALLOW_EMPTY_${PN} = "1" diff --git a/meta-agl-bsp/meta-iot-cloud/recipes-azure/umock-c/umock-c_%.bbappend b/meta-agl-bsp/meta-iot-cloud/recipes-azure/umock-c/umock-c_%.bbappend deleted file mode 100644 index afe3e9cda..000000000 --- a/meta-agl-bsp/meta-iot-cloud/recipes-azure/umock-c/umock-c_%.bbappend +++ /dev/null @@ -1 +0,0 @@ -ALLOW_EMPTY_${PN} = "1" diff --git a/meta-agl-bsp/meta-qcom/recipes-bsp/96boards-tools/96boards-tools_0.12.bb b/meta-agl-bsp/meta-qcom/recipes-bsp/96boards-tools/96boards-tools_0.12.bb deleted file mode 100644 index 446770f8e..000000000 --- a/meta-agl-bsp/meta-qcom/recipes-bsp/96boards-tools/96boards-tools_0.12.bb +++ /dev/null @@ -1,32 +0,0 @@ -SUMMARY = "Useful bits an pieces to make 96Boards more standard across the board" -HOMEPAGE = "https://github.com/96boards/96boards-tools" -SECTION = "devel" - -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" - -SRCREV = "ed0f0dbec02c1869a0c4fa0140b4aa5338c9d010" -SRC_URI = "git://github.com/96boards/96boards-tools;branch=master;protocol=https" - -S = "${WORKDIR}/git" - -inherit systemd allarch update-rc.d - -do_install () { - install -d ${D}${sysconfdir}/udev/rules.d - install -m 0755 ${S}/*.rules ${D}${sysconfdir}/udev/rules.d/ - install -d ${D}${sysconfdir}/init.d - install -m 0755 ${S}/resize-disk ${D}${sysconfdir}/init.d/ - - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${S}/resize-helper.service ${D}${systemd_unitdir}/system - - install -d ${D}${sbindir} - install -m 0755 ${S}/resize-helper ${D}${sbindir} -} - -INITSCRIPT_NAME = "resize-disk" -INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ." - -SYSTEMD_SERVICE_${PN} = "resize-helper.service" -RDEPENDS_${PN} += "e2fsprogs-resize2fs gptfdisk parted util-linux udev" diff --git a/meta-agl-bsp/meta-qcom/recipes-bsp/q6v5-pil/files/qcom-q6v5-pil.service b/meta-agl-bsp/meta-qcom/recipes-bsp/q6v5-pil/files/qcom-q6v5-pil.service deleted file mode 100644 index 3d9cd24bb..000000000 --- a/meta-agl-bsp/meta-qcom/recipes-bsp/q6v5-pil/files/qcom-q6v5-pil.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=Qualcomm Hexagon PIL setup -After=rmtfs.service -Requires=rmtfs.service - -[Service] -Type=oneshot -RemainAfterExit=yes -ExecStart=/sbin/modprobe -q qcom_q6v5_pil - -[Install] -WantedBy=multi-user.target diff --git a/meta-agl-bsp/meta-qcom/recipes-bsp/q6v5-pil/q6v5-pil.bb b/meta-agl-bsp/meta-qcom/recipes-bsp/q6v5-pil/q6v5-pil.bb deleted file mode 100644 index 19f0760ac..000000000 --- a/meta-agl-bsp/meta-qcom/recipes-bsp/q6v5-pil/q6v5-pil.bb +++ /dev/null @@ -1,20 +0,0 @@ -inherit systemd - -SUMMARY = "Systemd unit file for the delay loading Hexagon PIL kernel module" -SECTION = "misc" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" - -SRC_URI += "file://qcom-q6v5-pil.service" - -do_install() { - install -d ${D}${systemd_unitdir}/system/ - install -m 0644 ${WORKDIR}/qcom-q6v5-pil.service ${D}${systemd_unitdir}/system - - # Blacklist qcom_q6v5_pil to prevent modules autoload - # qcom-q6v5-pil.service will do the work after rmtfs done. - install -d ${D}/${sysconfdir}/modprobe.d - echo "blacklist qcom_q6v5_pil" > ${D}/${sysconfdir}/modprobe.d/qcom_q6v5_pil.conf -} - -SYSTEMD_SERVICE_${PN} = "qcom-q6v5-pil.service" diff --git a/meta-agl-bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_%.bbappend b/meta-agl-bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_%.bbappend deleted file mode 100644 index 0b2b99d4d..000000000 --- a/meta-agl-bsp/meta-qcom/recipes-kernel/linux/linux-linaro-qcomlt_%.bbappend +++ /dev/null @@ -1,3 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -require recipes-kernel/linux/linux-agl.inc diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/bootfiles.bbappend b/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/bootfiles.bbappend deleted file mode 100644 index adb19c09c..000000000 --- a/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/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 bbab3df46..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,7 +1,7 @@ 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}/bootfiles/config.txt @@ -24,7 +24,7 @@ do_deploy_append_raspberrypi4() { 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}/bootfiles/config.txt fi @@ -40,14 +40,7 @@ do_deploy_append() { echo "dtparam=audio=on" >> ${DEPLOYDIR}/bootfiles/config.txt } -do_deploy_append_raspberrypi4() { +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}/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-graphics/wayland/weston-ini-conf.bbappend b/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston-ini-conf.bbappend deleted file mode 100644 index 33dfd6a23..000000000 --- a/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston-ini-conf.bbappend +++ /dev/null @@ -1,3 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -SRC_URI += "file://dsi.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 c365715fa..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,36 +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 + # 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.dtb \ + ${DEPLOY_DIR_IMAGE}/${VC4DTBO}-pi4.dtbo fi - # NOTE: meta-updater currently disables rpi-ft5406.dtbo on rpi4, so need to check if it is present + + # 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}.dtbo + 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 - # 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 - fi } do_deploy () { @@ -44,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" diff --git a/meta-agl-bsp/meta-rcar-gateway/recipes-kernel/linux/linux-renesas_%.bbappend b/meta-agl-bsp/meta-rcar-gateway/recipes-kernel/linux/linux-renesas_%.bbappend new file mode 100644 index 000000000..d565da8ac --- /dev/null +++ b/meta-agl-bsp/meta-rcar-gateway/recipes-kernel/linux/linux-renesas_%.bbappend @@ -0,0 +1,11 @@ +do_install:append () { + + # Remove firmware file that is not packaged in the kernel. + # It throws an error during do_package. + # It seems to be moved out of the kernel in later BSP versions. + rm -rf ${D}/lib/firmware/r8a779f0_ufs.bin + rm -rf ${D}/lib/firmware + rm -rf ${D}/lib + +} + diff --git a/meta-agl-bsp/meta-rcar-gen3-adas/conf/NOTES b/meta-agl-bsp/meta-rcar-gen3-adas/conf/NOTES index f9cb5b1e4..296dd5e19 100644 --- a/meta-agl-bsp/meta-rcar-gen3-adas/conf/NOTES +++ b/meta-agl-bsp/meta-rcar-gen3-adas/conf/NOTES @@ -5,7 +5,7 @@ # E.g. MACHINE_FEATURE. Should *not* be in layer.conf !! # Radio packages -#IMAGE_INSTALL_append_rcar-gen3 += " \ +#IMAGE_INSTALL:append:rcar-gen3 = " \ # si-tools \ # si-init \ # linux-firmware-wl18xx \ @@ -17,19 +17,19 @@ # ofono-tests \ #" # E.g. MACHINE_FEATURE -#IMAGE_INSTALL_append_r8a7797 += " \ +#IMAGE_INSTALL:append:r8a7797 += " \ # kernel-module-uio-imp \ # kernel-module-cmemdrv \ # udev-rules-cvlib \ #" # E.g. MACHINE_FEATURE -#IMAGE_INSTALL_append_r8a7798 += " \ +#IMAGE_INSTALL:append:r8a7798 += " \ # kernel-module-uio-imp \ # kernel-module-cmemdrv \ # udev-rules-cvlib \ #" # This is a special use case. Should be enabled by user. -#DISTRO_FEATURES_append = " surroundview " +#DISTRO_FEATURES:append = " surroundview " #### BBMASK @@ -58,7 +58,7 @@ BBMASK += "/meta-rcar-gen3-adas/recipes-devtools/valgrind/" BBMASK += "/meta-rcar-gen3-adas/recipes-devtools/gcc/" # libpng in upstream already enabled neon -# poky/meta/recipes-multimedia/libpng/libpng_1.6.37.bb:EXTRA_OECONF_append_class-target = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off" ,d)}" +# poky/meta/recipes-multimedia/libpng/libpng_1.6.37.bb:EXTRA_OECONF:append:class-target = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off" ,d)}" BBMASK += "/meta-rcar-gen3-adas/recipes-graphics/libpng/" # opencv in upstream is newer diff --git a/meta-agl-bsp/meta-rcar-gen3-adas/conf/include/rcar-gen3-adas.inc b/meta-agl-bsp/meta-rcar-gen3-adas/conf/include/rcar-gen3-adas.inc index 5fc4dcefd..0c344a471 100644 --- a/meta-agl-bsp/meta-rcar-gen3-adas/conf/include/rcar-gen3-adas.inc +++ b/meta-agl-bsp/meta-rcar-gen3-adas/conf/include/rcar-gen3-adas.inc @@ -1,15 +1,17 @@ #Keep this as a reminder #MACHINEOVERRIDES .= ":kingfisher" -#PACKAGE_EXTRA_ARCHS_append = " kingfisher" +#PACKAGE_EXTRA_ARCHS:append = " kingfisher" -PREFERRED_RPROVIDER_virtual/gpsd-conf ?= "gpsd-kingfisher-conf" +# Add a feature as a low-impact way to detect Kingfisher support in +# recipes. +AGL_FEATURES:append:rcar-gen3 = " kingfisher" -IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE}-kf${IMAGE_VERSION_SUFFIX}" -IMAGE_LINK_NAME = "${IMAGE_BASENAME}-${MACHINE}-kf" -TOOLCHAIN_OUTPUTNAME = "${SDK_NAME}-kf-toolchain-${SDK_VERSION}" +IMAGE_NAME:rcar-gen3 = "${IMAGE_BASENAME}-${MACHINE}-kf${IMAGE_VERSION_SUFFIX}" +IMAGE_LINK_NAME:rcar-gen3 = "${IMAGE_BASENAME}-${MACHINE}-kf" +TOOLCHAIN_OUTPUTNAME:rcar-gen3 = "${SDK_NAME}-kf-toolchain-${SDK_VERSION}" # Radio packages -IMAGE_INSTALL_append_rcar-gen3 += " \ +IMAGE_INSTALL:append:rcar-gen3 = " \ si-tools \ si-init \ linux-firmware-wl18xx \ 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 75bfcfcc7..bae421a50 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 = "dunfell" +LAYERSERIES_COMPAT_rcar-gen3-cogent = "scarthgap" diff --git a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/alsa-state/alsa-state.bbappend b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/alsa-state/alsa-state.bbappend deleted file mode 100644 index 4cb3a211b..000000000 --- a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/alsa-state/alsa-state.bbappend +++ /dev/null @@ -1,3 +0,0 @@ -do_configure_append () { - sed -i 's/state.rcarsound\ {/state.ak4613\ {/g' ${WORKDIR}/asound.state -} 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 7ab99e025..b53504400 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 @@ -21,8 +21,8 @@ do_install() { # the Si468x device via i2c install -d ${D}${sysconfdir}/udev/rules.d cat >${D}${sysconfdir}/udev/rules.d/zz-radio-si.rules <<'EOF' -KERNEL=="i2c-12", MODE="0660", GROUP="audio", SECLABEL{smack}="*" +KERNEL=="i2c-12", MODE="0660", GROUP="audio" EOF } -FILES_${PN} += "${systemd_system_unitdir}" +FILES:${PN} += "${systemd_system_unitdir}" diff --git a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/si-tools/si-tools.bbappend b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/si-tools/si-tools.bbappend index 98c66737b..7121bd168 100644 --- a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/si-tools/si-tools.bbappend +++ b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/si-tools/si-tools.bbappend @@ -1,10 +1,10 @@ -FILESEXTRAPATHS_append := ":${THISDIR}/files" +FILESEXTRAPATHS:append := ":${THISDIR}/files" SRC_URI += " \ file://si-tools-fm-improvements.patch \ " -EXTRA_OEMAKE_append = " 'LDFLAGS=${LDFLAGS}'" +EXTRA_OEMAKE:append = " 'LDFLAGS=${LDFLAGS}'" do_install() { install -d ${D}${bindir} @@ -22,7 +22,7 @@ do_install() { done } -FILES_${PN} = " \ +FILES:${PN} = " \ ${bindir} \ ${nonarch_base_libdir}/firmware/radio \ " diff --git a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/ti-bt-firmware/ti-bt-firmware_git.bbappend b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/ti-bt-firmware/ti-bt-firmware_git.bbappend index e29e54e44..52bee656d 100644 --- a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/ti-bt-firmware/ti-bt-firmware_git.bbappend +++ b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-bsp/ti-bt-firmware/ti-bt-firmware_git.bbappend @@ -3,4 +3,4 @@ do_install() { cp *.bts ${D}${nonarch_base_libdir}/firmware/ti-connectivity/ } -FILES_${PN} = "${nonarch_base_libdir}/firmware/ti-connectivity/*" +FILES:${PN} = "${nonarch_base_libdir}/firmware/ti-connectivity/*" 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 a08cb2624..55d570fc7 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 @@ -1,15 +1,15 @@ inherit systemd -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" SRC_URI += "file://ti-uim.service" -SYSTEMD_SERVICE_${PN} = "ti-uim.service" +SYSTEMD_SERVICE:${PN} = "ti-uim.service" PR = "r0" PV = "0.1+git${SRCPV}" -do_install_append() { +do_install:append() { # We do not want the blacklist rm -f ${D}/${sysconfdir}/modprobe.d/ti_bt.conf diff --git a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0001-arm64-dts-renesas-preserve-drm-HDMI-connector-naming.patch b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0001-arm64-dts-renesas-preserve-drm-HDMI-connector-naming.patch index 64c9542a3..d3a3229b4 100644 --- a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0001-arm64-dts-renesas-preserve-drm-HDMI-connector-naming.patch +++ b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0001-arm64-dts-renesas-preserve-drm-HDMI-connector-naming.patch @@ -1,4 +1,4 @@ -From ce9a7a41a9f65cc8cc129cdd27e155b35b26d393 Mon Sep 17 00:00:00 2001 +From 71c2e7bc6ecf872dd3b45480859dce0f2e941b03 Mon Sep 17 00:00:00 2001 From: Matt Porter <mporter@konsulko.com> Date: Wed, 13 Dec 2017 12:49:20 -0500 Subject: [PATCH] arm64: dts: renesas: preserve drm HDMI connector naming on KF @@ -18,16 +18,18 @@ is first. Change-Id: Ibbb1975c2383a526a54c257fb7d68d32a042d468 Signed-off-by: Matt Porter <mporter@konsulko.com> Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh> +Signed-off-by: Harunobu Kurokawa <harunobu.kurokawa.dn@renesas.com> --- - arch/arm64/boot/dts/renesas/r8a7795.dtsi | 10 +++++----- - arch/arm64/boot/dts/renesas/r8a7796.dtsi | 10 +++++----- - 2 files changed, 10 insertions(+), 10 deletions(-) + arch/arm64/boot/dts/renesas/r8a77951.dtsi | 10 +++++----- + arch/arm64/boot/dts/renesas/r8a77960.dtsi | 10 +++++----- + arch/arm64/boot/dts/renesas/r8a77961.dtsi | 10 +++++----- + 3 files changed, 15 insertions(+), 15 deletions(-) -diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi -index f7f947d27b0d..5bcc2391587d 100644 ---- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi -+++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi -@@ -3054,11 +3054,6 @@ +diff --git a/arch/arm64/boot/dts/renesas/r8a77951.dtsi b/arch/arm64/boot/dts/renesas/r8a77951.dtsi +index 12e78097533e..9ead58e8a7c2 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77951.dtsi ++++ b/arch/arm64/boot/dts/renesas/r8a77951.dtsi +@@ -3943,11 +3943,6 @@ ports { #address-cells = <1>; #size-cells = <0>; @@ -39,8 +41,8 @@ index f7f947d27b0d..5bcc2391587d 100644 port@1 { reg = <1>; du_out_hdmi0: endpoint { -@@ -3076,6 +3071,11 @@ - du_out_lvds0: endpoint { +@@ -3966,6 +3961,11 @@ du_out_lvds0: endpoint { + remote-endpoint = <&lvds0_in>; }; }; + port@0 { @@ -51,11 +53,11 @@ index f7f947d27b0d..5bcc2391587d 100644 }; }; -diff --git a/arch/arm64/boot/dts/renesas/r8a7796.dtsi b/arch/arm64/boot/dts/renesas/r8a7796.dtsi -index df26656e0f19..154ac1dd91fa 100644 ---- a/arch/arm64/boot/dts/renesas/r8a7796.dtsi -+++ b/arch/arm64/boot/dts/renesas/r8a7796.dtsi -@@ -2846,11 +2846,6 @@ +diff --git a/arch/arm64/boot/dts/renesas/r8a77960.dtsi b/arch/arm64/boot/dts/renesas/r8a77960.dtsi +index 66ab48b3a704..a5481dc4a3f1 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77960.dtsi ++++ b/arch/arm64/boot/dts/renesas/r8a77960.dtsi +@@ -3628,11 +3628,6 @@ ports { #address-cells = <1>; #size-cells = <0>; @@ -67,8 +69,36 @@ index df26656e0f19..154ac1dd91fa 100644 port@1 { reg = <1>; du_out_hdmi0: endpoint { -@@ -2862,6 +2857,11 @@ - du_out_lvds0: endpoint { +@@ -3645,6 +3640,11 @@ du_out_lvds0: endpoint { + remote-endpoint = <&lvds0_in>; + }; + }; ++ port@0 { ++ reg = <0>; ++ du_out_rgb: endpoint { ++ }; ++ }; + }; + }; + +diff --git a/arch/arm64/boot/dts/renesas/r8a77961.dtsi b/arch/arm64/boot/dts/renesas/r8a77961.dtsi +index ef2cb77f3c32..032ef1ca0633 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77961.dtsi ++++ b/arch/arm64/boot/dts/renesas/r8a77961.dtsi +@@ -3434,11 +3434,6 @@ ports { + #address-cells = <1>; + #size-cells = <0>; + +- port@0 { +- reg = <0>; +- du_out_rgb: endpoint { +- }; +- }; + port@1 { + reg = <1>; + du_out_hdmi0: endpoint { +@@ -3451,6 +3446,11 @@ du_out_lvds0: endpoint { + remote-endpoint = <&lvds0_in>; }; }; + port@0 { @@ -80,5 +110,5 @@ index df26656e0f19..154ac1dd91fa 100644 }; -- -2.11.0 +2.25.1 diff --git a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0004-ADSP-enable-and-add-sound-hardware-abstraction_kf.patch b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0004-ADSP-enable-and-add-sound-hardware-abstraction_kf.patch deleted file mode 100644 index 92f5af88c..000000000 --- a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0004-ADSP-enable-and-add-sound-hardware-abstraction_kf.patch +++ /dev/null @@ -1,58 +0,0 @@ -The ADSP on Renesas SoCs required a reserved memory area to become -enabled, and this needs to be done manually. - -This patch adds sound hardware abstraction information for the m3ulcb -and m3ulcb-kf (kingfisher) device trees. This is helpful on-board the -ADSP for dynamically determining sound hardware at runtime, allowing -single binaries to be used between the two boards. - -Future work will incorporate the h3ulcb and Salvator boards into the -abstraction. - -Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh> -Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au> ---- -diff --git a/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb-kf.dts b/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb-kf.dts -index de2390f009e7..4ccfa8315d17 100644 ---- a/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb-kf.dts -+++ b/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb-kf.dts -@@ -15,6 +15,39 @@ - "renesas,r8a7796"; - }; - -+ -+&adsp { -+ -+ /* ADSP playback setting for pcm3168 */ -+ adsp_playback0: adsp,playback { -+ mode = "tdm"; -+ clock-mode = "master"; -+ bus-width = <24>; -+ ssi = <3>; -+ bus-if = <0>; -+ channels = <8>; -+ pin-share-ssi = <4>; -+ }; -+ -+ /* ADSP capture setting for pcm3168 */ -+ adsp_capture0: adsp,capture { -+ mode = "tdm"; -+ clock-mode = "slave"; -+ bus-width = <24>; -+ ssi = <4>; -+ bus-if = <0>; -+ channels = <8>; -+ pin-share-ssi = <3>; -+ }; -+ -+ adsp,ports { -+ port@0 { -+ playback = <&adsp_playback0>; -+ capture = <&adsp_capture0>; -+ }; -+ }; -+}; -+ - &du { - ports { - port@0 { diff --git a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/disable_most.cfg b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/disable_most.cfg deleted file mode 100644 index 4179e25c2..000000000 --- a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/disable_most.cfg +++ /dev/null @@ -1,9 +0,0 @@ -# CONFIG_STAGING is not set -# CONFIG_MOST is not set -# CONFIG_MOSTCORE is not set -# CONFIG_AIM_CDEV is not set -# CONFIG_AIM_NETWORK is not set -# CONFIG_AIM_SOUND is not set -# CONFIG_AIM_V4L2 is not set -# CONFIG_HDM_DIM2 is not set - diff --git a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_%.bbappend b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_%.bbappend index 36e0caf34..20682e4f0 100644 --- a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_%.bbappend +++ b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_%.bbappend @@ -1,11 +1,10 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -SRC_URI_append_ulcb = " \ +SRC_URI:append:ulcb = " \ file://0001-arm64-dts-renesas-preserve-drm-HDMI-connector-naming.patch \ - file://disable_most.cfg \ " -KERNEL_DEVICETREE_remove_h3ulcb = " \ +KERNEL_DEVICETREE:remove:h3ulcb = " \ renesas/r8a7795-es1-h3ulcb-view.dtb \ renesas/r8a7795-es1-h3ulcb-had-alfa.dtb \ renesas/r8a7795-es1-h3ulcb-had-beta.dtb \ @@ -24,3 +23,7 @@ KERNEL_DEVICETREE_remove_h3ulcb = " \ renesas/r8a7795-h3ulcb-4x2g-vb2.1.dtb \ renesas/r8a7795-h3ulcb-4x2g-vbm.dtb \ " + +# The meta-rcar layer actives by default the configuration MTD_RENESAS_RPC_HYPERFLASH +# in the kernel. We need to set DISABLE_RPC_ACCESS to deactivate it. +DISABLE_RPC_ACCESS ?= "1" diff --git a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-navigation/gpsd/gpsd-kingfisher-conf_1.0.bb b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-navigation/gpsd/gpsd-machine-conf_1.0.bbappend index 2c4192b98..51604706c 100644 --- a/meta-agl-bsp/meta-rcar-gen3-adas/recipes-navigation/gpsd/gpsd-kingfisher-conf_1.0.bb +++ b/meta-agl-bsp/meta-rcar-gen3-adas/recipes-navigation/gpsd/gpsd-machine-conf_1.0.bbappend @@ -1,27 +1,23 @@ -SUMMARY = "King fisher specific gpsd config" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/BSD;md5=3775480a712fc46a69647678acb234cb" +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" -SRC_URI = " \ - file://gpsd.kingfisher \ -" +SRC_URI = "file://gpsd.kingfisher" inherit update-alternatives -RPROVIDES_${PN} += "virtual/gpsd-conf" - -ALTERNATIVE_${PN} = "gpsd-defaults" -ALTERNATIVE_LINK_NAME[gpsd-defaults] = "${sysconfdir}/default/gpsd" -ALTERNATIVE_TARGET[gpsd-defaults] = "${sysconfdir}/default/gpsd.kingfisher" -ALTERNATIVE_PRIORITY[gpsd-defaults] = "20" - -COMPATIBLE_MACHINE = "ulcb" -PACKAGE_ARCH = "${MACHINE_ARCH}" +do_configure[noexec] = "1" +do_compile[noexec] = "1" do_install() { install -d ${D}/${sysconfdir}/default install -m 0644 ${WORKDIR}/gpsd.kingfisher ${D}/${sysconfdir}/default/gpsd.kingfisher } -FILES_${PN} = "${sysconfdir}/default/gpsd.kingfisher" -CONFFILES_${PN} = "${sysconfdir}/default/gpsd.kingfisher" +COMPATIBLE_MACHINE = "ulcb" +PACKAGE_ARCH = "${MACHINE_ARCH}" + +CONFFILES:${PN} = "${sysconfdir}/default/gpsd.kingfisher" + +ALTERNATIVE:${PN} = "gpsd-defaults" +ALTERNATIVE_LINK_NAME[gpsd-defaults] = "${sysconfdir}/default/gpsd" +ALTERNATIVE_TARGET[gpsd-defaults] = "${sysconfdir}/default/gpsd.kingfisher" +ALTERNATIVE_PRIORITY[gpsd-defaults] = "20" diff --git a/meta-agl-bsp/meta-rcar-gen3/include/checksum_control_files.inc b/meta-agl-bsp/meta-rcar-gen3/include/checksum_control_files.inc index 9d878f294..6c9f49c3b 100644 --- a/meta-agl-bsp/meta-rcar-gen3/include/checksum_control_files.inc +++ b/meta-agl-bsp/meta-rcar-gen3/include/checksum_control_files.inc @@ -1,15 +1,16 @@ -CTL_CHECKSUM[r8a77951_linux_gsx_binaries_gles.tar.bz2]="031ba6c79de765e830c9cdd73e4044ab" -CTL_CHECKSUM[r8a77960_linux_gsx_binaries_gles.tar.bz2]="827394b6b4a187e4f7966755b97f217c" -CTL_CHECKSUM[GSX_KM_H3.tar.bz2]="9d5fa7d94414716aa5d1de4240f22939" -CTL_CHECKSUM[GSX_KM_M3.tar.bz2]="156ba5c8c7fbd2b8a2a95b3b86c93efb" -CTL_CHECKSUM[RCG3VUDRL4101ZDO.tar.bz2]="43a8921d5c2a257ccc0bf491c737f5be" -CTL_CHECKSUM[RTM0AC0000ADAACMZ1SL41C.tar.gz]="4e0bb98feeb1e309a2ec12c201bc16aa" -CTL_CHECKSUM[RTM0AC0000AEAACMZ1SL41C.tar.gz]="414c5fc22bcf848b5a6eee3812874611" -CTL_CHECKSUM[RTM0AC0000XAAACD30SL41C.tar.gz]="e44c10bd24372fc70013c2498c6869d3" -CTL_CHECKSUM[RTM0AC0000XAAACE30SL41C.tar.gz]="1611375916d9e17cff19c34b83300c83" -CTL_CHECKSUM[RTM0AC0000XACMND30SL41C.tar.gz]="6229f43b2260d194f663bceed16ca273" -CTL_CHECKSUM[RTM0AC0000XCMCTL30SL41C.tar.bz2]="516f86033669537a162220c773cb972d" -CTL_CHECKSUM[RTM0AC0000XV264D30SL41C.tar.bz2]="b9e4e0d6dc65f65d21079b88824d6de3" -CTL_CHECKSUM[RTM0AC0000XV264E30SL41C.tar.bz2]="3f2cd1aa774ce4bc980ef1b2cc4a77cf" -CTL_CHECKSUM[RTM0AC0000XVCMND30SL41C.tar.bz2]="e484652d06f1383a3543fd9188316a8a" -CTL_CHECKSUM[RTM0AC0000XVCMNE30SL41C.tar.bz2]="bc419ea899e0d93c226cb637800e8028" +CTL_CHECKSUM[r8a77951_linux_gsx_binaries_gles.tar.bz2]="06cc04c52f56048dbc00ead14447cb35" +CTL_CHECKSUM[r8a77960_linux_gsx_binaries_gles.tar.bz2]="a24be039f1c294035416dbd77fa10f4a" +CTL_CHECKSUM[GSX_KM_H3.tar.bz2]="563ff3f5d5dc8b40d19d0b6e7484bf22" +CTL_CHECKSUM[GSX_KM_M3.tar.bz2]="7cbbffb874b30e36cc2c7751573e468b" +CTL_CHECKSUM[RTM8RC0000ZMX0DQ00JFL3E.tar.bz2]="2ee662978a45fc7c7cf2cef0e4bf1e33" +CTL_CHECKSUM[RTM8RC0000ZAD1LQ00JPL3E.tar.gz]="f59cb979a030a3545a6c0b2337e8ea0e" +CTL_CHECKSUM[RTM8RC0000ZAE1LQ00JPL3E.tar.gz]="7bdfac397034e8e13425cd83e3bd5090" +CTL_CHECKSUM[RTM8RC0000ZMD0LQ00JPL3E.tar.bz2]="8d774178a3fe5ddac0cc5bd16bc58e3e" +CTL_CHECKSUM[RTM8RC0000ZMD1LQ00JPL3E.tar.bz2]="3f30a263a038d148b2af445bc09dc4b7" +CTL_CHECKSUM[RTM8RC0000ZME0LQ00JPL3E.tar.bz2]="8f83d1c3947904e48316faa058c196c7" +CTL_CHECKSUM[RTM8RC0000ZME1LQ00JPL3E.tar.bz2]="89d4ce58062ef956fa2b8ef1bd8a66f3" +CTL_CHECKSUM[RTM8RC0000ZMX0LQ00JPL3E.tar.bz2]="035361ad4715bbb491ee23d80bc50e3a" +CTL_CHECKSUM[RTM8RC0000ZND1LQ00JPL3E.tar.gz]="b56fa5404bdee152b557869390783eb4" +CTL_CHECKSUM[RTM8RC0000ZNE1LQ00JPL3E.tar.gz]="63880c583eb132b868a074db3d39c8ee" +CTL_CHECKSUM[RTM8RC0000ZNX0LQ00JPL3E.tar.gz]="53ff1eb5de6c5345bd24e8e3605eb82d" + diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/alsa-state/alsa-state.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/alsa-state/alsa-state.bbappend index 44c2a2b99..86ab018da 100644 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/alsa-state/alsa-state.bbappend +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/alsa-state/alsa-state.bbappend @@ -1,4 +1,4 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" COMPATIBLE_MACHINE = "(salvator-x|m3ulcb|h3ulcb|ebisu)" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/alsa-state/alsa-state/asound.state b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/alsa-state/alsa-state/asound.state index ef010821d..5779dee36 100644 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/alsa-state/alsa-state/asound.state +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/alsa-state/alsa-state/asound.state @@ -1,4 +1,4 @@ -state.rcarsound { +state.ak4613 { control.1 { iface MIXER name 'Digital Playback Volume1' diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bbappend index cdfb3cbe0..f4d086938 100644 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bbappend +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_git.bbappend @@ -1,5 +1,9 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +# Boot Normal World in EL2: this define configures ATF (SPSR register) to boot +# BL33 in EL2. +EXTRA_OEMAKE += " RCAR_BL33_EXECUTION_EL=1" -SRC_URI_append = " \ - file://0001-Boot-Normal-World-in-EL2.patch \ -" +do_ipl_opt_deploy:prepend () { + # Work around bug in BSP recipe, it can fail if nothing else has + # happened to run first and create the directory. + install -d ${DEPLOY_DIR_IMAGE} +} diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/arm-trusted-firmware/files/0001-Boot-Normal-World-in-EL2.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/arm-trusted-firmware/files/0001-Boot-Normal-World-in-EL2.patch deleted file mode 100644 index 6ce9c0f9d..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/arm-trusted-firmware/files/0001-Boot-Normal-World-in-EL2.patch +++ /dev/null @@ -1,28 +0,0 @@ -From c97f38b09f8b7d9c57a6e6f500c6ba8f7abd9914 Mon Sep 17 00:00:00 2001 -From: Michele Paolino <m.paolino@virtualopensystems.com> -Date: Fri, 19 May 2017 14:50:55 +0200 -Subject: [PATCH] Boot Normal World in EL2 - -This patch configures ATF (SPSR register) to boot BL33 in EL2. - -Signed-off-by: Michele Paolino <m.paolino@virtualopensystems.com> ---- - plat/renesas/rcar/platform.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/plat/renesas/rcar/platform.mk b/plat/renesas/rcar/platform.mk -index ef7bf0f..06bc592 100644 ---- a/plat/renesas/rcar/platform.mk -+++ b/plat/renesas/rcar/platform.mk -@@ -186,7 +186,7 @@ $(eval $(call add_define,RCAR_DRAM_SPLIT)) - - # Process RCAR_BL33_EXECUTION_EL flag - ifndef RCAR_BL33_EXECUTION_EL --RCAR_BL33_EXECUTION_EL := 0 -+RCAR_BL33_EXECUTION_EL := 1 - endif - $(eval $(call add_define,RCAR_BL33_EXECUTION_EL)) - --- -2.7.4 - diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/bootfiles/files/uEnv-ota-h3ulcb.txt b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/bootfiles/files/uEnv-ota-h3ulcb.txt index a08cc7d9c..9cc3eb9d2 100644 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/bootfiles/files/uEnv-ota-h3ulcb.txt +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/bootfiles/files/uEnv-ota-h3ulcb.txt @@ -12,7 +12,7 @@ rootmmc=0:2 booteload_sd=ext4load mmc ${rootmmc} ${bootkaddr} boot/loader/uEnv.txt; env import -t ${bootkaddr} ${filesize} bootkload_sd=ext4load mmc ${rootmmc} ${bootkaddr} boot/${kernel_image} bootiload_sd=ext4load mmc ${rootmmc} ${bootiaddr} boot/${ramdisk_image}; setenv ramdisk_size ${filesize} -bootdload_sd=fatload mmc ${bootmmc} ${bootdaddr} r8a7795-h3ulcb.dtb +bootdload_sd=fatload mmc ${bootmmc} ${bootdaddr} r8a77951-ulcb.dtb bootcmd=run booteload_sd; setenv bootargs ${bootargs} ${bootargs_console} ${bootargs_root} ${bootargs_extra}; run bootkload_sd; run bootiload_sd; run bootdload_sd; booti ${bootkaddr} ${bootiaddr}:${ramdisk_size} ${bootdaddr} diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/bootfiles/files/uEnv-ota-m3ulcb.txt b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/bootfiles/files/uEnv-ota-m3ulcb.txt index 979014a28..145f82eae 100644 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/bootfiles/files/uEnv-ota-m3ulcb.txt +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/bootfiles/files/uEnv-ota-m3ulcb.txt @@ -12,7 +12,7 @@ rootmmc=0:2 booteload_sd=ext4load mmc ${rootmmc} ${bootkaddr} boot/loader/uEnv.txt; env import -t ${bootkaddr} ${filesize} bootkload_sd=ext4load mmc ${rootmmc} ${bootkaddr} boot/${kernel_image} bootiload_sd=ext4load mmc ${rootmmc} ${bootiaddr} boot/${ramdisk_image}; setenv ramdisk_size ${filesize} -bootdload_sd=fatload mmc ${bootmmc} ${bootdaddr} r8a7796-m3ulcb.dtb +bootdload_sd=fatload mmc ${bootmmc} ${bootdaddr} r8a77960-ulcb.dtb bootcmd=run booteload_sd; setenv bootargs ${bootargs} ${bootargs_console} ${bootargs_root} ${bootargs_extra}; run bootkload_sd; run bootiload_sd; run bootdload_sd; booti ${bootkaddr} ${bootiaddr}:${ramdisk_size} ${bootdaddr} 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 index 4007e7f96..d46f4d885 100644 --- 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 @@ -8,15 +8,15 @@ 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" +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() { +do_deploy:append:sota() { install -m 0755 ${WORKDIR}/uEnv-ota-${BOARD_NAME}.txt ${DEPLOYDIR}/${PN}/uEnv.txt } diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-examples_git.bb b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-examples_git.bb index 440fe8fdd..7ff677c80 100644 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-examples_git.bb +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-examples_git.bb @@ -1,6 +1,6 @@ SUMMARY = "OP-TEE examples" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=cd95ab417e23b94f381dafc453d70c30" @@ -13,7 +13,7 @@ PV = "3.6.0+git${SRCPV}" SRCREV = "292da2fd8db0176e0e96989268c63ef9ab910a6c" SRC_URI = " \ - git://github.com/linaro-swg/optee_examples;branch=master;name=master \ + git://github.com/linaro-swg/optee_examples;branch=master;name=master;protocol=https \ file://0001-secure_storage-ta-Add-a-missing-include-file.patch \ " @@ -26,7 +26,7 @@ CFLAGS += "-Wno-extra -Wno-error=format" TARGET_CFLAGS += "-Wno-extra -Wno-error=format" TARGET_CC_ARCH += "${LDFLAGS}" -INSANE_SKIP_${PN} = "ldflags" +INSANE_SKIP:${PN} = "ldflags" TA_DEV_KIT_DIR = "${STAGING_DIR_TARGET}/usr/share/optee/export-ta_arm64" @@ -58,4 +58,4 @@ do_install () { cp ${S}/hello_world/ta/include/* ${D}${includedir} } -FILES_${PN} += "${nonarch_base_libdir}/optee_armtz/" +FILES:${PN} += "${nonarch_base_libdir}/optee_armtz/" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os_git.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os_git.bbappend index 77eeab9f3..52a68e174 100644 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os_git.bbappend +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-os_git.bbappend @@ -3,5 +3,5 @@ do_install() { cp -r ${S}/out/arm-plat-${PLATFORM}/export-ta_arm64 ${D}/usr/share/optee } -FILES_${PN}-staticdev += "${datadir}/optee/export-ta_arm64/lib/*.a" -FILES_${PN}-dev += "${datadir}/optee/export-ta_arm64" +FILES:${PN}-staticdev += "${datadir}/optee/export-ta_arm64/lib/*.a" +FILES:${PN}-dev += "${datadir}/optee/export-ta_arm64" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-test_git.bb b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-test_git.bb index 80a22b89f..b66f0676e 100644 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-test_git.bb +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-test_git.bb @@ -1,6 +1,6 @@ DESCRIPTION = "OP-TEE TEST" -LICENSE = "GPLv2 & BSD-2-Clause" +LICENSE = "GPL-2.0-only & BSD-2-Clause" LIC_FILES_CHKSUM = "file://${S}/host/LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" PACKAGE_ARCH = "${MACHINE_ARCH}" @@ -12,7 +12,7 @@ PV = "3.1.0+git${SRCPV}" SRCREV = "45218eb59b006ad20cc7610904f291dd85157a43" SRC_URI = " \ - git://github.com/OP-TEE/optee_test.git;branch=master;name=master \ + git://github.com/OP-TEE/optee_test.git;branch=master;name=master;protocol=https \ file://optee_xtest_fix.diff \ " @@ -34,7 +34,7 @@ CFLAGS += "-Wno-extra -Wno-error=stringop-overflow -Wno-error=array-bounds" TARGET_CFLAGS += "-Wno-extra -Wno-error=stringop-overflow -Wno-error=array-bounds" TARGET_CC_ARCH += "${LDFLAGS}" -INSANE_SKIP_${PN} = "ldflags" +INSANE_SKIP:${PN} = "ldflags" S = "${WORKDIR}/git" EXTRA_OEMAKE = "-e MAKEFLAGS=" @@ -52,4 +52,4 @@ do_install () { install -D -p -m0444 ${S}/out/ta/*/*.ta ${D}${nonarch_base_libdir}/optee_armtz/ } -FILES_${PN} += "${nonarch_base_libdir}/optee_armtz/" +FILES:${PN} += "${nonarch_base_libdir}/optee_armtz/" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-user-app-template_git.bb b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-user-app-template_git.bb index d66060b05..2b93af710 100644 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-user-app-template_git.bb +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/optee/optee-user-app-template_git.bb @@ -1,6 +1,6 @@ SUMMARY = "OP-TEE user_app_template" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=cd95ab417e23b94f381dafc453d70c30" PACKAGE_ARCH = "${MACHINE_ARCH}" @@ -12,7 +12,7 @@ PV = "0.1+git${SRCPV}" SRCREV = "0.1" SRC_URI = " \ - git://github.com/iotbzh/optee_user_app_template;branch=master \ + git://github.com/iotbzh/optee_user_app_template;branch=master;protocol=https \ " COMPATIBLE_MACHINE = "(salvator-x|h3ulcb|m3ulcb|m3nulcb|ebisu)" @@ -24,7 +24,7 @@ CFLAGS += "-Wno-extra -Wno-error=format" TARGET_CFLAGS += "-Wno-extra -Wno-error=format" TARGET_CC_ARCH += "${LDFLAGS}" -INSANE_SKIP_${PN} = "ldflags" +INSANE_SKIP:${PN} = "ldflags" TA_DEV_KIT_DIR = "${STAGING_DIR_TARGET}/usr/share/optee/export-ta_arm64" @@ -54,4 +54,4 @@ do_install () { install -D -p -m0444 ${S}/out/ta/* ${D}${nonarch_base_libdir}/optee_armtz } -FILES_${PN} += "${nonarch_base_libdir}/optee_armtz/" +FILES:${PN} += "${nonarch_base_libdir}/optee_armtz/" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module.bbappend index 707778cde..8f2d47adc 100644 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module.bbappend +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module.bbappend @@ -1,6 +1,3 @@ require checksum_control.inc -do_install_append(){ - sed -i 's/MODE="0660", OWNER/MODE="0660", SECLABEL{smack}="*", OWNER/g' ${D}${sysconfdir}/udev/rules.d/72-pvr-seat.rules - sed -i 's/GROUP="video"/GROUP="display"/g' ${D}${sysconfdir}/udev/rules.d/72-pvr-seat.rules -} +RDEPENDS:${PN}:append = " wayland-wsegl" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/virtual-gles-user-module/virtual-gles-user-module.bb b/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/virtual-gles-user-module/virtual-gles-user-module.bb index a477e1c3c..76d3ea88f 100644 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/virtual-gles-user-module/virtual-gles-user-module.bb +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/virtual-gles-user-module/virtual-gles-user-module.bb @@ -1,6 +1,6 @@ DESCRIPTION = "Virtual gles-module" -LICENSE="GPLv2" +LICENSE="GPL-2.0-only" DEPENDS = "gles-user-module wayland-kms libgbm" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/wayland/wayland-wsegl.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/wayland/wayland-wsegl.bbappend new file mode 100644 index 000000000..9a0eb73a3 --- /dev/null +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/wayland/wayland-wsegl.bbappend @@ -0,0 +1 @@ +DEPENDS:append = " wayland-protocols" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/wayland/weston-ini-conf.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/wayland/weston-ini-conf.bbappend index 44615c331..4a76dda04 100644 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/wayland/weston-ini-conf.bbappend +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-graphics/wayland/weston-ini-conf.bbappend @@ -1,12 +1,15 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +FILESEXTRAPATHS:prepend:rcar-gen3 := "${THISDIR}/${PN}:" -SRC_URI_append_ulcb = " file://kingfisher_output.cfg" -SRC_URI_append_ebisu = " file://ebisu_output.cfg" -SRC_URI_append_salvator-x = " file://salvator-x_output.cfg" +SRC_URI:append:rcar-gen3 = " \ + file://kingfisher_output.cfg \ + file://ebisu_output.cfg \ + file://salvator-x_output.cfg \ +" -do_configure() { - echo repaint-window=34 >> ${WORKDIR}/core.cfg +WESTON_FRAGMENTS:append:ulcb = " kingfisher_output" +WESTON_FRAGMENTS:append:ebisu = " ebisu_output" +WESTON_FRAGMENTS:append:salvator-x = " salvator-x_output" - echo transition-duration=300 >> ${WORKDIR}/ivishell.cfg - echo cursor-theme=default >> ${WORKDIR}/ivishell.cfg +do_configure:append:rcar-gen3() { + echo repaint-window=34 >> ${WORKDIR}/core.cfg } diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles.bbappend index 7d28d912a..b8882ae49 100644 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles.bbappend +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles.bbappend @@ -1,6 +1,6 @@ require checksum_control.inc -module_do_compile_prepend() { +module_do_compile:prepend() { cd ${S}/build/linux/config/compilers - cp aarch64-poky-linux.mk ${TARGET_SYS}.mk + cp aarch64-linux-gnu.mk ${TARGET_SYS}.mk } diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngr.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngr.bbappend index 5262a9c5d..98b8e92c3 100644 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngr.bbappend +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngr.bbappend @@ -1,2 +1,2 @@ -KERNEL_MODULE_AUTOLOAD_append = " mmngr" +KERNEL_MODULE_AUTOLOAD:append = " mmngr" KERNEL_MODULE_PACKAGE_SUFFIX = "" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf.bbappend index 6b935b09e..fbff56fff 100644 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf.bbappend +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-mmngr/kernel-module-mmngrbuf.bbappend @@ -1,2 +1,2 @@ -KERNEL_MODULE_AUTOLOAD_append = " mmngrbuf" +KERNEL_MODULE_AUTOLOAD:append = " mmngrbuf" KERNEL_MODULE_PACKAGE_SUFFIX = "" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-vspmif/kernel-module-vspm-if.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-vspmif/kernel-module-vspm-if.bbappend new file mode 100644 index 000000000..5efe01045 --- /dev/null +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-vspmif/kernel-module-vspm-if.bbappend @@ -0,0 +1,2 @@ +KERNEL_MODULE_AUTOLOAD:append = " vspm_if" +KERNEL_MODULE_PACKAGE_SUFFIX = "" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-vspmif/kernel-module-vspmif.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-vspmif/kernel-module-vspmif.bbappend deleted file mode 100644 index 379797248..000000000 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/kernel-module-vspmif/kernel-module-vspmif.bbappend +++ /dev/null @@ -1,2 +0,0 @@ -KERNEL_MODULE_AUTOLOAD_append = " vspm_if" -KERNEL_MODULE_PACKAGE_SUFFIX = "" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/0004-ADSP-enable-and-add-sound-hardware-abstraction.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/0004-ADSP-enable-and-add-sound-hardware-abstraction.patch index e8ea125e9..9c7f01b26 100644 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/0004-ADSP-enable-and-add-sound-hardware-abstraction.patch +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/0004-ADSP-enable-and-add-sound-hardware-abstraction.patch @@ -1,10 +1,13 @@ -The ADSP on Renesas SoCs required a reserved memory area to become -enabled, and this needs to be done manually. +From 274657edb779d77ad0fe5ccb52b51634d075adf8 Mon Sep 17 00:00:00 2001 +From: invalid_git config <unknown@unknown> +Date: Wed, 6 Oct 2021 14:42:47 +0000 +Subject: [PATCH 2/2] The ADSP on Renesas SoCs required a reserved memory area + to become enabled, and this needs to be done manually. This patch adds sound hardware abstraction information for the m3ulcb and m3ulcb-kf (kingfisher) device trees. This is helpful on-board the ADSP for dynamically determining sound hardware at runtime, allowing -single binaries to be used between the two boards. +single binaries to be used between the two boards. Future work will incorporate the h3ulcb and Salvator boards into the abstraction. @@ -12,11 +15,15 @@ abstraction. Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh> Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au> --- -diff --git a/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb.dts b/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb.dts -index 1cd64c1b3b31..71e59da3528d 100644 ---- a/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb.dts -+++ b/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb.dts -@@ -42,11 +42,18 @@ + arch/arm64/boot/dts/renesas/r8a77960-ulcb.dts | 45 ++++++++++++++++++- + arch/arm64/boot/dts/renesas/r8a77961-ulcb.dts | 45 ++++++++++++++++++- + 2 files changed, 88 insertions(+), 2 deletions(-) + +diff --git a/arch/arm64/boot/dts/renesas/r8a77960-ulcb.dts b/arch/arm64/boot/dts/renesas/r8a77960-ulcb.dts +index fbc8c9af6e52..df3bd589d9bb 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77960-ulcb.dts ++++ b/arch/arm64/boot/dts/renesas/r8a77960-ulcb.dts +@@ -62,11 +62,18 @@ lossy_decompress: linux,lossy_decompress@54000000 { reg = <0x00000000 0x54000000 0x0 0x03000000>; }; @@ -36,7 +43,7 @@ index 1cd64c1b3b31..71e59da3528d 100644 linux,cma-default; }; -@@ -110,6 +117,42 @@ +@@ -126,6 +133,42 @@ &du { "dclkin.0", "dclkin.1", "dclkin.2"; }; @@ -79,3 +86,73 @@ index 1cd64c1b3b31..71e59da3528d 100644 &vspb { status = "okay"; }; +diff --git a/arch/arm64/boot/dts/renesas/r8a77961-ulcb.dts b/arch/arm64/boot/dts/renesas/r8a77961-ulcb.dts +index e57dd7bb43f7..f583cc6c18bf 100644 +--- a/arch/arm64/boot/dts/renesas/r8a77961-ulcb.dts ++++ b/arch/arm64/boot/dts/renesas/r8a77961-ulcb.dts +@@ -41,11 +41,18 @@ lossy_decompress: linux,lossy_decompress@54000000 { + reg = <0x00000000 0x54000000 0x0 0x03000000>; + }; + ++ /* For Audio DSP */ ++ adsp_reserved: linux,adsp { ++ compatible = "shared-dma-pool"; ++ reusable; ++ reg = <0x00000000 0x57000000 0x0 0x01000000>; ++ }; ++ + /* global autoconfigured region for contiguous allocations */ + linux,cma@57000000 { + compatible = "shared-dma-pool"; + reusable; +- reg = <0x00000000 0x57000000 0x0 0x19000000>; ++ reg = <0x00000000 0x58000000 0x0 0x18000000>; + linux,cma-default; + }; + +@@ -89,6 +96,42 @@ &du { + "dclkin.0", "dclkin.1", "dclkin.2"; + }; + ++&adsp { ++ status = "okay"; ++ clock-frequency = <12288000 11289600>; ++ audio-clocks = <22579200 24576000>; ++ memory-region = <&adsp_reserved>; ++ ++ /* ADSP playback setting for ak4613 */ ++ adsp_playback0: adsp,playback { ++ mode = "i2s"; ++ clock-mode = "master"; ++ bus-width = <16>; ++ ssi = <0>; ++ bus-if = <0>; ++ channels = <2>; ++ pin-share-ssi = <1>; ++ }; ++ ++ /* ADSP capture setting for ak4613 */ ++ adsp_capture0: adsp,capture { ++ mode = "i2s"; ++ clock-mode = "slave"; ++ bus-width = <16>; ++ ssi = <1>; ++ bus-if = <0>; ++ channels = <2>; ++ pin-share-ssi = <0>; ++ }; ++ ++ adsp,ports { ++ port@0 { ++ playback = <&adsp_playback0>; ++ capture = <&adsp_capture0>; ++ }; ++ }; ++}; ++ + &vspb { + status = "okay"; + }; +-- +2.31.1 + diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/Set_GOV_PERFORMANCE.cfg b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/Set_GOV_PERFORMANCE.cfg new file mode 100644 index 000000000..b020174e8 --- /dev/null +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/Set_GOV_PERFORMANCE.cfg @@ -0,0 +1,2 @@ +CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/r8a7796-m3ulcb-xen.dts b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/r8a77960-ulcb-xen.dts index 7940b1027..6947a62c2 100644 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/r8a7796-m3ulcb-xen.dts +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/r8a77960-ulcb-xen.dts @@ -7,7 +7,7 @@ */ /dts-v1/; -#include "r8a7796.dtsi" +#include "r8a77960.dtsi" #include "ulcb.dtsi" / { diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/vivid.cfg b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/vivid.cfg new file mode 100644 index 000000000..3c3574346 --- /dev/null +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/files/vivid.cfg @@ -0,0 +1,6 @@ +CONFIG_V4L_TEST_DRIVERS=y +CONFIG_MEDIA_CONTROLLER_REQUEST_API=y +CONFIG_MEDIA_TEST_SUPPORT=y +CONFIG_VIDEO_V4L2_TPG=m +CONFIG_VIDEO_VIVID=m +CONFIG_VIDEO_VIVID_MAX_DEVS=64 diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_%.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_%.bbappend index 12054df86..78996bf0a 100644 --- a/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_%.bbappend +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-kernel/linux/linux-renesas_%.bbappend @@ -1,22 +1,24 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" -require recipes-kernel/linux/linux-agl.inc - -SRC_URI_append = " file://namespace_fix.cfg \ - " +require recipes-kernel/linux/linux-yocto-agl.inc # Add ADSP patch to enable and add sound hardware abstraction -SRC_URI_append = " \ +SRC_URI:append = " \ file://0004-ADSP-enable-and-add-sound-hardware-abstraction.patch \ " +AGL_KCONFIG_FRAGMENTS += "namespace_fix.cfg" +AGL_KCONFIG_FRAGMENTS += "Set_GOV_PERFORMANCE.cfg" +AGL_KCONFIG_FRAGMENTS += "vivid.cfg" + # For Xen -SRC_URI_append = " \ - ${@bb.utils.contains('AGL_XEN_WANTED','1','file://xen-be.cfg','',d)} \ +AGL_KCONFIG_FRAGMENTS += " \ + ${@bb.utils.contains('AGL_XEN_WANTED','1','xen-be.cfg','',d)} \ " -SRC_URI_append_m3ulcb = " \ - ${@bb.utils.contains('AGL_XEN_WANTED','1','file://r8a7796-m3ulcb-xen.dts;subdir=git/arch/${ARCH}/boot/dts/renesas','',d)} \ + +SRC_URI:append:m3ulcb = " \ + ${@bb.utils.contains('AGL_XEN_WANTED','1','file://r8a77960-ulcb-xen.dts;subdir=git/arch/${ARCH}/boot/dts/renesas','',d)} \ " -KERNEL_DEVICETREE_append_m3ulcb = " \ - ${@bb.utils.contains('AGL_XEN_WANTED','1','renesas/r8a7796-m3ulcb-xen.dtb','',d)} \ +KERNEL_DEVICETREE:append:m3ulcb = " \ + ${@bb.utils.contains('AGL_XEN_WANTED','1','renesas/r8a77960-ulcb-xen.dtb','',d)} \ " 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 new file mode 100644 index 000000000..eee123cf4 --- /dev/null +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.22.%.bbappend @@ -0,0 +1,5 @@ +# 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/mmngr-module/mmngr-user-module.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-multimedia/mmngr-module/mmngr-user-module.bbappend new file mode 100644 index 000000000..9d3f5c670 --- /dev/null +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-multimedia/mmngr-module/mmngr-user-module.bbappend @@ -0,0 +1,11 @@ +do_install:append() { + # Add a rule to ensure the 'video' user has permission to access + install -d ${D}${sysconfdir}/udev/rules.d + cat >${D}${sysconfdir}/udev/rules.d/56-rgnmm.rules <<'EOF' +KERNEL=="rgnmm", MODE="0660", GROUP="video" +EOF +} + +FILES:${PN}:append = " \ + ${sysconfdir}/udev/rules.d/*.rules \ +" diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-multimedia/mmngr-module/mmngrbuf-user-module.bbappend b/meta-agl-bsp/meta-rcar-gen3/recipes-multimedia/mmngr-module/mmngrbuf-user-module.bbappend new file mode 100644 index 000000000..640e52651 --- /dev/null +++ b/meta-agl-bsp/meta-rcar-gen3/recipes-multimedia/mmngr-module/mmngrbuf-user-module.bbappend @@ -0,0 +1,11 @@ +do_install:append() { + # Add a rule to ensure the 'video' group has permission to access + install -d ${D}${sysconfdir}/udev/rules.d + cat >${D}${sysconfdir}/udev/rules.d/56-rgnmmbuf.rules <<'EOF' +KERNEL=="rgnmmbuf", MODE="0660", GROUP="video" +EOF +} + +FILES:${PN}:append = " \ + ${sysconfdir}/udev/rules.d/*.rules \ +" diff --git a/meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh b/meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh index d7c609e3a..3e8a2f242 100644 --- a/meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh +++ b/meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh @@ -1,7 +1,7 @@ #!/bin/bash -ZIP_1="R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-weston8-20200923.zip" -ZIP_2="R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-weston8-20200923.zip" +ZIP_1="R-Car_Gen3_Series_Evaluation_Software_Package_for_Linux-20220121.zip" +ZIP_2="R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-20220121.zip" COPY_SCRIPT="$METADIR/bsp/meta-renesas/meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh" @@ -63,7 +63,7 @@ function copy_mm_packages() { error "ERROR: FILES \""+$DOWNLOAD_DIR/$ZIP_2+"\" NOT EXTRACTING CORRECTLY" log "The graphics and multimedia acceleration packages for " log "the R-Car Gen3 board BSP can be downloaded from:" - log "<https://www.renesas.com/us/en/solutions/automotive/rcar-download/rcar-demoboard-2.html>" + log "<https://www.renesas.com/us/en/application/automotive/r-car-h3-m3-documents-software>" log error "These 2 files from there should be stored in your" error "'$DOWNLOAD_DIR' directory." @@ -81,3 +81,4 @@ function copy_mm_packages() { return 1 fi } + diff --git a/meta-agl-bsp/meta-sancloud/recipes-graphics/wayland/weston-ini-conf.bbappend b/meta-agl-bsp/meta-sancloud/recipes-graphics/wayland/weston-ini-conf.bbappend index f2a27ba3c..097d8646c 100644 --- a/meta-agl-bsp/meta-sancloud/recipes-graphics/wayland/weston-ini-conf.bbappend +++ b/meta-agl-bsp/meta-sancloud/recipes-graphics/wayland/weston-ini-conf.bbappend @@ -1,3 +1,3 @@ -do_configure_append_bbe() { +do_configure:append:bbe() { echo 'gbm-format=rgb565' >> ${WORKDIR}/core.cfg } diff --git a/meta-agl-bsp/meta-sancloud/recipes-kernel/linux/linux-bbe/disable-relay.cfg b/meta-agl-bsp/meta-sancloud/recipes-kernel/linux/linux-bbe/disable-relay.cfg new file mode 100644 index 000000000..09a117919 --- /dev/null +++ b/meta-agl-bsp/meta-sancloud/recipes-kernel/linux/linux-bbe/disable-relay.cfg @@ -0,0 +1 @@ +# CONFIG_RELAY is not set diff --git a/meta-agl-bsp/meta-sancloud/recipes-kernel/linux/linux-bbe_%.bbappend b/meta-agl-bsp/meta-sancloud/recipes-kernel/linux/linux-bbe_%.bbappend index 6c15b1661..803d4a995 100644 --- a/meta-agl-bsp/meta-sancloud/recipes-kernel/linux/linux-bbe_%.bbappend +++ b/meta-agl-bsp/meta-sancloud/recipes-kernel/linux/linux-bbe_%.bbappend @@ -1,5 +1,6 @@ require recipes-kernel/linux/linux-agl.inc -FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" -SRC_URI += "file://cma-256.cfg" +AGL_KCONFIG_FRAGMENTS += "cma-256.cfg" +AGL_KCONFIG_FRAGMENTS += "disable-relay.cfg" 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 new file mode 100644 index 000000000..7fce516f0 --- /dev/null +++ b/meta-agl-bsp/meta-sifive/recipes-bsp/u-boot/files/0001-WIP-Make-BSP-work-under-YP-kirkstone.patch @@ -0,0 +1,46 @@ +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 new file mode 100644 index 000000000..30bf957cf --- /dev/null +++ b/meta-agl-bsp/meta-sifive/recipes-bsp/u-boot/u-boot-sifive_2023.07.02.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" + +SRC_URI:append = " file://0001-WIP-Make-BSP-work-under-YP-kirkstone.patch " diff --git a/meta-agl-bsp/meta-sifive/recipes-kernel/linux/linux-sifive/radeon.cfg b/meta-agl-bsp/meta-sifive/recipes-kernel/linux/linux-sifive/radeon.cfg new file mode 100644 index 000000000..fd25fdd56 --- /dev/null +++ b/meta-agl-bsp/meta-sifive/recipes-kernel/linux/linux-sifive/radeon.cfg @@ -0,0 +1,19 @@ +CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS=y +CONFIG_MOUSE_PS2_SMBUS=y +CONFIG_I2C=y +CONFIG_I2C_ALGOBIT=y +CONFIG_DRM_BUDDY=m +CONFIG_DRM_SCHED=m +CONFIG_DRM_AMDGPU=m +CONFIG_DRM_AMD_DC=y +CONFIG_FB_DDC=y +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +CONFIG_FB_BACKLIGHT=y +CONFIG_FB_MODE_HELPERS=y +CONFIG_FB_RADEON=y +CONFIG_FB_RADEON_I2C=y +CONFIG_FB_RADEON_BACKLIGHT=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_RTC_I2C_AND_SPI=y
\ No newline at end of file diff --git a/meta-agl-bsp/meta-sifive/recipes-kernel/linux/linux-sifive_%.bbappend b/meta-agl-bsp/meta-sifive/recipes-kernel/linux/linux-sifive_%.bbappend new file mode 100644 index 000000000..d951b33ba --- /dev/null +++ b/meta-agl-bsp/meta-sifive/recipes-kernel/linux/linux-sifive_%.bbappend @@ -0,0 +1,6 @@ +require recipes-kernel/linux/linux-agl.inc + +FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" + +# enable AMDgpu +AGL_KCONFIG_FRAGMENTS += "radeon.cfg" diff --git a/meta-agl-bsp/meta-synopsys/recipes-kernel/linux-yocto_%.bbappend b/meta-agl-bsp/meta-synopsys/recipes-kernel/linux-yocto_%.bbappend deleted file mode 100644 index 88ac94b15..000000000 --- a/meta-agl-bsp/meta-synopsys/recipes-kernel/linux-yocto_%.bbappend +++ /dev/null @@ -1 +0,0 @@ -require recipes-kernel/linux/linux-agl.inc diff --git a/meta-agl-bsp/meta-ti/.gitkeep b/meta-agl-bsp/meta-ti-bsp/.gitkeep index e69de29bb..e69de29bb 100644 --- a/meta-agl-bsp/meta-ti/.gitkeep +++ b/meta-agl-bsp/meta-ti-bsp/.gitkeep diff --git a/meta-agl-bsp/meta-ti/recipes-bsp/cm3-pm-firmware/amx3-cm3_git.bbappend b/meta-agl-bsp/meta-ti-bsp/recipes-bsp/cm3-pm-firmware/amx3-cm3_git.bbappend index 1fc5130f0..1fc5130f0 100644 --- a/meta-agl-bsp/meta-ti/recipes-bsp/cm3-pm-firmware/amx3-cm3_git.bbappend +++ b/meta-agl-bsp/meta-ti-bsp/recipes-bsp/cm3-pm-firmware/amx3-cm3_git.bbappend diff --git a/meta-agl-bsp/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_%.bbappend b/meta-agl-bsp/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_%.bbappend new file mode 100644 index 000000000..08e684609 --- /dev/null +++ b/meta-agl-bsp/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_%.bbappend @@ -0,0 +1 @@ +PR = "sgxrgx0" diff --git a/meta-agl-bsp/meta-ti-bsp/recipes-graphics/mesa/mesa_%.bbappend b/meta-agl-bsp/meta-ti-bsp/recipes-graphics/mesa/mesa_%.bbappend new file mode 100644 index 000000000..be4ee237b --- /dev/null +++ b/meta-agl-bsp/meta-ti-bsp/recipes-graphics/mesa/mesa_%.bbappend @@ -0,0 +1 @@ +require ${@bb.utils.contains_any('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-img-rogue-driver ti-sgx-ddk-km', 'pvr-fix.inc', '', d)} diff --git a/meta-agl-bsp/meta-ti-bsp/recipes-graphics/mesa/pvr-fix.inc b/meta-agl-bsp/meta-ti-bsp/recipes-graphics/mesa/pvr-fix.inc new file mode 100644 index 000000000..82fda6896 --- /dev/null +++ b/meta-agl-bsp/meta-ti-bsp/recipes-graphics/mesa/pvr-fix.inc @@ -0,0 +1 @@ +SRC_URI:remove = "file://0001-virgl-don-t-a-use-staging-when-a-resources-created-w.patch" diff --git a/meta-agl-bsp/meta-ti-bsp/recipes-kernel/linux/linux-bb.org_%.bbappend b/meta-agl-bsp/meta-ti-bsp/recipes-kernel/linux/linux-bb.org_%.bbappend new file mode 100644 index 000000000..07ba7d4d1 --- /dev/null +++ b/meta-agl-bsp/meta-ti-bsp/recipes-kernel/linux/linux-bb.org_%.bbappend @@ -0,0 +1,2 @@ +require recipes-kernel/linux/linux-agl-config.inc + diff --git a/meta-agl-bsp/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging_%.bbappend b/meta-agl-bsp/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging_%.bbappend new file mode 100644 index 000000000..07ba7d4d1 --- /dev/null +++ b/meta-agl-bsp/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging_%.bbappend @@ -0,0 +1,2 @@ +require recipes-kernel/linux/linux-agl-config.inc + diff --git a/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0001-Add-soc-performance-monitor-utilites.patch b/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0001-Add-soc-performance-monitor-utilites.patch deleted file mode 100644 index 4268b7dc2..000000000 --- a/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0001-Add-soc-performance-monitor-utilites.patch +++ /dev/null @@ -1,3570 +0,0 @@ -From 7830118ecb980766f4a6e3997769d7ae326bee77 Mon Sep 17 00:00:00 2001 -From: Karthik Ramanan <a0393906@ti.com> -Date: Fri, 3 Jun 2016 18:32:50 +0530 -Subject: [PATCH] Add soc performance monitor utilites - -Signed-off-by: Karthik Ramanan <a0393906@ti.com> ---- - Makefile.am | 17 +- - clients/Dra7xx_ddrstat_speed.c | 494 +++++++++++++ - clients/soc_performance_monitor.c | 630 ++++++++++++++++ - clients/soc_performance_monitor.h | 40 ++ - clients/statcoll.c | 1433 +++++++++++++++++++++++++++++++++++++ - clients/statcoll.h | 152 ++++ - clients/statcoll_gui.h | 101 +++ - clients/time_bar_graph.c | 515 +++++++++++++ - clients/time_bar_graph.h | 93 +++ - 10 files changed, 4873 insertions(+), 1 deletion(-) - create mode 100644 clients/Dra7xx_ddrstat_speed.c - create mode 100644 clients/soc_performance_monitor.c - create mode 100644 clients/soc_performance_monitor.h - create mode 100644 clients/statcoll.c - create mode 100644 clients/statcoll.h - create mode 100644 clients/statcoll_gui.h - create mode 100644 clients/time_bar_graph.c - create mode 100644 clients/time_bar_graph.h - -diff --git a/Makefile.am b/Makefile.am -index 62719c9..55aed6d 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -432,7 +432,9 @@ demo_clients = \ - weston-fullscreen \ - weston-stacking \ - weston-calibrator \ -- weston-scaler -+ weston-scaler \ -+ soc-performance-monitor \ -+ soc-ddr-bw-visualizer - - if INSTALL_DEMO_CLIENTS - bin_PROGRAMS += $(demo_clients) -@@ -570,6 +572,19 @@ weston_image_SOURCES = clients/image.c - weston_image_LDADD = libtoytoolkit.la - weston_image_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) - -+noinst_LTLIBRARIES += libtimebargraph.la -+libtimebargraph_la_SOURCES = clients/time_bar_graph.c clients/time_bar_graph.h -+libtimebargraph_la_LIBADD = libtoytoolkit.la -+libtimebargraph_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_CFLAGS) $(CAIRO_EGL_CFLAGS) -+ -+soc_performance_monitor_SOURCES = clients/soc_performance_monitor.c clients/soc_performance_monitor.h -+soc_performance_monitor_LDADD = libtoytoolkit.la libtimebargraph.la -+soc_performance__CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) -+ -+soc_ddr_bw_visualizer_SOURCES = clients/statcoll.c clients/Dra7xx_ddrstat_speed.c clients/statcoll.h clients/statcoll_gui.h -+soc_ddr_bw_visualizer_LDADD = libtoytoolkit.la libtimebargraph.la -+soc_ddr_bw_visualizer__CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) -+ - weston_cliptest_SOURCES = \ - clients/cliptest.c \ - src/vertex-clipping.c \ -diff --git a/clients/Dra7xx_ddrstat_speed.c b/clients/Dra7xx_ddrstat_speed.c -new file mode 100644 -index 0000000..af06733 ---- /dev/null -+++ b/clients/Dra7xx_ddrstat_speed.c -@@ -0,0 +1,494 @@ -+/* -+ * Copyright (C) 2015 Texas Instruments -+ * Author: Karthik Ramanan <karthik.ramanan@ti.com> -+ * -+ * This program is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License version 2 as published by -+ * the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, but WITHOUT -+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -+ * more details. -+ * -+ * You should have received a copy of the GNU General Public License along with -+ * this program. If not, see <http://www.gnu.org/licenses/>. -+ */ -+ -+#include <stdio.h> -+#include <stdlib.h> -+#include <stdint.h> -+#include <string.h> -+#include <sys/mman.h> -+#include <sys/time.h> -+#include <unistd.h> -+#include <fcntl.h> -+#include "statcoll.h" -+ -+#define PAGE_SIZE 4096 -+ -+#define EMIF1_BASE 0x4c000000 -+#define EMIF2_BASE 0x4d000000 -+ -+#define EMIF_PERF_CNT_1 0x80 -+#define EMIF_PERF_CNT_2 0x84 -+#define EMIF_PERF_CNT_CFG 0x88 -+#define EMIF_PERF_CNT_TIM 0x90 -+ -+static unsigned -+tv_diff(struct timeval *tv1, struct timeval *tv2) -+{ -+ return (tv2->tv_sec - tv1->tv_sec) * 1000000 + -+ (tv2->tv_usec - tv1->tv_usec); -+} -+ -+ -+struct emif_perf { -+ int code; -+ const char *name; -+}; -+ -+static const struct emif_perf emif_perf_tab[] = { -+ { 0, "access" }, -+ { 1, "activate" }, -+ { 2, "read" }, -+ { 3, "write" }, -+ { 4, "fifo_cmd" }, -+ { 5, "fifo_write" }, -+ { 6, "fifo_read" }, -+ { 7, "fifo_ret" }, -+ { 8, "prio" }, -+ { 9, "cmd_pend" }, -+ { 10, "data" }, -+}; -+ -+static void *emif1, *emif2; -+static int BANDWIDTH=0; -+static int DELAY = 1; -+static int EMIF_PERF_CFG1 = 9; -+static int EMIF_PERF_CFG2 = 10; -+ -+ -+static int STATCOLL=0; -+static int TOTAL_TIME; -+static int INTERVAL_US; -+ -+struct timeval t1, t2; -+ -+FILE* outfile; -+struct emif_stats { -+ uint32_t cycles; -+ uint32_t cnt1; -+ uint32_t cnt2; -+}; -+ -+static struct emif_stats emif1_start, emif1_end; -+static struct emif_stats emif2_start, emif2_end; -+ -+static void *emif_init(int fd, unsigned base) -+{ -+ void *mem = -+ mmap(NULL, PAGE_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, fd, base); -+ volatile uint32_t *emif = mem,temp; -+ -+ if (mem == MAP_FAILED){ -+ return NULL; -+ } -+ -+ emif[EMIF_PERF_CNT_CFG>>2] = EMIF_PERF_CFG2 << 16 | EMIF_PERF_CFG1; -+ -+ return mem; -+} -+ -+static void emif_read(volatile uint32_t *emif, struct emif_stats *st) -+{ -+ st->cycles = emif[EMIF_PERF_CNT_TIM>>2]; -+ st->cnt1 = emif[EMIF_PERF_CNT_1>>2]; -+ st->cnt2 = emif[EMIF_PERF_CNT_2>>2]; -+} -+ -+static void emif_print(const char *tag, struct emif_stats *st1, -+ struct emif_stats *st2) -+{ -+ uint32_t cycles = st2->cycles - st1->cycles; -+ uint32_t cnt1 = st2->cnt1 - st1->cnt1; -+ uint32_t cnt2 = st2->cnt2 - st1->cnt2; -+ printf("%s %s %2llu%% %s %2llu%%", tag, -+ emif_perf_tab[EMIF_PERF_CFG1].name, 100ull*cnt1/cycles, -+ emif_perf_tab[EMIF_PERF_CFG2].name, 100ull*cnt2/cycles); -+ fprintf(outfile,"%s%s= %2llu,%s%s= %2llu,", -+ tag, emif_perf_tab[EMIF_PERF_CFG1].name, 100ull*cnt1/cycles, -+ tag, emif_perf_tab[EMIF_PERF_CFG2].name, 100ull*cnt2/cycles); -+} -+ -+static int perf_init(void) -+{ -+ int fd = open("/dev/mem", O_RDWR); -+ int err = 0; -+ -+ if (fd == -1){ -+ printf("error fd=open() \n"); -+ return -1; -+ } -+ emif1 = emif_init(fd, EMIF1_BASE); -+ emif2 = emif_init(fd, EMIF2_BASE); -+ -+ if (!emif1 || !emif2){ -+ printf("error if (!emif1 || !emif2) \n"); -+ err = -1; -+ } -+ -+ close(fd); -+ return err; -+} -+ -+static void perf_start(void) -+{ -+ if (emif1) { -+ emif_read(emif1, &emif1_start); -+ emif_read(emif2, &emif2_start); -+ } -+} -+ -+static void perf_stop(void) -+{ -+ if (emif1) { -+ emif_read(emif1, &emif1_end); -+ emif_read(emif2, &emif2_end); -+ } -+} -+ -+static void perf_print(void) -+{ -+ if (emif1) { -+ emif_print("EMIF1", &emif1_start, &emif1_end); -+ printf("\t"); -+ emif_print("EMIF2", &emif2_start, &emif2_end); -+ printf("\r"); -+ fprintf(outfile, "\n"); -+ fflush(outfile); -+ fflush(stdout); -+ } -+} -+ -+static void perf_close(void) -+{ -+ if (emif1) munmap(emif1, PAGE_SIZE); -+ if (emif2) munmap(emif2, PAGE_SIZE); -+} -+ -+static int get_cfg(const char *name, int def) -+{ -+ char *end; -+ int n = strtol(name, &end, 0); -+ int i; -+ -+ if (!*end) -+ return n; -+ -+ for (i = 0; i < sizeof(emif_perf_tab)/sizeof(emif_perf_tab[0]); i++) -+ if (!strcmp(name, emif_perf_tab[i].name)) -+ return emif_perf_tab[i].code; -+ -+ return def; -+} -+ -+ -+unsigned int emif_freq() -+{ -+ volatile unsigned *tim1; -+ unsigned v1, v2; -+ int fd; -+ -+ /*calculation EMIF frequency -+ EMIF_PERF_CNT_TIM = \n32-bit counter that -+ continuously counts number for -+ EMIF_FCLK clock cycles elapsed -+ after EMIFis brought out of reset*/ -+ -+ fd = open("/dev/mem", O_RDONLY); -+ if (fd == -1) { -+ perror("/dev/mem"); -+ return 1; -+ } -+ -+ void *mem = -+ mem = mmap(NULL, PAGE_SIZE, PROT_READ, MAP_SHARED, fd, EMIF1_BASE); -+ if (mem == MAP_FAILED) { -+ perror("mmap"); -+ exit(1); -+ } -+ -+ tim1 = (unsigned *)((char*)mem + EMIF_PERF_CNT_TIM); -+ -+ v1 = *tim1; -+ gettimeofday(&t1, NULL); -+ sleep(2); -+ v2 = *tim1; -+ gettimeofday(&t2, NULL); -+ -+ munmap(mem, PAGE_SIZE); -+ close(fd); -+ -+ return (v2 - v1) / tv_diff(&t1, &t2); -+ -+} -+ -+ -+char config_file_path[100]; -+char keylist[][50] = { -+ "DELAY", -+ "EMIF_PERF_CFG1", -+ "EMIF_PERF_CFG2", -+ "BANDWIDTH", -+ "STATCOLL", -+ "TOTAL_TIME", -+ "INTERVAL_US", -+ "INITIATORS", -+}; -+ -+char line[512], *p; -+char tokens[6][512]; -+int temp, flag = 0; -+char *keyvalue, *pair; -+char key[100]; -+int linecount=0; -+ -+ -+int debug=0; -+ -+void print_valid_options(void) -+{ -+ int i; -+ printf("Invalid key found\n"); -+ printf("Supported keys are :\n"); -+ for(i=0; i<sizeof(keylist)/sizeof(keylist[0]); i++) -+ printf("\t\t %s\n", keylist[i]); -+ -+} -+int validatekey(char *ptr) -+{ -+ int i; -+ for(i=0; i<sizeof(keylist)/sizeof(keylist[0]); i++) -+ if(strcmp(ptr, keylist[i]) == 0) -+ return 0; -+ -+ return 1; -+} -+ -+void add_key_value(char *key, int value) -+{ -+ printd("%s", "Inside add_key_value\n"); -+ -+ if(strcmp(key, "BANDWIDTH") == 0) { -+ BANDWIDTH = value; -+ return; -+ } -+ if(strcmp(key, "STATCOLL") == 0) { -+ STATCOLL = value; -+ return; -+ } -+ else -+ printd("%s", "********** UNKNOWN**********"); -+ -+ if(BANDWIDTH == 1) { -+ if(strcmp(key, "DELAY") == 0) -+ DELAY = value; -+ else if(strcmp(key, "EMIF_PERF_CFG1") == 0) -+ EMIF_PERF_CFG1 = value; -+ else if(strcmp(key, "EMIF_PERF_CFG2") == 0) -+ EMIF_PERF_CFG2 = value; -+ } -+ else -+ printf("NOTE: BANDWIDTH is not enabled, ignoring %s\n", key); -+ -+ -+ if(STATCOLL == 1) { -+ if(strcmp(key, "INTERVAL_US") == 0) -+ INTERVAL_US = value; -+ else if(strcmp(key, "TOTAL_TIME") == 0) -+ TOTAL_TIME = value; -+ } -+ else -+ printf("NOTE: STATCOLL is not enabled, ignoring %s\n", key); -+} -+ -+void bandwidth_usage() { -+ -+ printf("#########################################################\n##\n" -+ -+ "## usage : ./Dra7xx_ddrstat <DELAY> <EMIF_PERF_CFG1> <EMIF_PERF_CFG2> \n" -+ "## default : DELAY=1 EMIF_PERF_CFG1=9 EMIF_PERF_CFG2=10\n" -+ "## option : for EMIF_PERF_CFG1 and EMIF_PERF_CFG2\n" -+ "## 0 -> access,\n" -+ "## 1 -> activate,\n" -+ "## 2 -> read,\n" -+ "## 3 -> write,\n" -+ "## 4 -> fifo_cmd,\n" -+ "## 5 -> fifo_write,\n" -+ "## 6 -> fifo_read,\n" -+ "## 7 -> fifo_ret,\n" -+ "## 8 -> prio,\n" -+ "## 9 -> cmd_pend,\n" -+ "## 10 -> data \n##\n" -+ -+ "## EMIF frq : %d MHz\n\n", emif_freq() ); -+} -+ -+ -+int main(int argc, char **argv) -+{ -+ int option; -+ FILE *fp; -+ int i; -+ int xpos = 600, ypos = 40; -+ -+ -+ /* Read config file */ -+ /* Initialize this to turn off verbosity of getopt */ -+ opterr = 0; -+ -+// while ((option = getopt (argc, argv, "df:")) != -1) -+ while ((option = getopt (argc, argv, "dx:y:")) != -1) -+ { -+ switch(option) -+ { -+#if 0 -+ case 'f': -+ strcpy(config_file_path, optarg); -+ break; -+#endif -+ case 'd': -+ debug=1; -+ break; -+ case 'x': -+ xpos=atoi(optarg); -+ break; -+ case 'y': -+ ypos=atoi(optarg); -+ break; -+ -+ default: -+ printf("Invalid option.. Exiting\n"); -+ exit(0); -+ } -+ } -+ -+ printf("xpos = %d, ypos = %d\n", xpos, ypos); -+ -+ strcpy(config_file_path,"config.ini"); -+ fp = fopen(config_file_path, "r"); -+ if (fp == NULL) { -+ fprintf(stderr, "couldn't open the specified file\n"); -+ return -1; -+ } -+ -+ while (fgets(line, sizeof line, fp)) { -+ printd("Line is = %s", line); -+ -+ if (line[0] == '#' || line[0] == '\n') { -+ continue; -+ } -+ -+ memset(tokens, 0, sizeof(tokens)); -+ i = 0; -+ -+ pair = strtok (line," ,"); -+ while (pair != NULL) -+ { -+ printd ("\tPair is = %s\n",pair); -+ strcpy(tokens[i++], pair); -+ pair = strtok (NULL, " ,.-"); -+ } -+ -+ for(temp=0; temp< i; temp++) -+ { -+ printd("Line %d: %s\n", temp, tokens[temp]); -+ -+ keyvalue = strtok (tokens[temp]," ="); -+ while (keyvalue != NULL) -+ { -+ if(flag == 0) -+ { -+ if(validatekey(keyvalue)) -+ { -+ print_valid_options(); -+ exit(0); -+ } -+ strcpy(key, keyvalue); -+ printd ("\tKey is = %s\n",key); -+ flag++; -+ } -+ else -+ { -+ printd ("\tValue is = %s",keyvalue); -+ printd (" (%d)\n", atoi(keyvalue)); -+ add_key_value(key, atoi(keyvalue)); -+ flag = 0; -+ } -+ keyvalue = strtok (NULL, " ="); -+ } -+ } -+ -+ -+ -+ linecount++; -+ printd("%s", "------------------- \n"); -+ -+ } -+ -+ fclose(fp); -+ -+ printf("\n\nCOMPLETED: Parsing of the user specified parameters.. \n \ -+ \nConfiguring device now.. \n\n"); -+ if(BANDWIDTH == 1) { -+ bandwidth_usage(); -+ if (DELAY <= 0) -+ DELAY = 1; -+ -+ if (perf_init()){ -+ printf("perf_init return non zero \n"); -+ return 1; -+ } -+ -+ outfile = fopen("emif-performance.csv", "w+"); -+ if (!outfile) { -+ printf("\n Error opening file"); -+ } -+ for (;;) { -+ perf_start(); -+ sleep(DELAY); -+ perf_stop(); -+ perf_print(); -+ } -+ -+ fclose(outfile); -+ perf_close(); -+ return 0; -+ } -+ -+ if(STATCOLL == 1) { -+ printf("STATISTICS COLLECTOR option chosen\n"); -+ printf("------------------------------------------------\n\n"); -+ fp = fopen("initiators.cfg", "r"); -+ if (fp == NULL) { -+ fprintf(stderr, "couldn't open the specified file initiators.cfg'\n"); -+ return -1; -+ } -+ -+ int i=0; -+ char list[100][50]; -+ memset(list, sizeof(list), 0); -+ while (fgets(line, sizeof line, fp)) { -+ printf("Line is = %s", line); -+ /* Slightly strange way to chop off the \n character */ -+ strtok(line, "\n"); -+ strcpy(list[i++], line); -+ } -+ fclose(fp); -+ -+ statcoll_start(TOTAL_TIME, INTERVAL_US, list, xpos, ypos); -+ } -+ -+} -+ -diff --git a/clients/soc_performance_monitor.c b/clients/soc_performance_monitor.c -new file mode 100644 -index 0000000..5d1db32 ---- /dev/null -+++ b/clients/soc_performance_monitor.c -@@ -0,0 +1,630 @@ -+/* -+ * Copyright (C) 2016 Texas Instruments -+ * Author: Karthik Ramanan <karthik.ramanan@ti.com> -+ * -+ * This program is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License version 2 as published by -+ * the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, but WITHOUT -+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -+ * more details. -+ * -+ * You should have received a copy of the GNU General Public License along with -+ * this program. If not, see <http://www.gnu.org/licenses/>. -+ */ -+ -+#include <stdint.h> -+#include <stdio.h> -+#include <stdlib.h> -+#include <string.h> -+#include <stdint.h> -+#include <signal.h> -+#include <time.h> -+#include <math.h> -+#include <unistd.h> -+#include <sys/time.h> -+#include <pthread.h> -+#include <errno.h> -+#include <unistd.h> -+#include <fcntl.h> -+#include <sys/stat.h> -+ -+#include "time_bar_graph.h" -+ -+#include "soc_performance_monitor.h" -+ -+static int debug=0; -+ -+static char readfifo[100]; -+static int MAX_WIDTH=1920; -+static int MAX_HEIGHT=1080; -+static int x_pos=0; -+static int y_pos=40; -+ -+void *ctx; -+struct time_graph_create_params tg_p; -+struct bar_graph_create_params bg_p; -+ -+static int cpu_load_offset = 0; -+static int total_cpu_load_items = 0; -+static int total_elements = 0; -+ -+struct _bar_graph_y_config *y_cfg; -+struct _text_config *t_cfg; -+char *tg_text[100]; -+char *bg_text[100]; -+ -+ -+int command_handler(int command, double *y, char **text) -+{ -+ static int fd; -+ char buf[MAX_BUF]; -+ int i, bytes, offset; -+ -+ switch(command) -+ { -+ case OPEN: -+ fd = open(readfifo, O_RDONLY|O_NONBLOCK); -+ break; -+ -+ case READ: -+ -+ /* open, read, and display the message from the FIFO */ -+ bytes=read(fd, buf, MAX_BUF); -+ buf[bytes]='\0'; -+ if(bytes > 0) -+ { -+ char command[100]; -+ char string[100]; -+ sscanf(buf, "%s %s", command, string); -+ printd("Received %s\n", buf); -+ if(strcmp(command, "TABLE:") == 0) -+ { -+ char field[100], value[100], unit[100]; -+ sscanf(buf, "%s %s %s %s", command, field, value, unit); -+ for(i=0; i<cpu_load_offset; i++) { -+ if(strcmp(text[i*2], field) == 0) { -+ printd("Updating value(%s), unit(%s)\n", value, unit); -+ sprintf(text[i*2+1], "%s %s", value, unit); -+ } -+ } -+ } -+ else if(strcmp(command, "CPULOAD:") == 0) -+ { -+ char field[100], value[100]; -+ -+ sscanf(buf, "%s %s %s", command, field, value); -+ -+ for(i=cpu_load_offset; i<cpu_load_offset+total_cpu_load_items; i++) { -+ if(strcmp(text[i*2], field) == 0) { -+ if(strlen(value) <= 2) { -+ y[i*2+1] = atoi(value)/100.0; -+ sprintf(text[i*2+1], " %02s%s", value,"%"); -+ printd("CPULOAD: Updating %s with %s\n", field, value); -+ } -+ else { -+ printf("Ignoring value: %s\n", value); -+ } -+ } -+ } -+ } -+ else if(strcmp(command, "MOVE:") == 0) -+ { -+ char value[100]; -+ printd("Received MOVE command : %s\n", buf); -+ sscanf(string, "%s", value); -+ sprintf(tg_p.title, "CPU Usage[@position-req=%sx%d]", value, y_pos); -+ move_graph(ctx, &tg_p); -+ } -+ else -+ { -+ printf("ERROR: Received unexpected data from FIFO - \" %s \" \n", buf); -+ } -+ memset(buf, 0x0, sizeof(buf)); -+ } -+ -+ break; -+ -+ case CLOSE: -+ close(fd); -+ break; -+ } -+ return bytes; -+} -+ -+volatile sig_atomic_t sigtermed = 0; -+ -+void my_signal_handler(int signum) -+{ -+ if (signum == SIGTERM || signum == SIGINT) { -+ sigtermed = 1; -+ } -+} -+ -+int get_strings_in_section(char *string, char **output) -+{ -+ FILE *fd; -+ char line[512]; -+ int total_strings = 0; -+ -+ fd = fopen("soc_performance_monitor.cfg", "r"); -+ if(fd == NULL) { -+ fprintf(stderr, "ERROR: Unable to open file soc_performance_monitor.cfg\n"); -+ fprintf(stderr, " Please copy the file from /etc/visualization_scripts into current directory\n"); -+ exit(0); -+ } -+ -+ while(fgets(line, sizeof line, fd)) { -+ if(strstr(line, string)) { -+ printf("\n-------------------------------------------------\n"); -+ printf("CONFIG FILE PARSE: Found section %s in line : %s\n", string, line); -+ break; -+ } -+ } -+ -+ while(fgets(line, sizeof line, fd)) { -+ printd("Line is = %s", line); -+ -+ if (line[0] == '#' || line[0] == '\n' || line[0] == '[') { -+ break; -+ } -+ -+ line[strlen(line) - 1] = '\0'; -+ strcpy(output[total_strings++], line); -+ -+ } -+ fclose(fd); -+ -+ return total_strings; -+} -+ -+ -+void fill_cpu_load_details(int start_offset, int end_offset, char **output, struct table_configuration *table_config) -+{ -+ int i; -+ -+ const int BL_START_X = table_config->BL_START_X; -+ const int BL_START_Y = table_config->BL_START_Y; -+ const int BAR_GAP = table_config->BAR_GAP; -+ const int BAR_HEIGHT = table_config->BAR_HEIGHT; -+ const int BAR_WIDTH = table_config->BAR_WIDTH; -+ const int TR_START_X = table_config->TR_START_X; -+ const int TR_START_Y = table_config->TR_START_Y; -+ const int FONT_SIZE = table_config->FONT_SIZE; -+ printf("Filling from %d to %d\n", start_offset, end_offset); -+ cpu_load_offset = start_offset; -+ -+ for(i=start_offset; i< end_offset-1; i++) { -+ y_cfg[i*2].region.bottom_left.x = BL_START_X + (i-start_offset) * (BAR_GAP + BAR_WIDTH); -+ y_cfg[i*2].region.bottom_left.y = BL_START_Y; -+ y_cfg[i*2].region.top_right.x = TR_START_X + (i-start_offset) * (BAR_GAP + BAR_WIDTH); -+ y_cfg[i*2].region.top_right.y = TR_START_Y; -+ y_cfg[i*2].line_color.r = 1.0; -+ y_cfg[i*2].line_color.g = 1.0; -+ y_cfg[i*2].line_color.b = 1.0; -+ y_cfg[i*2].line_color.a = 1.0; -+ y_cfg[i*2].fill_color.r = 0.0; -+ y_cfg[i*2].fill_color.g = 0.0; -+ y_cfg[i*2].fill_color.b = 1.0; -+ y_cfg[i*2].fill_color.a = 0.7; -+ -+ y_cfg[i*2+1].region.bottom_left.x = BL_START_X +(i-start_offset) * (BAR_GAP + BAR_WIDTH); -+ y_cfg[i*2+1].region.bottom_left.y = BL_START_Y; -+ y_cfg[i*2+1].region.top_right.x = TR_START_X + (i-start_offset) * (BAR_GAP + BAR_WIDTH); -+ y_cfg[i*2+1].region.top_right.y = TR_START_Y; -+ y_cfg[i*2+1].line_color.r = 1.0; -+ y_cfg[i*2+1].line_color.g = 1.0; -+ y_cfg[i*2+1].line_color.b = 1.0; -+ y_cfg[i*2+1].line_color.a = 1.0; -+ y_cfg[i*2+1].fill_color.r = 1.0; -+ y_cfg[i*2+1].fill_color.g = 0.0; -+ y_cfg[i*2+1].fill_color.b = 0.0; -+ y_cfg[i*2+1].fill_color.a = 1.0; -+ -+ -+ t_cfg[i*2].color.r = 1.0; -+ t_cfg[i*2].color.g = 1.0; -+ t_cfg[i*2].color.b = 1.0; -+ t_cfg[i*2].color.a = 1.0; -+ t_cfg[i*2].at.x = BL_START_X + (i-start_offset) * (BAR_GAP + BAR_WIDTH); -+ t_cfg[i*2].at.y = BL_START_Y + FONT_SIZE; -+ t_cfg[i*2].fontsize = FONT_SIZE; -+ -+ t_cfg[i*2+1].color.r = 1.0; -+ t_cfg[i*2+1].color.g = 1.0; -+ t_cfg[i*2+1].color.b = 1.0; -+ t_cfg[i*2+1].color.a = 1.0; -+ t_cfg[i*2+1].at.x = BL_START_X + (i-start_offset) * (BAR_GAP + BAR_WIDTH); -+ t_cfg[i*2+1].at.y = BL_START_Y - BAR_HEIGHT - FONT_SIZE; -+ t_cfg[i*2+1].fontsize = FONT_SIZE; -+ -+ strcpy(bg_text[i*2], output[i - start_offset]); -+ strcpy(bg_text[i*2+1], "0%"); -+ } -+ -+ t_cfg[(end_offset-1)*2].color.r = 0.0; -+ t_cfg[(end_offset-1)*2].color.g = 1.0; -+ t_cfg[(end_offset-1)*2].color.b = 1.0; -+ t_cfg[(end_offset-1)*2].color.a = 1.0; -+ t_cfg[(end_offset-1)*2].at.x = BL_START_X + 80; -+ t_cfg[(end_offset-1)*2].at.y = TR_START_Y - 40; -+ t_cfg[(end_offset-1)*2].fontsize = FONT_SIZE + 3; -+ -+ printd("Copying title string %s\n", output[end_offset - start_offset -1]); -+ strcpy(bg_text[(end_offset-1)*2], output[end_offset - start_offset-1]); -+} -+ -+void fill_table_details(int start_offset, int end_offset, char **output, struct table_configuration *table_config) -+{ -+ int i; -+ -+ const int BL_START_X = table_config->BL_START_X; -+ const int BL_START_Y = table_config->BL_START_Y; -+ const int BAR_GAP = table_config->BAR_GAP; -+ const int BAR_HEIGHT = table_config->BAR_HEIGHT; -+ const int BAR_WIDTH = table_config->BAR_WIDTH; -+ const int TR_START_X = table_config->TR_START_X; -+ const int TR_START_Y = table_config->TR_START_Y; -+ const int FONT_SIZE = table_config->FONT_SIZE; -+ printf("Filling from %d to %d\n", start_offset, end_offset); -+ -+ -+ char tokenize[200]; -+ char tokens[10][100]; -+ char *pair, *key, *value; -+ int k=0; -+ char title[100], unit[100]; -+ -+ strcpy(tokenize, output[end_offset - start_offset - 1]); -+ memset(tokens, 0, sizeof(tokens)); -+ -+ k=0; -+ pair = strtok (tokenize,","); -+ while (pair != NULL) { -+ strcpy(tokens[k++], pair); -+ pair = strtok (NULL, ","); -+ } -+ -+ i=0; -+ memset(title, 0, sizeof(title)); -+ memset(unit, 0, sizeof(unit)); -+ while(i < k) { -+ key=strtok(tokens[i], "="); -+ if(key != NULL) { -+ if(strcmp(key,"TITLE") == 0) { -+ value = strtok(NULL, "="); -+ if(value != NULL) { -+ strcpy(title, value); -+ } -+ } -+ if(strcmp(key,"UNIT") == 0) { -+ value = strtok(NULL, "="); -+ if(value != NULL) { -+ strcpy(unit, value); -+ } -+ } -+ } -+ i++; -+ } -+ -+ for(i=start_offset; i< end_offset-1; i++) { -+ y_cfg[i*2].region.bottom_left.x = BL_START_X; -+ y_cfg[i*2].region.bottom_left.y = BL_START_Y + (i - start_offset) * (BAR_GAP + BAR_HEIGHT); -+ y_cfg[i*2].region.top_right.x = TR_START_X; -+ y_cfg[i*2].region.top_right.y = TR_START_Y + (i - start_offset) * (BAR_GAP + BAR_HEIGHT); -+ y_cfg[i*2].line_color.r = 1.0; -+ y_cfg[i*2].line_color.g = 1.0; -+ y_cfg[i*2].line_color.b = 1.0; -+ y_cfg[i*2].line_color.a = 1.0; -+ y_cfg[i*2].fill_color.r = 0.0; -+ y_cfg[i*2].fill_color.g = 0.3; -+ y_cfg[i*2].fill_color.b = 0.0; -+ y_cfg[i*2].fill_color.a = 0.7; -+ -+ y_cfg[i*2+1].region.bottom_left.x = TR_START_X; -+ y_cfg[i*2+1].region.bottom_left.y = BL_START_Y + (i - start_offset) * (BAR_GAP + BAR_HEIGHT); -+ y_cfg[i*2+1].region.top_right.x = TR_START_X + (BAR_WIDTH); //+ 1 * BL_START_X; -+ y_cfg[i*2+1].region.top_right.y = TR_START_Y + (i - start_offset) * (BAR_GAP + BAR_HEIGHT);; -+ y_cfg[i*2+1].line_color.r = 1.0; -+ y_cfg[i*2+1].line_color.g = 1.0; -+ y_cfg[i*2+1].line_color.b = 1.0; -+ y_cfg[i*2+1].line_color.a = 1.0; -+ y_cfg[i*2+1].fill_color.r = 0.3; -+ y_cfg[i*2+1].fill_color.g = 0.0; -+ y_cfg[i*2+1].fill_color.b = 0.0; -+ y_cfg[i*2+1].fill_color.a = 0.7; -+ -+ -+ t_cfg[i*2].color.r = 1.0; -+ t_cfg[i*2].color.g = 1.0; -+ t_cfg[i*2].color.b = 1.0; -+ t_cfg[i*2].color.a = 1.0; -+ t_cfg[i*2].at.x = BL_START_X + 5; -+ t_cfg[i*2].at.y = BL_START_Y + (i - start_offset) * (BAR_GAP+BAR_HEIGHT) -5; -+ t_cfg[i*2].fontsize = FONT_SIZE; -+ -+ t_cfg[i*2+1].color.r = 1.0; -+ t_cfg[i*2+1].color.g = 1.0; -+ t_cfg[i*2+1].color.b = 1.0; -+ t_cfg[i*2+1].color.a = 1.0; -+ t_cfg[i*2+1].at.x = TR_START_X + 50;//BAR_WIDTH + TR_START_X; -+ t_cfg[i*2+1].at.y = BL_START_Y + (i - start_offset) * (BAR_GAP + BAR_HEIGHT) -5; -+ t_cfg[i*2+1].fontsize = FONT_SIZE; -+ -+ printd("Copying string %s at %d\n", output[i-start_offset], i); -+ strcpy(bg_text[i*2], output[i-start_offset]); -+ printd("Setting text 0 %s at %d\n", unit, i*2+1); -+ sprintf(bg_text[i*2+1], "0 %s", unit); -+ } -+ for(i=start_offset; i< end_offset*2; i++) { -+ printd("%d - (%d, %d) to (%d, %d)\n", i, y_cfg[i].region.bottom_left.x, y_cfg[i].region.bottom_left.y, y_cfg[i].region.top_right.x, y_cfg[i].region.top_right.y); -+ } -+ -+ t_cfg[(end_offset-1)*2].color.r = 0.0; -+ t_cfg[(end_offset-1)*2].color.g = 1.0; -+ t_cfg[(end_offset-1)*2].color.b = 1.0; -+ t_cfg[(end_offset-1)*2].color.a = 1.0; -+ t_cfg[(end_offset-1)*2].at.x = BL_START_X + 80; -+ t_cfg[(end_offset-1)*2].at.y = BL_START_Y - 40; -+ t_cfg[(end_offset-1)*2].fontsize = FONT_SIZE + 3; -+ -+ printd("Copying title string %s\n", title); -+ strcpy(bg_text[(end_offset-1)*2], title); -+ -+} -+ -+ -+int get_key_value_from_string(char *string, char *limiter, char *key, char *value) -+{ -+ char *mykey, *myvalue; -+ -+ mykey=strtok(string, limiter); -+ if(mykey != NULL) { -+ myvalue = strtok(NULL, "="); -+ strtok(myvalue, "\n"); -+ if(myvalue == NULL) { -+ return -1; -+ } -+ } -+ else { -+ return -1; -+ } -+ printd("Key is %s\n", mykey); -+ printd("Value is %s\n", myvalue); -+ strcpy(key, mykey); -+ strcpy(value, myvalue); -+ return 0; -+ -+} -+ -+void populate_table_configuration(struct table_configuration *tbl_cfg, int cur_items, char **item_list) -+{ -+ static int total_items = 0; -+ static int total_tables = 0; -+ -+ tbl_cfg->BAR_HEIGHT = 25; -+ tbl_cfg->BAR_WIDTH = 150; -+ tbl_cfg->BL_START_X = 40; -+ tbl_cfg->BL_START_Y = 80 + (total_items + total_tables) * tbl_cfg->BAR_HEIGHT; -+ tbl_cfg->BAR_GAP = 0; -+ tbl_cfg->TR_START_X = tbl_cfg->BL_START_X + tbl_cfg->BAR_WIDTH; -+ tbl_cfg->TR_START_Y = tbl_cfg->BL_START_Y - tbl_cfg->BAR_HEIGHT; -+ tbl_cfg->FONT_SIZE = 15; -+ -+ printf("Proceeding with filling out details...\n"); -+ if(cur_items > 0) -+ fill_table_details(total_items, total_items+cur_items, item_list, tbl_cfg); -+ -+ total_items += cur_items; -+ if(cur_items > 0) -+ total_tables++; -+ -+ printf("total_items = %d, total_tables = %d\n", total_items, total_tables); -+ return; -+} -+ -+int fill_list_from_section(char **section_list, char *section_name) -+{ -+ int total_items, j; -+ -+ for(j=0; j<20; j++) { -+ section_list[j] = malloc(100); -+ } -+ -+ total_items = get_strings_in_section(section_name, section_list); -+ printf("\tThe total values in the section %s are %d\n", section_name, total_items); -+ for(j=0; j<total_items; j++) { -+ printf("\t\tThe returned strings for BOOT_TIME are %s\n", section_list[j]); -+ } -+ -+ total_elements += total_items; -+ -+ return total_items; -+} -+ -+int main(int argc, char *argv[]) -+{ -+ double *bg_y; -+ double *tg_y; -+ int i,j; -+ int refresh_rate; -+ -+ if (SIG_ERR == signal(SIGPIPE,SIG_IGN)) -+ exit(1); -+ -+ if (SIG_ERR == signal(SIGINT,my_signal_handler)) -+ exit(1); -+ -+ if (SIG_ERR == signal(SIGTERM,my_signal_handler)) -+ exit(1); -+ -+ if(argc == 2) { -+ printf("Enabling debug\n"); -+ debug = atoi(argv[1]); -+ } -+ else { -+ printf("Debug is disabled\n"); -+ debug = 0; -+ } -+ -+ char *output[20]; -+ int total = fill_list_from_section(output, "GLOBAL"); -+ for(j=0; j<total; j++) { -+ char key[100], value[100]; -+ int ret = get_key_value_from_string(output[j], "=", key, value); -+ if(ret == 0) { -+ if(strcmp(key, "FIFO") == 0) { -+ strcpy(readfifo, value); -+ } -+ if(strcmp(key, "REFRESH_RATE_USEC") == 0) { -+ refresh_rate = atoi(value); -+ } -+ if(strcmp(key, "MAX_WIDTH") == 0) { -+ MAX_WIDTH = atoi(value); -+ } -+ if(strcmp(key, "MAX_HEIGHT") == 0) { -+ MAX_HEIGHT = atoi(value); -+ } -+ if(strcmp(key, "X_POS") == 0) { -+ x_pos = atoi(value); -+ } -+ if(strcmp(key, "Y_POS") == 0) { -+ y_pos = atoi(value); -+ } -+ } -+ -+ } -+ -+ printf("\n-------------------------------------------------\n"); -+ printf("Configured REFRESH_RATE is %d\n", refresh_rate); -+ printf("Configured FIFO is %s\n", readfifo); -+ printf("Configured MAX_WIDTH is %d\n", MAX_WIDTH); -+ printf("Configured MAX_HEIGHT is %d\n", MAX_HEIGHT); -+ printf("Configured starting location is (%d, %d)\n", x_pos, y_pos); -+ printf("\n-------------------------------------------------\n"); -+ -+ int fd = open(readfifo, O_RDONLY|O_NONBLOCK); -+ if (fd != -1) { -+ printf("SUCCESS: Configured FIFO exists\n"); -+ close(fd); -+ } -+ else { -+ printf("ERROR: %s not found\nPlease create the fifo by executing mkfifo %s before running the application\n", readfifo, readfifo); -+ exit(0); -+ } -+ -+ -+ bg_p.title = malloc(100); -+ sprintf(bg_p.title, "CPU Usage[@position-req=%dx%d]", x_pos, y_pos); -+ -+ /* ------------------------------------------------------------------------*/ -+ /* Section for populating all lists from cfg sections*/ -+ /* ------------------------------------------------------------------------*/ -+ char *boot_list[20]; -+ int total_boot_items = fill_list_from_section(boot_list, "BOOT_TIME"); -+ -+ char *temperature_list[20]; -+ int total_temperature_items = fill_list_from_section(temperature_list, "TEMPERATURE"); -+ -+ char *cpu_load_list[20]; -+ total_cpu_load_items = fill_list_from_section(cpu_load_list, "CPU_LOAD"); -+ -+ char *voltage_list[20]; -+ int total_voltage_items = fill_list_from_section(voltage_list, "VOLTAGE"); -+ -+ char *frequency_list[20]; -+ int total_frequency_items = fill_list_from_section(frequency_list, "FREQUENCY"); -+ /* ------------------------------------------------------------------------*/ -+ /* total_elements will be updated inside the fill_list_from_section function */ -+ -+ t_cfg = malloc(sizeof(struct _text_config) * (total_elements*2 + 1)); -+ y_cfg = malloc(sizeof(struct _bar_graph_y_config) * total_elements*2); -+ bg_p.num_of_y_items = total_elements*2; -+ bg_p.y_config_array = y_cfg; -+ bg_p.num_of_text_items = total_elements*2 + 1; -+ bg_p.text_config_array = t_cfg; -+ -+ bg_y = malloc(sizeof(double) * total_elements * 2); -+ for(i=0; i< (total_elements*2+1); i++) { -+ bg_text[i] = malloc(150); -+ bg_y[i] = 1.0; -+ } -+ -+ tg_y = malloc(sizeof(double) * total_elements * 2); -+ for(i=0; i< (total_elements*2+1); i++) { -+ tg_text[i] = malloc(150); -+ tg_y[i] = 0.1 * i; -+ } -+ -+ struct table_configuration boot_table_config; -+ populate_table_configuration(&boot_table_config, total_boot_items, boot_list); -+ -+ struct table_configuration temp_table_config; -+ populate_table_configuration(&temp_table_config, total_temperature_items, temperature_list); -+ -+ struct table_configuration voltage_table_config; -+ populate_table_configuration(&voltage_table_config, total_voltage_items, voltage_list); -+ -+ struct table_configuration frequency_table_config; -+ populate_table_configuration(&frequency_table_config, total_frequency_items, frequency_list); -+ -+ struct table_configuration cpu_load_config; -+ cpu_load_config.BL_START_X = 40; -+ cpu_load_config.BL_START_Y = 80 + (total_boot_items + total_temperature_items + total_voltage_items + total_frequency_items+ 4) * boot_table_config.BAR_HEIGHT + 80 /*cpu_load_config.BAR_HEIGHT */; -+ cpu_load_config.BAR_GAP = 20; -+ cpu_load_config.BAR_HEIGHT = 80; -+ cpu_load_config.BAR_WIDTH = 40; -+ cpu_load_config.TR_START_X = cpu_load_config.BL_START_X + cpu_load_config.BAR_WIDTH; -+ cpu_load_config.TR_START_Y = cpu_load_config.BL_START_Y - cpu_load_config.BAR_HEIGHT; -+ cpu_load_config.FONT_SIZE = 15; -+ if(total_cpu_load_items > 0) { -+ fill_cpu_load_details(total_boot_items+total_temperature_items+total_voltage_items+total_frequency_items, total_boot_items+total_temperature_items+total_voltage_items+total_frequency_items+total_cpu_load_items, cpu_load_list, &cpu_load_config); -+ } -+ else { -+ cpu_load_offset = total_boot_items + total_temperature_items + total_voltage_items + total_frequency_items; -+ } -+ -+ tg_p.title=(char *)malloc(100); -+ sprintf(tg_p.title, "CPU Usage[@position-req=%dx%d]", x_pos, y_pos); -+ tg_p.height = MAX_HEIGHT; -+ tg_p.width = MAX_WIDTH; -+ -+ struct _y_config *tg_y_cfg = malloc(tg_p.num_of_y_items * sizeof(struct _y_config)); -+ tg_p.y_config_array = tg_y_cfg; -+ tg_p.text_config_array = t_cfg; -+ -+ printf("Proceeding to create starting visualization...\n"); -+ ctx = time_graph_create(argc, argv, &tg_p); -+ if (!ctx) { -+ printf("Unable to create time_graph... \n"); -+ exit(0); -+ } -+ -+ ctx = bar_graph_create(argc, argv, &bg_p); -+ if (!ctx) { -+ printf("Error creating context\n"); -+ exit(0); -+ } -+ -+ command_handler(OPEN, NULL, NULL); -+ -+ /* Plot the graph first time */ -+ time_graph_plot(ctx, tg_y, (const char **)tg_text); -+ bar_graph_plot(ctx, bg_y, (const char **)bg_text); -+ -+ while (!sigtermed) -+ { -+ usleep(refresh_rate); -+ int bytes_read = command_handler(READ, bg_y, bg_text); -+ if(bytes_read > 0) { -+ time_graph_plot(ctx, tg_y, (const char **)tg_text); -+ bar_graph_plot(ctx, bg_y, (const char **)bg_text); -+ } -+ } -+ -+ bar_graph_destroy(ctx); -+ command_handler(CLOSE, NULL, NULL); -+ return 0; -+} -diff --git a/clients/soc_performance_monitor.h b/clients/soc_performance_monitor.h -new file mode 100644 -index 0000000..861c8c7 ---- /dev/null -+++ b/clients/soc_performance_monitor.h -@@ -0,0 +1,40 @@ -+#define __SLEEP usleep(1000000) -+ -+#define MAX_BUF 1024 -+#define OPEN 1 -+#define READ 2 -+#define CLOSE 3 -+ -+#define MAX_COLORS 12 -+ -+#define printd(fmt, ...) \ -+ do { if (debug) fprintf(stderr, fmt, __VA_ARGS__); } while (0) -+ -+ -+struct _rgba pallette[MAX_COLORS] = -+{ -+ { 1.0, 0.0, 0.0, 1.0 }, -+ { 0.0, 0.5, 0.0, 1.0 }, -+ { 0.0, 0.0, 1.0, 1.0 }, -+ { 0.0, 0.0, 0.0, 1.0 }, -+ { 0.0, 0.5, 1.0, 1.0 }, -+ { 1.0, 0.0, 1.0, 1.0 }, -+ { 0.5, 0.5, 1.0, 1.0 }, -+ { 1.0, 0.5, 0.0, 1.0 }, -+ { 0.5, 0.5, 0.25, 1.0 }, -+ { 0.5, 0.0, 0.0, 1.0 }, -+ { 1.0, 0.5, 0.5, 1.0 }, -+ { 0.0, 0.0, 0.20, 1.0 } -+}; -+ -+struct table_configuration { -+ int BL_START_X; -+ int BL_START_Y; -+ int BAR_GAP; -+ int BAR_HEIGHT; -+ int BAR_WIDTH; -+ int TR_START_X; -+ int TR_START_Y; -+ int FONT_SIZE; -+}; -+ -diff --git a/clients/statcoll.c b/clients/statcoll.c -new file mode 100644 -index 0000000..5d5cae7 ---- /dev/null -+++ b/clients/statcoll.c -@@ -0,0 +1,1433 @@ -+/* -+ * Copyright (C) 2015 Texas Instruments -+ * created by prash@ti.com on 16 Jan 2013 -+ * Adapted to Linux with changes in framework: Karthik R <karthik.ramanan@ti.com> -+ * -+ * This program is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License version 2 as published by -+ * the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, but WITHOUT -+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -+ * more details. -+ * -+ * You should have received a copy of the GNU General Public License along with -+ * this program. If not, see <http://www.gnu.org/licenses/>. -+ */ -+ -+#include <stdio.h> -+#include <stdlib.h> -+#include <string.h> -+#include <sys/mman.h> -+#include <fcntl.h> -+#include <signal.h> -+#include <unistd.h> -+#include <sys/time.h> -+ -+#include "statcoll.h" -+#include "statcoll_gui.h" -+#include "time_bar_graph.h" -+ -+#define ENABLE_MODE 0x0 -+#define READ_STATUS_MODE 0x1 -+ -+ -+ -+#define OPEN 1 -+#define READ 2 -+#define CLOSE 3 -+ -+ -+#if 1 -+#define __SLEEP sleep(1) -+#else -+#define __SLEEP usleep(100000) -+#endif -+//#define DUMMY_MODE -+ -+#define MAX_COLORS 12 -+ -+struct _rgba pallette[MAX_COLORS] = -+{ -+ { 1.0, 0.0, 0.0, 1.0 }, -+ { 0.0, 0.5, 0.0, 1.0 }, -+ { 0.0, 0.0, 1.0, 1.0 }, -+ { 0.0, 0.0, 0.0, 1.0 }, -+ { 0.0, 0.5, 1.0, 1.0 }, -+ { 1.0, 0.0, 1.0, 1.0 }, -+ { 0.5, 0.5, 1.0, 1.0 }, -+ { 1.0, 0.5, 0.0, 1.0 }, -+ { 0.5, 0.5, 0.25, 1.0 }, -+ { 0.5, 0.0, 0.0, 1.0 }, -+ { 1.0, 0.5, 0.5, 1.0 }, -+ { 0.0, 0.0, 0.20, 1.0 } -+}; -+ -+const struct list_of_initiators initiators[STATCOL_MAX] = -+{ -+ { STATCOL_EMIF1_SYS, "STATCOL_EMIF1_SYS" }, -+ { STATCOL_EMIF2_SYS,"STATCOL_EMIF2_SYS" }, -+ { STATCOL_MA_MPU_P1,"STATCOL_MPU_P1" }, -+ { STATCOL_MA_MPU_P2,"STATCOL_MPU_P2" }, -+ { STATCOL_MPU1,"STATCOL_MPU1" }, -+ { STATCOL_MMU1,"STATCOL_MMU1" }, -+ { STATCOL_TPTC_RD1,"STATCOL_TPTC_RD1" }, -+ { STATCOL_TPTC_WR1,"STATCOL_TPTC_WR1" }, -+ { STATCOL_TPTC_RD2,"STATCOL_TPTC_RD2" }, -+ { STATCOL_TPTC_WR2,"STATCOL_TPTC_WR2" }, -+ { STATCOL_VIP1_P1,"STATCOL_VIP1_P1" }, -+ { STATCOL_VIP1_P2,"STATCOL_VIP1_P2" }, -+ { STATCOL_VIP2_P1,"STATCOL_VIP2_P1" }, -+ { STATCOL_VIP2_P2,"STATCOL_VIP2_P2" }, -+ { STATCOL_VIP3_P1,"STATCOL_VIP3_P1" }, -+ { STATCOL_VIP3_P2,"STATCOL_VIP3_P2" }, -+ { STATCOL_VPE_P1,"STATCOL_VPE_P1" }, -+ { STATCOL_VPE_P2,"STATCOL_VPE_P2" }, -+ { STATCOL_EVE1_TC0,"STATCOL_EVE1_TC0" }, -+ { STATCOL_EVE1_TC1,"STATCOL_EVE1_TC1" }, -+ { STATCOL_EVE2_TC0,"STATCOL_EVE2_TC0" }, -+ { STATCOL_EVE2_TC1,"STATCOL_EVE2_TC1" }, -+ { STATCOL_EVE3_TC0,"STATCOL_EVE3_TC0" }, -+ { STATCOL_EVE3_TC1,"STATCOL_EVE3_TC1" }, -+ { STATCOL_EVE4_TC0,"STATCOL_EVE4_TC0" }, -+ { STATCOL_EVE4_TC1,"STATCOL_EVE4_TC1" }, -+ { STATCOL_DSP1_MDMA,"STATCOL_DSP1_MDMA" }, -+ { STATCOL_DSP1_EDMA,"STATCOL_DSP1_EDMA" }, -+ { STATCOL_DSP2_MDMA,"STATCOL_DSP2_MDMA" }, -+ { STATCOL_DSP2_EDMA,"STATCOL_DSP2_EDMA" }, -+ { STATCOL_IVA,"STATCOL_IVA" }, -+ { STATCOL_GPU_P1,"STATCOL_GPU_P1" }, -+ { STATCOL_GPU_P2,"STATCOL_GPU_P2" }, -+ { STATCOL_BB2D_P1,"STATCOL_BB2D_P1" }, -+ { STATCOL_DSS,"STATCOL_DSS" }, -+ { STATCOL_CSI2_2,"STATCOL_CSI2_2" }, -+ { STATCOL_MMU2,"STATCOL_MMU2" }, -+ { STATCOL_IPU1,"STATCOL_IPU1" }, -+ { STATCOL_IPU2,"STATCOL_IPU2" }, -+ { STATCOL_DMA_SYSTEM_RD,"STATCOL_DMA_SYSTEM_RD" }, -+ { STATCOL_DMA_SYSTEM_WR,"STATCOL_DMA_SYSTEM_WR" }, -+ { STATCOL_CSI2_1,"STATCOL_CSI2_1" }, -+ { STATCOL_USB3_SS,"STATCOL_USB3_SS" }, -+ { STATCOL_USB2_SS,"STATCOL_USB2_SS" }, -+ { STATCOL_USB2_ULPI_SS1,"STATCOL_USB2_ULPI_SS1" }, -+ { STATCOL_USB2_ULPI_SS2,"STATCOL_USB2_ULPI_SS2" }, -+ { STATCOL_PCIE_SS1,"STATCOL_PCIE_SS1" }, -+ { STATCOL_PCIE_SS2,"STATCOL_PCIE_SS2" }, -+ { STATCOL_DSP1_CFG,"STATCOL_DSP1_CFG" }, -+ { STATCOL_DSP2_CFG,"STATCOL_DSP2_CFG" }, -+ { STATCOL_GMAC_SW,"STATCOL_GMAC_SW" }, -+ { STATCOL_PRUSS1_P1,"STATCOL_PRUSS1_P1" }, -+ { STATCOL_PRUSS1_P2,"STATCOL_PRUSS1_P2" }, -+ { STATCOL_PRUSS2_P1,"STATCOL_PRUSS2_P1" }, -+ { STATCOL_PRUSS2_P2,"STATCOL_PRUSS2_P2" }, -+ { STATCOL_DMA_CRYPTO_RD,"STATCOL_DMA_CRYPTO_RD" }, -+ { STATCOL_DMA_CRYPTO_WR,"STATCOL_DMA_CRYPTO_WR" }, -+ { STATCOL_MPU2,"STATCOL_MPU2" }, -+ { STATCOL_MMC1,"STATCOL_MMC1" }, -+ { STATCOL_MMC2,"STATCOL_MMC2" }, -+ { STATCOL_SATA,"STATCOL_SATA" }, -+ { STATCOL_MLBSS,"STATCOL_MLBSS" }, -+ { STATCOL_BB2D_P2,"STATCOL_BB2D_P2" }, -+ { STATCOL_IEEE1500,"STATCOL_IEEE1500" }, -+ { STATCOL_DBG,"STATCOL_DBG" }, -+ { STATCOL_VCP1,"STATCOL_VCP1" }, -+ { STATCOL_OCMC_RAM1,"STATCOL_OCMC_RAM1" }, -+ { STATCOL_OCMC_RAM2,"STATCOL_OCMC_RAM2" }, -+ { STATCOL_OCMC_RAM3,"STATCOL_OCMC_RAM3" }, -+ { STATCOL_GPMC,"STATCOL_GPMC" }, -+ { STATCOL_MCASP1,"STATCOL_MCASP1" }, -+ { STATCOL_MCASP2,"STATCOL_MCASP2" }, -+ { STATCOL_MCASP3,"STATCOL_MCASP3" }, -+ { STATCOL_VCP2, "STATCOL_VCP2" } -+}; -+ -+StatCollectorObj gStatColState; -+ -+static void *statcoll_base_mem; -+static int *l3_3_clkctrl; -+ -+static UInt32 *statCountDSS = NULL; -+static UInt32 *statCountIVA = NULL; -+static UInt32 *statCountBB2DP1 = NULL; -+static UInt32 *statCountBB2DP2 = NULL; -+static UInt32 *statCountUSB4 = NULL; -+static UInt32 *statCountSata = NULL; -+static UInt32 *statCountEmif1 = NULL; -+static UInt32 *statCountEmif2 = NULL; -+ -+ -+static statcoll_initiators_object global_object[STATCOL_MAX]; -+UInt32 statCountIdx = 0; -+UInt32 TRACE_SZ = 0; -+ -+void create_overall_box(struct _bar_graph_y_config *y_cfg, struct _text_config *t_cfg, char *text[]) -+{ -+ int i=0; -+ -+ memset(y_cfg, 0x0, sizeof(struct _y_config)*25); -+ memset(t_cfg, 0x0, sizeof(struct _text_config)*25); -+ -+ -+ for(i=0; i<TOTAL_Y_PARAMETERS; i++) { -+ (y_cfg+i)->line_color.r = 1.0; -+ (y_cfg+i)->line_color.g = 1.0; -+ (y_cfg+i)->line_color.b = 1.0; -+ (y_cfg+i)->line_color.a = 0.7; -+ (y_cfg+i)->fill_color.r = 0.0; -+ (y_cfg+i)->fill_color.g = 0.0; -+ (y_cfg+i)->fill_color.b = 0.0; -+ (y_cfg+i)->fill_color.a = 0.1; -+ } -+ -+ (y_cfg+0)->region.bottom_left.x = 0; -+ (y_cfg+0)->region.bottom_left.y = MAX_HEIGHT - HEIGHT_EMIF_AREA; -+ (y_cfg+0)->region.top_right.x = MAX_WIDTH; -+ (y_cfg+0)->region.top_right.y = 0; -+ -+ (t_cfg+0)->at.x = MAX_WIDTH/2 - 8*FONT_SIZE - 50; -+ (t_cfg+0)->at.y = BORDER - FONT_SIZE + 6; -+ strcpy(text[0], string_list[0]); -+ -+ (y_cfg+1)->region.bottom_left.x = TIME_GRAPH_AREA_BL_X; -+ (y_cfg+1)->region.bottom_left.y = TIME_GRAPH_AREA_BL_Y; -+ (y_cfg+1)->region.top_right.x = TIME_GRAPH_AREA_TR_X; -+ (y_cfg+1)->region.top_right.y = TIME_GRAPH_AREA_TR_Y; -+ -+ (t_cfg+1)->at.x = TIME_GRAPH_AREA_BL_X - 2*FONT_SIZE; -+ (t_cfg+1)->at.y = TIME_GRAPH_AREA_TR_Y; -+ strcpy(text[1],string_list[1]); -+ -+ for(i=2; i<7; i++) -+ { -+ (y_cfg+i)->region.bottom_left.x = TIME_GRAPH_AREA_BL_X; -+ (y_cfg+i)->region.bottom_left.y = TIME_GRAPH_AREA_BL_Y;// - (i-2) * (30); -+ (y_cfg+i)->region.top_right.x = TIME_GRAPH_AREA_TR_X; -+ (y_cfg+i)->region.top_right.y = TIME_GRAPH_AREA_TR_Y + (i-1) * ((TIME_GRAPH_AREA_BL_Y - TIME_GRAPH_AREA_TR_Y)/5); -+ (t_cfg+i)->at.x = TIME_GRAPH_AREA_BL_X - 2*FONT_SIZE; -+ (t_cfg+i)->at.y = TIME_GRAPH_AREA_TR_Y + (i-1) * ((TIME_GRAPH_AREA_BL_Y - TIME_GRAPH_AREA_TR_Y)/5);//TIME_GRAPH_AREA_TR_Y; -+ strcpy(text[i],string_list[i]); -+ } -+ -+#if 1 -+ (y_cfg+7)->region.bottom_left.x = EMIF_AREA_BL_X; -+ (y_cfg+7)->region.bottom_left.y = EMIF_AREA_BL_Y; -+ (y_cfg+7)->region.top_right.x = EMIF_AREA_TR_X; -+ (y_cfg+7)->region.top_right.y = EMIF_AREA_TR_Y; -+ -+ (t_cfg+7)->at.x = WIDTH_EMIF_AREA/2 - 2*FONT_SIZE; -+ (t_cfg+7)->at.y = EMIF_AREA_TR_Y + FONT_SIZE; -+ strcpy(text[7],string_list[7]); -+ -+ for(i=8; i<12; i=i+2) -+ { -+ (y_cfg+i)->region.bottom_left.x = EMIF_AREA_BL_X + BORDER + (i-8)*(BAR_WIDTH+BAR_GAP)/2; -+ (y_cfg+i)->region.bottom_left.y = EMIF_AREA_BL_Y - BORDER/2;// - (i-2) * (30); -+ (y_cfg+i)->region.top_right.x = EMIF_AREA_BL_X + BORDER + BAR_WIDTH + (i-8) * (BAR_WIDTH + BAR_GAP)/2; -+ (y_cfg+i)->region.top_right.y = EMIF_AREA_TR_Y + BORDER * 1.2; -+ -+ (y_cfg+i)->fill_color.r = 1.0; -+ (y_cfg+i)->fill_color.g = 0.0; -+ (y_cfg+i)->fill_color.b = 0.0; -+ (y_cfg+i)->fill_color.a = 0.1; -+ -+ (y_cfg+i+1)->region.bottom_left.x = EMIF_AREA_BL_X + BORDER + (i-8) * (BAR_WIDTH + BAR_GAP)/2; -+ (y_cfg+i+1)->region.bottom_left.y = EMIF_AREA_BL_Y - BORDER/2; -+ (y_cfg+i+1)->region.top_right.x = EMIF_AREA_BL_X + BORDER + BAR_WIDTH + (i-8) * (BAR_WIDTH + BAR_GAP)/2; -+ (y_cfg+i+1)->region.top_right.y = EMIF_AREA_TR_Y + BORDER*1.2; -+ -+ (y_cfg+i+1)->fill_color.r = 0.0; -+ (y_cfg+i+1)->fill_color.g = 1.0; -+ (y_cfg+i+1)->fill_color.b = 0.0; -+ (y_cfg+i+1)->fill_color.a = 1.0; -+ -+ (t_cfg+i)->at.x = EMIF_AREA_BL_X + BAR_WIDTH + BORDER + (i-8) * (BAR_WIDTH + BAR_GAP)/2- 2.2*FONT_SIZE; -+ (t_cfg+i)->at.y = EMIF_AREA_TR_Y + BORDER*1.2 -5; -+ -+ /* Fixed strings */ -+ (t_cfg+i+1)->at.x = EMIF_AREA_BL_X + BORDER + (i-8) * (BAR_WIDTH + BAR_GAP)/2; -+ (t_cfg+i+1)->at.y = EMIF_AREA_BL_Y;// - BORDER + FONT_SIZE; -+ -+ strcpy(text[i],string_list[i]); -+ strcpy(text[i+1],string_list[i+1]); -+ } -+ -+ (y_cfg+12)->region.bottom_left.x = INITIATORS_AREA_BL_X; -+ (y_cfg+12)->region.bottom_left.y = INITIATORS_AREA_BL_Y; -+ (y_cfg+12)->region.top_right.x = INITIATORS_AREA_TR_X; -+ (y_cfg+12)->region.top_right.y = INITIATORS_AREA_TR_Y; -+ -+ (t_cfg+12)->at.x = EMIF_AREA_TR_X + (INITIATORS_AREA_TR_X - INITIATORS_AREA_BL_X)/2 - 4 * FONT_SIZE; -+ (t_cfg+12)->at.y = INITIATORS_AREA_TR_Y + FONT_SIZE; -+ strcpy(text[12],string_list[12]); -+ -+ for(i=13; i<25; i=i+2) -+ { -+ (y_cfg+i)->region.bottom_left.x = INITIATORS_AREA_BL_X + BORDER + (i-13)*(BAR_WIDTH+BAR_GAP)/2; -+ (y_cfg+i)->region.bottom_left.y = INITIATORS_AREA_BL_Y - BORDER/2;// - (i-2) * (30); -+ (y_cfg+i)->region.top_right.x = INITIATORS_AREA_BL_X + BORDER + BAR_WIDTH + (i-13) * (BAR_WIDTH + BAR_GAP)/2; -+ (y_cfg+i)->region.top_right.y = INITIATORS_AREA_TR_Y + BORDER*1.2; -+ -+ (y_cfg+i)->fill_color.r = 1.0; -+ (y_cfg+i)->fill_color.g = 0.0; -+ (y_cfg+i)->fill_color.b = 0.0; -+ (y_cfg+i)->fill_color.a = 0.1; -+ -+ (y_cfg+i+1)->region.bottom_left.x = INITIATORS_AREA_BL_X + BORDER + (i-13) * (BAR_WIDTH + BAR_GAP)/2; -+ (y_cfg+i+1)->region.bottom_left.y = INITIATORS_AREA_BL_Y - BORDER/2;// - (i-2) * (30); -+ (y_cfg+i+1)->region.top_right.x = INITIATORS_AREA_BL_X + BORDER + BAR_WIDTH + (i-13) * (BAR_WIDTH + BAR_GAP)/2; -+ (y_cfg+i+1)->region.top_right.y = INITIATORS_AREA_TR_Y + BORDER* 1.2; -+ -+ (y_cfg+i+1)->fill_color.r = 0.0; -+ (y_cfg+i+1)->fill_color.g = 1.0; -+ (y_cfg+i+1)->fill_color.b = 0.0; -+ (y_cfg+i+1)->fill_color.a = 1.0; -+ -+ (t_cfg+i)->at.x = INITIATORS_AREA_BL_X + BORDER + BAR_WIDTH + (i-13) * (BAR_WIDTH + BAR_GAP)/2 - 2.2* FONT_SIZE; -+ (t_cfg+i)->at.y = INITIATORS_AREA_TR_Y + BORDER*1.2 -5; -+ -+ (t_cfg+i+1)->at.x = INITIATORS_AREA_BL_X + BORDER + (i-13)*(BAR_WIDTH+BAR_GAP)/2; -+ (t_cfg+i+1)->at.y = INITIATORS_AREA_BL_Y; -+ -+ strcpy(text[i],string_list[i]); -+ strcpy(text[i+1],string_list[i+1]); -+ } -+#endif -+ -+#if 0 -+ for(i=0; i<25; i++) -+ printf("(%d, %d) to (%d, %d)\n", (y_cfg +i)->region.bottom_left.x,(y_cfg +i)->region.bottom_left.y,(y_cfg +i)->region.top_right.x, (y_cfg +i)->region.top_right.y); -+#endif -+ -+ -+ -+ for(i=0; i<25; i++) { -+ (t_cfg+i)->color.r = 0.0; -+ (t_cfg+i)->color.g = 1.0; -+ (t_cfg+i)->color.b = 1.0; -+ (t_cfg+i)->color.a = 1.0; -+ (t_cfg+i)->fontsize = FONT_SIZE; -+ } -+ (t_cfg+0)->fontsize = 20; -+ -+ -+} -+ -+ -+void statCollectorInit() -+{ -+ int index; -+ -+ gStatColState.stat0_filter_cnt = 0; -+ gStatColState.stat1_filter_cnt = 0; -+ gStatColState.stat2_filter_cnt = 0; -+ gStatColState.stat3_filter_cnt = 0; -+ gStatColState.stat4_filter_cnt = 0; -+ gStatColState.stat5_filter_cnt = 0; -+ gStatColState.stat6_filter_cnt = 0; -+ gStatColState.stat7_filter_cnt = 0; -+ gStatColState.stat8_filter_cnt = 0; -+ gStatColState.stat9_filter_cnt = 0; -+ -+ for(index=STATCOL_EMIF1_SYS; index < STATCOL_MAX; index++) -+ { -+ global_object[index].b_enabled = 0; -+ -+ strcpy(global_object[index].name, initiators[index].name); -+ -+ global_object[index].readings = malloc(TRACE_SZ * sizeof(UInt32)); -+ memset(global_object[index].readings, 0, TRACE_SZ * sizeof(UInt32)); -+ -+ global_object[index].timestamp = NULL; -+ -+ global_object[index].group_id = 0xFF; -+ global_object[index].counter_id = 0; -+ global_object[index].base_address = 0; -+ global_object[index].mux_req = 0; -+ } -+ -+} -+ -+void wr_stat_reg(UInt32 address, UInt32 data) -+{ -+ UInt32 *mymem = statcoll_base_mem; -+ UInt32 delta = (address - STATCOLL_BASE) / 4; -+#ifndef DUMMY_MODE -+ mymem[delta] = data; -+#else -+ printf("WRITE: Address = 0x%x, Data = 0x%x\n", address, data); -+#endif -+} -+ -+UInt32 rd_stat_reg(UInt32 address) -+{ -+#ifndef DUMMY_MODE -+ UInt32 *mymem = statcoll_base_mem; -+ UInt32 data; -+ UInt32 delta = (address - STATCOLL_BASE) / 4; -+ data = mymem[delta]; -+ return data; -+#else -+ printf("READ: Address = 0x%x\n", address); -+#endif -+} -+ -+UInt32 statCollectorControlInitialize(UInt32 instance_id) -+{ -+ UInt32 cur_base_address = 0; -+ UInt32 cur_event_mux_req; -+ UInt32 cur_event_mux_resp; -+ UInt32 cur_stat_filter_cnt; -+ -+ switch (instance_id) -+ { -+ case STATCOL_EMIF1_SYS: -+ cur_base_address = stat_coll0_base_address; -+ cur_event_mux_req = 0; -+ cur_event_mux_resp = 1; -+ gStatColState.stat0_filter_cnt = gStatColState.stat0_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat0_filter_cnt; -+ global_object[instance_id].group_id = 0; -+ break; -+ case STATCOL_EMIF2_SYS: -+ cur_base_address = stat_coll0_base_address; -+ cur_event_mux_req = 2; -+ cur_event_mux_resp = 3; -+ gStatColState.stat0_filter_cnt = gStatColState.stat0_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat0_filter_cnt; -+ global_object[instance_id].group_id = 0; -+ break; -+ case STATCOL_MA_MPU_P1: -+ cur_base_address = stat_coll0_base_address; -+ cur_event_mux_req = 4; -+ cur_event_mux_resp = 5; -+ gStatColState.stat0_filter_cnt = gStatColState.stat0_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat0_filter_cnt; -+ global_object[instance_id].group_id = 0; -+ break; -+ case STATCOL_MA_MPU_P2: -+ cur_base_address = stat_coll0_base_address; -+ cur_event_mux_req = 6; -+ cur_event_mux_resp = 7; -+ gStatColState.stat0_filter_cnt = gStatColState.stat0_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat0_filter_cnt; -+ global_object[instance_id].group_id = 0; -+ break; -+ case STATCOL_MPU1: -+ cur_base_address = stat_coll1_base_address; -+ cur_event_mux_req = 0; -+ cur_event_mux_resp = 1; -+ gStatColState.stat1_filter_cnt = gStatColState.stat1_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat1_filter_cnt; -+ global_object[instance_id].group_id = 1; -+ break; -+ case STATCOL_MMU1: -+ cur_base_address = stat_coll1_base_address; -+ cur_event_mux_req = 2; -+ cur_event_mux_resp = 3; -+ gStatColState.stat1_filter_cnt = gStatColState.stat1_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat1_filter_cnt; -+ global_object[instance_id].group_id = 1; -+ break; -+ case STATCOL_TPTC_RD1: -+ cur_base_address = stat_coll1_base_address; -+ cur_event_mux_req = 4; -+ cur_event_mux_resp = 5; -+ gStatColState.stat1_filter_cnt = gStatColState.stat1_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat1_filter_cnt; -+ global_object[instance_id].group_id = 1; -+ break; -+ case STATCOL_TPTC_WR1: -+ cur_base_address = stat_coll1_base_address; -+ cur_event_mux_req = 6; -+ cur_event_mux_resp = 7; -+ gStatColState.stat1_filter_cnt = gStatColState.stat1_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat1_filter_cnt; -+ global_object[instance_id].group_id = 1; -+ break; -+ case STATCOL_TPTC_RD2: -+ cur_base_address = stat_coll1_base_address; -+ cur_event_mux_req = 8; -+ cur_event_mux_resp = 9; -+ gStatColState.stat1_filter_cnt = gStatColState.stat1_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat1_filter_cnt; -+ global_object[instance_id].group_id = 1; -+ break; -+ case STATCOL_TPTC_WR2: -+ cur_base_address = stat_coll1_base_address; -+ cur_event_mux_req = 10; -+ cur_event_mux_resp = 11; -+ gStatColState.stat1_filter_cnt = gStatColState.stat1_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat1_filter_cnt; -+ global_object[instance_id].group_id = 1; -+ break; -+ case STATCOL_VIP1_P1: -+ cur_base_address = stat_coll2_base_address; -+ cur_event_mux_req = 0; -+ cur_event_mux_resp = 1; -+ gStatColState.stat2_filter_cnt = gStatColState.stat2_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat2_filter_cnt; -+ global_object[instance_id].group_id = 2; -+ break; -+ case STATCOL_VIP1_P2: -+ cur_base_address = stat_coll2_base_address; -+ cur_event_mux_req = 2; -+ cur_event_mux_resp = 3; -+ gStatColState.stat2_filter_cnt = gStatColState.stat2_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat2_filter_cnt; -+ global_object[instance_id].group_id = 2; -+ break; -+ case STATCOL_VIP2_P1: -+ cur_base_address = stat_coll2_base_address; -+ cur_event_mux_req = 4; -+ cur_event_mux_resp = 5; -+ gStatColState.stat2_filter_cnt = gStatColState.stat2_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat2_filter_cnt; -+ global_object[instance_id].group_id = 2; -+ break; -+ case STATCOL_VIP2_P2: -+ cur_base_address = stat_coll2_base_address; -+ cur_event_mux_req = 6; -+ cur_event_mux_resp = 7; -+ gStatColState.stat2_filter_cnt = gStatColState.stat2_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat2_filter_cnt; -+ global_object[instance_id].group_id = 2; -+ break; -+ case STATCOL_VIP3_P1: -+ cur_base_address = stat_coll2_base_address; -+ cur_event_mux_req = 8; -+ cur_event_mux_resp = 9; -+ gStatColState.stat2_filter_cnt = gStatColState.stat2_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat2_filter_cnt; -+ global_object[instance_id].group_id = 2; -+ break; -+ case STATCOL_VIP3_P2: -+ cur_base_address = stat_coll2_base_address; -+ cur_event_mux_req = 10; -+ cur_event_mux_resp = 11; -+ gStatColState.stat2_filter_cnt = gStatColState.stat2_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat2_filter_cnt; -+ global_object[instance_id].group_id = 2; -+ break; -+ case STATCOL_VPE_P1: -+ cur_base_address = stat_coll2_base_address; -+ cur_event_mux_req = 12; -+ cur_event_mux_resp = 13; -+ gStatColState.stat2_filter_cnt = gStatColState.stat2_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat2_filter_cnt; -+ global_object[instance_id].group_id = 2; -+ break; -+ case STATCOL_VPE_P2: -+ cur_base_address = stat_coll2_base_address; -+ cur_event_mux_req = 14; -+ cur_event_mux_resp = 15; -+ gStatColState.stat2_filter_cnt = gStatColState.stat2_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat2_filter_cnt; -+ global_object[instance_id].group_id = 2; -+ break; -+ case STATCOL_EVE1_TC0: -+ cur_base_address = stat_coll3_base_address; -+ cur_event_mux_req = 0; -+ cur_event_mux_resp = 1; -+ gStatColState.stat3_filter_cnt = gStatColState.stat3_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat3_filter_cnt; -+ global_object[instance_id].group_id = 3; -+ break; -+ case STATCOL_EVE1_TC1: -+ cur_base_address = stat_coll3_base_address; -+ cur_event_mux_req = 2; -+ cur_event_mux_resp = 3; -+ gStatColState.stat3_filter_cnt = gStatColState.stat3_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat3_filter_cnt; -+ global_object[instance_id].group_id = 3; -+ break; -+ case STATCOL_EVE2_TC0: -+ cur_base_address = stat_coll3_base_address; -+ cur_event_mux_req = 4; -+ cur_event_mux_resp = 5; -+ gStatColState.stat3_filter_cnt = gStatColState.stat3_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat3_filter_cnt; -+ global_object[instance_id].group_id = 3; -+ break; -+ case STATCOL_EVE2_TC1: -+ cur_base_address = stat_coll3_base_address; -+ cur_event_mux_req = 6; -+ cur_event_mux_resp = 7; -+ gStatColState.stat3_filter_cnt = gStatColState.stat3_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat3_filter_cnt; -+ global_object[instance_id].group_id = 3; -+ break; -+ case STATCOL_EVE3_TC0: -+ cur_base_address = stat_coll3_base_address; -+ cur_event_mux_req = 8; -+ cur_event_mux_resp = 9; -+ gStatColState.stat3_filter_cnt = gStatColState.stat3_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat3_filter_cnt; -+ global_object[instance_id].group_id = 3; -+ break; -+ case STATCOL_EVE3_TC1: -+ cur_base_address = stat_coll3_base_address; -+ cur_event_mux_req = 10; -+ cur_event_mux_resp = 11; -+ gStatColState.stat3_filter_cnt = gStatColState.stat3_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat3_filter_cnt; -+ global_object[instance_id].group_id = 3; -+ break; -+ case STATCOL_EVE4_TC0: -+ cur_base_address = stat_coll3_base_address; -+ cur_event_mux_req = 12; -+ cur_event_mux_resp = 13; -+ gStatColState.stat3_filter_cnt = gStatColState.stat3_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat3_filter_cnt; -+ global_object[instance_id].group_id = 3; -+ break; -+ case STATCOL_EVE4_TC1: -+ cur_base_address = stat_coll3_base_address; -+ cur_event_mux_req = 14; -+ cur_event_mux_resp = 15; -+ gStatColState.stat3_filter_cnt = gStatColState.stat3_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat3_filter_cnt; -+ global_object[instance_id].group_id = 3; -+ break; -+ case STATCOL_DSP1_MDMA: -+ cur_base_address = stat_coll4_base_address; -+ cur_event_mux_req = 0; -+ cur_event_mux_resp = 1; -+ gStatColState.stat4_filter_cnt = gStatColState.stat4_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat4_filter_cnt; -+ global_object[instance_id].group_id = 4; -+ break; -+ case STATCOL_DSP1_EDMA: -+ cur_base_address = stat_coll4_base_address; -+ cur_event_mux_req = 2; -+ cur_event_mux_resp = 3; -+ gStatColState.stat4_filter_cnt = gStatColState.stat4_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat4_filter_cnt; -+ global_object[instance_id].group_id = 4; -+ break; -+ case STATCOL_DSP2_MDMA: -+ cur_base_address = stat_coll4_base_address; -+ cur_event_mux_req = 4; -+ cur_event_mux_resp = 5; -+ gStatColState.stat4_filter_cnt = gStatColState.stat4_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat4_filter_cnt; -+ global_object[instance_id].group_id = 4; -+ break; -+ case STATCOL_DSP2_EDMA: -+ cur_base_address = stat_coll4_base_address; -+ cur_event_mux_req = 6; -+ cur_event_mux_resp = 7; -+ gStatColState.stat4_filter_cnt = gStatColState.stat4_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat4_filter_cnt; -+ global_object[instance_id].group_id = 4; -+ break; -+ case STATCOL_IVA: -+ cur_base_address = stat_coll4_base_address; -+ cur_event_mux_req = 8; -+ cur_event_mux_resp = 9; -+ gStatColState.stat4_filter_cnt = gStatColState.stat4_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat4_filter_cnt; -+ global_object[instance_id].group_id = 4; -+ break; -+ case STATCOL_GPU_P1: -+ cur_base_address = stat_coll4_base_address; -+ cur_event_mux_req = 10; -+ cur_event_mux_resp = 11; -+ gStatColState.stat4_filter_cnt = gStatColState.stat4_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat4_filter_cnt; -+ global_object[instance_id].group_id = 4; -+ break; -+ case STATCOL_GPU_P2: -+ cur_base_address = stat_coll4_base_address; -+ cur_event_mux_req = 12; -+ cur_event_mux_resp = 13; -+ gStatColState.stat4_filter_cnt = gStatColState.stat4_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat4_filter_cnt; -+ global_object[instance_id].group_id = 4; -+ break; -+ case STATCOL_BB2D_P1: -+ cur_base_address = stat_coll4_base_address; -+ cur_event_mux_req = 14; -+ cur_event_mux_resp = 15; -+ gStatColState.stat4_filter_cnt = gStatColState.stat4_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat4_filter_cnt; -+ global_object[instance_id].group_id = 4; -+ break; -+ case STATCOL_DSS: -+ cur_base_address = stat_coll5_base_address; -+ cur_event_mux_req = 0; -+ cur_event_mux_resp = 1; -+ gStatColState.stat5_filter_cnt = gStatColState.stat5_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat5_filter_cnt; -+ global_object[instance_id].group_id = 5; -+ break; -+ case STATCOL_CSI2_2: -+ cur_base_address = stat_coll5_base_address; -+ cur_event_mux_req = 2; -+ cur_event_mux_resp = 3; -+ gStatColState.stat5_filter_cnt = gStatColState.stat5_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat5_filter_cnt; -+ global_object[instance_id].group_id = 5; -+ break; -+ case STATCOL_MMU2: -+ cur_base_address = stat_coll5_base_address; -+ cur_event_mux_req = 4; -+ cur_event_mux_resp = 5; -+ gStatColState.stat5_filter_cnt = gStatColState.stat5_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat5_filter_cnt; -+ global_object[instance_id].group_id = 5; -+ break; -+ case STATCOL_IPU1: -+ cur_base_address = stat_coll5_base_address; -+ cur_event_mux_req = 6; -+ cur_event_mux_resp = 7; -+ gStatColState.stat5_filter_cnt = gStatColState.stat5_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat5_filter_cnt; -+ global_object[instance_id].group_id = 5; -+ break; -+ case STATCOL_IPU2: -+ cur_base_address = stat_coll5_base_address; -+ cur_event_mux_req = 8; -+ cur_event_mux_resp = 9; -+ gStatColState.stat5_filter_cnt = gStatColState.stat5_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat5_filter_cnt; -+ global_object[instance_id].group_id = 5; -+ break; -+ case STATCOL_DMA_SYSTEM_RD: -+ cur_base_address = stat_coll5_base_address; -+ cur_event_mux_req = 10; -+ cur_event_mux_resp = 11; -+ gStatColState.stat5_filter_cnt = gStatColState.stat5_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat5_filter_cnt; -+ global_object[instance_id].group_id = 5; -+ break; -+ case STATCOL_DMA_SYSTEM_WR: -+ cur_base_address = stat_coll5_base_address; -+ cur_event_mux_req = 12; -+ cur_event_mux_resp = 13; -+ gStatColState.stat5_filter_cnt = gStatColState.stat5_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat5_filter_cnt; -+ global_object[instance_id].group_id = 5; -+ break; -+ case STATCOL_CSI2_1: -+ cur_base_address = stat_coll5_base_address; -+ cur_event_mux_req = 14; -+ cur_event_mux_resp = 15; -+ gStatColState.stat5_filter_cnt = gStatColState.stat5_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat5_filter_cnt; -+ global_object[instance_id].group_id = 5; -+ break; -+ case STATCOL_USB3_SS: -+ cur_base_address = stat_coll6_base_address; -+ cur_event_mux_req = 0; -+ cur_event_mux_resp = 1; -+ gStatColState.stat6_filter_cnt = gStatColState.stat6_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat6_filter_cnt; -+ global_object[instance_id].group_id = 6; -+ break; -+ case STATCOL_USB2_SS: -+ cur_base_address = stat_coll6_base_address; -+ cur_event_mux_req = 2; -+ cur_event_mux_resp = 3; -+ gStatColState.stat6_filter_cnt = gStatColState.stat6_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat6_filter_cnt; -+ global_object[instance_id].group_id = 6; -+ break; -+ case STATCOL_USB2_ULPI_SS1: -+ cur_base_address = stat_coll6_base_address; -+ cur_event_mux_req = 4; -+ cur_event_mux_resp = 5; -+ gStatColState.stat6_filter_cnt = gStatColState.stat6_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat6_filter_cnt; -+ global_object[instance_id].group_id = 6; -+ break; -+ case STATCOL_USB2_ULPI_SS2: -+ cur_base_address = stat_coll6_base_address; -+ cur_event_mux_req = 6; -+ cur_event_mux_resp = 7; -+ gStatColState.stat6_filter_cnt = gStatColState.stat6_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat6_filter_cnt; -+ global_object[instance_id].group_id = 6; -+ break; -+ case STATCOL_PCIE_SS1: -+ cur_base_address = stat_coll6_base_address; -+ cur_event_mux_req = 8; -+ cur_event_mux_resp = 9; -+ gStatColState.stat6_filter_cnt = gStatColState.stat6_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat6_filter_cnt; -+ global_object[instance_id].group_id = 6; -+ break; -+ case STATCOL_PCIE_SS2: -+ cur_base_address = stat_coll6_base_address; -+ cur_event_mux_req = 10; -+ cur_event_mux_resp = 11; -+ gStatColState.stat6_filter_cnt = gStatColState.stat6_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat6_filter_cnt; -+ global_object[instance_id].group_id = 6; -+ break; -+ case STATCOL_DSP1_CFG: -+ cur_base_address = stat_coll6_base_address; -+ cur_event_mux_req = 12; -+ cur_event_mux_resp = 13; -+ gStatColState.stat6_filter_cnt = gStatColState.stat6_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat6_filter_cnt; -+ global_object[instance_id].group_id = 6; -+ break; -+ case STATCOL_DSP2_CFG: -+ cur_base_address = stat_coll6_base_address; -+ cur_event_mux_req = 14; -+ cur_event_mux_resp = 15; -+ gStatColState.stat6_filter_cnt = gStatColState.stat6_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat6_filter_cnt; -+ global_object[instance_id].group_id = 6; -+ break; -+ case STATCOL_GMAC_SW: -+ cur_base_address = stat_coll7_base_address; -+ cur_event_mux_req = 0; -+ cur_event_mux_resp = 1; -+ gStatColState.stat7_filter_cnt = gStatColState.stat7_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat7_filter_cnt; -+ global_object[instance_id].group_id = 7; -+ break; -+ case STATCOL_PRUSS1_P1: -+ cur_base_address = stat_coll7_base_address; -+ cur_event_mux_req = 2; -+ cur_event_mux_resp = 3; -+ gStatColState.stat7_filter_cnt = gStatColState.stat7_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat7_filter_cnt; -+ global_object[instance_id].group_id = 7; -+ break; -+ case STATCOL_PRUSS1_P2: -+ cur_base_address = stat_coll7_base_address; -+ cur_event_mux_req = 4; -+ cur_event_mux_resp = 5; -+ gStatColState.stat7_filter_cnt = gStatColState.stat7_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat7_filter_cnt; -+ global_object[instance_id].group_id = 7; -+ break; -+ case STATCOL_PRUSS2_P1: -+ cur_base_address = stat_coll7_base_address; -+ cur_event_mux_req = 6; -+ cur_event_mux_resp = 7; -+ gStatColState.stat7_filter_cnt = gStatColState.stat7_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat7_filter_cnt; -+ global_object[instance_id].group_id = 7; -+ break; -+ case STATCOL_PRUSS2_P2: -+ cur_base_address = stat_coll7_base_address; -+ cur_event_mux_req = 8; -+ cur_event_mux_resp = 9; -+ gStatColState.stat7_filter_cnt = gStatColState.stat7_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat7_filter_cnt; -+ global_object[instance_id].group_id = 7; -+ break; -+ case STATCOL_DMA_CRYPTO_RD: -+ cur_base_address = stat_coll7_base_address; -+ cur_event_mux_req = 10; -+ cur_event_mux_resp = 11; -+ gStatColState.stat7_filter_cnt = gStatColState.stat7_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat7_filter_cnt; -+ global_object[instance_id].group_id = 7; -+ break; -+ case STATCOL_DMA_CRYPTO_WR: -+ cur_base_address = stat_coll7_base_address; -+ cur_event_mux_req = 12; -+ cur_event_mux_resp = 13; -+ gStatColState.stat7_filter_cnt = gStatColState.stat7_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat7_filter_cnt; -+ global_object[instance_id].group_id = 7; -+ break; -+ case STATCOL_MPU2: -+ cur_base_address = stat_coll7_base_address; -+ cur_event_mux_req = 14; -+ cur_event_mux_resp = 15; -+ gStatColState.stat7_filter_cnt = gStatColState.stat7_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat7_filter_cnt; -+ global_object[instance_id].group_id = 7; -+ break; -+ case STATCOL_MMC1: -+ cur_base_address = stat_coll8_base_address; -+ cur_event_mux_req = 0; -+ cur_event_mux_resp = 1; -+ gStatColState.stat8_filter_cnt = gStatColState.stat8_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat8_filter_cnt; -+ global_object[instance_id].group_id = 8; -+ break; -+ case STATCOL_MMC2: -+ cur_base_address = stat_coll8_base_address; -+ cur_event_mux_req = 2; -+ cur_event_mux_resp = 3; -+ gStatColState.stat8_filter_cnt = gStatColState.stat8_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat8_filter_cnt; -+ global_object[instance_id].group_id = 8; -+ break; -+ case STATCOL_SATA: -+ cur_base_address = stat_coll8_base_address; -+ cur_event_mux_req = 4; -+ cur_event_mux_resp = 5; -+ gStatColState.stat8_filter_cnt = gStatColState.stat8_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat8_filter_cnt; -+ global_object[instance_id].group_id = 8; -+ break; -+ case STATCOL_MLBSS: -+ cur_base_address = stat_coll8_base_address; -+ cur_event_mux_req = 6; -+ cur_event_mux_resp = 7; -+ gStatColState.stat8_filter_cnt = gStatColState.stat8_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat8_filter_cnt; -+ global_object[instance_id].group_id = 8; -+ break; -+ case STATCOL_BB2D_P2: -+ cur_base_address = stat_coll8_base_address; -+ cur_event_mux_req = 8; -+ cur_event_mux_resp = 9; -+ gStatColState.stat8_filter_cnt = gStatColState.stat8_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat8_filter_cnt; -+ global_object[instance_id].group_id = 8; -+ break; -+ case STATCOL_IEEE1500: -+ cur_base_address = stat_coll8_base_address; -+ cur_event_mux_req = 10; -+ cur_event_mux_resp = 11; -+ gStatColState.stat8_filter_cnt = gStatColState.stat8_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat8_filter_cnt; -+ global_object[instance_id].group_id = 8; -+ break; -+ case STATCOL_DBG: -+ cur_base_address = stat_coll8_base_address; -+ cur_event_mux_req = 12; -+ cur_event_mux_resp = 13; -+ gStatColState.stat8_filter_cnt = gStatColState.stat8_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat8_filter_cnt; -+ global_object[instance_id].group_id = 8; -+ break; -+ case STATCOL_VCP1: -+ cur_base_address = stat_coll8_base_address; -+ cur_event_mux_req = 14; -+ cur_event_mux_resp = 15; -+ gStatColState.stat8_filter_cnt = gStatColState.stat8_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat8_filter_cnt; -+ global_object[instance_id].group_id = 8; -+ break; -+ case STATCOL_OCMC_RAM1: -+ cur_base_address = stat_coll9_base_address; -+ cur_event_mux_req = 0; -+ cur_event_mux_resp = 1; -+ gStatColState.stat9_filter_cnt = gStatColState.stat9_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat9_filter_cnt; -+ global_object[instance_id].group_id = 9; -+ break; -+ case STATCOL_OCMC_RAM2: -+ cur_base_address = stat_coll9_base_address; -+ cur_event_mux_req = 2; -+ cur_event_mux_resp = 3; -+ gStatColState.stat9_filter_cnt = gStatColState.stat9_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat9_filter_cnt; -+ global_object[instance_id].group_id = 9; -+ break; -+ case STATCOL_OCMC_RAM3: -+ cur_base_address = stat_coll9_base_address; -+ cur_event_mux_req = 4; -+ cur_event_mux_resp = 5; -+ gStatColState.stat9_filter_cnt = gStatColState.stat9_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat9_filter_cnt; -+ global_object[instance_id].group_id = 9; -+ break; -+ case STATCOL_GPMC: -+ cur_base_address = stat_coll9_base_address; -+ cur_event_mux_req = 6; -+ cur_event_mux_resp = 7; -+ gStatColState.stat9_filter_cnt = gStatColState.stat9_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat9_filter_cnt; -+ global_object[instance_id].group_id = 9; -+ break; -+ case STATCOL_MCASP1: -+ cur_base_address = stat_coll9_base_address; -+ cur_event_mux_req = 8; -+ cur_event_mux_resp = 9; -+ gStatColState.stat9_filter_cnt = gStatColState.stat9_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat9_filter_cnt; -+ global_object[instance_id].group_id = 9; -+ break; -+ case STATCOL_MCASP2: -+ cur_base_address = stat_coll9_base_address; -+ cur_event_mux_req = 10; -+ cur_event_mux_resp = 11; -+ gStatColState.stat9_filter_cnt = gStatColState.stat9_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat9_filter_cnt; -+ global_object[instance_id].group_id = 9; -+ break; -+ case STATCOL_MCASP3: -+ cur_base_address = stat_coll9_base_address; -+ cur_event_mux_req = 12; -+ cur_event_mux_resp = 13; -+ gStatColState.stat9_filter_cnt = gStatColState.stat9_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat9_filter_cnt; -+ global_object[instance_id].group_id = 9; -+ break; -+ case STATCOL_VCP2: -+ cur_base_address = stat_coll9_base_address; -+ cur_event_mux_req = 14; -+ cur_event_mux_resp = 15; -+ gStatColState.stat9_filter_cnt = gStatColState.stat9_filter_cnt + 1; -+ cur_stat_filter_cnt = gStatColState.stat9_filter_cnt; -+ global_object[instance_id].group_id = 9; -+ break; -+ default: -+ printf("ERROR: Unknown initiator %d\n", instance_id); -+ exit(0); -+ }; -+ -+ { -+ if ( cur_stat_filter_cnt > 4 ) -+ { -+ printf("WARNING: We have exhausted filters/counters.....\n"); -+ return 0; -+ } -+ // Global Enable Stat Collector -+ wr_stat_reg(cur_base_address+0x8,0x1); -+ -+ // Soft Enable Stat Collector -+ wr_stat_reg(cur_base_address+0xC,0x1); -+ -+ wr_stat_reg(cur_base_address+0x18,0x5); -+ // Operation of Stat Collector / RespEvt => Packet -+ wr_stat_reg(cur_base_address+0x1C,0x5); -+ -+ -+ // Event Sel -+ wr_stat_reg(cur_base_address+0x20+4*(cur_stat_filter_cnt-1),cur_event_mux_req); -+ -+ // Op is EventInfo -+ wr_stat_reg(cur_base_address+0x1FC+(0x158*(cur_stat_filter_cnt-1)),2); -+ -+ // Event Info Sel Op -> packet length -+ wr_stat_reg(cur_base_address+0x1F8+(0x158*(cur_stat_filter_cnt-1)),0); -+ -+ // Filter Global Enable -+ wr_stat_reg(cur_base_address+0xAC+(0x158*(cur_stat_filter_cnt-1)),0x1); -+ -+ // Filter Enable -+ wr_stat_reg(cur_base_address+0xBC+(0x158*(cur_stat_filter_cnt-1)),0x1); -+ -+ // Manual dump -+ wr_stat_reg(cur_base_address+0x54,0x1); -+ // use send register to reset counters -+ -+ } -+ -+ global_object[instance_id].mux_req = cur_event_mux_req; -+ global_object[instance_id].base_address = cur_base_address; -+ global_object[instance_id].counter_id = cur_stat_filter_cnt; -+ global_object[instance_id].b_enabled = 1; -+ -+ return cur_stat_filter_cnt; -+} -+ -+ -+ -+void statCollectorReadGroup(UInt32 group_id) -+{ -+ int i=0; -+ UInt32 cur_base_address = 0x45001000 + ((group_id - 1) * 0x1000); -+ -+ wr_stat_reg(cur_base_address+0xC,0x0); -+ -+ for(i=0; i < STATCOL_MAX; i++) -+ { -+ if(global_object[i].group_id == (group_id - 1) && -+ global_object[i].b_enabled == 1) -+ { -+ UInt32 cur_stat_filter_cnt = global_object[i].counter_id; -+ -+ global_object[i].readings[statCountIdx] = rd_stat_reg(cur_base_address+0x8C+((cur_stat_filter_cnt-1)*4)); -+ } -+ } -+ -+ wr_stat_reg(cur_base_address+0xC,0x1); -+} -+ -+ -+volatile sig_atomic_t sigtermed = 0; -+ -+void my_signal_handler(int signum) -+{ -+ if (signum == SIGTERM || signum == SIGINT) { -+ sigtermed = 1; -+ } -+} -+ -+struct sort -+{ -+ int pos; -+ double value; -+}; -+ -+ -+void *ctx; -+struct time_graph_create_params p; -+char xpos_string[100], ypos_string[100]; -+ -+void mpu_handler(int command) -+{ -+#if 1 -+ static int fd; -+ char buf[1000]; -+ char * tabledata= "/tmp/statcollfifo"; -+ int i; -+ int bytes; -+ static int offset = 13; -+ -+ switch(command) -+ { -+ case OPEN: -+ fd = open(tabledata, O_RDONLY|O_NONBLOCK); -+ break; -+ -+ case READ: -+ -+ /* open, read, and display the message from the FIFO */ -+ bytes=read(fd, buf, 1000); -+ if(bytes > 0) -+ { -+ char str[100]; -+ char value[100]; -+ sscanf(buf, "%s %s", str, value); -+ if(strcmp(str, "MOVE:") == 0) -+ { -+ printf("Received MOVE command : %s\n", buf); -+ sprintf(p.title, "CPU Usage[@position-req=%sx%s]", value, ypos_string); -+ move_graph(ctx, &p); -+ } -+ else -+ { -+ printf("ERROR: Received unexpected data from FIFO - \" %s \" \n", buf); -+ } -+ memset(buf, 0x0, sizeof(buf)); -+ } -+ -+ break; -+ -+ case CLOSE: -+ close(fd); -+ break; -+ } -+#endif -+ return; -+} -+ -+ -+UInt32 statcoll_start(UInt32 TOTAL_TIME, UInt32 INTERVAL_US, char list[][50], UInt32 xpos, UInt32 ypos) -+{ -+ int i, fd, index; -+ UInt32 counterIdDss, counterIdIva, counterIdBB2dP1, counterIdBB2dP2, counterIdUsb4, counterIdSata, counterIdEmif1, counterIdEmif2; -+ -+ if (SIG_ERR == signal(SIGPIPE,SIG_IGN)) -+ exit(1); -+ -+ if (SIG_ERR == signal(SIGINT,my_signal_handler)) -+ exit(1); -+ -+ if (SIG_ERR == signal(SIGTERM,my_signal_handler)) -+ exit(1); -+ -+ -+ struct timeval tv1, tv2; -+ gettimeofday(&tv1, NULL); -+ printf("------------------------------------------------\n"); -+ printf("Compile time = %s %s\n",__DATE__, __TIME__); -+ printf("------------------------------------------------\n\n"); -+ //printd("Start time = %d\n", time(NULL)); -+ //printd("Time seconds = %d, usecs = %d\n", tv.tv_sec, tv.tv_usec); -+ -+ statcoll_params params; -+ memset(¶ms, sizeof(params), 0); -+ params.INTERVAL_US = INTERVAL_US; -+ params.TOTAL_TIME = TOTAL_TIME; -+ -+ i=0; -+ index=0; -+ -+ while(list[i][0] != 0) -+ { -+ for(index=0; index< STATCOL_MAX; index++) { -+ if(strcmp(list[i], initiators[index].name) == 0) -+ { -+ strcpy(params.user_config_list[params.no_of_initiators].name, list[i]); -+ params.user_config_list[params.no_of_initiators++].id = initiators[index].id; -+ break; -+ } -+ } -+ -+ if(index == STATCOL_MAX) { -+ printf("ERROR: Unknown initiator.%d.. .%s. \n", i, list[i]); -+ //exit(0); -+ } -+ i++; -+ } -+ -+ struct bar_graph_create_params bg_p; -+ struct _y_config *y_cfg; -+ struct _text_config *t_cfg; -+ double *y; -+ double *bg_y; -+ char *text_list[STATCOL_MAX]; -+ -+ struct _bar_graph_y_config *bg_y_cfg; -+ struct _text_config *bg_t_cfg; -+ char *bg_text_list[STATCOL_MAX]; -+ -+ sprintf(xpos_string, "%d", xpos); -+ sprintf(ypos_string, "%d", ypos); -+ p.title=(char *)malloc(100); -+ sprintf(p.title, "CPU Usage[@position-req=%sx%s]", xpos_string, ypos_string); -+ //p.height = MAX_HEIGHT - HEIGHT_EMIF_AREA; -+ p.height = MAX_HEIGHT;// - HEIGHT_EMIF_AREA; -+ p.width = MAX_WIDTH; -+ p.draw_area.bottom_left.x = TIME_GRAPH_AREA_BL_X; -+ p.draw_area.bottom_left.y = TIME_GRAPH_AREA_BL_Y; -+ p.draw_area.top_right.x = TIME_GRAPH_AREA_TR_X; -+ p.draw_area.top_right.y = TIME_GRAPH_AREA_TR_Y; -+ p.time_span = 120000; // 120 seconds -+ p.num_of_y_items = params.no_of_initiators+1; -+ p.num_of_text_items = 0;//params.no_of_initiators; -+ -+ -+ y_cfg = malloc((params.no_of_initiators+1) * sizeof(struct _y_config)); -+ t_cfg = malloc(params.no_of_initiators * sizeof(struct _text_config)); -+ y = malloc((params.no_of_initiators+1) * sizeof(double)); -+ p.y_config_array = y_cfg; -+ p.text_config_array = t_cfg; -+ -+ bg_y_cfg = malloc(TOTAL_Y_PARAMETERS * sizeof(struct _bar_graph_y_config)); -+ bg_t_cfg = malloc(TOTAL_Y_PARAMETERS * sizeof(struct _text_config)); -+ bg_y = malloc(TOTAL_Y_PARAMETERS * sizeof(double)); -+ -+ for(i=0; i<TOTAL_Y_PARAMETERS; i++) -+ { -+ bg_text_list[i] = malloc(100); -+ strcpy(bg_text_list[i],"test"); -+ } -+ -+ create_overall_box(bg_y_cfg, bg_t_cfg, bg_text_list); -+ -+ -+ i=0; -+ while(i < params.no_of_initiators) -+ { -+ text_list[i] = malloc(100 * sizeof(char)); -+ memset(text_list[i], 0x0, 100); -+ -+ ((struct _y_config *)y_cfg+i)->line_color.r = pallette[i%MAX_COLORS].r; -+ ((struct _y_config *)y_cfg+i)->line_color.g = pallette[i%MAX_COLORS].g; -+ ((struct _y_config *)y_cfg+i)->line_color.b = pallette[i%MAX_COLORS].b; -+ ((struct _y_config *)y_cfg+i)->line_color.a = 0.0;//pallette[i%MAX_COLORS].a; -+ -+ ((struct _y_config *)y_cfg+i)->fill_color.r = 0.0; -+ ((struct _y_config *)y_cfg+i)->fill_color.g = 1.0; -+ ((struct _y_config *)y_cfg+i)->fill_color.b = 0.0; -+ ((struct _y_config *)y_cfg+i)->fill_color.a = 0.5; -+ -+ i++; -+ } -+ -+ ((struct _y_config *)y_cfg+i)->line_color.r = 0.0; -+ ((struct _y_config *)y_cfg+i)->line_color.g = 0.0; -+ ((struct _y_config *)y_cfg+i)->line_color.b = 0.0; -+ ((struct _y_config *)y_cfg+i)->line_color.a = 0.5; -+ ((struct _y_config *)y_cfg+i)->fill_color.r = 0.1; -+ ((struct _y_config *)y_cfg+i)->fill_color.g = 0.9; -+ ((struct _y_config *)y_cfg+i)->fill_color.b = 0.5; -+ ((struct _y_config *)y_cfg+i)->fill_color.a = 1.0; -+ -+ bg_p.title = "CPU Usage"; -+ -+ bg_p.num_of_y_items = TOTAL_Y_PARAMETERS; -+ bg_p.y_config_array = bg_y_cfg; -+ bg_p.num_of_text_items = TOTAL_Y_PARAMETERS; -+ bg_p.text_config_array = bg_t_cfg; -+ -+ -+ int argc; -+ char *argv[10]; -+ ctx = time_graph_create(argc, argv, &p); -+ if (!ctx) { -+ printf("Error creating context\n"); -+ exit(0); -+ } -+ -+ printf("\n Context after time_graph_create = 0x%x\n", ctx); -+ ctx = bar_graph_create(argc, argv, &bg_p); -+ if (!ctx) { -+ printf("Error creating context\n"); -+ exit(0); -+ } -+ -+ printf("\n Context after bar_graph_create= 0x%x\n", ctx); -+ -+ printf("Total configured initiators = %d\n", params.no_of_initiators); -+ -+ -+ fd = open("/dev/mem", O_RDWR); -+ if (fd == -1){ -+ printf("error fd=open() \n"); -+ return -1; -+ } -+ statcoll_base_mem = mmap(NULL, STATCOLL_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, fd, STATCOLL_BASE); -+ -+ if (statcoll_base_mem == MAP_FAILED){ -+ printf("ERROR: mmap failed \n"); -+ return; -+ } -+ close(fd); -+ -+ fd = open("/dev/mem", O_RDWR); -+ if (fd == -1){ -+ printf("error fd=open() \n"); -+ return -1; -+ } -+ l3_3_clkctrl = mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, fd, CM_L3INSTR_REGISTER_BASE); -+ if (l3_3_clkctrl == MAP_FAILED){ -+ printf("ERROR: mmap failed for CM_L3INSTR_REGISTER_BASE\n"); -+ return; -+ } -+ close(fd); -+ -+ printf("SUCCESS: Mapped 0x%x to user space address 0x%x\n", STATCOLL_BASE, statcoll_base_mem); -+ printf("INTERVAL = %d usecs\n", INTERVAL_US); -+ printf("TOTAL TIME = %d seconds\n", TOTAL_TIME); -+ TRACE_SZ = (TOTAL_TIME * 1000000)/INTERVAL_US; -+ printf("TRACE SIZE = %d samples\n", TRACE_SZ); -+ -+ printf("**************************************\n"); -+ printf("Going to initialize the L3 clocks \n"); -+ l3_3_clkctrl[CM_L3INSTR_L3INSTR_CLKSTCTRL_OFFSET >> 2] = 0x2; -+ l3_3_clkctrl[CM_L3INSTR_L3_MAIN_2_CLKCTRL_OFFSET >> 2] = 0x1; -+ printf("**************************************\n"); -+ -+ while( (l3_3_clkctrl[CM_L3INSTR_L3_MAIN_2_CLKCTRL_OFFSET >> 2] & 0x30000) != 0x0) -+ { -+ printf("Waiting on module to be functional\n"); -+ } -+ -+ statCollectorInit(); -+ -+ printf("SUCCESS: Initialized STAT COLLECTOR\n"); -+ /* Initialize all enabled initiators */ -+ for(index =0; index < params.no_of_initiators; index++) { -+ printf("\t\t Initialized %s\n", params.user_config_list[index].name); -+ statCollectorControlInitialize(params.user_config_list[index].id); -+ } -+ -+ const char *bg_text = "CPU Utilization"; -+ -+ int second_counter=0; -+ memset(y, 0x0, sizeof(double)* (params.no_of_initiators+1)); -+ -+ -+ -+ -+ mpu_handler(OPEN); -+ -+ -+ while(statCountIdx != (TRACE_SZ - 1)) -+ { -+ usleep(INTERVAL_US); -+ int group; -+ for(group = 1; group<11; group++) -+ statCollectorReadGroup(group); -+ -+ mpu_handler(READ); -+ -+ if(statCountIdx != 0 ) -+ for(i=0; i<params.no_of_initiators; i++) { -+ y[i] += (double)(global_object[params.user_config_list[i].id].readings[statCountIdx])/ (8000000000); -+ } -+ second_counter++; -+ -+ if(second_counter % 30 == 0) -+ { -+ -+ for(i=0; i<TOTAL_Y_PARAMETERS; i++) { -+ bg_y[i] = 1.0; -+ } -+ -+ //HACK -+ bg_y[9]=y[0]*2; -+ bg_y[11]=y[1]*2; -+ sprintf(bg_text_list[8], "%02.1f%s", y[0]*100, "%"); -+ sprintf(bg_text_list[10], "%02.1f%s", y[1]*100, "%"); -+ -+ struct sort sort_array[STATCOL_MAX]; -+ memset(sort_array, 0x0, sizeof(struct sort) * STATCOL_MAX); -+ /* Sort here */ -+ for(i=2; i<params.no_of_initiators; i++) { -+ sort_array[i-2].value = y[i]; -+ sort_array[i-2].pos = i; -+ } -+ -+ int j; -+ double tempdouble; -+ int tempint; -+ for(i=0; i<params.no_of_initiators-2; i++) { -+ for(j=i+1; j<params.no_of_initiators-2; j++) { -+ if(sort_array[i].value < sort_array[j].value) { -+ tempdouble = sort_array[j].value; -+ tempint = sort_array[j].pos; -+ -+ sort_array[j].value = sort_array[i].value; -+ sort_array[j].pos = sort_array[i].pos; -+ -+ sort_array[i].value = tempdouble; -+ sort_array[i].pos = tempint; -+ } -+ } -+ } -+ -+ for(i=0; i<6; i++) -+ { -+ //HACK -+ bg_y[14+i*2] = sort_array[i].value*2; -+ sprintf(bg_text_list[13+i*2], "%02.1f%s", sort_array[i].value*100, "%"); -+ sprintf(bg_text_list[14+i*2], "%s", (params.user_config_list[sort_array[i].pos].name)+8); -+ } -+ -+ bar_graph_plot(ctx, bg_y, (const char **)bg_text_list); -+ -+ y[params.no_of_initiators]=y[0]+y[1]; -+ time_graph_plot(ctx, y, (const char **)text_list); -+ //printf("Plotting the time_graph\n"); -+ memset(y, 0x0, sizeof(double)* (params.no_of_initiators+1)); -+ } -+ statCountIdx++; -+ -+ } -+ -+ mpu_handler(CLOSE); -+ -+ printf("------------------------------------------------\n\n"); -+ printf("SUCCESS: Stat collection completed... Writing into file now\n"); -+ FILE *outfile = fopen("statcollector.csv", "w+"); -+ if (!outfile) { -+ printf("\n ERROR: Error opening file"); -+ } -+ -+ /* Ignore the first index at 0 */ -+ for(index=1; index<statCountIdx; index++) { -+ for(i=0; i<params.no_of_initiators; i++) { -+ fprintf(outfile,"%s = %d,", params.user_config_list[i].name, global_object[params.user_config_list[i].id].readings[index]); -+ } -+ fprintf(outfile,"\n"); -+ } -+ fclose(outfile); -+ -+ time_graph_destroy(ctx); -+ gettimeofday(&tv2, NULL); -+ //printf("End time = %d\n", time(NULL)); -+ //printf("Time seconds = %d, usecs = %d\n", tv.tv_sec, tv.tv_usec); -+ printf("Total execution time = %d secs, %d usecs\n\n", (tv2.tv_sec - tv1.tv_sec), (tv2.tv_usec - tv2.tv_usec)); -+ -+ return 0; -+} -+ -+ -diff --git a/clients/statcoll.h b/clients/statcoll.h -new file mode 100644 -index 0000000..fa92753 ---- /dev/null -+++ b/clients/statcoll.h -@@ -0,0 +1,152 @@ -+#ifndef __STATCOLL_H -+#define __STATCOLL_H -+ -+ -+#define CM_L3INSTR_REGISTER_BASE (0x4A008000) -+ -+#define CM_L3INSTR_L3INSTR_CLKSTCTRL_OFFSET (0xE00) -+#define CM_L3INSTR_L3_MAIN_2_CLKCTRL_OFFSET (0xE20) -+ -+#define STATCOLL_SIZE 40960 -+#define STATCOLL_BASE (0x45001000) -+ -+#define stat_coll0_base_address (0x45001000) -+#define stat_coll1_base_address (0x45002000) -+#define stat_coll2_base_address (0x45003000) -+#define stat_coll3_base_address (0x45004000) -+#define stat_coll4_base_address (0x45005000) -+#define stat_coll5_base_address (0x45006000) -+#define stat_coll6_base_address (0x45007000) -+#define stat_coll7_base_address (0x45008000) -+#define stat_coll8_base_address (0x45009000) -+#define stat_coll9_base_address (0x4500a000) -+ -+#define printd(fmt, ...) \ -+ do { if (debug) fprintf(stderr, fmt, __VA_ARGS__); } while (0) -+ -+typedef unsigned int UInt32; -+ -+ -+typedef enum -+{ -+ STATCOL_EMIF1_SYS, -+ STATCOL_EMIF2_SYS, -+ STATCOL_MA_MPU_P1, -+ STATCOL_MA_MPU_P2, -+ STATCOL_MPU1, -+ STATCOL_MMU1, -+ STATCOL_TPTC_RD1, -+ STATCOL_TPTC_WR1, -+ STATCOL_TPTC_RD2, -+ STATCOL_TPTC_WR2, -+ STATCOL_VIP1_P1, -+ STATCOL_VIP1_P2, -+ STATCOL_VIP2_P1, -+ STATCOL_VIP2_P2, -+ STATCOL_VIP3_P1, -+ STATCOL_VIP3_P2, -+ STATCOL_VPE_P1, -+ STATCOL_VPE_P2, -+ STATCOL_EVE1_TC0, -+ STATCOL_EVE1_TC1, -+ STATCOL_EVE2_TC0, -+ STATCOL_EVE2_TC1, -+ STATCOL_EVE3_TC0, -+ STATCOL_EVE3_TC1, -+ STATCOL_EVE4_TC0, -+ STATCOL_EVE4_TC1, -+ STATCOL_DSP1_MDMA, -+ STATCOL_DSP1_EDMA, -+ STATCOL_DSP2_MDMA, -+ STATCOL_DSP2_EDMA, -+ STATCOL_IVA, -+ STATCOL_GPU_P1, -+ STATCOL_GPU_P2, -+ STATCOL_BB2D_P1, -+ STATCOL_DSS, -+ STATCOL_CSI2_2, -+ STATCOL_MMU2, -+ STATCOL_IPU1, -+ STATCOL_IPU2, -+ STATCOL_DMA_SYSTEM_RD, -+ STATCOL_DMA_SYSTEM_WR, -+ STATCOL_CSI2_1, -+ STATCOL_USB3_SS, -+ STATCOL_USB2_SS, -+ STATCOL_USB2_ULPI_SS1, -+ STATCOL_USB2_ULPI_SS2, -+ STATCOL_PCIE_SS1, -+ STATCOL_PCIE_SS2, -+ STATCOL_DSP1_CFG, -+ STATCOL_DSP2_CFG, -+ STATCOL_GMAC_SW, -+ STATCOL_PRUSS1_P1, -+ STATCOL_PRUSS1_P2, -+ STATCOL_PRUSS2_P1, -+ STATCOL_PRUSS2_P2, -+ STATCOL_DMA_CRYPTO_RD, -+ STATCOL_DMA_CRYPTO_WR, -+ STATCOL_MPU2, -+ STATCOL_MMC1, -+ STATCOL_MMC2, -+ STATCOL_SATA, -+ STATCOL_MLBSS, -+ STATCOL_BB2D_P2, -+ STATCOL_IEEE1500, -+ STATCOL_DBG, -+ STATCOL_VCP1, -+ STATCOL_OCMC_RAM1, -+ STATCOL_OCMC_RAM2, -+ STATCOL_OCMC_RAM3, -+ STATCOL_GPMC, -+ STATCOL_MCASP1, -+ STATCOL_MCASP2, -+ STATCOL_MCASP3, -+ STATCOL_VCP2, -+ STATCOL_MAX -+} STATCOL_ID; -+ -+ -+ -+typedef struct -+{ -+ UInt32 stat0_filter_cnt; -+ UInt32 stat1_filter_cnt; -+ UInt32 stat2_filter_cnt; -+ UInt32 stat3_filter_cnt; -+ UInt32 stat4_filter_cnt; -+ UInt32 stat5_filter_cnt; -+ UInt32 stat6_filter_cnt; -+ UInt32 stat7_filter_cnt; -+ UInt32 stat8_filter_cnt; -+ UInt32 stat9_filter_cnt; -+} StatCollectorObj; -+ -+struct list_of_initiators -+{ -+ STATCOL_ID id; -+ char name[50]; -+}; -+ -+typedef struct -+{ -+ UInt32 INTERVAL_US; -+ UInt32 TOTAL_TIME; -+ UInt32 no_of_initiators; -+ struct list_of_initiators user_config_list[STATCOL_MAX]; -+} statcoll_params; -+ -+typedef struct -+{ -+ UInt32 b_enabled; -+ char name[100]; -+ UInt32 *readings; -+ UInt32 *timestamp; -+ UInt32 group_id; -+ UInt32 counter_id; -+ UInt32 base_address; -+ UInt32 mux_req; -+}statcoll_initiators_object; -+ -+ -+#endif -diff --git a/clients/statcoll_gui.h b/clients/statcoll_gui.h -new file mode 100644 -index 0000000..7362bde ---- /dev/null -+++ b/clients/statcoll_gui.h -@@ -0,0 +1,101 @@ -+ -+/* -+ -+ --------------------------------------------- -+ | | -+ | --------------------------------------- | -+ | | -+ | | -+ | | -+ | | -+ | | -+ | | -+ | | -+ | | -+ | | -+ | | -+ | | -+ | | -+ | | -+ | | -+ | | -+ --------------------------------------------- -+ | | | -+ | | | -+ | | | -+ | | | -+ | | | -+ | | | -+ --------------------------------------------- -+ -+ -+ -+ -+*/ -+#define POSITION_X 2800 -+#define POSITION_Y 40 -+ -+#define MAX_WIDTH 900 -+//#define MAX_WIDTH 528 -+#define MAX_HEIGHT 900 -+ -+/* Derived parameters */ -+#define BAR_GAP (MAX_WIDTH/25) -+#define BAR_WIDTH (MAX_WIDTH/16) -+ -+#define BAR_HEIGHT ((MX_HEIGHT/40) * 6) -+ -+#define BORDER (MAX_WIDTH/15) -+ -+#define HEIGHT_EMIF_AREA (MAX_HEIGHT/4) -+ -+#define FONT_SIZE (MAX_WIDTH/40) -+ -+#define WIDTH_EMIF_AREA (MAX_WIDTH / 4) -+ -+#define TOTAL_Y_PARAMETERS (25) -+ -+#define TIME_GRAPH_AREA_BL_X (BORDER) -+#define TIME_GRAPH_AREA_BL_Y (MAX_HEIGHT - HEIGHT_EMIF_AREA - BORDER) -+#define TIME_GRAPH_AREA_TR_X (MAX_WIDTH - BORDER) -+#define TIME_GRAPH_AREA_TR_Y (BORDER) -+ -+#define EMIF_AREA_BL_X (0) -+#define EMIF_AREA_BL_Y (MAX_HEIGHT) -+#define EMIF_AREA_TR_X (WIDTH_EMIF_AREA) -+#define EMIF_AREA_TR_Y (MAX_HEIGHT - HEIGHT_EMIF_AREA) -+ -+#define INITIATORS_AREA_BL_X (WIDTH_EMIF_AREA) -+#define INITIATORS_AREA_BL_Y (MAX_HEIGHT) -+#define INITIATORS_AREA_TR_X (MAX_WIDTH) -+#define INITIATORS_AREA_TR_Y (MAX_HEIGHT - HEIGHT_EMIF_AREA) -+ -+ -+const char *string_list[TOTAL_Y_PARAMETERS] = { -+ "----DDR BANDWIDTH PLOT----", -+ "8 GBPS", -+ "6.4 ", -+ "4.8", -+ "3.2", -+ "1.6", -+ "0", -+ "EMIF Plot", -+ "test", -+ "EMIF1", -+ "test", -+ "EMIF2", -+ "TOP 6 INITIATORS", -+ "test", -+ "MPU", -+ "test", -+ "DSS", -+ "test", -+ "DSP", -+ "test", -+ "IVA", -+ "test", -+ "GPU", -+ "test", -+ "BB2D", -+}; -+ -diff --git a/clients/time_bar_graph.c b/clients/time_bar_graph.c -new file mode 100644 -index 0000000..9fa9c12 ---- /dev/null -+++ b/clients/time_bar_graph.c -@@ -0,0 +1,515 @@ -+/* -+ * Copyright © 2008 Kristian Høgsberg -+ * -+ * Permission to use, copy, modify, distribute, and sell this software and its -+ * documentation for any purpose is hereby granted without fee, provided that -+ * the above copyright notice appear in all copies and that both that copyright -+ * notice and this permission notice appear in supporting documentation, and -+ * that the name of the copyright holders not be used in advertising or -+ * publicity pertaining to distribution of the software without specific, -+ * written prior permission. The copyright holders make no representations -+ * about the suitability of this software for any purpose. It is provided "as -+ * is" without express or implied warranty. -+ * -+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO -+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR -+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -+ * OF THIS SOFTWARE. -+ */ -+ -+#include <stdint.h> -+#include <stdio.h> -+#include <stdlib.h> -+#include <string.h> -+#include <stdint.h> -+#include <signal.h> -+#include <time.h> -+#include <math.h> -+#include <cairo.h> -+#include <sys/time.h> -+#include <pthread.h> -+#include <errno.h> -+#include <unistd.h> -+#include <sys/eventfd.h> -+#include <sys/epoll.h> -+ -+#include <linux/input.h> -+#include <wayland-client.h> -+#include "window.h" -+#include "../shared/cairo-util.h" -+#include "time_bar_graph.h" -+ -+//#define DEBUG 1 -+#ifdef DEBUG -+#define DBG(x...) printf(x) -+#else -+#define DBG(x...) // printf(x) -+#endif -+ -+#define MAX_ITEMS 180 -+#define MAX_TEXT_SIZE 128 -+ -+struct graph_dataset_point { -+ int next_index; -+ double y_values[MAX_ITEMS]; -+}; -+ -+struct graph_data { -+ int dataset_size; -+ int first_index, last_index, num_elems; -+ uint64_t last_time; -+ struct graph_dataset_point dataset[1]; -+}; -+ -+struct graph { -+ struct display *display; -+ struct window *window; -+ struct widget *widget; -+ int width, height; -+ struct time_graph_create_params params; -+ struct bar_graph_create_params bar_graph_params; -+ struct _y_config y_config_array[MAX_ITEMS]; -+ struct _text_config text_config_array[MAX_ITEMS]; -+ -+ /* Bar graph parameters */ -+ struct _bar_graph_y_config bar_graph_y_config_array[MAX_ITEMS]; -+ struct _text_config bar_graph_text_config_array[MAX_ITEMS]; -+ -+ pthread_t thr; -+ int eventfd; -+ struct task task; -+ double x_scaling_factor; -+ pthread_mutex_t mtx; -+ double time_graph_y_values[MAX_ITEMS]; -+ char text_values[MAX_ITEMS][MAX_TEXT_SIZE]; -+ -+ double bar_graph_y_values[MAX_ITEMS]; -+ char bar_graph_text_values[MAX_ITEMS][MAX_TEXT_SIZE]; -+ -+ uint64_t time_now; -+ time_t start_time_tv_sec; -+ struct graph_data *data; -+}; -+ -+struct graph *global_graph=NULL; -+static void -+draw_stuff(struct graph *g, cairo_surface_t *surface) -+{ -+ cairo_t *cr; -+ int i, j, n_elems; -+ double c_x, c_y, d_x, d_y; -+ -+ cr = cairo_create(surface); -+ cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE); -+ cairo_set_source_rgba(cr, 0.0, 0.0, 0.0, 0.5); -+ cairo_paint(cr); -+ cairo_select_font_face(cr, "mono", -+ CAIRO_FONT_SLANT_NORMAL, -+ CAIRO_FONT_WEIGHT_BOLD); -+ cairo_set_line_width (cr, 1.0); -+ cairo_set_operator(cr, CAIRO_OPERATOR_OVER); -+ pthread_mutex_lock(&g->mtx); -+ for (j=0; g->data->num_elems > 0 && j<g->params.num_of_y_items; j++) { -+ n_elems = g->data->num_elems; -+ DBG("first_index: %d, last_index: %d\n", g->data->first_index, g->data->last_index); -+ if (g->y_config_array[j].fill_color.a != 0.0) -+ cairo_move_to(cr, (double)g->params.draw_area.bottom_left.x, (double)g->params.draw_area.bottom_left.y); -+ c_x = (double)g->params.draw_area.bottom_left.x; -+ c_y = (double)g->params.draw_area.bottom_left.y; -+ d_x = 0; -+ i = g->data->first_index; -+ while (n_elems) { -+ DBG("index: %d, x: %f, y: %f, next_index: %d\n", i, c_x, -+ g->data->dataset[i].y_values[j], g->data->dataset[i].next_index); -+ d_y = g->data->dataset[i].y_values[j] - c_y; -+ c_y = g->data->dataset[i].y_values[j]; -+ c_x = c_x + d_x; -+ if (g->y_config_array[j].fill_color.a == 0.0 && n_elems == g->data->num_elems) { -+ cairo_move_to(cr, c_x, c_y); -+ } else { -+ cairo_curve_to(cr, c_x - (d_x * 0.75), c_y - (d_y * 0.92), c_x - (d_x * 0.25), c_y - (d_y * 0.08), c_x, c_y); -+ } -+ if (g->data->dataset[i].next_index > i) { -+ d_x = (g->data->dataset[i].next_index - i); -+ } else { -+ d_x = (g->data->dataset_size + g->data->dataset[i].next_index - i); -+ } -+ i = g->data->dataset[i].next_index; -+ n_elems--; -+ } -+ if (g->y_config_array[j].fill_color.a != 0.0) { -+ cairo_line_to(cr, c_x, (double)g->params.draw_area.bottom_left.y); -+ cairo_line_to(cr, (double)g->params.draw_area.bottom_left.x, (double)g->params.draw_area.bottom_left.y); -+ cairo_close_path(cr); -+ cairo_set_source_rgba(cr, g->y_config_array[j].fill_color.r, g->y_config_array[j].fill_color.g, -+ g->y_config_array[j].fill_color.b, g->y_config_array[j].fill_color.a); -+ cairo_fill_preserve(cr); -+ } -+ cairo_set_source_rgba(cr, g->y_config_array[j].line_color.r, g->y_config_array[j].line_color.g, -+ g->y_config_array[j].line_color.b, g->y_config_array[j].line_color.a); -+ cairo_stroke(cr); -+ } -+ -+ for (j=0; j<g->params.num_of_text_items; j++) { -+ cairo_move_to(cr, (double)g->text_config_array[j].at.x, (double)g->text_config_array[j].at.y); -+ cairo_set_font_size(cr, g->text_config_array[j].fontsize); -+ cairo_set_source_rgba(cr, g->text_config_array[j].color.r, g->text_config_array[j].color.g, -+ g->text_config_array[j].color.b, g->text_config_array[j].color.a); -+ cairo_show_text(cr, g->text_values[j]); -+ } -+ -+ -+ for (j=0; j<g->bar_graph_params.num_of_y_items; j++) { -+ cairo_move_to(cr, (double)g->bar_graph_params.y_config_array[j].region.bottom_left.x, -+ (double)g->bar_graph_params.y_config_array[j].region.bottom_left.y); -+ c_y = (double)g->bar_graph_params.y_config_array[j].region.bottom_left.y - -+ (g->bar_graph_y_values[j] * (double)(g->bar_graph_params.y_config_array[j].region.bottom_left.y - -+ g->bar_graph_params.y_config_array[j].region.top_right.y)); -+ cairo_line_to(cr, (double)g->bar_graph_params.y_config_array[j].region.bottom_left.x, c_y); -+ cairo_line_to(cr, (double)g->bar_graph_params.y_config_array[j].region.top_right.x, c_y); -+ cairo_line_to(cr, (double)g->bar_graph_params.y_config_array[j].region.top_right.x, -+ (double)g->bar_graph_params.y_config_array[j].region.bottom_left.y); -+ cairo_line_to(cr, (double)g->bar_graph_params.y_config_array[j].region.bottom_left.x, -+ (double)g->bar_graph_params.y_config_array[j].region.bottom_left.y); -+ cairo_close_path(cr); -+ cairo_set_source_rgba(cr, g->bar_graph_y_config_array[j].fill_color.r, g->bar_graph_y_config_array[j].fill_color.g, -+ g->bar_graph_y_config_array[j].fill_color.b, g->bar_graph_y_config_array[j].fill_color.a); -+ cairo_fill_preserve(cr); -+ cairo_set_source_rgba(cr, g->bar_graph_y_config_array[j].line_color.r, g->bar_graph_y_config_array[j].line_color.g, -+ g->bar_graph_y_config_array[j].line_color.b, g->bar_graph_y_config_array[j].line_color.a); -+ cairo_stroke(cr); -+ } -+ for (j=0; j<g->bar_graph_params.num_of_text_items; j++) { -+ cairo_move_to(cr, (double)g->bar_graph_text_config_array[j].at.x, (double)g->bar_graph_text_config_array[j].at.y); -+ cairo_set_font_size(cr, g->bar_graph_text_config_array[j].fontsize); -+ cairo_set_source_rgba(cr, g->bar_graph_text_config_array[j].color.r, g->bar_graph_text_config_array[j].color.g, -+ g->bar_graph_text_config_array[j].color.b, g->bar_graph_text_config_array[j].color.a); -+ cairo_save (cr); -+ //cairo_rotate(cr, 2*3.14*21/24); -+ cairo_show_text(cr, g->bar_graph_text_values[j]); -+ cairo_restore(cr); -+ } -+ pthread_mutex_unlock(&g->mtx); -+ cairo_destroy(cr); -+} -+ -+static void -+resize_handler(struct widget *widget, -+ int32_t width, int32_t height, void *data) -+{ -+ struct graph *g = data; -+ -+ /* Dont resize me */ -+ widget_set_size(g->widget, g->width, g->height); -+} -+ -+static void -+redraw_handler(struct widget *widget, void *data) -+{ -+ struct graph *g = data; -+ cairo_surface_t *surface; -+ -+ surface = window_get_surface(g->window); -+ if (surface == NULL || -+ cairo_surface_status(surface) != CAIRO_STATUS_SUCCESS) { -+ fprintf(stderr, "failed to create cairo egl surface\n"); -+ return; -+ } -+ -+ draw_stuff(g, surface); -+ cairo_surface_destroy(surface); -+} -+ -+static void -+button_handler(struct widget *widget, -+ struct input *input, uint32_t time, -+ uint32_t button, enum wl_pointer_button_state state, void *data) -+{ -+ struct graph *g = data; -+ -+ switch (button) { -+ case BTN_LEFT: -+ if (state == WL_POINTER_BUTTON_STATE_PRESSED) -+ window_move(g->window, input, -+ display_get_serial(g->display)); -+ break; -+ case BTN_MIDDLE: -+ if (state == WL_POINTER_BUTTON_STATE_PRESSED) -+ widget_schedule_redraw(widget); -+ break; -+ case BTN_RIGHT: -+ if (state == WL_POINTER_BUTTON_STATE_PRESSED) -+ window_show_frame_menu(g->window, input, time); -+ break; -+ } -+} -+ -+static void -+touch_down_handler(struct widget *widget, struct input *input, -+ uint32_t serial, uint32_t time, int32_t id, -+ float x, float y, void *data) -+{ -+ struct graph *g = data; -+ window_move(g->window, input, display_get_serial(g->display)); -+} -+ -+static void task_run(struct task *task, uint32_t events) -+{ -+ eventfd_t e; -+ struct graph *g = (struct graph *)(task->link.prev); -+ uint64_t time_diff; -+ int elems, tmp, incr, i; -+ double y; -+ -+ eventfd_read(g->eventfd, &e); -+ if(e == 1) { -+ pthread_mutex_lock(&g->mtx); -+ /* Process new data */ -+ DBG("time_now: %llu, last_time: %llu\n", g->time_now, g->data->last_time); -+ if (g->time_now > g->data->last_time) { -+ time_diff = g->time_now - g->data->last_time; -+ y = (double)time_diff * g->x_scaling_factor; -+ incr = (int)y; -+ DBG("incr: %d\n", incr); -+ -+ if (g->data->last_index >= g->data->first_index) elems = g->data->last_index - g->data->first_index + 1; -+ else elems = g->data->dataset_size - g->data->first_index + g->data->last_index + 1; -+ /* Move first index to make room for new element */ -+ while (g->data->dataset_size > 0 && (elems + incr) > g->data->dataset_size) { -+ tmp = g->data->dataset[g->data->first_index].next_index - g->data->first_index; -+ if (tmp < 0) tmp = g->data->dataset_size + tmp; -+ g->data->first_index = g->data->dataset[g->data->first_index].next_index; -+ elems -= tmp; -+ g->data->num_elems--; -+ } -+ for (i=0; i<g->params.num_of_y_items; i++) { -+ /* Scale Y */ -+ y = g->time_graph_y_values[i] * (double)(g->params.draw_area.bottom_left.y-g->params.draw_area.top_right.y); -+ y = (double)g->params.draw_area.bottom_left.y - y; -+ g->data->dataset[g->data->last_index].y_values[i] = y; -+ } -+ g->data->dataset[g->data->last_index].next_index = g->data->last_index + incr; -+ if (g->data->dataset[g->data->last_index].next_index >= g->data->dataset_size) -+ g->data->dataset[g->data->last_index].next_index -= g->data->dataset_size; -+ g->data->num_elems++; -+ g->data->last_index = g->data->dataset[g->data->last_index].next_index; -+ g->data->last_time = g->time_now; -+ } -+ pthread_mutex_unlock(&g->mtx); -+ } -+ widget_schedule_redraw(g->widget); -+ DBG("event task ran...\n"); -+} -+ -+void *time_graph_create(int argc, char *argv[], struct time_graph_create_params *cp) -+{ -+ struct graph *g; -+ struct display *d; -+ int dataset_size; -+ struct timeval tv; -+ -+ if (cp->num_of_y_items > MAX_ITEMS) return NULL; -+ if (cp->num_of_text_items > MAX_ITEMS) return NULL; -+ -+ g = (struct graph*)malloc(sizeof(struct graph)); -+ if (g == NULL) { -+ fprintf(stderr, "failed to allocate memory\n"); -+ return NULL; -+ } -+ global_graph = g; -+ g->params = *cp; -+ if (cp->num_of_y_items) -+ memcpy(&g->y_config_array[0], cp->y_config_array, -+ sizeof(struct _y_config) * cp->num_of_y_items); -+ if (cp->num_of_text_items) -+ memcpy(&g->text_config_array[0], cp->text_config_array, -+ sizeof(struct _text_config) * cp->num_of_text_items); -+ d = display_create(&argc, argv); -+ if (d == NULL) { -+ fprintf(stderr, "failed to create display: %m\n"); -+ return NULL; -+ } -+ g->display = d; -+ //g->bg_image = load_cairo_surface(cp->bg_image); -+ g->width = cp->width; //cairo_image_surface_get_width(g->bg_image); -+ g->height = cp->height; //cairo_image_surface_get_height(g->bg_image); -+ dataset_size = cp->draw_area.top_right.x - cp->draw_area.bottom_left.x; -+ g->data = (struct graph_data *)malloc(sizeof(struct graph_data) + -+ (dataset_size * sizeof(struct graph_dataset_point))); -+ if (!g->data) { -+ fprintf(stderr, "failed to allocate memory\n"); -+ display_destroy(g->display); -+ //cairo_surface_destroy(g->bg_image); -+ free(g); -+ return NULL; -+ } -+ g->data->first_index = 0; -+ g->data->last_index = 0; -+ g->data->num_elems = 0; -+ g->data->dataset_size = dataset_size; -+ g->x_scaling_factor = (double)dataset_size / (double)cp->time_span; -+ g->window = window_create(d); -+ g->widget = window_add_widget(g->window, g); -+ window_set_title(g->window, cp->title); -+ widget_set_resize_handler(g->widget, resize_handler); -+ widget_set_redraw_handler(g->widget, redraw_handler); -+ widget_set_button_handler(g->widget, button_handler); -+ widget_set_default_cursor(g->widget, CURSOR_HAND1); -+ widget_set_touch_down_handler(g->widget, touch_down_handler); -+ window_schedule_resize(g->window, g->width, g->height); -+ g->eventfd = eventfd(0, 0); -+ g->task.run = task_run; -+ g->task.link.prev = (struct wl_list*)g; -+ g->task.link.next = NULL; -+ display_watch_fd(d, g->eventfd, EPOLLIN, &g->task); -+ pthread_mutex_init(&g->mtx, NULL); -+ -+ if (0 != pthread_create(&g->thr, NULL, (void *(*)(void *))display_run, (void *)d)) { -+ fprintf(stderr, "pthread_create failed: %m\n"); -+ widget_destroy(g->widget); -+ window_destroy(g->window); -+ display_destroy(g->display); -+ //cairo_surface_destroy(g->bg_image); -+ free(g->data); -+ close(g->eventfd); -+ free(g); -+ return NULL; -+ } -+ gettimeofday(&tv, NULL); -+ g->start_time_tv_sec = tv.tv_sec; -+ g->data->last_time = 0; -+ return (void*)g; -+} -+ -+void move_graph(void *ctx, struct time_graph_create_params *cp) -+{ -+ struct graph *g = ctx; -+ window_set_title(g->window, cp->title); -+} -+ -+void time_graph_plot(void *ctx, double *y_values, const char *text_values[]) -+{ -+ struct timeval tv; -+ struct graph *g = ctx; -+ int i; -+ pthread_mutex_lock(&g->mtx); -+ gettimeofday(&tv, NULL); -+ g->time_now = ((tv.tv_sec - g->start_time_tv_sec) * 1000) + (tv.tv_usec / 1000); -+ memcpy(g->time_graph_y_values, y_values, g->params.num_of_y_items * sizeof(double)); -+ for (i=0;i<g->params.num_of_text_items; i++) { -+ strncpy(g->text_values[i], text_values[i], MAX_TEXT_SIZE); -+ g->text_values[i][MAX_TEXT_SIZE-1] = '\0'; -+ } -+ pthread_mutex_unlock(&g->mtx); -+ eventfd_write(g->eventfd, (eventfd_t)1); -+} -+ -+void time_graph_destroy(void *ctx) -+{ -+ struct graph *g = (struct graph *)ctx; -+ display_exit(g->display); -+ eventfd_write(g->eventfd, (eventfd_t)1); -+ pthread_join(g->thr, NULL); -+ widget_destroy(g->widget); -+ window_destroy(g->window); -+ display_destroy(g->display); -+ free(g->data); -+ close(g->eventfd); -+ free(g); -+ global_graph=NULL; -+} -+ -+void util_get_cpu_usage(double *cpu_usage) -+{ -+ static FILE *fp = NULL; -+ char buf[256]; -+ uint64_t tot; -+ uint64_t u, n, s, i, w, x, y, z; -+ static uint64_t last_i = 0, last_total = 0; -+ -+ -+ if (!fp) { -+ if (!(fp = fopen("/proc/stat", "r"))) -+ fprintf(stderr, "Failed /proc/stat open: %s", strerror(errno)); -+ } -+ if (fp) { -+ while (1) { -+ rewind(fp); -+ fflush(fp); -+ if (!fgets(buf, sizeof(buf), fp)) { -+ fprintf(stderr, "failed /proc/stat read\n"); -+ } else { -+ sscanf(buf, "cpu %Lu %Lu %Lu %Lu %Lu %Lu %Lu %Lu", -+ &u, -+ &n, -+ &s, -+ &i, -+ &w, -+ &x, -+ &y, -+ &z -+ ); -+ if (last_total == 0) { -+ last_total = u+n+s+i+w+x+y+z; -+ last_i = i; -+ usleep(100000); -+ } else { -+ tot = u+n+s+i+w+x+y+z; -+ *cpu_usage = (1.0 - ((double)(i-last_i)/(double)(tot-last_total))); -+ last_i = i; -+ last_total = tot; -+ break; -+ } -+ } -+ } -+ } -+} -+ -+void *bar_graph_create(int argc, char *argv[], struct bar_graph_create_params *cp) -+{ -+ struct graph *g; -+ struct display *d; -+ struct timeval tv; -+ -+ if (cp->num_of_y_items > MAX_ITEMS) return NULL; -+ if (cp->num_of_text_items > MAX_ITEMS) return NULL; -+ -+ if (global_graph == NULL) { -+ fprintf(stderr, "graph not initialized invoke time_graph_create first\n"); -+ return NULL; -+ } -+ g=global_graph; -+ g->bar_graph_params = *cp; -+ if (cp->num_of_y_items) -+ memcpy(&g->bar_graph_y_config_array[0], cp->y_config_array, -+ sizeof(struct _bar_graph_y_config) * cp->num_of_y_items); -+ if (cp->num_of_text_items) -+ memcpy(&g->bar_graph_text_config_array[0], cp->text_config_array, -+ sizeof(struct _text_config) * cp->num_of_text_items); -+ -+ return g; -+} -+ -+void bar_graph_plot(void *ctx, double *y_values, const char *text_values[]) -+{ -+ struct graph *g = ctx; -+ int i; -+ pthread_mutex_lock(&g->mtx); -+ memcpy(g->bar_graph_y_values, y_values, g->bar_graph_params.num_of_y_items * sizeof(double)); -+ for (i=0;i<g->bar_graph_params.num_of_text_items; i++) { -+ strncpy(g->bar_graph_text_values[i], text_values[i], MAX_TEXT_SIZE); -+ g->bar_graph_text_values[i][MAX_TEXT_SIZE-1] = '\0'; -+ } -+ pthread_mutex_unlock(&g->mtx); -+ //eventfd_write(g->eventfd, (eventfd_t)2); -+} -+ -+void bar_graph_destroy(void *ctx) -+{ -+ printf("Nothing to be done for this call\n"); -+ return; -+} -+ -diff --git a/clients/time_bar_graph.h b/clients/time_bar_graph.h -new file mode 100644 -index 0000000..97ac05a ---- /dev/null -+++ b/clients/time_bar_graph.h -@@ -0,0 +1,93 @@ -+ -+#ifndef _BAR_GRAPH_H_ -+#define _BAR_GRAPH_H_ -+ -+#include <stdint.h> -+ -+struct _rgba { -+ double r, g, b, a; // Values between 0 and 1 -+}; -+ -+struct _coordinate { -+ uint32_t x, y; // Co-ordinates relative to top-left of the window -+}; -+ -+struct _rect { -+ struct _coordinate bottom_left, top_right; -+}; -+ -+struct _y_config { -+ struct _rgba line_color; // Line color -+ struct _rgba fill_color; // Fill color, 0 alpha => no fill -+}; -+ -+struct _text_config { -+ struct _rgba color; // Color for drawing the text, RGBA -+ struct _coordinate at; // where to draw the text -+ int fontsize; // Font size -+}; -+ -+struct time_graph_create_params { -+ char *title; -+ //const char *bg_image; -+ uint32_t width; -+ uint32_t height; -+ struct _rect draw_area; -+ uint32_t time_span; // Amount of time the graph has to span in milliseconds -+ uint32_t num_of_y_items; -+ struct _y_config *y_config_array; -+ uint32_t num_of_text_items; -+ struct _text_config *text_config_array; -+}; -+ -+ -+struct _bar_graph_y_config { -+ struct _rect region; // Region for the bar graph -+ struct _rgba line_color; // Color for drawing the line, RGBA -+ struct _rgba fill_color; // Fill under the line with color RGBA, 0 => no fill -+}; -+ -+struct bar_graph_create_params { -+ char *title; -+ //const char *bg_image; -+ uint32_t num_of_y_items; -+ struct _bar_graph_y_config *y_config_array; -+ uint32_t num_of_text_items; -+ struct _text_config *text_config_array; -+}; -+ -+/* Creates a time graph using create parameters */ -+void *bar_graph_create(int argc, char *argv[], struct bar_graph_create_params *cp); -+ -+void move_graph(void *ctx, struct time_graph_create_params *cp); -+ -+/* Plots a new set of y-values from the values in the array y_values. -+ The number of values must be equal to "num_of_y_items" from create params -+ y_values must be normalized between 0.0 to 1.0 -+*/ -+void bar_graph_plot(void *ctx, double *y_values, const char *text_values[]); -+ -+/* Destroy the graph */ -+void bar_graph_destroy(void *ctx); -+ -+ -+/* Creates a time graph using create parameters */ -+void *time_graph_create(int argc, char *argv[], struct time_graph_create_params *cp); -+ -+/* -+ * Plots a new set of points from the values in the array y_values. -+ * The number of values in the array y_values must be equal to "num_of_y_items" -+ * from create params -+ * y_values must be normalized between 0.0 to 1.0 -+ -+ * The number of values in the array text_values must be equal to "num_of_text_items" -+ * from create params -+*/ -+void time_graph_plot(void *ctx, double *y_values, const char *text_values[]); -+ -+/* Destroy the graph */ -+void time_graph_destroy(void *ctx); -+ -+void util_get_cpu_usage(double *cpu_usage); -+ -+#endif /* _BAR_GRAPH_H_ */ --- -1.9.1 - diff --git a/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0003-weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch b/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0003-weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch deleted file mode 100644 index 32901db99..000000000 --- a/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0003-weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 8034bc1862bbebb332e91917c6458ef8efb5b54e Mon Sep 17 00:00:00 2001 -From: Eric Ruei <e-ruei1@ti.com> -Date: Fri, 8 Mar 2019 18:49:07 -0500 -Subject: [PATCH] weston: Fix virtual keyboard display issue for QT5 - application - -The virtual keyboard does pop up as expected, however, it will never hide -even when the application is terminated. This problem is due to the order -of the text APIs( text_input_activate and test_input_show_input_panel) are -invoked in QT5 and a potential bug of the API implementation. The virtual -keyboard works as expected if the test_input_show_input_panel() is invoked -prior to the test_input_activate() as most of the weston sample applications -do. However, the problem will show up if that order is reversed and the reason -why is that the current_panel is not set in this case and hence this panel -cannot be hidden. - -It is required to set the current_panel to the text_input when the input_panel -becomes visible at the first time. - -Upstream status: Pending - -Signed-off-by: Eric Ruei <e-ruei1@ti.com> ---- - compositor/text-backend.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/compositor/text-backend.c b/compositor/text-backend.c -index 664c36f..b610dfb 100644 ---- a/compositor/text-backend.c -+++ b/compositor/text-backend.c -@@ -349,6 +349,7 @@ text_input_show_input_panel(struct wl_client *client, - text_input->surface); - wl_signal_emit(&ec->update_input_panel_signal, - &text_input->cursor_rectangle); -+ text_input->manager->current_text_input = text_input; - } - } - --- -1.9.1 - diff --git a/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0004-weston-Fix-touch-screen-crash-issue.patch b/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0004-weston-Fix-touch-screen-crash-issue.patch deleted file mode 100644 index 4849d5b64..000000000 --- a/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0004-weston-Fix-touch-screen-crash-issue.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 60250e9dc57fe56148c8a24bba107bce8a873fb4 Mon Sep 17 00:00:00 2001 -From: Karthik Ramanan <a0393906@ti.com> -Date: Mon, 12 Mar 2018 10:56:28 +0530 -Subject: [PATCH 4/4] weston: Fix touch screen crash issue - -Touch screen operation causes the weston to crash with segment fault sometimes. -The crash occurs when the coordinate (x,y) passed to the weston input module -is outside the view window, hence the weston compositor is not able to pick -up a display view and there is no code to detect this condition at function -notify_touch(). - -Upstream status: pending - -Signed-off-by: Eric Ruei <e-ruei1@ti.com> -Signed-off-by: Karthik Ramanan <a0393906@ti.com> ---- - libweston/input.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/libweston/input.c b/libweston/input.c -index 4fedc55..bcb2f28 100644 ---- a/libweston/input.c -+++ b/libweston/input.c -@@ -2185,6 +2185,12 @@ notify_touch(struct weston_seat *seat, uint32_t time, int touch_id, - * until all touch points are up again. */ - if (touch->num_tp == 1) { - ev = weston_compositor_pick_view(ec, x, y, &sx, &sy); -+ if (!ev) -+ { -+ weston_log("notify_touch: weston_compositor_pick_view(%d, %d) failed to find a view!\n", -+ wl_fixed_to_int(x), wl_fixed_to_int(y)); -+ return; -+ } - weston_touch_set_focus(touch, ev); - } else if (!touch->focus) { - /* Unexpected condition: We have non-initial touch but --- -1.9.1 - diff --git a/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0005-weston-drm-fix-dual-display-issue.patch b/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0005-weston-drm-fix-dual-display-issue.patch deleted file mode 100644 index 9b06b81b3..000000000 --- a/meta-agl-bsp/meta-ti/recipes-arago/weston/weston/0005-weston-drm-fix-dual-display-issue.patch +++ /dev/null @@ -1,79 +0,0 @@ -From db6f5ce008d9b8a4cc7db71659ce1d21d3d7f97f Mon Sep 17 00:00:00 2001 -From: Eric Ruei <e-ruei1@ti.com> -Date: Tue, 26 Mar 2019 13:32:31 -0400 -Subject: [PATCH 3/3] weston: drm: fix dual display issue - -This patch fixes the dual display issue by enhancing the primary plane -search algorithm to keep the plane which is connected to the crtc of -the output because the direct switching of active planes is not allowed. - -Upstream status: Pending - -Signed-off-by: Eric Ruei <e-ruei1@ti.com> ---- - libweston/compositor-drm.c | 17 ++++++++++++++++- - 1 file changed, 16 insertions(+), 1 deletion(-) - -diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c -index 3891176..fa694c3 100644 ---- a/libweston/compositor-drm.c -+++ b/libweston/compositor-drm.c -@@ -428,6 +428,7 @@ struct drm_plane { - - uint32_t possible_crtcs; - uint32_t plane_id; -+ uint32_t crtc_id; - uint32_t count_formats; - - struct drm_property_info props[WDRM_PLANE__COUNT]; -@@ -4073,6 +4074,7 @@ drm_plane_create(struct drm_backend *b, const drmModePlane *kplane, - if (kplane) { - plane->possible_crtcs = kplane->possible_crtcs; - plane->plane_id = kplane->plane_id; -+ plane->crtc_id = kplane->crtc_id; - - props = drmModeObjectGetProperties(b->drm.fd, kplane->plane_id, - DRM_MODE_OBJECT_PLANE); -@@ -4097,6 +4099,7 @@ drm_plane_create(struct drm_backend *b, const drmModePlane *kplane, - else { - plane->possible_crtcs = (1 << output->pipe); - plane->plane_id = 0; -+ plane->crtc_id = 0; - plane->count_formats = 1; - plane->formats[0].format = format; - plane->type = type; -@@ -4157,6 +4160,7 @@ drm_output_find_special_plane(struct drm_backend *b, struct drm_output *output, - enum wdrm_plane_type type) - { - struct drm_plane *plane; -+ struct drm_plane *plane2 = NULL; /* secondary plane */ - - if (!b->universal_planes) { - uint32_t format; -@@ -4204,11 +4208,22 @@ drm_output_find_special_plane(struct drm_backend *b, struct drm_output *output, - if (found_elsewhere) - continue; - -+ /* The output should keep the primary plane connected to its -+ * crtc since the direct switching of active plane is not -+ * allowed. */ -+ if ((type == WDRM_PLANE_TYPE_PRIMARY) && -+ (plane->crtc_id != output->crtc_id)) { -+ if (plane->crtc_id == 0) { -+ plane->possible_crtcs = (1 << output->pipe); -+ plane2 = plane; -+ } -+ continue; -+ } - plane->possible_crtcs = (1 << output->pipe); - return plane; - } - -- return NULL; -+ return plane2; - } - - /** --- -1.9.1 - diff --git a/meta-agl-bsp/meta-ti/recipes-arago/weston/weston_8.0.0.bbappend b/meta-agl-bsp/meta-ti/recipes-arago/weston/weston_8.0.0.bbappend deleted file mode 100644 index 21c912a66..000000000 --- a/meta-agl-bsp/meta-ti/recipes-arago/weston/weston_8.0.0.bbappend +++ /dev/null @@ -1,13 +0,0 @@ -PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/libgbm mtdev" - -PR_append = ".arago2" - -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -# file://0005-weston-drm-fix-dual-display-issue.patch -SRC_URI += " \ - file://0003-weston-Fix-virtual-keyboard-display-issue-for-QT5-ap.patch \ - file://0004-weston-Fix-touch-screen-crash-issue.patch \ -" - -INHIBIT_PACKAGE_STRIP = "1" diff --git a/meta-agl-bsp/meta-ti/recipes-bsp/alsa-state/alsa-state.bbappend b/meta-agl-bsp/meta-ti/recipes-bsp/alsa-state/alsa-state.bbappend deleted file mode 100644 index 3b2b8beb8..000000000 --- a/meta-agl-bsp/meta-ti/recipes-bsp/alsa-state/alsa-state.bbappend +++ /dev/null @@ -1 +0,0 @@ -FILESEXTRAPATHS_prepend_dra7xx-evm := "${THISDIR}/${PN}:" diff --git a/meta-agl-bsp/meta-ti/recipes-bsp/alsa-state/alsa-state/asound.state b/meta-agl-bsp/meta-ti/recipes-bsp/alsa-state/alsa-state/asound.state deleted file mode 100644 index fe3ce6795..000000000 --- a/meta-agl-bsp/meta-ti/recipes-bsp/alsa-state/alsa-state/asound.state +++ /dev/null @@ -1,1347 +0,0 @@ -state.DRA7xxEVM { - control.1 { - iface MIXER - name 'Left Line Mixer Line2R Bypass Volume' - value 118 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 118' - dbmin -9999999 - dbmax 0 - dbvalue.0 0 - } - } - control.2 { - iface MIXER - name 'Right Line Mixer Line2L Bypass Volume' - value 118 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 118' - dbmin -9999999 - dbmax 0 - dbvalue.0 0 - } - } - control.3 { - iface MIXER - name 'Left HP Mixer Line2R Bypass Volume' - value 118 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 118' - dbmin -9999999 - dbmax 0 - dbvalue.0 0 - } - } - control.4 { - iface MIXER - name 'Right HP Mixer Line2L Bypass Volume' - value 118 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 118' - dbmin -9999999 - dbmax 0 - dbvalue.0 0 - } - } - control.5 { - iface MIXER - name 'Left HPCOM Mixer Line2R Bypass Volume' - value 118 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 118' - dbmin -9999999 - dbmax 0 - dbvalue.0 0 - } - } - control.6 { - iface MIXER - name 'Right HPCOM Mixer Line2L Bypass Volume' - value 118 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 118' - dbmin -9999999 - dbmax 0 - dbvalue.0 0 - } - } - control.7 { - iface MIXER - name 'Line Line2 Bypass Volume' - value.0 71 - value.1 71 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 118' - dbmin -9999999 - dbmax 0 - dbvalue.0 -2350 - dbvalue.1 -2350 - } - } - control.8 { - iface MIXER - name 'HP Line2 Bypass Volume' - value.0 71 - value.1 71 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 118' - dbmin -9999999 - dbmax 0 - dbvalue.0 -2350 - dbvalue.1 -2350 - } - } - control.9 { - iface MIXER - name 'HPCOM Line2 Bypass Volume' - value.0 71 - value.1 71 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 118' - dbmin -9999999 - dbmax 0 - dbvalue.0 -2350 - dbvalue.1 -2350 - } - } - control.10 { - iface MIXER - name 'Mono Line2 Bypass Volume' - value.0 71 - value.1 71 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 118' - dbmin -9999999 - dbmax 0 - dbvalue.0 -2350 - dbvalue.1 -2350 - } - } - control.11 { - iface MIXER - name 'Mono PGA Bypass Volume' - value.0 71 - value.1 71 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 118' - dbmin -9999999 - dbmax 0 - dbvalue.0 -2350 - dbvalue.1 -2350 - } - } - control.12 { - iface MIXER - name 'Mono DAC Playback Volume' - value.0 71 - value.1 71 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 118' - dbmin -9999999 - dbmax 0 - dbvalue.0 -2350 - dbvalue.1 -2350 - } - } - control.13 { - iface MIXER - name 'Mono Playback Switch' - value true - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.14 { - iface MIXER - name 'PCM Playback Volume' - value.0 127 - value.1 127 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 127' - dbmin -6350 - dbmax 0 - dbvalue.0 0 - dbvalue.1 0 - } - } - control.15 { - iface MIXER - name 'Left Line Mixer PGAR Bypass Volume' - value 118 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 118' - dbmin -9999999 - dbmax 0 - dbvalue.0 0 - } - } - control.16 { - iface MIXER - name 'Left Line Mixer DACR1 Playback Volume' - value 118 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 118' - dbmin -9999999 - dbmax 0 - dbvalue.0 0 - } - } - control.17 { - iface MIXER - name 'Right Line Mixer PGAL Bypass Volume' - value 118 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 118' - dbmin -9999999 - dbmax 0 - dbvalue.0 0 - } - } - control.18 { - iface MIXER - name 'Right Line Mixer DACL1 Playback Volume' - value 118 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 118' - dbmin -9999999 - dbmax 0 - dbvalue.0 0 - } - } - control.19 { - iface MIXER - name 'Left HP Mixer PGAR Bypass Volume' - value 118 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 118' - dbmin -9999999 - dbmax 0 - dbvalue.0 0 - } - } - control.20 { - iface MIXER - name 'Left HP Mixer DACR1 Playback Volume' - value 118 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 118' - dbmin -9999999 - dbmax 0 - dbvalue.0 0 - } - } - control.21 { - iface MIXER - name 'Right HP Mixer PGAL Bypass Volume' - value 118 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 118' - dbmin -9999999 - dbmax 0 - dbvalue.0 0 - } - } - control.22 { - iface MIXER - name 'Right HP Mixer DACL1 Playback Volume' - value 118 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 118' - dbmin -9999999 - dbmax 0 - dbvalue.0 0 - } - } - control.23 { - iface MIXER - name 'Left HPCOM Mixer PGAR Bypass Volume' - value 118 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 118' - dbmin -9999999 - dbmax 0 - dbvalue.0 0 - } - } - control.24 { - iface MIXER - name 'Left HPCOM Mixer DACR1 Playback Volume' - value 118 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 118' - dbmin -9999999 - dbmax 0 - dbvalue.0 0 - } - } - control.25 { - iface MIXER - name 'Right HPCOM Mixer PGAL Bypass Volume' - value 118 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 118' - dbmin -9999999 - dbmax 0 - dbvalue.0 0 - } - } - control.26 { - iface MIXER - name 'Right HPCOM Mixer DACL1 Playback Volume' - value 118 - comment { - access 'read write' - type INTEGER - count 1 - range '0 - 118' - dbmin -9999999 - dbmax 0 - dbvalue.0 0 - } - } - control.27 { - iface MIXER - name 'Line PGA Bypass Volume' - value.0 71 - value.1 71 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 118' - dbmin -9999999 - dbmax 0 - dbvalue.0 -2350 - dbvalue.1 -2350 - } - } - control.28 { - iface MIXER - name 'Line DAC Playback Volume' - value.0 118 - value.1 118 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 118' - dbmin -9999999 - dbmax 0 - dbvalue.0 0 - dbvalue.1 0 - } - } - control.29 { - iface MIXER - name 'HP PGA Bypass Volume' - value.0 71 - value.1 71 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 118' - dbmin -9999999 - dbmax 0 - dbvalue.0 -2350 - dbvalue.1 -2350 - } - } - control.30 { - iface MIXER - name 'HP DAC Playback Volume' - value.0 71 - value.1 71 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 118' - dbmin -9999999 - dbmax 0 - dbvalue.0 -2350 - dbvalue.1 -2350 - } - } - control.31 { - iface MIXER - name 'HPCOM PGA Bypass Volume' - value.0 71 - value.1 71 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 118' - dbmin -9999999 - dbmax 0 - dbvalue.0 -2350 - dbvalue.1 -2350 - } - } - control.32 { - iface MIXER - name 'HPCOM DAC Playback Volume' - value.0 71 - value.1 71 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 118' - dbmin -9999999 - dbmax 0 - dbvalue.0 -2350 - dbvalue.1 -2350 - } - } - control.33 { - iface MIXER - name 'Line Playback Switch' - value.0 true - value.1 true - comment { - access 'read write' - type BOOLEAN - count 2 - } - } - control.34 { - iface MIXER - name 'HP Playback Switch' - value.0 false - value.1 false - comment { - access 'read write' - type BOOLEAN - count 2 - } - } - control.35 { - iface MIXER - name 'HPCOM Playback Switch' - value.0 false - value.1 false - comment { - access 'read write' - type BOOLEAN - count 2 - } - } - control.36 { - iface MIXER - name 'AGC Switch' - value.0 false - value.1 false - comment { - access 'read write' - type BOOLEAN - count 2 - } - } - control.37 { - iface MIXER - name 'Left AGC Target level' - value '-5.5dB' - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 '-5.5dB' - item.1 '-8dB' - item.2 '-10dB' - item.3 '-12dB' - item.4 '-14dB' - item.5 '-17dB' - item.6 '-20dB' - item.7 '-24dB' - } - } - control.38 { - iface MIXER - name 'Right AGC Target level' - value '-5.5dB' - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 '-5.5dB' - item.1 '-8dB' - item.2 '-10dB' - item.3 '-12dB' - item.4 '-14dB' - item.5 '-17dB' - item.6 '-20dB' - item.7 '-24dB' - } - } - control.39 { - iface MIXER - name 'Left AGC Attack time' - value '8ms' - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 '8ms' - item.1 '11ms' - item.2 '16ms' - item.3 '20ms' - } - } - control.40 { - iface MIXER - name 'Right AGC Attack time' - value '8ms' - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 '8ms' - item.1 '11ms' - item.2 '16ms' - item.3 '20ms' - } - } - control.41 { - iface MIXER - name 'Left AGC Decay time' - value '100ms' - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 '100ms' - item.1 '200ms' - item.2 '400ms' - item.3 '500ms' - } - } - control.42 { - iface MIXER - name 'Right AGC Decay time' - value '100ms' - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 '100ms' - item.1 '200ms' - item.2 '400ms' - item.3 '500ms' - } - } - control.43 { - iface MIXER - name 'De-emphasis Switch' - value.0 false - value.1 false - comment { - access 'read write' - type BOOLEAN - count 2 - } - } - control.44 { - iface MIXER - name 'PGA Capture Volume' - value.0 79 - value.1 79 - comment { - access 'read write' - type INTEGER - count 2 - range '0 - 119' - dbmin 0 - dbmax 5950 - dbvalue.0 3950 - dbvalue.1 3950 - } - } - control.45 { - iface MIXER - name 'PGA Capture Switch' - value.0 true - value.1 true - comment { - access 'read write' - type BOOLEAN - count 2 - } - } - control.46 { - iface MIXER - name 'ADC HPF Cut-off' - value.0 Disabled - value.1 Disabled - comment { - access 'read write' - type ENUMERATED - count 2 - item.0 Disabled - item.1 '0.0045xFs' - item.2 '0.0125xFs' - item.3 '0.025xFs' - } - } - control.47 { - iface MIXER - name 'Output Driver Power-On time' - value '0us' - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 '0us' - item.1 '10us' - item.2 '100us' - item.3 '1ms' - item.4 '10ms' - item.5 '50ms' - item.6 '100ms' - item.7 '200ms' - item.8 '400ms' - item.9 '800ms' - item.10 '2s' - item.11 '4s' - } - } - control.48 { - iface MIXER - name 'Output Driver Ramp-up step' - value '0ms' - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 '0ms' - item.1 '1ms' - item.2 '2ms' - item.3 '4ms' - } - } - control.49 { - iface MIXER - name 'Left DAC Mux' - value DAC_L1 - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 DAC_L1 - item.1 DAC_L3 - item.2 DAC_L2 - } - } - control.50 { - iface MIXER - name 'Left HPCOM Mux' - value 'differential of HPLOUT' - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 'differential of HPLOUT' - item.1 'constant VCM' - item.2 single-ended - } - } - control.51 { - iface MIXER - name 'Right DAC Mux' - value DAC_R1 - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 DAC_R1 - item.1 DAC_R3 - item.2 DAC_R2 - } - } - control.52 { - iface MIXER - name 'Right HPCOM Mux' - value 'differential of HPROUT' - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 'differential of HPROUT' - item.1 'constant VCM' - item.2 single-ended - item.3 'differential of HPLCOM' - item.4 'external feedback' - } - } - control.53 { - iface MIXER - name 'Left Line1L Mux' - value single-ended - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 single-ended - item.1 differential - } - } - control.54 { - iface MIXER - name 'Left Line1R Mux' - value single-ended - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 single-ended - item.1 differential - } - } - control.55 { - iface MIXER - name 'Right Line1L Mux' - value single-ended - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 single-ended - item.1 differential - } - } - control.56 { - iface MIXER - name 'Right Line1R Mux' - value single-ended - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 single-ended - item.1 differential - } - } - control.57 { - iface MIXER - name 'Left PGA Mixer Line1L Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.58 { - iface MIXER - name 'Left PGA Mixer Line1R Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.59 { - iface MIXER - name 'Left PGA Mixer Line2L Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.60 { - iface MIXER - name 'Left PGA Mixer Mic3L Switch' - value true - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.61 { - iface MIXER - name 'Left PGA Mixer Mic3R Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.62 { - iface MIXER - name 'Left Line2L Mux' - value single-ended - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 single-ended - item.1 differential - } - } - control.63 { - iface MIXER - name 'Right PGA Mixer Line1R Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.64 { - iface MIXER - name 'Right PGA Mixer Line1L Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.65 { - iface MIXER - name 'Right PGA Mixer Line2R Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.66 { - iface MIXER - name 'Right PGA Mixer Mic3L Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.67 { - iface MIXER - name 'Right PGA Mixer Mic3R Switch' - value true - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.68 { - iface MIXER - name 'Right Line2R Mux' - value single-ended - comment { - access 'read write' - type ENUMERATED - count 1 - item.0 single-ended - item.1 differential - } - } - control.69 { - iface MIXER - name 'Left Line Mixer PGAL Bypass Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.70 { - iface MIXER - name 'Left Line Mixer DACL1 Switch' - value true - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.71 { - iface MIXER - name 'Left Line Mixer PGAR Bypass Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.72 { - iface MIXER - name 'Left Line Mixer DACR1 Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.73 { - iface MIXER - name 'Left Line Mixer Line2L Bypass Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.74 { - iface MIXER - name 'Left Line Mixer Line2R Bypass Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.75 { - iface MIXER - name 'Right Line Mixer PGAL Bypass Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.76 { - iface MIXER - name 'Right Line Mixer DACL1 Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.77 { - iface MIXER - name 'Right Line Mixer PGAR Bypass Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.78 { - iface MIXER - name 'Right Line Mixer DACR1 Switch' - value true - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.79 { - iface MIXER - name 'Right Line Mixer Line2L Bypass Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.80 { - iface MIXER - name 'Right Line Mixer Line2R Bypass Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.81 { - iface MIXER - name 'Left HP Mixer PGAL Bypass Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.82 { - iface MIXER - name 'Left HP Mixer DACL1 Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.83 { - iface MIXER - name 'Left HP Mixer PGAR Bypass Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.84 { - iface MIXER - name 'Left HP Mixer DACR1 Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.85 { - iface MIXER - name 'Left HP Mixer Line2L Bypass Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.86 { - iface MIXER - name 'Left HP Mixer Line2R Bypass Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.87 { - iface MIXER - name 'Right HP Mixer PGAL Bypass Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.88 { - iface MIXER - name 'Right HP Mixer DACL1 Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.89 { - iface MIXER - name 'Right HP Mixer PGAR Bypass Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.90 { - iface MIXER - name 'Right HP Mixer DACR1 Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.91 { - iface MIXER - name 'Right HP Mixer Line2L Bypass Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.92 { - iface MIXER - name 'Right HP Mixer Line2R Bypass Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.93 { - iface MIXER - name 'Left HPCOM Mixer PGAL Bypass Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.94 { - iface MIXER - name 'Left HPCOM Mixer DACL1 Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.95 { - iface MIXER - name 'Left HPCOM Mixer PGAR Bypass Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.96 { - iface MIXER - name 'Left HPCOM Mixer DACR1 Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.97 { - iface MIXER - name 'Left HPCOM Mixer Line2L Bypass Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.98 { - iface MIXER - name 'Left HPCOM Mixer Line2R Bypass Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.99 { - iface MIXER - name 'Right HPCOM Mixer PGAL Bypass Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.100 { - iface MIXER - name 'Right HPCOM Mixer DACL1 Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.101 { - iface MIXER - name 'Right HPCOM Mixer PGAR Bypass Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.102 { - iface MIXER - name 'Right HPCOM Mixer DACR1 Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.103 { - iface MIXER - name 'Right HPCOM Mixer Line2L Bypass Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.104 { - iface MIXER - name 'Right HPCOM Mixer Line2R Bypass Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.105 { - iface MIXER - name 'Mono Mixer Line2L Bypass Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.106 { - iface MIXER - name 'Mono Mixer PGAL Bypass Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.107 { - iface MIXER - name 'Mono Mixer DACL1 Switch' - value true - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.108 { - iface MIXER - name 'Mono Mixer Line2R Bypass Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.109 { - iface MIXER - name 'Mono Mixer PGAR Bypass Switch' - value false - comment { - access 'read write' - type BOOLEAN - count 1 - } - } - control.110 { - iface MIXER - name 'Mono Mixer DACR1 Switch' - value true - comment { - access 'read write' - type BOOLEAN - count 1 - } - } -} -state.H58040000encode { - control { - } -} diff --git a/meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km/0001-Add-support-for-AGL-toolchain.patch b/meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km/0001-Add-support-for-AGL-toolchain.patch deleted file mode 100644 index 93aff157a..000000000 --- a/meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km/0001-Add-support-for-AGL-toolchain.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 11131a5e778d19c06eefbcf61447c6efbcee0613 Mon Sep 17 00:00:00 2001 -From: Paul Barker <paul.barker@sancloud.co.uk> -Date: Mon, 18 Nov 2019 08:47:41 +0000 -Subject: [PATCH] Add support for AGL toolchain - -We can use the pre-existing config for arm-linux-gnueabihf, we just need -to make sure our toolchain is matched against this and not -arm-linux-gnueabi. - -Signed-off-by: Paul Barker <paul.barker@sancloud.co.uk> ---- - eurasia_km/eurasiacon/build/linux2/config/compiler.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/eurasia_km/eurasiacon/build/linux2/config/compiler.mk b/eurasia_km/eurasiacon/build/linux2/config/compiler.mk -index 2ba3e5e..03e86c5 100644 ---- a/eurasia_km/eurasiacon/build/linux2/config/compiler.mk -+++ b/eurasia_km/eurasiacon/build/linux2/config/compiler.mk -@@ -68,7 +68,7 @@ define calculate-compiler-preferred-target - ifneq ($$(filter aarch64-%,$$($(1)_compiler_preferred_target)),) - $(1)_compiler_preferred_target := aarch64-linux-gnu - endif -- ifneq ($$(filter arm-%-gnueabihf arm-oe-linux-gnueabi,$$($(1)_compiler_preferred_target)),) -+ ifneq ($$(filter arm-%-gnueabihf arm-oe-linux-gnueabi arm-agl-linux-gnueabi,$$($(1)_compiler_preferred_target)),) - $(1)_compiler_preferred_target := arm-linux-gnueabihf - endif - ifneq ($$(filter arm-%-gnueabi armv7a-cros-linux-gnueabi armv7hl-redhat-linux-gnueabi,$$($(1)_compiler_preferred_target)),) --- -2.17.1 - diff --git a/meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km_%.bbappend b/meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km_%.bbappend deleted file mode 100644 index 6390e660e..000000000 --- a/meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km_%.bbappend +++ /dev/null @@ -1,3 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -SRC_URI += "file://0001-Add-support-for-AGL-toolchain.patch" diff --git a/meta-agl-bsp/meta-ti/recipes-bsp/u-boot/files/uEnv.txt b/meta-agl-bsp/meta-ti/recipes-bsp/u-boot/files/uEnv.txt deleted file mode 100755 index 79f3d1ff2..000000000 --- a/meta-agl-bsp/meta-ti/recipes-bsp/u-boot/files/uEnv.txt +++ /dev/null @@ -1 +0,0 @@ -fdtfile=dra7-evm-lcd-osd101t2045.dtb diff --git a/meta-agl-bsp/meta-ti/recipes-bsp/u-boot/u-boot-ti-staging_%.bbappend b/meta-agl-bsp/meta-ti/recipes-bsp/u-boot/u-boot-ti-staging_%.bbappend deleted file mode 100644 index d1b9b2704..000000000 --- a/meta-agl-bsp/meta-ti/recipes-bsp/u-boot/u-boot-ti-staging_%.bbappend +++ /dev/null @@ -1,16 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -PR_append = "_agl" - -SRC_URI += " file://${UBOOT_ENV_BINARY}" - -UBOOT_ENV = "uEnv" - -do_deploy_append () { - if [ "x${UBOOT_ENV}" != "x" ] - then - install ${WORKDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_IMAGE} - ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_SYMLINK} - fi -} - diff --git a/meta-agl-bsp/meta-ti/recipes-graphics/libgles/ti-sgx-ddk-um/pvr.service b/meta-agl-bsp/meta-ti/recipes-graphics/libgles/ti-sgx-ddk-um/pvr.service deleted file mode 100644 index 1acb94fd4..000000000 --- a/meta-agl-bsp/meta-ti/recipes-graphics/libgles/ti-sgx-ddk-um/pvr.service +++ /dev/null @@ -1,19 +0,0 @@ -[Unit] -Description=PVR service -SourcePath=/etc/ti-sgx/rc.pvr -DefaultDependencies=no -Before=psplash-start.service - -[Service] -Type=forking -Restart=no -TimeoutSec=5min -IgnoreSIGPIPE=no -KillMode=process -GuessMainPID=no -RemainAfterExit=yes -ExecStart=/etc/ti-sgx/rc.pvr start -ExecStop=/etc/ti-sgx/rc.pvr stop - -[Install] -WantedBy=sysinit.target diff --git a/meta-agl-bsp/meta-ti/recipes-graphics/libgles/ti-sgx-ddk-um_%.bbappend b/meta-agl-bsp/meta-ti/recipes-graphics/libgles/ti-sgx-ddk-um_%.bbappend deleted file mode 100644 index 21142df59..000000000 --- a/meta-agl-bsp/meta-ti/recipes-graphics/libgles/ti-sgx-ddk-um_%.bbappend +++ /dev/null @@ -1,18 +0,0 @@ -FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" -FILES_${PN} += "/etc/ti-sgx/" - -SRC_URI_append = "\ - file://pvr.service \ -" - -inherit systemd - -SYSTEMD_PACKAGES = "${PN}" -SYSTEMD_SERVICE_${PN} = "pvr.service" - -do_install_append() { - install -d ${D}${systemd_system_unitdir} - install -m 0755 ${WORKDIR}/pvr.service ${D}${systemd_system_unitdir} - install -d ${D}/etc/ti-sgx - install -m 0755 ${D}/etc/init.d/rc.pvr ${D}/etc/ti-sgx -} diff --git a/meta-agl-bsp/meta-ti/recipes-graphics/mesa/mesa-gl_%.bbappend b/meta-agl-bsp/meta-ti/recipes-graphics/mesa/mesa-gl_%.bbappend deleted file mode 100644 index a5a69513a..000000000 --- a/meta-agl-bsp/meta-ti/recipes-graphics/mesa/mesa-gl_%.bbappend +++ /dev/null @@ -1,7 +0,0 @@ -# Remove GBM support from Mesa -# TI Platforms provides own GBM library - -PACKAGES_remove = "libgbm" -PACKAGES_remove = "libgbm-dev" - -EXTRA_OECONF_remove = "--enable-gbm" diff --git a/meta-agl-bsp/meta-ti/recipes-graphics/wayland/weston-ini-conf.bbappend b/meta-agl-bsp/meta-ti/recipes-graphics/wayland/weston-ini-conf.bbappend deleted file mode 100644 index 684031eae..000000000 --- a/meta-agl-bsp/meta-ti/recipes-graphics/wayland/weston-ini-conf.bbappend +++ /dev/null @@ -1,7 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -# While we could have a panel attached to HDMI, we only use the default -# panel isntead. -SRC_URI_remove_dra7xx-evm = "file://hdmi-a-1-270.cfg" -# Our DPI panel shows up as "UNNAMED-1" -SRC_URI_append_dra7xx-evm = " file://unnamed.cfg" diff --git a/meta-agl-bsp/meta-ti/recipes-graphics/wayland/weston-ini-conf/unnamed.cfg b/meta-agl-bsp/meta-ti/recipes-graphics/wayland/weston-ini-conf/unnamed.cfg deleted file mode 100644 index 29544932e..000000000 --- a/meta-agl-bsp/meta-ti/recipes-graphics/wayland/weston-ini-conf/unnamed.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[output] -name=UNNAMED-1 -transform=270 diff --git a/meta-agl-bsp/meta-ti/recipes-kernel/linux/files/dcan2_pinmux_enable.patch b/meta-agl-bsp/meta-ti/recipes-kernel/linux/files/dcan2_pinmux_enable.patch deleted file mode 100644 index 6c54c5ee1..000000000 --- a/meta-agl-bsp/meta-ti/recipes-kernel/linux/files/dcan2_pinmux_enable.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts -index 35424da..08fca09 100644 ---- a/arch/arm/boot/dts/dra7-evm.dts -+++ b/arch/arm/boot/dts/dra7-evm.dts -@@ -243,6 +243,20 @@ - DRA7XX_CORE_IOPAD(0x380c, PIN_INPUT | MUX_MODE1) /* i2c2_scl.hdmi1_ddc_sda */ - >; - }; -+ dcan2_pins_default: dcan2_pins_default { -+ pinctrl-single,pins = < -+ DRA7XX_CORE_IOPAD(0x3688, PIN_OUTPUT_PULLUP | MUX_MODE2) /* gpio6_14.dcan2_tx */ -+ DRA7XX_CORE_IOPAD(0x368C, PIN_INPUT_PULLUP | MUX_MODE2) /* gpio6_15.dcan2_rx */ -+ >; -+ }; -+ -+ dcan2_pins_sleep: dcan2_pins_sleep { -+ pinctrl-single,pins = < -+ DRA7XX_CORE_IOPAD(0x3688, MUX_MODE15 | PULL_UP) /* gpio6_14.dcan2_tx.off */ -+ DRA7XX_CORE_IOPAD(0x368C, MUX_MODE15 | PULL_UP) /* gpio6_15.dcan2_rx.off */ -+ >; -+ }; -+ - }; - - &i2c1 { -@@ -703,6 +717,13 @@ - memory-region = <&ipu1_memory_region>; - }; - -+&dcan2 { -+ status = "ok"; -+ pinctrl-names = "default", "sleep"; -+ pinctrl-0 = <&dcan2_pins_default>; -+ pinctrl-1 = <&dcan2_pins_sleep>; -+}; -+ - &dsp1 { - status = "okay"; - memory-region = <&dsp1_memory_region>; diff --git a/meta-agl-bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_%.bbappend b/meta-agl-bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_%.bbappend deleted file mode 100644 index 2f6c449bc..000000000 --- a/meta-agl-bsp/meta-ti/recipes-kernel/linux/linux-ti-staging_%.bbappend +++ /dev/null @@ -1,11 +0,0 @@ -require recipes-kernel/linux/linux-agl.inc - -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -#------------------------------------------------------------------------- -# patches for enabling dcan2 and fix dcan1 & dcan2 adresses - -SRC_URI += " \ - file://dcan2_pinmux_enable.patch \ -" - diff --git a/meta-agl-bsp/meta-ti/recipes-multimedia/pulseaudio/pulseaudio/dra7xx-evm-set-default-sink-source.patch b/meta-agl-bsp/meta-ti/recipes-multimedia/pulseaudio/pulseaudio/dra7xx-evm-set-default-sink-source.patch deleted file mode 100644 index d45c5ef50..000000000 --- a/meta-agl-bsp/meta-ti/recipes-multimedia/pulseaudio/pulseaudio/dra7xx-evm-set-default-sink-source.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- pulseaudio-9.0/src/daemon/default.pa.in.orig 2017-08-04 00:07:08.833004893 +0300 -+++ pulseaudio-9.0/src/daemon/default.pa.in 2017-08-04 00:09:18.045102067 +0300 -@@ -162,8 +162,10 @@ - ])dnl - - ### Make some devices default --#set-default-sink output --#set-default-source input -+# DRA7xx-EVM CPU Board Line-Out/Headphone -+set-default-sink alsa_output.platform-sound0.analog-stereo -+# DRA7xx-EVM CPU Board Microphone/Line-In -+set-default-source alsa_input.platform-sound0.analog-stereo - - .ifexists module-router.so - load-module module-router diff --git a/meta-agl-bsp/meta-ti/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend b/meta-agl-bsp/meta-ti/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend deleted file mode 100644 index 37c4179e5..000000000 --- a/meta-agl-bsp/meta-ti/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend +++ /dev/null @@ -1,7 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/pulseaudio:" - -################### F I X M E #################### -# FIXME pyro -DISABLED_SRC_URI += " \ - file://dra7xx-evm-set-default-sink-source.patch \ -" diff --git a/meta-agl-bsp/openembedded-layer/recipes-devtools/lua/lua_%.bbappend b/meta-agl-bsp/openembedded-layer/recipes-devtools/lua/lua_%.bbappend new file mode 100644 index 000000000..f4fc54d86 --- /dev/null +++ b/meta-agl-bsp/openembedded-layer/recipes-devtools/lua/lua_%.bbappend @@ -0,0 +1,4 @@ +# this causes a crash in the selftest db.lua ! +# Bug-AGL: SPEC-3828 +# Upstream status: pending +SRC_URI:remove = "file://CVE-2020-15945.patch" diff --git a/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0001-Set-up-environment-for-OSTree-integration.patch b/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0001-Set-up-environment-for-OSTree-integration.patch deleted file mode 100644 index 5172fdd3a..000000000 --- a/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0001-Set-up-environment-for-OSTree-integration.patch +++ /dev/null @@ -1,41 +0,0 @@ -From ebb26338d0c2f436a86fd4d7cb8d723a90d6a369 Mon Sep 17 00:00:00 2001 -From: Anton Gerasimov <anton@advancedtelematic.com> -Date: Thu, 15 Sep 2016 17:52:41 +0200 -Subject: [PATCH 1/2] Set up environment for OSTree integration - ---- - include/configs/qemu-x86.h | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) - -diff --git a/include/configs/qemu-x86.h b/include/configs/qemu-x86.h -index 78c296f..79df455 100644 ---- a/include/configs/qemu-x86.h -+++ b/include/configs/qemu-x86.h -@@ -74,4 +74,24 @@ - #undef CONFIG_ENV_IS_IN_SPI_FLASH - #define CONFIG_ENV_IS_NOWHERE - -+#undef CONFIG_BOOTARGS -+#define CONFIG_BOOTARGS "root=/dev/hda2 console=ttyS0" -+ -+#undef CONFIG_BOOTDELAY -+#define CONFIG_BOOTDELAY 3 -+ -+#undef CONFIG_BOOTCOMMAND -+#define CONFIG_BOOTCOMMAND "run loadenv;" \ -+ "setenv bootargs $bootargs\" console=ttyS0 root=/dev/ram0 rw rootfstype=ext4 rootwait rootdelay=2 ostree_root=/dev/hda ramdisk_size=16384 \";" \ -+ "ext2load ide 0 $loadaddr \"/boot\"$kernel_image;" \ -+ "ext2load ide 0 $ramdiskaddr \"/boot\"$ramdisk_image;" \ -+ "zboot $loadaddr - $ramdiskaddr $filesize" -+ -+#undef CONFIG_EXTRA_ENV_SETTINGS -+#define CONFIG_EXTRA_ENV_SETTINGS "kernel_image=/bzImage\0" \ -+ "ramdisk_image=/initrd\0" \ -+ "ramdiskaddr=0x4000000\0" \ -+ "bootdelay=3\0" \ -+ "loadenv=if ext2load ide 0 $loadaddr /boot/loader/uEnv.txt; then env import -t $loadaddr $filesize; fi;" -+ - #endif /* __CONFIG_H */ --- -2.9.3 - diff --git a/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0001-fixup-build-with-gcc6.patch b/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0001-fixup-build-with-gcc6.patch deleted file mode 100644 index df1f786c6..000000000 --- a/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0001-fixup-build-with-gcc6.patch +++ /dev/null @@ -1,86 +0,0 @@ -From ba619c7ec7820e80d1b5b520440fdb81c31c0baf Mon Sep 17 00:00:00 2001 -From: Ronan Le Martret <ronan.lemartret@iot.bzh> -Date: Fri, 14 Oct 2016 09:03:11 +0200 -Subject: [PATCH] fix gcc6 build - -Signed-off-by: ronan <ronan@linux-pgnz.suse> ---- - include/linux/compiler-gcc6.h | 66 +++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 66 insertions(+) - create mode 100644 include/linux/compiler-gcc6.h - -diff --git a/include/linux/compiler-gcc6.h b/include/linux/compiler-gcc6.h -new file mode 100644 -index 0000000..a3d00d8 ---- /dev/null -+++ b/include/linux/compiler-gcc6.h -@@ -0,0 +1,66 @@ -+#ifndef __LINUX_COMPILER_H -+#error "Please don't include <linux/compiler-gcc6.h> directly, include <linux/compiler.h> instead." -+#endif -+ -+#define __used __attribute__((__used__)) -+#define __must_check __attribute__((warn_unused_result)) -+#define __compiler_offsetof(a, b) __builtin_offsetof(a, b) -+ -+/* Mark functions as cold. gcc will assume any path leading to a call -+ to them will be unlikely. This means a lot of manual unlikely()s -+ are unnecessary now for any paths leading to the usual suspects -+ like BUG(), printk(), panic() etc. [but let's keep them for now for -+ older compilers] -+ -+ Early snapshots of gcc 4.3 don't support this and we can't detect this -+ in the preprocessor, but we can live with this because they're unreleased. -+ Maketime probing would be overkill here. -+ -+ gcc also has a __attribute__((__hot__)) to move hot functions into -+ a special section, but I don't see any sense in this right now in -+ the kernel context */ -+#define __cold __attribute__((__cold__)) -+ -+#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) -+ -+#ifndef __CHECKER__ -+# define __compiletime_warning(message) __attribute__((warning(message))) -+# define __compiletime_error(message) __attribute__((error(message))) -+#endif /* __CHECKER__ */ -+ -+/* -+ * Mark a position in code as unreachable. This can be used to -+ * suppress control flow warnings after asm blocks that transfer -+ * control elsewhere. -+ * -+ * Early snapshots of gcc 4.5 don't support this and we can't detect -+ * this in the preprocessor, but we can live with this because they're -+ * unreleased. Really, we need to have autoconf for the kernel. -+ */ -+#define unreachable() __builtin_unreachable() -+ -+/* Mark a function definition as prohibited from being cloned. */ -+#define __noclone __attribute__((__noclone__)) -+ -+/* -+ * Tell the optimizer that something else uses this function or variable. -+ */ -+#define __visible __attribute__((externally_visible)) -+ -+/* -+ * GCC 'asm goto' miscompiles certain code sequences: -+ * -+ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 -+ * -+ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. -+ * Fixed in GCC 4.8.2 and later versions. -+ * -+ * (asm goto is automatically volatile - the naming reflects this.) -+ */ -+#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) -+ -+#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP -+#define __HAVE_BUILTIN_BSWAP32__ -+#define __HAVE_BUILTIN_BSWAP64__ -+#define __HAVE_BUILTIN_BSWAP16__ -+#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ --- -2.6.6 - diff --git a/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0002-Replace-wraps-with-built-in-code-to-remove-dependenc.patch b/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0002-Replace-wraps-with-built-in-code-to-remove-dependenc.patch deleted file mode 100644 index 7540b7467..000000000 --- a/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0002-Replace-wraps-with-built-in-code-to-remove-dependenc.patch +++ /dev/null @@ -1,138 +0,0 @@ -From ab0d7e270d89f6eb99582197d2d58bf60c9c3d26 Mon Sep 17 00:00:00 2001 -From: Anton Gerasimov <anton@advancedtelematic.com> -Date: Thu, 15 Sep 2016 16:49:32 +0200 -Subject: [PATCH 2/2] Replace wraps with built-in code to remove dependency on - multilib - ---- - arch/x86/config.mk | 2 -- - arch/x86/lib/gcc.c | 104 ++++++++++++++++++++++++++++++++++++++++++++--------- - 2 files changed, 87 insertions(+), 19 deletions(-) - -diff --git a/arch/x86/config.mk b/arch/x86/config.mk -index 999143e..139576e 100644 ---- a/arch/x86/config.mk -+++ b/arch/x86/config.mk -@@ -22,5 +22,3 @@ PLATFORM_RELFLAGS += -ffunction-sections -fvisibility=hidden - PLATFORM_LDFLAGS += --emit-relocs -Bsymbolic -Bsymbolic-functions -m elf_i386 - - LDFLAGS_FINAL += --gc-sections -pie --LDFLAGS_FINAL += --wrap=__divdi3 --wrap=__udivdi3 --LDFLAGS_FINAL += --wrap=__moddi3 --wrap=__umoddi3 -diff --git a/arch/x86/lib/gcc.c b/arch/x86/lib/gcc.c -index 497ad75..c321b11 100644 ---- a/arch/x86/lib/gcc.c -+++ b/arch/x86/lib/gcc.c -@@ -19,22 +19,92 @@ - - #ifdef __GNUC__ - --/* -- * GCC's libgcc handling is quite broken. While the libgcc functions -- * are always regparm(0) the code that calls them uses whatever the -- * compiler call specifies. Therefore we need a wrapper around those -- * functions. See gcc bug PR41055 for more information. -- */ --#define WRAP_LIBGCC_CALL(type, name) \ -- type __normal_##name(type a, type b) __attribute__((regparm(0))); \ -- type __wrap_##name(type a, type b); \ -- type __attribute__((no_instrument_function)) \ -- __wrap_##name(type a, type b) \ -- { return __normal_##name(a, b); } -- --WRAP_LIBGCC_CALL(long long, __divdi3) --WRAP_LIBGCC_CALL(unsigned long long, __udivdi3) --WRAP_LIBGCC_CALL(long long, __moddi3) --WRAP_LIBGCC_CALL(unsigned long long, __umoddi3) -+#include <stdint.h> -+#include <stddef.h> -+ -+uint64_t __udivmoddi4 ( uint64_t num, -+ uint64_t den, -+ uint64_t *rem_p ) -+{ -+ uint64_t quot = 0, qbit = 1; -+ -+ if ( den == 0 ) { -+ return 1/((unsigned)den); /* Intentional divide by zero, without -+ triggering a compiler warning which -+ would abort the build */ -+ } -+ -+ /* Left-justify denominator and count shift */ -+ while ( (int64_t)den >= 0 ) { -+ den <<= 1; -+ qbit <<= 1; -+ } -+ -+ while ( qbit ) { -+ if ( den <= num ) { -+ num -= den; -+ quot += qbit; -+ } -+ den >>= 1; -+ qbit >>= 1; -+ } -+ -+ if ( rem_p ) -+ *rem_p = num; -+ -+ return quot; -+} -+uint64_t __udivdi3( uint64_t num, uint64_t den ) -+{ -+ return __udivmoddi4(num, den, NULL); -+} -+ -+uint64_t __umoddi3 ( uint64_t num, uint64_t den ) -+{ -+ uint64_t v; -+ -+ (void) __udivmoddi4(num, den, &v); -+ return v; -+} -+ -+int64_t __divmoddi4 ( int64_t num, -+ int64_t den, -+ int64_t* rem_p ) -+{ -+ int minus = 0; -+ int64_t v; -+ -+ if ( num < 0 ) { -+ num = -num; -+ minus = 1; -+ } -+ if ( den < 0 ) { -+ den = -den; -+ minus ^= 1; -+ } -+ -+ v = __udivmoddi4(num, den, (uint64_t *)rem_p); -+ if ( minus ) { -+ v = -v; -+ if ( rem_p ) -+ *rem_p = -(*rem_p); -+ } -+ -+ return v; -+} -+ -+ -+int64_t __moddi3 (int64_t num, int64_t den) -+{ -+ int64_t v; -+ -+ (void) __divmoddi4(num, den, &v); -+ return v; -+} -+ -+int64_t __divdi3(int64_t num, int64_t den) -+{ -+ return __divmoddi4(num, den, NULL); -+} - - #endif --- -2.9.3 - diff --git a/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0002-fixup-build-with-gcc7.patch b/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0002-fixup-build-with-gcc7.patch deleted file mode 100644 index fc7933ea0..000000000 --- a/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota/0002-fixup-build-with-gcc7.patch +++ /dev/null @@ -1,101 +0,0 @@ -From eea58226f0b604d3047c495985197113838d3a7a Mon Sep 17 00:00:00 2001 -From: Trevor Woerner <twoerner@gmail.com> -Date: Tue, 20 Jun 2017 13:25:20 -0400 -Subject: [PATCH] fix build for gcc7 - -| In file included from .../include/linux/compiler.h:54:0, -| from .../include/uapi/linux/stddef.h:1, -| from .../include/linux/stddef.h:4, -| from .../include/uapi/linux/posix_types.h:4, -| from .../include/uapi/linux/types.h:13, -| from .../include/linux/types.h:5, -| from .../include/linux/mod_devicetable.h:11, -| from .../scripts/mod/devicetable-offsets.c:2: -| .../include/linux/compiler-gcc.h:121:1: fatal error: linux/compiler-gcc7.h: No such file or directory -| #include gcc_header(__GNUC__) - -Upstream-Status: Pending - -Signed-off-by: Trevor Woerner <twoerner@gmail.com> -Signed-off-by: Fabio Berton <fabio.berton@gmail.com> -Signed-off-by: Leon Anavi <leon.anavi@konsulko.com> ---- - include/linux/compiler-gcc7.h | 66 +++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 66 insertions(+) - create mode 100644 include/linux/compiler-gcc7.h - -diff --git a/include/linux/compiler-gcc7.h b/include/linux/compiler-gcc7.h -new file mode 100644 -index 0000000..cdd1cc2 ---- /dev/null -+++ b/include/linux/compiler-gcc7.h -@@ -0,0 +1,66 @@ -+#ifndef __LINUX_COMPILER_H -+#error "Please don't include <linux/compiler-gcc5.h> directly, include <linux/compiler.h> instead." -+#endif -+ -+#define __used __attribute__((__used__)) -+#define __must_check __attribute__((warn_unused_result)) -+#define __compiler_offsetof(a, b) __builtin_offsetof(a, b) -+ -+/* Mark functions as cold. gcc will assume any path leading to a call -+ to them will be unlikely. This means a lot of manual unlikely()s -+ are unnecessary now for any paths leading to the usual suspects -+ like BUG(), printk(), panic() etc. [but let's keep them for now for -+ older compilers] -+ -+ Early snapshots of gcc 4.3 don't support this and we can't detect this -+ in the preprocessor, but we can live with this because they're unreleased. -+ Maketime probing would be overkill here. -+ -+ gcc also has a __attribute__((__hot__)) to move hot functions into -+ a special section, but I don't see any sense in this right now in -+ the kernel context */ -+#define __cold __attribute__((__cold__)) -+ -+#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) -+ -+#ifndef __CHECKER__ -+# define __compiletime_warning(message) __attribute__((warning(message))) -+# define __compiletime_error(message) __attribute__((error(message))) -+#endif /* __CHECKER__ */ -+ -+/* -+ * Mark a position in code as unreachable. This can be used to -+ * suppress control flow warnings after asm blocks that transfer -+ * control elsewhere. -+ * -+ * Early snapshots of gcc 4.5 don't support this and we can't detect -+ * this in the preprocessor, but we can live with this because they're -+ * unreleased. Really, we need to have autoconf for the kernel. -+ */ -+#define unreachable() __builtin_unreachable() -+ -+/* Mark a function definition as prohibited from being cloned. */ -+#define __noclone __attribute__((__noclone__)) -+ -+/* -+ * Tell the optimizer that something else uses this function or variable. -+ */ -+#define __visible __attribute__((externally_visible)) -+ -+/* -+ * GCC 'asm goto' miscompiles certain code sequences: -+ * -+ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 -+ * -+ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. -+ * Fixed in GCC 4.8.2 and later versions. -+ * -+ * (asm goto is automatically volatile - the naming reflects this.) -+ */ -+#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) -+ -+#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP -+#define __HAVE_BUILTIN_BSWAP32__ -+#define __HAVE_BUILTIN_BSWAP64__ -+#define __HAVE_BUILTIN_BSWAP16__ -+#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ --- -2.7.4 - diff --git a/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota_2015.07.bb b/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota_2015.07.bb deleted file mode 100644 index 7ef3cacd4..000000000 --- a/meta-agl-bsp/recipes-bsp/u-boot/u-boot-ota_2015.07.bb +++ /dev/null @@ -1,29 +0,0 @@ -include recipes-bsp/u-boot/u-boot.inc -DEPENDS += "dtc-native" - -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://Licenses/README;md5=0507cd7da8e7ad6d6701926ec9b84c95" - -# This revision corresponds to the tag "v2015.07" -# We use the revision in order to avoid having to fetch it from the -# repo during parse -SRCREV = "baba2f57e8f4ed3fa67fe213d22da0de5e00f204" - -SRC_URI = "\ - git://git.denx.de/u-boot.git;branch=master \ - file://0001-Set-up-environment-for-OSTree-integration.patch \ - file://0002-Replace-wraps-with-built-in-code-to-remove-dependenc.patch \ - file://0001-fixup-build-with-gcc6.patch \ - file://0002-fixup-build-with-gcc7.patch \ -" -S = "${WORKDIR}/git" - -PV = "v2015.07+git${SRCPV}" - -EXTRA_OEMAKE_append = " KCFLAGS=-fgnu89-inline " -EXTRA_OEMAKE_append_qemux86 = " BUILD_ROM=y" -EXTRA_OEMAKE_append_qemux86-64 = " BUILD_ROM=y" - -UBOOT_SUFFIX = "bin" -UBOOT_SUFFIX_qemux86 = "rom" -UBOOT_SUFFIX_qemux86-64 = "rom" diff --git a/meta-agl-bsp/recipes-graphics/opencv/opencv/0004-Change-Max-Device-Count-To-16.patch b/meta-agl-bsp/recipes-graphics/opencv/opencv/0004-Change-Max-Device-Count-To-16.patch deleted file mode 100644 index 2ad367c8d..000000000 --- a/meta-agl-bsp/recipes-graphics/opencv/opencv/0004-Change-Max-Device-Count-To-16.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/modules/videoio/src/cap_v4l.cpp b/modules/videoio/src/cap_v4l.cpp -index c36a619a56..0040e4574e 100644 ---- a/modules/videoio/src/cap_v4l.cpp -+++ b/modules/videoio/src/cap_v4l.cpp -@@ -256,7 +256,7 @@ make & enjoy! - #define DEFAULT_V4L_HEIGHT 480 - #define DEFAULT_V4L_FPS 30 - --#define MAX_CAMERAS 8 -+#define MAX_CAMERAS 16 - - // default and maximum number of V4L buffers, not including last, 'special' buffer - #define MAX_V4L_BUFFERS 10 diff --git a/meta-agl-bsp/recipes-graphics/opencv/opencv_4.%.bbappend b/meta-agl-bsp/recipes-graphics/opencv/opencv_4.%.bbappend deleted file mode 100644 index 8a68b0641..000000000 --- a/meta-agl-bsp/recipes-graphics/opencv/opencv_4.%.bbappend +++ /dev/null @@ -1,5 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -SRC_URI += " \ - file://0004-Change-Max-Device-Count-To-16.patch \ - " diff --git a/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf.bb b/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf.bb deleted file mode 100644 index 14fbd0273..000000000 --- a/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf.bb +++ /dev/null @@ -1,28 +0,0 @@ -SUMMARY = "Startup script and systemd unit file for the Weston Wayland compositor" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" - -SRC_URI = "file://core.cfg \ - file://shell.cfg \ - file://hdmi-a-1-270.cfg \ - " - -S = "${WORKDIR}" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -do_compile() { - # Put all of our cfg files together. - rm -f ${WORKDIR}/weston.ini - for F in ${WORKDIR}/*.cfg; do - cat $F >> ${WORKDIR}/weston.ini - echo >> ${WORKDIR}/weston.ini - done - sed -i -e '$ d' ${WORKDIR}/weston.ini -} - -do_install_append() { - WESTON_INI_CONFIG=${sysconfdir}/xdg/weston - install -d ${D}${WESTON_INI_CONFIG} - install -m 0644 ${WORKDIR}/weston.ini ${D}${WESTON_INI_CONFIG}/weston.ini -} diff --git a/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf.bbappend b/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf.bbappend deleted file mode 100644 index 671fa171f..000000000 --- a/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf.bbappend +++ /dev/null @@ -1,5 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -SRC_URI += "${@bb.utils.contains("DISTRO_FEATURES", "weston-remoting", "file://remote-output.cfg", "",d)}" diff --git a/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/core.cfg b/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/core.cfg deleted file mode 100644 index 90774ed79..000000000 --- a/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/core.cfg +++ /dev/null @@ -1,4 +0,0 @@ -[core] -backend=drm-backend.so -require-input=false -modules=systemd-notify.so diff --git a/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-270.cfg b/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-270.cfg deleted file mode 100644 index dffc2b6dd..000000000 --- a/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-270.cfg +++ /dev/null @@ -1,6 +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 diff --git a/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-90.cfg b/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-90.cfg deleted file mode 100644 index 88a692a1b..000000000 --- a/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-90.cfg +++ /dev/null @@ -1,6 +0,0 @@ -# A display is connected to HDMI-A-1 and needs to be rotated 90 degrees -# to have a proper orientation of the homescreen. For example, the 'eGalax' -# display used in some instances. -[output] -name=HDMI-A-1 -transform=90 diff --git a/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg b/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg deleted file mode 100644 index f69a2e096..000000000 --- a/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg +++ /dev/null @@ -1,5 +0,0 @@ -[remote-output] -name=remote-1 -mode=640x720@30 -host=192.168.20.99 -port=5005 diff --git a/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/shell.cfg b/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/shell.cfg deleted file mode 100644 index 975e539e6..000000000 --- a/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/shell.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[shell] -locking=true -panel-position=none diff --git a/meta-agl-bsp/recipes-kernel/linux/kernel-devsrc.bbappend b/meta-agl-bsp/recipes-kernel/linux/kernel-devsrc.bbappend deleted file mode 100644 index 52fe69d24..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/kernel-devsrc.bbappend +++ /dev/null @@ -1,6 +0,0 @@ -# fix for kernel using hardcoded awk while our filesystem only provides gawk -do_install_append() { - # enforce all scripts to use /usr/bin/awk . This fixes the rpm dependency failure on install of kernel-devsrc - cd ${D} || true - ( for i in `grep -srI "\!/bin/awk" | cut -d":" -f1 ` ; do sed -i -e "s#\!/bin/awk#\!/usr/bin/env awk#g" $i ; done ) || true -}
\ No newline at end of file diff --git a/meta-agl-bsp/recipes-kernel/linux/linux-4.14/Smack-Handle-CGROUP2-in-the-same-way-that-CGROUP.patch b/meta-agl-bsp/recipes-kernel/linux/linux-4.14/Smack-Handle-CGROUP2-in-the-same-way-that-CGROUP.patch deleted file mode 100644 index c595dfdf5..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux-4.14/Smack-Handle-CGROUP2-in-the-same-way-that-CGROUP.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 63f5acdf097b7baca8d0f7056a037f8811b48aaa Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jos=C3=A9=20Bollo?= <jose.bollo@iot.bzh> -Date: Tue, 27 Feb 2018 17:06:21 +0100 -Subject: [PATCH] Smack: Handle CGROUP2 in the same way that CGROUP -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The new file system CGROUP2 isn't actually handled -by smack. This changes makes Smack treat equally -CGROUP and CGROUP2 items. - -Signed-off-by: José Bollo <jose.bollo@iot.bzh> ---- - security/smack/smack_lsm.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c -index 03fdecba93bb..5d77ed04422c 100644 ---- a/security/smack/smack_lsm.c -+++ b/security/smack/smack_lsm.c -@@ -3431,6 +3431,7 @@ static void smack_d_instantiate(struct dentry *opt_dentry, struct inode *inode) - if (opt_dentry->d_parent == opt_dentry) { - switch (sbp->s_magic) { - case CGROUP_SUPER_MAGIC: -+ case CGROUP2_SUPER_MAGIC: - /* - * The cgroup filesystem is never mounted, - * so there's no opportunity to set the mount -@@ -3474,6 +3475,7 @@ static void smack_d_instantiate(struct dentry *opt_dentry, struct inode *inode) - switch (sbp->s_magic) { - case SMACK_MAGIC: - case CGROUP_SUPER_MAGIC: -+ case CGROUP2_SUPER_MAGIC: - /* - * Casey says that it's a little embarrassing - * that the smack file system doesn't do --- -2.14.3 - diff --git a/meta-agl-bsp/recipes-kernel/linux/linux-4.14/Smack-Privilege-check-on-key-operations.patch b/meta-agl-bsp/recipes-kernel/linux/linux-4.14/Smack-Privilege-check-on-key-operations.patch deleted file mode 100644 index 4100bb8fd..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux-4.14/Smack-Privilege-check-on-key-operations.patch +++ /dev/null @@ -1,109 +0,0 @@ -Smack: Privilege check on key operations - -Operations on key objects are subjected to Smack policy -even if the process is privileged. This is inconsistent -with the general behavior of Smack and may cause issues -with authentication by privileged daemons. This patch -allows processes with CAP_MAC_OVERRIDE to access keys -even if the Smack rules indicate otherwise. - -Reported-by: Jose Bollo <jobol@nonadev.net> -Signed-off-by: Casey Schaufler <casey@schaufler-ca.com> ---- - security/smack/smack.h | 1 + - security/smack/smack_access.c | 40 +++++++++++++++++++++++++++++----------- - security/smack/smack_lsm.c | 4 ++++ - 3 files changed, 34 insertions(+), 11 deletions(-) - -diff --git a/security/smack/smack.h b/security/smack/smack.h -index 6a71fc7..f7db791 100644 ---- a/security/smack/smack.h -+++ b/security/smack/smack.h -@@ -321,6 +321,7 @@ struct smack_known *smk_import_entry(const char *, int); - void smk_insert_entry(struct smack_known *skp); - struct smack_known *smk_find_entry(const char *); - bool smack_privileged(int cap); -+bool smack_privileged_cred(int cap, const struct cred *cred); - void smk_destroy_label_list(struct list_head *list); - - /* -diff --git a/security/smack/smack_access.c b/security/smack/smack_access.c -index 1a30041..141ffac 100644 ---- a/security/smack/smack_access.c -+++ b/security/smack/smack_access.c -@@ -623,26 +623,24 @@ struct smack_known *smack_from_secid(const u32 secid) - LIST_HEAD(smack_onlycap_list); - DEFINE_MUTEX(smack_onlycap_lock); - --/* -+/** -+ * smack_privileged_cred - are all privilege requirements met by cred -+ * @cap: The requested capability -+ * @cred: the credential to use -+ * - * Is the task privileged and allowed to be privileged - * by the onlycap rule. - * - * Returns true if the task is allowed to be privileged, false if it's not. - */ --bool smack_privileged(int cap) -+bool smack_privileged_cred(int cap, const struct cred *cred) - { -- struct smack_known *skp = smk_of_current(); -+ struct task_smack *tsp = cred->security; -+ struct smack_known *skp = tsp->smk_task; - struct smack_known_list_elem *sklep; - int rc; - -- /* -- * All kernel tasks are privileged -- */ -- if (unlikely(current->flags & PF_KTHREAD)) -- return true; -- -- rc = cap_capable(current_cred(), &init_user_ns, cap, -- SECURITY_CAP_AUDIT); -+ rc = cap_capable(cred, &init_user_ns, cap, SECURITY_CAP_AUDIT); - if (rc) - return false; - -@@ -662,3 +660,23 @@ bool smack_privileged(int cap) - - return false; - } -+ -+/** -+ * smack_privileged - are all privilege requirements met -+ * @cap: The requested capability -+ * -+ * Is the task privileged and allowed to be privileged -+ * by the onlycap rule. -+ * -+ * Returns true if the task is allowed to be privileged, false if it's not. -+ */ -+bool smack_privileged(int cap) -+{ -+ /* -+ * All kernel tasks are privileged -+ */ -+ if (unlikely(current->flags & PF_KTHREAD)) -+ return true; -+ -+ return smack_privileged_cred(cap, current_cred()); -+} -diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c -index 30f2c3d..03fdecb 100644 ---- a/security/smack/smack_lsm.c -+++ b/security/smack/smack_lsm.c -@@ -4369,6 +4369,10 @@ static int smack_key_permission(key_ref_t key_ref, - */ - if (tkp == NULL) - return -EACCES; -+ -+ if (smack_privileged_cred(CAP_MAC_OVERRIDE, cred)) -+ return 0; -+ - #ifdef CONFIG_AUDIT - smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_KEY); - ad.a.u.key_struct.key = keyp->serial; - diff --git a/meta-agl-bsp/recipes-kernel/linux/linux-4.14/net-sch_generic-add-if_afp.h-header-to-get-ARPHRD_CA.patch b/meta-agl-bsp/recipes-kernel/linux/linux-4.14/net-sch_generic-add-if_afp.h-header-to-get-ARPHRD_CA.patch deleted file mode 100644 index 7c34fb306..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux-4.14/net-sch_generic-add-if_afp.h-header-to-get-ARPHRD_CA.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 17d0075d95b5087d5df553444cca390fa479bad9 Mon Sep 17 00:00:00 2001 -From: Matt Ranostay <matt.ranostay@konsulko.com> -Date: Tue, 10 Mar 2020 22:27:28 -0700 -Subject: [PATCH] net: sch_generic: add if_afp.h header to get ARPHRD_CAN macro - -Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com> ---- - net/sched/sch_generic.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c -index bf8c81e07c70..1845ef8c7dbd 100644 ---- a/net/sched/sch_generic.c -+++ b/net/sched/sch_generic.c -@@ -25,6 +25,7 @@ - #include <linux/rcupdate.h> - #include <linux/list.h> - #include <linux/slab.h> -+#include <linux/if_arp.h> - #include <linux/if_vlan.h> - #include <net/sch_generic.h> - #include <net/pkt_sched.h> --- -2.25.0 - diff --git a/meta-agl-bsp/recipes-kernel/linux/linux-agl-4.14.inc b/meta-agl-bsp/recipes-kernel/linux/linux-agl-4.14.inc deleted file mode 100644 index 6d5c67021..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux-agl-4.14.inc +++ /dev/null @@ -1,14 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/linux-4.14:" - -#------------------------------------------------------------------------- -# smack patches for kernels keys - -SRC_URI_append_with-lsm-smack = "\ - file://Smack-Privilege-check-on-key-operations.patch \ - file://Smack-Handle-CGROUP2-in-the-same-way-that-CGROUP.patch \ - " - -SRC_URI_append = "\ - file://net-sch_generic-add-if_afp.h-header-to-get-ARPHRD_CA.patch \ - file://net-sch_generic-Use-pfifo_fast-as-fallback-scheduler.patch \ - " diff --git a/meta-agl-bsp/recipes-kernel/linux/linux-agl-4.19.inc b/meta-agl-bsp/recipes-kernel/linux/linux-agl-4.19.inc deleted file mode 100644 index da4e0c067..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux-agl-4.19.inc +++ /dev/null @@ -1,5 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/linux-4.19:" - -SRC_URI_append = "\ - file://net-sch_generic-Use-pfifo_fast-as-fallback-scheduler.patch \ - " diff --git a/meta-agl-bsp/recipes-kernel/linux/linux-agl.inc b/meta-agl-bsp/recipes-kernel/linux/linux-agl.inc deleted file mode 100644 index cd960ef6d..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux-agl.inc +++ /dev/null @@ -1,132 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/linux:" - -DEPENDS += "kern-tools-native" - -# returns all the elements from the src uri that are .cfg files -def find_cfgs(d): - sources=src_patches(d, True) - sources_list=[] - for s in sources: - if s.endswith('.cfg'): - sources_list.append(s) - - return sources_list - -do_configure_append () { - [ ! -f .config ] && cp -a ${WORKDIR}/defconfig .config - # Need to clear CONFIG_LSM for 5.1+ kernels to ensure it'll get - # regenerated to reflect configuration changes (e.g. SMACK). - sed -i '/^CONFIG_LSM/d' .config - merge_config.sh -m .config ${@" ".join(find_cfgs(d))} - yes '' | make oldconfig -} - -# Extra configuration options for the AGL kernel -SRC_URI_append = "\ - file://can-bus.cfg \ - file://usb.cfg \ - file://uvc.cfg \ - file://joystick.cfg \ - file://fanotify.cfg \ - file://uinput.cfg \ - file://hid.cfg \ - file://drm.cfg \ - file://btusb.cfg \ - file://usbaudio.cfg \ - file://usbmodem.cfg \ - file://i2c-led.cfg \ - file://nfc.cfg \ - file://overlayfs.cfg \ - " - -SRC_URI_append = " ${@bb.utils.contains('AGL_XEN_GUEST_WANTED','1','file://xen_domu.cfg','',d)}" - -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/can-bus.cfg" -# 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" -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/fanotify.cfg" -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/uinput.cfg" -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/hid.cfg" -# Enable DRM support for graphics -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/drm.cfg" -# Enable Bluetooth USB devices -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/btusb.cfg" -# Enable USB audio devices -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/usbaudio.cfg" -# Enable I2C and LED for demontrator -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/i2c-led.cfg" -# Enable NFC devices -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/nfc.cfg" -# Enable overlayfs filesystem support -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/overlayfs.cfg" -# Enable XEN support of the guest -KERNEL_CONFIG_FRAGMENTS_append = " ${@bb.utils.contains('AGL_XEN_GUEST_WANTED','1','${WORKDIR}/xen_domu.cfg','',d)}" - -# Enable required features for the agl-netboot feature -SRC_URI_append_netboot = " file://nbd.cfg \ - file://ramdisk.cfg" -KERNEL_CONFIG_FRAGMENTS_append_netboot = " ${WORKDIR}/nbd.cfg ${WORKDIR}/ramdisk.cfg" - -# Enable support for TP-Link TL-W722N USB Wifi adapter (rev 1 and 2) -SRC_URI_append = " file://wifi.cfg" -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/wifi.cfg" - -# Enable support for RTLSDR -SRC_URI_append = " file://rtl_sdr.cfg" -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/rtl_sdr.cfg" - -# Additional drivers for virtual machines -# OVERRIDES save us some c'n'p below ... -OVERRIDES_prepend_qemux86 = "virtualmachine:" -OVERRIDES_prepend_qemux86-64 = "virtualmachine:" -SRC_URI_append_virtualmachine = " file://vbox-vmware-sata.cfg" -KERNEL_CONFIG_FRAGMENTS_append_virtualmachine = " ${WORKDIR}/vbox-vmware-sata.cfg" - -# Extra configuration for using qemux86-64 image on physical hardware -SRC_URI_append_qemux86-64 = "\ - file://x86-extra-graphic-devices.cfg \ - file://x86-net-devices.cfg \ - file://x86-security-tpm.cfg \ - file://x86-usb-devices.cfg \ - file://x86-upsquare.cfg \ -" -KERNEL_CONFIG_FRAGMENTS_append_qemux86-64 = "\ - ${WORKDIR}/x86-extra-graphic-devices.cfg \ - ${WORKDIR}/x86-net-devices.cfg \ - ${WORKDIR}/x86-security-tpm.cfg \ - ${WORKDIR}/x86-usb-devices.cfg \ - ${WORKDIR}/x86-upsquare.cfg \ -" - -# Enable support for smack -KERNEL_CONFIG_FRAGMENTS_append_with-lsm-smack = "\ - ${WORKDIR}/audit.cfg \ - ${WORKDIR}/smack.cfg \ - ${WORKDIR}/smack-default-lsm.cfg \ -" - -# ALSA support and other sound related configuration -SRC_URI_append = " file://sound.cfg" -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/sound.cfg" - -# add hda audio for qemu -SRC_URI_append_qemuall = " file://sound-hda.cfg" -KERNEL_CONFIG_FRAGMENTS_append_qemuall = " ${WORKDIR}/sound-hda.cfg" - -# iio-dummy-device support for test iiodevice -SRC_URI_append = " file://iiodevice.cfg" -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/iiodevice.cfg" - -# external rtc support via e.g. http://wiki.seeedstudio.com/Grove-RTC/ -SRC_URI_append = " file://rtc.cfg" -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/rtc.cfg" - -# netfilter options -SRC_URI_append = " file://netfilter.cfg" -KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/netfilter.cfg" - -# Enable support for SystemTap -SRC_URI_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'agl-devel', 'file://systemtap.cfg', '', d)}" -KERNEL_CONFIG_FRAGMENTS_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'agl-devel', '${WORKDIR}/systemtap.cfg', '', d)}" diff --git a/meta-agl-bsp/recipes-kernel/linux/linux-yocto_%.bbappend b/meta-agl-bsp/recipes-kernel/linux/linux-yocto_%.bbappend deleted file mode 100644 index 386112024..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux-yocto_%.bbappend +++ /dev/null @@ -1 +0,0 @@ -require linux-agl.inc diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/btusb.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/btusb.cfg deleted file mode 100644 index dd7c460bb..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/btusb.cfg +++ /dev/null @@ -1,37 +0,0 @@ -CONFIG_BT=m -CONFIG_BT_BREDR=y -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m -CONFIG_BT_HS=y -CONFIG_BT_LE=y -CONFIG_BT_LEDS=y -# CONFIG_BT_SELFTEST is not set -CONFIG_BT_DEBUGFS=y - -# -# Bluetooth device drivers -# -CONFIG_BT_INTEL=m -CONFIG_BT_BCM=m -CONFIG_BT_RTL=m -CONFIG_BT_HCIBTUSB=m -CONFIG_BT_HCIBTUSB_BCM=y -CONFIG_BT_HCIBTUSB_RTL=y -# CONFIG_BT_HCIBTSDIO is not set -# CONFIG_BT_HCIUART is not set -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBFUSB=m -# CONFIG_BT_HCIVHCI is not set -# CONFIG_BT_MRVL is not set -# CONFIG_BT_ATH3K is not set -CONFIG_CRYPTO_ECB=m -CONFIG_CRYPTO_CMAC=m - -# -# Bluetooth AVRCP support -# -CONFIG_INPUT_UINPUT=y diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/can-bus.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/can-bus.cfg deleted file mode 100644 index 2f24b7607..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/can-bus.cfg +++ /dev/null @@ -1,42 +0,0 @@ -CONFIG_TASKSTATS=y -CONFIG_TASK_DELAY_ACCT=y -# CONFIG_TASK_XACCT is not set -CONFIG_USER_RETURN_NOTIFIER=y -CONFIG_PREEMPT_NOTIFIERS=y -CONFIG_CAN=m -CONFIG_CAN_RAW=m -CONFIG_CAN_BCM=m -CONFIG_CAN_GW=m -CONFIG_CAN_J1939=m - -# -# CAN Device Drivers -# -CONFIG_CAN_C_CAN=m -CONFIG_CAN_C_CAN_PLATFORM=m -CONFIG_CAN_VCAN=m -CONFIG_CAN_SLCAN=m -CONFIG_CAN_DEV=m -CONFIG_CAN_CALC_BITTIMING=y -# CONFIG_CAN_LEDS is not set -# CONFIG_CAN_SJA1000 is not set -# CONFIG_CAN_M_CAN is not set -# CONFIG_CAN_CC770 is not set - -# -# CAN SPI interfaces -# -CONFIG_CAN_MCP251X=m - -# -# CAN USB interfaces -# -# CONFIG_CAN_EMS_USB is not set -CONFIG_CAN_ESD_USB2=m -CONFIG_CAN_GS_USB=m -CONFIG_CAN_KVASER_USB=m -CONFIG_CAN_PEAK_USB=m -CONFIG_CAN_8DEV_USB=m -CONFIG_CAN_MCBA_USB=m -# CONFIG_CAN_SOFTING is not set -# CONFIG_CAN_DEBUG_DEVICES is not set diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/drm.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/drm.cfg deleted file mode 100644 index 65fe71cd0..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/drm.cfg +++ /dev/null @@ -1,2 +0,0 @@ -CONFIG_DRM_BOCHS=y -CONFIG_DRM_VIRTIO_GPU=y diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/fanotify.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/fanotify.cfg deleted file mode 100644 index de5dd8d31..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/fanotify.cfg +++ /dev/null @@ -1,3 +0,0 @@ -# Enable the fanotify API (notification/interception of FS events) -CONFIG_FANOTIFY=y -CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/hid.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/hid.cfg deleted file mode 100644 index 327c753ae..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/hid.cfg +++ /dev/null @@ -1 +0,0 @@ -CONFIG_HID_MULTITOUCH=y diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/i2c-led.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/i2c-led.cfg deleted file mode 100644 index 248b5118a..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/i2c-led.cfg +++ /dev/null @@ -1,3 +0,0 @@ -# enabling I2C and LED for demonstrator -CONFIG_I2C_TINY_USB=y -CONFIG_LEDS_BLINKM=y diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/iiodevice.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/iiodevice.cfg deleted file mode 100644 index c5b8ff35e..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/iiodevice.cfg +++ /dev/null @@ -1,26 +0,0 @@ -# -# Extcon Device Drivers -# -CONFIG_IIO=y -CONFIG_IIO_BUFFER=y -CONFIG_IIO_BUFFER_CB=y -CONFIG_IIO_KFIFO_BUF=y -CONFIG_IIO_CONFIGFS=m -CONFIG_IIO_TRIGGER=y -CONFIG_IIO_CONSUMERS_PER_TRIGGER=2 -CONFIG_IIO_SW_DEVICE=m -CONFIG_IIO_SW_TRIGGER=m - -# -# IIO dummy driver -# -CONFIG_IIO_DUMMY_EVGEN=m -CONFIG_IIO_SIMPLE_DUMMY=m -CONFIG_IIO_SIMPLE_DUMMY_EVENTS=y -CONFIG_IIO_SIMPLE_DUMMY_BUFFER=y - -# -# Triggers - standalone -# -CONFIG_IIO_HRTIMER_TRIGGER=m -CONFIG_IIO_TRIGGERED_BUFFER=m diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/joystick.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/joystick.cfg deleted file mode 100644 index 2201bcb00..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/joystick.cfg +++ /dev/null @@ -1,9 +0,0 @@ -CONFIG_INPUT_JOYDEV=y -CONFIG_INPUT_JOYSTICK=y -CONFIG_JOYSTICK_ADI=y -CONFIG_GAMEPORT=y -CONFIG_HID_LOGITECH=y -CONFIG_LOGIWHEELS_FF=y -CONFIG_HID_LOGITECH_HIDPP=y -CONFIG_LOGITECH_FF=y -CONFIG_LOGIG940_FF=y diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/nbd.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/nbd.cfg deleted file mode 100644 index e5d897556..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/nbd.cfg +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_BLK_DEV_NBD=y -# for CI use enable CONFIG_VETH=y -CONFIG_VETH=y diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/net-sch_generic-Use-pfifo_fast-as-fallback-scheduler.patch b/meta-agl-bsp/recipes-kernel/linux/linux/net-sch_generic-Use-pfifo_fast-as-fallback-scheduler.patch deleted file mode 100644 index 37ace5a58..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/net-sch_generic-Use-pfifo_fast-as-fallback-scheduler.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 546b85bb0aadb5a928b49b53dc02911996169c0b Mon Sep 17 00:00:00 2001 -From: Vincent Prince <vincent.prince.fr@gmail.com> -Date: Wed, 23 Oct 2019 15:44:20 +0200 -Subject: [PATCH] net: sch_generic: Use pfifo_fast as fallback scheduler for - CAN hardware - -There is networking hardware that isn't based on Ethernet for layers 1 and 2. - -For example CAN. - -CAN is a multi-master serial bus standard for connecting Electronic Control -Units [ECUs] also known as nodes. A frame on the CAN bus carries up to 8 bytes -of payload. Frame corruption is detected by a CRC. However frame loss due to -corruption is possible, but a quite unusual phenomenon. - -While fq_codel works great for TCP/IP, it doesn't for CAN. There are a lot of -legacy protocols on top of CAN, which are not build with flow control or high -CAN frame drop rates in mind. - -When using fq_codel, as soon as the queue reaches a certain delay based length, -skbs from the head of the queue are silently dropped. Silently meaning that the -user space using a send() or similar syscall doesn't get an error. However -TCP's flow control algorithm will detect dropped packages and adjust the -bandwidth accordingly. - -When using fq_codel and sending raw frames over CAN, which is the common use -case, the user space thinks the package has been sent without problems, because -send() returned without an error. pfifo_fast will drop skbs, if the queue -length exceeds the maximum. But with this scheduler the skbs at the tail are -dropped, an error (-ENOBUFS) is propagated to user space. So that the user -space can slow down the package generation. - -On distributions, where fq_codel is made default via CONFIG_DEFAULT_NET_SCH -during compile time, or set default during runtime with sysctl -net.core.default_qdisc (see [1]), we get a bad user experience. In my test case -with pfifo_fast, I can transfer thousands of million CAN frames without a frame -drop. On the other hand with fq_codel there is more then one lost CAN frame per -thousand frames. - -As pointed out fq_codel is not suited for CAN hardware, so this patch changes -attach_one_default_qdisc() to use pfifo_fast for "ARPHRD_CAN" network devices. - -During transition of a netdev from down to up state the default queuing -discipline is attached by attach_default_qdiscs() with the help of -attach_one_default_qdisc(). This patch modifies attach_one_default_qdisc() to -attach the pfifo_fast (pfifo_fast_ops) if the network device type is -"ARPHRD_CAN". - -[1] https://github.com/systemd/systemd/issues/9194 - -Suggested-by: Marc Kleine-Budde <mkl@pengutronix.de> -Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> -Signed-off-by: Vincent Prince <vincent.prince.fr@gmail.com> -Acked-by: Dave Taht <dave.taht@gmail.com> -Signed-off-by: David S. Miller <davem@davemloft.net> ---- - net/sched/sch_generic.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c -index ed5b0e9fd395..4c5dfcb01e00 100644 ---- a/net/sched/sch_generic.c -+++ b/net/sched/sch_generic.c -@@ -1038,6 +1038,8 @@ static void attach_one_default_qdisc(struct net_device *dev, - - if (dev->priv_flags & IFF_NO_QUEUE) - ops = &noqueue_qdisc_ops; -+ else if(dev->type == ARPHRD_CAN) -+ ops = &pfifo_fast_ops; - - qdisc = qdisc_create_dflt(dev_queue, ops, TC_H_ROOT, NULL); - if (!qdisc) { --- -2.25.0 - diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/netfilter.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/netfilter.cfg deleted file mode 100644 index 34be704c1..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/netfilter.cfg +++ /dev/null @@ -1 +0,0 @@ -CONFIG_NETFILTER_XT_MATCH_OWNER=m diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/nfc.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/nfc.cfg deleted file mode 100644 index 6d863a075..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/nfc.cfg +++ /dev/null @@ -1,34 +0,0 @@ -CONFIG_NFC=m -CONFIG_NFC_DIGITAL=m -CONFIG_NFC_NCI=m -CONFIG_NFC_NCI_SPI=m -CONFIG_NFC_HCI=m -CONFIG_NFC_SHDLC=y -CONFIG_NFC_TRF7970A=m -CONFIG_NFC_MEI_PHY=m -CONFIG_NFC_PORT100=m -CONFIG_NFC_FDP=m -CONFIG_NFC_FDP_I2C=m -CONFIG_NFC_PN544=m -CONFIG_NFC_PN544_I2C=m -CONFIG_NFC_PN544_MEI=m -CONFIG_NFC_PN533=m -CONFIG_NFC_PN533_USB=m -CONFIG_NFC_PN533_I2C=m -CONFIG_NFC_MICROREAD=m -CONFIG_NFC_MICROREAD_I2C=m -CONFIG_NFC_MICROREAD_MEI=m -CONFIG_NFC_MRVL=m -CONFIG_NFC_MRVL_USB=m -CONFIG_NFC_MRVL_I2C=m -CONFIG_NFC_MRVL_SPI=m -CONFIG_NFC_ST21NFCA=m -CONFIG_NFC_ST21NFCA_I2C=m -CONFIG_NFC_ST_NCI=m -CONFIG_NFC_ST_NCI_I2C=m -CONFIG_NFC_ST_NCI_SPI=m -CONFIG_NFC_NXP_NCI=m -CONFIG_NFC_NXP_NCI_I2C=m -CONFIG_NFC_S3FWRN5=m -CONFIG_NFC_S3FWRN5_I2C=m -CONFIG_NFC_ST95HF=m diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/overlayfs.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/overlayfs.cfg deleted file mode 100644 index 025118ed6..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/overlayfs.cfg +++ /dev/null @@ -1,7 +0,0 @@ -CONFIG_OVERLAY_FS=y -CONFIG_OVERLAY_FS_REDIRECT_DIR=y -CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=n -CONFIG_OVERLAY_FS_INDEX=y -CONFIG_OVERLAY_FS_NFS_EXPORT=n -CONFIG_OVERLAY_FS_XINO_AUTO=y -CONFIG_OVERLAY_FS_METACOPY=y diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/procevent.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/procevent.cfg deleted file mode 100644 index 6e08c25bc..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/procevent.cfg +++ /dev/null @@ -1,2 +0,0 @@ -CONFIG_CONNECTOR=y -CONFIG_PROC_EVENTS=y diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/ramdisk.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/ramdisk.cfg deleted file mode 100644 index 3d44de805..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/ramdisk.cfg +++ /dev/null @@ -1,2 +0,0 @@ -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=65536 diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/rtc.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/rtc.cfg deleted file mode 100644 index 2641958a0..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/rtc.cfg +++ /dev/null @@ -1,7 +0,0 @@ -CONFIG_RTC_CLASS=y -CONFIG_RTC_LIB=y -CONFIG_RTC_INTF_SYSFS=y -CONFIG_RTC_INTF_PROC=y -CONFIG_RTC_INTF_DEV=y -CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS3232=m diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/rtl_sdr.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/rtl_sdr.cfg deleted file mode 100644 index d4574700a..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/rtl_sdr.cfg +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG_MEDIA_USB_SUPPORT=y -CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y -CONFIG_DVB_USB_V2=m -CONFIG_DVB_USB_RTL28XXU=m diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/scheddebug.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/scheddebug.cfg deleted file mode 100644 index e8b09aa7c..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/scheddebug.cfg +++ /dev/null @@ -1 +0,0 @@ -CONFIG_SCHED_DEBUG=y diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/sound-hda.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/sound-hda.cfg deleted file mode 100644 index 115504c39..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/sound-hda.cfg +++ /dev/null @@ -1,20 +0,0 @@ -# make sure HDA sound modules are on -# this is required for CI tests -CONFIG_SND_HDA_INTEL=m -CONFIG_SND_HDA_GENERIC=m -CONFIG_SND_HDA_CODEC_REALTEK=m -CONFIG_SND_HDA_CODEC_ANALOG=m -CONFIG_SND_HDA_CODEC_SIGMATEL=m -CONFIG_SND_HDA_CODEC_VIA=m -CONFIG_SND_HDA_CODEC_HDMI=m -CONFIG_SND_HDA_CODEC_CIRRUS=m -CONFIG_SND_HDA_CODEC_CONEXANT=m -CONFIG_SND_HDA_CODEC_CA0110=m -CONFIG_SND_HDA_CODEC_CA0132=m -CONFIG_SND_HDA_CODEC_CMEDIA=m -CONFIG_SND_HDA_CODEC_SI3054=m -CONFIG_SND_HDA_RECONFIG=y -CONFIG_SND_HDA_PATCH_LOADER=y - -# enable dummy sound for special cases in CI -CONFIG_SND_DUMMY=m diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/sound.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/sound.cfg deleted file mode 100644 index ad34ea680..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/sound.cfg +++ /dev/null @@ -1,7 +0,0 @@ -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_TIMER=y -CONFIG_SND_PCM=y -CONFIG_SND_DYNAMIC_MINORS=y -CONFIG_SND_MAX_CARDS=32 -CONFIG_SND_ALOOP=m diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/systemtap.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/systemtap.cfg deleted file mode 100644 index 4886c27f1..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/systemtap.cfg +++ /dev/null @@ -1,9 +0,0 @@ -CONFIG_KPROBES=y -CONFIG_UPROBES=y -CONFIG_UPROBE_EVENTS=y -CONFIG_FTRACE=y -CONFIG_KPROBE_EVENTS=y -CONFIG_RELAY=y -CONFIG_DEBUG_FS=y -CONFIG_DEBUG_INFO=y - diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/uinput.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/uinput.cfg deleted file mode 100644 index 7996ef1dd..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/uinput.cfg +++ /dev/null @@ -1,3 +0,0 @@ -# Enable the User-level Input driver (required by "wayland-fits") -CONFIG_INPUT_MISC=y -CONFIG_INPUT_UINPUT=m diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/usb.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/usb.cfg deleted file mode 100644 index 8e9e98ecb..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/usb.cfg +++ /dev/null @@ -1,8 +0,0 @@ -CONFIG_USB_SERIAL=y -CONFIG_USB_SERIAL_GENERIC=y -CONFIG_USB_ACM=m -CONFIG_CRC_CCITT=y -CONFIG_USB_SERIAL_FTDI_SIO=m -CONFIG_USB_OHCI_HCD=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_EHCI_PCI=y diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/usbaudio.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/usbaudio.cfg deleted file mode 100644 index 5961f43d3..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/usbaudio.cfg +++ /dev/null @@ -1,2 +0,0 @@ -CONFIG_SND_USB=y -CONFIG_SND_USB_AUDIO=y diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/usbmodem.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/usbmodem.cfg deleted file mode 100644 index 3ded931e5..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/usbmodem.cfg +++ /dev/null @@ -1,7 +0,0 @@ -CONFIG_USB_USBNET=m -CONFIG_USB_NET_CDC_MBIM=m -CONFIG_USB_NET_QMI_WWAN=m -CONFIG_USB_SIERRA_NET=m -CONFIG_USB_SERIAL_OPTION=m -CONFIG_USB_SERIAL_SIERRAWIRELESS=m -CONFIG_USB_SERIAL_QUALCOMM=m diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/uvc.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/uvc.cfg deleted file mode 100644 index 7c6556c11..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/uvc.cfg +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG_VIDEOBUF2_VMALLOC=y -CONFIG_MEDIA_USB_SUPPORT=y -CONFIG_USB_VIDEO_CLASS=m -CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/vbox-vmware-sata.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/vbox-vmware-sata.cfg deleted file mode 100644 index ce1eca1a7..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/vbox-vmware-sata.cfg +++ /dev/null @@ -1,19 +0,0 @@ -# enable harddrive driver for vmware/virtualbox -CONFIG_ATA_PIIX=y -CONFIG_SATA_AHCI=y -CONFIG_ATA_SFF=y -CONFIG_ATA_BMDMA=y -CONFIG_ATA_GENERIC=y -CONFIG_ATA_ACPI=y - -# needed for VMWare -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_FUSION=y -CONFIG_FUSION_SPI=y -CONFIG_DRM_VMWGFX=y -CONFIG_DRM_VMWGFX_FBCON=y -CONFIG_VMWARE_BALLOON=m -CONFIG_VMWARE_VMCI=m -CONFIG_VMWARE_VMCI_VSOCKETS=m -CONFIG_SND_ENS1371=m diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/wifi.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/wifi.cfg deleted file mode 100644 index 00c2e06e4..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/wifi.cfg +++ /dev/null @@ -1,6 +0,0 @@ -CONFIG_CFG80211=m -CONFIG_MAC80211=m -CONFIG_WLAN_VENDOR_ATH=m -CONFIG_ATH9K_HTC=m -CONFIG_STAGING=y -CONFIG_R8188EU=m diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/x86-extra-graphic-devices.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/x86-extra-graphic-devices.cfg deleted file mode 100644 index d2b64de67..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/x86-extra-graphic-devices.cfg +++ /dev/null @@ -1,40 +0,0 @@ -CONFIG_MWIFIEX_PCIE=m -CONFIG_MWIFIEX_USB=m -CONFIG_RSI_91X=m -CONFIG_RSI_DEBUGFS=y -CONFIG_RSI_SDIO=m -CONFIG_RSI_USB=m -CONFIG_DRM_RADEON=m -CONFIG_DRM_RADEON_USERPTR=y -CONFIG_DRM_NOUVEAU=m -CONFIG_NOUVEAU_DEBUG=5 -CONFIG_NOUVEAU_DEBUG_DEFAULT=3 -CONFIG_DRM_NOUVEAU_BACKLIGHT=y -CONFIG_DRM_VGEM=m -CONFIG_DRM_VMWGFX=m -CONFIG_DRM_VMWGFX_FBCON=y -CONFIG_DRM_GMA500=m -CONFIG_DRM_GMA600=y -CONFIG_DRM_GMA3600=y -CONFIG_DRM_UDL=m -CONFIG_FB_DEFERRED_IO=y -CONFIG_FB_BACKLIGHT=y -CONFIG_IRQ_BYPASS_MANAGER=m -CONFIG_ACPI_WMI=m -CONFIG_MXM_WMI=m -CONFIG_SCHED_INFO=y -CONFIG_HAVE_KVM_IRQCHIP=y -CONFIG_HAVE_KVM_IRQFD=y -CONFIG_HAVE_KVM_IRQ_ROUTING=y -CONFIG_HAVE_KVM_EVENTFD=y -CONFIG_KVM_MMIO=y -CONFIG_KVM_ASYNC_PF=y -CONFIG_HAVE_KVM_MSI=y -CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT=y -CONFIG_KVM_VFIO=y -CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y -CONFIG_KVM_COMPAT=y -CONFIG_HAVE_KVM_IRQ_BYPASS=y -CONFIG_KVM=m -CONFIG_KVM_INTEL=m -CONFIG_CRC7=m diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/x86-net-devices.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/x86-net-devices.cfg deleted file mode 100644 index 6c5b698a9..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/x86-net-devices.cfg +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_IGB=y -CONFIG_IGB_DCA=y -CONFIG_R8169=y diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/x86-security-tpm.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/x86-security-tpm.cfg deleted file mode 100644 index b66b1b9b1..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/x86-security-tpm.cfg +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_TCG_TPM=y -CONFIG_TCG_TIS=y -CONFIG_TCG_CRB=y diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/x86-upsquare.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/x86-upsquare.cfg deleted file mode 100644 index d2bed63fa..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/x86-upsquare.cfg +++ /dev/null @@ -1,11 +0,0 @@ -CONFIG_X86_INTEL_LPSS=y -CONFIG_EXPERT=y -CONFIG_SERIAL_8250_DMA=y -CONFIG_SERIAL_8250_DW=y -CONFIG_MFD_CORE=y -CONFIG_MFD_INTEL_LPSS=y -CONFIG_MFD_INTEL_LPSS_ACPI=y -CONFIG_MFD_INTEL_LPSS_PCI=y -CONFIG_IWLWIFI=m -CONFIG_IWLMVM=m -CONFIG_IWLDVM=m diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/x86-usb-devices.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/x86-usb-devices.cfg deleted file mode 100644 index 19c57796e..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/x86-usb-devices.cfg +++ /dev/null @@ -1,82 +0,0 @@ -CONFIG_BT_QCA=m -CONFIG_BT_HCIBTSDIO=m -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_BCSP=y -CONFIG_BT_HCIUART_ATH3K=y -CONFIG_BT_HCIUART_LL=y -CONFIG_BT_HCIUART_3WIRE=y -CONFIG_BT_HCIUART_BCM=y -CONFIG_BT_HCIUART_QCA=y -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIVHCI=m -CONFIG_BT_MRVL=m -CONFIG_BT_MRVL_SDIO=m -CONFIG_BT_ATH3K=m -CONFIG_WIRELESS_EXT=y -CONFIG_WEXT_SPY=y -CONFIG_WEXT_PRIV=y -CONFIG_CFG80211_WEXT_EXPORT=y -CONFIG_LIB80211=m -CONFIG_LIB80211_CRYPT_WEP=m -CONFIG_LIB80211_CRYPT_CCMP=m -CONFIG_LIB80211_CRYPT_TKIP=m -# CONFIG_LIB80211_DEBUG is not set -CONFIG_VHOST_NET=m -CONFIG_VHOST_RING=m -CONFIG_VHOST=m -CONFIG_MICROCHIP_PHY=m -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8152=m -CONFIG_USB_LAN78XX=m -CONFIG_USB_NET_SR9800=m -CONFIG_USB_NET_RNDIS_HOST=m -CONFIG_USB_HSO=m -CONFIG_USB_IPHETH=m -CONFIG_USB_ZD1201=m -CONFIG_USB_NET_RNDIS_WLAN=m -CONFIG_RTL8180=m -CONFIG_RTL8187=m -CONFIG_RTL8187_LEDS=y -CONFIG_MWL8K=m -# CONFIG_B43_BUSES_BCMA_AND_SSB is not set -# CONFIG_B43_BUSES_BCMA is not set -# CONFIG_B43_BUSES_SSB is not set -CONFIG_BRCMFMAC_PROTO_MSGBUF=y -CONFIG_BRCMFMAC_PCIE=y -CONFIG_IPW2100=m -CONFIG_IPW2100_MONITOR=y -CONFIG_IPW2100_DEBUG=y -CONFIG_IPW2200=m -CONFIG_IPW2200_MONITOR=y -CONFIG_IPW2200_RADIOTAP=y -CONFIG_IPW2200_PROMISCUOUS=y -CONFIG_IPW2200_QOS=y -CONFIG_IPW2200_DEBUG=y -CONFIG_LIBIPW=m -CONFIG_LIBIPW_DEBUG=y -CONFIG_LIBERTAS=m -CONFIG_LIBERTAS_USB=m -CONFIG_LIBERTAS_SDIO=m -CONFIG_LIBERTAS_SPI=m -# CONFIG_LIBERTAS_DEBUG is not set -# CONFIG_LIBERTAS_MESH is not set -CONFIG_RTL8XXXU=m -CONFIG_RTL8XXXU_UNTESTED=y -CONFIG_WLAN_VENDOR_TI=y -CONFIG_WL1251=m -# CONFIG_WL1251_SPI is not set -# CONFIG_WL1251_SDIO is not set -CONFIG_WL12XX=m -CONFIG_WL18XX=m -CONFIG_WLCORE=m -CONFIG_WLCORE_SPI=m -CONFIG_WLCORE_SDIO=m -CONFIG_WILINK_PLATFORM_DATA=y -CONFIG_ZD1211RW=m -CONFIG_ZD1211RW_DEBUG=y -CONFIG_MWIFIEX=m -# CONFIG_MWIFIEX_SDIO is not set diff --git a/meta-agl-bsp/recipes-kernel/linux/linux/xen_domu.cfg b/meta-agl-bsp/recipes-kernel/linux/linux/xen_domu.cfg deleted file mode 100644 index 8bc59eb1e..000000000 --- a/meta-agl-bsp/recipes-kernel/linux/linux/xen_domu.cfg +++ /dev/null @@ -1,25 +0,0 @@ -CONFIG_XEN=y -CONFIG_XEN_BLKDEV_FRONTEND=y -CONFIG_XEN_SCSI_FRONTEND=y -CONFIG_XEN_NETDEV_FRONTEND=y -CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y -CONFIG_HVC_XEN=y -CONFIG_HVC_XEN_FRONTEND=y -CONFIG_XEN_FBDEV_FRONTEND=y -CONFIG_MMC_SDHCI_XENON=y -CONFIG_XEN_BALLOON=y -CONFIG_XEN_SCRUB_PAGES_DEFAULT=y -CONFIG_XEN_DEV_EVTCHN=y -CONFIG_XEN_BACKEND=y -CONFIG_XENFS=y -CONFIG_XEN_COMPAT_XENFS=y -CONFIG_XEN_SYS_HYPERVISOR=y -CONFIG_XEN_XENBUS_FRONTEND=y -CONFIG_XEN_GNTDEV=y -CONFIG_XEN_GNTDEV_DMABUF=y -CONFIG_XEN_GRANT_DEV_ALLOC=y -CONFIG_XEN_GRANT_DMA_ALLOC=y -CONFIG_SWIOTLB_XEN=y -CONFIG_XEN_PVCALLS_FRONTEND=y -CONFIG_XEN_PRIVCMD=y -CONFIG_XEN_AUTO_XLATE=y
\ No newline at end of file diff --git a/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0007-WIP-Initial-LAVA-support.patch b/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0007-WIP-Initial-LAVA-support.patch deleted file mode 100644 index 6232c4fa4..000000000 --- a/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner/0007-WIP-Initial-LAVA-support.patch +++ /dev/null @@ -1,140 +0,0 @@ -From 11b29ce444610a07067a89b38e9e85c2162bbf67 Mon Sep 17 00:00:00 2001 -From: Tim Orling <timothy.t.orling@linux.intel.com> -Date: Mon, 15 Oct 2018 18:30:42 -0700 -Subject: [PATCH 7/7] [WIP] Initial LAVA support - -Linaro Automated Validation Architecture (LAVA) launches a test suite -on the target but thereafter only observes stdout. - -LAVA knows that a test case has started or ended based on signals -emitted to stdout: -(setup) -<LAVA_SIGNAL_STARTTC test_case_name> -(teardown) -<LAVA_SIGNAL_ENDTC test_case_name> -<LAVA_SIGNAL_TESTCASE TEST_CASE_ID=test_case_name RESULT=pass|fail \ - [[ MEASUREMENT=numeric_measurement ][ UNITS=units_string]]> - -It is valid to have a measurement without units, but not units without a measurement. - -Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> -[updated for ptest-runner 2.3.2] -Signed-off-by: Scott Murray <scott.murray@konsulko.com> ---- -diff --git a/flags.h b/flags.h -new file mode 100644 -index 0000000..0dac223 ---- /dev/null -+++ b/flags.h -@@ -0,0 +1,10 @@ -+/* SPDX-License-Identifier: GPL-2.0 */ -+ -+/* Flag bit definitions */ -+ -+#ifndef __FLAGS_H__ -+#define __FLAGS_H__ -+ -+#define LAVA_SIGNAL_ENABLE (0x0001) -+ -+#endif /* __FLAGS_H__ */ -diff --git a/main.c b/main.c -index 01d60f7..165370f 100644 ---- a/main.c -+++ b/main.c -@@ -38,6 +38,7 @@ - #endif - - #include "utils.h" -+#include "flags.h" - - #ifndef DEFAULT_DIRECTORY - #define DEFAULT_DIRECTORY "/usr/lib" -@@ -74,8 +75,9 @@ main(int argc, char *argv[]) - opts.timeout = DEFAULT_TIMEOUT; - opts.ptests = NULL; - opts.xml_filename = NULL; -+ opts.flags = 0; - -- while ((opt = getopt(argc, argv, "d:e:lt:x:h")) != -1) { -+ while ((opt = getopt(argc, argv, "d:e:lt:x:Lh")) != -1) { - switch (opt) { - case 'd': - free(opts.directory); -@@ -122,6 +124,11 @@ main(int argc, char *argv[]) - opts.xml_filename = strdup(optarg); - CHECK_ALLOCATION(opts.xml_filename, 1, 1); - break; -+ case 'L': -+ // set LAVA signal mode -+ opts.flags |= LAVA_SIGNAL_ENABLE; -+ fprintf(stdout, "LAVA_SIGNAL_ENABLE == %d\n", opts.flags); -+ break; - default: - print_usage(stdout, argv[0]); - exit(1); -diff --git a/utils.c b/utils.c -index a8ba190..19f9efa 100644 ---- a/utils.c -+++ b/utils.c -@@ -47,6 +47,7 @@ - - #include "ptest_list.h" - #include "utils.h" -+#include "flags.h" - - #define GET_STIME_BUF_SIZE 1024 - #define WAIT_CHILD_POLL_TIMEOUT_MS 200 -@@ -439,6 +440,7 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts, - fprintf(fp, "START: %s\n", progname); - PTEST_LIST_ITERATE_START(head, p) - char *ptest_dir = strdup(p->run_ptest); -+ char *ptest = strdup(p->ptest); - if (ptest_dir == NULL) { - rc = -1; - break; -@@ -480,11 +482,15 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts, - int status; - int fds[2]; fds[0] = pipefd_stdout[0]; fds[1] = pipefd_stderr[0]; - FILE *fps[2]; fps[0] = fp; fps[1] = fp_stderr; -+ char result[5]; // pass\0, fail\0, skip\0 - - if (setpgid(child, pgid) == -1) { - fprintf(fp, "ERROR: setpgid() failed, %s\n", strerror(errno)); - } - -+ if (opts.flags & LAVA_SIGNAL_ENABLE) { -+ fprintf(stdout, "<LAVA_SIGNAL_STARTTC %s>\n", ptest); -+ } - sttime = time(NULL); - fprintf(fp, "%s\n", get_stime(stime, GET_STIME_BUF_SIZE, sttime)); - fprintf(fp, "BEGIN: %s\n", ptest_dir); -@@ -506,6 +512,14 @@ run_ptests(struct ptest_list *head, const struct ptest_options opts, - - fprintf(fp, "END: %s\n", ptest_dir); - fprintf(fp, "%s\n", get_stime(stime, GET_STIME_BUF_SIZE, entime)); -+ if (opts.flags & LAVA_SIGNAL_ENABLE) { -+ if (status) -+ sprintf(result, "fail"); -+ else -+ sprintf(result, "pass"); -+ fprintf(stdout, "<LAVA_SIGNAL_ENDTC %s>\n", ptest); -+ fprintf(stdout, "<LAVA_SIGNAL_TESTCASE TEST_CASE_ID=%s RESULT=%s>\n", ptest, result); -+ } - } - PTEST_LIST_ITERATE_END - fprintf(fp, "STOP: %s\n", progname); -diff --git a/utils.h b/utils.h -index aa53707..df11e24 100644 ---- a/utils.h -+++ b/utils.h -@@ -39,9 +39,9 @@ struct ptest_options { - int timeout; - char **ptests; - char *xml_filename; -+ unsigned int flags; - }; - -- - extern void check_allocation1(void *, size_t, char *, int, int); - extern struct ptest_list *get_available_ptests(const char *); - extern int print_ptests(struct ptest_list *, FILE *); diff --git a/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner_2.%.bbappend b/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner_2.%.bbappend deleted file mode 100644 index 7a1d2a8f8..000000000 --- a/meta-agl-bsp/recipes-support/ptest-runner/ptest-runner_2.%.bbappend +++ /dev/null @@ -1,4 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -SRC_URI += "file://0007-WIP-Initial-LAVA-support.patch" - 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 index ae8fe71b6..b857cb19f 100644 --- 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 @@ -1,20 +1,20 @@ DESCRIPTION = "Xen hypervisor u-boot image" -LICENSE = "GPLv2" +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} = "" +ALLOW_EMPTY:${PN} = "1" +FILES:${PN} = "" S = "${WORKDIR}" DEPENDS = "u-boot-mkimage-native " # Only for aarch64 COMPATIBLE_MACHINE = "(-)" -COMPATIBLE_MACHINE_aarch64 = "(.*)" +COMPATIBLE_MACHINE:aarch64 = "(.*)" PACKAGE_ARCH = "${MACHINE_ARCH}" 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 index 057f4564c..a67200618 100644 --- 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 @@ -3,9 +3,9 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" # rpi4 -LIC_FILES_CHKSUM_raspberrypi4 = "file://COPYING;md5=4295d895d4b5ce9d070263d52f030e49" -XEN_REL_raspberrypi4 = "4.13" -SRCREV_raspberrypi4 = "721f2c323ca55c77857c93e7275b4a93a0e15e1f" -SRC_URI_raspberrypi4 = " \ +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 index 1b9aaf4ca..2d63e1841 100644 --- a/meta-agl-bsp/virtualization-layer/recipes-extended/xen/xen_git.bbappend +++ b/meta-agl-bsp/virtualization-layer/recipes-extended/xen/xen_git.bbappend @@ -1,17 +1,17 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +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" +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" +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() { +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 new file mode 100644 index 000000000..8bc102c92 --- /dev/null +++ b/meta-agl-bsp/virtualization-layer/recipes-graphics/mesa/mesa/0001-virgl-virgl_driinfo.h.in-Disable-by-default-emulated.patch @@ -0,0 +1,34 @@ +From 39dea63ebce2764c683c8c2eddbb10cf07a970c4 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 +first time booting up on PVR host driver. + +Introduced with patch 'virgl: Always enable emulated BGRA and swizzling +unless specifically told not to' in mesa-20.3.0. + +Signed-off-by: Marius Vlad <marius.vlad@collabora.com> +--- + src/gallium/drivers/virgl/virgl_driinfo.h.in | 4 ++-- + 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 +--- a/src/gallium/drivers/virgl/virgl_driinfo.h.in ++++ b/src/gallium/drivers/virgl/virgl_driinfo.h.in +@@ -8,7 +8,7 @@ + // 5. Implement the tweak in virglrenderer + DRI_CONF_SECTION_MISCELLANEOUS + DRI_CONF_FORMAT_L8_SRGB_ENABLE_READBACK(false) +- DRI_CONF_GLES_EMULATE_BGRA(true) +- DRI_CONF_GLES_APPLY_BGRA_DEST_SWIZZLE(true) ++ 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 + diff --git a/meta-agl-bsp/virtualization-layer/recipes-graphics/mesa/mesa_22.%.bbappend b/meta-agl-bsp/virtualization-layer/recipes-graphics/mesa/mesa_22.%.bbappend new file mode 100644 index 000000000..0a6606ebf --- /dev/null +++ b/meta-agl-bsp/virtualization-layer/recipes-graphics/mesa/mesa_22.%.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://0001-virgl-virgl_driinfo.h.in-Disable-by-default-emulated.patch" diff --git a/meta-agl-bsp/virtualization-layer/recipes-kernel/linux/linux-yocto-dev.bbappend b/meta-agl-bsp/virtualization-layer/recipes-kernel/linux/linux-yocto-dev.bbappend new file mode 100644 index 000000000..5970414eb --- /dev/null +++ b/meta-agl-bsp/virtualization-layer/recipes-kernel/linux/linux-yocto-dev.bbappend @@ -0,0 +1,10 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/linux-yocto:" + +SRC_URI:append:virtio-all = " \ + git://gerrit.automotivelinux.org/gerrit/src/agl-yocto-kernel-meta.git;protocol=https;type=kmeta;name=agl-meta;destsuffix=agl-kernel-meta;branch=master \ + file://virtio-aarch64-${LINUX_KERNEL_TYPE}.scc \ +" + +SRCREV_agl-meta = "c5008f4ba9e1b9f11c1014b53477079e605ceab7" + +COMPATIBLE_MACHINE:virtio-aarch64 = "virtio-aarch64" diff --git a/meta-agl-bsp/virtualization-layer/recipes-kernel/linux/linux-yocto/virtio-aarch64-standard.scc b/meta-agl-bsp/virtualization-layer/recipes-kernel/linux/linux-yocto/virtio-aarch64-standard.scc new file mode 100644 index 000000000..2d1570e9f --- /dev/null +++ b/meta-agl-bsp/virtualization-layer/recipes-kernel/linux/linux-yocto/virtio-aarch64-standard.scc @@ -0,0 +1,13 @@ +# SPDX-License-Identifier: MIT +define KMACHINE virtio-aarch64 +define KTYPE standard +define KARCH arm64 + +include ktypes/standard/standard.scc nopatch +include arch/arm/aarch64.scc +include cfg/8250.scc +include cfg/virtio.scc +include bsp/virtio/agl-virtio.scc + +# enable the ability to run 32 bit apps +include arch/arm/32bit-compat.scc diff --git a/meta-agl-bsp/virtualization-layer/recipes-kernel/linux/linux-yocto/virtio-drm.cfg b/meta-agl-bsp/virtualization-layer/recipes-kernel/linux/linux-yocto/virtio-drm.cfg new file mode 100644 index 000000000..2facc345e --- /dev/null +++ b/meta-agl-bsp/virtualization-layer/recipes-kernel/linux/linux-yocto/virtio-drm.cfg @@ -0,0 +1,3 @@ +CONFIG_DRM=y +CONFIG_FB=y +CONFIG_DRM_FBDEV_EMULATION=y diff --git a/meta-agl-bsp/virtualization-layer/recipes-kernel/linux/linux-yocto/virtio-pci.cfg b/meta-agl-bsp/virtualization-layer/recipes-kernel/linux/linux-yocto/virtio-pci.cfg new file mode 100644 index 000000000..bbcaca312 --- /dev/null +++ b/meta-agl-bsp/virtualization-layer/recipes-kernel/linux/linux-yocto/virtio-pci.cfg @@ -0,0 +1,3 @@ +CONFIG_PCI=y +CONFIG_VIRTIO_PCI=y +CONFIG_PCI_HOST_GENERIC=y 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_5.15.bbappend new file mode 100644 index 000000000..6952436a3 --- /dev/null +++ b/meta-agl-bsp/virtualization-layer/recipes-kernel/linux/linux-yocto_5.15.bbappend @@ -0,0 +1,17 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +# Cannot just append to SRC_URI, as the metadata interferes with the +# AGL config fragment scheme +AGL_KERNEL_SRC:prepend:virtio-all = " \ + git://gerrit.automotivelinux.org/gerrit/src/agl-yocto-kernel-meta.git;protocol=https;type=kmeta;name=agl-meta;destsuffix=agl-kernel-meta;branch=kernel-5.15 \ + file://virtio-aarch64-${LINUX_KERNEL_TYPE}.scc \ +" + +SRCREV_agl-meta = "4deb7357eab5962b0553a5ad1f11be5ac35f9da9" + +AGL_KCONFIG_FRAGMENTS:append:virtio-all = " \ + virtio-drm.cfg \ + virtio-pci.cfg \ +" + +COMPATIBLE_MACHINE:virtio-aarch64 = "virtio-aarch64" |