From 4204309872da5cb401cbb2729d9e2d4869a87f42 Mon Sep 17 00:00:00 2001 From: takeshi_hoshina Date: Thu, 22 Oct 2020 14:58:56 +0900 Subject: agl-basesystem 0.1 --- meta-agl/meta-agl-bsp/conf/include/agl_bbe.inc | 7 +- .../meta-agl-bsp/conf/include/agl_beaglebone.inc | 7 +- .../meta-agl-bsp/conf/include/agl_dra7xx-evm.inc | 7 +- .../conf/include/agl_intel-corei7-64.inc | 16 ++- .../meta-agl-bsp/conf/include/agl_qemux86-64.inc | 4 +- .../meta-agl-bsp/conf/include/agl_raspberrypi3.inc | 11 ++ .../conf/machine/include/rpi4-base.inc | 125 +++++++++++++++++++++ .../meta-agl-bsp/conf/machine/raspberrypi4.conf | 35 ++++-- .../recipes-graphics/mesa/mesa_%.bbappend | 1 + .../wayland/weston-ini-conf.bbappend | 12 +- .../linux/files/extra-graphic-devices.cfg | 14 --- .../recipes-kernel/linux/files/usb-devices.cfg | 3 +- .../bootfiles/bcm2835-bootfiles.bbappend | 16 +-- .../recipes-bsp/bootfiles/rpi-config_git.bbappend | 5 + ...onfigs-rpi4-Add-defconfigs-for-rpi4-32-64.patch | 104 +++++++++++++++++ .../0002-ARM-bcm283x-Add-BCM283x_BASE-define.patch | 105 +++++++++++++++++ ...-bcm283x-Define-configs-for-RaspberryPi-4.patch | 108 ++++++++++++++++++ ...-rpi-Add-entry-for-Raspberry-Pi-4-model-B.patch | 33 ++++++ ...-Include-definition-for-additional-emmc-c.patch | 30 +++++ ...2835_sdhci-Add-support-for-bcm2711-device.patch | 53 +++++++++ .../0007-rpi-Add-memory-map-for-bcm2838.patch | 62 ++++++++++ .../u-boot/u-boot-fw-utils_2019.07.bbappend | 2 + .../recipes-bsp/u-boot/u-boot-rpi4-2019.07.inc | 12 ++ .../recipes-bsp/u-boot/u-boot_2019.07.bbappend | 10 +- .../wayland/weston-ini-conf.bbappend | 2 +- .../create-combined-dtb_1.0.0.bb | 28 ++++- .../recipes-kernel/linux/linux-raspberrypi_4.19.bb | 4 +- .../linux/linux-raspberrypi_4.19.bbappend | 2 + .../recipes-bsp/alsa-state/alsa-state.bbappend | 8 ++ .../meta-rcar-gen3/scripts/setup_mm_packages.sh | 15 ++- .../meta-ti/recipes-arago/weston/weston_%.bbappend | 2 +- .../0001-Add-support-for-AGL-toolchain.patch | 30 +++++ .../ti-sgx-ddk-km/add-AGL-toolchain-config.patch | 12 -- .../ti-sgx-ddk-km/ti-sgx-ddk-km_%.bbappend | 3 +- .../meta-ti/recipes-graphics/gbm/libgbm_%.bbappend | 2 - .../libgles/ti-sgx-ddk-um_%.bbappend | 4 - .../wayland/weston-ini-conf/virtualoutput.cfg | 2 +- .../recipes-graphics/wayland/weston_6.0.0.bb | 4 +- ...eric-add-if_afp.h-header-to-get-ARPHRD_CA.patch | 25 +++++ .../recipes-kernel/linux/linux-agl-4.14.inc | 3 + .../recipes-kernel/linux/linux-agl.inc | 9 ++ .../recipes-kernel/linux/linux/ath9k_htc.cfg | 2 +- .../recipes-kernel/linux/linux/iiodevice.cfg | 3 +- ...eric-Use-pfifo_fast-as-fallback-scheduler.patch | 75 +++++++++++++ .../recipes-kernel/linux/linux/netfilter.cfg | 1 + .../vboxguestdrivers/vboxguestdrivers_%.bbappend | 1 + .../wic/systemd-intel-corei7-64-bootdisk.wks | 2 +- 47 files changed, 917 insertions(+), 104 deletions(-) create mode 100644 meta-agl/meta-agl-bsp/conf/machine/include/rpi4-base.inc create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-2019.07/0001-configs-rpi4-Add-defconfigs-for-rpi4-32-64.patch create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-2019.07/0002-ARM-bcm283x-Add-BCM283x_BASE-define.patch create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-2019.07/0003-arm-mach-bcm283x-Define-configs-for-RaspberryPi-4.patch create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-2019.07/0004-rpi-Add-entry-for-Raspberry-Pi-4-model-B.patch create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-2019.07/0005-arm-bcm283x-Include-definition-for-additional-emmc-c.patch create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-2019.07/0006-mmc-bcm2835_sdhci-Add-support-for-bcm2711-device.patch create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-2019.07/0007-rpi-Add-memory-map-for-bcm2838.patch create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-fw-utils_2019.07.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-rpi4-2019.07.inc create mode 100644 meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.bbappend create mode 100644 meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km/0001-Add-support-for-AGL-toolchain.patch delete mode 100644 meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km/add-AGL-toolchain-config.patch delete mode 100644 meta-agl/meta-agl-bsp/meta-ti/recipes-graphics/gbm/libgbm_%.bbappend create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-4.14/net-sch_generic-add-if_afp.h-header-to-get-ARPHRD_CA.patch create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/net-sch_generic-Use-pfifo_fast-as-fallback-scheduler.patch create mode 100644 meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/netfilter.cfg create mode 100644 meta-agl/meta-agl-bsp/recipes-support/vboxguestdrivers/vboxguestdrivers_%.bbappend (limited to 'meta-agl/meta-agl-bsp') diff --git a/meta-agl/meta-agl-bsp/conf/include/agl_bbe.inc b/meta-agl/meta-agl-bsp/conf/include/agl_bbe.inc index 4f4dc986..5dc81709 100644 --- a/meta-agl/meta-agl-bsp/conf/include/agl_bbe.inc +++ b/meta-agl/meta-agl-bsp/conf/include/agl_bbe.inc @@ -8,7 +8,7 @@ CORE_IMAGE_EXTRA_INSTALL += "packagegroup-machine-base" #------------------------------------------------- ## Graphics section ## #------------------------------------------------- -PACKAGES_GFX = "omapdrm-pvr" +PACKAGES_GFX = "ti-sgx-ddk-km" IMAGE_INSTALL_append = " ${PACKAGES_GFX}" @@ -22,11 +22,8 @@ DEPENDS_remove = "virtual/libgl" 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" -PREFERRED_PROVIDER_libgbm = "libgbm" - -#Preferred versions -PREFERRED_VERSION_libgbm = "10.0.0" #------------------------------------------------- ## Multimedia section ## diff --git a/meta-agl/meta-agl-bsp/conf/include/agl_beaglebone.inc b/meta-agl/meta-agl-bsp/conf/include/agl_beaglebone.inc index 988b3d53..1917ff45 100644 --- a/meta-agl/meta-agl-bsp/conf/include/agl_beaglebone.inc +++ b/meta-agl/meta-agl-bsp/conf/include/agl_beaglebone.inc @@ -3,7 +3,7 @@ #------------------------------------------------- ## Graphics section ## #------------------------------------------------- -PACKAGES_GFX = "omapdrm-pvr" +PACKAGES_GFX = "ti-sgx-ddk-km" IMAGE_INSTALL_append = " ${PACKAGES_GFX}" @@ -17,11 +17,8 @@ DEPENDS_remove = "virtual/libgl" 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" -PREFERRED_PROVIDER_libgbm = "libgbm" - -#Preferred versions -PREFERRED_VERSION_libgbm = "10.0.0" #------------------------------------------------- ## Multimedia section ## diff --git a/meta-agl/meta-agl-bsp/conf/include/agl_dra7xx-evm.inc b/meta-agl/meta-agl-bsp/conf/include/agl_dra7xx-evm.inc index 54524a81..2e7741a5 100644 --- a/meta-agl/meta-agl-bsp/conf/include/agl_dra7xx-evm.inc +++ b/meta-agl/meta-agl-bsp/conf/include/agl_dra7xx-evm.inc @@ -2,7 +2,7 @@ #------------------------------------------------- ## Graphics section ## #------------------------------------------------- -PACKAGES_GFX_${MACHINE} = "omapdrm-pvr" +PACKAGES_GFX_${MACHINE} = "ti-sgx-ddk-km" # Enable Gfx Pkgs MACHINE_FEATURES_append = " sgx" @@ -14,11 +14,8 @@ DEPENDS_remove = "virtual/libgl" 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" -PREFERRED_PROVIDER_libgbm = "libgbm" - -#Preferred versions -PREFERRED_VERSION_libgbm = "10.0.0" #------------------------------------------------- ## Multimedia section ## diff --git a/meta-agl/meta-agl-bsp/conf/include/agl_intel-corei7-64.inc b/meta-agl/meta-agl-bsp/conf/include/agl_intel-corei7-64.inc index 39ed6688..68398371 100644 --- a/meta-agl/meta-agl-bsp/conf/include/agl_intel-corei7-64.inc +++ b/meta-agl/meta-agl-bsp/conf/include/agl_intel-corei7-64.inc @@ -5,7 +5,7 @@ IMAGE_INSTALL_append = " \ intel-vaapi-driver \ gstreamer1.0-vaapi" -AGL_EXTRA_IMAGE_FSTYPES = "wic.xz wic.bmap wic.xz.sha256sum" +AGL_EXTRA_IMAGE_FSTYPES = "wic.xz wic.bmap wic.xz.sha256sum ext4 wic.vmdk" INITRD_LIVE = "${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE_LIVE}-${MACHINE}.ext4.gz" # Modify this file under meta-agl-bsp/meta-intel/wic to change the @@ -16,3 +16,17 @@ PREFERRED_VERSION_linux-intel ?= "4.19%" PREFERRED_VERSION_linux-intel-rt ?= "4.19%" SERIAL_CONSOLES_remove = "115200;ttyS2" + +# +# To avoid corrupt boot screen by systemd message, you can use serial +# console separated from VGA console or disable all boot messages by +# kernel command line. +# +# Configuration for serial console +QB_KERNEL_CMDLINE_APPEND_append = " console=ttyS0,115200n8" +# +# All boot message will be off +QB_KERNEL_CMDLINE_APPEND_append = " quiet" +# +# Force the virtio video device as 'vmware' doesn't always work +QB_OPT_APPEND_append = " -vga virtio" diff --git a/meta-agl/meta-agl-bsp/conf/include/agl_qemux86-64.inc b/meta-agl/meta-agl-bsp/conf/include/agl_qemux86-64.inc index a72f7b0f..11295c7e 100644 --- a/meta-agl/meta-agl-bsp/conf/include/agl_qemux86-64.inc +++ b/meta-agl/meta-agl-bsp/conf/include/agl_qemux86-64.inc @@ -21,7 +21,7 @@ QB_KERNEL_CMDLINE_APPEND_append = " quiet" DISTRO_FEATURES_append = " sota" # Image support -AGL_EXTRA_IMAGE_FSTYPES = "ext4 wic.vmdk" +AGL_EXTRA_IMAGE_FSTYPES = "ext4 wic.vmdk wic.xz wic.bmap" IMAGE_BOOT_FILES_sota = "u-boot-qemux86-64.rom" # Root device @@ -31,4 +31,4 @@ ROOT_VM = "root=PARTUUID=${DISK_SIGNATURE}-02" QB_OPT_APPEND_append = " -vga virtio" # Use our own wks file -WKS_FILE="directdisk.wks.in" +WKS_FILE="systemd-intel-corei7-64-bootdisk.wks" diff --git a/meta-agl/meta-agl-bsp/conf/include/agl_raspberrypi3.inc b/meta-agl/meta-agl-bsp/conf/include/agl_raspberrypi3.inc index cc307485..94dc5ace 100644 --- a/meta-agl/meta-agl-bsp/conf/include/agl_raspberrypi3.inc +++ b/meta-agl/meta-agl-bsp/conf/include/agl_raspberrypi3.inc @@ -14,8 +14,19 @@ UBOOT_MACHINE = "rpi_3_32b_config" KERNEL_IMAGETYPE = "uImage" +PREFERRED_VERSION_linux-raspberrypi = "4.19%" +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" + +# Set appropriate version of Mesa for Raspberry Pi 3 and 4 +PREFERRED_VERSION_mesa = "19.1%" + MACHINE_FEATURES += "vc4graphics" +# Switch to firmware KMS to support the official DSI touchscreen display +VC4DTBO = "vc4-fkms-v3d" + # For libomxil #LICENSE_FLAGS_WHITELIST = "commercial" diff --git a/meta-agl/meta-agl-bsp/conf/machine/include/rpi4-base.inc b/meta-agl/meta-agl-bsp/conf/machine/include/rpi4-base.inc new file mode 100644 index 00000000..a19d0f88 --- /dev/null +++ b/meta-agl/meta-agl-bsp/conf/machine/include/rpi4-base.inc @@ -0,0 +1,125 @@ +include conf/machine/include/rpi-default-settings.inc +include conf/machine/include/rpi-default-versions.inc +include conf/machine/include/rpi-default-providers.inc + +SOC_FAMILY = "rpi" +include conf/machine/include/soc-family.inc + +IMAGE_FSTYPES ?= "tar.bz2 ext3 rpi-sdimg" +WKS_FILE ?= "sdimage-raspberrypi.wks" + +XSERVER = " \ + xserver-xorg \ + ${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "xserver-xorg-extension-glx", "", d)} \ + ${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "xf86-video-modesetting", "xf86-video-fbdev", d)} \ + " + +RPI_KERNEL_DEVICETREE_OVERLAYS ?= " \ + overlays/at86rf233.dtbo \ + overlays/dwc2.dtbo \ + overlays/gpio-key.dtbo \ + overlays/hifiberry-amp.dtbo \ + overlays/hifiberry-dac.dtbo \ + overlays/hifiberry-dacplus.dtbo \ + overlays/hifiberry-digi.dtbo \ + overlays/i2c-rtc.dtbo \ + overlays/iqaudio-dac.dtbo \ + overlays/iqaudio-dacplus.dtbo \ + overlays/mcp2515-can0.dtbo \ + overlays/pi3-disable-bt.dtbo \ + overlays/pi3-miniuart-bt.dtbo \ + overlays/pitft22.dtbo \ + overlays/pitft28-resistive.dtbo \ + overlays/pitft35-resistive.dtbo \ + overlays/pps-gpio.dtbo \ + overlays/rpi-ft5406.dtbo \ + overlays/rpi-poe.dtbo \ + overlays/vc4-kms-v3d.dtbo \ + overlays/vc4-fkms-v3d.dtbo \ + overlays/w1-gpio-pullup.dtbo \ + overlays/w1-gpio.dtbo \ + " + +RPI_KERNEL_DEVICETREE ?= " \ + bcm2708-rpi-zero-w.dtb \ + bcm2708-rpi-b.dtb \ + bcm2708-rpi-b-plus.dtb \ + bcm2709-rpi-2-b.dtb \ + bcm2710-rpi-3-b.dtb \ + bcm2710-rpi-3-b-plus.dtb \ + bcm2711-rpi-4-b.dtb \ + bcm2708-rpi-cm.dtb \ + bcm2710-rpi-cm3.dtb \ + " + +KERNEL_DEVICETREE ?= " \ + ${RPI_KERNEL_DEVICETREE} \ + ${RPI_KERNEL_DEVICETREE_OVERLAYS} \ + " + +# Different dtb and dtbo files are needed for Raspberry Pi 4 +# (64-bit) if feature agl-sota is enabled. +KERNEL_DEVICETREE_raspberrypi4_sota = " broadcom/bcm2711-rpi-4-b.dtb overlays/vc4-fkms-v3d.dtbo overlays/uart0-rpi4.dtbo" + +# By default: +# +# * When u-boot is disabled use the "Image" format which can be directly loaded +# by the rpi firmware. +# +# * When u-boot is enabled use the "uImage" format and the "bootm" command +# within u-boot to load the kernel. +KERNEL_BOOTCMD ??= "bootm" +KERNEL_IMAGETYPE_UBOOT ??= "uImage" +KERNEL_IMAGETYPE_DIRECT ??= "zImage" +KERNEL_IMAGETYPE ?= "${@bb.utils.contains('RPI_USE_U_BOOT', '1', \ + '${KERNEL_IMAGETYPE_UBOOT}', '${KERNEL_IMAGETYPE_DIRECT}', d)}" + +MACHINE_FEATURES += "apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio ${@bb.utils.contains('DISABLE_VC4GRAPHICS', '1', '', 'vc4graphics', d)}" + +# Raspberry Pi has no hardware clock +MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc" + +MACHINE_EXTRA_RRECOMMENDS += " kernel-modules udev-rules-rpi" + +# Set Raspberrypi splash image +SPLASH = "psplash-raspberrypi" + +def make_dtb_boot_files(d): + # Generate IMAGE_BOOT_FILES entries for device tree files listed in + # KERNEL_DEVICETREE. + alldtbs = d.getVar('KERNEL_DEVICETREE') + imgtyp = d.getVar('KERNEL_IMAGETYPE') + + def transform(dtb): + base = os.path.basename(dtb) + if dtb.endswith('dtb'): + # eg: whatever/bcm2708-rpi-b.dtb has: + # DEPLOYDIR file: bcm2708-rpi-b.dtb + # destination: bcm2708-rpi-b.dtb + return base + elif dtb.endswith('dtbo'): + # overlay dtb: + # eg: overlays/hifiberry-amp.dtbo has: + # DEPLOYDIR file: hifiberry-amp.dtbo + # destination: overlays/hifiberry-amp.dtbo + return '{};{}'.format(base, dtb) + + return ' '.join([transform(dtb) for dtb in alldtbs.split(' ') if dtb]) + + +IMAGE_BOOT_FILES ?= "bcm2835-bootfiles/* \ + ${@make_dtb_boot_files(d)} \ + ${@bb.utils.contains('RPI_USE_U_BOOT', '1', \ + '${KERNEL_IMAGETYPE} u-boot.bin;${SDIMG_KERNELIMAGE} boot.scr', \ + '${KERNEL_IMAGETYPE};${SDIMG_KERNELIMAGE}', d)} \ + " +do_image_wic[depends] += " \ + bcm2835-bootfiles:do_deploy \ + ${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'u-boot:do_deploy', '',d)} \ + " + +do_image_wic[recrdeps] = "do_build" + +# The kernel image is installed into the FAT32 boot partition and does not need +# to also be installed into the rootfs. +RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "" diff --git a/meta-agl/meta-agl-bsp/conf/machine/raspberrypi4.conf b/meta-agl/meta-agl-bsp/conf/machine/raspberrypi4.conf index 2f759286..a09d881d 100644 --- a/meta-agl/meta-agl-bsp/conf/machine/raspberrypi4.conf +++ b/meta-agl/meta-agl-bsp/conf/machine/raspberrypi4.conf @@ -1,10 +1,8 @@ #@TYPE: Machine -#@NAME: RaspberryPi 4 Development Board (32bit) -#@DESCRIPTION: Machine configuration for the RaspberryPi 4 in 32 bit mode +#@NAME: RaspberryPi 4 Development Board (64bit) +#@DESCRIPTION: Machine configuration for the RaspberryPi 4 in 64 bits mode -DEFAULTTUNE ?= "cortexa7thf-neon-vfpv4" -require conf/machine/include/tune-cortexa7.inc -include conf/machine/include/rpi-base.inc +MACHINEOVERRIDES = "raspberrypi4:${MACHINE}" MACHINE_EXTRA_RRECOMMENDS += "\ linux-firmware-rpidistro-bcm43455 \ @@ -12,15 +10,28 @@ MACHINE_EXTRA_RRECOMMENDS += "\ pi-bluetooth \ " -# 'l' stands for LPAE -SDIMG_KERNELIMAGE ?= "kernel7l.img" -UBOOT_MACHINE = "rpi_4_32b_config" +require conf/machine/include/arm/arch-arm64.inc +include conf/machine/include/rpi4-base.inc + +RPI_KERNEL_DEVICETREE = " \ + broadcom/bcm2711-rpi-4-b.dtb \ +" + +SDIMG_KERNELIMAGE ?= "kernel8.img" SERIAL_CONSOLES ?= "115200;ttyS0" MACHINE_FEATURES_append = " vc4graphics" +UBOOT_MACHINE = "rpi_4_config" + VC4DTBO ?= "vc4-fkms-v3d" -RPI_KERNEL_DEVICETREE_OVERLAYS_remove_raspberrypi4 = "overlays/lirc-rpi.dtbo" -RPI_KERNEL_DEVICETREE_OVERLAYS_append_raspberrypi4 = " overlays/mcp2515-can0.dtbo overlays/vc4-fkms-v3d.dtbo" -RPI_KERNEL_DEVICETREE_remove_raspberrypi4 = "bcm2708-rpi-0-w.dtb" -RPI_KERNEL_DEVICETREE_append_raspberrypi4 = " bcm2708-rpi-zero-w.dtb bcm2711-rpi-4-b.dtb" +# When u-boot is enabled we need to use the "Image" format and the "booti" +# command to load the kernel +KERNEL_IMAGETYPE_UBOOT ?= "Image" +# "zImage" not supported on arm64 and ".gz" images not supported by bootloader yet +KERNEL_IMAGETYPE_DIRECT ?= "Image" +KERNEL_BOOTCMD ?= "booti" + +RPI_EXTRA_CONFIG ?= "\n# Force arm in 64bit mode. See: https://github.com/raspberrypi/firmware/issues/1193.\narm_64bit=1" + +ARMSTUB ?= "armstub8-gic.bin" diff --git a/meta-agl/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/mesa/mesa_%.bbappend b/meta-agl/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/mesa/mesa_%.bbappend index 49e52770..8ac343aa 100644 --- a/meta-agl/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/mesa/mesa_%.bbappend +++ b/meta-agl/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/mesa/mesa_%.bbappend @@ -2,5 +2,6 @@ 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/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/weston-ini-conf.bbappend b/meta-agl/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/weston-ini-conf.bbappend index 8fa08bc3..4a2dc80a 100644 --- a/meta-agl/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/weston-ini-conf.bbappend +++ b/meta-agl/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/weston-ini-conf.bbappend @@ -1,9 +1,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -# OVERRIDES save us some c'n'p below ... -OVERRIDES_prepend_qemux86 = "virtualmachine:" -OVERRIDES_prepend_qemux86-64 = "virtualmachine:" - -# Switch to the Virtual section that we have when a valid DRM device is found -SRC_URI_remove_virtualmachine = "file://hdmi-a-1-270.cfg" -SRC_URI_append_virtualmachine = " file://virtual.cfg" +# 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/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/extra-graphic-devices.cfg b/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/extra-graphic-devices.cfg index 125406ea..d2b64de6 100644 --- a/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/extra-graphic-devices.cfg +++ b/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/extra-graphic-devices.cfg @@ -6,7 +6,6 @@ CONFIG_RSI_SDIO=m CONFIG_RSI_USB=m CONFIG_DRM_RADEON=m CONFIG_DRM_RADEON_USERPTR=y -# CONFIG_DRM_RADEON_UMS is not set CONFIG_DRM_NOUVEAU=m CONFIG_NOUVEAU_DEBUG=5 CONFIG_NOUVEAU_DEBUG_DEFAULT=3 @@ -20,25 +19,14 @@ CONFIG_DRM_GMA3600=y CONFIG_DRM_UDL=m CONFIG_FB_DEFERRED_IO=y CONFIG_FB_BACKLIGHT=y -# CONFIG_LEDS_DELL_NETBOOKS is not set CONFIG_IRQ_BYPASS_MANAGER=m -# CONFIG_ACER_WMI is not set -# CONFIG_ALIENWARE_WMI is not set -# CONFIG_DELL_WMI is not set -# CONFIG_DELL_WMI_AIO is not set -# CONFIG_HP_WMI is not set -# CONFIG_ASUS_WMI is not set CONFIG_ACPI_WMI=m -# CONFIG_MSI_WMI is not set -# CONFIG_ACPI_TOSHIBA is not set -# CONFIG_TOSHIBA_WMI is not set 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_APIC_ARCHITECTURE=y CONFIG_KVM_MMIO=y CONFIG_KVM_ASYNC_PF=y CONFIG_HAVE_KVM_MSI=y @@ -49,6 +37,4 @@ CONFIG_KVM_COMPAT=y CONFIG_HAVE_KVM_IRQ_BYPASS=y CONFIG_KVM=m CONFIG_KVM_INTEL=m -# CONFIG_KVM_AMD is not set -# CONFIG_KVM_MMU_AUDIT is not set CONFIG_CRC7=m diff --git a/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/usb-devices.cfg b/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/usb-devices.cfg index b65e55b0..19c57796 100644 --- a/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/usb-devices.cfg +++ b/meta-agl/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/usb-devices.cfg @@ -1,5 +1,6 @@ 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 @@ -65,7 +66,7 @@ CONFIG_LIBERTAS_SPI=m # CONFIG_LIBERTAS_MESH is not set CONFIG_RTL8XXXU=m CONFIG_RTL8XXXU_UNTESTED=y -CONFIG_WL_TI=y +CONFIG_WLAN_VENDOR_TI=y CONFIG_WL1251=m # CONFIG_WL1251_SPI is not set # CONFIG_WL1251_SDIO is not set diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bbappend b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bbappend index 009c448b..fc1ba88c 100644 --- a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bbappend +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bbappend @@ -1,12 +1,12 @@ RDEPENDS_${PN}_append_sota += " u-boot-otascript" -RPIFW_DATE_raspberrypi4 = "20190709" -SRCREV_raspberrypi4 = "356f5c2880a3c7e8774025aa6fc934a617553e7b" -RPIFW_SRC_URI_raspberrypi4 = "https://github.com/raspberrypi/firmware/archive/${SRCREV}.tar.gz" -RPIFW_S_raspberrypi_4 = "${WORKDIR}/firmware-${SRCREV}" +RPIFW_DATE = "20191021" +SRCREV = "ed238d3329e39a68bde03bbc2dfc293c0c3dc93a" +RPIFW_SRC_URI = "https://github.com/raspberrypi/firmware/archive/${SRCREV}.tar.gz" +RPIFW_S = "${WORKDIR}/firmware-${SRCREV}" -SRC_URI_raspberrypi4 = "${RPIFW_SRC_URI}" -SRC_URI[md5sum] = "${@ '5962784e7963f0116cd1519e47749b25' if d.getVar('MACHINE_ARCH') == 'raspberrypi4' else '5ccdb5447cbdd3ee0158a514f7b76cb9'}" -SRC_URI[sha256sum] = "${@ '6e07d98e4229ba7a1970a4c475fc6b8631823d200d3b8734a508e7ff5ea4c120' if d.getVar('MACHINE_ARCH') == 'raspberrypi4' else '9a34ccc4a51695a33206cc6c8534f615ba5a30fcbce5fa3add400ecc6b80ad8a'}" +SRC_URI = "${RPIFW_SRC_URI}" +SRC_URI[md5sum] = "d18066531018a972ed927a6cc136cfff" +SRC_URI[sha256sum] = "82048cf88f4f50f7cf83e34d93923ceb5147885761d33ee5f4dc980b4a7a426a" -PV_raspberrypi4 = "${RPIFW_DATE}" +PV = "${RPIFW_DATE}" diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend index 5c74cae7..5eecff6f 100644 --- a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend @@ -35,6 +35,11 @@ do_deploy_append() { echo "dtparam=audio=on" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt } +do_deploy_append_raspberrypi4() { + echo -e "\n[pi4]" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "max_framebuffers=2" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt +} + do_deploy_append_sota() { echo "device_tree_address=0x0c800000" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt } diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-2019.07/0001-configs-rpi4-Add-defconfigs-for-rpi4-32-64.patch b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-2019.07/0001-configs-rpi4-Add-defconfigs-for-rpi4-32-64.patch new file mode 100644 index 00000000..391b26a1 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-2019.07/0001-configs-rpi4-Add-defconfigs-for-rpi4-32-64.patch @@ -0,0 +1,104 @@ +From 5bf85d04b440ce874310e701abded823dc1864bc Mon Sep 17 00:00:00 2001 +From: Andrei Gherzan +Date: Wed, 17 Jul 2019 15:32:11 +0100 +Subject: [PATCH 1/7] configs: rpi4: Add defconfigs for rpi4 (32/64) + +This defines a minimum defconfig for each of the two Raspberry Pi 4 +variants. One notable difference is that we don't have a embedded dt for +this board given that the fw supplies us with one which we can reuse. +Furthermore, the ram size is not queryable through mbox interface as the +maximum reported size is 1G. The fw patches the dt with the right +memory configuration and uboot uses it as it is. We avoid u-boot +touching this configuration by making sure CONFIG_ARCH_FIXUP_FDT_MEMORY +is deactivated. + +Signed-off-by: Andrei Gherzan +Upstream-status: Pending +--- + configs/rpi_4_32b_defconfig | 33 +++++++++++++++++++++++++++++++++ + configs/rpi_4_defconfig | 33 +++++++++++++++++++++++++++++++++ + 2 files changed, 66 insertions(+) + create mode 100644 configs/rpi_4_32b_defconfig + create mode 100644 configs/rpi_4_defconfig + +diff --git a/configs/rpi_4_32b_defconfig b/configs/rpi_4_32b_defconfig +new file mode 100644 +index 0000000000..a31a617a5f +--- /dev/null ++++ b/configs/rpi_4_32b_defconfig +@@ -0,0 +1,33 @@ ++CONFIG_ARM=y ++CONFIG_ARCH_BCM283X=y ++CONFIG_SYS_TEXT_BASE=0x00008000 ++CONFIG_TARGET_RPI_4_32B=y ++CONFIG_SYS_MALLOC_F_LEN=0x2000 ++CONFIG_DISTRO_DEFAULTS=y ++CONFIG_NR_DRAM_BANKS=1 ++# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set ++CONFIG_OF_BOARD=y ++CONFIG_OF_BOARD_SETUP=y ++CONFIG_MISC_INIT_R=y ++# CONFIG_DISPLAY_CPUINFO is not set ++# CONFIG_DISPLAY_BOARDINFO is not set ++CONFIG_SYS_PROMPT="U-Boot> " ++# CONFIG_CMD_FLASH is not set ++CONFIG_CMD_GPIO=y ++CONFIG_CMD_MMC=y ++CONFIG_CMD_FS_UUID=y ++CONFIG_ENV_FAT_INTERFACE="mmc" ++CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" ++CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y ++CONFIG_DM_KEYBOARD=y ++CONFIG_DM_MMC=y ++CONFIG_MMC_SDHCI=y ++CONFIG_MMC_SDHCI_BCM2835=y ++CONFIG_PINCTRL=y ++# CONFIG_PINCTRL_GENERIC is not set ++# CONFIG_REQUIRE_SERIAL_CONSOLE is not set ++CONFIG_DM_VIDEO=y ++CONFIG_SYS_WHITE_ON_BLACK=y ++CONFIG_CONSOLE_SCROLL_LINES=10 ++CONFIG_PHYS_TO_BUS=y ++CONFIG_OF_LIBFDT_OVERLAY=y +diff --git a/configs/rpi_4_defconfig b/configs/rpi_4_defconfig +new file mode 100644 +index 0000000000..da8c960a2a +--- /dev/null ++++ b/configs/rpi_4_defconfig +@@ -0,0 +1,33 @@ ++CONFIG_ARM=y ++CONFIG_ARCH_BCM283X=y ++CONFIG_SYS_TEXT_BASE=0x00080000 ++CONFIG_TARGET_RPI_4=y ++CONFIG_SYS_MALLOC_F_LEN=0x2000 ++CONFIG_DISTRO_DEFAULTS=y ++CONFIG_NR_DRAM_BANKS=1 ++# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set ++CONFIG_OF_BOARD=y ++CONFIG_OF_BOARD_SETUP=y ++CONFIG_MISC_INIT_R=y ++# CONFIG_DISPLAY_CPUINFO is not set ++# CONFIG_DISPLAY_BOARDINFO is not set ++CONFIG_SYS_PROMPT="U-Boot> " ++# CONFIG_CMD_FLASH is not set ++CONFIG_CMD_GPIO=y ++CONFIG_CMD_MMC=y ++CONFIG_CMD_FS_UUID=y ++CONFIG_ENV_FAT_INTERFACE="mmc" ++CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" ++CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y ++CONFIG_DM_KEYBOARD=y ++CONFIG_DM_MMC=y ++CONFIG_MMC_SDHCI=y ++CONFIG_MMC_SDHCI_BCM2835=y ++CONFIG_PINCTRL=y ++# CONFIG_PINCTRL_GENERIC is not set ++# CONFIG_REQUIRE_SERIAL_CONSOLE is not set ++CONFIG_DM_VIDEO=y ++CONFIG_SYS_WHITE_ON_BLACK=y ++CONFIG_CONSOLE_SCROLL_LINES=10 ++CONFIG_PHYS_TO_BUS=y ++CONFIG_OF_LIBFDT_OVERLAY=y +-- +2.22.0 + diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-2019.07/0002-ARM-bcm283x-Add-BCM283x_BASE-define.patch b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-2019.07/0002-ARM-bcm283x-Add-BCM283x_BASE-define.patch new file mode 100644 index 00000000..fcf91a6a --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-2019.07/0002-ARM-bcm283x-Add-BCM283x_BASE-define.patch @@ -0,0 +1,105 @@ +From df2aa4c6be33b468adc09de337a055556d1f37fb Mon Sep 17 00:00:00 2001 +From: Matthias Brugger +Date: Fri, 12 Jul 2019 18:20:53 +0200 +Subject: [PATCH 2/7] ARM: bcm283x: Add BCM283x_BASE define + +Devices of bcm283x have different base address, depending if they are on +bcm2835 or bcm2836/7. Use BCM283x_BASE depending on the SoC you want to +build and only add the offset in the header files. + +Signed-off-by: Matthias Brugger +Signed-off-by: Andrei Gherzan +Upstream-status: Pending +--- + arch/arm/mach-bcm283x/Kconfig | 5 +++++ + arch/arm/mach-bcm283x/include/mach/mbox.h | 6 +----- + arch/arm/mach-bcm283x/include/mach/sdhci.h | 6 +----- + arch/arm/mach-bcm283x/include/mach/timer.h | 6 +----- + arch/arm/mach-bcm283x/include/mach/wdog.h | 6 +----- + 5 files changed, 9 insertions(+), 20 deletions(-) + +diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach-bcm283x/Kconfig +index 3eb5a9a897..8e69914a83 100644 +--- a/arch/arm/mach-bcm283x/Kconfig ++++ b/arch/arm/mach-bcm283x/Kconfig +@@ -141,4 +141,9 @@ config SYS_SOC + config SYS_CONFIG_NAME + default "rpi" + ++config BCM283x_BASE ++ hex ++ default "0x20000000" if BCM2835 ++ default "0x3f000000" if BCM2836 || BCM2837 ++ + endmenu +diff --git a/arch/arm/mach-bcm283x/include/mach/mbox.h b/arch/arm/mach-bcm283x/include/mach/mbox.h +index e3a893e49c..e44c7577da 100644 +--- a/arch/arm/mach-bcm283x/include/mach/mbox.h ++++ b/arch/arm/mach-bcm283x/include/mach/mbox.h +@@ -37,11 +37,7 @@ + + /* Raw mailbox HW */ + +-#ifndef CONFIG_BCM2835 +-#define BCM2835_MBOX_PHYSADDR 0x3f00b880 +-#else +-#define BCM2835_MBOX_PHYSADDR 0x2000b880 +-#endif ++#define BCM2835_MBOX_PHYSADDR (CONFIG_BCM283x_BASE + 0x0000b880) + + struct bcm2835_mbox_regs { + u32 read; +diff --git a/arch/arm/mach-bcm283x/include/mach/sdhci.h b/arch/arm/mach-bcm283x/include/mach/sdhci.h +index 5cb6ec3340..b443c379d8 100644 +--- a/arch/arm/mach-bcm283x/include/mach/sdhci.h ++++ b/arch/arm/mach-bcm283x/include/mach/sdhci.h +@@ -6,11 +6,7 @@ + #ifndef _BCM2835_SDHCI_H_ + #define _BCM2835_SDHCI_H_ + +-#ifndef CONFIG_BCM2835 +-#define BCM2835_SDHCI_BASE 0x3f300000 +-#else +-#define BCM2835_SDHCI_BASE 0x20300000 +-#endif ++#define BCM2835_SDHCI_BASE (CONFIG_BCM283x_BASE + 0x00300000) + + int bcm2835_sdhci_init(u32 regbase, u32 emmc_freq); + +diff --git a/arch/arm/mach-bcm283x/include/mach/timer.h b/arch/arm/mach-bcm283x/include/mach/timer.h +index 56b0c356bb..014355e759 100644 +--- a/arch/arm/mach-bcm283x/include/mach/timer.h ++++ b/arch/arm/mach-bcm283x/include/mach/timer.h +@@ -6,11 +6,7 @@ + #ifndef _BCM2835_TIMER_H + #define _BCM2835_TIMER_H + +-#ifndef CONFIG_BCM2835 +-#define BCM2835_TIMER_PHYSADDR 0x3f003000 +-#else +-#define BCM2835_TIMER_PHYSADDR 0x20003000 +-#endif ++#define BCM2835_TIMER_PHYSADDR (CONFIG_BCM283x_BASE + 0x00003000) + + #define BCM2835_TIMER_CS_M3 (1 << 3) + #define BCM2835_TIMER_CS_M2 (1 << 2) +diff --git a/arch/arm/mach-bcm283x/include/mach/wdog.h b/arch/arm/mach-bcm283x/include/mach/wdog.h +index 99c88e5df7..00b5e06c3a 100644 +--- a/arch/arm/mach-bcm283x/include/mach/wdog.h ++++ b/arch/arm/mach-bcm283x/include/mach/wdog.h +@@ -6,11 +6,7 @@ + #ifndef _BCM2835_WDOG_H + #define _BCM2835_WDOG_H + +-#ifndef CONFIG_BCM2835 +-#define BCM2835_WDOG_PHYSADDR 0x3f100000 +-#else +-#define BCM2835_WDOG_PHYSADDR 0x20100000 +-#endif ++#define BCM2835_WDOG_PHYSADDR (CONFIG_BCM283x_BASE + 0x00100000) + + struct bcm2835_wdog_regs { + u32 unknown0[7]; +-- +2.22.0 + diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-2019.07/0003-arm-mach-bcm283x-Define-configs-for-RaspberryPi-4.patch b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-2019.07/0003-arm-mach-bcm283x-Define-configs-for-RaspberryPi-4.patch new file mode 100644 index 00000000..029cac49 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-2019.07/0003-arm-mach-bcm283x-Define-configs-for-RaspberryPi-4.patch @@ -0,0 +1,108 @@ +From c03f551cab8fe38de8f0e1781f0e2e339419b003 Mon Sep 17 00:00:00 2001 +From: Andrei Gherzan +Date: Wed, 17 Jul 2019 15:33:01 +0100 +Subject: [PATCH 3/7] arm: mach-bcm283x: Define configs for RaspberryPi 4 + +Define two target configs for Raspberry Pi 4 (32 and 64bit) and the +corresponding BCM2838* configs. + +Be aware of the current limitation in firmware which requires an +explicit configuration to force the arm in 64bit mode when the +respective target is used. + +Signed-off-by: Andrei Gherzan +Signed-off-by: Matthias Brugger +Upstream-status: Pending +--- + arch/arm/mach-bcm283x/Kconfig | 62 +++++++++++++++++++++++++++++++++++ + 1 file changed, 62 insertions(+) + +diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach-bcm283x/Kconfig +index 8e69914a83..09a5b42bbb 100644 +--- a/arch/arm/mach-bcm283x/Kconfig ++++ b/arch/arm/mach-bcm283x/Kconfig +@@ -26,6 +26,23 @@ config BCM2837_64B + select BCM2837 + select ARM64 + ++config BCM2838 ++ bool "Broadcom BCM2838 SoC support" ++ depends on ARCH_BCM283X ++ ++config BCM2838_32B ++ bool "Broadcom BCM2838 SoC 32-bit support" ++ depends on ARCH_BCM283X ++ select BCM2838 ++ select ARMV7_LPAE ++ select CPU_V7A ++ ++config BCM2838_64B ++ bool "Broadcom BCM2838 SoC 64-bit support" ++ depends on ARCH_BCM283X ++ select BCM2838 ++ select ARM64 ++ + menu "Broadcom BCM283X family" + depends on ARCH_BCM283X + +@@ -127,6 +144,50 @@ config TARGET_RPI_3 + This option creates a build targeting the ARMv8/AArch64 ISA. + select BCM2837_64B + ++config TARGET_RPI_4_32B ++ bool "Raspberry Pi 4 32-bit build" ++ help ++ Support for all BCM2838-based Raspberry Pi variants, such as ++ the RPi 4 model B, in AArch32 (32-bit) mode. ++ ++ This option assumes the VideoCore firmware is configured to use the ++ mini UART (rather than PL011) for the serial console. This is the ++ default on the RPi 4. To enable the UART console, the following non- ++ default option must be present in config.txt: enable_uart=1. This is ++ required for U-Boot to operate correctly, even if you only care ++ about the HDMI/usbkbd console. ++ ++ Due to hardware incompatibilities, this can't be used with ++ BCM283/5/6/7. ++ ++ This option creates a build targeting the ARMv7/AArch32 ISA. ++ select BCM2838_32B ++ ++config TARGET_RPI_4 ++ bool "Raspberry Pi 4 64-bit build" ++ help ++ Support for all BCM2838-based Raspberry Pi variants, such as ++ the RPi 4 model B, in AArch64 (64-bit) mode. ++ ++ This option assumes the VideoCore firmware is configured to use the ++ mini UART (rather than PL011) for the serial console. This is the ++ default on the RPi 4. To enable the UART console, the following non- ++ default option must be present in config.txt: enable_uart=1. This is ++ required for U-Boot to operate correctly, even if you only care ++ about the HDMI/usbkbd console. ++ ++ Due to hardware incompatibilities, this can't be used with ++ BCM283/5/6/7. ++ ++ Also, due to a bug in firmware, switching to 64bit mode doesn't ++ happen automatically based on the kernel's image filename. See ++ https://github.com/raspberrypi/firmware/issues/1193 for more details. ++ Until that is resolved, the configuration (config.txt) needs to ++ explicitly set: arm_64bit=1. ++ ++ This option creates a build targeting the ARMv8/AArch64 ISA. ++ select BCM2838_64B ++ + endchoice + + config SYS_BOARD +@@ -145,5 +206,6 @@ config BCM283x_BASE + hex + default "0x20000000" if BCM2835 + default "0x3f000000" if BCM2836 || BCM2837 ++ default "0xfe000000" if BCM2838 + + endmenu +-- +2.22.0 + diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-2019.07/0004-rpi-Add-entry-for-Raspberry-Pi-4-model-B.patch b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-2019.07/0004-rpi-Add-entry-for-Raspberry-Pi-4-model-B.patch new file mode 100644 index 00000000..7309d2b2 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-2019.07/0004-rpi-Add-entry-for-Raspberry-Pi-4-model-B.patch @@ -0,0 +1,33 @@ +From 12fbbd5bc12e225b19d3b4cb193a1bf3d9fa752a Mon Sep 17 00:00:00 2001 +From: Andrei Gherzan +Date: Wed, 17 Jul 2019 15:34:18 +0100 +Subject: [PATCH 4/7] rpi: Add entry for Raspberry Pi 4 model B + +The Raspebrry Pi 4 uses the new revision code scheme as documented by +the foundation. This change adds an entry for this board as well. + +Signed-off-by: Andrei Gherzan +Upstream-status: Pending +--- + board/raspberrypi/rpi/rpi.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c +index 617c892dde..92c6534da6 100644 +--- a/board/raspberrypi/rpi/rpi.c ++++ b/board/raspberrypi/rpi/rpi.c +@@ -148,6 +148,11 @@ static const struct rpi_model rpi_models_new_scheme[] = { + DTB_DIR "bcm2837-rpi-cm3.dtb", + false, + }, ++ [0x11] = { ++ "4 Model B", ++ DTB_DIR "bcm2838-rpi-4-b.dtb", ++ true, ++ }, + }; + + static const struct rpi_model rpi_models_old_scheme[] = { +-- +2.22.0 + diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-2019.07/0005-arm-bcm283x-Include-definition-for-additional-emmc-c.patch b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-2019.07/0005-arm-bcm283x-Include-definition-for-additional-emmc-c.patch new file mode 100644 index 00000000..44847e01 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-2019.07/0005-arm-bcm283x-Include-definition-for-additional-emmc-c.patch @@ -0,0 +1,30 @@ +From fd99a249e6faf234066a6b5da2ed34aaead3d6d9 Mon Sep 17 00:00:00 2001 +From: Andrei Gherzan +Date: Fri, 12 Jul 2019 11:26:10 +0100 +Subject: [PATCH 5/7] arm: bcm283x: Include definition for additional emmc + clock + +This clock has a different mbox ID so have this included in the relevant +header file. + +Signed-off-by: Andrei Gherzan +Upstream-status: Pending +--- + arch/arm/mach-bcm283x/include/mach/mbox.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/arm/mach-bcm283x/include/mach/mbox.h b/arch/arm/mach-bcm283x/include/mach/mbox.h +index e44c7577da..f2a98acddd 100644 +--- a/arch/arm/mach-bcm283x/include/mach/mbox.h ++++ b/arch/arm/mach-bcm283x/include/mach/mbox.h +@@ -230,6 +230,7 @@ struct bcm2835_mbox_tag_set_power_state { + #define BCM2835_MBOX_CLOCK_ID_SDRAM 8 + #define BCM2835_MBOX_CLOCK_ID_PIXEL 9 + #define BCM2835_MBOX_CLOCK_ID_PWM 10 ++#define BCM2835_MBOX_CLOCK_ID_EMMC2 12 + + struct bcm2835_mbox_tag_get_clock_rate { + struct bcm2835_mbox_tag_hdr tag_hdr; +-- +2.22.0 + diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-2019.07/0006-mmc-bcm2835_sdhci-Add-support-for-bcm2711-device.patch b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-2019.07/0006-mmc-bcm2835_sdhci-Add-support-for-bcm2711-device.patch new file mode 100644 index 00000000..d9de5c42 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-2019.07/0006-mmc-bcm2835_sdhci-Add-support-for-bcm2711-device.patch @@ -0,0 +1,53 @@ +From 1f42758fe69648340cfae6cae98e667b88923cf6 Mon Sep 17 00:00:00 2001 +From: Matthias Brugger +Date: Wed, 10 Jul 2019 13:24:36 +0200 +Subject: [PATCH 6/7] mmc: bcm2835_sdhci: Add support for bcm2711 device + +The bcm2711 has two emmc controller. The difference is the clocks +they use. Add support for the second emmc contoller. + +Signed-off-by: Matthias Brugger +Signed-off-by: Andrei Gherzan +Upstream-status: Pending +--- + drivers/mmc/bcm2835_sdhci.c | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c +index 08bddd410e..e68dec3be7 100644 +--- a/drivers/mmc/bcm2835_sdhci.c ++++ b/drivers/mmc/bcm2835_sdhci.c +@@ -178,12 +178,13 @@ static int bcm2835_sdhci_probe(struct udevice *dev) + fdt_addr_t base; + int emmc_freq; + int ret; ++ int clock_id = (int)dev_get_driver_data(dev); + + base = devfdt_get_addr(dev); + if (base == FDT_ADDR_T_NONE) + return -EINVAL; + +- ret = bcm2835_get_mmc_clock(BCM2835_MBOX_CLOCK_ID_EMMC); ++ ret = bcm2835_get_mmc_clock(clock_id); + if (ret < 0) { + debug("%s: Failed to set MMC clock (err=%d)\n", __func__, ret); + return ret; +@@ -228,7 +229,14 @@ static int bcm2835_sdhci_probe(struct udevice *dev) + } + + static const struct udevice_id bcm2835_sdhci_match[] = { +- { .compatible = "brcm,bcm2835-sdhci" }, ++ { ++ .compatible = "brcm,bcm2835-sdhci", ++ .data = BCM2835_MBOX_CLOCK_ID_EMMC ++ }, ++ { ++ .compatible = "brcm,bcm2711-emmc2", ++ .data = BCM2835_MBOX_CLOCK_ID_EMMC2 ++ }, + { /* sentinel */ } + }; + +-- +2.22.0 + diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-2019.07/0007-rpi-Add-memory-map-for-bcm2838.patch b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-2019.07/0007-rpi-Add-memory-map-for-bcm2838.patch new file mode 100644 index 00000000..1d23d9f9 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-2019.07/0007-rpi-Add-memory-map-for-bcm2838.patch @@ -0,0 +1,62 @@ +From 76b656349a6786fa81cf69ac7762c31675cd567e Mon Sep 17 00:00:00 2001 +From: Andrei Gherzan +Date: Fri, 12 Jul 2019 14:27:31 +0100 +Subject: [PATCH 7/7] rpi: Add memory map for bcm2838 + +Define the memory map for the BCM2838 based on the dt configuration +available in the Raspberry Pi kernel fork. + +Signed-off-by: Andrei Gherzan +Upstream-status: Pending +--- + board/raspberrypi/rpi/rpi.c | 27 ++++++++++++++++++++++++--- + 1 file changed, 24 insertions(+), 3 deletions(-) + +diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c +index 92c6534da6..bddf2a578d 100644 +--- a/board/raspberrypi/rpi/rpi.c ++++ b/board/raspberrypi/rpi/rpi.c +@@ -249,7 +249,8 @@ static uint32_t rev_type; + static const struct rpi_model *model; + + #ifdef CONFIG_ARM64 +-static struct mm_region bcm2837_mem_map[] = { ++#ifndef CONFIG_BCM2838 ++static struct mm_region bcm283x_mem_map[] = { + { + .virt = 0x00000000UL, + .phys = 0x00000000UL, +@@ -268,8 +269,28 @@ static struct mm_region bcm2837_mem_map[] = { + 0, + } + }; +- +-struct mm_region *mem_map = bcm2837_mem_map; ++#else ++static struct mm_region bcm283x_mem_map[] = { ++ { ++ .virt = 0x00000000UL, ++ .phys = 0x00000000UL, ++ .size = 0xfe000000UL, ++ .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | ++ PTE_BLOCK_INNER_SHARE ++ }, { ++ .virt = 0xfe000000UL, ++ .phys = 0xfe000000UL, ++ .size = 0x01800000UL, ++ .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | ++ PTE_BLOCK_NON_SHARE | ++ PTE_BLOCK_PXN | PTE_BLOCK_UXN ++ }, { ++ /* List terminator */ ++ 0, ++ } ++}; ++#endif ++struct mm_region *mem_map = bcm283x_mem_map; + #endif + + int dram_init(void) +-- +2.22.0 + diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-fw-utils_2019.07.bbappend b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-fw-utils_2019.07.bbappend new file mode 100644 index 00000000..3daf157d --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-fw-utils_2019.07.bbappend @@ -0,0 +1,2 @@ +# Apply the same patches for rpi4 as u-boot recipe +require u-boot-rpi4-${PV}.inc diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-rpi4-2019.07.inc b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-rpi4-2019.07.inc new file mode 100644 index 00000000..2ce55a2b --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot-rpi4-2019.07.inc @@ -0,0 +1,12 @@ +FILESEXTRAPATHS_prepend_raspberrypi4 := "${THISDIR}/u-boot-2019.07:" +UBOOT_RPI4_SUPPORT_PATCHES = " \ + file://0001-configs-rpi4-Add-defconfigs-for-rpi4-32-64.patch \ + file://0002-ARM-bcm283x-Add-BCM283x_BASE-define.patch \ + file://0003-arm-mach-bcm283x-Define-configs-for-RaspberryPi-4.patch \ + file://0004-rpi-Add-entry-for-Raspberry-Pi-4-model-B.patch \ + file://0005-arm-bcm283x-Include-definition-for-additional-emmc-c.patch \ + file://0006-mmc-bcm2835_sdhci-Add-support-for-bcm2711-device.patch \ + file://0007-rpi-Add-memory-map-for-bcm2838.patch \ +" + +SRC_URI_append_raspberrypi4 = "${UBOOT_RPI4_SUPPORT_PATCHES}" diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot_2019.07.bbappend b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot_2019.07.bbappend index 03e7dc84..6d89f5cb 100644 --- a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot_2019.07.bbappend +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-bsp/u-boot/u-boot_2019.07.bbappend @@ -1,10 +1,10 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +# Apply the same patches for rpi4 as u-boot recipe +require u-boot-rpi4-${PV}.inc -SRC_URI_raspberrypi4 = "git://github.com/balena-os/u-boot;branch=ag/rpi4" -SRCREV_raspberrypi4 = "62b6e39a53c56a9085aeab1b47b5cc6020fcdb6f" -SRC_URI_raspberrypi4-64 = "git://github.com/balena-os/u-boot;branch=ag/rpi4" -SRCREV_raspberrypi4-64 = "62b6e39a53c56a9085aeab1b47b5cc6020fcdb6f" +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" # Update the patch for u-boot 2019.07 SRC_URI_remove_sota = "file://0001-board-raspberrypi-add-serial-and-revision-to-the-dev.patch" SRC_URI_append_sota = "file://0001-board-raspberrypi-add-serial-and-revision-to-the-dev-2019.07.patch" + +DEPENDS_append_rpi = " rpi-u-boot-scr" diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston-ini-conf.bbappend b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston-ini-conf.bbappend index d652d6be..dd01c4e5 100644 --- a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston-ini-conf.bbappend +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston-ini-conf.bbappend @@ -4,4 +4,4 @@ SRC_URI += "file://dsi.cfg" # Reduce the screen resolution to HD Ready (720p) SRC_URI_remove = "file://hdmi-a-1-270.cfg" -SRC_URI_append = "file://hdmi-a-1-270-720p.cfg" +SRC_URI_append = " file://hdmi-a-1-270-720p.cfg" diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb index 818b5e78..c82e6fd2 100644 --- a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/create-combined-dtb/create-combined-dtb_1.0.0.bb @@ -15,27 +15,43 @@ S = "${WORKDIR}" do_compile[depends] += "virtual/kernel:do_deploy" do_compile () { - # Official touchscreen setup (rpi3b/rpi3b dtb, vc4-kms-v3d and ft5406) + # 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}/vc4-kms-v3d.dtbo - 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}/vc4-kms-v3d.dtbo + fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b-plus.dtb -o bcm2710-rpi-3-b-plus+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE}/rpi-ft5406.dtbo ${DEPLOY_DIR_IMAGE}/${VC4DTBO}.dtbo + fi + if [ -f "${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b.dtb" ]; then + fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b.dtb -o bcm2710-rpi-3-b+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE}/rpi-ft5406.dtbo ${DEPLOY_DIR_IMAGE}/${VC4DTBO}.dtbo + fi + if [ -f "${DEPLOY_DIR_IMAGE}/bcm2711-rpi-4-b.dtb" ]; then + fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2711-rpi-4-b.dtb -o bcm2711-rpi-4-b+vc4+ft5406.dtb ${DEPLOY_DIR_IMAGE}/rpi-ft5406.dtbo ${DEPLOY_DIR_IMAGE}/${VC4DTBO}.dtbo fi - # HDMI screen setup (rpi3b/rpi3b dtb and vc4-kms-v3d) + # 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}/vc4-kms-v3d.dtbo - fdtoverlay -v -i ${DEPLOY_DIR_IMAGE}/bcm2710-rpi-3-b.dtb -o bcm2710-rpi-3-b+vc4.dtb ${DEPLOY_DIR_IMAGE}/vc4-kms-v3d.dtbo + 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 () { install -d ${DEPLOY_DIR_IMAGE} + 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 diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.bb b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.bb index e58559b8..c1df2274 100644 --- a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.bb +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.bb @@ -1,9 +1,9 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/linux-raspberrypi:" -LINUX_VERSION ?= "4.19.58" +LINUX_VERSION ?= "4.19.80" LINUX_RPI_BRANCH ?= "rpi-4.19.y" -SRCREV = "8222f38b1ceadd0642d49812fd34a3a6cb00e264" +SRCREV = "3492a1b003494535eb1b17aa7f258469036b1de7" SRC_URI = " \ git://github.com/raspberrypi/linux.git;protocol=git;branch=${LINUX_RPI_BRANCH} \ " diff --git a/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.bbappend b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.bbappend new file mode 100644 index 00000000..35a09b02 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.bbappend @@ -0,0 +1,2 @@ +ENABLE_UART_raspberrypi4 = "1" + diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/alsa-state/alsa-state.bbappend b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/alsa-state/alsa-state.bbappend index 72d991c7..642a71e4 100644 --- a/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/alsa-state/alsa-state.bbappend +++ b/meta-agl/meta-agl-bsp/meta-rcar-gen3/recipes-bsp/alsa-state/alsa-state.bbappend @@ -1 +1,9 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +COMPATIBLE_MACHINE = "(m3ulcb|h3ulcb|ebisu)" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +do_configure_append_ebisu () { + sed -i 's/state.ak4613\ {/state.rcarsound\ {/g' ${WORKDIR}/asound.state +} diff --git a/meta-agl/meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh b/meta-agl/meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh index 0dea86bd..2fc3d9f1 100644 --- a/meta-agl/meta-agl-bsp/meta-rcar-gen3/scripts/setup_mm_packages.sh +++ b/meta-agl/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-weston5-20190802.zip" -ZIP_2="R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-weston5-20190802.zip" +ZIP_2="R-Car_Gen3_Series_Evaluation_Software_Package_of_Linux_Drivers-weston5-20191021.zip" COPY_SCRIPT="$METADIR/bsp/meta-renesas-rcar-gen3/meta-rcar-gen3/docs/sample/copyscript/copy_evaproprietary_softwares.sh" @@ -39,8 +39,17 @@ function log() { } function copy_mm_packages() { - # first clean up workdir - [[ -d $EXTRACT_DIR ]] && rm -r $EXTRACT_DIR + # first clean up workdir on need + if [ -d $EXTRACT_DIR ]; then + if [ -f $EXTRACT_DIR/$ZIP_1 -a -f $EXTRACT_DIR/$ZIP_2 ]; then + log "The graphics and multimedia acceleration packages for R-Car Gen3 look already installed." + log "To force their reinstallation, please, remove manually the directory:" + log " $EXTRACT_DIR" + log + return 0 + fi + rm -r $EXTRACT_DIR + fi if [ -f $DOWNLOAD_DIR/$ZIP_1 -a -f $DOWNLOAD_DIR/$ZIP_2 ]; then mkdir -p $EXTRACT_DIR diff --git a/meta-agl/meta-agl-bsp/meta-ti/recipes-arago/weston/weston_%.bbappend b/meta-agl/meta-agl-bsp/meta-ti/recipes-arago/weston/weston_%.bbappend index 5d27bb8e..718d6f86 100644 --- a/meta-agl/meta-agl-bsp/meta-ti/recipes-arago/weston/weston_%.bbappend +++ b/meta-agl/meta-agl-bsp/meta-ti/recipes-arago/weston/weston_%.bbappend @@ -1,6 +1,6 @@ # When configured for fbdev compositor, make it the default PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor WESTON_NATIVE_BACKEND="fbdev-backend.so",--disable-fbdev-compositor,udev mtdev" -PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev libgbm mtdev" +PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/libgbm mtdev" PR_append = ".agl_arago_23" diff --git a/meta-agl/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/meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km/0001-Add-support-for-AGL-toolchain.patch new file mode 100644 index 00000000..93aff157 --- /dev/null +++ b/meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km/0001-Add-support-for-AGL-toolchain.patch @@ -0,0 +1,30 @@ +From 11131a5e778d19c06eefbcf61447c6efbcee0613 Mon Sep 17 00:00:00 2001 +From: Paul Barker +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 +--- + 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/meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km/add-AGL-toolchain-config.patch b/meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km/add-AGL-toolchain-config.patch deleted file mode 100644 index 9fdd95b4..00000000 --- a/meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km/add-AGL-toolchain-config.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/eurasia_km/eurasiacon/build/linux2/config/compilers/arm-agl-linux-gnueabi.mk b/eurasia_km/eurasiacon/build/linux2/config/compilers/arm-agl-linux-gnueabi.mk -new file mode 100644 -index 0000000..2abaa9f ---- /dev/null -+++ b/eurasia_km/eurasiacon/build/linux2/config/compilers/arm-agl-linux-gnueabi.mk -@@ -0,0 +1,6 @@ -+# 32-bit ARM hard float compiler -+ifeq ($(MULTIARCH),1) -+ TARGET_SECONDARY_ARCH := target_armhf -+else -+ TARGET_PRIMARY_ARCH := target_armhf -+endif diff --git a/meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km_%.bbappend b/meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km_%.bbappend index 182f6cac..6390e660 100644 --- a/meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km_%.bbappend +++ b/meta-agl/meta-agl-bsp/meta-ti/recipes-bsp/ti-sgx-ddk-km/ti-sgx-ddk-km_%.bbappend @@ -1,4 +1,3 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -SRC_URI += "file://add-AGL-toolchain-config.patch" -SRCREV = "16961a3f4524b653fba99d949d6972c77c7d2701" +SRC_URI += "file://0001-Add-support-for-AGL-toolchain.patch" diff --git a/meta-agl/meta-agl-bsp/meta-ti/recipes-graphics/gbm/libgbm_%.bbappend b/meta-agl/meta-agl-bsp/meta-ti/recipes-graphics/gbm/libgbm_%.bbappend deleted file mode 100644 index 7a16fbfe..00000000 --- a/meta-agl/meta-agl-bsp/meta-ti/recipes-graphics/gbm/libgbm_%.bbappend +++ /dev/null @@ -1,2 +0,0 @@ -# Hotfix for rpm metadata clash with ti-sgx-ddk-um-dev -DIRFILES = "1" diff --git a/meta-agl/meta-agl-bsp/meta-ti/recipes-graphics/libgles/ti-sgx-ddk-um_%.bbappend b/meta-agl/meta-agl-bsp/meta-ti/recipes-graphics/libgles/ti-sgx-ddk-um_%.bbappend index fe93f1a6..21142df5 100644 --- a/meta-agl/meta-agl-bsp/meta-ti/recipes-graphics/libgles/ti-sgx-ddk-um_%.bbappend +++ b/meta-agl/meta-agl-bsp/meta-ti/recipes-graphics/libgles/ti-sgx-ddk-um_%.bbappend @@ -16,7 +16,3 @@ do_install_append() { install -d ${D}/etc/ti-sgx install -m 0755 ${D}/etc/init.d/rc.pvr ${D}/etc/ti-sgx } - - -# Fix for rpm metadata clash with libgbm-dev -DIRFILES = "1" diff --git a/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/virtualoutput.cfg b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/virtualoutput.cfg index 51985127..f69a2e09 100644 --- a/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/virtualoutput.cfg +++ b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/virtualoutput.cfg @@ -1,5 +1,5 @@ [remote-output] name=remote-1 -mode=384x368@30 +mode=640x720@30 host=192.168.20.99 port=5005 diff --git a/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston_6.0.0.bb b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston_6.0.0.bb index f1e67e31..ca554388 100644 --- a/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston_6.0.0.bb +++ b/meta-agl/meta-agl-bsp/recipes-graphics/wayland/weston_6.0.0.bb @@ -40,9 +40,9 @@ PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev # Compositor choices # # Weston on KMS -PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/mesa virtual/libgbm mtdev" +PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev" # Weston on Wayland (nested Weston) -PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/mesa" +PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/egl virtual/libgles2" # Weston on X11 PACKAGECONFIG[x11] = "--enable-x11-compositor,--disable-x11-compositor,virtual/libx11 libxcb libxcb libxcursor cairo" # Headless Weston diff --git a/meta-agl/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/meta-agl-bsp/recipes-kernel/linux/linux-4.14/net-sch_generic-add-if_afp.h-header-to-get-ARPHRD_CA.patch new file mode 100644 index 00000000..7c34fb30 --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-4.14/net-sch_generic-add-if_afp.h-header-to-get-ARPHRD_CA.patch @@ -0,0 +1,25 @@ +From 17d0075d95b5087d5df553444cca390fa479bad9 Mon Sep 17 00:00:00 2001 +From: Matt Ranostay +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 +--- + 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 + #include + #include ++#include + #include + #include + #include +-- +2.25.0 + diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-agl-4.14.inc b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-agl-4.14.inc index 87249bdc..8521b1d6 100644 --- a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-agl-4.14.inc +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-agl-4.14.inc @@ -8,3 +8,6 @@ SRC_URI_append_with-lsm-smack = "\ 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 \ + " diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-agl.inc b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-agl.inc index e8be23c7..7e801e0a 100644 --- a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-agl.inc +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux-agl.inc @@ -2,6 +2,12 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/linux:" DEPENDS += "kern-tools-native" +# canbus qdisc pfifo change +SRC_URI_append = " file://net-sch_generic-Use-pfifo_fast-as-fallback-scheduler.patch" + +# bbe target has this upstream patch already +SRC_URI_remove_bbe = " file://net-sch_generic-Use-pfifo_fast-as-fallback-scheduler.patch" + # returns all the elements from the src uri that are .cfg files def find_cfgs(d): sources=src_patches(d, True) @@ -92,3 +98,6 @@ KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/iiodevice.cfg" 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" diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/ath9k_htc.cfg b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/ath9k_htc.cfg index 6f7d4988..ff12e6da 100644 --- a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/ath9k_htc.cfg +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/ath9k_htc.cfg @@ -1,4 +1,4 @@ CONFIG_CFG80211=m CONFIG_MAC80211=m -CONFIG_ATH_CARDS=m +CONFIG_WLAN_VENDOR_ATH=m CONFIG_ATH9K_HTC=m diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/iiodevice.cfg b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/iiodevice.cfg index 8633f29a..c5b8ff35 100644 --- a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/iiodevice.cfg +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/iiodevice.cfg @@ -22,4 +22,5 @@ CONFIG_IIO_SIMPLE_DUMMY_BUFFER=y # # Triggers - standalone # -CONFIG_IIO_HRTIMER_TRIGGER=m \ No newline at end of file +CONFIG_IIO_HRTIMER_TRIGGER=m +CONFIG_IIO_TRIGGERED_BUFFER=m diff --git a/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/net-sch_generic-Use-pfifo_fast-as-fallback-scheduler.patch b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/net-sch_generic-Use-pfifo_fast-as-fallback-scheduler.patch new file mode 100644 index 00000000..37ace5a5 --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/net-sch_generic-Use-pfifo_fast-as-fallback-scheduler.patch @@ -0,0 +1,75 @@ +From 546b85bb0aadb5a928b49b53dc02911996169c0b Mon Sep 17 00:00:00 2001 +From: Vincent Prince +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 +Signed-off-by: Marc Kleine-Budde +Signed-off-by: Vincent Prince +Acked-by: Dave Taht +Signed-off-by: David S. Miller +--- + 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/meta-agl-bsp/recipes-kernel/linux/linux/netfilter.cfg b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/netfilter.cfg new file mode 100644 index 00000000..34be704c --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-kernel/linux/linux/netfilter.cfg @@ -0,0 +1 @@ +CONFIG_NETFILTER_XT_MATCH_OWNER=m diff --git a/meta-agl/meta-agl-bsp/recipes-support/vboxguestdrivers/vboxguestdrivers_%.bbappend b/meta-agl/meta-agl-bsp/recipes-support/vboxguestdrivers/vboxguestdrivers_%.bbappend new file mode 100644 index 00000000..c87b36c1 --- /dev/null +++ b/meta-agl/meta-agl-bsp/recipes-support/vboxguestdrivers/vboxguestdrivers_%.bbappend @@ -0,0 +1 @@ +COMPATIBLE_MACHINE = "(qemux86|qemux86-64|intel-corei7-64)" diff --git a/meta-agl/meta-agl-bsp/wic/systemd-intel-corei7-64-bootdisk.wks b/meta-agl/meta-agl-bsp/wic/systemd-intel-corei7-64-bootdisk.wks index 56393728..db46c183 100644 --- a/meta-agl/meta-agl-bsp/wic/systemd-intel-corei7-64-bootdisk.wks +++ b/meta-agl/meta-agl-bsp/wic/systemd-intel-corei7-64-bootdisk.wks @@ -3,7 +3,7 @@ # can directly dd to boot media. The selected bootloader is systemd-boot # and we do not have swap -part /boot --source bootimg-efi --sourceparams="loader=systemd-boot,initrd=microcode.cpio" --use-uuid --label msdos --active --align 1024 +part /boot --source bootimg-efi --sourceparams="loader=systemd-boot" --use-uuid --label msdos --active --align 1024 part / --source rootfs --fstype=ext4 --label platform --align 1024 --use-uuid -- cgit 1.2.3-korg