Skip to contentSkip to conversation

raspberrypi.conf: Split in specific and common conf. files

PATCH In review Andrei Gherzan 1 participant 9 messages Feb 8, 2015 – Feb 11, 2015 Broadcom BCM2711/BCM2835 Arm architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/8 raspberrypi.conf: Split in specific and common conf. files

*.conf files should hold board specific stuff while rpi-base.inc should include configuration that is common for all Raspberry Pi boards.

Remove MACHINE_KERNEL_PR as we don't use it anymore.

Minor tweaks.

Change-Id I5e1b12c1d224ac003d2890544beb036f1d5d8643
---
 conf/machine/include/rpi-base.inc | 46 +++++++++++++++++++++++++++++++++
 conf/machine/raspberrypi.conf     | 53 +--------------------------------------
 2 files changed, 47 insertions(+), 52 deletions(-)
 create mode 100644 conf/machine/include/rpi-base.inc
conf/machine/include/rpi-base.inc new file +46 -0
new file mode 100644
index 0000000..4be28a1
@@ -0,0 +1,46 @@
+include conf/machine/include/rpi-default-settings.inc
+include conf/machine/include/rpi-default-versions.inc
+include conf/machine/include/rpi-default-providers.inc
+
+IMAGE_FSTYPES ?= "tar.bz2 ext3 rpi-sdimg"
+
+SERIAL_CONSOLE ?= "115200 ttyAMA0"
+
+XSERVER = " \
+    xserver-xorg \
+    xf86-input-evdev \
+    xf86-input-mouse \
+    xf86-input-keyboard \
+    xf86-video-fbdev \
+    "
+
+# Really supported starting from linux-raspberrypi 3.18.y only
+#KERNEL_DEVICETREE ?= " \
+#    bcm2708-rpi-b.dtb \
+#    bcm2708-rpi-b-plus.dtb \
+#    ds1307-rtc-overlay.dtb \
+#    hifiberry-amp-overlay.dtb \
+#    hifiberry-dac-overlay.dtb \
+#    hifiberry-dacplus-overlay.dtb \
+#    hifiberry-digi-overlay.dtb \
+#    iqaudio-dac-overlay.dtb \
+#    iqaudio-dacplus-overlay.dtb \
+#    lirc-rpi-overlay.dtb \
+#    pcf8523-rtc-overlay.dtb \
+#    pps-gpio-overlay.dtb \
+#    w1-gpio-overlay.dtb \
+#    w1-gpio-pullup-overlay.dtb \
+#    "
+KERNEL_IMAGETYPE ?= "Image"
+
+MACHINE_FEATURES = "kernel26 apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio"
+
+# Raspberry Pi has no hardware clock
+MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc"
+
+MACHINE_EXTRA_RRECOMMENDS += " kernel-modules"
+
+# Set Raspberrypi splash image
+SPLASH = "psplash-raspberrypi"
+
+IMAGE_BOOT_FILES ?= "bcm2835-bootfiles/* ${KERNEL_IMAGETYPE};kernel.img"
conf/machine/raspberrypi.conf +1 -52

58 lines not on this page · raw message

Signature · 1 line
2.1.0
#1 lore raw

PATCH 2/8 xserver-xf86-config: Use SOC specific assignements

In this way the modifications will be used on all RPI boards.

Change-Id Ife10db876db85c1c4944028a0b49ccae4d8c0d41
---
 conf/machine/include/rpi-base.inc                                | 3 +++
 recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend   | 6 +++---
 recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend | 2 +-
 3 files changed, 7 insertions(+), 4 deletions(-)
conf/machine/include/rpi-base.inc +3 -0
index 4be28a1..65ec712 100644
@@ -2,6 +2,9 @@ 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"
 
 SERIAL_CONSOLE ?= "115200 ttyAMA0"
recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend +3 -3
index 4ca42d6..2cf40f8 100644
@@ -1,10 +1,10 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
-SRC_URI_append_raspberrypi = " file://xorg.conf.d/10-evdev.conf "
+SRC_URI_append_rpi = " file://xorg.conf.d/10-evdev.conf "
 
