mirror of
https://github.com/memtest86plus/memtest86plus.git
synced 2025-02-25 18:55:23 -06:00
Make paths more uniform across architectures; adjust the build system and Github workflows accordingly.
* move x86/x86-64-specific files to boot/x86, build/ia32, build/x64, system/x86, system/imc/x86; * move build64/la64 to build/loongarch64; * rename system/imc/loongson to system/img/loongarch.
This commit is contained in:
parent
9053696e12
commit
3fafea11e3
12
.github/workflows/Linux.yml
vendored
12
.github/workflows/Linux.yml
vendored
@ -45,11 +45,11 @@ jobs:
|
||||
working-directory: ./
|
||||
run: |
|
||||
if [ ${{ matrix.arch }} == 'i386' ]; then
|
||||
cd build32
|
||||
cd build/ia32
|
||||
elif [ ${{ matrix.arch }} == 'x86_64' ]; then
|
||||
cd build64
|
||||
cd build/x64
|
||||
elif [ ${{ matrix.arch }} == 'la64' ]; then
|
||||
cd build64/la64
|
||||
cd build/loongarch64
|
||||
fi
|
||||
make clean
|
||||
|
||||
@ -57,11 +57,11 @@ jobs:
|
||||
working-directory: ./
|
||||
run: |
|
||||
if [ ${{ matrix.arch }} == 'i386' ]; then
|
||||
cd build32
|
||||
cd build/ia32
|
||||
elif [ ${{ matrix.arch }} == 'x86_64' ]; then
|
||||
cd build64
|
||||
cd build/x64
|
||||
elif [ ${{ matrix.arch }} == 'la64' ]; then
|
||||
export PATH=/opt/LoongArch_Toolchains/cross-tools/bin/:$PATH
|
||||
cd build64/la64
|
||||
cd build/loongarch64
|
||||
fi
|
||||
make -j 2 CC="${{matrix.compiler}}" iso
|
||||
|
@ -25,38 +25,38 @@ else
|
||||
MS_LDS=ldscripts/memtest_shared.lds
|
||||
endif
|
||||
|
||||
INC_DIRS = -I../boot -I../system -I../lib -I../tests -I../app -Iapp
|
||||
INC_DIRS = -I../../boot -I../../system -I../../system/imc -I../../system/x86 -I../../lib -I../../tests -I../../app -Iapp
|
||||
|
||||
SYS_OBJS = system/acpi.o \
|
||||
system/cpuid.o \
|
||||
system/cpuinfo.o \
|
||||
system/cpulocal.o \
|
||||
system/ehci.o \
|
||||
system/font.o \
|
||||
system/heap.o \
|
||||
system/hwctrl.o \
|
||||
system/hwquirks.o \
|
||||
system/keyboard.o \
|
||||
system/ohci.o \
|
||||
system/memctrl.o \
|
||||
system/pci.o \
|
||||
system/pmem.o \
|
||||
system/reloc.o \
|
||||
system/screen.o \
|
||||
system/serial.o \
|
||||
system/smbios.o \
|
||||
system/i2c_x86.o \
|
||||
system/spd.o \
|
||||
system/smp.o \
|
||||
system/temperature.o \
|
||||
system/timers.o \
|
||||
system/uhci.o \
|
||||
system/usbhcd.o \
|
||||
system/vmem.o \
|
||||
system/xhci.o
|
||||
system/xhci.o \
|
||||
system/x86/cpuid.o \
|
||||
system/x86/cpuinfo.o \
|
||||
system/x86/hwctrl.o \
|
||||
system/x86/i2c.o \
|
||||
system/x86/memctrl.o \
|
||||
system/x86/temperature.o \
|
||||
system/x86/vmem.o
|
||||
|
||||
IMC_SRCS = $(wildcard ../system/imc/*.c)
|
||||
IMC_OBJS = $(subst ../,,$(IMC_SRCS:.c=.o))
|
||||
IMC_SRCS = $(wildcard ../../system/imc/x86/*.c)
|
||||
IMC_OBJS = $(subst ../../,,$(IMC_SRCS:.c=.o))
|
||||
|
||||
LIB_OBJS = lib/barrier.o \
|
||||
lib/div64.o \
|
||||
@ -80,10 +80,10 @@ APP_OBJS = app/badram.o \
|
||||
app/config.o \
|
||||
app/display.o \
|
||||
app/error.o \
|
||||
app/interrupt.o \
|
||||
app/main.o
|
||||
app/main.o \
|
||||
app/x86/interrupt.o
|
||||
|
||||
OBJS = boot/startup.o boot/efisetup.o $(SYS_OBJS) $(IMC_OBJS) $(LIB_OBJS) $(TST_OBJS) $(APP_OBJS)
|
||||
OBJS = boot/x86/startup.o boot/efisetup.o $(SYS_OBJS) $(IMC_OBJS) $(LIB_OBJS) $(TST_OBJS) $(APP_OBJS)
|
||||
|
||||
all: mt86plus
|
||||
|
||||
@ -102,49 +102,57 @@ debug: check memtest.debug mt86plus
|
||||
-include $(subst .o,.d,$(TST_OBJS))
|
||||
-include $(subst .o,.d,$(APP_OBJS))
|
||||
|
||||
boot/header.o : | ../boot/sbat.csv
|
||||
boot/x86/header.o : | ../../boot/sbat.csv
|
||||
|
||||
boot/startup.o: ../boot/startup32.S ../boot/boot.h
|
||||
boot/x86/startup.o: ../../boot/x86/startup32.S ../../boot/boot.h
|
||||
@mkdir -p boot/x86
|
||||
$(CC) -m32 -x assembler-with-cpp -c -I../../boot -o $@ $<
|
||||
|
||||
boot/%.o: ../../boot/%.S ../../boot/boot.h app/build_version.h
|
||||
@mkdir -p boot
|
||||
$(CC) -m32 -x assembler-with-cpp -c -I../boot -o $@ $<
|
||||
$(CC) -m32 -x assembler-with-cpp -c -I../../boot -Iapp -o $@ $<
|
||||
|
||||
boot/%.o: ../boot/%.S ../boot/boot.h app/build_version.h
|
||||
@mkdir -p boot
|
||||
$(CC) -m32 -x assembler-with-cpp -c -I../boot -Iapp -o $@ $<
|
||||
|
||||
boot/efisetup.o: ../boot/efisetup.c
|
||||
boot/efisetup.o: ../../boot/efisetup.c
|
||||
@mkdir -p boot
|
||||
$(CC) -c $(CFLAGS) $(OPT_SMALL) $(INC_DIRS) -o $@ $< -MMD -MP -MT $@ -MF $(@:.o=.d)
|
||||
|
||||
system/reloc.o: ../system/reloc32.c
|
||||
system/reloc.o: ../../system/reloc32.c
|
||||
@mkdir -p system
|
||||
$(CC) -c $(CFLAGS) -fno-strict-aliasing $(OPT_SMALL) $(INC_DIRS) -o $@ $< -MMD -MP -MT $@ -MF $(@:.o=.d)
|
||||
|
||||
system/%.o: ../system/%.c
|
||||
system/%.o: ../../system/%.c
|
||||
@mkdir -p system
|
||||
$(CC) -c $(CFLAGS) $(OPT_SMALL) $(INC_DIRS) -o $@ $< -MMD -MP -MT $@ -MF $(@:.o=.d)
|
||||
|
||||
system/imc/%.o: ../system/imc/%.c
|
||||
@mkdir -p system/imc
|
||||
system/imc/x86/%.o: ../../system/imc/x86/%.c
|
||||
@mkdir -p system/imc/x86
|
||||
$(CC) -c $(CFLAGS) $(OPT_SMALL) $(INC_DIRS) -o $@ $< -MMD -MP -MT $@ -MF $(@:.o=.d)
|
||||
|
||||
lib/%.o: ../lib/%.c
|
||||
system/x86/%.o: ../../system/x86/%.c
|
||||
@mkdir -p system/x86
|
||||
$(CC) -c $(CFLAGS) $(OPT_SMALL) $(INC_DIRS) -o $@ $< -MMD -MP -MT $@ -MF $(@:.o=.d)
|
||||
|
||||
lib/%.o: ../../lib/%.c
|
||||
@mkdir -p lib
|
||||
$(CC) -c $(CFLAGS) $(OPT_SMALL) $(INC_DIRS) -o $@ $< -MMD -MP -MT $@ -MF $(@:.o=.d)
|
||||
|
||||
tests/%.o: ../tests/%.c
|
||||
tests/%.o: ../../tests/%.c
|
||||
@mkdir -p tests
|
||||
$(CC) -c $(CFLAGS) $(OPT_FAST) $(INC_DIRS) -o $@ $< -MMD -MP -MT $@ -MF $(@:.o=.d)
|
||||
|
||||
app/%.o: ../app/%.c app/build_version.h
|
||||
app/%.o: ../../app/%.c app/build_version.h
|
||||
@mkdir -p app
|
||||
$(CC) -c $(CFLAGS) $(OPT_SMALL) $(INC_DIRS) -o $@ $< -MMD -MP -MT $@ -MF $(@:.o=.d)
|
||||
|
||||
app/x86/%.o: ../../app/x86/%.c app/build_version.h
|
||||
@mkdir -p app/x86
|
||||
$(CC) -c $(CFLAGS) $(OPT_SMALL) $(INC_DIRS) -o $@ $< -MMD -MP -MT $@ -MF $(@:.o=.d)
|
||||
|
||||
app/build_version.h: FORCE
|
||||
@mkdir -p app
|
||||
@( \
|
||||
cp -f ../app/version.h $@.tmp; \
|
||||
if $(GIT_AVAILABLE) && test -d ../.git ; then \
|
||||
cp -f ../../app/version.h $@.tmp; \
|
||||
if $(GIT_AVAILABLE) && test -d ../../.git ; then \
|
||||
hash=`git rev-parse HEAD | cut -c1-7`; \
|
||||
sed -i 's/GIT_HASH\s\".*"/GIT_HASH "'$$hash'"/' $@.tmp; \
|
||||
else \
|
||||
@ -171,12 +179,12 @@ memtest.debug: memtest_shared
|
||||
strip -R .eh_frame memtest_shared
|
||||
strip -R .comment memtest_shared
|
||||
|
||||
mt86plus: memtest_shared.bin boot/header.o ldscripts/memtest_efi.lds
|
||||
mt86plus: memtest_shared.bin boot/x86/header.o ldscripts/memtest_efi.lds
|
||||
$(eval SIZES=$(shell size -B -d memtest_shared | grep memtest_shared))
|
||||
$(LD) --defsym=_bss_size=$(word 3,$(SIZES)) -T ldscripts/memtest_efi.lds boot/header.o -b binary memtest_shared.bin -o mt86plus
|
||||
$(LD) --defsym=_bss_size=$(word 3,$(SIZES)) -T ldscripts/memtest_efi.lds boot/x86/header.o -b binary memtest_shared.bin -o mt86plus
|
||||
|
||||
memtest.mbr: memtest_shared.bin boot/mbr.o ldscripts/memtest_mbr.lds
|
||||
$(LD) -T ldscripts/memtest_mbr.lds boot/mbr.o -b binary memtest_shared.bin -o memtest.mbr
|
||||
memtest.mbr: memtest_shared.bin boot/x86/mbr.o ldscripts/memtest_mbr.lds
|
||||
$(LD) -T ldscripts/memtest_mbr.lds boot/x86/mbr.o -b binary memtest_shared.bin -o memtest.mbr
|
||||
|
||||
floppy.img: mt86plus
|
||||
dd if=/dev/zero of=floppy.img bs=1474560 count=1
|
||||
@ -235,22 +243,22 @@ grub-eltorito.img:
|
||||
grub-bootia32.efi:
|
||||
$(GRUB_MKIMAGE) --output $@ --prefix /EFI/BOOT/grub --format i386-efi $(GRUB_MODULES)
|
||||
|
||||
grub-esp.img: mt86plus grub-bootia32.efi ../grub/${GRUB_CFG}-efi.cfg
|
||||
grub-esp.img: mt86plus grub-bootia32.efi ../../grub/${GRUB_CFG}-efi.cfg
|
||||
@mkdir -p grub-iso/EFI/BOOT/grub/i386-efi grub-iso/EFI/BOOT/grub/fonts
|
||||
cp mt86plus grub-iso/EFI/BOOT/memtest
|
||||
cp grub-bootia32.efi grub-iso/EFI/BOOT/bootia32.efi
|
||||
cp ../grub/${GRUB_CFG}-efi.cfg grub-iso/EFI/BOOT/grub/grub.cfg
|
||||
cp ../../grub/${GRUB_CFG}-efi.cfg grub-iso/EFI/BOOT/grub/grub.cfg
|
||||
cp $(GRUB_FONT_DIR)/unicode.pf2 grub-iso/EFI/BOOT/grub/fonts/
|
||||
cp $(GRUB_LIB_DIR)/i386-efi/*.mod grub-iso/EFI/BOOT/grub/i386-efi/
|
||||
@rm -f grub-esp.img
|
||||
/sbin/mkdosfs -n MT86P_ESP -F12 -C grub-esp.img 8192
|
||||
mcopy -s -i grub-esp.img grub-iso/EFI ::
|
||||
|
||||
grub-memtest.iso: mt86plus grub-eltorito.img ../grub/${GRUB_CFG}-legacy.cfg grub-esp.img
|
||||
grub-memtest.iso: mt86plus grub-eltorito.img ../../grub/${GRUB_CFG}-legacy.cfg grub-esp.img
|
||||
@mkdir -p grub-iso/boot/grub/i386-pc grub-iso/boot/grub/fonts
|
||||
cp mt86plus grub-iso/boot/memtest
|
||||
cp grub-eltorito.img grub-iso/boot/eltorito.img
|
||||
cp ../grub/${GRUB_CFG}-legacy.cfg grub-iso/boot/grub/grub.cfg
|
||||
cp ../../grub/${GRUB_CFG}-legacy.cfg grub-iso/boot/grub/grub.cfg
|
||||
cp $(GRUB_FONT_DIR)/unicode.pf2 grub-iso/boot/grub/fonts/
|
||||
cp $(GRUB_LIB_DIR)/i386-pc/*.mod grub-iso/boot/grub/i386-pc/
|
||||
xorrisofs -pad -R -J -volid MT86PLUS_32 -graft-points -hide-rr-moved \
|
@ -24,7 +24,7 @@ else
|
||||
MS_LDS=ldscripts/memtest_shared.lds
|
||||
endif
|
||||
|
||||
INC_DIRS = -I../../boot -I../../system -I../../system/loongarch -I../../lib -I../../tests -I../../app -Iapp
|
||||
INC_DIRS = -I../../boot -I../../system -I ../../system/imc -I../../system/loongarch -I../../lib -I../../tests -I../../app -Iapp
|
||||
|
||||
SYS_OBJS = system/acpi.o \
|
||||
system/cpulocal.o \
|
||||
@ -54,7 +54,7 @@ SYS_OBJS = system/acpi.o \
|
||||
system/loongarch/temperature.o \
|
||||
system/loongarch/vmem.o
|
||||
|
||||
IMC_SRCS = $(wildcard ../../system/imc/loongson/*.c)
|
||||
IMC_SRCS = $(wildcard ../../system/imc/loongarch/*.c)
|
||||
IMC_OBJS = $(subst ../../,,$(IMC_SRCS:.c=.o))
|
||||
|
||||
LIB_OBJS = lib/barrier.o \
|
||||
@ -130,8 +130,8 @@ system/loongarch/%.o: ../../system/loongarch/%.c
|
||||
@mkdir -p system/loongarch/
|
||||
$(CC) -c $(CFLAGS) $(OPT_SMALL) $(INC_DIRS) -o $@ $< -MMD -MP -MT $@ -MF $(@:.o=.d)
|
||||
|
||||
system/imc/loongson/%.o: ../../system/imc/loongson/%.c
|
||||
@mkdir -p system/imc/loongson/
|
||||
system/imc/loongarch/%.o: ../../system/imc/loongarch/%.c
|
||||
@mkdir -p system/imc/loongarch/
|
||||
$(CC) -c $(CFLAGS) $(OPT_SMALL) $(INC_DIRS) -o $@ $< -MMD -MP -MT $@ -MF $(@:.o=.d)
|
||||
|
||||
lib/%.o: ../../lib/%.c
|
@ -25,38 +25,38 @@ else
|
||||
MS_LDS=ldscripts/memtest_shared.lds
|
||||
endif
|
||||
|
||||
INC_DIRS = -I../boot -I../system -I../lib -I../tests -I../app -Iapp
|
||||
INC_DIRS = -I../../boot -I../../system -I../../system/imc -I../../system/x86 -I../../lib -I../../tests -I../../app -Iapp
|
||||
|
||||
SYS_OBJS = system/acpi.o \
|
||||
system/cpuid.o \
|
||||
system/cpuinfo.o \
|
||||
system/cpulocal.o \
|
||||
system/ehci.o \
|
||||
system/font.o \
|
||||
system/heap.o \
|
||||
system/hwctrl.o \
|
||||
system/hwquirks.o \
|
||||
system/keyboard.o \
|
||||
system/ohci.o \
|
||||
system/memctrl.o \
|
||||
system/pci.o \
|
||||
system/pmem.o \
|
||||
system/reloc.o \
|
||||
system/screen.o \
|
||||
system/serial.o \
|
||||
system/smbios.o \
|
||||
system/i2c_x86.o \
|
||||
system/spd.o \
|
||||
system/smp.o \
|
||||
system/temperature.o \
|
||||
system/timers.o \
|
||||
system/uhci.o \
|
||||
system/usbhcd.o \
|
||||
system/vmem.o \
|
||||
system/xhci.o
|
||||
system/xhci.o \
|
||||
system/x86/cpuid.o \
|
||||
system/x86/cpuinfo.o \
|
||||
system/x86/hwctrl.o \
|
||||
system/x86/i2c.o \
|
||||
system/x86/memctrl.o \
|
||||
system/x86/temperature.o \
|
||||
system/x86/vmem.o
|
||||
|
||||
IMC_SRCS = $(wildcard ../system/imc/*.c)
|
||||
IMC_OBJS = $(subst ../,,$(IMC_SRCS:.c=.o))
|
||||
IMC_SRCS = $(wildcard ../../system/imc/x86/*.c)
|
||||
IMC_OBJS = $(subst ../../,,$(IMC_SRCS:.c=.o))
|
||||
|
||||
LIB_OBJS = lib/barrier.o \
|
||||
lib/print.o \
|
||||
@ -79,10 +79,10 @@ APP_OBJS = app/badram.o \
|
||||
app/config.o \
|
||||
app/display.o \
|
||||
app/error.o \
|
||||
app/interrupt.o \
|
||||
app/main.o
|
||||
app/main.o \
|
||||
app/x86/interrupt.o
|
||||
|
||||
OBJS = boot/startup.o boot/efisetup.o $(SYS_OBJS) $(IMC_OBJS) $(LIB_OBJS) $(TST_OBJS) $(APP_OBJS)
|
||||
OBJS = boot/x86/startup.o boot/efisetup.o $(SYS_OBJS) $(IMC_OBJS) $(LIB_OBJS) $(TST_OBJS) $(APP_OBJS)
|
||||
|
||||
all: mt86plus
|
||||
|
||||
@ -101,49 +101,57 @@ debug: check memtest.debug mt86plus
|
||||
-include $(subst .o,.d,$(TST_OBJS))
|
||||
-include $(subst .o,.d,$(APP_OBJS))
|
||||
|
||||
boot/header.o : | ../boot/sbat.csv
|
||||
boot/x86/header.o : | ../../boot/sbat.csv
|
||||
|
||||
boot/startup.o: ../boot/startup64.S ../boot/boot.h
|
||||
boot/x86/startup.o: ../../boot/x86/startup64.S ../../boot/boot.h
|
||||
@mkdir -p boot/x86
|
||||
$(CC) -m64 -x assembler-with-cpp -c -I../../boot -o $@ $<
|
||||
|
||||
boot/%.o: ../../boot/%.S ../../boot/boot.h app/build_version.h
|
||||
@mkdir -p boot
|
||||
$(CC) -m64 -x assembler-with-cpp -c -I../boot -o $@ $<
|
||||
$(CC) -m64 -x assembler-with-cpp -c -I../../boot -Iapp -o $@ $<
|
||||
|
||||
boot/%.o: ../boot/%.S ../boot/boot.h app/build_version.h
|
||||
@mkdir -p boot
|
||||
$(CC) -m64 -x assembler-with-cpp -c -I../boot -Iapp -o $@ $<
|
||||
|
||||
boot/efisetup.o: ../boot/efisetup.c
|
||||
boot/efisetup.o: ../../boot/efisetup.c
|
||||
@mkdir -p boot
|
||||
$(CC) -c $(CFLAGS) $(OPT_SMALL) $(INC_DIRS) -o $@ $< -MMD -MP -MT $@ -MF $(@:.o=.d)
|
||||
|
||||
system/reloc.o: ../system/reloc64.c
|
||||
system/reloc.o: ../../system/reloc64.c
|
||||
@mkdir -p system
|
||||
$(CC) -c $(CFLAGS) -fno-strict-aliasing $(OPT_SMALL) $(INC_DIRS) -o $@ $< -MMD -MP -MT $@ -MF $(@:.o=.d)
|
||||
|
||||
system/%.o: ../system/%.c
|
||||
system/%.o: ../../system/%.c
|
||||
@mkdir -p system
|
||||
$(CC) -c $(CFLAGS) $(OPT_SMALL) $(INC_DIRS) -o $@ $< -MMD -MP -MT $@ -MF $(@:.o=.d)
|
||||
|
||||
system/imc/%.o: ../system/imc/%.c
|
||||
@mkdir -p system/imc
|
||||
system/imc/x86/%.o: ../../system/imc/x86/%.c
|
||||
@mkdir -p system/imc/x86
|
||||
$(CC) -c $(CFLAGS) $(OPT_SMALL) $(INC_DIRS) -o $@ $< -MMD -MP -MT $@ -MF $(@:.o=.d)
|
||||
|
||||
lib/%.o: ../lib/%.c
|
||||
system/x86/%.o: ../../system/x86/%.c
|
||||
@mkdir -p system/x86
|
||||
$(CC) -c $(CFLAGS) $(OPT_SMALL) $(INC_DIRS) -o $@ $< -MMD -MP -MT $@ -MF $(@:.o=.d)
|
||||
|
||||
lib/%.o: ../../lib/%.c
|
||||
@mkdir -p lib
|
||||
$(CC) -c $(CFLAGS) $(OPT_SMALL) $(INC_DIRS) -o $@ $< -MMD -MP -MT $@ -MF $(@:.o=.d)
|
||||
|
||||
tests/%.o: ../tests/%.c
|
||||
tests/%.o: ../../tests/%.c
|
||||
@mkdir -p tests
|
||||
$(CC) -c $(CFLAGS) $(OPT_FAST) $(INC_DIRS) -o $@ $< -MMD -MP -MT $@ -MF $(@:.o=.d)
|
||||
|
||||
app/%.o: ../app/%.c app/build_version.h
|
||||
app/%.o: ../../app/%.c app/build_version.h
|
||||
@mkdir -p app
|
||||
$(CC) -c $(CFLAGS) $(OPT_SMALL) $(INC_DIRS) -o $@ $< -MMD -MP -MT $@ -MF $(@:.o=.d)
|
||||
|
||||
app/x86/%.o: ../../app/x86/%.c app/build_version.h
|
||||
@mkdir -p app/x86
|
||||
$(CC) -c $(CFLAGS) $(OPT_SMALL) $(INC_DIRS) -o $@ $< -MMD -MP -MT $@ -MF $(@:.o=.d)
|
||||
|
||||
app/build_version.h: FORCE
|
||||
@mkdir -p app
|
||||
@( \
|
||||
cp -f ../app/version.h $@.tmp; \
|
||||
if $(GIT_AVAILABLE) && test -d ../.git ; then \
|
||||
cp -f ../../app/version.h $@.tmp; \
|
||||
if $(GIT_AVAILABLE) && test -d ../../.git ; then \
|
||||
hash=`git rev-parse HEAD | cut -c1-7`; \
|
||||
sed -i 's/GIT_HASH\s\".*"/GIT_HASH "'$$hash'"/' $@.tmp; \
|
||||
else \
|
||||
@ -170,12 +178,12 @@ memtest.debug: memtest_shared
|
||||
strip -R .eh_frame memtest_shared
|
||||
strip -R .comment memtest_shared
|
||||
|
||||
mt86plus: memtest_shared.bin boot/header.o ldscripts/memtest_efi.lds
|
||||
mt86plus: memtest_shared.bin boot/x86/header.o ldscripts/memtest_efi.lds
|
||||
$(eval SIZES=$(shell size -B -d memtest_shared | grep memtest_shared))
|
||||
$(LD) --defsym=_bss_size=$(word 3,$(SIZES)) -T ldscripts/memtest_efi.lds boot/header.o -b binary memtest_shared.bin -o mt86plus
|
||||
$(LD) --defsym=_bss_size=$(word 3,$(SIZES)) -T ldscripts/memtest_efi.lds boot/x86/header.o -b binary memtest_shared.bin -o mt86plus
|
||||
|
||||
memtest.mbr: memtest_shared.bin boot/mbr.o ldscripts/memtest_mbr.lds
|
||||
$(LD) -T ldscripts/memtest_mbr.lds boot/mbr.o -b binary memtest_shared.bin -o memtest.mbr
|
||||
memtest.mbr: memtest_shared.bin boot/x86/mbr.o ldscripts/memtest_mbr.lds
|
||||
$(LD) -T ldscripts/memtest_mbr.lds boot/x86/mbr.o -b binary memtest_shared.bin -o memtest.mbr
|
||||
|
||||
floppy.img: mt86plus
|
||||
dd if=/dev/zero of=floppy.img bs=1474560 count=1
|
||||
@ -234,22 +242,22 @@ grub-eltorito.img:
|
||||
grub-bootx64.efi:
|
||||
$(GRUB_MKIMAGE) --output $@ --prefix /EFI/BOOT/grub --format x86_64-efi $(GRUB_MODULES)
|
||||
|
||||
grub-esp.img: mt86plus grub-bootx64.efi ../grub/${GRUB_CFG}-efi.cfg
|
||||
grub-esp.img: mt86plus grub-bootx64.efi ../../grub/${GRUB_CFG}-efi.cfg
|
||||
@mkdir -p grub-iso/EFI/BOOT/grub/x86_64-efi grub-iso/EFI/BOOT/grub/fonts
|
||||
cp mt86plus grub-iso/EFI/BOOT/memtest
|
||||
cp grub-bootx64.efi grub-iso/EFI/BOOT/bootx64.efi
|
||||
cp ../grub/${GRUB_CFG}-efi.cfg grub-iso/EFI/BOOT/grub/grub.cfg
|
||||
cp ../../grub/${GRUB_CFG}-efi.cfg grub-iso/EFI/BOOT/grub/grub.cfg
|
||||
cp $(GRUB_FONT_DIR)/unicode.pf2 grub-iso/EFI/BOOT/grub/fonts/
|
||||
cp $(GRUB_LIB_DIR)/x86_64-efi/*.mod grub-iso/EFI/BOOT/grub/x86_64-efi/
|
||||
@rm -f grub-esp.img
|
||||
/sbin/mkdosfs -n MT86P_ESP -F12 -C grub-esp.img 8192
|
||||
mcopy -s -i grub-esp.img grub-iso/EFI ::
|
||||
|
||||
grub-memtest.iso: mt86plus grub-eltorito.img ../grub/${GRUB_CFG}-legacy.cfg grub-esp.img
|
||||
grub-memtest.iso: mt86plus grub-eltorito.img ../../grub/${GRUB_CFG}-legacy.cfg grub-esp.img
|
||||
@mkdir -p grub-iso/boot/grub/i386-pc grub-iso/boot/grub/fonts
|
||||
cp mt86plus grub-iso/boot/memtest
|
||||
cp grub-eltorito.img grub-iso/boot/eltorito.img
|
||||
cp ../grub/${GRUB_CFG}-legacy.cfg grub-iso/boot/grub/grub.cfg
|
||||
cp ../../grub/${GRUB_CFG}-legacy.cfg grub-iso/boot/grub/grub.cfg
|
||||
cp $(GRUB_FONT_DIR)/unicode.pf2 grub-iso/boot/grub/fonts/
|
||||
cp $(GRUB_LIB_DIR)/i386-pc/*.mod grub-iso/boot/grub/i386-pc/
|
||||
xorrisofs -pad -R -J -volid MT86PLUS_64 -graft-points -hide-rr-moved \
|
@ -1,22 +0,0 @@
|
||||
OUTPUT_FORMAT("binary")
|
||||
OUTPUT_ARCH("i386")
|
||||
|
||||
ENTRY(boot);
|
||||
SECTIONS {
|
||||
. = 0;
|
||||
.bootsect : {
|
||||
*(.bootsect)
|
||||
}
|
||||
.setup : {
|
||||
*(.setup)
|
||||
}
|
||||
.memtest : {
|
||||
_start = . ;
|
||||
*(.data)
|
||||
_end = . ;
|
||||
}
|
||||
/DISCARD/ : { *(*) }
|
||||
|
||||
_sys_size = (_end - _start + 15) >> 4;
|
||||
_init_size = (_end - _start) + _bss_size;
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
OUTPUT_FORMAT("binary")
|
||||
OUTPUT_ARCH(i386:x86-64)
|
||||
|
||||
ENTRY(boot);
|
||||
SECTIONS {
|
||||
. = 0;
|
||||
.bootsect : {
|
||||
*(.bootsect)
|
||||
}
|
||||
.setup : {
|
||||
*(.setup)
|
||||
}
|
||||
.memtest : {
|
||||
_start = . ;
|
||||
*(.data)
|
||||
_end = . ;
|
||||
}
|
||||
/DISCARD/ : { *(*) }
|
||||
|
||||
_sys_size = (_end - _start + 15) >> 4;
|
||||
_init_size = (_end - _start) + _bss_size;
|
||||
}
|
Loading…
Reference in New Issue
Block a user