50 lines
1.2 KiB
Plaintext
50 lines
1.2 KiB
Plaintext
include_rules
|
|
export SYSLINUX
|
|
|
|
: config |> \
|
|
echo %f | awk -f a.awk >> %o; \
|
|
echo %f | awk -f b.awk >> %o; \
|
|
echo %f | awk -f c.awk >> %o; \
|
|
|> modules.s
|
|
|
|
: modules.s |> $(CC) $(CC_MARCH) -c %f -o %o |> boot_modules.o
|
|
|
|
LINK_ADDRESS = 0x01000000
|
|
|
|
: boot_modules.o | \
|
|
$(GENODE_DIR)/repos/base-nova/<core> \
|
|
|> \
|
|
$(CXX) $(CC_MARCH) -nostdlib \
|
|
-Wl,-T -Wl,$(GENODE_DIR)/repos/base/src/ld/genode.ld \
|
|
-Wl,-z -Wl,max-page-size=0x1000 \
|
|
-Wl,-Ttext=$(LINK_ADDRESS) -Wl,-gc-sections \
|
|
-Wl,-nostdlib \
|
|
-Wl,--whole-archive -Wl,--start-group \
|
|
%<core> %f \
|
|
-Wl,--no-whole-archive \
|
|
-Wl,--end-group \
|
|
`$(CXX) $(CC_MARCH) -print-libgcc-file-name` \
|
|
-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
|