From 19f66b8e6bef80bbfaffef33b930d27b083e4e43 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 28 Dec 2025 20:45:41 +0000 Subject: [PATCH 1/5] Initial plan From be0439448eb695979e877a0c1cb064369049faad Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 28 Dec 2025 20:51:52 +0000 Subject: [PATCH 2/5] Fix CMake build system to work properly Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com> --- CMakeLists.txt | 24 +- cmake-build/Makefile | 382 ++++++++++++++ .../Testing/Temporary/CTestCostData.txt | 2 + cmake-build/bin/test_bootloader | Bin 0 -> 16016 bytes cmake-build/bootloader/Makefile | 272 ++++++++++ cmake-build/kernel/Makefile | 488 ++++++++++++++++++ cmake-build/tests/Makefile | 257 +++++++++ kernel/CMakeLists.txt | 2 + 8 files changed, 1422 insertions(+), 5 deletions(-) create mode 100644 cmake-build/Makefile create mode 100644 cmake-build/Testing/Temporary/CTestCostData.txt create mode 100755 cmake-build/bin/test_bootloader create mode 100644 cmake-build/bootloader/Makefile create mode 100644 cmake-build/kernel/Makefile create mode 100644 cmake-build/tests/Makefile diff --git a/CMakeLists.txt b/CMakeLists.txt index d152d2f..0888c4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,9 +53,9 @@ endif() # Custom target to create bootable image find_program(MFORMAT mformat) find_program(MCOPY mcopy) -find_program(MDD mdd) +find_program(MMD mmd) -if(MFORMAT AND MCOPY) +if(MFORMAT AND MCOPY AND MMD) add_custom_target(image COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/build/iso/EFI/BOOT COMMAND ${CMAKE_COMMAND} -E copy @@ -65,10 +65,10 @@ if(MFORMAT AND MCOPY) ${CMAKE_BINARY_DIR}/kernel/metalos.bin ${CMAKE_BINARY_DIR}/build/iso/ COMMAND ${CMAKE_COMMAND} -E echo "Creating disk image..." - COMMAND dd if=/dev/zero of=${CMAKE_BINARY_DIR}/build/metalos.img bs=1M count=64 2>/dev/null + COMMAND dd if=/dev/zero of=${CMAKE_BINARY_DIR}/build/metalos.img bs=1M count=64 COMMAND ${MFORMAT} -i ${CMAKE_BINARY_DIR}/build/metalos.img -F -v METALOS :: - COMMAND ${MDD} -i ${CMAKE_BINARY_DIR}/build/metalos.img ::/EFI - COMMAND ${MDD} -i ${CMAKE_BINARY_DIR}/build/metalos.img ::/EFI/BOOT + COMMAND ${MMD} -i ${CMAKE_BINARY_DIR}/build/metalos.img ::/EFI + COMMAND ${MMD} -i ${CMAKE_BINARY_DIR}/build/metalos.img ::/EFI/BOOT COMMAND ${MCOPY} -i ${CMAKE_BINARY_DIR}/build/metalos.img ${CMAKE_BINARY_DIR}/build/iso/EFI/BOOT/bootx64.efi ::/EFI/BOOT/ COMMAND ${MCOPY} -i ${CMAKE_BINARY_DIR}/build/metalos.img @@ -143,6 +143,20 @@ if(QEMU) COMMENT "Running MetalOS in QEMU with GDB server (port 1234)" VERBATIM ) + + add_custom_target(qemu-uefi-test + COMMAND ${CMAKE_COMMAND} -E echo "Testing QEMU UEFI boot (no OS image)..." + COMMAND ${CMAKE_COMMAND} -E echo "Using OVMF firmware: ${OVMF_FIRMWARE}" + COMMAND ${CMAKE_COMMAND} -E echo "This will boot to UEFI shell in nographic mode." + COMMAND ${CMAKE_COMMAND} -E echo "You should see UEFI boot messages. Press Ctrl-A then X to exit QEMU." + COMMAND ${QEMU} + -drive if=pflash,format=raw,readonly=on,file=${OVMF_FIRMWARE} + -m 512M + -nographic + -net none + COMMENT "Testing QEMU UEFI setup without OS image" + VERBATIM + ) else() message(WARNING "OVMF firmware not found - QEMU targets will not be available") endif() diff --git a/cmake-build/Makefile b/cmake-build/Makefile new file mode 100644 index 0000000..b6e39ff --- /dev/null +++ b/cmake-build/Makefile @@ -0,0 +1,382 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.31 + +# Default target executed when no arguments are given to make. +default_target: all +.PHONY : default_target + +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Disable VCS-based implicit rules. +% : %,v + +# Disable VCS-based implicit rules. +% : RCS/% + +# Disable VCS-based implicit rules. +% : RCS/%,v + +# Disable VCS-based implicit rules. +% : SCCS/s.% + +# Disable VCS-based implicit rules. +% : s.% + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/local/bin/cmake + +# The command to remove a file. +RM = /usr/local/bin/cmake -E rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/runner/work/MetalOS/MetalOS + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/runner/work/MetalOS/MetalOS/cmake-build + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target test +test: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running tests..." + /usr/local/bin/ctest --force-new-ctest-process $(ARGS) +.PHONY : test + +# Special rule for the target test +test/fast: test +.PHONY : test/fast + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake cache editor..." + /usr/local/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache +.PHONY : edit_cache/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..." + /usr/local/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache +.PHONY : rebuild_cache/fast + +# Special rule for the target list_install_components +list_install_components: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Available install components are: \"Unspecified\"" +.PHONY : list_install_components + +# Special rule for the target list_install_components +list_install_components/fast: list_install_components +.PHONY : list_install_components/fast + +# Special rule for the target install +install: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." + /usr/local/bin/cmake -P cmake_install.cmake +.PHONY : install + +# Special rule for the target install +install/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." + /usr/local/bin/cmake -P cmake_install.cmake +.PHONY : install/fast + +# Special rule for the target install/local +install/local: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." + /usr/local/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local + +# Special rule for the target install/local +install/local/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." + /usr/local/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local/fast + +# Special rule for the target install/strip +install/strip: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." + /usr/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip + +# Special rule for the target install/strip +install/strip/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." + /usr/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip/fast + +# The main all target +all: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/runner/work/MetalOS/MetalOS/cmake-build/CMakeFiles /home/runner/work/MetalOS/MetalOS/cmake-build//CMakeFiles/progress.marks + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 all + $(CMAKE_COMMAND) -E cmake_progress_start /home/runner/work/MetalOS/MetalOS/cmake-build/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 clean +.PHONY : clean + +# The main clean target +clean/fast: clean +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +#============================================================================= +# Target rules for targets named image + +# Build rule for target. +image: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 image +.PHONY : image + +# fast build rule for target. +image/fast: + $(MAKE) $(MAKESILENT) -f CMakeFiles/image.dir/build.make CMakeFiles/image.dir/build +.PHONY : image/fast + +#============================================================================= +# Target rules for targets named qemu + +# Build rule for target. +qemu: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 qemu +.PHONY : qemu + +# fast build rule for target. +qemu/fast: + $(MAKE) $(MAKESILENT) -f CMakeFiles/qemu.dir/build.make CMakeFiles/qemu.dir/build +.PHONY : qemu/fast + +#============================================================================= +# Target rules for targets named qemu-debug + +# Build rule for target. +qemu-debug: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 qemu-debug +.PHONY : qemu-debug + +# fast build rule for target. +qemu-debug/fast: + $(MAKE) $(MAKESILENT) -f CMakeFiles/qemu-debug.dir/build.make CMakeFiles/qemu-debug.dir/build +.PHONY : qemu-debug/fast + +#============================================================================= +# Target rules for targets named qemu-gdb + +# Build rule for target. +qemu-gdb: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 qemu-gdb +.PHONY : qemu-gdb + +# fast build rule for target. +qemu-gdb/fast: + $(MAKE) $(MAKESILENT) -f CMakeFiles/qemu-gdb.dir/build.make CMakeFiles/qemu-gdb.dir/build +.PHONY : qemu-gdb/fast + +#============================================================================= +# Target rules for targets named qemu-uefi-test + +# Build rule for target. +qemu-uefi-test: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 qemu-uefi-test +.PHONY : qemu-uefi-test + +# fast build rule for target. +qemu-uefi-test/fast: + $(MAKE) $(MAKESILENT) -f CMakeFiles/qemu-uefi-test.dir/build.make CMakeFiles/qemu-uefi-test.dir/build +.PHONY : qemu-uefi-test/fast + +#============================================================================= +# Target rules for targets named bootloader_obj + +# Build rule for target. +bootloader_obj: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 bootloader_obj +.PHONY : bootloader_obj + +# fast build rule for target. +bootloader_obj/fast: + $(MAKE) $(MAKESILENT) -f bootloader/CMakeFiles/bootloader_obj.dir/build.make bootloader/CMakeFiles/bootloader_obj.dir/build +.PHONY : bootloader_obj/fast + +#============================================================================= +# Target rules for targets named bootloader_so + +# Build rule for target. +bootloader_so: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 bootloader_so +.PHONY : bootloader_so + +# fast build rule for target. +bootloader_so/fast: + $(MAKE) $(MAKESILENT) -f bootloader/CMakeFiles/bootloader_so.dir/build.make bootloader/CMakeFiles/bootloader_so.dir/build +.PHONY : bootloader_so/fast + +#============================================================================= +# Target rules for targets named bootloader_efi + +# Build rule for target. +bootloader_efi: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 bootloader_efi +.PHONY : bootloader_efi + +# fast build rule for target. +bootloader_efi/fast: + $(MAKE) $(MAKESILENT) -f bootloader/CMakeFiles/bootloader_efi.dir/build.make bootloader/CMakeFiles/bootloader_efi.dir/build +.PHONY : bootloader_efi/fast + +#============================================================================= +# Target rules for targets named kernel_obj + +# Build rule for target. +kernel_obj: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 kernel_obj +.PHONY : kernel_obj + +# fast build rule for target. +kernel_obj/fast: + $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/build +.PHONY : kernel_obj/fast + +#============================================================================= +# Target rules for targets named kernel_elf + +# Build rule for target. +kernel_elf: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 kernel_elf +.PHONY : kernel_elf + +# fast build rule for target. +kernel_elf/fast: + $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_elf.dir/build.make kernel/CMakeFiles/kernel_elf.dir/build +.PHONY : kernel_elf/fast + +#============================================================================= +# Target rules for targets named kernel_bin + +# Build rule for target. +kernel_bin: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 kernel_bin +.PHONY : kernel_bin + +# fast build rule for target. +kernel_bin/fast: + $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_bin.dir/build.make kernel/CMakeFiles/kernel_bin.dir/build +.PHONY : kernel_bin/fast + +#============================================================================= +# Target rules for targets named test_bootloader + +# Build rule for target. +test_bootloader: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 test_bootloader +.PHONY : test_bootloader + +# fast build rule for target. +test_bootloader/fast: + $(MAKE) $(MAKESILENT) -f tests/CMakeFiles/test_bootloader.dir/build.make tests/CMakeFiles/test_bootloader.dir/build +.PHONY : test_bootloader/fast + +#============================================================================= +# Target rules for targets named run_tests + +# Build rule for target. +run_tests: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 run_tests +.PHONY : run_tests + +# fast build rule for target. +run_tests/fast: + $(MAKE) $(MAKESILENT) -f tests/CMakeFiles/run_tests.dir/build.make tests/CMakeFiles/run_tests.dir/build +.PHONY : run_tests/fast + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... edit_cache" + @echo "... install" + @echo "... install/local" + @echo "... install/strip" + @echo "... list_install_components" + @echo "... rebuild_cache" + @echo "... test" + @echo "... bootloader_efi" + @echo "... image" + @echo "... kernel_bin" + @echo "... qemu" + @echo "... qemu-debug" + @echo "... qemu-gdb" + @echo "... qemu-uefi-test" + @echo "... run_tests" + @echo "... bootloader_obj" + @echo "... bootloader_so" + @echo "... kernel_elf" + @echo "... kernel_obj" + @echo "... test_bootloader" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/cmake-build/Testing/Temporary/CTestCostData.txt b/cmake-build/Testing/Temporary/CTestCostData.txt new file mode 100644 index 0000000..eac3007 --- /dev/null +++ b/cmake-build/Testing/Temporary/CTestCostData.txt @@ -0,0 +1,2 @@ +test_bootloader 1 0.00139881 +--- diff --git a/cmake-build/bin/test_bootloader b/cmake-build/bin/test_bootloader new file mode 100755 index 0000000000000000000000000000000000000000..4bb7874d74392aad1d688491918b6149b54dbb4b GIT binary patch literal 16016 zcmeHOeQX@X6(67DU_xR$0fXZ-@seT$1+TxYe8}YN*v^_diHRKnO44QR+q19SSMT<~ z=8upzO~DY;6eOTDLPAxQsFf-zwJ24KFin6|YO8>%l9qm?Q9&2AM5a)bLdo^LnfLDY zHfN~X{?ST1(%qYR@ArH2_U-K5?C#9{{X+wRvNFM?T-+kCb=Q?j6C}f_E~l>n==lj!;3`LXQd3liHXX)l)D94%<{#bXhyo2(RB*{E%BJU*eP7;shJO%`X zCFc{v$Im*7$17Wq1cjxSH%UCN>{B$s68pe1@}?8|clsM9-ji#UAFu3CYQd8GyA61B zY6TjX*U{L;9QhG&mG&0uJ(HspmMI-UdRMXVDuBNUIJ)O|oWXBkn1|J+# zTej^K;AReWltvNQr`qffZC8;U@sB)rb2JgRN3F4_4SpwLi8%FSDriX{1RQ{Dm%*7R zgDVVWGw67HW$GiBI{~+n|kwe+T&b3*w-FGDp`r>*Zhp zePs}>AeG3sPj6BR9t&g^XIy&sxXHToJVuc-@6yZPM{;z*rRTAQrc86BE!)L_Q^0?tTV=XMUw zyk*QbEeFkrF}wQFY9X>Gz?(61o)Fm|U~{&13{1vsX9FNx=cFzBjbh+I3G8evcsE|D z*a+QYd8J}K)v_T;`#t%8w|eigN0(!?dn;A|BwT&*#c=hnDi%XMyI#2r6kKMn_p)n8 ziTz7mvVVf?lTgooco8G-e6KoxxY;bKW?X%*zM9yNEB0|@KZNY(75gn0``cc2<7tQt zBfmqjPat~;+4n2<85cY1Wj8%V?0Ut13E5T1?osUDxY)Xv-MO3CzlG-$khPbQeG2N? za)8n~g2R6voMh)e@*H>f8e%`K*smb_QDnaaP#6__`k#}`{Af4=&4+6v00h_fE-MU% zN2Fm?8B#7oMjAGO;lOKq?*bMY+4~*E-Uku8`bxyUk*Npl4XzB_491z$yY}?#J`R?y zg5^he2b^67=0E=dEX^+e7ybdtrwi9Z>)V4fuYS&$Icx0y)BNygf9qW9PmS5`KLRXQ zJ94uS?}hd1hA+z@3;Jo$7_${A6zeZIwQy;6VI3~b%X4R{8}=daI7z?{N_=N8iW@H) zGxNra=QkNIUMM%pUN&C6=v)O3D#$@)?u?3y`FQ>A>qfK4+_cl!-+lHbs2VeGI!ld* zyWfIFb|u6qub-DIeh2NcJ;2TPkNk7@!hrw_>+-iG|LXxtzxWyOGvH^y&w!r+KLdUS z{0#UR@H6l~lYugLH`SX+IMIX!Z_2ctP9z#}B6eD=+ST3`+ocWnjErb|v{k!WVoQXk zjV2r`syTMrNpH}!#?TUl)3jkLowh@ulLZXOKx1o6(*~?a^ipF9y+B4stovUqsuP(@ z$q+&wUJE3u{UUqX)kVI~BL1CMLkNLZOtMPMi0@+eSDx zDAI2cK4wjs#7V;|Ni$_z=|mh~Dk9-hJYm^&JYgp8u~ShixsZQ5mPkz(hhjMqcv)G9 zs#HI*1$mKpfq7|sNo&G3;dm$FF+1+aph_OcSbmh45Pup1qT_9gEjfGmF|8*`14B#7 zv2d*`>oVR}#66*nBx1H2L0VXjiy|Q2Rm;z+@{PC#0N+VI_;xOb&zz2eJOuI>$fF=n zf}BG+pUVw{#6quAMcI8jMA=kL*{Y?NRUQI|sK>P=Nx)u@z`o1iS%eVR!3X=P178|Q zQB^ZgRd;Lk757%|6PxPSf2RF9`Pv%!_>Q~=aFU2vD5!VfQ|Zy;4fR3z2+)6kkG%$} zY7PdrSJi!`{IgZs{zc_S0!ymuda7!At15f0K%igz4EP!FGvH^y&w!r+KLdUS{0uCd zfgnyiv5>?$GnQs0#8Q&HP!V2F$udOvmDJ|-h^wg0>kR9u&Fd0*9X8wlb}^Sg$g{MV zkk=0GqeX$dX7DuG`M%;A^2<}+I%?OFWWj3`kI{NVUdzaMK73q)3bsVgI!ZF}1~^p=hrN&PX-z=U~O zB;LW-f<*=Mj_YW7y}U+N+-^_`-zf3*qAsX_Jg!?7z;6V700#Xb+P|P!Lg4aR)X#bJ z!=&fyi1A^ll!L&nc)EWwBjM$GBCIuP@zcN%)p~g0mlnp<`_IKl=~F~?N=ylXDEaN`w~nO_8;(};>LuM zyA6uBJLDbUCI^{6A@uZg%(2EmIw>V5xdz)P>{L?d@q}aR6Y-3mOeKIfZAv(TZcPb8?4 zw#S9;*i+EN@dD_CJOR2rNh4%31m3u%e5j$K7+i<0tXKq`DLUj{=rBg{!Dar!_|Gah z4}wb$e#=$y?oZ=+5Sb;G>nQPO8|NO(UuYi|VzKaiL$!p!ZFX+HcRvSnt^@}lLo|(_{un6dI z&cuA4PqKUlZ0>?S+~o_2(c4?X<5h`{okXF~4v_kxGd^A(nSAI0%|^Y;?* z`TPrwkR+eX8@rd-&e|-vm2eBb+9_ zKji(BUOcy1z60E97oYDR=bAtXg>kA?XtVw!FyPqb{&`-@`(b(CD_(zCn8)YwJD|hk zXFkt!k2ND2RyHb;|7JeR#XxrRMUbE^N^(E!fO*_r3S`uA|2+SzAwFNfjQ8@FQ~v~K zm|*@*d5x-ItXSNV$Bwe7?;tsxqQF*z8gGTTe~t_9&p39)RNu$imAt?mk}i?;&`a;-5W)y~zLo literal 0 HcmV?d00001 diff --git a/cmake-build/bootloader/Makefile b/cmake-build/bootloader/Makefile new file mode 100644 index 0000000..afd0805 --- /dev/null +++ b/cmake-build/bootloader/Makefile @@ -0,0 +1,272 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.31 + +# Default target executed when no arguments are given to make. +default_target: all +.PHONY : default_target + +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Disable VCS-based implicit rules. +% : %,v + +# Disable VCS-based implicit rules. +% : RCS/% + +# Disable VCS-based implicit rules. +% : RCS/%,v + +# Disable VCS-based implicit rules. +% : SCCS/s.% + +# Disable VCS-based implicit rules. +% : s.% + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/local/bin/cmake + +# The command to remove a file. +RM = /usr/local/bin/cmake -E rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/runner/work/MetalOS/MetalOS + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/runner/work/MetalOS/MetalOS/cmake-build + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target test +test: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running tests..." + /usr/local/bin/ctest --force-new-ctest-process $(ARGS) +.PHONY : test + +# Special rule for the target test +test/fast: test +.PHONY : test/fast + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake cache editor..." + /usr/local/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache +.PHONY : edit_cache/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..." + /usr/local/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache +.PHONY : rebuild_cache/fast + +# Special rule for the target list_install_components +list_install_components: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Available install components are: \"Unspecified\"" +.PHONY : list_install_components + +# Special rule for the target list_install_components +list_install_components/fast: list_install_components +.PHONY : list_install_components/fast + +# Special rule for the target install +install: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." + /usr/local/bin/cmake -P cmake_install.cmake +.PHONY : install + +# Special rule for the target install +install/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." + /usr/local/bin/cmake -P cmake_install.cmake +.PHONY : install/fast + +# Special rule for the target install/local +install/local: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." + /usr/local/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local + +# Special rule for the target install/local +install/local/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." + /usr/local/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local/fast + +# Special rule for the target install/strip +install/strip: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." + /usr/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip + +# Special rule for the target install/strip +install/strip/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." + /usr/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip/fast + +# The main all target +all: cmake_check_build_system + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(CMAKE_COMMAND) -E cmake_progress_start /home/runner/work/MetalOS/MetalOS/cmake-build/CMakeFiles /home/runner/work/MetalOS/MetalOS/cmake-build/bootloader//CMakeFiles/progress.marks + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 bootloader/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/runner/work/MetalOS/MetalOS/cmake-build/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 bootloader/clean +.PHONY : clean + +# The main clean target +clean/fast: clean +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 bootloader/preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 bootloader/preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +# Convenience name for target. +bootloader/CMakeFiles/bootloader_obj.dir/rule: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 bootloader/CMakeFiles/bootloader_obj.dir/rule +.PHONY : bootloader/CMakeFiles/bootloader_obj.dir/rule + +# Convenience name for target. +bootloader_obj: bootloader/CMakeFiles/bootloader_obj.dir/rule +.PHONY : bootloader_obj + +# fast build rule for target. +bootloader_obj/fast: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f bootloader/CMakeFiles/bootloader_obj.dir/build.make bootloader/CMakeFiles/bootloader_obj.dir/build +.PHONY : bootloader_obj/fast + +# Convenience name for target. +bootloader/CMakeFiles/bootloader_so.dir/rule: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 bootloader/CMakeFiles/bootloader_so.dir/rule +.PHONY : bootloader/CMakeFiles/bootloader_so.dir/rule + +# Convenience name for target. +bootloader_so: bootloader/CMakeFiles/bootloader_so.dir/rule +.PHONY : bootloader_so + +# fast build rule for target. +bootloader_so/fast: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f bootloader/CMakeFiles/bootloader_so.dir/build.make bootloader/CMakeFiles/bootloader_so.dir/build +.PHONY : bootloader_so/fast + +# Convenience name for target. +bootloader/CMakeFiles/bootloader_efi.dir/rule: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 bootloader/CMakeFiles/bootloader_efi.dir/rule +.PHONY : bootloader/CMakeFiles/bootloader_efi.dir/rule + +# Convenience name for target. +bootloader_efi: bootloader/CMakeFiles/bootloader_efi.dir/rule +.PHONY : bootloader_efi + +# fast build rule for target. +bootloader_efi/fast: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f bootloader/CMakeFiles/bootloader_efi.dir/build.make bootloader/CMakeFiles/bootloader_efi.dir/build +.PHONY : bootloader_efi/fast + +src/main.o: src/main.c.o +.PHONY : src/main.o + +# target to build an object file +src/main.c.o: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f bootloader/CMakeFiles/bootloader_obj.dir/build.make bootloader/CMakeFiles/bootloader_obj.dir/src/main.c.o +.PHONY : src/main.c.o + +src/main.i: src/main.c.i +.PHONY : src/main.i + +# target to preprocess a source file +src/main.c.i: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f bootloader/CMakeFiles/bootloader_obj.dir/build.make bootloader/CMakeFiles/bootloader_obj.dir/src/main.c.i +.PHONY : src/main.c.i + +src/main.s: src/main.c.s +.PHONY : src/main.s + +# target to generate assembly for a file +src/main.c.s: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f bootloader/CMakeFiles/bootloader_obj.dir/build.make bootloader/CMakeFiles/bootloader_obj.dir/src/main.c.s +.PHONY : src/main.c.s + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... edit_cache" + @echo "... install" + @echo "... install/local" + @echo "... install/strip" + @echo "... list_install_components" + @echo "... rebuild_cache" + @echo "... test" + @echo "... bootloader_efi" + @echo "... bootloader_obj" + @echo "... bootloader_so" + @echo "... src/main.o" + @echo "... src/main.i" + @echo "... src/main.s" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/cmake-build/kernel/Makefile b/cmake-build/kernel/Makefile new file mode 100644 index 0000000..fe8c89d --- /dev/null +++ b/cmake-build/kernel/Makefile @@ -0,0 +1,488 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.31 + +# Default target executed when no arguments are given to make. +default_target: all +.PHONY : default_target + +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Disable VCS-based implicit rules. +% : %,v + +# Disable VCS-based implicit rules. +% : RCS/% + +# Disable VCS-based implicit rules. +% : RCS/%,v + +# Disable VCS-based implicit rules. +% : SCCS/s.% + +# Disable VCS-based implicit rules. +% : s.% + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/local/bin/cmake + +# The command to remove a file. +RM = /usr/local/bin/cmake -E rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/runner/work/MetalOS/MetalOS + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/runner/work/MetalOS/MetalOS/cmake-build + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target test +test: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running tests..." + /usr/local/bin/ctest --force-new-ctest-process $(ARGS) +.PHONY : test + +# Special rule for the target test +test/fast: test +.PHONY : test/fast + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake cache editor..." + /usr/local/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache +.PHONY : edit_cache/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..." + /usr/local/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache +.PHONY : rebuild_cache/fast + +# Special rule for the target list_install_components +list_install_components: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Available install components are: \"Unspecified\"" +.PHONY : list_install_components + +# Special rule for the target list_install_components +list_install_components/fast: list_install_components +.PHONY : list_install_components/fast + +# Special rule for the target install +install: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." + /usr/local/bin/cmake -P cmake_install.cmake +.PHONY : install + +# Special rule for the target install +install/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." + /usr/local/bin/cmake -P cmake_install.cmake +.PHONY : install/fast + +# Special rule for the target install/local +install/local: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." + /usr/local/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local + +# Special rule for the target install/local +install/local/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." + /usr/local/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local/fast + +# Special rule for the target install/strip +install/strip: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." + /usr/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip + +# Special rule for the target install/strip +install/strip/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." + /usr/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip/fast + +# The main all target +all: cmake_check_build_system + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(CMAKE_COMMAND) -E cmake_progress_start /home/runner/work/MetalOS/MetalOS/cmake-build/CMakeFiles /home/runner/work/MetalOS/MetalOS/cmake-build/kernel//CMakeFiles/progress.marks + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 kernel/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/runner/work/MetalOS/MetalOS/cmake-build/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 kernel/clean +.PHONY : clean + +# The main clean target +clean/fast: clean +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 kernel/preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 kernel/preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +# Convenience name for target. +kernel/CMakeFiles/kernel_obj.dir/rule: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 kernel/CMakeFiles/kernel_obj.dir/rule +.PHONY : kernel/CMakeFiles/kernel_obj.dir/rule + +# Convenience name for target. +kernel_obj: kernel/CMakeFiles/kernel_obj.dir/rule +.PHONY : kernel_obj + +# fast build rule for target. +kernel_obj/fast: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/build +.PHONY : kernel_obj/fast + +# Convenience name for target. +kernel/CMakeFiles/kernel_elf.dir/rule: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 kernel/CMakeFiles/kernel_elf.dir/rule +.PHONY : kernel/CMakeFiles/kernel_elf.dir/rule + +# Convenience name for target. +kernel_elf: kernel/CMakeFiles/kernel_elf.dir/rule +.PHONY : kernel_elf + +# fast build rule for target. +kernel_elf/fast: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_elf.dir/build.make kernel/CMakeFiles/kernel_elf.dir/build +.PHONY : kernel_elf/fast + +# Convenience name for target. +kernel/CMakeFiles/kernel_bin.dir/rule: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 kernel/CMakeFiles/kernel_bin.dir/rule +.PHONY : kernel/CMakeFiles/kernel_bin.dir/rule + +# Convenience name for target. +kernel_bin: kernel/CMakeFiles/kernel_bin.dir/rule +.PHONY : kernel_bin + +# fast build rule for target. +kernel_bin/fast: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_bin.dir/build.make kernel/CMakeFiles/kernel_bin.dir/build +.PHONY : kernel_bin/fast + +src/apic.o: src/apic.c.o +.PHONY : src/apic.o + +# target to build an object file +src/apic.c.o: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/apic.c.o +.PHONY : src/apic.c.o + +src/apic.i: src/apic.c.i +.PHONY : src/apic.i + +# target to preprocess a source file +src/apic.c.i: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/apic.c.i +.PHONY : src/apic.c.i + +src/apic.s: src/apic.c.s +.PHONY : src/apic.s + +# target to generate assembly for a file +src/apic.c.s: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/apic.c.s +.PHONY : src/apic.c.s + +src/gdt.o: src/gdt.c.o +.PHONY : src/gdt.o + +# target to build an object file +src/gdt.c.o: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/gdt.c.o +.PHONY : src/gdt.c.o + +src/gdt.i: src/gdt.c.i +.PHONY : src/gdt.i + +# target to preprocess a source file +src/gdt.c.i: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/gdt.c.i +.PHONY : src/gdt.c.i + +src/gdt.s: src/gdt.c.s +.PHONY : src/gdt.s + +# target to generate assembly for a file +src/gdt.c.s: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/gdt.c.s +.PHONY : src/gdt.c.s + +src/interrupts.o: src/interrupts.c.o +.PHONY : src/interrupts.o + +# target to build an object file +src/interrupts.c.o: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/interrupts.c.o +.PHONY : src/interrupts.c.o + +src/interrupts.i: src/interrupts.c.i +.PHONY : src/interrupts.i + +# target to preprocess a source file +src/interrupts.c.i: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/interrupts.c.i +.PHONY : src/interrupts.c.i + +src/interrupts.s: src/interrupts.c.s +.PHONY : src/interrupts.s + +# target to generate assembly for a file +src/interrupts.c.s: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/interrupts.c.s +.PHONY : src/interrupts.c.s + +src/main.o: src/main.c.o +.PHONY : src/main.o + +# target to build an object file +src/main.c.o: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/main.c.o +.PHONY : src/main.c.o + +src/main.i: src/main.c.i +.PHONY : src/main.i + +# target to preprocess a source file +src/main.c.i: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/main.c.i +.PHONY : src/main.c.i + +src/main.s: src/main.c.s +.PHONY : src/main.s + +# target to generate assembly for a file +src/main.c.s: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/main.c.s +.PHONY : src/main.c.s + +src/memory.o: src/memory.c.o +.PHONY : src/memory.o + +# target to build an object file +src/memory.c.o: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/memory.c.o +.PHONY : src/memory.c.o + +src/memory.i: src/memory.c.i +.PHONY : src/memory.i + +# target to preprocess a source file +src/memory.c.i: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/memory.c.i +.PHONY : src/memory.c.i + +src/memory.s: src/memory.c.s +.PHONY : src/memory.s + +# target to generate assembly for a file +src/memory.c.s: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/memory.c.s +.PHONY : src/memory.c.s + +src/pci.o: src/pci.c.o +.PHONY : src/pci.o + +# target to build an object file +src/pci.c.o: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/pci.c.o +.PHONY : src/pci.c.o + +src/pci.i: src/pci.c.i +.PHONY : src/pci.i + +# target to preprocess a source file +src/pci.c.i: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/pci.c.i +.PHONY : src/pci.c.i + +src/pci.s: src/pci.c.s +.PHONY : src/pci.s + +# target to generate assembly for a file +src/pci.c.s: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/pci.c.s +.PHONY : src/pci.c.s + +src/smp.o: src/smp.c.o +.PHONY : src/smp.o + +# target to build an object file +src/smp.c.o: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/smp.c.o +.PHONY : src/smp.c.o + +src/smp.i: src/smp.c.i +.PHONY : src/smp.i + +# target to preprocess a source file +src/smp.c.i: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/smp.c.i +.PHONY : src/smp.c.i + +src/smp.s: src/smp.c.s +.PHONY : src/smp.s + +# target to generate assembly for a file +src/smp.c.s: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/smp.c.s +.PHONY : src/smp.c.s + +src/spinlock.o: src/spinlock.c.o +.PHONY : src/spinlock.o + +# target to build an object file +src/spinlock.c.o: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/spinlock.c.o +.PHONY : src/spinlock.c.o + +src/spinlock.i: src/spinlock.c.i +.PHONY : src/spinlock.i + +# target to preprocess a source file +src/spinlock.c.i: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/spinlock.c.i +.PHONY : src/spinlock.c.i + +src/spinlock.s: src/spinlock.c.s +.PHONY : src/spinlock.s + +# target to generate assembly for a file +src/spinlock.c.s: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/spinlock.c.s +.PHONY : src/spinlock.c.s + +src/timer.o: src/timer.c.o +.PHONY : src/timer.o + +# target to build an object file +src/timer.c.o: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/timer.c.o +.PHONY : src/timer.c.o + +src/timer.i: src/timer.c.i +.PHONY : src/timer.i + +# target to preprocess a source file +src/timer.c.i: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/timer.c.i +.PHONY : src/timer.c.i + +src/timer.s: src/timer.c.s +.PHONY : src/timer.s + +# target to generate assembly for a file +src/timer.c.s: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/timer.c.s +.PHONY : src/timer.c.s + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... edit_cache" + @echo "... install" + @echo "... install/local" + @echo "... install/strip" + @echo "... list_install_components" + @echo "... rebuild_cache" + @echo "... test" + @echo "... kernel_bin" + @echo "... kernel_elf" + @echo "... kernel_obj" + @echo "... src/apic.o" + @echo "... src/apic.i" + @echo "... src/apic.s" + @echo "... src/gdt.o" + @echo "... src/gdt.i" + @echo "... src/gdt.s" + @echo "... src/interrupts.o" + @echo "... src/interrupts.i" + @echo "... src/interrupts.s" + @echo "... src/main.o" + @echo "... src/main.i" + @echo "... src/main.s" + @echo "... src/memory.o" + @echo "... src/memory.i" + @echo "... src/memory.s" + @echo "... src/pci.o" + @echo "... src/pci.i" + @echo "... src/pci.s" + @echo "... src/smp.o" + @echo "... src/smp.i" + @echo "... src/smp.s" + @echo "... src/spinlock.o" + @echo "... src/spinlock.i" + @echo "... src/spinlock.s" + @echo "... src/timer.o" + @echo "... src/timer.i" + @echo "... src/timer.s" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/cmake-build/tests/Makefile b/cmake-build/tests/Makefile new file mode 100644 index 0000000..59d62d7 --- /dev/null +++ b/cmake-build/tests/Makefile @@ -0,0 +1,257 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.31 + +# Default target executed when no arguments are given to make. +default_target: all +.PHONY : default_target + +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Disable VCS-based implicit rules. +% : %,v + +# Disable VCS-based implicit rules. +% : RCS/% + +# Disable VCS-based implicit rules. +% : RCS/%,v + +# Disable VCS-based implicit rules. +% : SCCS/s.% + +# Disable VCS-based implicit rules. +% : s.% + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/local/bin/cmake + +# The command to remove a file. +RM = /usr/local/bin/cmake -E rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/runner/work/MetalOS/MetalOS + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/runner/work/MetalOS/MetalOS/cmake-build + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target test +test: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running tests..." + /usr/local/bin/ctest --force-new-ctest-process $(ARGS) +.PHONY : test + +# Special rule for the target test +test/fast: test +.PHONY : test/fast + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake cache editor..." + /usr/local/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache +.PHONY : edit_cache/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..." + /usr/local/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache +.PHONY : rebuild_cache/fast + +# Special rule for the target list_install_components +list_install_components: + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Available install components are: \"Unspecified\"" +.PHONY : list_install_components + +# Special rule for the target list_install_components +list_install_components/fast: list_install_components +.PHONY : list_install_components/fast + +# Special rule for the target install +install: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." + /usr/local/bin/cmake -P cmake_install.cmake +.PHONY : install + +# Special rule for the target install +install/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." + /usr/local/bin/cmake -P cmake_install.cmake +.PHONY : install/fast + +# Special rule for the target install/local +install/local: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." + /usr/local/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local + +# Special rule for the target install/local +install/local/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." + /usr/local/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local/fast + +# Special rule for the target install/strip +install/strip: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." + /usr/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip + +# Special rule for the target install/strip +install/strip/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." + /usr/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip/fast + +# The main all target +all: cmake_check_build_system + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(CMAKE_COMMAND) -E cmake_progress_start /home/runner/work/MetalOS/MetalOS/cmake-build/CMakeFiles /home/runner/work/MetalOS/MetalOS/cmake-build/tests//CMakeFiles/progress.marks + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 tests/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/runner/work/MetalOS/MetalOS/cmake-build/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 tests/clean +.PHONY : clean + +# The main clean target +clean/fast: clean +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 tests/preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 tests/preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +# Convenience name for target. +tests/CMakeFiles/test_bootloader.dir/rule: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 tests/CMakeFiles/test_bootloader.dir/rule +.PHONY : tests/CMakeFiles/test_bootloader.dir/rule + +# Convenience name for target. +test_bootloader: tests/CMakeFiles/test_bootloader.dir/rule +.PHONY : test_bootloader + +# fast build rule for target. +test_bootloader/fast: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f tests/CMakeFiles/test_bootloader.dir/build.make tests/CMakeFiles/test_bootloader.dir/build +.PHONY : test_bootloader/fast + +# Convenience name for target. +tests/CMakeFiles/run_tests.dir/rule: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 tests/CMakeFiles/run_tests.dir/rule +.PHONY : tests/CMakeFiles/run_tests.dir/rule + +# Convenience name for target. +run_tests: tests/CMakeFiles/run_tests.dir/rule +.PHONY : run_tests + +# fast build rule for target. +run_tests/fast: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f tests/CMakeFiles/run_tests.dir/build.make tests/CMakeFiles/run_tests.dir/build +.PHONY : run_tests/fast + +unit/test_bootloader.o: unit/test_bootloader.c.o +.PHONY : unit/test_bootloader.o + +# target to build an object file +unit/test_bootloader.c.o: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f tests/CMakeFiles/test_bootloader.dir/build.make tests/CMakeFiles/test_bootloader.dir/unit/test_bootloader.c.o +.PHONY : unit/test_bootloader.c.o + +unit/test_bootloader.i: unit/test_bootloader.c.i +.PHONY : unit/test_bootloader.i + +# target to preprocess a source file +unit/test_bootloader.c.i: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f tests/CMakeFiles/test_bootloader.dir/build.make tests/CMakeFiles/test_bootloader.dir/unit/test_bootloader.c.i +.PHONY : unit/test_bootloader.c.i + +unit/test_bootloader.s: unit/test_bootloader.c.s +.PHONY : unit/test_bootloader.s + +# target to generate assembly for a file +unit/test_bootloader.c.s: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f tests/CMakeFiles/test_bootloader.dir/build.make tests/CMakeFiles/test_bootloader.dir/unit/test_bootloader.c.s +.PHONY : unit/test_bootloader.c.s + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... edit_cache" + @echo "... install" + @echo "... install/local" + @echo "... install/strip" + @echo "... list_install_components" + @echo "... rebuild_cache" + @echo "... test" + @echo "... run_tests" + @echo "... test_bootloader" + @echo "... unit/test_bootloader.o" + @echo "... unit/test_bootloader.i" + @echo "... unit/test_bootloader.s" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/kernel/CMakeLists.txt b/kernel/CMakeLists.txt index 9c4d380..72e139d 100644 --- a/kernel/CMakeLists.txt +++ b/kernel/CMakeLists.txt @@ -63,9 +63,11 @@ add_executable(kernel_elf $ ${KERNEL_ASM_OBJECTS}) set_target_properties(kernel_elf PROPERTIES OUTPUT_NAME metalos.elf LINKER_LANGUAGE C + POSITION_INDEPENDENT_CODE OFF ) target_link_options(kernel_elf PRIVATE -nostdlib + -no-pie -T ${CMAKE_CURRENT_SOURCE_DIR}/linker.ld ) From 408053665dbdf941fedcd1b59e34a09c108567f3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 28 Dec 2025 20:54:40 +0000 Subject: [PATCH 3/5] Remove Makefiles and update documentation for pure CMake build system Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com> --- .github/workflows/qemu-test.yml | 42 +- .github/workflows/release.yml | 35 +- .github/workflows/unit-tests.yml | 16 +- .gitignore | 2 + CONTRIBUTING.md | 16 +- Makefile | 144 ------ README.md | 28 +- bootloader/Makefile | 55 -- cmake-build/Makefile | 382 -------------- .../Testing/Temporary/CTestCostData.txt | 2 - cmake-build/bin/test_bootloader | Bin 16016 -> 0 bytes cmake-build/bootloader/Makefile | 272 ---------- cmake-build/kernel/Makefile | 488 ------------------ cmake-build/tests/Makefile | 257 --------- kernel/Makefile | 79 --- tests/Makefile | 64 --- 16 files changed, 81 insertions(+), 1801 deletions(-) delete mode 100644 Makefile delete mode 100644 bootloader/Makefile delete mode 100644 cmake-build/Makefile delete mode 100644 cmake-build/Testing/Temporary/CTestCostData.txt delete mode 100755 cmake-build/bin/test_bootloader delete mode 100644 cmake-build/bootloader/Makefile delete mode 100644 cmake-build/kernel/Makefile delete mode 100644 cmake-build/tests/Makefile delete mode 100644 kernel/Makefile delete mode 100644 tests/Makefile diff --git a/.github/workflows/qemu-test.yml b/.github/workflows/qemu-test.yml index 3a04184..545ef16 100644 --- a/.github/workflows/qemu-test.yml +++ b/.github/workflows/qemu-test.yml @@ -25,6 +25,7 @@ jobs: sudo apt-get update sudo apt-get install -y \ build-essential \ + cmake \ nasm \ qemu-system-x86 \ ovmf \ @@ -32,19 +33,21 @@ jobs: xorriso \ imagemagick - - name: Build bootloader + - name: Configure CMake run: | - cd bootloader - make + mkdir -p build + cd build + cmake .. - - name: Build kernel + - name: Build bootloader and kernel run: | - cd kernel - make + cd build + cmake --build . - name: Create bootable image run: | - make image + cd build + cmake --build . --target image - name: Start QEMU and capture screenshot run: | @@ -56,19 +59,22 @@ jobs: XVFB_PID=$! sleep 2 - # Verify disk image exists (created by 'make image') - if [ ! -f build/metalos.img ]; then - echo "Error: build/metalos.img not found!" + # Verify disk image exists (created by cmake build) + if [ ! -f build/build/metalos.img ]; then + echo "Error: build/build/metalos.img not found!" exit 1 fi + # Create directory for logs + mkdir -p build/logs + # Start QEMU in the background with a timeout timeout 30s qemu-system-x86_64 \ -bios /usr/share/OVMF/OVMF_CODE.fd \ - -drive format=raw,file=build/metalos.img \ + -drive format=raw,file=build/build/metalos.img \ -m 512M \ -display gtk \ - -serial file:build/serial.log \ + -serial file:build/logs/serial.log \ -no-reboot & QEMU_PID=$! @@ -77,7 +83,7 @@ jobs: # Take screenshot using ImageMagick (optional - don't fail if this doesn't work) # Using subshell to prevent 'set -e' from affecting this optional step - { import -window root build/qemu-screenshot.png; } || echo "Screenshot capture failed (non-fatal)" + { import -window root build/logs/qemu-screenshot.png; } || echo "Screenshot capture failed (non-fatal)" # Gracefully stop QEMU (don't fail if already stopped) kill $QEMU_PID 2>/dev/null || true @@ -91,9 +97,9 @@ jobs: - name: Show serial output if: always() run: | - if [ -f build/serial.log ]; then + if [ -f build/logs/serial.log ]; then echo "=== QEMU Serial Output ===" - cat build/serial.log + cat build/logs/serial.log else echo "No serial output captured" fi @@ -103,7 +109,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: qemu-screenshot - path: build/qemu-screenshot.png + path: build/logs/qemu-screenshot.png if-no-files-found: warn - name: Upload serial log @@ -111,7 +117,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: serial-log - path: build/serial.log + path: build/logs/serial.log if-no-files-found: warn - name: Upload built disk image @@ -119,5 +125,5 @@ jobs: uses: actions/upload-artifact@v4 with: name: metalos-disk-image - path: build/metalos.img + path: build/build/metalos.img if-no-files-found: warn diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f18bf22..0b95a83 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,25 +24,28 @@ jobs: sudo apt-get update sudo apt-get install -y \ build-essential \ + cmake \ nasm \ qemu-system-x86 \ ovmf \ mtools \ xorriso - - name: Build bootloader + - name: Configure CMake run: | - cd bootloader - make + mkdir -p build + cd build + cmake .. - - name: Build kernel + - name: Build bootloader and kernel run: | - cd kernel - make + cd build + cmake --build . - name: Create bootable image run: | - make image + cd build + cmake --build . --target image - name: Prepare release directory run: | @@ -51,29 +54,29 @@ jobs: mkdir -p release # Copy the bootable disk image (required) - if [ -f build/metalos.img ]; then - cp build/metalos.img release/ + if [ -f build/build/metalos.img ]; then + cp build/build/metalos.img release/ echo "✓ Copied metalos.img" else - echo "Error: build/metalos.img not found!" + echo "Error: build/build/metalos.img not found!" exit 1 fi # Copy bootloader if it exists (required) - if [ -f bootloader/bootx64.efi ]; then - cp bootloader/bootx64.efi release/ + if [ -f build/bootloader/bootx64.efi ]; then + cp build/bootloader/bootx64.efi release/ echo "✓ Copied bootx64.efi" else - echo "Error: bootloader/bootx64.efi not found!" + echo "Error: build/bootloader/bootx64.efi not found!" exit 1 fi # Copy kernel if it exists (required) - if [ -f kernel/metalos.bin ]; then - cp kernel/metalos.bin release/ + if [ -f build/kernel/metalos.bin ]; then + cp build/kernel/metalos.bin release/ echo "✓ Copied metalos.bin" else - echo "Error: kernel/metalos.bin not found!" + echo "Error: build/kernel/metalos.bin not found!" exit 1 fi diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index ce59676..9c36d61 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -22,17 +22,23 @@ jobs: set -e # Exit on any error sudo apt-get update - sudo apt-get install -y build-essential + sudo apt-get install -y build-essential cmake + + - name: Configure CMake + run: | + mkdir -p build + cd build + cmake .. - name: Build unit tests run: | - cd tests - make all + cd build + cmake --build . - name: Run unit tests run: | - cd tests - make test + cd build + ctest --output-on-failure - name: Test summary if: always() diff --git a/.gitignore b/.gitignore index 3fb71e7..43bb39a 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,8 @@ # Build directories build/ build-*/ +cmake-build/ +cmake-build-*/ bootloader/build/ kernel/build/ _codeql_build_dir/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 29199d3..86eba15 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -152,9 +152,19 @@ Closes #42 Every PR should be tested in QEMU: ```bash -make clean -make all -make qemu +mkdir build && cd build +cmake .. +cmake --build . +cmake --build . --target qemu +``` + +Or if you already have a build directory: + +```bash +cd build +cmake --build . --target clean +cmake --build . +cmake --build . --target qemu ``` Verify: diff --git a/Makefile b/Makefile deleted file mode 100644 index 37c601c..0000000 --- a/Makefile +++ /dev/null @@ -1,144 +0,0 @@ -# MetalOS Main Makefile -# Builds bootloader, kernel, and creates bootable image - -.PHONY: all bootloader kernel image qemu qemu-debug qemu-gdb qemu-uefi-test test clean distclean - -all: bootloader kernel - -# Run unit tests -test: - @echo "Running unit tests..." - @cd tests && $(MAKE) test - -bootloader: - @echo "Building bootloader..." - @cd bootloader && $(MAKE) || echo "Warning: Bootloader build failed (expected during Phase 1 development)" - -kernel: - @echo "Building kernel..." - @cd kernel && $(MAKE) || echo "Warning: Kernel build failed (expected during Phase 1 development)" - -# Create bootable disk image for UEFI/QEMU -image: bootloader kernel - @chmod +x scripts/create_image.sh - @./scripts/create_image.sh - -# Run in QEMU with UEFI firmware (OVMF) -# Automatically detects OVMF path and display mode -# Set QEMU_DISPLAY=gtk or QEMU_DISPLAY=sdl to use graphical mode -QEMU_DISPLAY ?= none - -qemu: image - @echo "Starting QEMU with UEFI firmware..." - @bash -c ' \ - if [ -f /usr/share/OVMF/OVMF_CODE.fd ]; then \ - OVMF="/usr/share/OVMF/OVMF_CODE.fd"; \ - elif [ -f /usr/share/ovmf/OVMF.fd ]; then \ - OVMF="/usr/share/ovmf/OVMF.fd"; \ - elif [ -f /usr/share/edk2-ovmf/x64/OVMF_CODE.fd ]; then \ - OVMF="/usr/share/edk2-ovmf/x64/OVMF_CODE.fd"; \ - elif [ -f /usr/share/qemu/ovmf-x86_64.bin ]; then \ - OVMF="/usr/share/qemu/ovmf-x86_64.bin"; \ - else \ - echo "Error: OVMF UEFI firmware not found!"; \ - echo "Install with:"; \ - echo " Ubuntu/Debian: sudo apt-get install ovmf"; \ - echo " Arch Linux: sudo pacman -S edk2-ovmf"; \ - echo " Fedora: sudo dnf install edk2-ovmf"; \ - exit 1; \ - fi; \ - echo "Using OVMF firmware: $$OVMF"; \ - echo "Display mode: $(QEMU_DISPLAY) (set QEMU_DISPLAY=gtk for graphical)"; \ - qemu-system-x86_64 \ - -drive if=pflash,format=raw,readonly=on,file=$$OVMF \ - -drive format=raw,file=build/metalos.img \ - -m 512M \ - -serial stdio \ - -display $(QEMU_DISPLAY) \ - -net none \ - ' - -qemu-debug: image - @echo "Starting QEMU with debug output..." - @bash -c ' \ - if [ -f /usr/share/OVMF/OVMF_CODE.fd ]; then \ - OVMF="/usr/share/OVMF/OVMF_CODE.fd"; \ - elif [ -f /usr/share/ovmf/OVMF.fd ]; then \ - OVMF="/usr/share/ovmf/OVMF.fd"; \ - elif [ -f /usr/share/edk2-ovmf/x64/OVMF_CODE.fd ]; then \ - OVMF="/usr/share/edk2-ovmf/x64/OVMF_CODE.fd"; \ - else \ - echo "Error: OVMF UEFI firmware not found!"; \ - exit 1; \ - fi; \ - qemu-system-x86_64 \ - -drive if=pflash,format=raw,readonly=on,file=$$OVMF \ - -drive format=raw,file=build/metalos.img \ - -m 512M \ - -serial stdio \ - -display $(QEMU_DISPLAY) \ - -net none \ - -d int,cpu_reset \ - ' - -qemu-gdb: image - @echo "Starting QEMU with GDB server on port 1234..." - @bash -c ' \ - if [ -f /usr/share/OVMF/OVMF_CODE.fd ]; then \ - OVMF="/usr/share/OVMF/OVMF_CODE.fd"; \ - elif [ -f /usr/share/ovmf/OVMF.fd ]; then \ - OVMF="/usr/share/ovmf/OVMF.fd"; \ - elif [ -f /usr/share/edk2-ovmf/x64/OVMF_CODE.fd ]; then \ - OVMF="/usr/share/edk2-ovmf/x64/OVMF_CODE.fd"; \ - else \ - echo "Error: OVMF UEFI firmware not found!"; \ - exit 1; \ - fi; \ - echo "QEMU will wait for GDB connection on localhost:1234"; \ - echo "In another terminal, run: gdb kernel/metalos.bin"; \ - echo "Then in GDB: target remote localhost:1234"; \ - qemu-system-x86_64 \ - -drive if=pflash,format=raw,readonly=on,file=$$OVMF \ - -drive format=raw,file=build/metalos.img \ - -m 512M \ - -serial stdio \ - -display $(QEMU_DISPLAY) \ - -net none \ - -s -S \ - ' - -# Quick UEFI test - boots to UEFI shell without OS (for verifying QEMU+OVMF setup) -qemu-uefi-test: - @echo "Testing QEMU UEFI boot (no OS image)..." - @bash -c ' \ - if [ -f /usr/share/OVMF/OVMF_CODE.fd ]; then \ - OVMF="/usr/share/OVMF/OVMF_CODE.fd"; \ - elif [ -f /usr/share/ovmf/OVMF.fd ]; then \ - OVMF="/usr/share/ovmf/OVMF.fd"; \ - elif [ -f /usr/share/edk2-ovmf/x64/OVMF_CODE.fd ]; then \ - OVMF="/usr/share/edk2-ovmf/x64/OVMF_CODE.fd"; \ - else \ - echo "Error: OVMF UEFI firmware not found!"; \ - exit 1; \ - fi; \ - echo "Using OVMF firmware: $$OVMF"; \ - echo "This will boot to UEFI shell in nographic mode."; \ - echo "You should see UEFI boot messages. Press Ctrl-A then X to exit QEMU."; \ - qemu-system-x86_64 \ - -drive if=pflash,format=raw,readonly=on,file=$$OVMF \ - -m 512M \ - -nographic \ - -net none \ - ' - -clean: - @echo "Cleaning build artifacts..." - @cd bootloader && $(MAKE) clean - @cd kernel && $(MAKE) clean - @cd tests && $(MAKE) clean - @rm -rf build - -distclean: clean - @echo "Deep clean..." - @find . -name "*.o" -delete - @find . -name "*.d" -delete diff --git a/README.md b/README.md index 06883b4..439a12d 100644 --- a/README.md +++ b/README.md @@ -67,18 +67,18 @@ See [docs/ROADMAP.md](docs/ROADMAP.md) for detailed phase breakdown. ## Building -MetalOS supports **multiple build systems** - choose what works best for you! +MetalOS uses **CMake** as its build system for a modern, cross-platform build experience. -### Quick Start (Make - Traditional) +### Quick Start (CMake) ```bash -make all # Build bootloader, kernel, and userspace -make test # Run unit tests -make qemu # Test in QEMU with UEFI firmware -make clean # Clean build artifacts +mkdir build && cd build +cmake .. +cmake --build . +cmake --build . --target qemu ``` -### CMake + Ninja (Fast Modern Build) +### Using Ninja (Faster Builds) ```bash mkdir build && cd build @@ -103,19 +103,15 @@ The easiest way to build MetalOS with all dependencies: ```bash ./scripts/docker-build.sh # Build Docker image ./scripts/docker-run.sh scripts/setup-deps.sh # Setup dependencies -./scripts/docker-run.sh make all # Build everything -./scripts/docker-run.sh make qemu # Test in QEMU +./scripts/docker-run.sh cmake --build build # Build everything ``` -**See [docs/BUILD_SYSTEMS.md](docs/BUILD_SYSTEMS.md) for detailed comparison and usage of all build systems.** - **QEMU UEFI Testing**: ```bash -make qemu # Boot in QEMU with UEFI (headless) -make qemu QEMU_DISPLAY=gtk # Boot with graphical display -make qemu-debug # Boot with debug output -make qemu-gdb # Boot with GDB debugging -make qemu-uefi-test # Test UEFI firmware setup +cmake --build . --target qemu # Boot in QEMU with UEFI (headless) +cmake --build . --target qemu-debug # Boot with debug output +cmake --build . --target qemu-gdb # Boot with GDB debugging +cmake --build . --target qemu-uefi-test # Test UEFI firmware setup ``` See [docs/BUILD.md](docs/BUILD.md) for detailed build instructions and [docs/TESTING.md](docs/TESTING.md) for testing guide. diff --git a/bootloader/Makefile b/bootloader/Makefile deleted file mode 100644 index e94363f..0000000 --- a/bootloader/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -# MetalOS Bootloader Makefile -# Builds UEFI bootloader (bootx64.efi) - -# Cross-compiler setup -CC = gcc -LD = ld -OBJCOPY = objcopy - -# Directories -SRC_DIR = src -INC_DIR = include -BUILD_DIR = build - -# Compiler flags for UEFI -CFLAGS = -Wall -Wextra -Werror \ - -ffreestanding -fno-stack-protector -fno-stack-check \ - -fshort-wchar -mno-red-zone \ - -I$(INC_DIR) \ - -DEFI_FUNCTION_WRAPPER - -# Linker flags for UEFI -LDFLAGS = -shared -Bsymbolic -nostdlib \ - -znocombreloc -T uefi.lds - -# Source files -SOURCES = $(wildcard $(SRC_DIR)/*.c) -OBJECTS = $(patsubst $(SRC_DIR)/%.c,$(BUILD_DIR)/%.o,$(SOURCES)) - -# Output -TARGET = bootx64.efi - -.PHONY: all clean - -all: $(BUILD_DIR) $(TARGET) - -$(BUILD_DIR): - mkdir -p $(BUILD_DIR) - -# Compile C files -$(BUILD_DIR)/%.o: $(SRC_DIR)/%.c - $(CC) $(CFLAGS) -c $< -o $@ - -# Link and create EFI binary -$(TARGET): $(OBJECTS) - $(LD) $(LDFLAGS) $(OBJECTS) -o $(BUILD_DIR)/bootx64.so - $(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic \ - -j .dynsym -j .rel -j .rela -j .reloc \ - --target=efi-app-x86_64 \ - $(BUILD_DIR)/bootx64.so $@ - -clean: - rm -rf $(BUILD_DIR) $(TARGET) - -# Note: This is a simplified Makefile -# A real implementation would use gnu-efi or proper UEFI SDK diff --git a/cmake-build/Makefile b/cmake-build/Makefile deleted file mode 100644 index b6e39ff..0000000 --- a/cmake-build/Makefile +++ /dev/null @@ -1,382 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.31 - -# Default target executed when no arguments are given to make. -default_target: all -.PHONY : default_target - -# Allow only one "make -f Makefile2" at a time, but pass parallelism. -.NOTPARALLEL: - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - -# Disable VCS-based implicit rules. -% : %,v - -# Disable VCS-based implicit rules. -% : RCS/% - -# Disable VCS-based implicit rules. -% : RCS/%,v - -# Disable VCS-based implicit rules. -% : SCCS/s.% - -# Disable VCS-based implicit rules. -% : s.% - -.SUFFIXES: .hpux_make_needs_suffix_list - -# Command-line flag to silence nested $(MAKE). -$(VERBOSE)MAKESILENT = -s - -#Suppress display of executed commands. -$(VERBOSE).SILENT: - -# A target that is always out of date. -cmake_force: -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /usr/local/bin/cmake - -# The command to remove a file. -RM = /usr/local/bin/cmake -E rm -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = /home/runner/work/MetalOS/MetalOS - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = /home/runner/work/MetalOS/MetalOS/cmake-build - -#============================================================================= -# Targets provided globally by CMake. - -# Special rule for the target test -test: - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running tests..." - /usr/local/bin/ctest --force-new-ctest-process $(ARGS) -.PHONY : test - -# Special rule for the target test -test/fast: test -.PHONY : test/fast - -# Special rule for the target edit_cache -edit_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake cache editor..." - /usr/local/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) -.PHONY : edit_cache - -# Special rule for the target edit_cache -edit_cache/fast: edit_cache -.PHONY : edit_cache/fast - -# Special rule for the target rebuild_cache -rebuild_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..." - /usr/local/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) -.PHONY : rebuild_cache - -# Special rule for the target rebuild_cache -rebuild_cache/fast: rebuild_cache -.PHONY : rebuild_cache/fast - -# Special rule for the target list_install_components -list_install_components: - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Available install components are: \"Unspecified\"" -.PHONY : list_install_components - -# Special rule for the target list_install_components -list_install_components/fast: list_install_components -.PHONY : list_install_components/fast - -# Special rule for the target install -install: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." - /usr/local/bin/cmake -P cmake_install.cmake -.PHONY : install - -# Special rule for the target install -install/fast: preinstall/fast - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." - /usr/local/bin/cmake -P cmake_install.cmake -.PHONY : install/fast - -# Special rule for the target install/local -install/local: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." - /usr/local/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake -.PHONY : install/local - -# Special rule for the target install/local -install/local/fast: preinstall/fast - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." - /usr/local/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake -.PHONY : install/local/fast - -# Special rule for the target install/strip -install/strip: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." - /usr/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake -.PHONY : install/strip - -# Special rule for the target install/strip -install/strip/fast: preinstall/fast - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." - /usr/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake -.PHONY : install/strip/fast - -# The main all target -all: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start /home/runner/work/MetalOS/MetalOS/cmake-build/CMakeFiles /home/runner/work/MetalOS/MetalOS/cmake-build//CMakeFiles/progress.marks - $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 all - $(CMAKE_COMMAND) -E cmake_progress_start /home/runner/work/MetalOS/MetalOS/cmake-build/CMakeFiles 0 -.PHONY : all - -# The main clean target -clean: - $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 clean -.PHONY : clean - -# The main clean target -clean/fast: clean -.PHONY : clean/fast - -# Prepare targets for installation. -preinstall: all - $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall -.PHONY : preinstall - -# Prepare targets for installation. -preinstall/fast: - $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall -.PHONY : preinstall/fast - -# clear depends -depend: - $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 -.PHONY : depend - -#============================================================================= -# Target rules for targets named image - -# Build rule for target. -image: cmake_check_build_system - $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 image -.PHONY : image - -# fast build rule for target. -image/fast: - $(MAKE) $(MAKESILENT) -f CMakeFiles/image.dir/build.make CMakeFiles/image.dir/build -.PHONY : image/fast - -#============================================================================= -# Target rules for targets named qemu - -# Build rule for target. -qemu: cmake_check_build_system - $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 qemu -.PHONY : qemu - -# fast build rule for target. -qemu/fast: - $(MAKE) $(MAKESILENT) -f CMakeFiles/qemu.dir/build.make CMakeFiles/qemu.dir/build -.PHONY : qemu/fast - -#============================================================================= -# Target rules for targets named qemu-debug - -# Build rule for target. -qemu-debug: cmake_check_build_system - $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 qemu-debug -.PHONY : qemu-debug - -# fast build rule for target. -qemu-debug/fast: - $(MAKE) $(MAKESILENT) -f CMakeFiles/qemu-debug.dir/build.make CMakeFiles/qemu-debug.dir/build -.PHONY : qemu-debug/fast - -#============================================================================= -# Target rules for targets named qemu-gdb - -# Build rule for target. -qemu-gdb: cmake_check_build_system - $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 qemu-gdb -.PHONY : qemu-gdb - -# fast build rule for target. -qemu-gdb/fast: - $(MAKE) $(MAKESILENT) -f CMakeFiles/qemu-gdb.dir/build.make CMakeFiles/qemu-gdb.dir/build -.PHONY : qemu-gdb/fast - -#============================================================================= -# Target rules for targets named qemu-uefi-test - -# Build rule for target. -qemu-uefi-test: cmake_check_build_system - $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 qemu-uefi-test -.PHONY : qemu-uefi-test - -# fast build rule for target. -qemu-uefi-test/fast: - $(MAKE) $(MAKESILENT) -f CMakeFiles/qemu-uefi-test.dir/build.make CMakeFiles/qemu-uefi-test.dir/build -.PHONY : qemu-uefi-test/fast - -#============================================================================= -# Target rules for targets named bootloader_obj - -# Build rule for target. -bootloader_obj: cmake_check_build_system - $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 bootloader_obj -.PHONY : bootloader_obj - -# fast build rule for target. -bootloader_obj/fast: - $(MAKE) $(MAKESILENT) -f bootloader/CMakeFiles/bootloader_obj.dir/build.make bootloader/CMakeFiles/bootloader_obj.dir/build -.PHONY : bootloader_obj/fast - -#============================================================================= -# Target rules for targets named bootloader_so - -# Build rule for target. -bootloader_so: cmake_check_build_system - $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 bootloader_so -.PHONY : bootloader_so - -# fast build rule for target. -bootloader_so/fast: - $(MAKE) $(MAKESILENT) -f bootloader/CMakeFiles/bootloader_so.dir/build.make bootloader/CMakeFiles/bootloader_so.dir/build -.PHONY : bootloader_so/fast - -#============================================================================= -# Target rules for targets named bootloader_efi - -# Build rule for target. -bootloader_efi: cmake_check_build_system - $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 bootloader_efi -.PHONY : bootloader_efi - -# fast build rule for target. -bootloader_efi/fast: - $(MAKE) $(MAKESILENT) -f bootloader/CMakeFiles/bootloader_efi.dir/build.make bootloader/CMakeFiles/bootloader_efi.dir/build -.PHONY : bootloader_efi/fast - -#============================================================================= -# Target rules for targets named kernel_obj - -# Build rule for target. -kernel_obj: cmake_check_build_system - $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 kernel_obj -.PHONY : kernel_obj - -# fast build rule for target. -kernel_obj/fast: - $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/build -.PHONY : kernel_obj/fast - -#============================================================================= -# Target rules for targets named kernel_elf - -# Build rule for target. -kernel_elf: cmake_check_build_system - $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 kernel_elf -.PHONY : kernel_elf - -# fast build rule for target. -kernel_elf/fast: - $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_elf.dir/build.make kernel/CMakeFiles/kernel_elf.dir/build -.PHONY : kernel_elf/fast - -#============================================================================= -# Target rules for targets named kernel_bin - -# Build rule for target. -kernel_bin: cmake_check_build_system - $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 kernel_bin -.PHONY : kernel_bin - -# fast build rule for target. -kernel_bin/fast: - $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_bin.dir/build.make kernel/CMakeFiles/kernel_bin.dir/build -.PHONY : kernel_bin/fast - -#============================================================================= -# Target rules for targets named test_bootloader - -# Build rule for target. -test_bootloader: cmake_check_build_system - $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 test_bootloader -.PHONY : test_bootloader - -# fast build rule for target. -test_bootloader/fast: - $(MAKE) $(MAKESILENT) -f tests/CMakeFiles/test_bootloader.dir/build.make tests/CMakeFiles/test_bootloader.dir/build -.PHONY : test_bootloader/fast - -#============================================================================= -# Target rules for targets named run_tests - -# Build rule for target. -run_tests: cmake_check_build_system - $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 run_tests -.PHONY : run_tests - -# fast build rule for target. -run_tests/fast: - $(MAKE) $(MAKESILENT) -f tests/CMakeFiles/run_tests.dir/build.make tests/CMakeFiles/run_tests.dir/build -.PHONY : run_tests/fast - -# Help Target -help: - @echo "The following are some of the valid targets for this Makefile:" - @echo "... all (the default if no target is provided)" - @echo "... clean" - @echo "... depend" - @echo "... edit_cache" - @echo "... install" - @echo "... install/local" - @echo "... install/strip" - @echo "... list_install_components" - @echo "... rebuild_cache" - @echo "... test" - @echo "... bootloader_efi" - @echo "... image" - @echo "... kernel_bin" - @echo "... qemu" - @echo "... qemu-debug" - @echo "... qemu-gdb" - @echo "... qemu-uefi-test" - @echo "... run_tests" - @echo "... bootloader_obj" - @echo "... bootloader_so" - @echo "... kernel_elf" - @echo "... kernel_obj" - @echo "... test_bootloader" -.PHONY : help - - - -#============================================================================= -# Special targets to cleanup operation of make. - -# Special rule to run CMake to check the build system integrity. -# No rule that depends on this can have commands that come from listfiles -# because they might be regenerated. -cmake_check_build_system: - $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 -.PHONY : cmake_check_build_system - diff --git a/cmake-build/Testing/Temporary/CTestCostData.txt b/cmake-build/Testing/Temporary/CTestCostData.txt deleted file mode 100644 index eac3007..0000000 --- a/cmake-build/Testing/Temporary/CTestCostData.txt +++ /dev/null @@ -1,2 +0,0 @@ -test_bootloader 1 0.00139881 ---- diff --git a/cmake-build/bin/test_bootloader b/cmake-build/bin/test_bootloader deleted file mode 100755 index 4bb7874d74392aad1d688491918b6149b54dbb4b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16016 zcmeHOeQX@X6(67DU_xR$0fXZ-@seT$1+TxYe8}YN*v^_diHRKnO44QR+q19SSMT<~ z=8upzO~DY;6eOTDLPAxQsFf-zwJ24KFin6|YO8>%l9qm?Q9&2AM5a)bLdo^LnfLDY zHfN~X{?ST1(%qYR@ArH2_U-K5?C#9{{X+wRvNFM?T-+kCb=Q?j6C}f_E~l>n==lj!;3`LXQd3liHXX)l)D94%<{#bXhyo2(RB*{E%BJU*eP7;shJO%`X zCFc{v$Im*7$17Wq1cjxSH%UCN>{B$s68pe1@}?8|clsM9-ji#UAFu3CYQd8GyA61B zY6TjX*U{L;9QhG&mG&0uJ(HspmMI-UdRMXVDuBNUIJ)O|oWXBkn1|J+# zTej^K;AReWltvNQr`qffZC8;U@sB)rb2JgRN3F4_4SpwLi8%FSDriX{1RQ{Dm%*7R zgDVVWGw67HW$GiBI{~+n|kwe+T&b3*w-FGDp`r>*Zhp zePs}>AeG3sPj6BR9t&g^XIy&sxXHToJVuc-@6yZPM{;z*rRTAQrc86BE!)L_Q^0?tTV=XMUw zyk*QbEeFkrF}wQFY9X>Gz?(61o)Fm|U~{&13{1vsX9FNx=cFzBjbh+I3G8evcsE|D z*a+QYd8J}K)v_T;`#t%8w|eigN0(!?dn;A|BwT&*#c=hnDi%XMyI#2r6kKMn_p)n8 ziTz7mvVVf?lTgooco8G-e6KoxxY;bKW?X%*zM9yNEB0|@KZNY(75gn0``cc2<7tQt zBfmqjPat~;+4n2<85cY1Wj8%V?0Ut13E5T1?osUDxY)Xv-MO3CzlG-$khPbQeG2N? za)8n~g2R6voMh)e@*H>f8e%`K*smb_QDnaaP#6__`k#}`{Af4=&4+6v00h_fE-MU% zN2Fm?8B#7oMjAGO;lOKq?*bMY+4~*E-Uku8`bxyUk*Npl4XzB_491z$yY}?#J`R?y zg5^he2b^67=0E=dEX^+e7ybdtrwi9Z>)V4fuYS&$Icx0y)BNygf9qW9PmS5`KLRXQ zJ94uS?}hd1hA+z@3;Jo$7_${A6zeZIwQy;6VI3~b%X4R{8}=daI7z?{N_=N8iW@H) zGxNra=QkNIUMM%pUN&C6=v)O3D#$@)?u?3y`FQ>A>qfK4+_cl!-+lHbs2VeGI!ld* zyWfIFb|u6qub-DIeh2NcJ;2TPkNk7@!hrw_>+-iG|LXxtzxWyOGvH^y&w!r+KLdUS z{0#UR@H6l~lYugLH`SX+IMIX!Z_2ctP9z#}B6eD=+ST3`+ocWnjErb|v{k!WVoQXk zjV2r`syTMrNpH}!#?TUl)3jkLowh@ulLZXOKx1o6(*~?a^ipF9y+B4stovUqsuP(@ z$q+&wUJE3u{UUqX)kVI~BL1CMLkNLZOtMPMi0@+eSDx zDAI2cK4wjs#7V;|Ni$_z=|mh~Dk9-hJYm^&JYgp8u~ShixsZQ5mPkz(hhjMqcv)G9 zs#HI*1$mKpfq7|sNo&G3;dm$FF+1+aph_OcSbmh45Pup1qT_9gEjfGmF|8*`14B#7 zv2d*`>oVR}#66*nBx1H2L0VXjiy|Q2Rm;z+@{PC#0N+VI_;xOb&zz2eJOuI>$fF=n zf}BG+pUVw{#6quAMcI8jMA=kL*{Y?NRUQI|sK>P=Nx)u@z`o1iS%eVR!3X=P178|Q zQB^ZgRd;Lk757%|6PxPSf2RF9`Pv%!_>Q~=aFU2vD5!VfQ|Zy;4fR3z2+)6kkG%$} zY7PdrSJi!`{IgZs{zc_S0!ymuda7!At15f0K%igz4EP!FGvH^y&w!r+KLdUS{0uCd zfgnyiv5>?$GnQs0#8Q&HP!V2F$udOvmDJ|-h^wg0>kR9u&Fd0*9X8wlb}^Sg$g{MV zkk=0GqeX$dX7DuG`M%;A^2<}+I%?OFWWj3`kI{NVUdzaMK73q)3bsVgI!ZF}1~^p=hrN&PX-z=U~O zB;LW-f<*=Mj_YW7y}U+N+-^_`-zf3*qAsX_Jg!?7z;6V700#Xb+P|P!Lg4aR)X#bJ z!=&fyi1A^ll!L&nc)EWwBjM$GBCIuP@zcN%)p~g0mlnp<`_IKl=~F~?N=ylXDEaN`w~nO_8;(};>LuM zyA6uBJLDbUCI^{6A@uZg%(2EmIw>V5xdz)P>{L?d@q}aR6Y-3mOeKIfZAv(TZcPb8?4 zw#S9;*i+EN@dD_CJOR2rNh4%31m3u%e5j$K7+i<0tXKq`DLUj{=rBg{!Dar!_|Gah z4}wb$e#=$y?oZ=+5Sb;G>nQPO8|NO(UuYi|VzKaiL$!p!ZFX+HcRvSnt^@}lLo|(_{un6dI z&cuA4PqKUlZ0>?S+~o_2(c4?X<5h`{okXF~4v_kxGd^A(nSAI0%|^Y;?* z`TPrwkR+eX8@rd-&e|-vm2eBb+9_ zKji(BUOcy1z60E97oYDR=bAtXg>kA?XtVw!FyPqb{&`-@`(b(CD_(zCn8)YwJD|hk zXFkt!k2ND2RyHb;|7JeR#XxrRMUbE^N^(E!fO*_r3S`uA|2+SzAwFNfjQ8@FQ~v~K zm|*@*d5x-ItXSNV$Bwe7?;tsxqQF*z8gGTTe~t_9&p39)RNu$imAt?mk}i?;&`a;-5W)y~zLo diff --git a/cmake-build/bootloader/Makefile b/cmake-build/bootloader/Makefile deleted file mode 100644 index afd0805..0000000 --- a/cmake-build/bootloader/Makefile +++ /dev/null @@ -1,272 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.31 - -# Default target executed when no arguments are given to make. -default_target: all -.PHONY : default_target - -# Allow only one "make -f Makefile2" at a time, but pass parallelism. -.NOTPARALLEL: - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - -# Disable VCS-based implicit rules. -% : %,v - -# Disable VCS-based implicit rules. -% : RCS/% - -# Disable VCS-based implicit rules. -% : RCS/%,v - -# Disable VCS-based implicit rules. -% : SCCS/s.% - -# Disable VCS-based implicit rules. -% : s.% - -.SUFFIXES: .hpux_make_needs_suffix_list - -# Command-line flag to silence nested $(MAKE). -$(VERBOSE)MAKESILENT = -s - -#Suppress display of executed commands. -$(VERBOSE).SILENT: - -# A target that is always out of date. -cmake_force: -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /usr/local/bin/cmake - -# The command to remove a file. -RM = /usr/local/bin/cmake -E rm -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = /home/runner/work/MetalOS/MetalOS - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = /home/runner/work/MetalOS/MetalOS/cmake-build - -#============================================================================= -# Targets provided globally by CMake. - -# Special rule for the target test -test: - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running tests..." - /usr/local/bin/ctest --force-new-ctest-process $(ARGS) -.PHONY : test - -# Special rule for the target test -test/fast: test -.PHONY : test/fast - -# Special rule for the target edit_cache -edit_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake cache editor..." - /usr/local/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) -.PHONY : edit_cache - -# Special rule for the target edit_cache -edit_cache/fast: edit_cache -.PHONY : edit_cache/fast - -# Special rule for the target rebuild_cache -rebuild_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..." - /usr/local/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) -.PHONY : rebuild_cache - -# Special rule for the target rebuild_cache -rebuild_cache/fast: rebuild_cache -.PHONY : rebuild_cache/fast - -# Special rule for the target list_install_components -list_install_components: - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Available install components are: \"Unspecified\"" -.PHONY : list_install_components - -# Special rule for the target list_install_components -list_install_components/fast: list_install_components -.PHONY : list_install_components/fast - -# Special rule for the target install -install: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." - /usr/local/bin/cmake -P cmake_install.cmake -.PHONY : install - -# Special rule for the target install -install/fast: preinstall/fast - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." - /usr/local/bin/cmake -P cmake_install.cmake -.PHONY : install/fast - -# Special rule for the target install/local -install/local: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." - /usr/local/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake -.PHONY : install/local - -# Special rule for the target install/local -install/local/fast: preinstall/fast - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." - /usr/local/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake -.PHONY : install/local/fast - -# Special rule for the target install/strip -install/strip: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." - /usr/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake -.PHONY : install/strip - -# Special rule for the target install/strip -install/strip/fast: preinstall/fast - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." - /usr/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake -.PHONY : install/strip/fast - -# The main all target -all: cmake_check_build_system - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(CMAKE_COMMAND) -E cmake_progress_start /home/runner/work/MetalOS/MetalOS/cmake-build/CMakeFiles /home/runner/work/MetalOS/MetalOS/cmake-build/bootloader//CMakeFiles/progress.marks - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 bootloader/all - $(CMAKE_COMMAND) -E cmake_progress_start /home/runner/work/MetalOS/MetalOS/cmake-build/CMakeFiles 0 -.PHONY : all - -# The main clean target -clean: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 bootloader/clean -.PHONY : clean - -# The main clean target -clean/fast: clean -.PHONY : clean/fast - -# Prepare targets for installation. -preinstall: all - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 bootloader/preinstall -.PHONY : preinstall - -# Prepare targets for installation. -preinstall/fast: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 bootloader/preinstall -.PHONY : preinstall/fast - -# clear depends -depend: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 -.PHONY : depend - -# Convenience name for target. -bootloader/CMakeFiles/bootloader_obj.dir/rule: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 bootloader/CMakeFiles/bootloader_obj.dir/rule -.PHONY : bootloader/CMakeFiles/bootloader_obj.dir/rule - -# Convenience name for target. -bootloader_obj: bootloader/CMakeFiles/bootloader_obj.dir/rule -.PHONY : bootloader_obj - -# fast build rule for target. -bootloader_obj/fast: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f bootloader/CMakeFiles/bootloader_obj.dir/build.make bootloader/CMakeFiles/bootloader_obj.dir/build -.PHONY : bootloader_obj/fast - -# Convenience name for target. -bootloader/CMakeFiles/bootloader_so.dir/rule: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 bootloader/CMakeFiles/bootloader_so.dir/rule -.PHONY : bootloader/CMakeFiles/bootloader_so.dir/rule - -# Convenience name for target. -bootloader_so: bootloader/CMakeFiles/bootloader_so.dir/rule -.PHONY : bootloader_so - -# fast build rule for target. -bootloader_so/fast: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f bootloader/CMakeFiles/bootloader_so.dir/build.make bootloader/CMakeFiles/bootloader_so.dir/build -.PHONY : bootloader_so/fast - -# Convenience name for target. -bootloader/CMakeFiles/bootloader_efi.dir/rule: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 bootloader/CMakeFiles/bootloader_efi.dir/rule -.PHONY : bootloader/CMakeFiles/bootloader_efi.dir/rule - -# Convenience name for target. -bootloader_efi: bootloader/CMakeFiles/bootloader_efi.dir/rule -.PHONY : bootloader_efi - -# fast build rule for target. -bootloader_efi/fast: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f bootloader/CMakeFiles/bootloader_efi.dir/build.make bootloader/CMakeFiles/bootloader_efi.dir/build -.PHONY : bootloader_efi/fast - -src/main.o: src/main.c.o -.PHONY : src/main.o - -# target to build an object file -src/main.c.o: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f bootloader/CMakeFiles/bootloader_obj.dir/build.make bootloader/CMakeFiles/bootloader_obj.dir/src/main.c.o -.PHONY : src/main.c.o - -src/main.i: src/main.c.i -.PHONY : src/main.i - -# target to preprocess a source file -src/main.c.i: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f bootloader/CMakeFiles/bootloader_obj.dir/build.make bootloader/CMakeFiles/bootloader_obj.dir/src/main.c.i -.PHONY : src/main.c.i - -src/main.s: src/main.c.s -.PHONY : src/main.s - -# target to generate assembly for a file -src/main.c.s: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f bootloader/CMakeFiles/bootloader_obj.dir/build.make bootloader/CMakeFiles/bootloader_obj.dir/src/main.c.s -.PHONY : src/main.c.s - -# Help Target -help: - @echo "The following are some of the valid targets for this Makefile:" - @echo "... all (the default if no target is provided)" - @echo "... clean" - @echo "... depend" - @echo "... edit_cache" - @echo "... install" - @echo "... install/local" - @echo "... install/strip" - @echo "... list_install_components" - @echo "... rebuild_cache" - @echo "... test" - @echo "... bootloader_efi" - @echo "... bootloader_obj" - @echo "... bootloader_so" - @echo "... src/main.o" - @echo "... src/main.i" - @echo "... src/main.s" -.PHONY : help - - - -#============================================================================= -# Special targets to cleanup operation of make. - -# Special rule to run CMake to check the build system integrity. -# No rule that depends on this can have commands that come from listfiles -# because they might be regenerated. -cmake_check_build_system: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 -.PHONY : cmake_check_build_system - diff --git a/cmake-build/kernel/Makefile b/cmake-build/kernel/Makefile deleted file mode 100644 index fe8c89d..0000000 --- a/cmake-build/kernel/Makefile +++ /dev/null @@ -1,488 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.31 - -# Default target executed when no arguments are given to make. -default_target: all -.PHONY : default_target - -# Allow only one "make -f Makefile2" at a time, but pass parallelism. -.NOTPARALLEL: - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - -# Disable VCS-based implicit rules. -% : %,v - -# Disable VCS-based implicit rules. -% : RCS/% - -# Disable VCS-based implicit rules. -% : RCS/%,v - -# Disable VCS-based implicit rules. -% : SCCS/s.% - -# Disable VCS-based implicit rules. -% : s.% - -.SUFFIXES: .hpux_make_needs_suffix_list - -# Command-line flag to silence nested $(MAKE). -$(VERBOSE)MAKESILENT = -s - -#Suppress display of executed commands. -$(VERBOSE).SILENT: - -# A target that is always out of date. -cmake_force: -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /usr/local/bin/cmake - -# The command to remove a file. -RM = /usr/local/bin/cmake -E rm -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = /home/runner/work/MetalOS/MetalOS - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = /home/runner/work/MetalOS/MetalOS/cmake-build - -#============================================================================= -# Targets provided globally by CMake. - -# Special rule for the target test -test: - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running tests..." - /usr/local/bin/ctest --force-new-ctest-process $(ARGS) -.PHONY : test - -# Special rule for the target test -test/fast: test -.PHONY : test/fast - -# Special rule for the target edit_cache -edit_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake cache editor..." - /usr/local/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) -.PHONY : edit_cache - -# Special rule for the target edit_cache -edit_cache/fast: edit_cache -.PHONY : edit_cache/fast - -# Special rule for the target rebuild_cache -rebuild_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..." - /usr/local/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) -.PHONY : rebuild_cache - -# Special rule for the target rebuild_cache -rebuild_cache/fast: rebuild_cache -.PHONY : rebuild_cache/fast - -# Special rule for the target list_install_components -list_install_components: - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Available install components are: \"Unspecified\"" -.PHONY : list_install_components - -# Special rule for the target list_install_components -list_install_components/fast: list_install_components -.PHONY : list_install_components/fast - -# Special rule for the target install -install: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." - /usr/local/bin/cmake -P cmake_install.cmake -.PHONY : install - -# Special rule for the target install -install/fast: preinstall/fast - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." - /usr/local/bin/cmake -P cmake_install.cmake -.PHONY : install/fast - -# Special rule for the target install/local -install/local: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." - /usr/local/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake -.PHONY : install/local - -# Special rule for the target install/local -install/local/fast: preinstall/fast - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." - /usr/local/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake -.PHONY : install/local/fast - -# Special rule for the target install/strip -install/strip: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." - /usr/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake -.PHONY : install/strip - -# Special rule for the target install/strip -install/strip/fast: preinstall/fast - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." - /usr/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake -.PHONY : install/strip/fast - -# The main all target -all: cmake_check_build_system - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(CMAKE_COMMAND) -E cmake_progress_start /home/runner/work/MetalOS/MetalOS/cmake-build/CMakeFiles /home/runner/work/MetalOS/MetalOS/cmake-build/kernel//CMakeFiles/progress.marks - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 kernel/all - $(CMAKE_COMMAND) -E cmake_progress_start /home/runner/work/MetalOS/MetalOS/cmake-build/CMakeFiles 0 -.PHONY : all - -# The main clean target -clean: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 kernel/clean -.PHONY : clean - -# The main clean target -clean/fast: clean -.PHONY : clean/fast - -# Prepare targets for installation. -preinstall: all - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 kernel/preinstall -.PHONY : preinstall - -# Prepare targets for installation. -preinstall/fast: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 kernel/preinstall -.PHONY : preinstall/fast - -# clear depends -depend: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 -.PHONY : depend - -# Convenience name for target. -kernel/CMakeFiles/kernel_obj.dir/rule: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 kernel/CMakeFiles/kernel_obj.dir/rule -.PHONY : kernel/CMakeFiles/kernel_obj.dir/rule - -# Convenience name for target. -kernel_obj: kernel/CMakeFiles/kernel_obj.dir/rule -.PHONY : kernel_obj - -# fast build rule for target. -kernel_obj/fast: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/build -.PHONY : kernel_obj/fast - -# Convenience name for target. -kernel/CMakeFiles/kernel_elf.dir/rule: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 kernel/CMakeFiles/kernel_elf.dir/rule -.PHONY : kernel/CMakeFiles/kernel_elf.dir/rule - -# Convenience name for target. -kernel_elf: kernel/CMakeFiles/kernel_elf.dir/rule -.PHONY : kernel_elf - -# fast build rule for target. -kernel_elf/fast: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_elf.dir/build.make kernel/CMakeFiles/kernel_elf.dir/build -.PHONY : kernel_elf/fast - -# Convenience name for target. -kernel/CMakeFiles/kernel_bin.dir/rule: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 kernel/CMakeFiles/kernel_bin.dir/rule -.PHONY : kernel/CMakeFiles/kernel_bin.dir/rule - -# Convenience name for target. -kernel_bin: kernel/CMakeFiles/kernel_bin.dir/rule -.PHONY : kernel_bin - -# fast build rule for target. -kernel_bin/fast: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_bin.dir/build.make kernel/CMakeFiles/kernel_bin.dir/build -.PHONY : kernel_bin/fast - -src/apic.o: src/apic.c.o -.PHONY : src/apic.o - -# target to build an object file -src/apic.c.o: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/apic.c.o -.PHONY : src/apic.c.o - -src/apic.i: src/apic.c.i -.PHONY : src/apic.i - -# target to preprocess a source file -src/apic.c.i: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/apic.c.i -.PHONY : src/apic.c.i - -src/apic.s: src/apic.c.s -.PHONY : src/apic.s - -# target to generate assembly for a file -src/apic.c.s: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/apic.c.s -.PHONY : src/apic.c.s - -src/gdt.o: src/gdt.c.o -.PHONY : src/gdt.o - -# target to build an object file -src/gdt.c.o: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/gdt.c.o -.PHONY : src/gdt.c.o - -src/gdt.i: src/gdt.c.i -.PHONY : src/gdt.i - -# target to preprocess a source file -src/gdt.c.i: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/gdt.c.i -.PHONY : src/gdt.c.i - -src/gdt.s: src/gdt.c.s -.PHONY : src/gdt.s - -# target to generate assembly for a file -src/gdt.c.s: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/gdt.c.s -.PHONY : src/gdt.c.s - -src/interrupts.o: src/interrupts.c.o -.PHONY : src/interrupts.o - -# target to build an object file -src/interrupts.c.o: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/interrupts.c.o -.PHONY : src/interrupts.c.o - -src/interrupts.i: src/interrupts.c.i -.PHONY : src/interrupts.i - -# target to preprocess a source file -src/interrupts.c.i: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/interrupts.c.i -.PHONY : src/interrupts.c.i - -src/interrupts.s: src/interrupts.c.s -.PHONY : src/interrupts.s - -# target to generate assembly for a file -src/interrupts.c.s: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/interrupts.c.s -.PHONY : src/interrupts.c.s - -src/main.o: src/main.c.o -.PHONY : src/main.o - -# target to build an object file -src/main.c.o: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/main.c.o -.PHONY : src/main.c.o - -src/main.i: src/main.c.i -.PHONY : src/main.i - -# target to preprocess a source file -src/main.c.i: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/main.c.i -.PHONY : src/main.c.i - -src/main.s: src/main.c.s -.PHONY : src/main.s - -# target to generate assembly for a file -src/main.c.s: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/main.c.s -.PHONY : src/main.c.s - -src/memory.o: src/memory.c.o -.PHONY : src/memory.o - -# target to build an object file -src/memory.c.o: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/memory.c.o -.PHONY : src/memory.c.o - -src/memory.i: src/memory.c.i -.PHONY : src/memory.i - -# target to preprocess a source file -src/memory.c.i: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/memory.c.i -.PHONY : src/memory.c.i - -src/memory.s: src/memory.c.s -.PHONY : src/memory.s - -# target to generate assembly for a file -src/memory.c.s: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/memory.c.s -.PHONY : src/memory.c.s - -src/pci.o: src/pci.c.o -.PHONY : src/pci.o - -# target to build an object file -src/pci.c.o: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/pci.c.o -.PHONY : src/pci.c.o - -src/pci.i: src/pci.c.i -.PHONY : src/pci.i - -# target to preprocess a source file -src/pci.c.i: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/pci.c.i -.PHONY : src/pci.c.i - -src/pci.s: src/pci.c.s -.PHONY : src/pci.s - -# target to generate assembly for a file -src/pci.c.s: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/pci.c.s -.PHONY : src/pci.c.s - -src/smp.o: src/smp.c.o -.PHONY : src/smp.o - -# target to build an object file -src/smp.c.o: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/smp.c.o -.PHONY : src/smp.c.o - -src/smp.i: src/smp.c.i -.PHONY : src/smp.i - -# target to preprocess a source file -src/smp.c.i: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/smp.c.i -.PHONY : src/smp.c.i - -src/smp.s: src/smp.c.s -.PHONY : src/smp.s - -# target to generate assembly for a file -src/smp.c.s: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/smp.c.s -.PHONY : src/smp.c.s - -src/spinlock.o: src/spinlock.c.o -.PHONY : src/spinlock.o - -# target to build an object file -src/spinlock.c.o: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/spinlock.c.o -.PHONY : src/spinlock.c.o - -src/spinlock.i: src/spinlock.c.i -.PHONY : src/spinlock.i - -# target to preprocess a source file -src/spinlock.c.i: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/spinlock.c.i -.PHONY : src/spinlock.c.i - -src/spinlock.s: src/spinlock.c.s -.PHONY : src/spinlock.s - -# target to generate assembly for a file -src/spinlock.c.s: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/spinlock.c.s -.PHONY : src/spinlock.c.s - -src/timer.o: src/timer.c.o -.PHONY : src/timer.o - -# target to build an object file -src/timer.c.o: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/timer.c.o -.PHONY : src/timer.c.o - -src/timer.i: src/timer.c.i -.PHONY : src/timer.i - -# target to preprocess a source file -src/timer.c.i: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/timer.c.i -.PHONY : src/timer.c.i - -src/timer.s: src/timer.c.s -.PHONY : src/timer.s - -# target to generate assembly for a file -src/timer.c.s: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f kernel/CMakeFiles/kernel_obj.dir/build.make kernel/CMakeFiles/kernel_obj.dir/src/timer.c.s -.PHONY : src/timer.c.s - -# Help Target -help: - @echo "The following are some of the valid targets for this Makefile:" - @echo "... all (the default if no target is provided)" - @echo "... clean" - @echo "... depend" - @echo "... edit_cache" - @echo "... install" - @echo "... install/local" - @echo "... install/strip" - @echo "... list_install_components" - @echo "... rebuild_cache" - @echo "... test" - @echo "... kernel_bin" - @echo "... kernel_elf" - @echo "... kernel_obj" - @echo "... src/apic.o" - @echo "... src/apic.i" - @echo "... src/apic.s" - @echo "... src/gdt.o" - @echo "... src/gdt.i" - @echo "... src/gdt.s" - @echo "... src/interrupts.o" - @echo "... src/interrupts.i" - @echo "... src/interrupts.s" - @echo "... src/main.o" - @echo "... src/main.i" - @echo "... src/main.s" - @echo "... src/memory.o" - @echo "... src/memory.i" - @echo "... src/memory.s" - @echo "... src/pci.o" - @echo "... src/pci.i" - @echo "... src/pci.s" - @echo "... src/smp.o" - @echo "... src/smp.i" - @echo "... src/smp.s" - @echo "... src/spinlock.o" - @echo "... src/spinlock.i" - @echo "... src/spinlock.s" - @echo "... src/timer.o" - @echo "... src/timer.i" - @echo "... src/timer.s" -.PHONY : help - - - -#============================================================================= -# Special targets to cleanup operation of make. - -# Special rule to run CMake to check the build system integrity. -# No rule that depends on this can have commands that come from listfiles -# because they might be regenerated. -cmake_check_build_system: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 -.PHONY : cmake_check_build_system - diff --git a/cmake-build/tests/Makefile b/cmake-build/tests/Makefile deleted file mode 100644 index 59d62d7..0000000 --- a/cmake-build/tests/Makefile +++ /dev/null @@ -1,257 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.31 - -# Default target executed when no arguments are given to make. -default_target: all -.PHONY : default_target - -# Allow only one "make -f Makefile2" at a time, but pass parallelism. -.NOTPARALLEL: - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - -# Disable VCS-based implicit rules. -% : %,v - -# Disable VCS-based implicit rules. -% : RCS/% - -# Disable VCS-based implicit rules. -% : RCS/%,v - -# Disable VCS-based implicit rules. -% : SCCS/s.% - -# Disable VCS-based implicit rules. -% : s.% - -.SUFFIXES: .hpux_make_needs_suffix_list - -# Command-line flag to silence nested $(MAKE). -$(VERBOSE)MAKESILENT = -s - -#Suppress display of executed commands. -$(VERBOSE).SILENT: - -# A target that is always out of date. -cmake_force: -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /usr/local/bin/cmake - -# The command to remove a file. -RM = /usr/local/bin/cmake -E rm -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = /home/runner/work/MetalOS/MetalOS - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = /home/runner/work/MetalOS/MetalOS/cmake-build - -#============================================================================= -# Targets provided globally by CMake. - -# Special rule for the target test -test: - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running tests..." - /usr/local/bin/ctest --force-new-ctest-process $(ARGS) -.PHONY : test - -# Special rule for the target test -test/fast: test -.PHONY : test/fast - -# Special rule for the target edit_cache -edit_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake cache editor..." - /usr/local/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) -.PHONY : edit_cache - -# Special rule for the target edit_cache -edit_cache/fast: edit_cache -.PHONY : edit_cache/fast - -# Special rule for the target rebuild_cache -rebuild_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..." - /usr/local/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) -.PHONY : rebuild_cache - -# Special rule for the target rebuild_cache -rebuild_cache/fast: rebuild_cache -.PHONY : rebuild_cache/fast - -# Special rule for the target list_install_components -list_install_components: - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Available install components are: \"Unspecified\"" -.PHONY : list_install_components - -# Special rule for the target list_install_components -list_install_components/fast: list_install_components -.PHONY : list_install_components/fast - -# Special rule for the target install -install: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." - /usr/local/bin/cmake -P cmake_install.cmake -.PHONY : install - -# Special rule for the target install -install/fast: preinstall/fast - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..." - /usr/local/bin/cmake -P cmake_install.cmake -.PHONY : install/fast - -# Special rule for the target install/local -install/local: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." - /usr/local/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake -.PHONY : install/local - -# Special rule for the target install/local -install/local/fast: preinstall/fast - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..." - /usr/local/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake -.PHONY : install/local/fast - -# Special rule for the target install/strip -install/strip: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." - /usr/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake -.PHONY : install/strip - -# Special rule for the target install/strip -install/strip/fast: preinstall/fast - @$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..." - /usr/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake -.PHONY : install/strip/fast - -# The main all target -all: cmake_check_build_system - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(CMAKE_COMMAND) -E cmake_progress_start /home/runner/work/MetalOS/MetalOS/cmake-build/CMakeFiles /home/runner/work/MetalOS/MetalOS/cmake-build/tests//CMakeFiles/progress.marks - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 tests/all - $(CMAKE_COMMAND) -E cmake_progress_start /home/runner/work/MetalOS/MetalOS/cmake-build/CMakeFiles 0 -.PHONY : all - -# The main clean target -clean: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 tests/clean -.PHONY : clean - -# The main clean target -clean/fast: clean -.PHONY : clean/fast - -# Prepare targets for installation. -preinstall: all - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 tests/preinstall -.PHONY : preinstall - -# Prepare targets for installation. -preinstall/fast: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 tests/preinstall -.PHONY : preinstall/fast - -# clear depends -depend: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 -.PHONY : depend - -# Convenience name for target. -tests/CMakeFiles/test_bootloader.dir/rule: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 tests/CMakeFiles/test_bootloader.dir/rule -.PHONY : tests/CMakeFiles/test_bootloader.dir/rule - -# Convenience name for target. -test_bootloader: tests/CMakeFiles/test_bootloader.dir/rule -.PHONY : test_bootloader - -# fast build rule for target. -test_bootloader/fast: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f tests/CMakeFiles/test_bootloader.dir/build.make tests/CMakeFiles/test_bootloader.dir/build -.PHONY : test_bootloader/fast - -# Convenience name for target. -tests/CMakeFiles/run_tests.dir/rule: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 tests/CMakeFiles/run_tests.dir/rule -.PHONY : tests/CMakeFiles/run_tests.dir/rule - -# Convenience name for target. -run_tests: tests/CMakeFiles/run_tests.dir/rule -.PHONY : run_tests - -# fast build rule for target. -run_tests/fast: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f tests/CMakeFiles/run_tests.dir/build.make tests/CMakeFiles/run_tests.dir/build -.PHONY : run_tests/fast - -unit/test_bootloader.o: unit/test_bootloader.c.o -.PHONY : unit/test_bootloader.o - -# target to build an object file -unit/test_bootloader.c.o: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f tests/CMakeFiles/test_bootloader.dir/build.make tests/CMakeFiles/test_bootloader.dir/unit/test_bootloader.c.o -.PHONY : unit/test_bootloader.c.o - -unit/test_bootloader.i: unit/test_bootloader.c.i -.PHONY : unit/test_bootloader.i - -# target to preprocess a source file -unit/test_bootloader.c.i: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f tests/CMakeFiles/test_bootloader.dir/build.make tests/CMakeFiles/test_bootloader.dir/unit/test_bootloader.c.i -.PHONY : unit/test_bootloader.c.i - -unit/test_bootloader.s: unit/test_bootloader.c.s -.PHONY : unit/test_bootloader.s - -# target to generate assembly for a file -unit/test_bootloader.c.s: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(MAKE) $(MAKESILENT) -f tests/CMakeFiles/test_bootloader.dir/build.make tests/CMakeFiles/test_bootloader.dir/unit/test_bootloader.c.s -.PHONY : unit/test_bootloader.c.s - -# Help Target -help: - @echo "The following are some of the valid targets for this Makefile:" - @echo "... all (the default if no target is provided)" - @echo "... clean" - @echo "... depend" - @echo "... edit_cache" - @echo "... install" - @echo "... install/local" - @echo "... install/strip" - @echo "... list_install_components" - @echo "... rebuild_cache" - @echo "... test" - @echo "... run_tests" - @echo "... test_bootloader" - @echo "... unit/test_bootloader.o" - @echo "... unit/test_bootloader.i" - @echo "... unit/test_bootloader.s" -.PHONY : help - - - -#============================================================================= -# Special targets to cleanup operation of make. - -# Special rule to run CMake to check the build system integrity. -# No rule that depends on this can have commands that come from listfiles -# because they might be regenerated. -cmake_check_build_system: - cd /home/runner/work/MetalOS/MetalOS/cmake-build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 -.PHONY : cmake_check_build_system - diff --git a/kernel/Makefile b/kernel/Makefile deleted file mode 100644 index b071c32..0000000 --- a/kernel/Makefile +++ /dev/null @@ -1,79 +0,0 @@ -# MetalOS Kernel Makefile - -# Cross-compiler (x86_64 bare metal) -CC = x86_64-elf-gcc -AS = nasm -LD = x86_64-elf-ld -OBJCOPY = x86_64-elf-objcopy - -# Check if cross-compiler exists, fallback to regular gcc -ifeq ($(shell which $(CC) 2>/dev/null),) - CC = gcc - LD = ld - OBJCOPY = objcopy -endif - -# Directories -SRC_DIR = src -INC_DIR = include -BUILD_DIR = build - -# Compiler flags -CFLAGS = -Wall -Wextra -Werror \ - -ffreestanding -fno-stack-protector \ - -mno-red-zone -mcmodel=large \ - -I$(INC_DIR) \ - -O2 - -# Assembler flags -ASFLAGS = -f elf64 - -# Linker flags -LDFLAGS = -nostdlib -T linker.ld - -# Source files -C_SOURCES = $(shell find $(SRC_DIR) -name '*.c') -ASM_SOURCES = $(shell find $(SRC_DIR) -name '*.asm') - -# Object files -C_OBJECTS = $(patsubst $(SRC_DIR)/%.c,$(BUILD_DIR)/%.o,$(C_SOURCES)) -ASM_OBJECTS = $(patsubst $(SRC_DIR)/%.asm,$(BUILD_DIR)/%.o,$(ASM_SOURCES)) -OBJECTS = $(C_OBJECTS) $(ASM_OBJECTS) - -# Output -TARGET = metalos.bin - -.PHONY: all clean - -all: $(BUILD_DIR) $(TARGET) - -$(BUILD_DIR): - mkdir -p $(BUILD_DIR) - mkdir -p $(BUILD_DIR)/core - mkdir -p $(BUILD_DIR)/hal - mkdir -p $(BUILD_DIR)/drivers - mkdir -p $(BUILD_DIR)/syscall - -# Compile C files -$(BUILD_DIR)/%.o: $(SRC_DIR)/%.c - @mkdir -p $(dir $@) - $(CC) $(CFLAGS) -c $< -o $@ - -# Assemble ASM files -$(BUILD_DIR)/%.o: $(SRC_DIR)/%.asm - @mkdir -p $(dir $@) - $(AS) $(ASFLAGS) $< -o $@ - -# Link kernel -$(TARGET): $(OBJECTS) - $(LD) $(LDFLAGS) $(OBJECTS) -o $@ - -clean: - rm -rf $(BUILD_DIR) $(TARGET) - -# Print variables for debugging -info: - @echo "C Sources: $(C_SOURCES)" - @echo "ASM Sources: $(ASM_SOURCES)" - @echo "Objects: $(OBJECTS)" - @echo "Compiler: $(CC)" diff --git a/tests/Makefile b/tests/Makefile deleted file mode 100644 index bb441e6..0000000 --- a/tests/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# MetalOS Test Suite Makefile - -CC = gcc -CFLAGS = -Wall -Wextra -std=c11 -I../tests/include -I../kernel/include -I../bootloader/include -LDFLAGS = - -# Test source files -TEST_SOURCES = $(wildcard unit/*.c) -TEST_BINARIES = $(TEST_SOURCES:.c=) - -# Default target -.PHONY: all -all: $(TEST_BINARIES) - -# Build each test binary -unit/%: unit/%.c include/test_framework.h - @echo "Building test: $@" - $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) - -# Run all tests -.PHONY: test -test: all - @echo "" - @echo "╔════════════════════════════════════════════╗" - @echo "║ Running MetalOS Test Suite ║" - @echo "╚════════════════════════════════════════════╝" - @echo "" - @for test in $(TEST_BINARIES); do \ - ./$$test || exit 1; \ - done - @echo "" - @echo "╔════════════════════════════════════════════╗" - @echo "║ All Test Suites Passed ✓ ║" - @echo "╚════════════════════════════════════════════╝" - @echo "" - -# Run tests with verbose output -.PHONY: test-verbose -test-verbose: all - @for test in $(TEST_BINARIES); do \ - echo "Running $$test..."; \ - ./$$test -v; \ - echo ""; \ - done - -# Clean test binaries -.PHONY: clean -clean: - @echo "Cleaning test binaries..." - @rm -f $(TEST_BINARIES) - @rm -f unit/*.o - @echo "Clean complete" - -# Help target -.PHONY: help -help: - @echo "MetalOS Test Suite Makefile" - @echo "" - @echo "Targets:" - @echo " all - Build all test binaries" - @echo " test - Build and run all tests" - @echo " test-verbose - Run tests with verbose output" - @echo " clean - Remove test binaries" - @echo " help - Show this help message" From f4a0b3299889ca629493c99e830c4e29d67df7a2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 28 Dec 2025 20:57:33 +0000 Subject: [PATCH 4/5] Update BUILD.md and BUILD_SYSTEMS.md to remove Makefile references Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com> --- docs/BUILD.md | 60 ++++++++++++----------- docs/BUILD_SYSTEMS.md | 109 ++++++++++++++---------------------------- 2 files changed, 67 insertions(+), 102 deletions(-) diff --git a/docs/BUILD.md b/docs/BUILD.md index 518ea52..19660e8 100644 --- a/docs/BUILD.md +++ b/docs/BUILD.md @@ -21,10 +21,12 @@ The easiest way to build MetalOS is using Docker, which provides a pre-configure ./scripts/docker-run.sh scripts/setup-deps.sh # 3. Build MetalOS -./scripts/docker-run.sh make all +mkdir build && cd build +cmake .. +cmake --build . # 4. Test in QEMU (headless mode) -./scripts/docker-run.sh make qemu +cmake --build . --target qemu # 5. Optional: Interactive shell in container ./scripts/docker-run.sh /bin/bash @@ -33,7 +35,7 @@ The easiest way to build MetalOS is using Docker, which provides a pre-configure ### What's Included in Docker The Docker image includes: -- **Build tools**: GCC, NASM, Make, CMake, Meson +- **Build tools**: GCC, NASM, CMake, Meson - **QEMU**: For testing with UEFI firmware - **OVMF**: UEFI firmware for QEMU - **Dependency management**: Scripts to download AMD firmware, Mesa RADV, QT6 @@ -127,11 +129,15 @@ This produces `kernel/metalos.bin` - the kernel binary. ## Creating Bootable Image ```bash -# From repository root -make image +# From repository root, if you haven't already +mkdir build && cd build +cmake .. + +# Create the bootable image +cmake --build . --target image ``` -This creates `build/metalos.img` - a bootable disk image containing: +This creates `build/build/metalos.img` - a bootable disk image containing: - EFI System Partition with bootloader - Kernel binary - Any required data files @@ -146,41 +152,33 @@ Ensure QEMU and OVMF are installed: ```bash # Ubuntu/Debian -sudo apt-get install qemu-system-x86 ovmf mtools +sudo apt-get install qemu-system-x86 ovmf mtools cmake # Arch Linux -sudo pacman -S qemu-full edk2-ovmf mtools +sudo pacman -S qemu-full edk2-ovmf mtools cmake # Fedora -sudo dnf install qemu-system-x86 edk2-ovmf mtools +sudo dnf install qemu-system-x86 edk2-ovmf mtools cmake ``` ### Boot MetalOS in QEMU ```bash -make qemu +cd build +cmake --build . --target qemu ``` This will: -1. Build bootloader and kernel (or use placeholders if build fails) +1. Build bootloader and kernel 2. Create a bootable FAT32 disk image with UEFI boot structure 3. Launch QEMU with OVMF UEFI firmware in headless mode -4. Boot the system (will drop to UEFI shell until bootloader is complete) - -**Display Options**: By default, QEMU runs in headless mode (no graphics). To use graphical display: - -```bash -# Use GTK display (if available) -make qemu QEMU_DISPLAY=gtk - -# Use SDL display (if available) -make qemu QEMU_DISPLAY=sdl -``` +4. Boot the system ### Boot with Debug Output ```bash -make qemu-debug +cd build +cmake --build . --target qemu-debug ``` This includes CPU interrupt and reset debugging output. @@ -191,7 +189,8 @@ For debugging with GDB: ```bash # Terminal 1 - Start QEMU with GDB server -make qemu-gdb +cd build +cmake --build . --target qemu-gdb # Terminal 2 - Connect GDB gdb kernel/metalos.bin @@ -206,7 +205,8 @@ QEMU will wait for GDB connection before starting execution. To verify QEMU and OVMF are properly installed without needing a bootable OS image: ```bash -make qemu-uefi-test +cd build +cmake --build . --target qemu-uefi-test ``` This boots directly to the UEFI shell, confirming your QEMU+OVMF setup works correctly. @@ -292,10 +292,14 @@ ENABLE_SERIAL ?= 1 ```bash # Clean all build artifacts -make clean +cd build +cmake --build . --target clean -# Clean everything including dependencies -make distclean +# Or remove the build directory entirely +cd .. +rm -rf build +mkdir build && cd build +cmake .. ``` ## Troubleshooting diff --git a/docs/BUILD_SYSTEMS.md b/docs/BUILD_SYSTEMS.md index 33b9a3a..5cedd5f 100644 --- a/docs/BUILD_SYSTEMS.md +++ b/docs/BUILD_SYSTEMS.md @@ -1,21 +1,15 @@ # MetalOS Build Systems Guide -MetalOS supports multiple build systems to accommodate different developer preferences and workflows. +MetalOS uses **CMake** as its primary build system, which can be used with different build backends for different workflows. ## Quick Start -### Using Make (Traditional) -```bash -make all # Build everything -make qemu # Test in QEMU -make clean # Clean build artifacts -``` - -### Using CMake + Make +### Using CMake (Default) ```bash mkdir build && cd build cmake .. cmake --build . +cmake --build . --target qemu # Test in QEMU ``` ### Using CMake + Ninja (Fastest) @@ -23,6 +17,7 @@ cmake --build . mkdir build && cd build cmake -G Ninja .. ninja +ninja qemu # Test in QEMU ``` ### Using Conan + CMake @@ -35,89 +30,38 @@ cmake --build . ## Build System Comparison -| Build System | Speed | Features | Best For | -|--------------|-------|----------|----------| -| **Make** | Medium | Simple, traditional | Quick builds, CI/CD | -| **CMake** | Medium | Cross-platform, modern | Complex projects, IDEs | +| Build Backend | Speed | Features | Best For | +|---------------|-------|----------|----------| +| **Make** (default) | Medium | Cross-platform, standard | General use, CI/CD | | **Ninja** | Fast | Parallel builds | Development, large projects | | **Conan** | Medium | Dependency management | Projects with external deps | ## Detailed Usage -### 1. Make (Traditional Build System) +### 1. CMake (Primary Build System) -The original build system using GNU Make. +CMake is the primary build system for MetalOS, providing cross-platform support and modern features. #### Build Commands ```bash -# Build all components -make all - -# Build individually -make bootloader -make kernel -make test - -# Create bootable image -make image - -# Run in QEMU -make qemu # Headless mode -make qemu QEMU_DISPLAY=gtk # With GUI -make qemu-debug # With debug output -make qemu-gdb # With GDB server - -# Clean -make clean # Clean build artifacts -make distclean # Deep clean -``` - -#### Advantages -- ✅ Simple and straightforward -- ✅ No additional dependencies -- ✅ Works on all Unix-like systems -- ✅ Easy to understand and modify - -#### Disadvantages -- ❌ Not cross-platform (Windows requires special setup) -- ❌ Can be slower for large projects -- ❌ Limited dependency tracking - ---- - -### 2. CMake (Modern Build Generator) - -CMake generates build files for various build systems (Make, Ninja, Visual Studio, etc.). - -#### Build Commands -```bash -# Configure (generates build files) +# Configure and build mkdir build && cd build cmake .. - -# Configure with specific generator -cmake -G "Unix Makefiles" .. -cmake -G Ninja .. -cmake -G "Visual Studio 17 2022" .. # Windows - -# Configure with options -cmake -DBUILD_BOOTLOADER=ON -DBUILD_KERNEL=ON -DBUILD_TESTS=ON .. -cmake -DCMAKE_BUILD_TYPE=Debug .. -cmake -DCMAKE_BUILD_TYPE=Release .. - -# Build cmake --build . -cmake --build . --parallel 8 # Use 8 parallel jobs # Build specific targets cmake --build . --target bootloader_efi cmake --build . --target kernel_bin cmake --build . --target image -# Run custom targets -cmake --build . --target qemu -cmake --build . --target qemu-debug -cmake --build . --target qemu-gdb +# Create bootable image +make image + +# Run in QEMU +cmake --build . --target qemu # Headless mode +cmake --build . --target qemu-debug # With debug output +cmake --build . --target qemu-gdb # With GDB server +cmake --build . --target qemu-uefi-test # Test UEFI setup # Test ctest @@ -133,6 +77,23 @@ cmake --build . --target clean rm -rf build # Complete clean ``` +#### Advantages +- ✅ Cross-platform (Windows, Linux, macOS) +- ✅ IDE integration (CLion, VSCode, Visual Studio) +- ✅ Modern dependency management +- ✅ Better parallel build support +- ✅ Generates compile_commands.json for IDEs + +#### Disadvantages +- ❌ Requires cmake installation +- ❌ Slightly more complex setup + +--- + +### 2. Ninja (Fast Build Backend) + +Ninja is a fast build backend that can be used with CMake for faster incremental builds. + #### Advantages - ✅ Cross-platform (Windows, Linux, macOS) - ✅ IDE integration (CLion, Visual Studio, VS Code) From 0a8ba00c2a5cdad1fd9947e508217adb177b818d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 28 Dec 2025 20:59:28 +0000 Subject: [PATCH 5/5] Fix documentation issues found in code review Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com> --- docs/BUILD.md | 2 +- docs/BUILD_SYSTEMS.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/BUILD.md b/docs/BUILD.md index 19660e8..c3af994 100644 --- a/docs/BUILD.md +++ b/docs/BUILD.md @@ -137,7 +137,7 @@ cmake .. cmake --build . --target image ``` -This creates `build/build/metalos.img` - a bootable disk image containing: +This creates the bootable disk image at `/build/metalos.img` (e.g., `build/build/metalos.img` if your build directory is named `build/`). The image contains: - EFI System Partition with bootloader - Kernel binary - Any required data files diff --git a/docs/BUILD_SYSTEMS.md b/docs/BUILD_SYSTEMS.md index 5cedd5f..961c213 100644 --- a/docs/BUILD_SYSTEMS.md +++ b/docs/BUILD_SYSTEMS.md @@ -55,7 +55,7 @@ cmake --build . --target kernel_bin cmake --build . --target image # Create bootable image -make image +cmake --build . --target image # Run in QEMU cmake --build . --target qemu # Headless mode