misc: limine.sys -> limine-bios.sys
This commit is contained in:
parent
38ccb76c40
commit
bc8188e275
|
@ -148,7 +148,7 @@ install: all
|
||||||
$(INSTALL) -d '$(call SHESCAPE,$(DESTDIR)$(datarootdir))'
|
$(INSTALL) -d '$(call SHESCAPE,$(DESTDIR)$(datarootdir))'
|
||||||
$(INSTALL) -d '$(call SHESCAPE,$(DESTDIR)$(datarootdir))/limine'
|
$(INSTALL) -d '$(call SHESCAPE,$(DESTDIR)$(datarootdir))/limine'
|
||||||
ifeq ($(BUILD_BIOS),limine-bios)
|
ifeq ($(BUILD_BIOS),limine-bios)
|
||||||
$(INSTALL_DATA) '$(call SHESCAPE,$(BINDIR))/limine.sys' '$(call SHESCAPE,$(DESTDIR)$(datarootdir))/limine/'
|
$(INSTALL_DATA) '$(call SHESCAPE,$(BINDIR))/limine-bios.sys' '$(call SHESCAPE,$(DESTDIR)$(datarootdir))/limine/'
|
||||||
endif
|
endif
|
||||||
ifneq ($(BUILD_BIOS_CD),no)
|
ifneq ($(BUILD_BIOS_CD),no)
|
||||||
$(INSTALL_DATA) '$(call SHESCAPE,$(BINDIR))/limine-bios-cd.bin' '$(call SHESCAPE,$(DESTDIR)$(datarootdir))/limine/'
|
$(INSTALL_DATA) '$(call SHESCAPE,$(BINDIR))/limine-bios-cd.bin' '$(call SHESCAPE,$(DESTDIR)$(datarootdir))/limine/'
|
||||||
|
@ -201,7 +201,7 @@ endif
|
||||||
ifneq ($(BUILD_BIOS_PXE),no)
|
ifneq ($(BUILD_BIOS_PXE),no)
|
||||||
cd '$(call SHESCAPE,$(SRCDIR))/stage1/pxe' && nasm bootsect.asm -Wall $(WERROR_FLAG) -fbin -DBUILDDIR="'"'$(call NASMESCAPE,$(BUILDDIR))'"'" -o '$(call SHESCAPE,$(BINDIR))/limine-bios-pxe.bin'
|
cd '$(call SHESCAPE,$(SRCDIR))/stage1/pxe' && nasm bootsect.asm -Wall $(WERROR_FLAG) -fbin -DBUILDDIR="'"'$(call NASMESCAPE,$(BUILDDIR))'"'" -o '$(call SHESCAPE,$(BINDIR))/limine-bios-pxe.bin'
|
||||||
endif
|
endif
|
||||||
cp '$(call SHESCAPE,$(BUILDDIR))/common-bios/limine.sys' '$(call SHESCAPE,$(BINDIR))/'
|
cp '$(call SHESCAPE,$(BUILDDIR))/common-bios/limine-bios.sys' '$(call SHESCAPE,$(BINDIR))/'
|
||||||
touch '$(call SHESCAPE,$(BUILDDIR))/stage1.stamp'
|
touch '$(call SHESCAPE,$(BUILDDIR))/stage1.stamp'
|
||||||
|
|
||||||
.PHONY: limine-bios
|
.PHONY: limine-bios
|
||||||
|
|
12
README.md
12
README.md
|
@ -155,7 +155,7 @@ run `limine bios-install` as such:
|
||||||
limine bios-install <path to device/image>
|
limine bios-install <path to device/image>
|
||||||
```
|
```
|
||||||
|
|
||||||
The boot device must contain the `limine.sys` and `limine.cfg` files in
|
The boot device must contain the `limine-bios.sys` and `limine.cfg` files in
|
||||||
either the root, `limine`, `boot`, or `boot/limine` directory of one of the
|
either the root, `limine`, `boot`, or `boot/limine` directory of one of the
|
||||||
partitions, formatted with a supported file system.
|
partitions, formatted with a supported file system.
|
||||||
|
|
||||||
|
@ -177,15 +177,15 @@ In case one wants to let `limine bios-install` embed stage 2 within GPT's struct
|
||||||
simply omit the partition number, and invoke `limine bios-install` the same as one
|
simply omit the partition number, and invoke `limine bios-install` the same as one
|
||||||
would do for an MBR partitioned device.
|
would do for an MBR partitioned device.
|
||||||
|
|
||||||
The boot device must contain the `limine.sys` and `limine.cfg` files in
|
The boot device must contain the `limine-bios.sys` and `limine.cfg` files in
|
||||||
either the root, `limine`, `boot`, or `boot/limine` directory of one of the
|
either the root, `limine`, `boot`, or `boot/limine` directory of one of the
|
||||||
partitions, formatted with a supported file system.
|
partitions, formatted with a supported file system.
|
||||||
|
|
||||||
### BIOS/UEFI hybrid ISO creation
|
### BIOS/UEFI hybrid ISO creation
|
||||||
In order to create a hybrid ISO with Limine, place the
|
In order to create a hybrid ISO with Limine, place the
|
||||||
`limine-uefi-cd.bin`, `limine-bios-cd.bin`, `limine.sys`, and `limine.cfg` files
|
`limine-uefi-cd.bin`, `limine-bios-cd.bin`, `limine-bios.sys`, and `limine.cfg` files
|
||||||
into a directory which will serve as the root of the created ISO.
|
into a directory which will serve as the root of the created ISO.
|
||||||
(`limine.sys` and `limine.cfg` must either be in the root, `limine`, `boot`, or
|
(`limine-bios.sys` and `limine.cfg` must either be in the root, `limine`, `boot`, or
|
||||||
`boot/limine` directory; `limine-uefi-cd.bin` and `limine-bios-cd.bin` can reside
|
`boot/limine` directory; `limine-uefi-cd.bin` and `limine-bios-cd.bin` can reside
|
||||||
anywhere).
|
anywhere).
|
||||||
|
|
||||||
|
@ -226,12 +226,12 @@ In order to boot Limine from PXE it is necessary to setup a DHCP server with
|
||||||
support for PXE booting. This can either be accomplished using a single DHCP
|
support for PXE booting. This can either be accomplished using a single DHCP
|
||||||
server or your existing DHCP server and a proxy DHCP server such as dnsmasq.
|
server or your existing DHCP server and a proxy DHCP server such as dnsmasq.
|
||||||
|
|
||||||
`limine.cfg` and `limine.sys` are expected to be on the server used for boot.
|
`limine.cfg` and `limine-bios.sys` are expected to be on the server used for boot.
|
||||||
|
|
||||||
### UEFI/PXE boot
|
### UEFI/PXE boot
|
||||||
The `BOOT*.EFI` files are compatible with UEFI PXE.
|
The `BOOT*.EFI` files are compatible with UEFI PXE.
|
||||||
The steps needed to boot Limine are the same as with BIOS PXE,
|
The steps needed to boot Limine are the same as with BIOS PXE,
|
||||||
except that the `limine.sys` file is not needed on the server.
|
except that the `limine-bios.sys` file is not needed on the server.
|
||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
The `limine.cfg` file contains Limine's configuration.
|
The `limine.cfg` file contains Limine's configuration.
|
||||||
|
|
|
@ -243,7 +243,7 @@ override HEADER_DEPS := $(addprefix $(call MKESCAPE,$(BUILDDIR))/, $(C_FILES:.c=
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
|
|
||||||
ifeq ($(TARGET),bios)
|
ifeq ($(TARGET),bios)
|
||||||
all: $(call MKESCAPE,$(BUILDDIR))/limine.sys $(call MKESCAPE,$(BUILDDIR))/stage2.bin.gz
|
all: $(call MKESCAPE,$(BUILDDIR))/limine-bios.sys $(call MKESCAPE,$(BUILDDIR))/stage2.bin.gz
|
||||||
else ifeq ($(TARGET),uefi-x86-64)
|
else ifeq ($(TARGET),uefi-x86-64)
|
||||||
all: $(call MKESCAPE,$(BUILDDIR))/BOOTX64.EFI
|
all: $(call MKESCAPE,$(BUILDDIR))/BOOTX64.EFI
|
||||||
else ifeq ($(TARGET),uefi-ia32)
|
else ifeq ($(TARGET),uefi-ia32)
|
||||||
|
@ -259,7 +259,7 @@ ifeq ($(TARGET),bios)
|
||||||
$(call MKESCAPE,$(BUILDDIR))/stage2.bin.gz: $(call MKESCAPE,$(BUILDDIR))/stage2.bin
|
$(call MKESCAPE,$(BUILDDIR))/stage2.bin.gz: $(call MKESCAPE,$(BUILDDIR))/stage2.bin
|
||||||
gzip -n -9 < '$(call SHESCAPE,$<)' > '$(call SHESCAPE,$@)'
|
gzip -n -9 < '$(call SHESCAPE,$<)' > '$(call SHESCAPE,$@)'
|
||||||
|
|
||||||
$(call MKESCAPE,$(BUILDDIR))/stage2.bin: $(call MKESCAPE,$(BUILDDIR))/limine.sys
|
$(call MKESCAPE,$(BUILDDIR))/stage2.bin: $(call MKESCAPE,$(BUILDDIR))/limine-bios.sys
|
||||||
dd if='$(call SHESCAPE,$<)' bs=$$(( 0x$$("$(READELF_FOR_TARGET)" -S '$(call SHESCAPE,$(BUILDDIR))/limine.elf' | $(GREP) '\.text\.stage3' | $(SED) 's/^.*] //' | $(AWK) '{print $$3}' | $(SED) 's/^0*//') - 0xf000 )) count=1 of='$(call SHESCAPE,$@)' 2>/dev/null
|
dd if='$(call SHESCAPE,$<)' bs=$$(( 0x$$("$(READELF_FOR_TARGET)" -S '$(call SHESCAPE,$(BUILDDIR))/limine.elf' | $(GREP) '\.text\.stage3' | $(SED) 's/^.*] //' | $(AWK) '{print $$3}' | $(SED) 's/^0*//') - 0xf000 )) count=1 of='$(call SHESCAPE,$@)' 2>/dev/null
|
||||||
|
|
||||||
$(call MKESCAPE,$(BUILDDIR))/stage2.map.o: $(call MKESCAPE,$(BUILDDIR))/limine_nomap.elf
|
$(call MKESCAPE,$(BUILDDIR))/stage2.map.o: $(call MKESCAPE,$(BUILDDIR))/limine_nomap.elf
|
||||||
|
@ -274,7 +274,7 @@ $(call MKESCAPE,$(BUILDDIR))/full.map.o: $(call MKESCAPE,$(BUILDDIR))/limine_nos
|
||||||
$(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) $(CPPFLAGS_FOR_TARGET) -c '$(call SHESCAPE,$(BUILDDIR))/full.map.S' -o '$(call SHESCAPE,$@)'
|
$(CC_FOR_TARGET) $(CFLAGS_FOR_TARGET) $(CPPFLAGS_FOR_TARGET) -c '$(call SHESCAPE,$(BUILDDIR))/full.map.S' -o '$(call SHESCAPE,$@)'
|
||||||
rm -f '$(call SHESCAPE,$(BUILDDIR))/full.map.S' '$(call SHESCAPE,$(BUILDDIR))/full.map.d'
|
rm -f '$(call SHESCAPE,$(BUILDDIR))/full.map.S' '$(call SHESCAPE,$(BUILDDIR))/full.map.d'
|
||||||
|
|
||||||
$(call MKESCAPE,$(BUILDDIR))/limine.sys: $(call MKESCAPE,$(BUILDDIR))/limine_stage2only.elf $(call MKESCAPE,$(BUILDDIR))/limine.elf
|
$(call MKESCAPE,$(BUILDDIR))/limine-bios.sys: $(call MKESCAPE,$(BUILDDIR))/limine_stage2only.elf $(call MKESCAPE,$(BUILDDIR))/limine.elf
|
||||||
$(OBJCOPY_FOR_TARGET) -O binary '$(call SHESCAPE,$(BUILDDIR))/limine.elf' '$(call SHESCAPE,$@)'
|
$(OBJCOPY_FOR_TARGET) -O binary '$(call SHESCAPE,$(BUILDDIR))/limine.elf' '$(call SHESCAPE,$@)'
|
||||||
chmod -x '$(call SHESCAPE,$@)'
|
chmod -x '$(call SHESCAPE,$@)'
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ bool stage3_loaded = false;
|
||||||
static bool stage3_found = false;
|
static bool stage3_found = false;
|
||||||
|
|
||||||
extern symbol stage3_addr;
|
extern symbol stage3_addr;
|
||||||
extern symbol limine_sys_size;
|
extern symbol limine_bios_sys_size;
|
||||||
extern symbol build_id_s2;
|
extern symbol build_id_s2;
|
||||||
extern symbol build_id_s3;
|
extern symbol build_id_s3;
|
||||||
|
|
||||||
|
@ -41,10 +41,10 @@ static bool stage3_init(struct volume *part) {
|
||||||
|
|
||||||
bool old_cif = case_insensitive_fopen;
|
bool old_cif = case_insensitive_fopen;
|
||||||
case_insensitive_fopen = true;
|
case_insensitive_fopen = true;
|
||||||
if ((stage3 = fopen(part, "/limine.sys")) == NULL
|
if ((stage3 = fopen(part, "/limine-bios.sys")) == NULL
|
||||||
&& (stage3 = fopen(part, "/limine/limine.sys")) == NULL
|
&& (stage3 = fopen(part, "/limine/limine-bios.sys")) == NULL
|
||||||
&& (stage3 = fopen(part, "/boot/limine.sys")) == NULL
|
&& (stage3 = fopen(part, "/boot/limine-bios.sys")) == NULL
|
||||||
&& (stage3 = fopen(part, "/boot/limine/limine.sys")) == NULL) {
|
&& (stage3 = fopen(part, "/boot/limine/limine-bios.sys")) == NULL) {
|
||||||
case_insensitive_fopen = old_cif;
|
case_insensitive_fopen = old_cif;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -52,8 +52,8 @@ static bool stage3_init(struct volume *part) {
|
||||||
|
|
||||||
stage3_found = true;
|
stage3_found = true;
|
||||||
|
|
||||||
if (stage3->size != (size_t)limine_sys_size) {
|
if (stage3->size != (size_t)limine_bios_sys_size) {
|
||||||
print("limine.sys size incorrect.\n");
|
print("limine-bios.sys size incorrect.\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ static bool stage3_init(struct volume *part) {
|
||||||
fclose(stage3);
|
fclose(stage3);
|
||||||
|
|
||||||
if (memcmp(build_id_s2 + 16, build_id_s3 + 16, 20) != 0) {
|
if (memcmp(build_id_s2 + 16, build_id_s3 + 16, 20) != 0) {
|
||||||
print("limine.sys build ID mismatch.\n");
|
print("limine-bios.sys build ID mismatch.\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ noreturn void entry(uint8_t boot_drive, int boot_from) {
|
||||||
if (!stage3_found) {
|
if (!stage3_found) {
|
||||||
print("\n"
|
print("\n"
|
||||||
"!! Stage 3 file not found!\n"
|
"!! Stage 3 file not found!\n"
|
||||||
"!! Have you copied limine.sys to the root, /boot, /limine, or /boot/limine\n"
|
"!! Have you copied limine-bios.sys to the root, /boot, /limine, or /boot/limine\n"
|
||||||
"!! directories of one of the partitions on the boot device?\n\n");
|
"!! directories of one of the partitions on the boot device?\n\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ SECTIONS
|
||||||
|
|
||||||
.note.gnu.build-id : {
|
.note.gnu.build-id : {
|
||||||
*(.note.gnu.build-id)
|
*(.note.gnu.build-id)
|
||||||
limine_sys_size = . - 0xf000;
|
limine_bios_sys_size = . - 0xf000;
|
||||||
} :data_s3
|
} :data_s3
|
||||||
|
|
||||||
.bss : {
|
.bss : {
|
||||||
|
|
|
@ -13,7 +13,7 @@ all: limine
|
||||||
install: all
|
install: all
|
||||||
$(INSTALL) -d '$(DESTDIR)$(PREFIX)/share'
|
$(INSTALL) -d '$(DESTDIR)$(PREFIX)/share'
|
||||||
$(INSTALL) -d '$(DESTDIR)$(PREFIX)/share/limine'
|
$(INSTALL) -d '$(DESTDIR)$(PREFIX)/share/limine'
|
||||||
$(INSTALL) -m 644 limine.sys '$(DESTDIR)$(PREFIX)/share/limine/'
|
$(INSTALL) -m 644 limine-bios.sys '$(DESTDIR)$(PREFIX)/share/limine/'
|
||||||
$(INSTALL) -m 644 limine-bios-cd.bin '$(DESTDIR)$(PREFIX)/share/limine/'
|
$(INSTALL) -m 644 limine-bios-cd.bin '$(DESTDIR)$(PREFIX)/share/limine/'
|
||||||
$(INSTALL) -m 644 limine-uefi-cd.bin '$(DESTDIR)$(PREFIX)/share/limine/'
|
$(INSTALL) -m 644 limine-uefi-cd.bin '$(DESTDIR)$(PREFIX)/share/limine/'
|
||||||
$(INSTALL) -m 644 limine-bios-pxe.bin '$(DESTDIR)$(PREFIX)/share/limine/'
|
$(INSTALL) -m 644 limine-bios-pxe.bin '$(DESTDIR)$(PREFIX)/share/limine/'
|
||||||
|
|
|
@ -969,7 +969,7 @@ static int bios_install(int argc, char *argv[]) {
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!quiet) {
|
if (!quiet) {
|
||||||
fprintf(stderr, "Reminder: Remember to copy the limine.sys file in either\n"
|
fprintf(stderr, "Reminder: Remember to copy the limine-bios.sys file in either\n"
|
||||||
" the root, /boot, /limine, or /boot/limine directories of\n"
|
" the root, /boot, /limine, or /boot/limine directories of\n"
|
||||||
" one of the partitions on the device, or boot will fail!\n");
|
" one of the partitions on the device, or boot will fail!\n");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue