forked from KolibriOS/kolibrios
Ivan Baravy
f208e0e454
* Move bios-related part of kernel.asm before B32 label to bootbios.asm file; * Move bx_from_load, boot_dev and kernel_restart_bootblock variables to BOOT_* 0x9000 block; * Update Tupfile.lua, Makefile, build.bat, build.sh accordingly; * Now bios and uefi loaders can jump to very first byte of the kernel. git-svn-id: svn://kolibrios.org@7129 a494cfbc-eb01-0410-851d-a64ba20cac60
48 lines
1.1 KiB
Makefile
48 lines
1.1 KiB
Makefile
FASM=fasm
|
|
FLAGS=-m 65536
|
|
languages=en|ru|ge|et|sp
|
|
|
|
.PHONY: all kernel bootloader clean
|
|
|
|
all: kernel bootloader bootbios
|
|
|
|
kernel: check_lang bootbios
|
|
@echo "*** building kernel with language '$(lang)' ..."
|
|
@mkdir -p bin
|
|
@echo "lang fix $(lang)" > lang.inc
|
|
@echo "--- building 'bin/kernel.mnt' ..."
|
|
@$(FASM) $(FLAGS) kernel.asm bin/kernel.mnt
|
|
@$(FASM) $(FLAGS) -dUEFI=1 kernel.asm bin/kernel.bin
|
|
@rm -f lang.inc
|
|
|
|
bootbios: check_lang
|
|
@echo "*** building bootbios.bin with language '$(lang)' ..."
|
|
@mkdir -p bin
|
|
@echo "lang fix $(lang)" > lang.inc
|
|
@echo "--- building 'bootbios.bin' ..."
|
|
@$(FASM) $(FLAGS) bootbios.asm bootbios.bin
|
|
@rm -f lang.inc
|
|
|
|
bootloader: check_lang
|
|
@echo "*** building bootloader with language '$(lang)' ..."
|
|
@mkdir -p bin
|
|
@echo "lang fix $(lang)" > lang.inc
|
|
@echo "--- building 'bin/boot_fat12.bin' ..."
|
|
@$(FASM) $(FLAGS) bootloader/boot_fat12.asm bin/boot_fat12.bin
|
|
@rm -f lang.inc
|
|
|
|
|
|
check_lang:
|
|
@case "$(lang)" in \
|
|
$(languages)) \
|
|
;; \
|
|
*) \
|
|
echo "*** error: language is incorrect or not specified"; \
|
|
exit 1; \
|
|
;; \
|
|
esac
|
|
|
|
clean:
|
|
rm -rf bin
|
|
rm -f lang.inc
|