From f48bec2be0a7c3c929ef23b59ab221ea7b4c228d Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Mon, 5 Aug 2019 16:16:42 -0700 Subject: [PATCH] u-boot: Add OSTree uEnx.txt file Add the uEnx.txt file to meta-riscv to allow users to build OSTree setups for the HiFive Unleashed. This is based on the original version from Ricardo Salveti (@ricardosalveti). Signed-off-by: Alistair Francis --- recipes-bsp/u-boot/files/uEnv.txt | 4 ++++ recipes-bsp/u-boot/u-boot_2019.07.bbappend | 7 +++++++ 2 files changed, 11 insertions(+) create mode 100644 recipes-bsp/u-boot/files/uEnv.txt diff --git a/recipes-bsp/u-boot/files/uEnv.txt b/recipes-bsp/u-boot/files/uEnv.txt new file mode 100644 index 0000000..05514d2 --- /dev/null +++ b/recipes-bsp/u-boot/files/uEnv.txt @@ -0,0 +1,4 @@ +bootcmd_otenv=load ${devtype} ${devnum}:3 ${scriptaddr} /boot/loader/uEnv.txt; env import -t ${scriptaddr} ${filesize} +bootcmd_load_f=load ${devtype} ${devnum}:3 ${ramdisk_addr_r} "/boot"${kernel_image} +bootcmd_run=bootm ${ramdisk_addr_r} +bootcmd=run bootcmd_otenv; run bootcmd_load_f; run bootcmd_run diff --git a/recipes-bsp/u-boot/u-boot_2019.07.bbappend b/recipes-bsp/u-boot/u-boot_2019.07.bbappend index f27f329..bab6383 100644 --- a/recipes-bsp/u-boot/u-boot_2019.07.bbappend +++ b/recipes-bsp/u-boot/u-boot_2019.07.bbappend @@ -25,6 +25,8 @@ SRC_URI_append_freedom-u540 = " \ file://tftp-mmc-boot.txt \ " +SRC_URI_append_freedom-u540_sota = " file://uEnv.txt" + DEPENDS_append_freedom-u540 = " u-boot-tools-native" # Overwrite this for your server @@ -44,6 +46,11 @@ do_deploy_append_freedom-u540() { install -d ${DEPLOY_DIR_IMAGE} install -m 755 ${WORKDIR}/boot.scr.uimg ${DEPLOY_DIR_IMAGE} fi + + if [ -f "${WORKDIR}/uEnv.txt" ]; then + install -d ${DEPLOY_DIR_IMAGE} + install -m 755 ${WORKDIR}/uEnv.txt ${DEPLOY_DIR_IMAGE} + fi } FILES_${PN}_append_freedom-u540 = " /boot/boot.scr.uimg"