misc: stage23 -> common
diff --git a/.gitignore b/.gitignore
index 77c18a24..0563dd49 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,38 +1,38 @@
-bin
-build
-toolchain
-reduced-gnu-efi
-ovmf*
-*.o
-*.d
-*.a
-*.exe
-*.EFI
-*.bin
-*.bin.gz
-*.tar.xz
-*.tar.gz
-*.elf
-*.hdd
-*.iso
-*.sys
-bochsout.txt
-bx_enh_dbg.ini
-.vscode
-stivale
-test_image
-!stage23/font.bin
-configure
-configure.ac.save
-build-aux
-*~
-config.status
-config.log
-autom4te.cache
-GNUmakefile
-stage23-bios
-stage23-uefi32
-stage23-uefi64
-decompressor-build
-stage1.stamp
-hgen
+/bin
+/build
+/toolchain
+/reduced-gnu-efi
+/ovmf*
+/*.o
+/*.d
+/*.a
+/*.exe
+/*.EFI
+/*.bin
+/*.bin.gz
+/*.tar.xz
+/*.tar.gz
+/*.elf
+/*.hdd
+/*.iso
+/*.sys
+/bochsout.txt
+/bx_enh_dbg.ini
+/.vscode
+/stivale
+/test_image
+!/common/font.bin
+/configure
+/configure.ac.save
+/build-aux
+/*~
+/config.status
+/config.log
+/autom4te.cache
+/GNUmakefile
+/common-bios
+/common-uefi32
+/common-uefi64
+/decompressor-build
+/stage1.stamp
+/hgen
diff --git a/GNUmakefile.in b/GNUmakefile.in
index b299f081..0a02ca9a 100644
--- a/GNUmakefile.in
+++ b/GNUmakefile.in
@@ -125,16 +125,16 @@ uninstall:
rm -f '$(DESTDIR)$(PREFIX)/bin/limine-install'
rm -f '$(DESTDIR)$(PREFIX)/share/limine'
-$(call MKESCAPE,$(BUILDDIR))/stage1.stamp: $(STAGE1_FILES) $(call MKESCAPE,$(BUILDDIR))/decompressor-build/decompressor.bin $(call MKESCAPE,$(BUILDDIR))/stage23-bios/stage2.bin.gz
+$(call MKESCAPE,$(BUILDDIR))/stage1.stamp: $(STAGE1_FILES) $(call MKESCAPE,$(BUILDDIR))/decompressor-build/decompressor.bin $(call MKESCAPE,$(BUILDDIR))/common-bios/stage2.bin.gz
mkdir -p '$(call SHESCAPE,$(BINDIR))'
cd '$(call SHESCAPE,$(SRCDIR))/stage1/hdd' && nasm bootsect.asm @werror@ -fbin -DBUILDDIR="'"'$(call NASMESCAPE,$(BUILDDIR))'"'" -o '$(call SHESCAPE,$(BINDIR))/limine-hdd.bin'
cd '$(call SHESCAPE,$(SRCDIR))/stage1/cd' && nasm bootsect.asm @werror@ -fbin -DBUILDDIR="'"'$(call NASMESCAPE,$(BUILDDIR))'"'" -o '$(call SHESCAPE,$(BINDIR))/limine-cd.bin'
cd '$(call SHESCAPE,$(SRCDIR))/stage1/pxe' && nasm bootsect.asm @werror@ -fbin -DBUILDDIR="'"'$(call NASMESCAPE,$(BUILDDIR))'"'" -o '$(call SHESCAPE,$(BINDIR))/limine-pxe.bin'
- cp '$(call SHESCAPE,$(BUILDDIR))/stage23-bios/limine.sys' '$(call SHESCAPE,$(BINDIR))/'
+ cp '$(call SHESCAPE,$(BUILDDIR))/common-bios/limine.sys' '$(call SHESCAPE,$(BINDIR))/'
touch '$(call SHESCAPE,$(BUILDDIR))/stage1.stamp'
.PHONY: limine-bios
-limine-bios: stage23-bios decompressor
+limine-bios: common-bios decompressor
$(MAKE) '$(call SHESCAPE,$(BUILDDIR))/stage1.stamp'
$(MAKE) limine-install
@@ -145,10 +145,10 @@ limine-eltorito-efi:
( mformat -i '$(call SHESCAPE,$(BINDIR))/limine-eltorito-efi.bin' -f 1440 :: && \
mmd -D s -i '$(call SHESCAPE,$(BINDIR))/limine-eltorito-efi.bin' ::/EFI && \
mmd -D s -i '$(call SHESCAPE,$(BINDIR))/limine-eltorito-efi.bin' ::/EFI/BOOT && \
- ( ( [ -f '$(call SHESCAPE,$(BUILDDIR))/stage23-uefi64/BOOTX64.EFI' ] && \
- mcopy -D o -i '$(call SHESCAPE,$(BINDIR))/limine-eltorito-efi.bin' '$(call SHESCAPE,$(BUILDDIR))/stage23-uefi64/BOOTX64.EFI' ::/EFI/BOOT ) || true ) && \
- ( ( [ -f '$(call SHESCAPE,$(BUILDDIR))/stage23-uefi32/BOOTIA32.EFI' ] && \
- mcopy -D o -i '$(call SHESCAPE,$(BINDIR))/limine-eltorito-efi.bin' '$(call SHESCAPE,$(BUILDDIR))/stage23-uefi32/BOOTIA32.EFI' ::/EFI/BOOT ) || true ) \
+ ( ( [ -f '$(call SHESCAPE,$(BUILDDIR))/common-uefi64/BOOTX64.EFI' ] && \
+ mcopy -D o -i '$(call SHESCAPE,$(BINDIR))/limine-eltorito-efi.bin' '$(call SHESCAPE,$(BUILDDIR))/common-uefi64/BOOTX64.EFI' ::/EFI/BOOT ) || true ) && \
+ ( ( [ -f '$(call SHESCAPE,$(BUILDDIR))/common-uefi32/BOOTIA32.EFI' ] && \
+ mcopy -D o -i '$(call SHESCAPE,$(BINDIR))/limine-eltorito-efi.bin' '$(call SHESCAPE,$(BUILDDIR))/common-uefi32/BOOTIA32.EFI' ::/EFI/BOOT ) || true ) \
) || rm -f '$(call SHESCAPE,$(BINDIR))/limine-eltorito-efi.bin'
.PHONY: limine-uefi
@@ -157,24 +157,24 @@ limine-uefi: limine-uefi32 limine-uefi64
.PHONY: limine-uefi64
limine-uefi64: $(call MKESCAPE,$(SRCDIR))/reduced-gnu-efi
- $(MAKE) stage23-uefi64
+ $(MAKE) common-uefi64
mkdir -p '$(call SHESCAPE,$(BINDIR))'
- cp '$(call SHESCAPE,$(BUILDDIR))/stage23-uefi64/BOOTX64.EFI' '$(call SHESCAPE,$(BINDIR))/'
+ cp '$(call SHESCAPE,$(BUILDDIR))/common-uefi64/BOOTX64.EFI' '$(call SHESCAPE,$(BINDIR))/'
.PHONY: limine-uefi32
limine-uefi32: $(call MKESCAPE,$(SRCDIR))/reduced-gnu-efi
- $(MAKE) stage23-uefi32
+ $(MAKE) common-uefi32
mkdir -p '$(call SHESCAPE,$(BINDIR))'
- cp '$(call SHESCAPE,$(BUILDDIR))/stage23-uefi32/BOOTIA32.EFI' '$(call SHESCAPE,$(BINDIR))/'
+ cp '$(call SHESCAPE,$(BUILDDIR))/common-uefi32/BOOTIA32.EFI' '$(call SHESCAPE,$(BINDIR))/'
.PHONY: limine-bios-clean
-limine-bios-clean: stage23-bios-clean decompressor-clean
+limine-bios-clean: common-bios-clean decompressor-clean
.PHONY: limine-uefi64-clean
-limine-uefi64-clean: stage23-uefi64-clean
+limine-uefi64-clean: common-uefi64-clean
.PHONY: limine-uefi32-clean
-limine-uefi32-clean: stage23-uefi32-clean
+limine-uefi32-clean: common-uefi32-clean
.PHONY: dist
dist:
@@ -200,29 +200,29 @@ distclean: clean
maintainer-clean: distclean
cd '$(call SHESCAPE,$(SRCDIR))' && rm -rf stivale reduced-gnu-efi configure build-aux *'~' autom4te.cache *.tar.xz *.tar.gz
-.PHONY: stage23-uefi64
-stage23-uefi64: $(call MKESCAPE,$(SRCDIR))/stivale
- $(MAKE) -C '$(call SHESCAPE,$(SRCDIR))/stage23' all TARGET=uefi64 BUILDDIR='$(call SHESCAPE,$(BUILDDIR))/stage23-uefi64'
+.PHONY: common-uefi64
+common-uefi64: $(call MKESCAPE,$(SRCDIR))/stivale
+ $(MAKE) -C '$(call SHESCAPE,$(SRCDIR))/common' all TARGET=uefi64 BUILDDIR='$(call SHESCAPE,$(BUILDDIR))/common-uefi64'
-.PHONY: stage23-uefi64-clean
-stage23-uefi64-clean:
- $(MAKE) -C '$(call SHESCAPE,$(SRCDIR))/stage23' clean TARGET=uefi64 BUILDDIR='$(call SHESCAPE,$(BUILDDIR))/stage23-uefi64'
+.PHONY: common-uefi64-clean
+common-uefi64-clean:
+ $(MAKE) -C '$(call SHESCAPE,$(SRCDIR))/common' clean TARGET=uefi64 BUILDDIR='$(call SHESCAPE,$(BUILDDIR))/common-uefi64'
-.PHONY: stage23-uefi32
-stage23-uefi32: $(call MKESCAPE,$(SRCDIR))/stivale
- $(MAKE) -C '$(call SHESCAPE,$(SRCDIR))/stage23' all TARGET=uefi32 BUILDDIR='$(call SHESCAPE,$(BUILDDIR))/stage23-uefi32'
+.PHONY: common-uefi32
+common-uefi32: $(call MKESCAPE,$(SRCDIR))/stivale
+ $(MAKE) -C '$(call SHESCAPE,$(SRCDIR))/common' all TARGET=uefi32 BUILDDIR='$(call SHESCAPE,$(BUILDDIR))/common-uefi32'
-.PHONY: stage23-uefi32-clean
-stage23-uefi32-clean:
- $(MAKE) -C '$(call SHESCAPE,$(SRCDIR))/stage23' clean TARGET=uefi32 BUILDDIR='$(call SHESCAPE,$(BUILDDIR))/stage23-uefi32'
+.PHONY: common-uefi32-clean
+common-uefi32-clean:
+ $(MAKE) -C '$(call SHESCAPE,$(SRCDIR))/common' clean TARGET=uefi32 BUILDDIR='$(call SHESCAPE,$(BUILDDIR))/common-uefi32'
-.PHONY: stage23-bios
-stage23-bios: $(call MKESCAPE,$(SRCDIR))/stivale
- $(MAKE) -C '$(call SHESCAPE,$(SRCDIR))/stage23' all TARGET=bios BUILDDIR='$(call SHESCAPE,$(BUILDDIR))/stage23-bios'
+.PHONY: common-bios
+common-bios: $(call MKESCAPE,$(SRCDIR))/stivale
+ $(MAKE) -C '$(call SHESCAPE,$(SRCDIR))/common' all TARGET=bios BUILDDIR='$(call SHESCAPE,$(BUILDDIR))/common-bios'
-.PHONY: stage23-bios-clean
-stage23-bios-clean:
- $(MAKE) -C '$(call SHESCAPE,$(SRCDIR))/stage23' clean TARGET=bios BUILDDIR='$(call SHESCAPE,$(BUILDDIR))/stage23-bios'
+.PHONY: common-bios-clean
+common-bios-clean:
+ $(MAKE) -C '$(call SHESCAPE,$(SRCDIR))/common' clean TARGET=bios BUILDDIR='$(call SHESCAPE,$(BUILDDIR))/common-bios'
.PHONY: decompressor
decompressor:
diff --git a/stage23/GNUmakefile b/common/GNUmakefile
similarity index 92%
rename from stage23/GNUmakefile
rename to common/GNUmakefile
index 8d906ba4..29a4a1e6 100644
--- a/stage23/GNUmakefile
+++ b/common/GNUmakefile
@@ -275,11 +275,11 @@ $(call MKESCAPE,$(BUILDDIR))/reduced-gnu-efi: ../reduced-gnu-efi/*
ifeq ($(TARGET), uefi64)
-$(call MKESCAPE,$(BUILDDIR))/full.map.o: $(call MKESCAPE,$(BUILDDIR))/limine_efi_nomap.elf
+$(call MKESCAPE,$(BUILDDIR))/full.map.o: $(call MKESCAPE,$(BUILDDIR))/limine_nomap.elf
cd '$(call SHESCAPE,$(BUILDDIR))' && \
'$(call SHESCAPE,$(SRCDIR))/gensyms.sh' '$(call SHESCAPE,$<)' full 64
-$(call MKESCAPE,$(BUILDDIR))/BOOTX64.EFI: $(call MKESCAPE,$(BUILDDIR))/limine_efi.elf
+$(call MKESCAPE,$(BUILDDIR))/BOOTX64.EFI: $(call MKESCAPE,$(BUILDDIR))/limine.elf
$(LIMINE_OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel -j .rela -j .rel.* -j .rela.* -j .reloc -j .sbat --target efi-app-x86_64 '$(call SHESCAPE,$<)' '$(call SHESCAPE,$@)'
$(call MKESCAPE,$(BUILDDIR))/reduced-gnu-efi/gnuefi/crt0-efi-x86_64.o: reduced-gnu-efi
@@ -300,7 +300,7 @@ $(call MKESCAPE,$(BUILDDIR))/linker_nomap.ld: linker_uefi64.ld.in
mkdir -p '$(call SHESCAPE,$(BUILDDIR))'
$(LIMINE_CC) -x c -E -P -DLINKER_NOMAP linker_uefi64.ld.in -o '$(call SHESCAPE,$(BUILDDIR))/linker_nomap.ld'
-$(call MKESCAPE,$(BUILDDIR))/limine_efi_nomap.elf: $(call MKESCAPE,$(BUILDDIR))/reduced-gnu-efi/gnuefi/crt0-efi-x86_64.o $(call MKESCAPE,$(BUILDDIR))/reduced-gnu-efi/gnuefi/libgnuefi.a $(OBJ) $(call MKESCAPE,$(BUILDDIR))/tinf/tinfgzip.o $(call MKESCAPE,$(BUILDDIR))/tinf/tinflate.o $(call MKESCAPE,$(BUILDDIR))/font.o $(call MKESCAPE,$(BUILDDIR))/sys/smp_trampoline.o
+$(call MKESCAPE,$(BUILDDIR))/limine_nomap.elf: $(call MKESCAPE,$(BUILDDIR))/reduced-gnu-efi/gnuefi/crt0-efi-x86_64.o $(call MKESCAPE,$(BUILDDIR))/reduced-gnu-efi/gnuefi/libgnuefi.a $(OBJ) $(call MKESCAPE,$(BUILDDIR))/tinf/tinfgzip.o $(call MKESCAPE,$(BUILDDIR))/tinf/tinflate.o $(call MKESCAPE,$(BUILDDIR))/font.o $(call MKESCAPE,$(BUILDDIR))/sys/smp_trampoline.o
$(MAKE) '$(call SHESCAPE,$(BUILDDIR))/linker_nomap.ld'
$(LIMINE_LD) \
-T'$(call SHESCAPE,$(BUILDDIR))/linker_nomap.ld' \
@@ -310,7 +310,7 @@ $(call MKESCAPE,$(BUILDDIR))/linker.ld: linker_uefi64.ld.in
mkdir -p '$(call SHESCAPE,$(BUILDDIR))'
$(LIMINE_CC) -x c -E -P linker_uefi64.ld.in -o '$(call SHESCAPE,$(BUILDDIR))/linker.ld'
-$(call MKESCAPE,$(BUILDDIR))/limine_efi.elf: $(call MKESCAPE,$(BUILDDIR))/reduced-gnu-efi/gnuefi/crt0-efi-x86_64.o $(call MKESCAPE,$(BUILDDIR))/reduced-gnu-efi/gnuefi/libgnuefi.a $(OBJ) $(call MKESCAPE,$(BUILDDIR))/tinf/tinfgzip.o $(call MKESCAPE,$(BUILDDIR))/tinf/tinflate.o $(call MKESCAPE,$(BUILDDIR))/font.o $(call MKESCAPE,$(BUILDDIR))/sys/smp_trampoline.o $(call MKESCAPE,$(BUILDDIR))/full.map.o
+$(call MKESCAPE,$(BUILDDIR))/limine.elf: $(call MKESCAPE,$(BUILDDIR))/reduced-gnu-efi/gnuefi/crt0-efi-x86_64.o $(call MKESCAPE,$(BUILDDIR))/reduced-gnu-efi/gnuefi/libgnuefi.a $(OBJ) $(call MKESCAPE,$(BUILDDIR))/tinf/tinfgzip.o $(call MKESCAPE,$(BUILDDIR))/tinf/tinflate.o $(call MKESCAPE,$(BUILDDIR))/font.o $(call MKESCAPE,$(BUILDDIR))/sys/smp_trampoline.o $(call MKESCAPE,$(BUILDDIR))/full.map.o
$(MAKE) '$(call SHESCAPE,$(BUILDDIR))/linker.ld'
$(LIMINE_LD) \
-T'$(call SHESCAPE,$(BUILDDIR))/linker.ld' \
@@ -320,11 +320,11 @@ endif
ifeq ($(TARGET), uefi32)
-$(call MKESCAPE,$(BUILDDIR))/full.map.o: $(call MKESCAPE,$(BUILDDIR))/limine_efi_nomap.elf
+$(call MKESCAPE,$(BUILDDIR))/full.map.o: $(call MKESCAPE,$(BUILDDIR))/limine_nomap.elf
cd '$(call SHESCAPE,$(BUILDDIR))' && \
'$(call SHESCAPE,$(SRCDIR))/gensyms.sh' '$(call SHESCAPE,$<)' full 32
-$(call MKESCAPE,$(BUILDDIR))/BOOTIA32.EFI: $(call MKESCAPE,$(BUILDDIR))/limine_efi.elf
+$(call MKESCAPE,$(BUILDDIR))/BOOTIA32.EFI: $(call MKESCAPE,$(BUILDDIR))/limine.elf
$(LIMINE_OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel -j .rela -j .rel.* -j .rela.* -j .reloc -j .sbat --target efi-app-ia32 '$(call SHESCAPE,$<)' '$(call SHESCAPE,$@)'
$(call MKESCAPE,$(BUILDDIR))/reduced-gnu-efi/gnuefi/crt0-efi-ia32.o: reduced-gnu-efi
@@ -345,7 +345,7 @@ $(call MKESCAPE,$(BUILDDIR))/linker_nomap.ld: linker_uefi32.ld.in
mkdir -p '$(call SHESCAPE,$(BUILDDIR))'
$(LIMINE_CC) -x c -E -P -DLINKER_NOMAP linker_uefi32.ld.in -o '$(call SHESCAPE,$(BUILDDIR))/linker_nomap.ld'
-$(call MKESCAPE,$(BUILDDIR))/limine_efi_nomap.elf: $(call MKESCAPE,$(BUILDDIR))/reduced-gnu-efi/gnuefi/crt0-efi-ia32.o $(call MKESCAPE,$(BUILDDIR))/reduced-gnu-efi/gnuefi/libgnuefi.a $(OBJ) $(call MKESCAPE,$(BUILDDIR))/tinf/tinfgzip.o $(call MKESCAPE,$(BUILDDIR))/tinf/tinflate.o $(call MKESCAPE,$(BUILDDIR))/font.o $(call MKESCAPE,$(BUILDDIR))/sys/smp_trampoline.o
+$(call MKESCAPE,$(BUILDDIR))/limine_nomap.elf: $(call MKESCAPE,$(BUILDDIR))/reduced-gnu-efi/gnuefi/crt0-efi-ia32.o $(call MKESCAPE,$(BUILDDIR))/reduced-gnu-efi/gnuefi/libgnuefi.a $(OBJ) $(call MKESCAPE,$(BUILDDIR))/tinf/tinfgzip.o $(call MKESCAPE,$(BUILDDIR))/tinf/tinflate.o $(call MKESCAPE,$(BUILDDIR))/font.o $(call MKESCAPE,$(BUILDDIR))/sys/smp_trampoline.o
$(MAKE) '$(call SHESCAPE,$(BUILDDIR))/linker_nomap.ld'
$(LIMINE_LD) \
-T'$(call SHESCAPE,$(BUILDDIR))/linker_nomap.ld' \
@@ -355,7 +355,7 @@ $(call MKESCAPE,$(BUILDDIR))/linker.ld: linker_uefi32.ld.in
mkdir -p '$(call SHESCAPE,$(BUILDDIR))'
$(LIMINE_CC) -x c -E -P linker_uefi32.ld.in -o '$(call SHESCAPE,$(BUILDDIR))/linker.ld'
-$(call MKESCAPE,$(BUILDDIR))/limine_efi.elf: $(call MKESCAPE,$(BUILDDIR))/reduced-gnu-efi/gnuefi/crt0-efi-ia32.o $(call MKESCAPE,$(BUILDDIR))/reduced-gnu-efi/gnuefi/libgnuefi.a $(OBJ) $(call MKESCAPE,$(BUILDDIR))/tinf/tinfgzip.o $(call MKESCAPE,$(BUILDDIR))/tinf/tinflate.o $(call MKESCAPE,$(BUILDDIR))/font.o $(call MKESCAPE,$(BUILDDIR))/sys/smp_trampoline.o $(call MKESCAPE,$(BUILDDIR))/full.map.o
+$(call MKESCAPE,$(BUILDDIR))/limine.elf: $(call MKESCAPE,$(BUILDDIR))/reduced-gnu-efi/gnuefi/crt0-efi-ia32.o $(call MKESCAPE,$(BUILDDIR))/reduced-gnu-efi/gnuefi/libgnuefi.a $(OBJ) $(call MKESCAPE,$(BUILDDIR))/tinf/tinfgzip.o $(call MKESCAPE,$(BUILDDIR))/tinf/tinflate.o $(call MKESCAPE,$(BUILDDIR))/font.o $(call MKESCAPE,$(BUILDDIR))/sys/smp_trampoline.o $(call MKESCAPE,$(BUILDDIR))/full.map.o
$(MAKE) '$(call SHESCAPE,$(BUILDDIR))/linker.ld'
$(LIMINE_LD) \
-T'$(call SHESCAPE,$(BUILDDIR))/linker.ld' \
diff --git a/stage23/console.c b/common/console.c
similarity index 100%
rename from stage23/console.c
rename to common/console.c
diff --git a/stage23/console.h b/common/console.h
similarity index 100%
rename from stage23/console.h
rename to common/console.h
diff --git a/stage23/drivers/disk.h b/common/drivers/disk.h
similarity index 100%
rename from stage23/drivers/disk.h
rename to common/drivers/disk.h
diff --git a/stage23/drivers/disk.s2.c b/common/drivers/disk.s2.c
similarity index 100%
rename from stage23/drivers/disk.s2.c
rename to common/drivers/disk.s2.c
diff --git a/stage23/drivers/edid.c b/common/drivers/edid.c
similarity index 100%
rename from stage23/drivers/edid.c
rename to common/drivers/edid.c
diff --git a/stage23/drivers/edid.h b/common/drivers/edid.h
similarity index 100%
rename from stage23/drivers/edid.h
rename to common/drivers/edid.h
diff --git a/stage23/drivers/fwcfg.h b/common/drivers/fwcfg.h
similarity index 100%
rename from stage23/drivers/fwcfg.h
rename to common/drivers/fwcfg.h
diff --git a/stage23/drivers/fwcfg.s2.c b/common/drivers/fwcfg.s2.c
similarity index 100%
rename from stage23/drivers/fwcfg.s2.c
rename to common/drivers/fwcfg.s2.c
diff --git a/stage23/drivers/gop.c b/common/drivers/gop.c
similarity index 100%
rename from stage23/drivers/gop.c
rename to common/drivers/gop.c
diff --git a/stage23/drivers/gop.h b/common/drivers/gop.h
similarity index 100%
rename from stage23/drivers/gop.h
rename to common/drivers/gop.h
diff --git a/stage23/drivers/vbe.c b/common/drivers/vbe.c
similarity index 100%
rename from stage23/drivers/vbe.c
rename to common/drivers/vbe.c
diff --git a/stage23/drivers/vbe.h b/common/drivers/vbe.h
similarity index 100%
rename from stage23/drivers/vbe.h
rename to common/drivers/vbe.h
diff --git a/stage23/drivers/vga_textmode.c b/common/drivers/vga_textmode.c
similarity index 100%
rename from stage23/drivers/vga_textmode.c
rename to common/drivers/vga_textmode.c
diff --git a/stage23/drivers/vga_textmode.h b/common/drivers/vga_textmode.h
similarity index 100%
rename from stage23/drivers/vga_textmode.h
rename to common/drivers/vga_textmode.h
diff --git a/stage23/entry.asmb b/common/entry.asmb
similarity index 100%
rename from stage23/entry.asmb
rename to common/entry.asmb
diff --git a/stage23/entry.s2.c b/common/entry.s2.c
similarity index 100%
rename from stage23/entry.s2.c
rename to common/entry.s2.c
diff --git a/stage23/entry.s3.c b/common/entry.s3.c
similarity index 100%
rename from stage23/entry.s3.c
rename to common/entry.s3.c
diff --git a/stage23/font.bin b/common/font.bin
similarity index 100%
rename from stage23/font.bin
rename to common/font.bin
diff --git a/stage23/fs/echfs.h b/common/fs/echfs.h
similarity index 100%
rename from stage23/fs/echfs.h
rename to common/fs/echfs.h
diff --git a/stage23/fs/echfs.s2.c b/common/fs/echfs.s2.c
similarity index 100%
rename from stage23/fs/echfs.s2.c
rename to common/fs/echfs.s2.c
diff --git a/stage23/fs/ext2.h b/common/fs/ext2.h
similarity index 100%
rename from stage23/fs/ext2.h
rename to common/fs/ext2.h
diff --git a/stage23/fs/ext2.s2.c b/common/fs/ext2.s2.c
similarity index 100%
rename from stage23/fs/ext2.s2.c
rename to common/fs/ext2.s2.c
diff --git a/stage23/fs/fat32.h b/common/fs/fat32.h
similarity index 100%
rename from stage23/fs/fat32.h
rename to common/fs/fat32.h
diff --git a/stage23/fs/fat32.s2.c b/common/fs/fat32.s2.c
similarity index 100%
rename from stage23/fs/fat32.s2.c
rename to common/fs/fat32.s2.c
diff --git a/stage23/fs/file.h b/common/fs/file.h
similarity index 100%
rename from stage23/fs/file.h
rename to common/fs/file.h
diff --git a/stage23/fs/file.s2.c b/common/fs/file.s2.c
similarity index 100%
rename from stage23/fs/file.s2.c
rename to common/fs/file.s2.c
diff --git a/stage23/fs/iso9660.h b/common/fs/iso9660.h
similarity index 100%
rename from stage23/fs/iso9660.h
rename to common/fs/iso9660.h
diff --git a/stage23/fs/iso9660.s2.c b/common/fs/iso9660.s2.c
similarity index 100%
rename from stage23/fs/iso9660.s2.c
rename to common/fs/iso9660.s2.c
diff --git a/stage23/fs/ntfs.h b/common/fs/ntfs.h
similarity index 100%
rename from stage23/fs/ntfs.h
rename to common/fs/ntfs.h
diff --git a/stage23/fs/ntfs.s2.c b/common/fs/ntfs.s2.c
similarity index 100%
rename from stage23/fs/ntfs.s2.c
rename to common/fs/ntfs.s2.c
diff --git a/stage23/gensyms.sh b/common/gensyms.sh
similarity index 100%
rename from stage23/gensyms.sh
rename to common/gensyms.sh
diff --git a/stage23/lib/acpi.c b/common/lib/acpi.c
similarity index 100%
rename from stage23/lib/acpi.c
rename to common/lib/acpi.c
diff --git a/stage23/lib/acpi.h b/common/lib/acpi.h
similarity index 100%
rename from stage23/lib/acpi.h
rename to common/lib/acpi.h
diff --git a/stage23/lib/blib.c b/common/lib/blib.c
similarity index 100%
rename from stage23/lib/blib.c
rename to common/lib/blib.c
diff --git a/stage23/lib/blib.h b/common/lib/blib.h
similarity index 100%
rename from stage23/lib/blib.h
rename to common/lib/blib.h
diff --git a/stage23/lib/blib.s2.c b/common/lib/blib.s2.c
similarity index 100%
rename from stage23/lib/blib.s2.c
rename to common/lib/blib.s2.c
diff --git a/stage23/lib/bmp.c b/common/lib/bmp.c
similarity index 100%
rename from stage23/lib/bmp.c
rename to common/lib/bmp.c
diff --git a/stage23/lib/bmp.h b/common/lib/bmp.h
similarity index 100%
rename from stage23/lib/bmp.h
rename to common/lib/bmp.h
diff --git a/stage23/lib/config.c b/common/lib/config.c
similarity index 100%
rename from stage23/lib/config.c
rename to common/lib/config.c
diff --git a/stage23/lib/config.h b/common/lib/config.h
similarity index 100%
rename from stage23/lib/config.h
rename to common/lib/config.h
diff --git a/stage23/lib/elf.c b/common/lib/elf.c
similarity index 100%
rename from stage23/lib/elf.c
rename to common/lib/elf.c
diff --git a/stage23/lib/elf.h b/common/lib/elf.h
similarity index 100%
rename from stage23/lib/elf.h
rename to common/lib/elf.h
diff --git a/stage23/lib/fb.c b/common/lib/fb.c
similarity index 100%
rename from stage23/lib/fb.c
rename to common/lib/fb.c
diff --git a/stage23/lib/fb.h b/common/lib/fb.h
similarity index 100%
rename from stage23/lib/fb.h
rename to common/lib/fb.h
diff --git a/stage23/lib/gterm.c b/common/lib/gterm.c
similarity index 100%
rename from stage23/lib/gterm.c
rename to common/lib/gterm.c
diff --git a/stage23/lib/gterm.h b/common/lib/gterm.h
similarity index 100%
rename from stage23/lib/gterm.h
rename to common/lib/gterm.h
diff --git a/stage23/lib/guid.c b/common/lib/guid.c
similarity index 100%
rename from stage23/lib/guid.c
rename to common/lib/guid.c
diff --git a/stage23/lib/guid.h b/common/lib/guid.h
similarity index 100%
rename from stage23/lib/guid.h
rename to common/lib/guid.h
diff --git a/stage23/lib/image.c b/common/lib/image.c
similarity index 100%
rename from stage23/lib/image.c
rename to common/lib/image.c
diff --git a/stage23/lib/image.h b/common/lib/image.h
similarity index 100%
rename from stage23/lib/image.h
rename to common/lib/image.h
diff --git a/stage23/lib/libc.h b/common/lib/libc.h
similarity index 100%
rename from stage23/lib/libc.h
rename to common/lib/libc.h
diff --git a/stage23/lib/libc.s2.c b/common/lib/libc.s2.c
similarity index 100%
rename from stage23/lib/libc.s2.c
rename to common/lib/libc.s2.c
diff --git a/stage23/lib/libgcc.s2.asm32 b/common/lib/libgcc.s2.asm32
similarity index 100%
rename from stage23/lib/libgcc.s2.asm32
rename to common/lib/libgcc.s2.asm32
diff --git a/stage23/lib/mem.asm64 b/common/lib/mem.asm64
similarity index 100%
rename from stage23/lib/mem.asm64
rename to common/lib/mem.asm64
diff --git a/stage23/lib/mem.s2.asm32 b/common/lib/mem.s2.asm32
similarity index 100%
rename from stage23/lib/mem.s2.asm32
rename to common/lib/mem.s2.asm32
diff --git a/stage23/lib/panic.s2.c b/common/lib/panic.s2.c
similarity index 100%
rename from stage23/lib/panic.s2.c
rename to common/lib/panic.s2.c
diff --git a/stage23/lib/part.h b/common/lib/part.h
similarity index 100%
rename from stage23/lib/part.h
rename to common/lib/part.h
diff --git a/stage23/lib/part.s2.c b/common/lib/part.s2.c
similarity index 100%
rename from stage23/lib/part.s2.c
rename to common/lib/part.s2.c
diff --git a/stage23/lib/print.h b/common/lib/print.h
similarity index 100%
rename from stage23/lib/print.h
rename to common/lib/print.h
diff --git a/stage23/lib/print.s2.c b/common/lib/print.s2.c
similarity index 100%
rename from stage23/lib/print.s2.c
rename to common/lib/print.s2.c
diff --git a/stage23/lib/pxe.asmb b/common/lib/pxe.asmb
similarity index 100%
rename from stage23/lib/pxe.asmb
rename to common/lib/pxe.asmb
diff --git a/stage23/lib/rand.c b/common/lib/rand.c
similarity index 100%
rename from stage23/lib/rand.c
rename to common/lib/rand.c
diff --git a/stage23/lib/rand.h b/common/lib/rand.h
similarity index 100%
rename from stage23/lib/rand.h
rename to common/lib/rand.h
diff --git a/stage23/lib/readline.c b/common/lib/readline.c
similarity index 100%
rename from stage23/lib/readline.c
rename to common/lib/readline.c
diff --git a/stage23/lib/readline.h b/common/lib/readline.h
similarity index 100%
rename from stage23/lib/readline.h
rename to common/lib/readline.h
diff --git a/stage23/lib/real.asmb b/common/lib/real.asmb
similarity index 100%
rename from stage23/lib/real.asmb
rename to common/lib/real.asmb
diff --git a/stage23/lib/real.h b/common/lib/real.h
similarity index 100%
rename from stage23/lib/real.h
rename to common/lib/real.h
diff --git a/stage23/lib/sleep.asmb b/common/lib/sleep.asmb
similarity index 100%
rename from stage23/lib/sleep.asmb
rename to common/lib/sleep.asmb
diff --git a/stage23/lib/spinup.asm32u b/common/lib/spinup.asm32u
similarity index 100%
rename from stage23/lib/spinup.asm32u
rename to common/lib/spinup.asm32u
diff --git a/stage23/lib/spinup.asm64u b/common/lib/spinup.asm64u
similarity index 100%
rename from stage23/lib/spinup.asm64u
rename to common/lib/spinup.asm64u
diff --git a/stage23/lib/spinup.asmb b/common/lib/spinup.asmb
similarity index 100%
rename from stage23/lib/spinup.asmb
rename to common/lib/spinup.asmb
diff --git a/stage23/lib/term.c b/common/lib/term.c
similarity index 100%
rename from stage23/lib/term.c
rename to common/lib/term.c
diff --git a/stage23/lib/term.h b/common/lib/term.h
similarity index 100%
rename from stage23/lib/term.h
rename to common/lib/term.h
diff --git a/stage23/lib/time.c b/common/lib/time.c
similarity index 100%
rename from stage23/lib/time.c
rename to common/lib/time.c
diff --git a/stage23/lib/time.h b/common/lib/time.h
similarity index 100%
rename from stage23/lib/time.h
rename to common/lib/time.h
diff --git a/stage23/lib/trace.h b/common/lib/trace.h
similarity index 100%
rename from stage23/lib/trace.h
rename to common/lib/trace.h
diff --git a/stage23/lib/trace.s2.c b/common/lib/trace.s2.c
similarity index 100%
rename from stage23/lib/trace.s2.c
rename to common/lib/trace.s2.c
diff --git a/stage23/lib/uri.c b/common/lib/uri.c
similarity index 100%
rename from stage23/lib/uri.c
rename to common/lib/uri.c
diff --git a/stage23/lib/uri.h b/common/lib/uri.h
similarity index 100%
rename from stage23/lib/uri.h
rename to common/lib/uri.h
diff --git a/stage23/linker_bios.ld.in b/common/linker_bios.ld.in
similarity index 100%
rename from stage23/linker_bios.ld.in
rename to common/linker_bios.ld.in
diff --git a/stage23/linker_uefi32.ld.in b/common/linker_uefi32.ld.in
similarity index 100%
rename from stage23/linker_uefi32.ld.in
rename to common/linker_uefi32.ld.in
diff --git a/stage23/linker_uefi64.ld.in b/common/linker_uefi64.ld.in
similarity index 100%
rename from stage23/linker_uefi64.ld.in
rename to common/linker_uefi64.ld.in
diff --git a/stage23/menu.c b/common/menu.c
similarity index 100%
rename from stage23/menu.c
rename to common/menu.c
diff --git a/stage23/menu.h b/common/menu.h
similarity index 100%
rename from stage23/menu.h
rename to common/menu.h
diff --git a/stage23/mm/pmm.c b/common/mm/pmm.c
similarity index 100%
rename from stage23/mm/pmm.c
rename to common/mm/pmm.c
diff --git a/stage23/mm/pmm.h b/common/mm/pmm.h
similarity index 100%
rename from stage23/mm/pmm.h
rename to common/mm/pmm.h
diff --git a/stage23/mm/pmm.s2.c b/common/mm/pmm.s2.c
similarity index 100%
rename from stage23/mm/pmm.s2.c
rename to common/mm/pmm.s2.c
diff --git a/stage23/mm/vmm.c b/common/mm/vmm.c
similarity index 100%
rename from stage23/mm/vmm.c
rename to common/mm/vmm.c
diff --git a/stage23/mm/vmm.h b/common/mm/vmm.h
similarity index 100%
rename from stage23/mm/vmm.h
rename to common/mm/vmm.h
diff --git a/stage23/protos/chainload.c b/common/protos/chainload.c
similarity index 100%
rename from stage23/protos/chainload.c
rename to common/protos/chainload.c
diff --git a/stage23/protos/chainload.h b/common/protos/chainload.h
similarity index 100%
rename from stage23/protos/chainload.h
rename to common/protos/chainload.h
diff --git a/stage23/protos/linux.32.c b/common/protos/linux.32.c
similarity index 100%
rename from stage23/protos/linux.32.c
rename to common/protos/linux.32.c
diff --git a/stage23/protos/linux.c b/common/protos/linux.c
similarity index 100%
rename from stage23/protos/linux.c
rename to common/protos/linux.c
diff --git a/stage23/protos/linux.h b/common/protos/linux.h
similarity index 100%
rename from stage23/protos/linux.h
rename to common/protos/linux.h
diff --git a/stage23/protos/multiboot1.32.c b/common/protos/multiboot1.32.c
similarity index 100%
rename from stage23/protos/multiboot1.32.c
rename to common/protos/multiboot1.32.c
diff --git a/stage23/protos/multiboot1.c b/common/protos/multiboot1.c
similarity index 100%
rename from stage23/protos/multiboot1.c
rename to common/protos/multiboot1.c
diff --git a/stage23/protos/multiboot1.h b/common/protos/multiboot1.h
similarity index 100%
rename from stage23/protos/multiboot1.h
rename to common/protos/multiboot1.h
diff --git a/stage23/protos/multiboot2.32.c b/common/protos/multiboot2.32.c
similarity index 100%
rename from stage23/protos/multiboot2.32.c
rename to common/protos/multiboot2.32.c
diff --git a/stage23/protos/multiboot2.c b/common/protos/multiboot2.c
similarity index 100%
rename from stage23/protos/multiboot2.c
rename to common/protos/multiboot2.c
diff --git a/stage23/protos/multiboot2.h b/common/protos/multiboot2.h
similarity index 100%
rename from stage23/protos/multiboot2.h
rename to common/protos/multiboot2.h
diff --git a/stage23/protos/stivale.32.c b/common/protos/stivale.32.c
similarity index 100%
rename from stage23/protos/stivale.32.c
rename to common/protos/stivale.32.c
diff --git a/stage23/protos/stivale.c b/common/protos/stivale.c
similarity index 100%
rename from stage23/protos/stivale.c
rename to common/protos/stivale.c
diff --git a/stage23/protos/stivale.h b/common/protos/stivale.h
similarity index 100%
rename from stage23/protos/stivale.h
rename to common/protos/stivale.h
diff --git a/stage23/protos/stivale2.c b/common/protos/stivale2.c
similarity index 100%
rename from stage23/protos/stivale2.c
rename to common/protos/stivale2.c
diff --git a/stage23/protos/stivale2.h b/common/protos/stivale2.h
similarity index 100%
rename from stage23/protos/stivale2.h
rename to common/protos/stivale2.h
diff --git a/stage23/protos/stivale2_rt.asm32u b/common/protos/stivale2_rt.asm32u
similarity index 100%
rename from stage23/protos/stivale2_rt.asm32u
rename to common/protos/stivale2_rt.asm32u
diff --git a/stage23/protos/stivale2_rt.asmb b/common/protos/stivale2_rt.asmb
similarity index 100%
rename from stage23/protos/stivale2_rt.asmb
rename to common/protos/stivale2_rt.asmb
diff --git a/stage23/pxe/pxe.h b/common/pxe/pxe.h
similarity index 100%
rename from stage23/pxe/pxe.h
rename to common/pxe/pxe.h
diff --git a/stage23/pxe/pxe.s2.c b/common/pxe/pxe.s2.c
similarity index 100%
rename from stage23/pxe/pxe.s2.c
rename to common/pxe/pxe.s2.c
diff --git a/stage23/pxe/tftp.h b/common/pxe/tftp.h
similarity index 100%
rename from stage23/pxe/tftp.h
rename to common/pxe/tftp.h
diff --git a/stage23/pxe/tftp.s2.c b/common/pxe/tftp.s2.c
similarity index 100%
rename from stage23/pxe/tftp.s2.c
rename to common/pxe/tftp.s2.c
diff --git a/stage23/sbat.c b/common/sbat.c
similarity index 100%
rename from stage23/sbat.c
rename to common/sbat.c
diff --git a/stage23/sys/a20.h b/common/sys/a20.h
similarity index 100%
rename from stage23/sys/a20.h
rename to common/sys/a20.h
diff --git a/stage23/sys/a20.s2.c b/common/sys/a20.s2.c
similarity index 100%
rename from stage23/sys/a20.s2.c
rename to common/sys/a20.s2.c
diff --git a/stage23/sys/cpu.c b/common/sys/cpu.c
similarity index 100%
rename from stage23/sys/cpu.c
rename to common/sys/cpu.c
diff --git a/stage23/sys/cpu.h b/common/sys/cpu.h
similarity index 100%
rename from stage23/sys/cpu.h
rename to common/sys/cpu.h
diff --git a/stage23/sys/dummy_isr.asm32 b/common/sys/dummy_isr.asm32
similarity index 100%
rename from stage23/sys/dummy_isr.asm32
rename to common/sys/dummy_isr.asm32
diff --git a/stage23/sys/dummy_isr.asm64 b/common/sys/dummy_isr.asm64
similarity index 100%
rename from stage23/sys/dummy_isr.asm64
rename to common/sys/dummy_isr.asm64
diff --git a/stage23/sys/e820.h b/common/sys/e820.h
similarity index 100%
rename from stage23/sys/e820.h
rename to common/sys/e820.h
diff --git a/stage23/sys/e820.s2.c b/common/sys/e820.s2.c
similarity index 100%
rename from stage23/sys/e820.s2.c
rename to common/sys/e820.s2.c
diff --git a/stage23/sys/exceptions.s2.c b/common/sys/exceptions.s2.c
similarity index 100%
rename from stage23/sys/exceptions.s2.c
rename to common/sys/exceptions.s2.c
diff --git a/stage23/sys/gdt.h b/common/sys/gdt.h
similarity index 100%
rename from stage23/sys/gdt.h
rename to common/sys/gdt.h
diff --git a/stage23/sys/gdt.s2.c b/common/sys/gdt.s2.c
similarity index 100%
rename from stage23/sys/gdt.s2.c
rename to common/sys/gdt.s2.c
diff --git a/stage23/sys/idt.c b/common/sys/idt.c
similarity index 100%
rename from stage23/sys/idt.c
rename to common/sys/idt.c
diff --git a/stage23/sys/idt.h b/common/sys/idt.h
similarity index 100%
rename from stage23/sys/idt.h
rename to common/sys/idt.h
diff --git a/stage23/sys/idt.s2.c b/common/sys/idt.s2.c
similarity index 100%
rename from stage23/sys/idt.s2.c
rename to common/sys/idt.s2.c
diff --git a/stage23/sys/int_thunks.s2.asmb b/common/sys/int_thunks.s2.asmb
similarity index 100%
rename from stage23/sys/int_thunks.s2.asmb
rename to common/sys/int_thunks.s2.asmb
diff --git a/stage23/sys/lapic.c b/common/sys/lapic.c
similarity index 100%
rename from stage23/sys/lapic.c
rename to common/sys/lapic.c
diff --git a/stage23/sys/lapic.h b/common/sys/lapic.h
similarity index 100%
rename from stage23/sys/lapic.h
rename to common/sys/lapic.h
diff --git a/stage23/sys/pic.c b/common/sys/pic.c
similarity index 100%
rename from stage23/sys/pic.c
rename to common/sys/pic.c
diff --git a/stage23/sys/pic.h b/common/sys/pic.h
similarity index 100%
rename from stage23/sys/pic.h
rename to common/sys/pic.h
diff --git a/stage23/sys/smp.c b/common/sys/smp.c
similarity index 100%
rename from stage23/sys/smp.c
rename to common/sys/smp.c
diff --git a/stage23/sys/smp.h b/common/sys/smp.h
similarity index 100%
rename from stage23/sys/smp.h
rename to common/sys/smp.h
diff --git a/stage23/sys/smp_trampoline.real b/common/sys/smp_trampoline.real
similarity index 100%
rename from stage23/sys/smp_trampoline.real
rename to common/sys/smp_trampoline.real
diff --git a/stage1/cd/bootsect.asm b/stage1/cd/bootsect.asm
index d09562b2..6170f395 100644
--- a/stage1/cd/bootsect.asm
+++ b/stage1/cd/bootsect.asm
@@ -100,7 +100,7 @@ incbin DECOMPRESSOR_PATH
align 16
stage2:
-%strcat STAGE2_PATH BUILDDIR, '/stage23-bios/stage2.bin.gz'
+%strcat STAGE2_PATH BUILDDIR, '/common-bios/stage2.bin.gz'
incbin STAGE2_PATH
.size: equ $ - stage2
diff --git a/stage1/hdd/bootsect.asm b/stage1/hdd/bootsect.asm
index cf451e1a..de49c283 100644
--- a/stage1/hdd/bootsect.asm
+++ b/stage1/hdd/bootsect.asm
@@ -137,6 +137,6 @@ incbin DECOMPRESSOR_PATH
align 16
stage2:
-%strcat STAGE2_PATH BUILDDIR, '/stage23-bios/stage2.bin.gz'
+%strcat STAGE2_PATH BUILDDIR, '/common-bios/stage2.bin.gz'
incbin STAGE2_PATH
.size: equ $ - stage2
diff --git a/stage1/pxe/bootsect.asm b/stage1/pxe/bootsect.asm
index ad66d97b..c1b96fb3 100644
--- a/stage1/pxe/bootsect.asm
+++ b/stage1/pxe/bootsect.asm
@@ -54,7 +54,7 @@ incbin DECOMPRESSOR_PATH
align 16
stage2:
-%strcat STAGE2_PATH BUILDDIR, '/stage23-bios/stage2.bin.gz'
+%strcat STAGE2_PATH BUILDDIR, '/common-bios/stage2.bin.gz'
incbin STAGE2_PATH
.size: equ $ - stage2
.fullsize: equ $ - decompressor
diff --git a/test/Makefile b/test/Makefile
index c21479f8..0c509eaa 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -49,12 +49,12 @@ test.elf: stivale.o stivale2.o e9print.o memory.o
$(LD) $^ $(LDFLAGS) $(INTERNALLDFLAGS) -o $@
multiboot2.elf: multiboot2_trampoline.o
- $(CC) $(CFLAGS) $(INTERNALCFLAGS) -I../stage23/protos -m32 -c multiboot2.c -o multiboot2.o
+ $(CC) $(CFLAGS) $(INTERNALCFLAGS) -I../common/protos -m32 -c multiboot2.c -o multiboot2.o
$(CC) $(CFLAGS) $(INTERNALCFLAGS) -m32 -c e9print.c -o e9print.o
$(LD) $^ multiboot2.o e9print.o $(LDFLAGS) $(INTERNAL_LD_FLAGS_MULTIBOOT2) -m elf_i386 -o $@
multiboot.elf: multiboot_trampoline.o
- $(CC) $(CFLAGS) $(INTERNALCFLAGS) -I../stage23/protos -m32 -c multiboot.c -o multiboot.o
+ $(CC) $(CFLAGS) $(INTERNALCFLAGS) -I../common/protos -m32 -c multiboot.c -o multiboot.o
$(CC) $(CFLAGS) $(INTERNALCFLAGS) -m32 -c e9print.c -o e9print.o
$(LD) $^ multiboot.o e9print.o $(LDFLAGS) $(INTERNAL_LD_FLAGS_MULTIBOOT1) -m elf_i386 -o $@
