Squashed 'import-layers/meta-raspberrypi/'.

cce6292 linux-raspberrypi_4.9.bb: Upgrade to 4.9.10
c34a6b0 linux-raspberrypi_4.4: Update to 4.4.48
7398030 Revert "u-boot: drop patch to include lowlevel_init"
69c5675 README: Mention CM1 and CM3 support
56b0c59 rpi-base.inc: Include dtb file for CM1 and CM3
a735477 raspberrypi*.conf: Minor tweaks
9923618 raspberrypi-cm3.conf: Add dummy machine for CM3 (alias for RPi2)
d5aa048 raspberrypi-cm.conf: Add dummy machine for CM1 (alias for RPi1)
5b5c4d9 linux-raspberrypi_4.9: Update to 4.9.4
f81f022 linux-raspberrypi_4.4: Update to 4.4.43
263e6bd linux-raspberrypi: Drop v4.8
121e200 linux-raspberrypi: Drop v4.7
cb7068a linux-raspberrypi: Upgrade to v4.4.39
38bc324 linux-raspberrypi: Drop v4.1
e1f69da linux-raspberrypi_4.9.bb: Add recipe for 4.9 release
02c0d41 linux-raspberrypi_4.8.bb: Upgrade to 4.8.16
031e2695 u-boot: drop patch to include lowlevel_init
c405581 rpi-base.inc: remove input modules form XSERVER
d77f3d4 rpi-base.inc: add xserver-xorg-extension-glx to XSERVER for vc4 enabled
672e025 linux-raspberrypi-4.8: Upgrade to 4.8.15
1bf09a4 userland: Fix building on aarch64
22fb2b4 linux-raspberrypi-4.8: Upgrade to 4.8.13
90c45b4 userland: Update to latest
96b9c63 linux-raspberrypi-base.bbclass: remove version hack
17f0c23 linux-rpi.inc: Do not rely on DISTRO_TYPE to enable/disable kernel debug
064aa0a u-boot: Simplify boot script
0e66d69 linux-raspberrypi_4.8.bb: upgrade to 4.8.12
18cf04d firmware: Update to 20161125
1f64604 linux-raspberrypi_4.4.bb: upgrade to 4.4.35
44d41bf raspberrypi3.conf: fix typo for BCM43430
6bd1bfe linux-raspberrypi: remove not needed bundle_initramfs_append()
b030814 u-boot: Fix appending to RDEPENDS
9c12ac8 linux-raspberrypi_4.8.bb: Upgrade to 4.8.6
380740d linux-firmware_git.bbappend: Delete
a5f95f4 userland: Bump to latest and add ASNEEDED = ""
716b6a9 firmware: Use release tarballs
6c755af weston: Unify bbappends for weston into single file
b9e6f04 userland: Update to latest master tip
00300d9 firmware: Update to 20161030
3e6e890 linux-raspberrypi-4.4: Update to 4.4.28
12aa27d gstreamer1.0-plugins-bad_%.bbappend: Set PACKAGECONFIG_GL for RPi
ab39653 rpi-base.inc: Include pi3-disable-bt-overlay.dtb
17a6933 linux-raspberrypi: Update to 4.8.4
ddc9390 linux-firmware: Fix "No generic license file exists" warning
d51a8a7 linux-raspberrypi_4.8.bb: Update to 4.8.2
e991148 firmware: Update to latest
ed54bd3 linux-firmware: Correct the LICENSE for brcm43430-license
3360f98 sdcard_image-rpi.bbclass: Include boot script when using u-boot
1d629b1 u-boot: Add RDEPENDS on rpi-u-boot-scr
56047ad rpi-u-boot-scr: Add recipe to create u-boot boot script
1f24992 rpi-base.inc: Don't install kernel image into rootfs
c62e088 eglinfo-x11: align to VC4
1ebb370 vc4: why no framebuffer device?
8d17669 xorg align for vc4
3b9aebd mesa: align for vc4
de016ce bluez5: correctly append brcm43438 service
b6c954d Fix DISPMANX_OFFLINE variable typo
d778d0a README: Replace references to Redmine with Github Issues
1e3983f linux-raspberrypi_4.7.bb: Update to 4.7.7
ecd8875 linux-raspberrypi: Add recipe for 4.8 release
05be947 firmware: Upgrade to latest
585838e userland: Upgrade to latest
41689e8 sdcard_image-rpi.bbclass: Remove redundant RPI_KERNEL_VERSION
5697e77 linux-raspberrypi_4.4: Upgrade to 4.4.23
4817e2c sdcard_image-rpi.bbclass: avoid corrupted images with latest oe-core
ac6f357 weston: Fix typo with override
760ddd0 Switch to using 4.4 as default kernel
ed84c2c vc4graphics: Support X11 with the VC4 driver.
55388a5 firmware, userland: Bump to latest
b24afdc linux-raspberrypi_3.18: Remove
e993bdc linux-raspberrypi: Add recipe for 4.7 release
c2f7643 linux-raspberrypi_4.4: upgrade to 4.4.16
d511c7c linux-raspberrypi-4.4: add patch to enable proper operation of renderD128 device
ef22ff4 linux-rpi.inc: add the configuration options required to support vc4graphics
6b4de2b mesa_%.bbappend: new file to add the correct configuration options to support vc4graphics
bee7643 weston/weston_%.bbappend: modify configuration options to support vc4graphics
72b9635 wayland/weston_%.bbappend: modify configuration options to support vc4graphics
ba9c466 rpi-config_git.bb: add v4c overlay to config.txt to support vc4graphics
5d2722c raspberrypi3.conf: set the default value of VC4_CMA_SIZE to support vc4graphics
824b78c raspberrypi2.conf: set the default value of VC4_CMA_SIZE to support vc4graphics
dfce95f raspberrypi0.conf: set the default value of VC4_CMA_SIZE to support vc4graphics
224b9e9 raspberrypi.conf: set the default value of VC4_CMA_SIZE to support vc4graphics
0035bc8 rpi-base.inc: add vc4-kms-v3d to the overlays to support vc4graphics
6e535dd rpi-default-providers.inc: change default providers to support vc4graphics
1a32817 sdcard_image-rpi.bbclass: support for .dtbo files for dtb overlays
d98f2a7 linux-raspberrypi-base.bbclass: support for .dtbo files for dtb overlays
09b76a4 rpi-base.inc: support for .dtbo files for dtb overlays
18a2fb6 linux-raspberrypi_4.4.bb: support for .dtbo files for dtb overlays
a5f9b07 bcm2835: Compile examples correct LDFLAGS to avoid HASH errors
8c5eba1 bcm2835: Update to 1.50
5229f75 wiringPi: Fix compilation of libraries
5771c7f wiringpi: Fix prepend space
1b2c25e wiringpi: Update to 2.32
4c02c7c sdcard_image-rpi.bbclass: remove redundant IMAGEDATESTAMP
cc64d63 userland: Add bash to RDEPENDS

