mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-05-25 22:14:34 +00:00
refactor(rootfs): change "initrd" to "rootfs"
Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
parent
1286c4cd90
commit
527e1708ce
6
.gitignore
vendored
6
.gitignore
vendored
@ -1,10 +1,10 @@
|
||||
iso_tmp_data
|
||||
artifacts
|
||||
initrd_tmp_data
|
||||
initrd/usr/include/*
|
||||
!initrd/usr/include/.gitkeep
|
||||
rootfs/usr/include/*
|
||||
!rootfs/usr/include/.gitkeep
|
||||
doxygen-doc
|
||||
initrd.tar
|
||||
rootfs.tar
|
||||
.dccache
|
||||
*.log
|
||||
*.log.*
|
||||
|
@ -11,7 +11,7 @@
|
||||
"git.openRepositoryInParentFolders": "always",
|
||||
"C_Cpp.autoAddFileAssociations": false,
|
||||
"conventionalCommits.scopes": [
|
||||
"initrd",
|
||||
"rootfs",
|
||||
"tools",
|
||||
"devcontainer"
|
||||
]
|
||||
|
@ -31,10 +31,10 @@ void SearchForInitrd()
|
||||
if (!initrdAddress)
|
||||
continue;
|
||||
|
||||
if (strcmp(bInfo.Modules[i].CommandLine, "initrd") != 0)
|
||||
if (strcmp(bInfo.Modules[i].CommandLine, "rootfs") != 0)
|
||||
continue;
|
||||
|
||||
KPrint("initrd found at %#lx", initrdAddress);
|
||||
KPrint("rootfs found at %#lx", initrdAddress);
|
||||
|
||||
Memory::Virtual vmm;
|
||||
if (!vmm.Check((void *)initrdAddress))
|
||||
|
@ -843,9 +843,9 @@ bool TestAndInitializeUSTAR(uintptr_t Address, size_t Size)
|
||||
ustar->DeviceID = fs->EarlyReserveDevice();
|
||||
ustar->ReadArchive(Address, Size);
|
||||
|
||||
Inode *initrd = nullptr;
|
||||
ustar->Lookup(nullptr, "/", &initrd);
|
||||
assert(initrd != nullptr);
|
||||
Inode *rootfs = nullptr;
|
||||
ustar->Lookup(nullptr, "/", &rootfs);
|
||||
assert(rootfs != nullptr);
|
||||
|
||||
FileSystemInfo *fsi = new FileSystemInfo;
|
||||
fsi->Name = "ustar";
|
||||
@ -861,8 +861,8 @@ bool TestAndInitializeUSTAR(uintptr_t Address, size_t Size)
|
||||
fsi->Ops.ReadLink = __ustar_ReadLink;
|
||||
fsi->Ops.Stat = __ustar_Stat;
|
||||
fsi->PrivateData = ustar;
|
||||
fs->LateRegisterFileSystem(ustar->DeviceID, fsi, initrd);
|
||||
fs->LateRegisterFileSystem(ustar->DeviceID, fsi, rootfs);
|
||||
|
||||
fs->AddRoot(initrd);
|
||||
fs->AddRoot(rootfs);
|
||||
return true;
|
||||
}
|
||||
|
10
Makefile
10
Makefile
@ -212,16 +212,16 @@ endif
|
||||
build_image:
|
||||
mkdir -p iso_tmp_data
|
||||
mkdir -p initrd_tmp_data
|
||||
cp -r initrd/* initrd_tmp_data/
|
||||
cp -r rootfs/* initrd_tmp_data/
|
||||
ifeq ($(BUILD_DRIVERS), 1)
|
||||
cp -r Drivers/out/* initrd_tmp_data/usr/lib/drivers/
|
||||
endif
|
||||
ifeq ($(BUILD_USERSPACE), 1)
|
||||
cp -r Userspace/out/* initrd_tmp_data/
|
||||
endif
|
||||
# tar czf initrd.tar -C initrd_tmp_data/ ./ --format=ustar
|
||||
tar cf initrd.tar -C initrd_tmp_data/ ./ --format=ustar
|
||||
cp Kernel/fennix.elf initrd.tar \
|
||||
# tar czf rootfs.tar -C initrd_tmp_data/ ./ --format=ustar
|
||||
tar cf rootfs.tar -C initrd_tmp_data/ ./ --format=ustar
|
||||
cp Kernel/fennix.elf rootfs.tar \
|
||||
iso_tmp_data/
|
||||
ifeq ($(BOOTLOADER), limine)
|
||||
cp tools/limine.cfg tools/limine/limine-bios.sys \
|
||||
@ -330,7 +330,7 @@ run: build qemu
|
||||
|
||||
clean: clean_logs
|
||||
rm -rf doxygen-doc iso_tmp_data initrd_tmp_data
|
||||
rm -f initrd.tar $(OSNAME).iso $(OSNAME).img
|
||||
rm -f rootfs.tar $(OSNAME).iso $(OSNAME).img
|
||||
$(MAKE) -C Kernel clean
|
||||
$(MAKE) -C Userspace clean
|
||||
$(MAKE) -C Drivers clean
|
||||
|
@ -7,9 +7,9 @@ menuentry "Fennix" {
|
||||
load_video
|
||||
clear
|
||||
echo "Loading kernel"
|
||||
multiboot2 /fennix.elf --ioapicirq=1 --udl=true --simd=true --init=/bin/init
|
||||
echo "Loading initrd"
|
||||
module2 /initrd.tar initrd
|
||||
multiboot2 /fennix.elf --ioapicirq=1 --udl=true --simd=true --init=/bin/fsh
|
||||
echo "Loading rootfs"
|
||||
module2 /rootfs.tar rootfs
|
||||
echo "Booting..."
|
||||
boot
|
||||
}
|
||||
|
@ -8,5 +8,5 @@ INTERFACE_BRANDING=Fennix
|
||||
KERNEL_CMDLINE=--ioapicirq=1 --udl=true --simd=true
|
||||
KERNEL_PATH=boot:///fennix.elf
|
||||
|
||||
MODULE_PATH=boot:///initrd.tar
|
||||
MODULE_CMDLINE=initrd
|
||||
MODULE_PATH=boot:///rootfs.tar
|
||||
MODULE_CMDLINE=rootfs
|
||||
|
@ -1,2 +1,2 @@
|
||||
CMDLINE=debug
|
||||
INITRD=initrd.tar
|
||||
INITRD=rootfs.tar
|
||||
|
Loading…
x
Reference in New Issue
Block a user