diff options
author | etaIneLp <33374857+etaIneLp@users.noreply.github.com> | 2020-05-28 04:08:38 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-28 10:08:38 +0200 |
commit | 330aecb5d8982ee3823909908993e4284cf1b7c9 (patch) | |
tree | a1f7af00b1ef3e01b700262d8716719fd857be48 | |
parent | 7bc871ca8dd851605bfd67cb5be1538d009aa56b (diff) | |
download | serenity-330aecb5d8982ee3823909908993e4284cf1b7c9.zip |
Build: Use a separate byproduct name for the GRUB disk image (#2424)
The grub-image target no longer conflicts with normal image target.
This unbreaks using CMake with Ninja.
Fixes #2423.
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | INSTALL.md | 6 | ||||
-rwxr-xr-x | Meta/build-image-grub.sh | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6294e7c994..95c36d29bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ add_custom_target(run add_custom_target(grub-image COMMAND ${CMAKE_COMMAND} -E env "SERENITY_ROOT=${CMAKE_SOURCE_DIR}" ${CMAKE_SOURCE_DIR}/Meta/build-image-grub.sh - BYPRODUCTS ${CMAKE_BINARY_DIR}/_disk_image + BYPRODUCTS ${CMAKE_BINARY_DIR}/grub_disk_image USES_TERMINAL ) diff --git a/INSTALL.md b/INSTALL.md index 07345f3e2a..6232b6a4eb 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -17,12 +17,12 @@ At present there is no real GPU support so don't expect OpenGL, Vulkan nor accel ## Creating a Serenity GRUB disk image -Before creating a Serenity disk image, you need to build the OS as described in the [SerenityOS build instructions](https://github.com/SerenityOS/serenity/blob/master/Documentation/BuildInstructions.md). Follow those instructions up to and including running **make install**. After the OS has built, run **sudo make grub-image** to replace the qemu **_disk_image** file in the Build directory with one that has GRUB2 installed that can be booted on a real PC. +Before creating a Serenity disk image, you need to build the OS as described in the [SerenityOS build instructions](https://github.com/SerenityOS/serenity/blob/master/Documentation/BuildInstructions.md). Follow those instructions up to and including running **make install**. After the OS has built, run **sudo make grub-image** to create a new file called **grub_disk_image** that has GRUB2 installed that can be booted on a real PC. -The final step is copying **_disk_image** onto the disk you wish to boot Serenity off using a command such as: +The final step is copying **grub_disk_image** onto the disk you wish to boot Serenity off using a command such as: ``` -$ sudo dd if=_disk_image of=/dev/sdx bs=8M +$ sudo dd if=grub_disk_image of=/dev/sdx bs=8M ``` Replace **/dev/sdx** with the target device. The **bs=8M** argument is optional but will speed up the data transfer. diff --git a/Meta/build-image-grub.sh b/Meta/build-image-grub.sh index 985323e4a9..019761dd9d 100755 --- a/Meta/build-image-grub.sh +++ b/Meta/build-image-grub.sh @@ -22,12 +22,12 @@ fi echo "using grub-install at ${grub}" echo "setting up disk image..." -dd if=/dev/zero of=_disk_image bs=1M count="${DISK_SIZE:-800}" status=none || die "couldn't create disk image" -chown "$SUDO_UID":"$SUDO_GID" _disk_image || die "couldn't adjust permissions on disk image" +dd if=/dev/zero of=grub_disk_image bs=1M count="${DISK_SIZE:-800}" status=none || die "couldn't create disk image" +chown "$SUDO_UID":"$SUDO_GID" grub_disk_image || die "couldn't adjust permissions on disk image" echo "done" printf "creating loopback device... " -dev=$(losetup --find --partscan --show _disk_image) +dev=$(losetup --find --partscan --show grub_disk_image) if [ -z "$dev" ]; then die "couldn't mount loopback device" fi |