Kernel: Add post build step to generate kernel8.img

Add a postbuild step which creates a raw binary file called kernel8.img
from the Prekernel elf file.
This commit is contained in:
James Mintram 2021-10-13 22:43:02 +01:00 committed by Linus Groh
commit d92967406a
Notes: sideshowbarker 2024-07-18 03:35:30 +09:00

View file

@ -61,6 +61,14 @@ if ("${SERENITY_ARCH}" STREQUAL "i686" OR "${SERENITY_ARCH}" STREQUAL "x86_64")
)
endif()
if ("${SERENITY_ARCH}" STREQUAL "aarch64")
add_custom_command(
TARGET Prekernel POST_BUILD
COMMAND ${CMAKE_OBJCOPY} -O binary Prekernel kernel8.img
BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/kernel8.img
)
endif()
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/Prekernel" DESTINATION boot)
# Remove options which the Prekernel environment doesn't support.