diff --git a/conf/machine/include/rpi-base.inc b/conf/machine/include/rpi-base.inc index 56ca83e..21bf9c0 100644 --- a/conf/machine/include/rpi-base.inc +++ b/conf/machine/include/rpi-base.inc @@ -37,7 +37,9 @@ KERNEL_DEVICETREE ?= " \ overlays/w1-gpio-overlay.dtb \ overlays/w1-gpio-pullup-overlay.dtb \ overlays/pi3-miniuart-bt-overlay.dtb \ + overlays/vc4-kms-v3d-overlay.dtb \ " +# TODO line with overlays/vc4-kms-v3d.dtbo : decide whether it is .dtb or .dtbo KERNEL_IMAGETYPE ?= "Image" MACHINE_FEATURES += "apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio" diff --git a/conf/machine/include/rpi-default-providers.inc b/conf/machine/include/rpi-default-providers.inc index cabbd43..0bc8838 100644 --- a/conf/machine/include/rpi-default-providers.inc +++ b/conf/machine/include/rpi-default-providers.inc @@ -3,8 +3,8 @@ PREFERRED_PROVIDER_virtual/kernel ?= "linux-raspberrypi" PREFERRED_PROVIDER_u-boot ?= "u-boot-rpi" PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" -PREFERRED_PROVIDER_virtual/egl ?= "userland" -PREFERRED_PROVIDER_virtual/libgles2 ?= "userland" -PREFERRED_PROVIDER_virtual/libgl ?= "mesa-gl" -PREFERRED_PROVIDER_virtual/mesa ?= "mesa-gl" +PREFERRED_PROVIDER_virtual/egl ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "userland", d)}" +PREFERRED_PROVIDER_virtual/libgles2 ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "userland", d)}" +PREFERRED_PROVIDER_virtual/libgl ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "mesa-gl", d)}" +PREFERRED_PROVIDER_virtual/mesa ?= "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "mesa", "mesa-gl", d)}" PREFERRED_PROVIDER_jpeg ?= "jpeg" diff --git a/conf/machine/raspberrypi.conf b/conf/machine/raspberrypi.conf index 0f95f1a..b369c67 100644 --- a/conf/machine/raspberrypi.conf +++ b/conf/machine/raspberrypi.conf @@ -8,3 +8,5 @@ require conf/machine/include/tune-arm1176jzf-s.inc include conf/machine/include/rpi-base.inc SERIAL_CONSOLE = "115200 ttyAMA0" +VC4_CMA_SIZE_raspberrypi ?= "cma-64" + diff --git a/conf/machine/raspberrypi0.conf b/conf/machine/raspberrypi0.conf index ccf9ae7..0df9121 100644 --- a/conf/machine/raspberrypi0.conf +++ b/conf/machine/raspberrypi0.conf @@ -6,3 +6,5 @@ MACHINEOVERRIDES = "raspberrypi:${MACHINE}" include conf/machine/raspberrypi.conf SERIAL_CONSOLE = "115200 ttyAMA0" +VC4_CMA_SIZE ?= "cma-128" + diff --git a/conf/machine/raspberrypi2.conf b/conf/machine/raspberrypi2.conf index b6346e6..3a82d66 100644 --- a/conf/machine/raspberrypi2.conf +++ b/conf/machine/raspberrypi2.conf @@ -8,3 +8,5 @@ require conf/machine/include/tune-cortexa7.inc include conf/machine/include/rpi-base.inc SERIAL_CONSOLE = "115200 ttyAMA0" +VC4_CMA_SIZE ?= "cma-256" + diff --git a/conf/machine/raspberrypi3.conf b/conf/machine/raspberrypi3.conf index cb6056e..438c6e6 100644 --- a/conf/machine/raspberrypi3.conf +++ b/conf/machine/raspberrypi3.conf @@ -9,3 +9,5 @@ MACHINE_EXTRA_RRECOMMENDS += "linux-firmware-brcm43430" include conf/machine/raspberrypi2.conf SERIAL_CONSOLE = "115200 ttyS0" +VC4_CMA_SIZE ?= "cma-256" + diff --git a/recipes-bsp/bootfiles/rpi-config_git.bb b/recipes-bsp/bootfiles/rpi-config_git.bb index 4bc8eb7..f610718 100644 --- a/recipes-bsp/bootfiles/rpi-config_git.bb +++ b/recipes-bsp/bootfiles/rpi-config_git.bb @@ -13,12 +13,14 @@ SRC_URI = "git://github.com/Evilpaul/RPi-config.git;protocol=git;branch=master \ S = "${WORKDIR}/git" -PR = "r4" +PR = "r5" PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}" PITFT22="${@bb.utils.contains("MACHINE_FEATURES", "pitft22", "1", "0", d)}" PITFT28r="${@bb.utils.contains("MACHINE_FEATURES", "pitft28r", "1", "0", d)}" +VC4GRAPHICS="${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}" + inherit deploy do_deploy() { @@ -102,6 +104,12 @@ do_deploy() { echo "# Enable UART" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt echo "enable_uart=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt fi + + # VC4 Graphics support + if [ "${VC4GRAPHICS}" = "1" ]; then + echo "# Enable VC4 Graphics" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "dtoverlay=vc4-kms-v3d,${VC4_CMA_SIZE}" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + fi } addtask deploy before do_package after do_install diff --git a/recipes-bsp/common/firmware.inc b/recipes-bsp/common/firmware.inc index bf11e4c..b467fc6 100644 --- a/recipes-bsp/common/firmware.inc +++ b/recipes-bsp/common/firmware.inc @@ -1,5 +1,5 @@ -RPIFW_SRCREV ?= "3816e1ce1e6ebc6d2bf0596dbd52849e16aa7e94" -RPIFW_DATE ?= "20160512" +RPIFW_SRCREV ?= "c17fa41b8e8321d891230f97837fee98feebc1ac" +RPIFW_DATE ?= "20160513" RPIFW_SRC_URI ?= "git://github.com/raspberrypi/firmware.git;protocol=git;branch=master" RPIFW_S ?= "${WORKDIR}/git" diff --git a/recipes-graphics/mesa/mesa_%.bbappend b/recipes-graphics/mesa/mesa_%.bbappend new file mode 100644 index 0000000..b182388 --- /dev/null +++ b/recipes-graphics/mesa/mesa_%.bbappend @@ -0,0 +1,4 @@ +PACKAGECONFIG_append_rpi = " gallium" +GALLIUMDRIVERS_rpi = "vc4" +DRIDRIVERS_rpi = "" + diff --git a/recipes-graphics/wayland/weston_%.bbappend b/recipes-graphics/wayland/weston_%.bbappend index c3a7421..57b8079 100644 --- a/recipes-graphics/wayland/weston_%.bbappend +++ b/recipes-graphics/wayland/weston_%.bbappend @@ -1,4 +1,2 @@ -EXTRA_OECONF_append_rpi = "\ - --enable-rpi-compositor \ - WESTON_NATIVE_BACKEND=rpi-backend.so \ - " +EXTRA_OECONF_append_rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', ' --enable-rpi-compositor WESTON_NATIVE_BACKEND=rpi-backend.so', d)}" + diff --git a/recipes-graphics/weston/weston_%.bbappend b/recipes-graphics/weston/weston_%.bbappend index 3ec311d..70f4360 100644 --- a/recipes-graphics/weston/weston_%.bbappend +++ b/recipes-graphics/weston/weston_%.bbappend @@ -1,7 +1,8 @@ -EXTRA_OECONF += "--enable-rpi-compositor \ - --disable-resize-optimization \ - --disable-setuid-install \ - --disable-xwayland-test \ - --disable-simple-egl-clients \ - WESTON_NATIVE_BACKEND=rpi-backend.so \ +PACKAGECONFIG_rpi_remove = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', ' fbdev', '', d)}" +EXTRA_OECONF += "--disable-xwayland-test \ + --disable-simple-egl-clients \ " +EXTRA_OECONF += "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', '--enable-rpi-compositor', d)}" +EXTRA_OECONF += "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', '--disable-resize-optimization', d)}" +EXTRA_OECONF += "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', '--disable-setuid-install', d)}" +EXTRA_OECONF += "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', 'WESTON_NATIVE_BACKEND=rpi-backend.so', d)}" diff --git a/recipes-kernel/linux/linux-raspberrypi_4.4.bb b/recipes-kernel/linux/linux-raspberrypi_4.4.bb index ba47b22..b8d6028 100644 --- a/recipes-kernel/linux/linux-raspberrypi_4.4.bb +++ b/recipes-kernel/linux/linux-raspberrypi_4.4.bb @@ -1,8 +1,8 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" -LINUX_VERSION ?= "4.4.9" +LINUX_VERSION ?= "4.4.10" -SRCREV = "3b440738b5c1adc3ec3ee72ceca799d1b8d264df" +SRCREV = "c317a023583b17a4350f066924d5fff47a81f91e" SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-4.4.y \ " require linux-raspberrypi.inc diff --git a/recipes-kernel/linux/linux-rpi.inc b/recipes-kernel/linux/linux-rpi.inc index 1755685..c120dbd 100644 --- a/recipes-kernel/linux/linux-rpi.inc +++ b/recipes-kernel/linux/linux-rpi.inc @@ -111,6 +111,16 @@ do_configure_prepend() { # Activate CONFIG_LEGACY_PTYS kernel_configure_variable LEGACY_PTYS y + # Activate the configuration options for VC4 + VC4GRAPHICS="${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}" + if [ ${VC4GRAPHICS} = "1" ]; then + kernel_configure_variable I2C_BCM2835 y + kernel_configure_variable DRM y + kernel_configure_variable DRM_FBDEV_EMULATION n + kernel_configure_variable DRM_VC4 y + kernel_configure_variable FB_BCM2708 n + fi + # Keep this the last line # Remove all modified configs and add the rest to .config sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${B}/.config'