3 include $(SRCDIR)/config/aros.cfg
5 TARGETDIR := $(GENDIR)/$(CURDIR)
6 FILES := boot serialdebug elf support
7 USER_CFLAGS := -ffixed-r8 -Wall $(CFLAGS_NO_BUILTIN)
8 USER_CPPFLAGS := -DUSE_UBOOT
9 OPTIMIZATION_CFLAGS := -O2
12 #MM kernel-efika-arm \
13 #MM boot-script-efika-arm \
14 #MM kernel-image-efika-arm
16 #MM kernel-image-efika-arm: \
17 #MM kernel-package-efika-arm
19 #MM kernel-package-efika-arm: \
24 PKG_LIBS := oop utility
31 %make_package mmake=kernel-package-efika-arm file=$(AROSDIR)/boot/kernel.pkg \
32 libs=$(PKG_LIBS) res=$(PKG_RSRC) devs=$(PKG_DEVS) handlers=$(PKG_HANDLERS) \
33 hidds=$(PKD_HIDDS) classes=$(PKG_CLASSES)
36 boot-script-efika-arm: boot.script
37 mkimage -A arm -O linux -T script -n "AROS boot script" -d $(SRCDIR)/$(CURDIR)/boot.script $(AROSDIR)/boot/boot.scr
39 kernel-image-efika-arm:
40 mkimage -A arm -O linux -T ramdisk -C none -n "AROS rom" -d $(AROSDIR)/boot/kernel.pkg $(AROSDIR)/boot/uInitrd-aros
42 arosboot-efika: $(AROSDIR)/boot/arosboot
44 $(AROSDIR)/boot/arosboot: $(foreach f, $(FILES), $(TARGETDIR)/$(f).o $(TARGETDIR)/$(f).d) $(TARGETDIR)/kernel.bin.o
45 $(KERNEL_LD) -s --entry=bootstrap --script=$(SRCDIR)/$(CURDIR)/ldscript.lds $(foreach f, $(FILES), $(TARGETDIR)/$(f).o) $(TARGETDIR)/kernel.bin.o -L$(AROS_LIB) -lm -larosc.static -lm -laeabi -o $@
46 $(OBJCOPY) -O binary $@ $@.bin
49 mkimage -A arm -O linux -T kernel -C gzip -a 0x91000000 -e 0x91000000 -n "AROS Boot" -d $@.bin $(AROSDIR)/boot/uImage-aros
51 $(TARGETDIR)/kernel.bin.o: $(AROSDIR)/boot/aros-efikamx
52 cp $(AROSDIR)/boot/aros-efikamx $(TARGETDIR)/kernel.bin
53 cd $(TARGETDIR) && $(KERNEL_LD) $(KERNEL_LDFLAGS) -r --format binary --oformat elf32-littlearm kernel.bin -o $@
60 $(TARGETDIR)/%.o : %.c
63 $(TARGETDIR)/%.o : %.S
66 $(TARGETDIR)/%.d : %.c
69 DEPS := $(foreach f, $(FILES), $(TARGETDIR)/$(f).d)