-SUBDIR= am335x beagle panda imx cubie
+SUBDIR= am335x beagle cubie cubox nitrogen panda
.include <bsd.subdir.mk>
mkdir ${MOUNT_POINT}/u-boots
cp -r /usr/mdec/{am335x,beagle,panda} ${MOUNT_POINT}/u-boots
.endif
-.if ${PLATFORM} == "IMX"
+.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
-
+.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
+ 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 ${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
echo 'uenvcmd=run mmcboot;' >> ${MOUNT_POINT}/uEnv.txt
+ dd if=/usr/mdec/${BOARD}/u-boot-sunxi-with-spl.bin \
+ of=${VND_CDEV} bs=1024 seek=8
.endif
cp ${.OBJDIR}/../../ramdisk/bsd.rd.${PLATFORM}.umg ${MOUNT_POINT}/bsd.umg
vnconfig -c ${VND} ${IMAGE}
fdisk -c 2 -h 255 -s 63 -yi ${VND} >/dev/null
.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
+ 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"
+ 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
- echo "u\ne 0\n${PART_ID}\ny\n0\n1\n1\n1\n254\n63\nf 0\nw\nq\n" | fdisk -c 2 -h 255 -s 63 -e ${VND} >/dev/null
+ echo "u\ne 0\n${PART_ID}\ny\n0\n1\n1\n1\n254\n63\nf 0\nw\nq\n" \
+ | 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}
rd_teardown:
@df -i ${MOUNT_POINT}
-umount ${MOUNT_POINT}
-.if ${PLATFORM} == "SUNXI"
- dd if=/usr/mdec/${BOARD}/u-boot-sunxi-with-spl.bin \
- of=${VND_CDEV} bs=1024 seek=8
-.endif
-vnconfig -u ${VND}
-
unconfig:
-umount -f ${MOUNT_POINT}
-vnconfig -u ${VND}
--- /dev/null
+BOARD= cubox
+PLATFORM=IMX
+LOADADDR=0x18800000
+FS=ext2fs
+PART_ID=83
+
+.include "${.CURDIR}/../Makefile.inc"
+++ /dev/null
-BOARD= imx
-PLATFORM=IMX
-LOADADDR=0x18800000
-FS=ext2fs
-PART_ID=83
-
-.include "${.CURDIR}/../Makefile.inc"
--- /dev/null
+BOARD= nitrogen
+PLATFORM=IMX
+LOADADDR=0x18800000
+FS=ext2fs
+PART_ID=83
+
+.include "${.CURDIR}/../Makefile.inc"
-# $OpenBSD: install.md,v 1.9 2015/05/31 19:40:10 rpe Exp $
+# $OpenBSD: install.md,v 1.10 2015/06/02 01:48:25 jsg Exp $
#
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
MDPLAT=SUNXI
LOADADDR=0x40200000
fi
+BEAGLE=$(scan_dmesg '/^omap0 at mainbus0: TI OMAP3 \(BeagleBoard\).*/s//\1/p')
+BEAGLEBONE=$(scan_dmesg '/^omap0 at mainbus0: TI AM335x \(BeagleBone\).*/s//\1/p')
+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')
-MDSETS="bsd.${MDPLAT} bsd.rd.${MDPLAT} bsd.${MDPLAT}.umg bsd.rd.${MDPLAT}.umg"
-SANESETS="bsd.${MDPLAT}"
-DEFAULTSETS=${MDSETS}
+MDSETS="bsd.${MDPLAT}.umg bsd.rd.${MDPLAT}.umg"
+SANESETS="bsd"
+DEFAULTSETS="bsd bsd.rd ${MDSETS}"
NEWFSARGS_msdos="-F 16 -L boot"
NEWFSARGS_ext2fs="-v boot"
local _disk=$1
mount /dev/${_disk}i /mnt/mnt
- BEAGLE=$(scan_dmesg '/^omap0 at mainbus0: TI OMAP3 \(BeagleBoard\).*/s//\1/p')
- BEAGLEBONE=$(scan_dmesg '/^omap0 at mainbus0: TI AM335x \(BeagleBone\).*/s//\1/p')
- PANDA=$(scan_dmesg '/^omap0 at mainbus0: TI OMAP4 \(PandaBoard\)/s//\1/p')
-
if [[ -f /mnt/bsd.${MDPLAT}.umg ]]; then
mv /mnt/bsd.${MDPLAT}.umg /mnt/mnt/bsd.umg
fi
uenvcmd=boot
__EOT
elif [[ ${MDPLAT} == "IMX" ]]; then
- cat > /tmp/6x_bootscript.scr<<__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
+ if [[ -n $CUBOX ]]; then
+ cat > /tmp/boot.cmd<<__EOT
+; setenv loadaddr ${LOADADDR} ; setenv bootargs sd0i:/bsd.umg ; for dtype in usb 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
+ mkuboot -t script -a arm -o linux /tmp/boot.cmd /mnt/mnt/boot.scr
+ dd if=/mnt/usr/mdec/cubox/SPL of=/dev/${_disk}c bs=1024 seek=1
+ dd if=/mnt/usr/mdec/cubox/u-boot.img of=/dev/${_disk}c bs=1024 seek=42
+ elif [[ -n $NITROGEN ]]; then
+ cat > /tmp/6x_bootscript.scr<<__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
+ fi
elif [[ ${MDPLAT} == "SUNXI" ]]; then
cat > /mnt/mnt/uenv.txt<<__EOT
bootargs=sd0i:/bsd
local _disk=$1 _q _d
local bootparttype="C"
+ local bootsectorstart="64"
+ local bootsectorsize="32768"
+ local bootsectorend
local bootfstype="msdos"
local newfs_args=${NEWFSARGS_msdos}
bootfstype="ext2fs"
newfs_args=${NEWFSARGS_ext2fs}
fi
+ if [[ -n $CUBOX ]]; then
+ bootsectorstart="2048"
+ fi
+ bootsectorend=`expr $bootsectorstart + $bootsectorsize`
while :; do
_d=whole
e 0
${bootparttype}
n
-64
-32768
+${bootsectorstart}
+${bootsectorsize}
f 0
e 3
A6
n
-32832
+${bootsectorend}
write
quit
-dnl $OpenBSD: contents,v 1.6 2015/01/26 01:55:55 jsg Exp $
+dnl $OpenBSD: contents,v 1.7 2015/06/02 01:48:25 jsg Exp $
TopPart
miniroot-am335x-{:--:}OSrev.fs
A miniroot filesystem to be used for
installation; BeagleBoard version.
- miniroot-imx-{:--:}OSrev.fs
+ miniroot-cubie-{:--:}OSrev.fs
A miniroot filesystem to be used for
- installation; i.MX6 version.
+ installation; Cubieboard1 version.
- miniroot-panda-{:--:}OSrev.fs
+ miniroot-cubox--{:--:}OSrev.fs
A miniroot filesystem to be used for
- installation; PandaBoard (ES) version.
+ installation; CuBox-i version.
- miniroot-cubie-{:--:}OSrev.fs
+ miniroot-nitrogen-{:--:}OSrev.fs
A miniroot filesystem to be used for
- installation; Cubieboard1 version.
+ installation; Nitrogen6x version.
+
+ miniroot-panda-{:--:}OSrev.fs
+ A miniroot filesystem to be used for
+ installation; PandaBoard (ES) version.
OpenBSDdistsets
-dnl $OpenBSD: prep,v 1.6 2015/01/26 01:55:55 jsg Exp $
+dnl $OpenBSD: prep,v 1.7 2015/06/02 01:48:25 jsg Exp $
Please be aware that OpenBSD support for this platform is far from
complete.
OpenBSD can be installed onto a disk by copying the miniroot for your
-board "miniroot-{am335x,beagle,imx,panda,cubie}-{:--:}OSrev.fs"
-image to an SD card or by booting the ramdisk kernel over the network
-using a TFTP server.
+board "miniroot-board-{:--:}OSrev.fs" image to an SD card or by booting
+the ramdisk kernel over the network using a TFTP server.
Booting from an SD card:
-# $OpenBSD: Makefile.inc,v 1.8 2015/05/20 01:44:20 jsg Exp $
+# $OpenBSD: Makefile.inc,v 1.9 2015/06/02 01:48:25 jsg Exp $
ALLSOC=IMX OMAP SUNXI
MDEXT= bsd.rd
.endfor
MDEXT+= miniroot-am335x-${OSrev}.fs miniroot-beagle-${OSrev}.fs \
- miniroot-imx-${OSrev}.fs miniroot-panda-${OSrev}.fs \
- miniroot-cubie-${OSrev}.fs
+ miniroot-cubie-${OSrev}.fs miniroot-cubox-${OSrev}.fs \
+ miniroot-nitrogen-${OSrev}.fs miniroot-panda-${OSrev}.fs