51 lines
1.1 KiB
Plaintext
51 lines
1.1 KiB
Plaintext
include_rules
|
|
export SYSLINUX
|
|
|
|
|
|
# boot_modules.o {modules}
|
|
|
|
LINK_ADDRESS = 0x01000000
|
|
|
|
# : {modules}
|
|
|
|
: modules.txt |> \
|
|
awk -f a.awk < %f >> %o; \
|
|
awk -f b.awk < %f >> %o; \
|
|
awk -f c.awk < %f >> %o; \
|
|
|> modules.s
|
|
|
|
: | \
|
|
$(GENODE_DIR)/repos/base-nova/<core> \
|
|
$(GENODE_DIR)/repos/base-nova/<ld> \
|
|
|> \
|
|
$(CXX) -nostdlib \
|
|
-Wl,-z -Wl,max-page-size=0x1000 \
|
|
-Wl,-Ttext=$(LINK_ADDRESS) -Wl,-gc-sections \
|
|
-Wl,-nostdlib \
|
|
-Wl,--whole-archive -Wl,--start-group \
|
|
%<core> %<ld> \
|
|
-Wl,--no-whole-archive \
|
|
-Wl,--end-group $libgcc -o %o \
|
|
|> image.elf
|
|
|
|
: image.elf |> gzip --keep %f |> %b.gz
|
|
|
|
: hypervisor image.elf.gz |> \
|
|
mkdir -p tmp/syslinux; \
|
|
cp \
|
|
$SYSLINUX/share/syslinux/isolinux.bin \
|
|
$SYSLINUX/share/syslinux/ldlinux.c32 \
|
|
$SYSLINUX/share/syslinux/libcom32.c32 \
|
|
$SYSLINUX/share/syslinux/mboot.c32 \
|
|
isolinux.cfg \
|
|
tmp/syslinux; \
|
|
cp %f tmp; \
|
|
chmod -R 777 tmp; \
|
|
mkisofs -o %o \
|
|
-b syslinux/isolinux.bin -c syslinux/boot.cat \
|
|
-no-emul-boot -boot-load-size 4 -boot-info-table \
|
|
-iso-level 2 \
|
|
tmp; \
|
|
rm -r tmp; \
|
|
|> output.iso
|