Hi arm@, Here a patch to add build miniroot for Wandboard i.MX6 devices.
Precompiled u-boot-2015.07-rc3 available by link https://www.dropbox.com/sh/1aslzdn8k2v6syy/AABh8XEdaKFpdzmPT-Jlt7ssa?dl=0 Tested on Wandboard Quad rev B1. Any comments are appreciated. Index: distrib/armv7/miniroot/Makefile =================================================================== RCS file: /cvs/src/distrib/armv7/miniroot/Makefile,v retrieving revision 1.5 diff -u -p -u -p -r1.5 Makefile --- distrib/armv7/miniroot/Makefile 2 Jun 2015 01:48:25 -0000 1.5 +++ distrib/armv7/miniroot/Makefile 9 Jul 2015 12:23:29 -0000 @@ -1,3 +1,3 @@ -SUBDIR= am335x beagle cubie cubox nitrogen panda +SUBDIR= am335x beagle cubie cubox nitrogen panda wandboard .include <bsd.subdir.mk> Index: distrib/armv7/miniroot/Makefile.inc =================================================================== RCS file: /cvs/src/distrib/armv7/miniroot/Makefile.inc,v retrieving revision 1.8 diff -u -p -u -p -r1.8 Makefile.inc --- distrib/armv7/miniroot/Makefile.inc 2 Jun 2015 01:48:25 -0000 1.8 +++ distrib/armv7/miniroot/Makefile.inc 9 Jul 2015 12:23:29 -0000 @@ -58,6 +58,13 @@ do_files: 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=42 .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 + 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 'mmcboot=mmc rescan ; fatload mmc 0 ${LOADADDR} bsd.umg && bootm ${LOADADDR};' >> ${MOUNT_POINT}/uEnv.txt @@ -74,7 +81,7 @@ rd_setup: .if ${PLATFORM} == "SUNXI" echo "u\ne 0\n${PART_ID}\ny\n0\n99\n1\n1\n254\n63\nf 0\nw\nq\n" \ | fdisk -c 2 -h 255 -s 63 -e ${VND} >/dev/null -.elif ${BOARD} == "cubox" +.elif ${BOARD} == "cubox" || ${BOARD} == "wandboard" echo "u\ne 3\n0\ne 0\n${PART_ID}\ny\n0\n32\n33\n1\n254\n63\n63\nf 0\nw\nq" \ | fdisk -c 2 -h 255 -s 63 -e ${VND} >/dev/null .else Index: distrib/armv7/miniroot/wandboard/Makefile =================================================================== RCS file: distrib/armv7/miniroot/wandboard/Makefile diff -N distrib/armv7/miniroot/wandboard/Makefile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ distrib/armv7/miniroot/wandboard/Makefile 9 Jul 2015 12:23:29 -0000 @@ -0,0 +1,7 @@ +BOARD= wandboard +PLATFORM=IMX +LOADADDR=0x18800000 +FS=ext2fs +PART_ID=83 + +.include "${.CURDIR}/../Makefile.inc" Index: distrib/armv7/ramdisk/install.md =================================================================== RCS file: /cvs/src/distrib/armv7/ramdisk/install.md,v retrieving revision 1.17 diff -u -p -u -p -r1.17 install.md --- distrib/armv7/ramdisk/install.md 7 Jul 2015 03:31:58 -0000 1.17 +++ distrib/armv7/ramdisk/install.md 9 Jul 2015 12:23:30 -0000 @@ -78,6 +78,7 @@ md_installboot() { PANDA=$(scan_dmesg '/^omap0 at mainbus0: TI OMAP4 \(PandaBoard\)/s//\1/p') CUBOX=$(scan_dmesg '/^imx0 at mainbus0: \(SolidRun.*\)/s//CUBOX/p') NITROGEN=$(scan_dmesg '/^imx0 at mainbus0: \(Freescale i.MX6 SABRE Lite.*\)/s//NITROGEN/p') + WANDBOARD=$(scan_dmesg '/^imx0 at mainbus0: \(Wandboard i.MX6.*\)/s//WANDBOARD/p') if [[ -f /mnt/bsd.${MDPLAT}.umg ]]; then mv /mnt/bsd.${MDPLAT}.umg /mnt/mnt/bsd.umg @@ -115,6 +116,13 @@ __EOT ; 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 __EOT mkuboot -t script -a arm -o linux /tmp/6x_bootscript.scr /mnt/mnt/6x_bootscript + elif [[ -n $WANDBOARD ]]; then + cat > /tmp/boot.cmd<<__EOT +; 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 +__EOT + mkuboot -t script -a arm -o linux /tmp/boot.cmd /mnt/mnt/boot.scr + dd if=/mnt/usr/mdec/wandboard/SPL of=/dev/${_disk}c bs=1024 seek=1 + dd if=/mnt/usr/mdec/wandboard/u-boot.img of=/dev/${_disk}c bs=1024 seek=69 fi elif [[ ${MDPLAT} == "SUNXI" ]]; then cat > /mnt/mnt/uenv.txt<<__EOT @@ -137,6 +145,7 @@ md_prep_fdisk() { local newfs_args=${NEWFSARGS_msdos} CUBOX=$(scan_dmesg '/^imx0 at mainbus0: \(SolidRun.*\)/s//CUBOX/p') + WANDBOARD=$(scan_dmesg '/^imx0 at mainbus0: \(Wandboard i.MX6.*\)/s//WANDBOARD/p') # imx needs an ext2fs filesystem if [[ ${MDPLAT} == "IMX" ]]; then @@ -144,7 +153,7 @@ md_prep_fdisk() { bootfstype="ext2fs" newfs_args=${NEWFSARGS_ext2fs} fi - if [[ -n $CUBOX ]]; then + if [[ -n $CUBOX || -n $WANDBOARD ]]; then bootsectorstart="2048" fi bootsectorend=$(($bootsectorstart + $bootsectorsize)) Index: etc/etc.armv7/Makefile.inc =================================================================== RCS file: /cvs/src/etc/etc.armv7/Makefile.inc,v retrieving revision 1.10 diff -u -p -u -p -r1.10 Makefile.inc --- etc/etc.armv7/Makefile.inc 29 Jun 2015 04:52:34 -0000 1.10 +++ etc/etc.armv7/Makefile.inc 9 Jul 2015 12:23:31 -0000 @@ -27,4 +27,5 @@ kernels: bootblocks ${ALL_KERNELS} MDEXT+= miniroot-am335x-${OSrev}.fs miniroot-beagle-${OSrev}.fs \ miniroot-cubie-${OSrev}.fs miniroot-cubox-${OSrev}.fs \ - miniroot-nitrogen-${OSrev}.fs miniroot-panda-${OSrev}.fs + miniroot-nitrogen-${OSrev}.fs miniroot-panda-${OSrev}.fs \ + miniroot-wandboard-${OSrev}.fs Index: etc/etc.armv7/disktab =================================================================== RCS file: /cvs/src/etc/etc.armv7/disktab,v retrieving revision 1.1 diff -u -p -u -p -r1.1 disktab --- etc/etc.armv7/disktab 4 Sep 2013 16:53:40 -0000 1.1 +++ etc/etc.armv7/disktab 9 Jul 2015 12:23:31 -0000 @@ -2,9 +2,9 @@ # Leave nc=16; adjust size using: ns rdroot|ramdiskroot|RAM-disk root FS image:\ - :ty=simulated:se#512:nc#16:nt#2:ns#256:\ - :ta=4.2BSD:oa#0:pa#8192:fa#512:ba#4096:\ - :ob#0:pb#0:oc#0:pc#8192: + :ty=simulated:se#512:nc#16:nt#2:ns#320:\ + :ta=4.2BSD:oa#0:pa#10240:fa#512:ba#4096:\ + :ob#0:pb#0:oc#0:pc#10240: rdroot2.5M|ramdiskroot2.5M|RAM-disk root FS image:\