3 include $(SRCDIR)/config/aros.cfg
5 TARGETDIR := $(GENDIR)/$(CURDIR)
6 FILES := boot serialdebug elf support
7 USER_CFLAGS := -DUSE_UBOOT -ffixed-r8 -Wall -fno-builtin -O2
10 #MM kernel-efika-arm \
11 #MM boot-script-efika-arm \
12 #MM kernel-image-efika-arm
14 #MM kernel-image-efika-arm: \
15 #MM kernel-package-efika-arm
17 #MM kernel-package-efika-arm: \
22 PKG_LIBS := oop utility
29 %make_package mmake=kernel-package-efika-arm file=$(AROSDIR)/boot/kernel.pkg \
30 libs=$(PKG_LIBS) res=$(PKG_RSRC) devs=$(PKG_DEVS) handlers=$(PKG_HANDLERS) \
31 hidds=$(PKD_HIDDS) classes=$(PKG_CLASSES)
34 boot-script-efika-arm: boot.script
35 mkimage -A arm -O linux -T script -n "AROS boot script" -d $(SRCDIR)/$(CURDIR)/boot.script $(AROSDIR)/boot/boot.scr
37 kernel-image-efika-arm:
38 mkimage -A arm -O linux -T ramdisk -C none -n "AROS rom" -d $(AROSDIR)/boot/kernel.pkg $(AROSDIR)/boot/uInitrd-aros
40 arosboot-efika: $(AROSDIR)/boot/arosboot
42 $(AROSDIR)/boot/arosboot: $(foreach f, $(FILES), $(TARGETDIR)/$(f).o $(TARGETDIR)/$(f).d) $(TARGETDIR)/kernel.bin.o
43 $(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 $@
44 $(OBJCOPY) -O binary $@ $@.bin
47 mkimage -A arm -O linux -T kernel -C gzip -a 0x91000000 -e 0x91000000 -n "AROS Boot" -d $@.bin $(AROSDIR)/boot/uImage-aros
49 $(TARGETDIR)/kernel.bin.o: $(AROSDIR)/boot/aros-efikamx
50 cp $(AROSDIR)/boot/aros-efikamx $(TARGETDIR)/kernel.bin
51 cd $(TARGETDIR) && $(KERNEL_LD) $(KERNEL_LDFLAGS) -r --format binary --oformat elf32-littlearm kernel.bin -o $@
58 $(TARGETDIR)/%.o : %.c
61 $(TARGETDIR)/%.o : %.S
64 $(TARGETDIR)/%.d : %.c
67 DEPS := $(foreach f, $(FILES), $(TARGETDIR)/$(f).d)