imx233-build.sh 1.0 KB

123456789101112131415161718192021222324
  1. #!/bin/sh
  2. set -e
  3. 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 -I./sledge -I. -DCPU_ARM "
  4. # -Wcast-align
  5. COMPILE="arm-none-eabi-gcc $GCC_OPTS -I."
  6. mkdir -p obj
  7. $COMPILE -c -o obj/reader.o sledge/reader.c
  8. $COMPILE -c -o obj/strmap.o sledge/strmap.c
  9. $COMPILE -c -o obj/alloc.o sledge/alloc.c
  10. $COMPILE -c -o obj/writer.o sledge/writer.c
  11. $COMPILE -c -o obj/stream.o sledge/stream.c
  12. $COMPILE -c -o obj/debug_util.o os/debug_util.c
  13. #arm-none-eabi-objcopy -I binary -O elf32-littlearm -B arm bjos/rootfs/unifont obj/unifont.o
  14. #arm-none-eabi-objcopy -I binary -O elf32-littlearm -B arm bjos/rootfs/editor.l obj/editor.o
  15. $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
  16. arm-none-eabi-objcopy build/interim-arm5.elf -O binary build/interim.imx