mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
Makefile: initrd creation
This commit is contained in:
@@ -12,3 +12,5 @@ kernel-src/include/limine.h
|
|||||||
kernel-src/include/printf.h
|
kernel-src/include/printf.h
|
||||||
kernel-src/io/printf.c
|
kernel-src/io/printf.c
|
||||||
kernel-src/flanterm
|
kernel-src/flanterm
|
||||||
|
sysroot
|
||||||
|
minimalsysroot
|
||||||
|
|||||||
@@ -3,8 +3,10 @@ ISO=astral.iso
|
|||||||
LIMINEDIR=$(shell pwd)/host-pkgs/limine/usr/local/share/limine/
|
LIMINEDIR=$(shell pwd)/host-pkgs/limine/usr/local/share/limine/
|
||||||
KERNEL=$(shell pwd)/pkgs/astral/boot/astral
|
KERNEL=$(shell pwd)/pkgs/astral/boot/astral
|
||||||
QEMUFLAGS=-cdrom $(ISO) -m 2G -smp cpus=2 -no-shutdown -no-reboot -monitor stdio -debugcon file:/dev/stdout -serial file:/dev/stdout # hacky but works :')
|
QEMUFLAGS=-cdrom $(ISO) -m 2G -smp cpus=2 -no-shutdown -no-reboot -monitor stdio -debugcon file:/dev/stdout -serial file:/dev/stdout # hacky but works :')
|
||||||
|
INITRD=$(shell pwd)/iso/initrd
|
||||||
|
DISTROTYPE=full
|
||||||
|
|
||||||
.PHONY: all kernel clean clean-kernel iso
|
.PHONY: all kernel clean clean-kernel iso initrd full minimal
|
||||||
|
|
||||||
all: jinx
|
all: jinx
|
||||||
make kernel
|
make kernel
|
||||||
@@ -15,11 +17,22 @@ jinx:
|
|||||||
curl https://raw.githubusercontent.com/mintsuki/jinx/trunk/jinx > jinx
|
curl https://raw.githubusercontent.com/mintsuki/jinx/trunk/jinx > jinx
|
||||||
chmod +x jinx
|
chmod +x jinx
|
||||||
|
|
||||||
$(ISO): limine.cfg liminebg.bmp $(KERNEL)
|
$(ISO): limine.cfg liminebg.bmp $(KERNEL) initrd
|
||||||
mkdir -p $(ISODIR)
|
mkdir -p $(ISODIR)
|
||||||
cp $(KERNEL) liminebg.bmp limine.cfg $(LIMINEDIR)/limine.sys $(LIMINEDIR)/limine-cd.bin $(LIMINEDIR)/limine-cd-efi.bin $(ISODIR)
|
cp $(KERNEL) liminebg.bmp limine.cfg $(LIMINEDIR)/limine.sys $(LIMINEDIR)/limine-cd.bin $(LIMINEDIR)/limine-cd-efi.bin $(ISODIR)
|
||||||
xorriso -as mkisofs -b limine-cd.bin -no-emul-boot -boot-load-size 4 -boot-info-table --efi-boot limine-cd-efi.bin -efi-boot-part --efi-boot-image --protective-msdos-label $(ISODIR) -o $(ISO)
|
xorriso -as mkisofs -b limine-cd.bin -no-emul-boot -boot-load-size 4 -boot-info-table --efi-boot limine-cd-efi.bin -efi-boot-part --efi-boot-image --protective-msdos-label $(ISODIR) -o $(ISO)
|
||||||
|
|
||||||
|
initrd:
|
||||||
|
make $(DISTROTYPE)
|
||||||
|
|
||||||
|
full:
|
||||||
|
./jinx sysroot
|
||||||
|
cd sysroot; tar -cf $(INITRD) *
|
||||||
|
|
||||||
|
minimal:
|
||||||
|
./jinx install minimalsysroot mlibc
|
||||||
|
cd minimalsysroot; tar -cf $(INITRD) *
|
||||||
|
|
||||||
kernel:
|
kernel:
|
||||||
rm -f builds/astral.configured
|
rm -f builds/astral.configured
|
||||||
rm -f builds/astral.installed
|
rm -f builds/astral.installed
|
||||||
|
|||||||
+2
-2
@@ -6,6 +6,6 @@ TIMEOUT=5
|
|||||||
:Astral
|
:Astral
|
||||||
PROTOCOL=limine
|
PROTOCOL=limine
|
||||||
KERNEL_PATH=boot:///astral
|
KERNEL_PATH=boot:///astral
|
||||||
#MODULE_PATH=boot:///initrd
|
MODULE_PATH=boot:///initrd
|
||||||
#KERNEL_CMDLINE=
|
KERNEL_CMDLINE=
|
||||||
COMMENT="The Astral operating system"
|
COMMENT="The Astral operating system"
|
||||||
|
|||||||
Reference in New Issue
Block a user