Commit graph

18 commits

Author SHA1 Message Date
Martin Åberg 0ed2a03450 Meta: Assume and find GNU du
We want to use use the 'du' option '--apparent-size' which is a
GNU coreutils extension. GNU coreutils is a build dependency so
we know it is available. With this commit we first try to pick up
du as 'gdu', and if that fails, try 'du' instead.
2021-08-18 10:59:50 +02:00
Martin Åberg 0bf867bb9a Meta: Create memory disk before mounting it on FreeBSD
There was previously a case where the build-image-qemu.sh script
decided to mount an existing disk image, but without creating the
memory disk device and recording its /dev file name.

After this commit, We create the memory disk device just before
it is used to mount the disk image.
2021-08-18 10:25:00 +02:00
Jean-Baptiste Boric f641cc6470 Meta: Tune default QEMU disk size
Having lots of small files in Base/ may require more inodes in the
ext2 filesystem than the format utility sets aside by default. Let's
make a more educated guess since we have a rough idea of how many
inodes we need by counting files and directories.
2021-08-13 08:04:59 +02:00
Gunnar Beutner cc0914ae58 Meta: Add Homebrew paths for macOS on M1 to the PATH env variable 2021-07-24 14:04:13 +02:00
Gunnar Beutner 0ec1077bcb Meta: Prefer to use the QEMU binaries from the toolchain directory 2021-07-03 12:06:20 +02:00
Gunnar Beutner 6e094b8dbe Meta: Increase additional space for disk images
Previously we'd add 100MB on top of what du returned for the Root
directory. This increases that to 500MB.
2021-06-17 11:03:51 +02:00
Siddharth Kapoor dbd9d13857
Meta: Run 'du' with '--apparent-size', except on macOS
Fixes #7172.
2021-05-16 22:50:46 +01:00
Eric Butler 1a48609c6b Meta: Always try genext2fs as fallback to build disk image
If mounting disk image fails (e.g. fuse is not available on macos),
always try using genext2fs before giving up.
2021-05-09 15:34:12 +02:00
Gunnar Beutner 479905be6c Meta: Re-use existing disk image where possible
This adds support for re-using and re-sizing existing disk images.
Disk images are checked with e2fsck prior to re-use and a new disk
image is automatically created when that check fails.
2021-04-23 22:34:05 +02:00
Panagiotis Vasilopoulos e45e0eeb47 Everywhere: Replace SERENITY_ROOT with SERENITY_SOURCE_DIR 2021-04-20 15:27:52 +02:00
joshua stein 0d215b5548 Build: Sprinkle some portability, fix on OpenBSD
realpath(1) is specific to coreutils and its behavior can be had
with readlink -f

Create the Toolchain Build directory if it doesn't exist before
calling readlink, since realpath(3) on at least OpenBSD will error
on a non-existent path
2021-02-14 09:29:22 +01:00
Laurent Cimon b4790010a8 Build: Modify various parts to allow the build to succeed on FreeBSD 2020-10-20 14:40:47 +02:00
Peter Elliott fc425a218d Meta: Fix style of image building scripts
Oops. I didn't know there was a style guide for the scripts.
2020-07-28 19:09:44 +02:00
Peter Elliott 6f12ab3ced Meta: Calculate image size based on size of Build/Root and Base
This reduces the size of the default build, while allowing people to
install as many ports as they want, without having to manually specify
disk size.
2020-07-28 18:32:05 +02:00
Emanuele Torre 8e24a17d0d Meta: default SUDO_UID and SUDO_GID to 0 in build-image-*.sh scripts
In the GNU coreutils version of chown, ":" is a valid argument
(the command will result in a no-op), but POSIX chown does not
consider that valid.

If the user who ran build-image-*.sh was root, SUDO_UID and SUDO_GID
would not be set and, if the version of chown installed on the system
did not allow passing just a ":" as argument, the script would fail.

Let's default the value of SUDO_UID and SUDO_GID to 0 just in case.
2020-06-21 10:13:04 +02:00
Emanuele Torre 4a784d4d1b Meta: get rid of sync.sh using the technique used in the previous commit 2020-06-21 10:13:04 +02:00
Yonatan Goldschmidt 00c0650f96 Build: Add Dockerfile 2020-05-22 01:19:15 +02:00
Sergey Bugaev 450a2a0f9c Build: Switch to CMake :^)
Closes https://github.com/SerenityOS/serenity/issues/2080
2020-05-14 20:15:18 +02:00
Renamed from Kernel/build-image-qemu.sh (Browse further)