aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2015-03-26 02:02:51 +0000
committerGlen Barber <gjb@FreeBSD.org>2015-03-26 02:02:51 +0000
commitff67b7d13a6abddfd866e52bbacd9c1b8aa42f82 (patch)
treed3c562cd28f94fe4cdebc7f0f57baaf2a06f22b7
parent993137c18aa170eebff5dbfa68ca7513f4a0eb5b (diff)
downloadsrc-ff67b7d13a6abddfd866e52bbacd9c1b8aa42f82.tar.gz
src-ff67b7d13a6abddfd866e52bbacd9c1b8aa42f82.zip
Create the md(4) device for the /boot msdosfs GPT partition.
Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/projects/release-arm-redux/; revision=280650
-rw-r--r--release/Makefile.arm21
1 files changed, 20 insertions, 1 deletions
diff --git a/release/Makefile.arm b/release/Makefile.arm
index b1c094fda1a4..8bc58a89327a 100644
--- a/release/Makefile.arm
+++ b/release/Makefile.arm
@@ -10,6 +10,7 @@ BOARDS?= BEAGLEBONE \
ARMTARGETS?=
ARMSIZE?= 1G
+BOOTSIZE?= 4m
ARM_WFLAGS?= CROSS_TOOLCHAIN=armv6-gcc
ARMPORTS?=
@@ -20,7 +21,8 @@ CLEANFILES+= arm-all
. for BOARD in ${BOARDS}
ARMTARGETS+= arm-${BOARD:tl}
ARMBEFORECLEAN+= arm-mdclean${BOARD:tl}
-CLEANDIRS+= arm-${BOARD:tl}
+CLEANDIRS+= arm-${BOARD:tl} \
+ arm-${BOARD:tl}-boot
CLEANFILES+= arm-buildworld${BOARD:tl} \
arm-buildkernel${BOARD:tl} \
arm-installworld${BOARD:tl} \
@@ -28,11 +30,15 @@ CLEANFILES+= arm-buildworld${BOARD:tl} \
${${BOARD:tu}IMAGE} \
${${BOARD:tu}MDDEV} \
${${BOARD:tu}MDFILE} \
+ ${${BOARD:tu}BOOTDEV} \
+ ${${BOARD:tu}BOOTFILE} \
build-arm-${BOARD:tl} \
build-arm-ports${BOARD:tl}
${BOARD:tu}IMAGE= arm-${BOARD:tu}.img
${BOARD:tu}MDDEV= arm-${BOARD:tu}.mddev
${BOARD:tu}MDFILE= arm-${BOARD:tu}.raw
+${BOARD:tu}BOOTDEV= arm-${BOARD:tu}.bootdev
+${BOARD:tu}BOOTFILE= arm-${BOARD:tu}.boot
. if exists(${.CURDIR}/arm/Makefile.${BOARD})
. include "${.CURDIR}/arm/Makefile.${BOARD}"
. endif
@@ -42,6 +48,10 @@ arm-mdclean${BOARD:tl}:
umount ${${BOARD:tu}MDFILE} || true
mdconfig -d -u $$(cat ${${BOARD:tu}MDDEV})
.endif
+.if exists(${${BOARD:tu}BOOTDEV})
+ umount ${${BOARD:tu}BOOTFILE} || true
+ mdconfig -d -u $$(cat ${${BOARD:tu}BOOTDEV})
+.endif
arm-${BOARD:tl}: arm-buildworld${BOARD:tl} arm-buildkernel${BOARD:tl} \
arm-installworld${BOARD:tl} arm-installkernel${BOARD:tl}
@@ -78,6 +88,15 @@ arm-mkfs${BOARD:tl}:
mount /dev/$$(cat ${.OBJDIR}/${${BOARD:tu}MDDEV}) \
${.OBJDIR}/arm-${BOARD:tl}
.endif
+.if !exists(${${BOARD:tu}BOOTDEV})
+ mkdir -p ${.OBJDIR}/arm-${BOARD:tl}-boot
+ truncate -s ${BOOTSIZE} ${.OBJDIR}/${${BOARD:tu}BOOTFILE}
+ echo $$(mdconfig -f ${.OBJDIR}/${${BOARD:tu}BOOTFILE}) > \
+ ${.OBJDIR}/${${BOARD:tu}BOOTDEV}
+ newfs_msdos -S 4096 /dev/$$(cat ${.OBJDIR}/${${BOARD:tu}BOOTDEV})
+ mount /dev/$$(cat ${.OBJDIR}/${${BOARD:tu}BOOTDEV}) \
+ ${.OBJDIR}/arm-${BOARD:tl}-boot
+.endif
build-arm-ports${BOARD:tl}:
. if defined(ARMPORTS) && !empty(ARMPORTS)