Avoid using non-portable dd conv=osync option
The same thing can be achieved using the bs=$SIZE and conv=sync options. Unlike conv=osync, conv=sync is support on both Linux and macOS. Reviewed By: imp, jhb (earlier version) Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D24788
This commit is contained in:
parent
4a6ee281d9
commit
87c5e64c64
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=360894
@ -66,7 +66,7 @@ BOOT2SIZE= 7680
|
|||||||
boot2: boot2.ld
|
boot2: boot2.ld
|
||||||
@set -- `ls -l ${.ALLSRC}`; x=$$((${BOOT2SIZE}-$$5)); \
|
@set -- `ls -l ${.ALLSRC}`; x=$$((${BOOT2SIZE}-$$5)); \
|
||||||
echo "$$x bytes available"; test $$x -ge 0
|
echo "$$x bytes available"; test $$x -ge 0
|
||||||
${DD} if=${.ALLSRC} of=${.TARGET} obs=${BOOT2SIZE} conv=osync
|
${DD} if=${.ALLSRC} of=${.TARGET} bs=${BOOT2SIZE} conv=sync
|
||||||
|
|
||||||
boot2.ld: boot2.ldr boot2.bin ${BTXKERN}
|
boot2.ld: boot2.ldr boot2.bin ${BTXKERN}
|
||||||
btxld -v -E ${ORG2} -f bin -b ${BTXKERN} -l boot2.ldr \
|
btxld -v -E ${ORG2} -f bin -b ${BTXKERN} -l boot2.ldr \
|
||||||
|
@ -31,7 +31,7 @@ CLEANFILES+= ${BOOT}.tmp
|
|||||||
|
|
||||||
${BOOT}: ${LDR} ${LOADER}
|
${BOOT}: ${LDR} ${LOADER}
|
||||||
cat ${LDR} ${LOADER} > ${.TARGET}.tmp
|
cat ${LDR} ${LOADER} > ${.TARGET}.tmp
|
||||||
${DD} if=${.TARGET}.tmp of=${.TARGET} obs=2k conv=osync
|
${DD} if=${.TARGET}.tmp of=${.TARGET} bs=2048 conv=sync
|
||||||
rm ${.TARGET}.tmp
|
rm ${.TARGET}.tmp
|
||||||
|
|
||||||
LDFLAGS+=${LDFLAGS_BIN}
|
LDFLAGS+=${LDFLAGS_BIN}
|
||||||
|
@ -62,7 +62,7 @@ BOOT2SIZE= 262144
|
|||||||
zfsboot2: zfsboot.ld
|
zfsboot2: zfsboot.ld
|
||||||
@set -- `ls -l ${.ALLSRC}`; x=$$((${BOOT2SIZE}-$$5)); \
|
@set -- `ls -l ${.ALLSRC}`; x=$$((${BOOT2SIZE}-$$5)); \
|
||||||
echo "$$x bytes available"; test $$x -ge 0
|
echo "$$x bytes available"; test $$x -ge 0
|
||||||
${DD} if=${.ALLSRC} of=${.TARGET} obs=${BOOT2SIZE} conv=osync
|
${DD} if=${.ALLSRC} of=${.TARGET} bs=${BOOT2SIZE} conv=sync
|
||||||
|
|
||||||
zfsboot.ld: zfsboot.ldr zfsboot.bin ${BTXKERN}
|
zfsboot.ld: zfsboot.ldr zfsboot.bin ${BTXKERN}
|
||||||
btxld -v -E ${ORG2} -f bin -b ${BTXKERN} -l zfsboot.ldr \
|
btxld -v -E ${ORG2} -f bin -b ${BTXKERN} -l zfsboot.ldr \
|
||||||
|
Loading…
Reference in New Issue
Block a user