[yocto] [meta-raspberrypi][PATCH V2 2/4] u-boot: Use mainline u-boot recipe from oe-core

Paul Barker paul at paulbarker.me.uk
Fri Jun 3 12:58:58 PDT 2016


The repository used by u-boot-rpi has not been updated since 2012. In the
meantime, mailine u-boot has gained Raspberry Pi support. All we need to do is
set UBOOT_MACHINE to an appropriate value in the machine config files.

Currently configs are only provided for raspberrypi and raspberrypi2. The master
branch of u-boot now also appears to have a config file for raspberrypi3 so
support for this can be added in the future when u-boot is upgraded in oe-core.

The mainline u-boot recipe creates the file "u-boot.bin" instead of
"u-boot.img".

Signed-off-by: Paul Barker <paul at paulbarker.me.uk>
---
 classes/sdcard_image-rpi.bbclass               |  2 +-
 conf/machine/include/rpi-default-providers.inc |  1 -
 conf/machine/raspberrypi.conf                  |  2 ++
 conf/machine/raspberrypi2.conf                 |  2 ++
 recipes-bsp/u-boot/u-boot-rpi_git.bb           | 29 --------------------------
 5 files changed, 5 insertions(+), 31 deletions(-)
 delete mode 100644 recipes-bsp/u-boot/u-boot-rpi_git.bb

diff --git a/classes/sdcard_image-rpi.bbclass b/classes/sdcard_image-rpi.bbclass
index 4dfd7a3..20bd314 100644
--- a/classes/sdcard_image-rpi.bbclass
+++ b/classes/sdcard_image-rpi.bbclass
@@ -105,7 +105,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 ::${SDIMG_KERNELIMAGE}
+		mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.bin ::${SDIMG_KERNELIMAGE}
 		mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::uImage
 		;;
 	*)
diff --git a/conf/machine/include/rpi-default-providers.inc b/conf/machine/include/rpi-default-providers.inc
index cabbd43..359870d 100644
--- a/conf/machine/include/rpi-default-providers.inc
+++ b/conf/machine/include/rpi-default-providers.inc
@@ -1,7 +1,6 @@
 # RaspberryPi BSP default providers
 
 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"
diff --git a/conf/machine/raspberrypi.conf b/conf/machine/raspberrypi.conf
index 0f95f1a..72beeb8 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"
+
+UBOOT_MACHINE = "rpi_config"
diff --git a/conf/machine/raspberrypi2.conf b/conf/machine/raspberrypi2.conf
index b6346e6..d50ef70 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"
+
+UBOOT_MACHINE = "rpi_2_config"
diff --git a/recipes-bsp/u-boot/u-boot-rpi_git.bb b/recipes-bsp/u-boot/u-boot-rpi_git.bb
deleted file mode 100644
index 3e8d377..0000000
--- a/recipes-bsp/u-boot/u-boot-rpi_git.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-DESCRIPTION = "U-Boot port for RaspberryPi"
-
-require recipes-bsp/u-boot/u-boot.inc
-
-DEPENDS += "rpi-mkimage-native"
-
-PROVIDES += "u-boot"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"
-
-SRCREV = "6709570cdc947c2a546f96d571551acf4474778c"
-SRC_URI = "git://github.com/gonzoua/u-boot-pi.git;branch=rpi"
-
-S = "${WORKDIR}/git"
-
-UBOOT_MACHINE = "rpi_b"
-UBOOT_MAKE_TARGET = "u-boot.bin"
-UBOOT_SUFFIX = "img"
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-
-COMPATIBLE_MACHINE = "raspberrypi"
-
-do_compile_append() {
-    # Create kernel.img from uboot.bin and name it u-boot.img
-    ${STAGING_BINDIR_NATIVE}/imagetool-uncompressed.py u-boot.bin
-    mv kernel.img u-boot.img
-}
-- 
2.1.4




More information about the yocto mailing list