-do_install_append_raspberrypi () {
+do_install_append_rpi () {
 	install -d ${D}/${sysconfdir}/X11/xorg.conf.d/
 	install -m 0644 ${WORKDIR}/xorg.conf.d/* ${D}/${sysconfdir}/X11/xorg.conf.d/
 }
 
-FILES_${PN}_raspberrypi += "${sysconfdir}/X11/xorg.conf ${sysconfdir}/X11/xorg.conf.d/*"
+FILES_${PN}_rpi += "${sysconfdir}/X11/xorg.conf ${sysconfdir}/X11/xorg.conf.d/*"
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend +1 -1
index fba7e1a..39ded59 100644
@@ -1,3 +1,3 @@
-EXTRA_OECONF_append_raspberrypi = " CPPFLAGS='-I${STAGING_DIR_TARGET}/usr/include/interface/vcos/pthreads \
+EXTRA_OECONF_append_rpi = " CPPFLAGS='-I${STAGING_DIR_TARGET}/usr/include/interface/vcos/pthreads \
                                    -I${STAGING_DIR_TARGET}/usr/include/interface/vmcs_host/linux' \
                                     --with-egl-window-system=rpi"
Signature · 1 line
2.1.0
#2 lore raw

PATCH 3/8 rpi-default-versions.inc: Use kernel v3.18 by default

In reply to Andrei Gherzan
Change-Id If3ff46ae10b7bee2decead6dfa408833713d16f8
---
 conf/machine/include/rpi-default-versions.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
conf/machine/include/rpi-default-versions.inc +1 -1
index 1ca9701..bcf7828 100644
@@ -1,3 +1,3 @@
 # RaspberryPi BSP default versions
 
-PREFERRED_VERSION_linux-raspberrypi ?= "3.12.%"
+PREFERRED_VERSION_linux-raspberrypi ?= "3.18.%"
Signature · 1 line
2.1.0
#3 lore raw

PATCH 4/8 linux-raspberrypi.inc: Remove machine specific CMDLINE definition

In reply to Andrei Gherzan

This is already a raspberrypi specific recipe. So this is useless and would break other machines.

Change-Id Ie1d627384255660d7e213833fd4433f47c0edc1d
---
 recipes-kernel/linux/linux-raspberrypi.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-kernel/linux/linux-raspberrypi.inc +1 -1
index ff0c5ce..017b7d3 100644
@@ -17,7 +17,7 @@ PV_append = "+git${SRCREV}"
 KERNEL_DEFCONFIG = "bcmrpi_defconfig"
 
 # CMDLINE for raspberrypi
-CMDLINE_raspberrypi = "dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
+CMDLINE = "dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
 
 UDEV_GE_141 ?= "1"
 
Signature · 1 line
2.1.0
#4 lore raw

PATCH 5/8 firmware: Update to HEAD

In reply to Andrei Gherzan
Change-Id I682365b514f233616ac7eb07667edc4ca6afcdfa
---
 recipes-bcm/common/firmware.inc         | 4 ++--
 recipes-bcm/vc-graphics/vc-graphics.inc | 4 +++-
 2 files changed, 5 insertions(+), 3 deletions(-)
recipes-bcm/common/firmware.inc +2 -2
index 145ecce..ad3176a 100644
@@ -1,5 +1,5 @@
-RPIFW_SRCREV ?= "d426cd1e79f0785fae6c37db79da7d6dae39716d"
-RPIFW_DATE ?= "20150204"
+RPIFW_SRCREV ?= "e42a747e8d5c4a2fb3e837d0924c7cc39999936a"
+RPIFW_DATE ?= "20150206"
 RPIFW_SRC_URI ?= "git://github.com/raspberrypi/firmware.git;protocol=git;branch=master"
 RPIFW_S ?= "${WORKDIR}/git"
 
recipes-bcm/vc-graphics/vc-graphics.inc +3 -1
index e9575da..1dee53e 100644
@@ -49,6 +49,8 @@ INITSCRIPT_PARAMS = "start 03 S ."
 FILES_${PN} = "${bindir}/* \
                ${sbindir}/* \
                ${libdir}/lib*.so \
-               ${sysconfdir}/init.d"
+               ${sysconfdir}/init.d \
+               ${libdir}/plugins"
 FILES_${PN}-dev = "${libdir}/pkgconfig \
                    ${includedir}"
+FILES_${PN}-dbg += "${libdir}/plugins/.debug"
Signature · 1 line
2.1.0
#5 lore raw

PATCH 6/8 linux-raspberrypi.inc: Make KERNEL_DEFCONFIG machine specific

In reply to Andrei Gherzan
Change-Id I241a8adead67717f31d1b2e66a71bd5c3edfa9fd
---
 recipes-kernel/linux/linux-raspberrypi.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-kernel/linux/linux-raspberrypi.inc +1 -1
index 017b7d3..b8afecc 100644
@@ -14,7 +14,7 @@ COMPATIBLE_MACHINE = "raspberrypi"
 PV_append = "+git${SRCREV}"
 
 # NOTE: For now we pull in the default config from the RPi kernel GIT tree.
-KERNEL_DEFCONFIG = "bcmrpi_defconfig"
+KERNEL_DEFCONFIG_raspberrypi ?= "bcmrpi_defconfig"
 
 # CMDLINE for raspberrypi
 CMDLINE = "dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
Signature · 1 line
2.1.0
#6 lore raw

PATCH 7/8 Use variable for kernel image deployed name on SD card

In reply to Andrei Gherzan
Change-Id I4a55b53d337930aae3351629a902dbac832ac958
---
 classes/sdcard_image-rpi.bbclass  | 7 +++++--
 conf/machine/include/rpi-base.inc | 2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)
classes/sdcard_image-rpi.bbclass +5 -2
index 43f1346..86cf773 100644
@@ -31,6 +31,9 @@ IMAGE_BOOTLOADER ?= "bcm2835-bootfiles"
 # Set initramfs extension
 KERNEL_INITRAMFS ?= ""
 
+# Kernel image name
+SDIMG_KERNELIMAGE_raspberrypi  ?= "kernel.img"
+
 # Boot partition volume id
 BOOTDD_VOLUME_ID ?= "${MACHINE}"
 
@@ -104,7 +107,7 @@ IMAGE_CMD_rpi-sdimg () {
 	mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/
 	case "${KERNEL_IMAGETYPE}" in
 	"uImage")
-		mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.img ::kernel.img
+		mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.img ::${SDIMG_KERNELIMAGE}
 		mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::uImage
 		;;
 	*)
@@ -124,7 +127,7 @@ IMAGE_CMD_rpi-sdimg () {
 				mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB_BASE_NAME}.dtb ::overlays/${DTB_BASE_NAME}.dtb
 			done
 		fi
-		mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::kernel.img
+		mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::${SDIMG_KERNELIMAGE}
 		;;
 	esac
 
conf/machine/include/rpi-base.inc +1 -1
index 65ec712..f1c404d 100644
@@ -46,4 +46,4 @@ MACHINE_EXTRA_RRECOMMENDS += " kernel-modules"
 # Set Raspberrypi splash image
 SPLASH = "psplash-raspberrypi"
 
-IMAGE_BOOT_FILES ?= "bcm2835-bootfiles/* ${KERNEL_IMAGETYPE};kernel.img"
+IMAGE_BOOT_FILES ?= "bcm2835-bootfiles/* ${KERNEL_IMAGETYPE};${SDIMG_KERNELIMAGE}"
Signature · 1 line
2.1.0
#7 lore raw

PATCH 8/8 Add support for Raspberry PI 2

In reply to Andrei Gherzan

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

Change-Id I6549d5f49b1ed32ef4d44aca6f7af4234618c1a8
---
 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
classes/sdcard_image-rpi.bbclass +1 -0
index 86cf773..1ff664d 100644
@@ -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}"
conf/machine/raspberrypi2.conf new file +13 -0
new file mode 100644
index 0000000..778f5a6
@@ -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
recipes-kernel/linux/linux-raspberrypi.inc +1 -0
index b8afecc..fde68dd 100644
@@ -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"
Signature · 1 line
2.1.0
#8 lore raw
In reply to Andrei Gherzan
Quoted 10 lines · Andrei Gherzan

*.conf files should hold board specific stuff while rpi-base.inc should include configuration that is common for all Raspberry Pi boards.

Remove MACHINE_KERNEL_PR as we don't use it anymore.

Minor tweaks.

Change-Id I5e1b12c1d224ac003d2890544beb036f1d5d8643

---

All 8 patches merged to master. Thanks.

Signature · 1 line
*Andrei Gherzan*