mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 09:51:57 -05:00
Build: Add FreeBSD support (#1492)
This commit is contained in:
parent
bceabd7c4b
commit
c64b5e73f5
5 changed files with 18 additions and 3 deletions
|
@ -24,6 +24,9 @@ if [ "$(uname -s)" = "OpenBSD" ]; then
|
|||
VND=$(vnconfig _disk_image)
|
||||
(echo "e 0"; echo 83; echo n; echo 0; echo "*"; echo "quit") | fdisk -e "$VND"
|
||||
mkfs.ext2 -I 128 -F "/dev/${VND}i" || die "could not create filesystem"
|
||||
elif [ "$(uname -s)" = "FreeBSD" ]; then
|
||||
MD=$(mdconfig _disk_image)
|
||||
mke2fs -q -I 128 _disk_image || die "could not create filesystem"
|
||||
else
|
||||
if [ -x /sbin/mke2fs ]; then
|
||||
/sbin/mke2fs -q -I 128 _disk_image || die "could not create filesystem"
|
||||
|
@ -39,6 +42,8 @@ if [ "$(uname -s)" = "Darwin" ]; then
|
|||
fuse-ext2 _disk_image mnt -o rw+,allow_other,uid=501,gid=20 || die "could not mount filesystem"
|
||||
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"
|
||||
else
|
||||
mount _disk_image mnt/ || die "could not mount filesystem"
|
||||
fi
|
||||
|
@ -50,7 +55,9 @@ cleanup() {
|
|||
umount mnt || ( sleep 1 && sync && umount mnt )
|
||||
rm -rf mnt
|
||||
if [ "$(uname -s)" = "OpenBSD" ]; then
|
||||
vnconfig -u "$VND"
|
||||
vnconfig -u "$VND"
|
||||
elif [ "$(uname -s)" = "FreeBSD" ]; then
|
||||
mdconfig -d -u "$MD"
|
||||
fi
|
||||
echo "done"
|
||||
fi
|
||||
|
|
|
@ -105,7 +105,7 @@ printf "installing userland... "
|
|||
|
||||
if [ "$(uname -s)" = "Darwin" ]; then
|
||||
find ../Userland/ -type f -perm +111 -exec cp {} mnt/bin/ \;
|
||||
elif [ "$(uname -s)" = "OpenBSD" ]; then
|
||||
elif [ "$(uname -s)" = "OpenBSD" ] || [ "$(uname -s)" = "FreeBSD" ]; then
|
||||
find ../Userland/ -type f -perm -555 -exec cp {} mnt/bin/ \;
|
||||
else
|
||||
find ../Userland/ -type f -executable -exec cp {} mnt/bin/ \;
|
||||
|
|
|
@ -20,7 +20,7 @@ sudo id
|
|||
|
||||
MAKE="make"
|
||||
|
||||
if [ "$(uname -s)" = "OpenBSD" ]; then
|
||||
if [ "$(uname -s)" = "OpenBSD" ] || [ "$(uname -s)" = "FreeBSD" ]; then
|
||||
MAKE="gmake"
|
||||
fi
|
||||
|
||||
|
|
|
@ -26,6 +26,10 @@ if [ `uname -s` = "OpenBSD" ]; then
|
|||
export CXX=eg++
|
||||
export with_gmp=/usr/local
|
||||
export LDFLAGS=-Wl,-z,notext
|
||||
elif [ `uname -s` = "FreeBSD" ]; then
|
||||
MAKE=gmake
|
||||
MD5SUM="md5 -q"
|
||||
NPROC="sysctl -n hw.ncpu"
|
||||
fi
|
||||
|
||||
echo PREFIX is "$PREFIX"
|
||||
|
|
|
@ -24,6 +24,10 @@ if [ `uname -s` = "OpenBSD" ]; then
|
|||
export CXX=eg++
|
||||
export with_gmp=/usr/local
|
||||
export LDFLAGS=-Wl,-z,notext
|
||||
elif [ `uname -s` = "FreeBSD" ]; then
|
||||
MAKE=gmake
|
||||
MD5SUM="md5 -q"
|
||||
NPROC="sysctl -n hw.ncpu"
|
||||
fi
|
||||
|
||||
echo PREFIX is "$PREFIX"
|
||||
|
|
Loading…
Reference in a new issue