imx233-build.sh 1.0 KB

1234567891011121314151617181920212223242526
  1. #!/bin/sh
  2. NEWLIB="/usr/lib/arm-none-eabi/newlib"
  3. set -e
  4. GCC_OPTS=" -g -O2 -nostartfiles -nostdlib -msoft-float -ffreestanding -fno-toplevel-reorder -march=armv5 -std=gnu11 -L$NEWLIB -I/usr/include/newlib -I./sledge -I. -DCPU_ARM "
  5. # -Wcast-align
  6. COMPILE="arm-none-eabi-gcc $GCC_OPTS -I."
  7. mkdir -p obj
  8. $COMPILE -c -o obj/reader.o sledge/reader.c
  9. $COMPILE -c -o obj/strmap.o sledge/strmap.c
  10. $COMPILE -c -o obj/alloc.o sledge/alloc.c
  11. $COMPILE -c -o obj/writer.o sledge/writer.c
  12. $COMPILE -c -o obj/stream.o sledge/stream.c
  13. $COMPILE -c -o obj/debug_util.o os/debug_util.c
  14. #arm-none-eabi-objcopy -I binary -O elf32-littlearm -B arm bjos/rootfs/unifont obj/unifont.o
  15. #arm-none-eabi-objcopy -I binary -O elf32-littlearm -B arm bjos/rootfs/editor.l obj/editor.o
  16. $COMPILE -o build/interim-arm5.elf devices/imx233/arm_start.S devices/imx233/main_imx233.c devices/imx233/imx233.c -T devices/imx233/arm.ld obj/reader.o obj/strmap.o obj/alloc.o obj/writer.o obj/stream.o obj/debug_util.o -lc -lgcc -lm
  17. arm-none-eabi-objcopy build/interim-arm5.elf -O binary build/interim.imx