first commit

This commit is contained in:
2024-11-27 17:06:47 +09:00
commit 3f556cba19
23 changed files with 1498 additions and 0 deletions

17
boot/Makefile Normal file
View File

@@ -0,0 +1,17 @@
include ../*.inc
PROG=boot
CSRCS= $(wildcard *.c)
SSRCS= $(wildcard *.S)
OBJS = $(SSRCS:.S=.o) $(CSRCS:.c=.o)
CFLAGS+=-c -fno-pie
CPPFLAGS+=-nostdinc -DLOADADDR=$(LOADADDR) -DLINKADDR=$(LINKADDR) -DBOOTMAGIC=$(BOOTMAGIC)
LDFLAGS+= -s -T ld.script -Ttext=$(LINKADDR) --no-omagic
${PROG}: $(OBJS)
@rm -f $(PROG)
$(LD) $(LDFLAGS) -o $(BDIR)/$(PROG) $(OBJS)
clean:
rm -f $(PROG) $(PROG).bin $(OBJS)