diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2016-05-21 07:19:25 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2016-05-21 07:19:25 +0000 |
commit | 00d8752b18abbef2e7ef11d072db89bb24e5053a (patch) | |
tree | cf6ac770dc964ba95489aff9081dedd08d8209e5 /distrib | |
parent | fdda933ba312bd00738a4b36959d08786e3b9254 (diff) |
Copy dtb files to miniroots and install disk. Increase the ramdisk size
and force long filenames on the first mount of fat 16 filesystems so
this works.
U-boot scripts have not yet been changed to load these files.
ok kettenis@
Diffstat (limited to 'distrib')
-rw-r--r-- | distrib/armv7/miniroot/Makefile.inc | 12 | ||||
-rw-r--r-- | distrib/armv7/ramdisk/Makefile | 4 | ||||
-rw-r--r-- | distrib/armv7/ramdisk/install.md | 8 |
3 files changed, 17 insertions, 7 deletions
diff --git a/distrib/armv7/miniroot/Makefile.inc b/distrib/armv7/miniroot/Makefile.inc index d936647ce83..fd092a35803 100644 --- a/distrib/armv7/miniroot/Makefile.inc +++ b/distrib/armv7/miniroot/Makefile.inc @@ -22,6 +22,8 @@ PART_ID?=C NEWFS_ARGS_msdos=-F 16 -L boot NEWFS_ARGS_ext2fs=-v boot +MOUNT_ARGS_msdos=-o-l +MOUNT_ARGS_ext2fs= cleandir: clean clean: @@ -43,8 +45,7 @@ do_files: 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}/ - mkdir ${MOUNT_POINT}/u-boots - cp -r /usr/mdec/{am335x,beagle,panda} ${MOUNT_POINT}/u-boots + 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 @@ -55,6 +56,7 @@ do_files: 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 + 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 @@ -62,13 +64,15 @@ do_files: 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 .endif .if ${PLATFORM} == "SUNXI" - echo 'bootargs=sd0a:/bsd' > ${MOUNT_POINT}/uEnv.tx + 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 .endif @@ -89,7 +93,7 @@ rd_setup: | fdisk -c 2 -h 255 -s 63 -e ${VND} >/dev/null .endif newfs_${FS} ${NEWFS_ARGS_${FS}} ${VND_RIDEV} >/dev/null - mount ${VND_IDEV} ${MOUNT_POINT} + mount ${MOUNT_ARGS_${FS}} ${VND_IDEV} ${MOUNT_POINT} rd_teardown: @df -i ${MOUNT_POINT} diff --git a/distrib/armv7/ramdisk/Makefile b/distrib/armv7/ramdisk/Makefile index c62d3d8ac4d..4b6ff2fbb86 100644 --- a/distrib/armv7/ramdisk/Makefile +++ b/distrib/armv7/ramdisk/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.11 2015/07/17 17:02:52 jsg Exp $ +# $OpenBSD: Makefile,v 1.12 2016/05/21 07:19:24 jsg Exp $ REV= ${OSrev} @@ -29,7 +29,7 @@ KERNADDR_VEXPRESSA9=0x60300000 KERNADDR_EXYNOS=0x40300000 DISKTYPE= rdroot -NBLKS= 10240 +NBLKS= 15360 # minfree, opt, b/i trks, sects, cpg NEWFSARGS= -m 0 -o space -i 4096 diff --git a/distrib/armv7/ramdisk/install.md b/distrib/armv7/ramdisk/install.md index 09e0176179d..7aa83ea8bcb 100644 --- a/distrib/armv7/ramdisk/install.md +++ b/distrib/armv7/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.27 2016/04/20 14:40:59 abieber Exp $ +# $OpenBSD: install.md,v 1.28 2016/05/21 07:19:24 jsg Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -92,10 +92,13 @@ md_installboot() { if [[ -n $BEAGLE ]]; then cp /mnt/usr/mdec/beagle/{MLO,u-boot.img} /mnt/mnt/ + cp /mnt/usr/mdec/beagle/*.dtb /mnt/mnt/ elif [[ -n $BEAGLEBONE ]]; then cp /mnt/usr/mdec/am335x/{MLO,u-boot.img} /mnt/mnt/ + cp /mnt/usr/mdec/am335x/*.dtb /mnt/mnt/ elif [[ -n $PANDA ]]; then cp /mnt/usr/mdec/panda/{MLO,u-boot.img} /mnt/mnt/ + cp /mnt/usr/mdec/panda/*.dtb /mnt/mnt/ fi cat > /mnt/mnt/uenv.txt<<__EOT bootcmd=mmc rescan ; setenv loadaddr ${LOADADDR}; setenv bootargs sd0i:/bsd.umg ; fatload mmc \${mmcdev} \${loadaddr} bsd.umg ; bootm \${loadaddr} ; @@ -108,6 +111,7 @@ __EOT __EOT mkuboot -t script -a arm -o linux /tmp/boot.cmd \ /mnt/mnt/boot.scr + cp /mnt/usr/mdec/cubox/*.dtb /mnt/mnt/ dd if=/mnt/usr/mdec/cubox/SPL \ of=/dev/${_disk}c bs=1024 seek=1 >/dev/null dd if=/mnt/usr/mdec/cubox/u-boot.img \ @@ -123,6 +127,7 @@ __EOT __EOT mkuboot -t script -a arm -o linux /tmp/boot.cmd \ /mnt/mnt/boot.scr + cp /mnt/usr/mdec/wandboard/*.dtb /mnt/mnt/ dd if=/mnt/usr/mdec/wandboard/SPL \ of=/dev/${_disk}c bs=1024 seek=1 >/dev/null dd if=/mnt/usr/mdec/wandboard/u-boot.img \ @@ -135,6 +140,7 @@ mmcboot=mmc rescan ; fatload mmc 0 ${LOADADDR} bsd.umg && bootm ${LOADADDR}; uenvcmd=run mmcboot; __EOT cp /mnt/usr/mdec/cubie/u-boot-sunxi-with-spl.bin /mnt/mnt/ + cp /mnt/usr/mdec/cubie/*.dtb /mnt/mnt/ fi } |