summaryrefslogtreecommitdiff
path: root/distribution/yocto-advanced/meta-schulung-extended/recipes-bsp/u-boot
diff options
context:
space:
mode:
Diffstat (limited to 'distribution/yocto-advanced/meta-schulung-extended/recipes-bsp/u-boot')
-rw-r--r--distribution/yocto-advanced/meta-schulung-extended/recipes-bsp/u-boot/files/0001-setup-bootcmd-for-tftp.patch27
-rw-r--r--distribution/yocto-advanced/meta-schulung-extended/recipes-bsp/u-boot/files/defconfig25
-rw-r--r--distribution/yocto-advanced/meta-schulung-extended/recipes-bsp/u-boot/u-boot_%.bbappend34
3 files changed, 86 insertions, 0 deletions
diff --git a/distribution/yocto-advanced/meta-schulung-extended/recipes-bsp/u-boot/files/0001-setup-bootcmd-for-tftp.patch b/distribution/yocto-advanced/meta-schulung-extended/recipes-bsp/u-boot/files/0001-setup-bootcmd-for-tftp.patch
new file mode 100644
index 0000000..18b0171
--- /dev/null
+++ b/distribution/yocto-advanced/meta-schulung-extended/recipes-bsp/u-boot/files/0001-setup-bootcmd-for-tftp.patch
@@ -0,0 +1,27 @@
+From 284f9ad599ec5809ba9c06d4ba5945f4e9d0a369 Mon Sep 17 00:00:00 2001
+From: Your Name <you@example.com>
+Date: Fri, 19 May 2017 23:10:09 +0200
+Subject: [PATCH] setup bootcmd for tftp
+
+Signed-off-by: Your Name <you@example.com>
+---
+ include/configs/vexpress_common.h | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/include/configs/vexpress_common.h b/include/configs/vexpress_common.h
+index 0bc4ea5..da37125 100644
+--- a/include/configs/vexpress_common.h
++++ b/include/configs/vexpress_common.h
+@@ -186,8 +186,7 @@
+
+ /* Basic environment settings */
+ #define CONFIG_BOOTCOMMAND \
+- "run distro_bootcmd; " \
+- "run bootflash; "
++ "fatload mmc 0 0x64000000 image.fit; setenv bootargs console=ttyAMA0,115200 root=/dev/mmcblk0p2 ip=192.168.7.2::192.168.7.1:255.255.255.0; bootm 0x64000000"
+
+ #define BOOT_TARGET_DEVICES(func) \
+ func(MMC, mmc, 1) \
+--
+2.1.4
+
diff --git a/distribution/yocto-advanced/meta-schulung-extended/recipes-bsp/u-boot/files/defconfig b/distribution/yocto-advanced/meta-schulung-extended/recipes-bsp/u-boot/files/defconfig
new file mode 100644
index 0000000..c5149b7
--- /dev/null
+++ b/distribution/yocto-advanced/meta-schulung-extended/recipes-bsp/u-boot/files/defconfig
@@ -0,0 +1,25 @@
+CONFIG_ARM=y
+CONFIG_TARGET_VEXPRESS_CA9X4=y
+CONFIG_DISTRO_DEFAULTS=y
+# CONFIG_SYS_MALLOC_F is not set
+CONFIG_FIT=y
+CONFIG_FIT_VERBOSE=y
+CONFIG_FIT_SIGNATURE=y
+# CONFIG_DISPLAY_CPUINFO is not set
+# CONFIG_DISPLAY_BOARDINFO is not set
+# CONFIG_CMD_CONSOLE is not set
+# CONFIG_CMD_BOOTD is not set
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_XIMG is not set
+# CONFIG_CMD_EDITENV is not set
+# CONFIG_CMD_ENV_EXISTS is not set
+# CONFIG_CMD_LOADB is not set
+# CONFIG_CMD_LOADS is not set
+CONFIG_CMD_MMC=y
+# CONFIG_CMD_FPGA is not set
+# CONFIG_CMD_ITEST is not set
+# CONFIG_CMD_SETEXPR is not set
+# CONFIG_CMD_NFS is not set
+# CONFIG_CMD_MISC is not set
+CONFIG_OF_CONTROL=y
+CONFIG_DM=y
diff --git a/distribution/yocto-advanced/meta-schulung-extended/recipes-bsp/u-boot/u-boot_%.bbappend b/distribution/yocto-advanced/meta-schulung-extended/recipes-bsp/u-boot/u-boot_%.bbappend
new file mode 100644
index 0000000..64bd6c5
--- /dev/null
+++ b/distribution/yocto-advanced/meta-schulung-extended/recipes-bsp/u-boot/u-boot_%.bbappend
@@ -0,0 +1,34 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+SRC_URI += "file://defconfig"
+
+# only alter the default bootcmd if we build for the vexpress machine
+SRC_URI_append_vexpress = " file://0001-setup-bootcmd-for-tftp.patch"
+# take care
+# SRC_URI_vexpress += "file://0001-setup-bootcmd-for-tftp.patch"
+# is NOT the same. The result is that the old content of SRC_URI is lost!!
+
+do_configure_prepend () {
+ cp ${WORKDIR}/defconfig ${S}/.config
+ cd ${S}; oe_runmake oldconfig
+}
+
+do_compile () {
+ export HOST_EXTRACFLAGS="${BUILD_CFLAGS}"
+ export HOST_EXTRACXXFLAGS="${BUILD_CXXFLAGS}"
+ export HOSTLDFLAGS="${BUILD_LDFLAGS}"
+ cd ${S}; oe_runmake u-boot-nodtb.bin
+ # instead of hardcoding the dtb it would be nicer to use the varialbe
+ # specified in vexpress.conf: UBOOT_MACHINE = "u-boot-nodtb"
+ # cd ${S}; oe_runmake ${UBOOT_MACHINE}.bin
+}
+
+do_install () {
+ cd ${S}; install -D -m 0644 u-boot.cfg ${D}${datadir}/u-boot/u-boot.cfg
+}
+
+FILES_${PN}-dev_append = " ${datadir}/u-boot/u-boot.cfg"
+
+do_deploy () {
+ cd ${S}; install -D -m 0644 u-boot-nodtb.bin ${DEPLOYDIR}/u-boot-nodtb.bin
+}