mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:47:44 +00:00
Prekernel: Make build on aarch64
Add a dummy Arch/aarch64/boot.S that for now does nothing but let all processor cores sleep. For now, none of the actual Prekernel code is built for aarch64.
This commit is contained in:
parent
da785bd4bd
commit
9c5e947e0e
3 changed files with 45 additions and 15 deletions
16
Kernel/Prekernel/Arch/aarch64/boot.S
Normal file
16
Kernel/Prekernel/Arch/aarch64/boot.S
Normal file
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Nico Weber <thakis@chromium.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
.text
|
||||
|
||||
.global start
|
||||
.type start, @function
|
||||
start:
|
||||
b Lhalt
|
||||
|
||||
Lhalt:
|
||||
wfi
|
||||
b Lhalt
|
|
@ -1,16 +1,30 @@
|
|||
set(SOURCES
|
||||
Arch/x86/boot.S
|
||||
Arch/x86/multiboot.S
|
||||
init.cpp
|
||||
UBSanitizer.cpp
|
||||
../MiniStdLib.cpp
|
||||
../../Userland/Libraries/LibELF/Relocation.cpp
|
||||
)
|
||||
if ("${SERENITY_ARCH}" STREQUAL "aarch64")
|
||||
set(SOURCES
|
||||
${SOURCES}
|
||||
Arch/aarch64/boot.S
|
||||
)
|
||||
else()
|
||||
set(SOURCES
|
||||
${SOURCES}
|
||||
Arch/x86/boot.S
|
||||
Arch/x86/multiboot.S
|
||||
# FIXME: Eventually, some of these should build on aarch64 too.
|
||||
UBSanitizer.cpp
|
||||
init.cpp
|
||||
../MiniStdLib.cpp
|
||||
../../Userland/Libraries/LibELF/Relocation.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
if ("${SERENITY_ARCH}" STREQUAL "i686")
|
||||
set(PREKERNEL_TARGET Prekernel32)
|
||||
else()
|
||||
elseif ("${SERENITY_ARCH}" STREQUAL "x86_64")
|
||||
set(PREKERNEL_TARGET Prekernel64)
|
||||
else()
|
||||
set(PREKERNEL_TARGET Prekernel)
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static")
|
||||
|
@ -27,11 +41,13 @@ else()
|
|||
target_link_libraries(${PREKERNEL_TARGET} gcc supc++)
|
||||
endif()
|
||||
|
||||
add_custom_command(
|
||||
TARGET ${PREKERNEL_TARGET} POST_BUILD
|
||||
COMMAND ${CMAKE_OBJCOPY} -O elf32-i386 ${CMAKE_CURRENT_BINARY_DIR}/${PREKERNEL_TARGET} ${CMAKE_CURRENT_BINARY_DIR}/Prekernel
|
||||
BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/Prekernel
|
||||
)
|
||||
if ("${SERENITY_ARCH}" STREQUAL "i686" OR "${SERENITY_ARCH}" STREQUAL "x86_64")
|
||||
add_custom_command(
|
||||
TARGET ${PREKERNEL_TARGET} POST_BUILD
|
||||
COMMAND ${CMAKE_OBJCOPY} -O elf32-i386 ${CMAKE_CURRENT_BINARY_DIR}/${PREKERNEL_TARGET} ${CMAKE_CURRENT_BINARY_DIR}/Prekernel
|
||||
BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/Prekernel
|
||||
)
|
||||
endif()
|
||||
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/Prekernel" DESTINATION boot)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue