summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/kernel-ahci.yml2
-rw-r--r--.github/workflows/kernel-pio.yml2
-rw-r--r--README.md2
-rw-r--r--dev/boot/amd64-ci.make2
-rw-r--r--dev/boot/amd64-desktop.make4
-rw-r--r--dev/boot/modules/BootNet/BootNet.cc25
-rw-r--r--dev/boot/modules/BootNet/amd64.json1
-rw-r--r--dev/boot/modules/SysChk/SysChk.cc2
-rw-r--r--dev/boot/modules/SysChk/amd64-ahci.json1
-rw-r--r--dev/boot/modules/SysChk/amd64-pio.json1
-rw-r--r--dev/boot/src/BootThread.cc2
-rw-r--r--dev/boot/src/HEL/AMD64/BootEFI.cc88
-rw-r--r--dev/kernel/CompilerKit/Version.h4
-rw-r--r--dev/kernel/FirmwareKit/EFI/API.h2
-rw-r--r--dev/kernel/HALKit/AMD64/HalKernelMain.cc3
-rw-r--r--dev/kernel/HALKit/AMD64/HalTimerAMD64.cc2
-rw-r--r--dev/kernel/KernelKit/Timer.h2
-rw-r--r--dev/kernel/amd64-desktop.make2
-rw-r--r--dev/user/user.json1
-rwxr-xr-xmodules_ahci_x64.sh11
-rwxr-xr-xmodules_pio_x64.sh11
-rw-r--r--public/frameworks/CoreFoundation.fwrk/CoreFoundation.json1
-rw-r--r--public/frameworks/DiskImage.fwrk/DiskImage.json1
-rw-r--r--public/frameworks/KernelTest.fwrk/KernelTest.json1
-rwxr-xr-xsetup_x64.sh (renamed from setup_amd64.sh)8
25 files changed, 86 insertions, 95 deletions
diff --git a/.github/workflows/kernel-ahci.yml b/.github/workflows/kernel-ahci.yml
index 51cb54a3..a76865c0 100644
--- a/.github/workflows/kernel-ahci.yml
+++ b/.github/workflows/kernel-ahci.yml
@@ -16,5 +16,5 @@ jobs:
- name: Install Packages
run: sudo apt update && sudo apt install mingw-w64 qemu-utils nasm
- name: Build NeKernel (AHCI)
- run: ./setup_amd64.sh && cd dev/kernel && export AHCI_SUPPORT=1 && make -f amd64-ci.make all
+ run: ./setup_x64.sh && cd dev/kernel && export AHCI_SUPPORT=1 && make -f amd64-ci.make all
diff --git a/.github/workflows/kernel-pio.yml b/.github/workflows/kernel-pio.yml
index 57f6faee..e6a205b3 100644
--- a/.github/workflows/kernel-pio.yml
+++ b/.github/workflows/kernel-pio.yml
@@ -16,5 +16,5 @@ jobs:
- name: Install Packages
run: sudo apt update && sudo apt install mingw-w64 qemu-utils nasm
- name: Build NeKernel (ATA PIO)
- run: ./setup_amd64.sh && cd dev/kernel && export ATA_PIO_SUPPORT=1 && make -f amd64-ci.make all
+ run: ./setup_x64.sh && cd dev/kernel && export ATA_PIO_SUPPORT=1 && make -f amd64-ci.make all
diff --git a/README.md b/README.md
index 041257c7..f26df2ba 100644
--- a/README.md
+++ b/README.md
@@ -46,7 +46,7 @@ A documentation regarding building, and developing for NeKernel is available her
```sh
git clone git@github.com:amlel-el-mahrouss/nekernel.git
cd nekernel
-./setup_amd64.sh
+./setup_x64.sh
./debug_ata_x64.sh # Generic ATA PIO target
```
diff --git a/dev/boot/amd64-ci.make b/dev/boot/amd64-ci.make
index 9ee61eed..62ab9af1 100644
--- a/dev/boot/amd64-ci.make
+++ b/dev/boot/amd64-ci.make
@@ -88,7 +88,7 @@ all: compile-amd64
.PHONY: disk
disk:
- dd if=/dev/zero of=$(BOOT) bs=30M count=100
+ dd if=/dev/zero of=$(BOOT) bs=7M count=100
mformat -i $(BOOT) -F -v "NeKernel"
diff --git a/dev/boot/amd64-desktop.make b/dev/boot/amd64-desktop.make
index 3ed2ba3f..21a99941 100644
--- a/dev/boot/amd64-desktop.make
+++ b/dev/boot/amd64-desktop.make
@@ -96,7 +96,7 @@ all: compile-amd64
.PHONY: disk
disk:
- dd if=/dev/zero of=$(BOOT) bs=30M count=100
+ dd if=/dev/zero of=$(BOOT) bs=7M count=100
mformat -i $(BOOT) -F -v "NEKERNEL-ESP"
@@ -128,7 +128,7 @@ run-efi-amd64-ata-dma:
.PHONY: run-efi-amd64-ata
run-efi-amd64-ata: run-efi-amd64-ata-dma
-# img_2 is the rescue disk. img is the bootable disk, as provided by the Zeta specs.
+# img_2 is the rescue disk. img is the bootable disk, as provided by the NeKernel specs.
.PHONY: epm-img
epm-img:
qemu-img create -f raw $(IMG) 4G
diff --git a/dev/boot/modules/BootNet/BootNet.cc b/dev/boot/modules/BootNet/BootNet.cc
index 28d96cb2..050148c4 100644
--- a/dev/boot/modules/BootNet/BootNet.cc
+++ b/dev/boot/modules/BootNet/BootNet.cc
@@ -15,18 +15,19 @@
STATIC EfiGUID kEfiSimpleProtoGUID = EFI_SIMPLE_NETWORK_PROTOCOL_GUID;
STATIC EFI_SIMPLE_NETWORK_PROTOCOL* kEfiProtocol = nullptr;
-STATIC Void bootnet_read_ip_packet(BOOTNET_INTERNET_HEADER&);
+STATIC Void bootnet_read_ip_packet(BOOTNET_INTERNET_HEADER);
EXTERN_C Int32 BootNetModuleMain(Kernel::HEL::BootInfoHeader* handover)
{
- fw_init_efi((EfiSystemTable*)handover->f_FirmwareCustomTables[0]);
+ Boot::BootTextWriter writer;
+ writer.Write("BootNet: Init EFI...\r");
- Boot::BootTextWriter writer;
+ fw_init_efi((EfiSystemTable*)handover->f_FirmwareCustomTables[1]);
if (BS->LocateProtocol(&kEfiSimpleProtoGUID, nullptr, (VoidPtr*)&kEfiProtocol) != kEfiOk)
{
- writer.Write("[BOOT] BootNet: Not supported by firmware.\r");
+ writer.Write("BootNet: Not supported by firmware.\r");
return kEfiFail;
}
@@ -34,13 +35,13 @@ EXTERN_C Int32 BootNetModuleMain(Kernel::HEL::BootInfoHeader* handover)
SetMem(&inet, 0, sizeof(BOOTNET_INTERNET_HEADER));
- writer.Write("[BOOT] BootNet: Downloading kernel...\r");
+ writer.Write("BootNet: Downloading kernel...\r");
bootnet_read_ip_packet(inet);
if (inet.Length < 1)
{
- writer.Write("[BOOT] BootNet: No executable attached to the packet, aborting.\r");
+ writer.Write("BootNet: No executable attached to the packet, aborting.\r");
return kEfiFail;
}
@@ -50,7 +51,7 @@ EXTERN_C Int32 BootNetModuleMain(Kernel::HEL::BootInfoHeader* handover)
if (thread.IsValid())
{
- writer.Write("[BOOT] BootNet: Running kernel...\r");
+ writer.Write("BootNet: Running kernel...\r");
return thread.Start(handover, YES);
}
@@ -62,11 +63,11 @@ EXTERN_C Int32 BootNetModuleMain(Kernel::HEL::BootInfoHeader* handover)
if (inet.Length != kROMSize)
{
- writer.Write("[BOOT] BootNet: Not within 512K.\r");
+ writer.Write("BootNet: Not within 512K.\r");
return kEfiFail;
}
- writer.Write("[BOOT] BootNet: Programming the flash is not available as of right now.\r");
+ writer.Write("BootNet: Programming the flash is not available as of right now.\r");
/// TODO: Program new firmware to EEPROM (if crc and size matches)
@@ -77,11 +78,7 @@ EXTERN_C Int32 BootNetModuleMain(Kernel::HEL::BootInfoHeader* handover)
return kEfiFail;
}
-STATIC Void bootnet_read_ip_packet(BOOTNET_INTERNET_HEADER& inet)
+STATIC Void bootnet_read_ip_packet(BOOTNET_INTERNET_HEADER inet)
{
- kEfiProtocol->Start(kEfiProtocol);
-
NE_UNUSED(inet);
-
- kEfiProtocol->Stop(kEfiProtocol);
} \ No newline at end of file
diff --git a/dev/boot/modules/BootNet/amd64.json b/dev/boot/modules/BootNet/amd64.json
index 7b87b533..7e5fd018 100644
--- a/dev/boot/modules/BootNet/amd64.json
+++ b/dev/boot/modules/BootNet/amd64.json
@@ -7,7 +7,6 @@
"compiler_flags": [
"-nostdlib",
"-std=c++20",
- "-fPIC",
"-fno-rtti",
"-fno-exceptions",
"-Wl,--subsystem=17,--image-base,0x4000000,-e,BootNetModuleMain"
diff --git a/dev/boot/modules/SysChk/SysChk.cc b/dev/boot/modules/SysChk/SysChk.cc
index 3086cdc6..dec4e11a 100644
--- a/dev/boot/modules/SysChk/SysChk.cc
+++ b/dev/boot/modules/SysChk/SysChk.cc
@@ -28,6 +28,8 @@
EXTERN_C Int32 SysChkModuleMain(Kernel::HEL::BootInfoHeader* handover)
{
+ NE_UNUSED(handover);
+
#ifdef __ATA_PIO__
Boot::BDiskFormatFactory<BootDeviceATA> partition_factory;
diff --git a/dev/boot/modules/SysChk/amd64-ahci.json b/dev/boot/modules/SysChk/amd64-ahci.json
index 98e570f4..1377c23b 100644
--- a/dev/boot/modules/SysChk/amd64-ahci.json
+++ b/dev/boot/modules/SysChk/amd64-ahci.json
@@ -7,7 +7,6 @@
"compiler_flags": [
"-nostdlib",
"-std=c++20",
- "-fPIC",
"-fno-rtti",
"-fno-exceptions",
"-Wl,--subsystem=17,--image-base,0x4000000,-e,SysChkModuleMain"
diff --git a/dev/boot/modules/SysChk/amd64-pio.json b/dev/boot/modules/SysChk/amd64-pio.json
index 2b159e38..879f651f 100644
--- a/dev/boot/modules/SysChk/amd64-pio.json
+++ b/dev/boot/modules/SysChk/amd64-pio.json
@@ -7,7 +7,6 @@
"compiler_flags": [
"-nostdlib",
"-std=c++20",
- "-fPIC",
"-fno-rtti",
"-fno-exceptions",
"-Wl,--subsystem=17,--image-base,0x4000000,-e,SysChkModuleMain"
diff --git a/dev/boot/src/BootThread.cc b/dev/boot/src/BootThread.cc
index ce691f96..3f399d66 100644
--- a/dev/boot/src/BootThread.cc
+++ b/dev/boot/src/BootThread.cc
@@ -216,4 +216,4 @@ namespace Boot
{
return fStartAddress != nullptr;
}
-} // namespace Boot
+} // namespace Boot \ No newline at end of file
diff --git a/dev/boot/src/HEL/AMD64/BootEFI.cc b/dev/boot/src/HEL/AMD64/BootEFI.cc
index a818fcd6..795e43cf 100644
--- a/dev/boot/src/HEL/AMD64/BootEFI.cc
+++ b/dev/boot/src/HEL/AMD64/BootEFI.cc
@@ -82,18 +82,25 @@ EFI_EXTERN_C EFI_API Int32 BootloaderMain(EfiHandlePtr image_handle,
{
fw_init_efi(sys_table); ///! Init the EFI library.
+ fb_init();
+
HEL::BootInfoHeader* handover_hdr =
new HEL::BootInfoHeader();
- UInt32 map_key = 0;
+ UInt32 map_key = 0;
+ UInt32 size_struct_ptr = sizeof(EfiMemoryDescriptor);
+ EfiMemoryDescriptor* struct_ptr = nullptr;
+ UInt32 sz_desc = sizeof(EfiMemoryDescriptor);
+ UInt32 rev_desc = 0;
+
+ Boot::BootTextWriter writer;
+
+ writer.Write("BootZ: NeKernel Loader.\r");
-#ifdef ZBA_USE_FB
if (!boot_init_fb())
{
- Boot::BootTextWriter writer;
writer.Write("BootZ: Invalid Framebuffer, can't boot NeKernel.\r");
-
- CANT_REACH();
+ Boot::Stop();
}
for (SizeT index_vt = 0; index_vt < sys_table->NumberOfTableEntries;
@@ -123,7 +130,6 @@ EFI_EXTERN_C EFI_API Int32 BootloaderMain(EfiHandlePtr image_handle,
handover_hdr->f_GOP.f_PixelPerLine = kGop->Mode->Info->PixelsPerScanLine;
handover_hdr->f_GOP.f_PixelFormat = kGop->Mode->Info->PixelFormat;
handover_hdr->f_GOP.f_Size = kGop->Mode->FrameBufferSize;
-#endif // ZBA_USE_FB
// ------------------------------------------- //
// Grab MP services, extended to runtime. //
@@ -138,14 +144,10 @@ EFI_EXTERN_C EFI_API Int32 BootloaderMain(EfiHandlePtr image_handle,
kHandoverHeader = handover_hdr;
- fb_init();
-
FB::fb_clear_video();
FBDrawBitMapInRegion(zka_disk, NE_DISK_WIDTH, NE_DISK_HEIGHT, (kHandoverHeader->f_GOP.f_Width - NE_DISK_WIDTH) / 2, (kHandoverHeader->f_GOP.f_Height - NE_DISK_HEIGHT) / 2);
- fb_clear();
-
UInt32 cnt_enabled = 0;
UInt32 cnt_disabled = 0;
@@ -161,13 +163,13 @@ EFI_EXTERN_C EFI_API Int32 BootloaderMain(EfiHandlePtr image_handle,
// Fill handover header now.
- Boot::BootTextWriter writer;
-
handover_hdr->f_BitMapStart = nullptr; /* Start of bitmap. */
handover_hdr->f_BitMapSize = kHandoverBitMapSz; /* Size of bitmap in bytes. */
Int32 trials = 5 * 10000000;
+ writer.Write("BootZ: Allocating sufficent memory, trying with 4GB...\r");
+
while (BS->AllocatePool(EfiLoaderData, handover_hdr->f_BitMapSize, &handover_hdr->f_BitMapStart) != kEfiOk)
{
--trials;
@@ -212,22 +214,16 @@ EFI_EXTERN_C EFI_API Int32 BootloaderMain(EfiHandlePtr image_handle,
if (syschk_thread->Start(handover_hdr, NO) != kEfiOk)
{
- fb_init();
-
FB::fb_clear_video();
-
FBDrawBitMapInRegion(zka_no_disk, NE_NO_DISK_WIDTH, NE_NO_DISK_HEIGHT, (kHandoverHeader->f_GOP.f_Width - NE_NO_DISK_WIDTH) / 2, (kHandoverHeader->f_GOP.f_Height - NE_NO_DISK_HEIGHT) / 2);
-
- fb_clear();
}
}
- // ------------------------------------------ //
- // null these fields, to avoid being reused later.
- // ------------------------------------------ //
+ BS->GetMemoryMap(&size_struct_ptr, struct_ptr, &map_key, &sz_desc, &rev_desc);
+
+ struct_ptr = new EfiMemoryDescriptor[sz_desc];
- handover_hdr->f_FirmwareCustomTables[0] = nullptr;
- handover_hdr->f_FirmwareCustomTables[1] = nullptr;
+ BS->GetMemoryMap(&size_struct_ptr, struct_ptr, &map_key, &sz_desc, &rev_desc);
handover_hdr->f_FirmwareVendorLen = Boot::BStrLen(sys_table->FirmwareVendor);
@@ -263,11 +259,13 @@ EFI_EXTERN_C EFI_API Int32 BootloaderMain(EfiHandlePtr image_handle,
ver = KERNEL_VERSION_BCD;
ST->RuntimeServices->SetVariable(L"/props/kern_ver", kEfiGlobalNamespaceVarGUID, nullptr, &sz_ver, &ver);
- writer.Write("BootZ: Kernel Version Updated: ").Write(ver).Write("\r");
+ writer.Write("BootZ: Kernel Version has been updated: ").Write(ver).Write("\r");
}
writer.Write("BootZ: Kernel Version: ").Write(ver).Write("\r");
+ // Fallback to bootnet, if not PXE.
+
Boot::BootFileReader reader_kernel(kernel_path, image_handle);
reader_kernel.ReadAll(0);
@@ -280,46 +278,32 @@ EFI_EXTERN_C EFI_API Int32 BootloaderMain(EfiHandlePtr image_handle,
if (reader_kernel.Blob())
{
+ // ------------------------------------------ //
+ // null these fields, to avoid being reused later.
+ // ------------------------------------------ //
+
+ handover_hdr->f_FirmwareCustomTables[0] = nullptr;
+ handover_hdr->f_FirmwareCustomTables[1] = nullptr;
+
kernel_thread = new Boot::BootThread(reader_kernel.Blob());
kernel_thread->SetName("BootZ: Kernel");
handover_hdr->f_KernelImage = reader_kernel.Blob();
handover_hdr->f_KernelSz = reader_kernel.Size();
- }
- else
- {
- fb_init();
- FBDrawBitMapInRegion(zka_no_disk, NE_NO_DISK_WIDTH, NE_NO_DISK_HEIGHT, (kHandoverHeader->f_GOP.f_Width - NE_NO_DISK_WIDTH) / 2, (kHandoverHeader->f_GOP.f_Height - NE_NO_DISK_HEIGHT) / 2);
- Boot::Stop();
- }
+ Boot::ExitBootServices(map_key, image_handle);
- // Fallback to bootnet, if not PXE.
+ return kernel_thread->Start(handover_hdr, NO);
+ }
Boot::BootFileReader reader_netboot(L"net.efi", image_handle);
reader_netboot.ReadAll(0);
- Boot::BootThread* netboot_thread = nullptr;
-
- // ---------------------------------------------------- //
- // Finally load the OS kernel.
- // ---------------------------------------------------- //
-
- Boot::ExitBootServices(map_key, image_handle);
-
- if (kernel_thread->Start(handover_hdr, YES) != kEfiOk)
- {
- // ------------------------------------------ //
- // If we fail into booting the kernel, then run BootNet.
- // ------------------------------------------ //
+ if (!reader_netboot.Blob())
+ return kEfiFail;
- if (reader_netboot.Blob())
- {
- netboot_thread = new Boot::BootThread(reader_netboot.Blob());
- netboot_thread->SetName("BootZ: BootNet");
- netboot_thread->Start(handover_hdr, YES);
- }
- }
+ Boot::BootThread* netboot_thread = new Boot::BootThread(reader_netboot.Blob());
+ netboot_thread->SetName("BootZ: BootNet");
- CANT_REACH();
+ return netboot_thread->Start(handover_hdr, NO);
}
diff --git a/dev/kernel/CompilerKit/Version.h b/dev/kernel/CompilerKit/Version.h
index 0d53b5ed..0f4f863d 100644
--- a/dev/kernel/CompilerKit/Version.h
+++ b/dev/kernel/CompilerKit/Version.h
@@ -6,5 +6,5 @@
#define BOOTLOADER_VERSION "1104.2025.110"
#define KERNEL_VERSION "1104.2025.110"
-#define BOOTLOADER_VERSION_BCD 0x11042025110
-#define KERNEL_VERSION_BCD 0x11042025110
+#define BOOTLOADER_VERSION_BCD 0x20250415
+#define KERNEL_VERSION_BCD 0x20250415
diff --git a/dev/kernel/FirmwareKit/EFI/API.h b/dev/kernel/FirmwareKit/EFI/API.h
index 9140d131..f3b03bb5 100644
--- a/dev/kernel/FirmwareKit/EFI/API.h
+++ b/dev/kernel/FirmwareKit/EFI/API.h
@@ -48,7 +48,7 @@ namespace Boot
@brief Exit EFI API to let the OS load correctly.
Bascially frees everything we have in the EFI side.
*/
- inline void ExitBootServices(UInt64 MapKey, EfiHandlePtr ImageHandle) noexcept
+ inline Void ExitBootServices(UInt64 MapKey, EfiHandlePtr ImageHandle) noexcept
{
if (!ST)
return;
diff --git a/dev/kernel/HALKit/AMD64/HalKernelMain.cc b/dev/kernel/HALKit/AMD64/HalKernelMain.cc
index 7ce1b0d8..9ede8ebd 100644
--- a/dev/kernel/HALKit/AMD64/HalKernelMain.cc
+++ b/dev/kernel/HALKit/AMD64/HalKernelMain.cc
@@ -13,6 +13,7 @@
#include <NetworkKit/IPC.h>
#include <CFKit/Property.h>
#include <modules/CoreGfx/TextGfx.h>
+#include <KernelKit/Timer.h>
EXTERN_C Kernel::VoidPtr kInterruptVectorTable[];
EXTERN_C Kernel::VoidPtr mp_user_switch_proc;
@@ -84,8 +85,6 @@ EXTERN_C void hal_init_platform(
gdt_reg.Base = reinterpret_cast<Kernel::UIntPtr>(kGDTArray);
gdt_reg.Limit = (sizeof(Kernel::HAL::Detail::NE_GDT_ENTRY) * kGDTEntriesCount) - 1;
- FB::fb_clear_video();
-
//! GDT will load hal_read_init after it successfully loads the segments.
Kernel::HAL::GDTLoader gdt_loader;
gdt_loader.Load(gdt_reg);
diff --git a/dev/kernel/HALKit/AMD64/HalTimerAMD64.cc b/dev/kernel/HALKit/AMD64/HalTimerAMD64.cc
index 01be2be5..72de8eb0 100644
--- a/dev/kernel/HALKit/AMD64/HalTimerAMD64.cc
+++ b/dev/kernel/HALKit/AMD64/HalTimerAMD64.cc
@@ -45,7 +45,7 @@ namespace Kernel::Detail
using namespace Kernel;
-HardwareTimer::HardwareTimer(Int64 ms)
+HardwareTimer::HardwareTimer(UInt64 ms)
: fWaitFor(ms)
{
auto power = PowerFactoryInterface(kHandoverHeader->f_HardwareTables.f_VendorPtr);
diff --git a/dev/kernel/KernelKit/Timer.h b/dev/kernel/KernelKit/Timer.h
index fa26bc66..b6d23e6b 100644
--- a/dev/kernel/KernelKit/Timer.h
+++ b/dev/kernel/KernelKit/Timer.h
@@ -50,7 +50,7 @@ namespace Kernel
class HardwareTimer final : public TimerInterface
{
public:
- explicit HardwareTimer(Int64 seconds);
+ explicit HardwareTimer(UInt64 seconds);
~HardwareTimer() override;
public:
diff --git a/dev/kernel/amd64-desktop.make b/dev/kernel/amd64-desktop.make
index 8541d5a0..905a6c91 100644
--- a/dev/kernel/amd64-desktop.make
+++ b/dev/kernel/amd64-desktop.make
@@ -33,7 +33,7 @@ COPY = cp
ASMFLAGS = -f win64
# Kernel subsystem is 17 and entrypoint is hal_init_platform
-LDFLAGS = -e hal_init_platform --subsystem=17 --image-base 0x10000000
+LDFLAGS = -e hal_init_platform --subsystem=17 --image-base 0x4000000
LDOBJ = obj/*.obj
# This file is the Kernel, responsible of task, memory, driver, sci, disk and device management.
diff --git a/dev/user/user.json b/dev/user/user.json
index 481280f8..9581d4d4 100644
--- a/dev/user/user.json
+++ b/dev/user/user.json
@@ -5,7 +5,6 @@
"sources_path": ["src/*.cc", "src/*.o"],
"output_name": "user.sys",
"compiler_flags": [
- "-fPIC",
"-ffreestanding",
"-shared",
"-fno-rtti",
diff --git a/modules_ahci_x64.sh b/modules_ahci_x64.sh
new file mode 100755
index 00000000..44e3ecf5
--- /dev/null
+++ b/modules_ahci_x64.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# LOG HISTORY:
+# 03/25/25: Add 'disk' build step.
+# 04/05/25: Improve and fix script.
+
+cd dev/boot/modules/SysChk
+btb amd64-ahci.json
+cd ../
+cd BootNet
+btb amd64.json \ No newline at end of file
diff --git a/modules_pio_x64.sh b/modules_pio_x64.sh
new file mode 100755
index 00000000..2b501047
--- /dev/null
+++ b/modules_pio_x64.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# LOG HISTORY:
+# 03/25/25: Add 'disk' build step.
+# 04/05/25: Improve and fix script.
+
+cd dev/boot/modules/SysChk
+btb amd64-pio.json
+cd ../
+cd BootNet
+btb amd64.json \ No newline at end of file
diff --git a/public/frameworks/CoreFoundation.fwrk/CoreFoundation.json b/public/frameworks/CoreFoundation.fwrk/CoreFoundation.json
index e8ee3245..a208f57a 100644
--- a/public/frameworks/CoreFoundation.fwrk/CoreFoundation.json
+++ b/public/frameworks/CoreFoundation.fwrk/CoreFoundation.json
@@ -5,7 +5,6 @@
"sources_path": ["src/*.cc"],
"output_name": "./dist/libCoreFoundation.dylib",
"compiler_flags": [
- "-fPIC",
"-ffreestanding",
"-shared",
"-fno-rtti",
diff --git a/public/frameworks/DiskImage.fwrk/DiskImage.json b/public/frameworks/DiskImage.fwrk/DiskImage.json
index 0b97dafb..aaff409c 100644
--- a/public/frameworks/DiskImage.fwrk/DiskImage.json
+++ b/public/frameworks/DiskImage.fwrk/DiskImage.json
@@ -5,7 +5,6 @@
"sources_path": ["src/*.cc"],
"output_name": "./dist/libDiskImage.dylib",
"compiler_flags": [
- "-fPIC",
"-ffreestanding",
"-shared",
"-fno-rtti",
diff --git a/public/frameworks/KernelTest.fwrk/KernelTest.json b/public/frameworks/KernelTest.fwrk/KernelTest.json
index 93207890..aa70db30 100644
--- a/public/frameworks/KernelTest.fwrk/KernelTest.json
+++ b/public/frameworks/KernelTest.fwrk/KernelTest.json
@@ -5,7 +5,6 @@
"sources_path": ["src/*.cc"],
"output_name": "./dist/libKernelTest.dylib",
"compiler_flags": [
- "-fPIC",
"-ffreestanding",
"-shared",
"-fno-rtti",
diff --git a/setup_amd64.sh b/setup_x64.sh
index 717f7840..35111b88 100755
--- a/setup_amd64.sh
+++ b/setup_x64.sh
@@ -4,13 +4,7 @@
# 03/25/25: Add 'disk' build step.
# 04/05/25: Improve and fix script.
-cd dev/boot/modules/SysChk
-btb amd64.json
-cd ../
-cd BootNet
-btb amd64.json
-cd ../../../
-cd user
+cd dev/user
btb user.json
cd ../boot
make -f amd64-desktop.make efi