Change-Id: Ic9e50299fcba012068cea0c0a971c48c6da4138f
git-subtree-dir: import-layers/meta-raspberrypi
git-subtree-split: cce6292e41493158c26f5b1b7fded97faacf10d7
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/import-layers/meta-raspberrypi/conf/machine/include/rpi-base.inc b/import-layers/meta-raspberrypi/conf/machine/include/rpi-base.inc
index 56ca83e..e069e70 100644
--- a/import-layers/meta-raspberrypi/conf/machine/include/rpi-base.inc
+++ b/import-layers/meta-raspberrypi/conf/machine/include/rpi-base.inc
@@ -9,34 +9,35 @@
 
 XSERVER = " \
     xserver-xorg \
-    xf86-input-evdev \
-    xf86-input-mouse \
-    xf86-input-keyboard \
-    xf86-video-fbdev \
+    ${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "xserver-xorg-extension-glx", "", d)} \
+    ${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "xf86-video-modesetting", "xf86-video-fbdev", d)} \
     "
 
-# Really supported starting from linux-raspberrypi 3.18.y only
 KERNEL_DEVICETREE ?= " \
     bcm2708-rpi-b.dtb \
     bcm2708-rpi-b-plus.dtb \
     bcm2709-rpi-2-b.dtb \
     bcm2710-rpi-3-b.dtb \
+    bcm2708-rpi-cm.dtb \
+    bcm2710-rpi-cm3.dtb \
     \
-    overlays/hifiberry-amp-overlay.dtb \
-    overlays/hifiberry-dac-overlay.dtb \
-    overlays/hifiberry-dacplus-overlay.dtb \
-    overlays/hifiberry-digi-overlay.dtb \
-    overlays/i2c-rtc-overlay.dtb \
-    overlays/iqaudio-dac-overlay.dtb \
-    overlays/iqaudio-dacplus-overlay.dtb \
-    overlays/lirc-rpi-overlay.dtb \
-    overlays/pitft22-overlay.dtb \
-    overlays/pitft28-resistive-overlay.dtb \
-    overlays/pps-gpio-overlay.dtb \
-    overlays/rpi-ft5406-overlay.dtb \
-    overlays/w1-gpio-overlay.dtb \
-    overlays/w1-gpio-pullup-overlay.dtb \
-    overlays/pi3-miniuart-bt-overlay.dtb \
+    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/lirc-rpi.dtbo \
+    overlays/pitft22.dtbo \
+    overlays/pitft28-resistive.dtbo \
+    overlays/pps-gpio.dtbo \
+    overlays/rpi-ft5406.dtbo \
+    overlays/w1-gpio.dtbo \
+    overlays/w1-gpio-pullup.dtbo \
+    overlays/pi3-disable-bt.dtbo \
+    overlays/pi3-miniuart-bt.dtbo \
+    overlays/vc4-kms-v3d.dtbo \
     "
 KERNEL_IMAGETYPE ?= "Image"
 
