summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2021-08-28 13:43:55 -0400
committerLinus Groh <mail@linusgroh.de>2021-08-28 21:51:30 +0100
commit585edb8cff5451cfeb057fe8c3317712965d89b6 (patch)
tree33916e2e82fa3baf242de011b78fbd81690051a4 /Kernel
parent9c5e947e0ed357acd24f5893f5ffa9bc65c69a20 (diff)
downloadserenity-585edb8cff5451cfeb057fe8c3317712965d89b6.zip
Kernel: Omit all actual code from the kernel on aarch64 for now
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/Arch/aarch64/dummy.cpp10
-rw-r--r--Kernel/CMakeLists.txt40
2 files changed, 36 insertions, 14 deletions
diff --git a/Kernel/Arch/aarch64/dummy.cpp b/Kernel/Arch/aarch64/dummy.cpp
new file mode 100644
index 0000000000..dfa2fa8039
--- /dev/null
+++ b/Kernel/Arch/aarch64/dummy.cpp
@@ -0,0 +1,10 @@
+/*
+ * Copyright (c) 2021, Nico Weber <thakis@chromium.org>
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+// This is a temporary file to get a non-empty Kernel binary on aarch64.
+// The prekernel currently never jumps to the kernel. This is dead code.
+void dummy();
+void dummy() { }
diff --git a/Kernel/CMakeLists.txt b/Kernel/CMakeLists.txt
index 8978869ce3..65e35c1c9b 100644
--- a/Kernel/CMakeLists.txt
+++ b/Kernel/CMakeLists.txt
@@ -344,14 +344,21 @@ set(CRYPTO_SOURCES
../Userland/Libraries/LibCrypto/Hash/SHA2.cpp
)
-set(SOURCES
- ${KERNEL_SOURCES}
- ${AK_SOURCES}
- ${ELF_SOURCES}
- ${VT_SOURCES}
- ${KEYBOARD_SOURCES}
- ${CRYPTO_SOURCES}
-)
+if (NOT "${SERENITY_ARCH}" STREQUAL "aarch64")
+ set(SOURCES
+ ${KERNEL_SOURCES}
+ ${SOURCES}
+ ${AK_SOURCES}
+ ${ELF_SOURCES}
+ ${VT_SOURCES}
+ ${KEYBOARD_SOURCES}
+ ${CRYPTO_SOURCES}
+ )
+else()
+ set(SOURCES
+ Arch/aarch64/dummy.cpp
+ )
+endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unknown-warning-option -Wvla -Wnull-dereference")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti -ffreestanding -fbuiltin")
@@ -450,7 +457,9 @@ if (USE_CLANG_TOOLCHAIN)
add_link_options(LINKER:--build-id=none)
endif()
-add_library(kernel_heap STATIC ${KERNEL_HEAP_SOURCES})
+if (NOT "${SERENITY_ARCH}" STREQUAL "aarch64")
+ add_library(kernel_heap STATIC ${KERNEL_HEAP_SOURCES})
+endif()
if (${CMAKE_HOST_SYSTEM_NAME} MATCHES SerenityOS)
include_directories(/usr/local/include/c++/${GCC_VERSION}/)
@@ -491,13 +500,16 @@ if (ENABLE_KERNEL_LTO)
set_property(TARGET Kernel PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
endif()
-if (USE_CLANG_TOOLCHAIN)
- target_link_libraries(Kernel kernel_heap clang_rt.builtins-${SERENITY_CLANG_ARCH})
-else()
- target_link_libraries(Kernel kernel_heap gcc)
+if (NOT "${SERENITY_ARCH}" STREQUAL "aarch64")
+ if (USE_CLANG_TOOLCHAIN)
+ target_link_libraries(Kernel kernel_heap clang_rt.builtins-${SERENITY_CLANG_ARCH})
+ else()
+ target_link_libraries(Kernel kernel_heap gcc)
+ endif()
+
+ add_dependencies(Kernel kernel_heap)
endif()
-add_dependencies(Kernel kernel_heap)
add_custom_command(
TARGET Kernel POST_BUILD