summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2017-01-19 06:55:59 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2017-01-19 06:55:59 +0000
commit70a944384fb0e2277bb93c1a4274ecb8ff433c4b (patch)
tree1c9e50b145f5ad1035a412412a4d26aa58f561ab
parent4bc5789f7f2236b8bc037cdc939be4937ac2a48b (diff)
Mainline u-boot on SABRE Lite/BD-SL-i.MX6 does not have the generic
distro hooks that automatically load an efi file if found. Instead it looks for a '6x_bootscript' u-boot script as the original boundary devices u-boot did. Create a script in the nitrogen miniroot and on install that will load a dtb and bootarm.efi then call bootefi. Based on notes from matthieu@
-rw-r--r--distrib/armv7/miniroot/Makefile.inc4
-rw-r--r--distrib/armv7/miniroot/boot.cmd8
-rw-r--r--distrib/armv7/ramdisk/install.md10
3 files changed, 17 insertions, 5 deletions
diff --git a/distrib/armv7/miniroot/Makefile.inc b/distrib/armv7/miniroot/Makefile.inc
index 3c63d18dc84..df78934534a 100644
--- a/distrib/armv7/miniroot/Makefile.inc
+++ b/distrib/armv7/miniroot/Makefile.inc
@@ -56,6 +56,10 @@ do_files:
.if ${PLATFORM} == "OMAP"
cp ${PUBOOT}/${UBOOT}/{MLO,u-boot.img} ${MOUNT_POINT}/
.endif
+.if ${BOARD} == "nitrogen"
+ ${MKUBOOT} -t script -a arm -o linux \
+ ${.CURDIR}/../boot.cmd ${MOUNT_POINT}/6x_bootscript
+.endif
.if ${BOARD} == "cubox" || ${BOARD} == "wandboard"
dd if=${PUBOOT}/${UBOOT}/SPL of=${VND_CDEV} bs=1024 seek=1
dd if=${PUBOOT}/${UBOOT}/u-boot.img of=${VND_CDEV} bs=1024 seek=69
diff --git a/distrib/armv7/miniroot/boot.cmd b/distrib/armv7/miniroot/boot.cmd
index cbae6047ab9..bec5aef45a6 100644
--- a/distrib/armv7/miniroot/boot.cmd
+++ b/distrib/armv7/miniroot/boot.cmd
@@ -1,4 +1,4 @@
-run findfdt ;
-load mmc ${mmcdev}:1 ${loadaddr} bsd.umg ;
-load mmc ${mmcdev}:1 ${fdt_addr_r} ${fdtfile} ;
-bootm ${loadaddr} - ${fdt_addr_r} ;
+setenv fdtfile imx6q-sabrelite.dtb ;
+load ${dtype} ${disk}:1 ${fdt_addr} ${fdtfile} ;
+load ${dtype} ${disk}:1 ${loadaddr} efi/boot/bootarm.efi ;
+bootefi ${loadaddr} ${fdt_addr} ;
diff --git a/distrib/armv7/ramdisk/install.md b/distrib/armv7/ramdisk/install.md
index 0d498cebacd..80dd222384f 100644
--- a/distrib/armv7/ramdisk/install.md
+++ b/distrib/armv7/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.42 2016/09/04 10:06:11 jsg Exp $
+# $OpenBSD: install.md,v 1.43 2017/01/19 06:55:58 jsg Exp $
#
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -73,6 +73,14 @@ md_installboot() {
;;
nitrogen)
cp $_mdec/*.dtb /mnt/mnt/
+ cat > /tmp/i/boot.cmd<<-__EOT
+ setenv fdtfile imx6q-sabrelite.dtb ;
+ load ${dtype} ${disk}:1 ${fdt_addr} ${fdtfile} ;
+ load ${dtype} ${disk}:1 ${loadaddr} efi/boot/bootarm.efi ;
+ bootefi ${loadaddr} ${fdt_addr} ;
+ __EOT
+ mkuboot -t script -a arm -o linux /tmp/i/boot.cmd \
+ /mnt/mnt/6x_bootscript
;;
cubie)
cp $_mdec/*.dtb /mnt/mnt/