[yocto] [meta-raspberrypi][PATCH 8/8] Add support for Raspberry PI 2

Andrei Gherzan andrei at gherzan.ro
Sun Feb 8 03:57:00 PST 2015


Add machine configuration file.
Change the kernel image name on SD card.
Use the defconfig for this machine (bcm2709_defconfig).

Change-Id: I6549d5f49b1ed32ef4d44aca6f7af4234618c1a8
Signed-off-by: Andrei Gherzan <andrei at gherzan.ro>
---
 classes/sdcard_image-rpi.bbclass           |  1 +
 conf/machine/raspberrypi2.conf             | 13 +++++++++++++
 recipes-kernel/linux/linux-raspberrypi.inc |  1 +
 3 files changed, 15 insertions(+)
 create mode 100644 conf/machine/raspberrypi2.conf

diff --git a/classes/sdcard_image-rpi.bbclass b/classes/sdcard_image-rpi.bbclass
index 86cf773..1ff664d 100644
--- a/classes/sdcard_image-rpi.bbclass
+++ b/classes/sdcard_image-rpi.bbclass
@@ -33,6 +33,7 @@ KERNEL_INITRAMFS ?= ""
 
 # Kernel image name
 SDIMG_KERNELIMAGE_raspberrypi  ?= "kernel.img"
+SDIMG_KERNELIMAGE_raspberrypi2 ?= "kernel7.img"
 
 # Boot partition volume id
 BOOTDD_VOLUME_ID ?= "${MACHINE}"
diff --git a/conf/machine/raspberrypi2.conf b/conf/machine/raspberrypi2.conf
new file mode 100644
index 0000000..778f5a6
--- /dev/null
+++ b/conf/machine/raspberrypi2.conf
@@ -0,0 +1,13 @@
+#@TYPE: Machine
+#@NAME: RaspberryPi 2 Development Board
+#@DESCRIPTION: Machine configuration for the RaspberryPi 2
+
+# userland is not compiling on RPI 2
+# https://github.com/raspberrypi/userland/issues/214
+PREFERRED_PROVIDER_virtual/egl ?= "vc-graphics-hardfp"
+PREFERRED_PROVIDER_virtual/libgles2 ?= "vc-graphics-hardfp"
+
+DEFAULTTUNE ?= "cortexa7thf-neon-vfpv4"
+
+require conf/machine/include/tune-cortexa7.inc
+include conf/machine/include/rpi-base.inc
diff --git a/recipes-kernel/linux/linux-raspberrypi.inc b/recipes-kernel/linux/linux-raspberrypi.inc
index b8afecc..fde68dd 100644
--- a/recipes-kernel/linux/linux-raspberrypi.inc
+++ b/recipes-kernel/linux/linux-raspberrypi.inc
@@ -15,6 +15,7 @@ PV_append = "+git${SRCREV}"
 
 # NOTE: For now we pull in the default config from the RPi kernel GIT tree.
 KERNEL_DEFCONFIG_raspberrypi ?= "bcmrpi_defconfig"
+KERNEL_DEFCONFIG_raspberrypi2 ?= "bcm2709_defconfig"
 
 # CMDLINE for raspberrypi
 CMDLINE = "dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
-- 
2.1.0




More information about the yocto mailing list