1 BOOT_SRCDIR
:= boot
/$(ARCH
)
2 BOOT_TARGETDIR
:= $(call TOBUILDDIR
, boot
)
4 STAGE2
= $(BOOT_TARGETDIR
)/stage2
6 # make a rule for the stage2
7 MY_TARGETDIR
:= $(BOOT_TARGETDIR
)
8 MY_SRCDIR
:= $(BOOT_SRCDIR
)
13 MY_INCLUDES
:= $(STDINCLUDE
)
14 MY_CFLAGS
:= $(KERNEL_CFLAGS
)
16 MY_LIBS
:= $(LIBS_BUILD_DIR
)/libc.a
19 MY_LINKSCRIPT
:= $(MY_SRCDIR
)/stage2.
ld
22 include templates
/app.mk
25 STAGE1
= $(BOOT_TARGETDIR
)/stage1
28 MY_TARGETDIR
:= $(BOOT_TARGETDIR
)
29 MY_SRCDIR
:= $(BOOT_SRCDIR
)
30 MY_TARGET
:= $(STAGE1
).elf
36 MY_INCLUDES
:= $(STDINCLUDE
)
37 MY_CFLAGS
:= $(KERNEL_CFLAGS
)
39 MY_LIBS
:= $(LIBS_BUILD_DIR
)/libc.a
42 MY_LINKSCRIPT
:= $(MY_SRCDIR
)/stage1.
ld
45 include templates
/app.mk
47 BOOTBLOCK
:= $(BOOT_SRCDIR
)/bootblock.bin
48 MAKEFLOP
:= $(BOOT_SRCDIR
)/makeflop
49 CONFIG_FILE
:= $(BOOT_SRCDIR
)/config.ini
51 $(FINAL
): $(STAGE1
) $(STAGE2
) $(ALL
) $(TOOLS
) $(CONFIG_FILE
)
52 $(BOOTMAKER
) --strip-debug
--strip-binary
$(STRIP
) $(CONFIG_FILE
) -o
$(FINAL
).pre
53 gzip
-f
-9 $(FINAL
).pre
54 cat
$(STAGE1
) $(FINAL
).pre.gz
> $(FINAL
)
56 $(STAGE1
): $(STAGE1
).elf
57 $(OBJCOPY
) -O binary
$(STAGE1
).elf
$(STAGE1
)