@@ -51,3 +52,7 @@
 SPLASH = "psplash-raspberrypi"
 
 IMAGE_BOOT_FILES ?= "bcm2835-bootfiles/* ${KERNEL_IMAGETYPE};${SDIMG_KERNELIMAGE}"
+
+# The kernel image is installed into the FAT32 boot partition and does not need
+# to also be installed into the rootfs.
+RDEPENDS_kernel-base = ""
diff --git a/import-layers/meta-raspberrypi/conf/machine/include/rpi-default-providers.inc b/import-layers/meta-raspberrypi/conf/machine/include/rpi-default-providers.inc
index 359870d..078e9d6 100644
--- a/import-layers/meta-raspberrypi/conf/machine/include/rpi-default-providers.inc
+++ b/import-layers/meta-raspberrypi/conf/machine/include/rpi-default-providers.inc
@@ -2,8 +2,8 @@
 
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-raspberrypi"
 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/import-layers/meta-raspberrypi/conf/machine/include/rpi-default-versions.inc b/import-layers/meta-raspberrypi/conf/machine/include/rpi-default-versions.inc
index c879dde..e65a4ae 100644
--- a/import-layers/meta-raspberrypi/conf/machine/include/rpi-default-versions.inc
+++ b/import-layers/meta-raspberrypi/conf/machine/include/rpi-default-versions.inc
@@ -1,3 +1,3 @@
 # RaspberryPi BSP default versions
 
