1
0

arm-build.sh 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/sh
  2. # -mtune=cortex-a7 -mfpu=neon-vfpv4 -ftree-vectorize
  3. set -e
  4. GCC_OPTS=" -g -O2 -nostartfiles -nostdlib -msoft-float -ffreestanding -fno-toplevel-reorder -march=armv5 -std=c11 -L../newlib/arm-none-eabi/lib -I../newlib/arm-none-eabi/include"
  5. # -Wcast-align
  6. COMPILE="arm-none-eabi-gcc $GCC_OPTS -I. -I./lightning/lightning -I./lightning/"
  7. if [ $1 ]
  8. then
  9. mkdir -p obj
  10. $COMPILE -c -o obj/lightning.o lightning/lightning.c
  11. $COMPILE -c -o obj/jit_names.o lightning/jit_names.c
  12. $COMPILE -c -o obj/jit_note.o lightning/jit_note.c
  13. $COMPILE -c -o obj/jit_size.o lightning/jit_size.c
  14. $COMPILE -c -o obj/jit_memory.o lightning/jit_memory.c
  15. $COMPILE -c -o obj/glue.o lightning/glue.c
  16. $COMPILE -c -o obj/reader.o bjos/sledge/reader.c
  17. $COMPILE -c -o obj/strmap.o bjos/sledge/strmap.c
  18. $COMPILE -c -o obj/alloc.o bjos/sledge/alloc.c
  19. $COMPILE -c -o obj/blit.o bjos/sledge/blit.c
  20. $COMPILE -c -o obj/writer.o bjos/sledge/writer.c
  21. fi
  22. arm-none-eabi-objcopy -I binary -O elf32-littlearm -B arm bjos/rootfs/unifont obj/unifont.o
  23. arm-none-eabi-objcopy -I binary -O elf32-littlearm -B arm bjos/rootfs/editor.l obj/editor.o
  24. $COMPILE -o build/bomberjacket-arm.elf bjos/rpi2/arm_start.S bjos/main_imx233.c bjos/imx233/imx233.c -T bjos/arm.ld obj/lightning.o obj/jit_names.o obj/jit_note.o obj/jit_size.o obj/jit_memory.o obj/glue.o obj/reader.o obj/strmap.o obj/alloc.o obj/blit.o obj/writer.o -lc -lgcc -lm obj/editor.o bjos/mini-ip.c
  25. arm-none-eabi-objcopy build/bomberjacket-arm.elf -O binary build/interim.imx