mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
Makefile: add download target
This commit is contained in:
@@ -8,11 +8,16 @@ DISKNAME=$(JINX_DIR)/hdd.img
|
||||
LIMINEDIR=$(JINX_DIR)/host-pkgs/limine/usr/local/share/limine/
|
||||
KERNEL=$(JINX_DIR)/builds/astral/astral
|
||||
QEMUFLAGS=\
|
||||
-M q35 \
|
||||
-m 2g \
|
||||
-smp cpus=4 \
|
||||
-M q35,i8042=off \
|
||||
-m 8g \
|
||||
-smp cpus=1 \
|
||||
-debugcon file:/dev/stdout \
|
||||
-netdev user,id=net0 -device virtio-net,netdev=net0 \
|
||||
-device qemu-xhci,id=input-xhci \
|
||||
-device usb-hub,bus=input-xhci.0,port=1 \
|
||||
-device usb-kbd,bus=input-xhci.0,port=1.1 \
|
||||
-device usb-hub,bus=input-xhci.0,port=2 \
|
||||
-device usb-tablet,bus=input-xhci.0,port=2.1 \
|
||||
-object filter-dump,id=f1,netdev=net0,file=netdump.dat
|
||||
QEMUISOFLAGS=-cdrom $(ISO)
|
||||
QEMUDISKFLAGS=-drive file=$(DISKNAME),if=none,id=disk \
|
||||
@@ -25,7 +30,7 @@ INITRDTYPE=minimal
|
||||
|
||||
MINIMALPACKAGES=mlibc bash coreutils openrc distro-files vim nano mount shadow sudo xbps net-base fastfetch limine dosfstools e2fsprogs parted netinfo systrace findutils sed
|
||||
|
||||
.PHONY: all kernel clean clean-kernel iso img initrd full minimal disk distro-minimal distro-full
|
||||
.PHONY: all kernel clean clean-kernel iso img initrd full minimal disk distro-minimal distro-full download
|
||||
|
||||
all: $(JINX_DIR)/.astral_ok
|
||||
git submodule update --init --recursive
|
||||
@@ -101,6 +106,16 @@ initrd:
|
||||
rm $(INITRD)-$(INITRDTYPE) && \
|
||||
make $(INITRD)-$(INITRDTYPE)
|
||||
|
||||
# ------ download targets ------
|
||||
|
||||
download-full:
|
||||
cd $(JINX_DIR) && \
|
||||
../jinx/jinx download '*'
|
||||
|
||||
download-minimal:
|
||||
cd $(JINX_DIR) && \
|
||||
../jinx/jinx download $(MINIMALPACKAGES)
|
||||
|
||||
# ------ disk targets ------
|
||||
|
||||
disk: disk-$(DISTROTYPE)
|
||||
@@ -115,6 +130,12 @@ disk-minimal: distro-minimal
|
||||
../jinx/jinx install minimalsysroot $(MINIMALPACKAGES) && \
|
||||
../gendisk.sh 1900m minimalsysroot $(DISKNAME)
|
||||
|
||||
# ------ download targets ------
|
||||
|
||||
download: $(JINX_DIR)/.astral_ok
|
||||
cd $(JINX_DIR) && \
|
||||
../jinx/jinx download '*'
|
||||
|
||||
# ------ clean targets ------
|
||||
|
||||
clean-kernel:
|
||||
|
||||
@@ -24,15 +24,17 @@ Astral is a 64 bit operating system with its own kernel written in C for the x86
|
||||
- Installation program
|
||||
- Fully self hosting
|
||||
|
||||
## Running
|
||||
If you built it from source, run ``make run-kvm`` or ``make run-disk-kvm``
|
||||
|
||||
There are prebuilt images and instructions at https://astral-os.org/about.html.
|
||||
|
||||
## Building
|
||||
|
||||
The build process only needs xorriso, curl, zstd, fakeroot and bsdtar on the host. If you wish to use the ``make img`` option, you will need mtools. All other needed packages will be installed/built on the container.
|
||||
The build process dependencies are specified [here](https://github.com/Mintsuki/Jinx/blob/1c40ceb62e09befc5172d1caf53e3e440a19f624/README.md). If you wish to use the ``make img`` option, you will need mtools. All other needed packages will be installed/built on a container.
|
||||
|
||||
It is highly recommended you download pre-built packages from the official repository by running ``make download``. This greatly reduces the compilation time as it will only need to build the host tools.
|
||||
|
||||
To build the project, run ``make``. This will create a file named ``astral.iso``
|
||||
|
||||
After this, if you wish to create an ext2 disk image, run ``make disk``
|
||||
|
||||
## Running
|
||||
If you built it from source, run ``make run-kvm`` or ``make run-disk-kvm``
|
||||
|
||||
There are prebuilt images and instructions at https://astral-os.org/about.html.
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ PRINTFOPTS=-DPRINTF_DISABLE_SUPPORT_FLOAT
|
||||
FLANTERMINCDIR=$(shell pwd)/flanterm/src
|
||||
UACPIINCDIR=$(shell pwd)/io/acpi/uacpi/include
|
||||
UACPIOPTS=-DUACPI_OVERRIDE_LIBC -DUACPI_KERNEL_INITIALIZATION -DUACPI_NATIVE_ALLOC_ZEROED
|
||||
KERNELCONFIG=#-DX86_64_ENABLE_E9 -DENABLE_PROFILING #-DSYSCALL_LOGGING
|
||||
KERNELCONFIG=-DX86_64_ENABLE_E9 #-DENABLE_PROFILING#-DSYSCALL_LOGGING
|
||||
CFLAGS=-g -ffreestanding -mcmodel=kernel -O2 -mno-red-zone -mgeneral-regs-only -mno-mmx -mno-sse -mno-sse2 -nostdlib -Wall -MMD -I "$(INCDIR)" -I "$(ARCHINCDIR)" -I "$(FLANTERMINCDIR)" -I "$(UACPIINCDIR)" $(UACPIOPTS) $(PRINTFOPTS) $(KERNELCONFIG) $(FLANTERMOPTS) -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -std=gnu17 -Wno-error=implicit-function-declaration
|
||||
ASFLAGS=-felf64
|
||||
DEPS=$(CSOURCES:.c=.d)
|
||||
|
||||
Reference in New Issue
Block a user