summaryrefslogtreecommitdiff
path: root/distrib/armv7
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2016-05-22 02:41:46 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2016-05-22 02:41:46 +0000
commitaf75db88f5eec8e76ef6213e4ad1434ddac995a8 (patch)
tree6e7de25edefcb89701e2db3652b2d819f1cd44f3 /distrib/armv7
parent6fbc32e40f73b13320a4c446454527cb074bfba8 (diff)
use a simple u-boot script for all the miniroots that loads with fdt
ok patrick@ kettenis@
Diffstat (limited to 'distrib/armv7')
-rw-r--r--distrib/armv7/miniroot/Makefile.inc27
-rw-r--r--distrib/armv7/miniroot/boot.cmd4
2 files changed, 10 insertions, 21 deletions
diff --git a/distrib/armv7/miniroot/Makefile.inc b/distrib/armv7/miniroot/Makefile.inc
index fd092a35803..19b8c7d11db 100644
--- a/distrib/armv7/miniroot/Makefile.inc
+++ b/distrib/armv7/miniroot/Makefile.inc
@@ -41,37 +41,22 @@ ${IMAGE}: rd_setup do_files rd_teardown
.endif
do_files:
+ ${MKUBOOT} -t script -a arm -o linux \
+ ${.CURDIR}/../boot.cmd ${MOUNT_POINT}/boot.scr
.if ${PLATFORM} == "OMAP"
cp /usr/mdec/${BOARD}/MLO ${MOUNT_POINT}/MLO
- echo "bootcmd=mmc rescan ; setenv loadaddr ${LOADADDR} ; setenv bootargs sd0i:/bsd.umg ; fatload mmc \$${mmcdev} \$${loadaddr} bsd.umg ; bootm \$${loadaddr} ;\nuenvcmd=boot" > ${MOUNT_POINT}/uenv.txt
cp /usr/mdec/${BOARD}/u-boot.* ${MOUNT_POINT}/
cp /usr/mdec/${BOARD}/*.dtb ${MOUNT_POINT}/
.endif
.if ${BOARD} == "nitrogen"
- echo "; setenv loadaddr ${LOADADDR} ; setenv bootargs sd0i:/bsd.umg ; for dtype in sata mmc ; do for disk in 0 1 ; do \$${dtype} dev \$${disk} ; for fs in fat ext2 ; do if \$${fs}load \$${dtype} \$${disk}:1 \$${loadaddr} bsd.umg ; then bootm \$${loadaddr} ; fi ; done; done; done; echo; echo failed to load bsd.umg" > 6x_bootscript.cmd
- ${MKUBOOT} -t script -a arm -o linux 6x_bootscript.cmd 6x_bootscript.scr
- cp 6x_bootscript.scr ${MOUNT_POINT}/6x_bootscript
+ mv ${MOUNT_POINT}/boot.scr ${MOUNT_POINT}/6x_bootscript
.endif
-.if ${BOARD} == "cubox"
- echo "; setenv loadaddr ${LOADADDR} ; setenv bootargs sd0i:/bsd.umg ; for dtype in mmc usb ; do for disk in 0 1 ; do \$${dtype} dev \$${disk} ; for fs in fat ext2 ; do if \$${fs}load \$${dtype} \$${disk}:1 \$${loadaddr} bsd.umg ; then bootm \$${loadaddr} ; fi ; done; done; done; echo; echo failed to load bsd.umg" > boot.cmd
- ${MKUBOOT} -t script -a arm -o linux boot.cmd boot.scr
- cp boot.scr ${MOUNT_POINT}/boot.scr
+.if ${BOARD} == "cubox" || ${BOARD} == "wandboard"
cp /usr/mdec/${BOARD}/*.dtb ${MOUNT_POINT}/
- dd if=/usr/mdec/cubox/SPL of=${VND_CDEV} bs=1024 seek=1
- dd if=/usr/mdec/cubox/u-boot.img of=${VND_CDEV} bs=1024 seek=69
-.endif
-.if ${BOARD} == "wandboard"
- echo "; setenv loadaddr ${LOADADDR} ; setenv bootargs sd0i:/bsd.umg ; for dtype in mmc ; do for disk in 0 1 ; do \$${dtype} dev \$${disk} ; for fs in fat ext2 ; do if \$${fs}load \$${dtype} \$${disk}:1 \$${loadaddr} bsd.umg ; then bootm \$${loadaddr} ; fi ; done; done; done; echo; echo failed to load bsd.umg" > boot.cmd
- ${MKUBOOT} -t script -a arm -o linux boot.cmd boot.scr
- cp boot.scr ${MOUNT_POINT}/boot.scr
- cp /usr/mdec/${BOARD}/*.dtb ${MOUNT_POINT}/
- dd if=/usr/mdec/wandboard/SPL of=${VND_CDEV} bs=1024 seek=1
- dd if=/usr/mdec/wandboard/u-boot.img of=${VND_CDEV} bs=1024 seek=69
+ dd if=/usr/mdec/${BOARD}/SPL of=${VND_CDEV} bs=1024 seek=1
+ dd if=/usr/mdec/${BOARD}/u-boot.img of=${VND_CDEV} bs=1024 seek=69
.endif
.if ${PLATFORM} == "SUNXI"
- echo 'bootargs=sd0a:/bsd' > ${MOUNT_POINT}/uEnv.txt
- echo 'mmcboot=mmc rescan ; fatload mmc 0 ${LOADADDR} bsd.umg && bootm ${LOADADDR};' >> ${MOUNT_POINT}/uEnv.txt
- echo 'uenvcmd=run mmcboot;' >> ${MOUNT_POINT}/uEnv.txt
cp /usr/mdec/${BOARD}/*.dtb ${MOUNT_POINT}/
dd if=/usr/mdec/${BOARD}/u-boot-sunxi-with-spl.bin \
of=${VND_CDEV} bs=1024 seek=8
diff --git a/distrib/armv7/miniroot/boot.cmd b/distrib/armv7/miniroot/boot.cmd
new file mode 100644
index 00000000000..cbae6047ab9
--- /dev/null
+++ b/distrib/armv7/miniroot/boot.cmd
@@ -0,0 +1,4 @@
+run findfdt ;
+load mmc ${mmcdev}:1 ${loadaddr} bsd.umg ;
+load mmc ${mmcdev}:1 ${fdt_addr_r} ${fdtfile} ;
+bootm ${loadaddr} - ${fdt_addr_r} ;