Add boot.c
This commit is contained in:
parent
c95707bef5
commit
114a3c6c75
19
Makefile
19
Makefile
|
|
@ -114,6 +114,25 @@ $(B_DIR)/files/L%P: $(B_DIR)/files/lang/L%P.bin
|
|||
$(B_DIR)/files/L%Z: $(B_DIR)/files/lang/L%.bin
|
||||
tools/rarezip $< > $@
|
||||
|
||||
################################################################################
|
||||
# Boot
|
||||
|
||||
boot: $(B_DIR)/ucode/boot.bin
|
||||
|
||||
$(B_DIR)/boot.o: src/boot.c
|
||||
mkdir -p $(B_DIR)
|
||||
python tools/asmpreproc/asm-processor.py -O2 $< | $(QEMU_IRIX) -silent -L $(IRIX_ROOT) $(IRIX_ROOT)/usr/bin/cc -c $(CFLAGS) tools/asmpreproc/include-stdin.c -o $@ -O2
|
||||
python tools/asmpreproc/asm-processor.py -O2 $< --post-process $@ --assembler "$(TOOLCHAIN)-as -march=vr4300 -mabi=32" --asm-prelude tools/asmpreproc/prelude.s
|
||||
|
||||
$(B_DIR)/boot.elf: $(B_DIR)/boot.o $(B_DIR)/library.o
|
||||
$(TOOLCHAIN)-ld -e 0x00003050 -T ld/boot.ld -o $@
|
||||
|
||||
$(B_DIR)/ucode/boot.bin: $(B_DIR)/boot.elf
|
||||
mkdir -p $(B_DIR)/ucode
|
||||
$(TOOLCHAIN)-objcopy $< $@ -O binary
|
||||
dd if="$@" of="$@.tmp" bs=8272 count=1
|
||||
mv "$@.tmp" "$@"
|
||||
|
||||
################################################################################
|
||||
# Library
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue