summaryrefslogtreecommitdiff
path: root/Meta
diff options
context:
space:
mode:
authorLaurent Cimon <laurent@nilio.ca>2020-10-17 16:25:13 -0400
committerAndreas Kling <kling@serenityos.org>2020-10-20 14:40:47 +0200
commitb4790010a8889e617fa60295f91080e1e0546d01 (patch)
treeada1014ad255591b40cc701c4658dd76cf5e0362 /Meta
parenta82c56f9f7eb19fa6ac8a09cb7845cf681006f47 (diff)
downloadserenity-b4790010a8889e617fa60295f91080e1e0546d01.zip
Build: Modify various parts to allow the build to succeed on FreeBSD
Diffstat (limited to 'Meta')
-rwxr-xr-xMeta/build-image-qemu.sh2
-rwxr-xr-xMeta/build-root-filesystem.sh7
2 files changed, 5 insertions, 4 deletions
diff --git a/Meta/build-image-qemu.sh b/Meta/build-image-qemu.sh
index 82f391610d..a6acf8d9cb 100755
--- a/Meta/build-image-qemu.sh
+++ b/Meta/build-image-qemu.sh
@@ -54,7 +54,7 @@ if [ "$(uname -s)" = "Darwin" ]; then
elif [ "$(uname -s)" = "OpenBSD" ]; then
mount -t ext2fs "/dev/${VND}i" mnt/ || die "could not mount filesystem"
elif [ "$(uname -s)" = "FreeBSD" ]; then
- fuse-ext2 -o rw+ "/dev/${MD}" mnt/ || die "could not mount filesystem"
+ fuse-ext2 -o rw+,direct_io "/dev/${MD}" mnt/ || die "could not mount filesystem"
else
if ! mount _disk_image mnt/ ; then
if command -v genext2fs 1>/dev/null ; then
diff --git a/Meta/build-root-filesystem.sh b/Meta/build-root-filesystem.sh
index a66a13e1b4..e2a9addfe8 100755
--- a/Meta/build-root-filesystem.sh
+++ b/Meta/build-root-filesystem.sh
@@ -12,10 +12,11 @@ window_gid=13
CP="cp"
-# cp on macOS does not support the -d option.
+# cp on macOS and BSD systems do not support the -d option.
# gcp comes with coreutils, which is already a dependency.
-if [ "$(uname -s)" = "Darwin" ]; then
- CP=gcp
+OS="$(uname -s)"
+if [ "$OS" = "Darwin" ] || echo "$OS" | grep -qe 'BSD$'; then
+ CP="gcp"
fi
die() {