diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-26 15:37:37 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-26 15:37:37 +0100 |
| commit | 0476248f648ccddea9bdf9bae9095c3231e6643d (patch) | |
| tree | 61280ff1ad93b384a9697c0ee9d60854e12e58e9 /makefile | |
| parent | ae89bf9564c59ea3aee10f175d473e562af793f8 (diff) | |
Kernel: Retarget AMD64 according to spec.
Kernel/Toolchain: Now move hKernel to /System/ when building the system.
MPT: Fix API.
newBoot: This is the priority, get a standard file layout to load the
kernel at BK_START_KERNEL (0x00080000)
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'makefile')
| -rw-r--r-- | makefile | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -1,6 +1,6 @@ -CC = clang -LD = ld.lld -CCFLAGS = --target=ppc64le -c -ffreestanding -fno-rtti -fno-exceptions -std=c++20 -D__HAVE_HCORE_APIS__ -D__hCore__ -I./ -I$(HOME)/ +CC = x86_64-elf-gcc +LD = x86_64-elf-ld +CCFLAGS = -c -ffreestanding -fno-rtti -fno-exceptions -std=c++20 -D__HAVE_HCORE_APIS__ -D__hCore__ -I./ -I$(HOME)/ ASM = nasm ASMFLAGS = -f elf64 @@ -8,27 +8,27 @@ ASMFLAGS = -f elf64 KERNEL = hKernel.elf # The kernel entrypoint -ENTRY = --script=Linker/PowerPC.ld - -# Where the text segment is. -TEXT = 0xc0000000 +SCRIPT = --script=Linker/AMD64.ld # we want a flat binary FMT = elf64 .PHONY: kernel-build kernel-build: - $(CC) $(CCFLAGS) Source/*.cxx HALKit/PowerPC/PCI/*.cxx Source/Network/*.cpp\ - Source/Storage/*.cxx HALKit/PowerPC/*.cpp HALKit/PowerPC/*.s - mv *.o Obj/ + $(CC) $(CCFLAGS) Source/*.cxx HALKit/AMD64/PCI/*.cpp Source/Network/*.cpp\ + Source/Storage/*.cxx HALKit/AMD64/*.cxx HALKit/AMD64/*.cpp HALKit/AMD64/*.s + $(ASM) -f elf64 HALKit/AMD64/DebugManager.asm + $(ASM) -f elf64 HALKit/AMD64/SMPCoreManager.asm + mv *.o HALKit/AMD64/*.o Obj/ .PHONY: kernel-link kernel-link: - $(LD) -e $(ENTRY) Obj/*.o -o $(KERNEL) + $(LD) $(SCRIPT) Obj/*.o -o $(KERNEL) + cp $(KERNEL) Root/System .PHONY: all all: kernel-build kernel-link - echo "[hKernel] you can now link it!" + @echo "[hKernel] JOB DONE." .PHONY: kernel-clean kernel-clean: |
