summaryrefslogtreecommitdiff
path: root/distrib
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2019-10-31 00:37:26 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2019-10-31 00:37:26 +0000
commit0ca4ed7a17a0e24be56f33c9b909c92aa03c601d (patch)
tree6863a8d6ec53d4428ea243e630cb082df8108520 /distrib
parente0f2d780450c92ba8f37395edac26473166cbebb (diff)
When writing to a raw vnd device with dd if the input file size is not a
multiple of bs use conv=sync to zero pad the final record. Avoids "vnd0: sloppy write from proc" messages when building arm releases. tested by deraadt@
Diffstat (limited to 'distrib')
-rw-r--r--distrib/arm64/ramdisk/Makefile4
-rw-r--r--distrib/armv7/miniroot/Makefile.inc7
2 files changed, 6 insertions, 5 deletions
diff --git a/distrib/arm64/ramdisk/Makefile b/distrib/arm64/ramdisk/Makefile
index fa5ef18c237..d608893d55a 100644
--- a/distrib/arm64/ramdisk/Makefile
+++ b/distrib/arm64/ramdisk/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.16 2019/10/03 10:26:38 jsg Exp $
+# $OpenBSD: Makefile,v 1.17 2019/10/31 00:37:25 jsg Exp $
FS= miniroot${OSrev}.fs
FSSIZE= 67584
@@ -55,7 +55,7 @@ ${FS}: bsd.rd
echo bootaa64.efi > ${MOUNT_POINT}/efi/boot/startup.nsh
echo 'arm_64bit=1\nenable_uart=1\nkernel=u-boot.bin' > ${MOUNT_POINT}/config.txt
dd if=${PUBOOT}/pine64_plus/u-boot-sunxi-with-spl.bin \
- of=/dev/r`cat vnd`c bs=1024 seek=8
+ of=/dev/r`cat vnd`c bs=1024 seek=8 conv=sync
umount ${MOUNT_POINT}
newfs -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a
mount /dev/`cat vnd`a ${MOUNT_POINT}
diff --git a/distrib/armv7/miniroot/Makefile.inc b/distrib/armv7/miniroot/Makefile.inc
index 7298f169186..bd6e132572f 100644
--- a/distrib/armv7/miniroot/Makefile.inc
+++ b/distrib/armv7/miniroot/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.24 2019/09/25 06:20:22 jsg Exp $
+# $OpenBSD: Makefile.inc,v 1.25 2019/10/31 00:37:25 jsg Exp $
FS= miniroot-${BOARD}-${OSrev}.fs
FSSIZE= 67584 # ffs+msdos, actually
@@ -37,11 +37,12 @@ ${FS}: bsd.rd
.endif
.if ${BOARD} == "cubox" || ${BOARD} == "wandboard"
dd if=${PUBOOT}/${UBOOT}/SPL of=/dev/r`cat vnd`c bs=1024 seek=1
- dd if=${PUBOOT}/${UBOOT}/u-boot.img of=/dev/r`cat vnd`c bs=1024 seek=69
+ dd if=${PUBOOT}/${UBOOT}/u-boot.img of=/dev/r`cat vnd`c \
+ bs=1024 seek=69 conv=sync
.endif
.if ${PLATFORM} == "SUNXI"
dd if=${PUBOOT}/${UBOOT}/u-boot-sunxi-with-spl.bin \
- of=/dev/r`cat vnd`c bs=1024 seek=8
+ of=/dev/r`cat vnd`c bs=1024 seek=8 conv=sync
.endif
mkdir -p ${MOUNT_POINT}/efi/boot