-PREFERRED_VERSION_linux-raspberrypi ?= "4.1.%"
+PREFERRED_VERSION_linux-raspberrypi ?= "4.4.%"
diff --git a/import-layers/meta-raspberrypi/conf/machine/raspberrypi-cm.conf b/import-layers/meta-raspberrypi/conf/machine/raspberrypi-cm.conf
new file mode 100644
index 0000000..2da7d50
--- /dev/null
+++ b/import-layers/meta-raspberrypi/conf/machine/raspberrypi-cm.conf
@@ -0,0 +1,6 @@
+#@TYPE: Machine
+#@NAME: RaspberryPi Compute Module (CM1)
+#@DESCRIPTION: Machine configuration for the RaspberryPi Compute Module (CM1)
+
+MACHINEOVERRIDES = "raspberrypi:${MACHINE}"
+include conf/machine/raspberrypi.conf
diff --git a/import-layers/meta-raspberrypi/conf/machine/raspberrypi-cm3.conf b/import-layers/meta-raspberrypi/conf/machine/raspberrypi-cm3.conf
new file mode 100644
index 0000000..153d5d5
--- /dev/null
+++ b/import-layers/meta-raspberrypi/conf/machine/raspberrypi-cm3.conf
@@ -0,0 +1,6 @@
+#@TYPE: Machine
+#@NAME: RaspberryPi Compute Module 3 (CM3)
+#@DESCRIPTION: Machine configuration for the RaspberryPi Compute Module 3 (CM3)
+
+MACHINEOVERRIDES = "raspberrypi2:${MACHINE}"
+include conf/machine/raspberrypi2.conf
diff --git a/import-layers/meta-raspberrypi/conf/machine/raspberrypi.conf b/import-layers/meta-raspberrypi/conf/machine/raspberrypi.conf
index 72beeb8..ad3b061 100644
--- a/import-layers/meta-raspberrypi/conf/machine/raspberrypi.conf
+++ b/import-layers/meta-raspberrypi/conf/machine/raspberrypi.conf
@@ -10,3 +10,4 @@
 SERIAL_CONSOLE = "115200 ttyAMA0"
 
 UBOOT_MACHINE = "rpi_config"
+VC4_CMA_SIZE_raspberrypi ?= "cma-64"
diff --git a/import-layers/meta-raspberrypi/conf/machine/raspberrypi0.conf b/import-layers/meta-raspberrypi/conf/machine/raspberrypi0.conf
index ccf9ae7..7c2b811 100644
--- a/import-layers/meta-raspberrypi/conf/machine/raspberrypi0.conf
+++ b/import-layers/meta-raspberrypi/conf/machine/raspberrypi0.conf
@@ -6,3 +6,4 @@
 include conf/machine/raspberrypi.conf
 
 SERIAL_CONSOLE = "115200 ttyAMA0"
+VC4_CMA_SIZE ?= "cma-128"
diff --git a/import-layers/meta-raspberrypi/conf/machine/raspberrypi2.conf b/import-layers/meta-raspberrypi/conf/machine/raspberrypi2.conf
index d50ef70..9b4c02a 100644
--- a/import-layers/meta-raspberrypi/conf/machine/raspberrypi2.conf
+++ b/import-layers/meta-raspberrypi/conf/machine/raspberrypi2.conf
@@ -10,3 +10,4 @@
 SERIAL_CONSOLE = "115200 ttyAMA0"
 
 UBOOT_MACHINE = "rpi_2_config"
+VC4_CMA_SIZE ?= "cma-256"
diff --git a/import-layers/meta-raspberrypi/conf/machine/raspberrypi3.conf b/import-layers/meta-raspberrypi/conf/machine/raspberrypi3.conf
index cb6056e..1ac5928 100644
--- a/import-layers/meta-raspberrypi/conf/machine/raspberrypi3.conf
+++ b/import-layers/meta-raspberrypi/conf/machine/raspberrypi3.conf
@@ -3,9 +3,9 @@
 #@DESCRIPTION: Machine configuration for the RaspberryPi 3
 
 MACHINEOVERRIDES = "raspberrypi2:${MACHINE}"
-
-MACHINE_EXTRA_RRECOMMENDS += "linux-firmware-brcm43430"
-
 include conf/machine/raspberrypi2.conf
 
+MACHINE_EXTRA_RRECOMMENDS += "linux-firmware-bcm43430"
+
 SERIAL_CONSOLE = "115200 ttyS0"
+VC4_CMA_SIZE ?= "cma-256"