summaryrefslogtreecommitdiff
path: root/distrib
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2016-05-26 00:34:51 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2016-05-26 00:34:51 +0000
commit3bf0e232ac4bf715abb1beb387d1c3f05fb185b1 (patch)
tree68f197c304db77eb75d118c341ea02a8f5e1500e /distrib
parentdf1b04e5ebbd86edbf64973c34d70cbf07f3f6b2 (diff)
Use a fat16 partition starting at sector 2048/1MB everywhere to simplify
things. OMAP can still load the first u-boot stage (MLO) from the fs and imx u-boot can load files off fat. The offset allows space for the u-boot images placed at raw offsets on imx and sunxi. discussed with kettenis
Diffstat (limited to 'distrib')
-rw-r--r--distrib/armv7/miniroot/Makefile.inc10
-rw-r--r--distrib/armv7/miniroot/cubox/Makefile2
-rw-r--r--distrib/armv7/miniroot/nitrogen/Makefile2
-rw-r--r--distrib/armv7/ramdisk/install.md26
4 files changed, 3 insertions, 37 deletions
diff --git a/distrib/armv7/miniroot/Makefile.inc b/distrib/armv7/miniroot/Makefile.inc
index 19b8c7d11db..2ec29bcf201 100644
--- a/distrib/armv7/miniroot/Makefile.inc
+++ b/distrib/armv7/miniroot/Makefile.inc
@@ -21,9 +21,7 @@ FS?= msdos
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:
@@ -67,16 +65,8 @@ rd_setup:
dd if=/dev/zero of=${IMAGE} bs=512 count=${NBLKS}
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
-.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
- 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 ${MOUNT_ARGS_${FS}} ${VND_IDEV} ${MOUNT_POINT}
diff --git a/distrib/armv7/miniroot/cubox/Makefile b/distrib/armv7/miniroot/cubox/Makefile
index 84ebaceee91..c0fc681ab5b 100644
--- a/distrib/armv7/miniroot/cubox/Makefile
+++ b/distrib/armv7/miniroot/cubox/Makefile
@@ -1,6 +1,4 @@
BOARD= cubox
PLATFORM=IMX
-FS=ext2fs
-PART_ID=83
.include "${.CURDIR}/../Makefile.inc"
diff --git a/distrib/armv7/miniroot/nitrogen/Makefile b/distrib/armv7/miniroot/nitrogen/Makefile
index 65a501d4f85..b5b267ab5b2 100644
--- a/distrib/armv7/miniroot/nitrogen/Makefile
+++ b/distrib/armv7/miniroot/nitrogen/Makefile
@@ -1,6 +1,4 @@
BOARD= nitrogen
PLATFORM=IMX
-FS=ext2fs
-PART_ID=83
.include "${.CURDIR}/../Makefile.inc"
diff --git a/distrib/armv7/ramdisk/install.md b/distrib/armv7/ramdisk/install.md
index e3b54c29e5f..3f42f2f13ad 100644
--- a/distrib/armv7/ramdisk/install.md
+++ b/distrib/armv7/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.31 2016/05/25 00:20:09 jsg Exp $
+# $OpenBSD: install.md,v 1.32 2016/05/26 00:34:50 jsg Exp $
#
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -60,9 +60,7 @@ SANESETS="bsd"
DEFAULTSETS="bsd bsd.rd ${MDSETS}"
NEWFSARGS_msdos="-F 16 -L boot"
-NEWFSARGS_ext2fs="-v boot"
MOUNT_ARGS_msdos="-o-l"
-MOUNT_ARGS_ext2fs=
md_installboot() {
local _disk=$1
@@ -75,10 +73,6 @@ md_installboot() {
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 [[ ${MDPLAT} == "IMX" && ! -n $WANDBOARD ]]; then
- mount_args=${MOUNT_ARGS_ext2fs}
- fi
-
mount ${mount_args} /dev/${_disk}i /mnt/mnt
# extracted on all machines, so make snap works.
@@ -139,26 +133,12 @@ md_prep_fdisk() {
local _disk=$1 _d
local bootparttype="C"
- local bootsectorstart="64"
+ local bootsectorstart="2048"
local bootsectorsize="32768"
- local bootsectorend
+ local bootsectorend=$(($bootsectorstart + $bootsectorsize))
local bootfstype="msdos"
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" && ! -n $WANDBOARD ]]; then
- bootparttype="83"
- bootfstype="ext2fs"
- newfs_args=${NEWFSARGS_ext2fs}
- fi
- if [[ -n $CUBOX || -n $WANDBOARD ]]; then
- bootsectorstart="2048"
- fi
- bootsectorend=$(($bootsectorstart + $bootsectorsize))
-
while :; do
_d=whole
if disk_has $_disk mbr; then