All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Liu <net147@gmail.com>
To: yocto@yoctoproject.org
Subject: [meta-raspberrypi][PATCH 3/3] u-boot: add v2015.10 for Raspberry Pi 2 support
Date: Mon, 26 Oct 2015 17:46:27 +1100	[thread overview]
Message-ID: <1445841987-2917-3-git-send-email-net147@gmail.com> (raw)
In-Reply-To: <1445841987-2917-1-git-send-email-net147@gmail.com>

Signed-off-by: Jonathan Liu <net147@gmail.com>
---
 conf/machine/include/rpi-default-providers.inc |  3 ++-
 recipes-bsp/u-boot/files/boot.cmd              |  3 +++
 recipes-bsp/u-boot/u-boot_2015.10.bb           | 28 ++++++++++++++++++++++++++
 3 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644 recipes-bsp/u-boot/files/boot.cmd
 create mode 100644 recipes-bsp/u-boot/u-boot_2015.10.bb

diff --git a/conf/machine/include/rpi-default-providers.inc b/conf/machine/include/rpi-default-providers.inc
index cabbd43..7d433a0 100644
--- a/conf/machine/include/rpi-default-providers.inc
+++ b/conf/machine/include/rpi-default-providers.inc
@@ -1,7 +1,8 @@
 # RaspberryPi BSP default providers
 
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-raspberrypi"
-PREFERRED_PROVIDER_u-boot ?= "u-boot-rpi"
+PREFERRED_PROVIDER_u-boot_raspberrypi ?= "u-boot-rpi"
+PREFERRED_PROVIDER_u-boot_raspberrypi2 ?= "u-boot"
 PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
 PREFERRED_PROVIDER_virtual/egl ?= "userland"
 PREFERRED_PROVIDER_virtual/libgles2 ?= "userland"
diff --git a/recipes-bsp/u-boot/files/boot.cmd b/recipes-bsp/u-boot/files/boot.cmd
new file mode 100644
index 0000000..3f7e3b6
--- /dev/null
+++ b/recipes-bsp/u-boot/files/boot.cmd
@@ -0,0 +1,3 @@
+fdt addr ${fdt_addr_r} && fdt get value bootargs /chosen bootargs
+fatload mmc 0:1 ${kernel_addr_r} uImage
+bootm ${kernel_addr_r} - ${fdt_addr_r}
diff --git a/recipes-bsp/u-boot/u-boot_2015.10.bb b/recipes-bsp/u-boot/u-boot_2015.10.bb
new file mode 100644
index 0000000..02fb39a
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot_2015.10.bb
@@ -0,0 +1,28 @@
+require recipes-bsp/u-boot/u-boot.inc
+
+DEPENDS += "dtc-native rpi-mkimage-native"
+
+SRC_URI += "file://boot.cmd"
+
+# This revision corresponds to the tag "v2015.10"
+# We use the revision in order to avoid having to fetch it from the
+# repo during parse
+SRCREV = "5ec0003b19cbdf06ccd6941237cbc0d1c3468e2d"
+
+PV = "v2015.10+git${SRCPV}"
+
+COMPATIBLE_MACHINE = "raspberrypi2"
+
+do_compile_append() {
+    ${S}/tools/mkimage -A arm -O linux -T script -C none -n boot.scr -d ${WORKDIR}/boot.cmd ${WORKDIR}/${UBOOT_ENV_BINARY}
+}
+
+do_deploy_append() {
+    # Add RPi bootloader trailer to U-Boot image to enable Device Tree support
+    ${STAGING_DIR_NATIVE}/usr/lib/rpi-mkimage/mkknlimg --dtok ${DEPLOYDIR}/${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_IMAGE}
+}
+
+UBOOT_ENV = "boot"
+UBOOT_ENV_SUFFIX = "scr"
+UBOOT_IMAGE = "u-boot.img"
+UBOOT_MACHINE_raspberrypi2 = "rpi_2_defconfig"
-- 
2.6.1



      parent reply	other threads:[~2015-10-26  6:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-26  6:46 [meta-raspberrypi][PATCH 1/3] sdcard_image-rpi.bbclass: always include device tree files Jonathan Liu
2015-10-26  6:46 ` [meta-raspberrypi][PATCH 2/3] sdcard_image-rpi.bbclass: include boot.scr if present Jonathan Liu
2015-10-26  6:46 ` Jonathan Liu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1445841987-2917-3-git-send-email-net147@gmail.com \
    --to=net147@gmail.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.