[feat] Add CMake support #14

Merged
hgruniaux merged 9 commits from cmake-new into main 2024-02-29 13:56:42 +01:00
hgruniaux commented 2024-02-28 17:29:54 +01:00 (Migrated from github.com)

To call CMake:

mkdir build
cd build
# You may need to specify GCC_PREFIX depending on your Linux distribution or where
# you installed the GCC cross-compiler for aarch64.
cmake .. -DGCC_PREFIX=aarch64-linux-gnu-
make

You need to install a valid GCC for aarch64. GCC_PREFIX is a CMake variable such that:

  • ${GCC_PREFIX}gcc will be the C compiler and assembler
  • ${GCC_PREFIX}g++ will be the C++ compiler
  • ${GCC_PREFIX}ld will be the linker

By default, GCC_PREFIX is set to aarch64-linux-gnu-.

Fix #10
Fix #11

To call CMake: ```bash mkdir build cd build # You may need to specify GCC_PREFIX depending on your Linux distribution or where # you installed the GCC cross-compiler for aarch64. cmake .. -DGCC_PREFIX=aarch64-linux-gnu- make ``` You need to install a valid GCC for aarch64. `GCC_PREFIX` is a CMake variable such that: - `${GCC_PREFIX}gcc` will be the C compiler and assembler - `${GCC_PREFIX}g++` will be the C++ compiler - `${GCC_PREFIX}ld` will be the linker By default, `GCC_PREFIX` is set to `aarch64-linux-gnu-`. Fix #10 Fix #11
desfreng (Migrated from github.com) reviewed 2024-02-28 17:29:54 +01:00
hgruniaux (Migrated from github.com) reviewed 2024-02-29 11:02:26 +01:00
hgruniaux (Migrated from github.com) commented 2024-02-29 11:02:11 +01:00

Changing only the indentation... Should we keep 2-spaces (this is the current setting) indentation or 4-spaces?

Changing only the indentation... Should we keep 2-spaces (this is the current setting) indentation or 4-spaces?
hgruniaux (Migrated from github.com) commented 2024-02-29 11:00:11 +01:00

We should keep .elf as QEMU support the ELF format. This avoid the extra objcopy step and probably also keep debug information if we connect gdb to QEMU.

Let only use .bin when flashing the kernel into the real hardware.

We should keep .elf as QEMU support the ELF format. This avoid the extra objcopy step and probably also keep debug information if we connect gdb to QEMU. Let only use .bin when flashing the kernel into the real hardware.
@ -0,0 +1,27 @@
file(GLOB_RECURSE KERNEL_SRC_FILES "*.S" "*.cpp" "*.hpp")
hgruniaux (Migrated from github.com) commented 2024-02-29 11:01:22 +01:00

More extracting than converting. But is not that important.

More extracting than converting. But is not that important.
Sign in to join this conversation.
No description provided.