-
Notifications
You must be signed in to change notification settings - Fork 0
/
mk1
executable file
·34 lines (19 loc) · 1.02 KB
/
mk1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# create .o files from .bmp image files; to be included as RAW data sections
arm-none-eabi-objcopy -I binary -O elf32-littlearm -B arm panda.bmp panda.o
arm-none-eabi-objcopy -I binary -O elf32-littlearm -B arm porkcar.bmp porkcar.o
# show exported symbols
nm -S -t d panda.o
nm -S -t d porkcar.o
# compile-link
arm-none-eabi-as -mcpu=arm926ej-s -g ts.s -o ts.o
arm-none-eabi-gcc -c -mcpu=arm926ej-s -g t.c -o t.o
arm-none-eabi-gcc -c -mcpu=arm926ej-s -g lan91c111.c -o lan91c111.o
arm-none-eabi-gcc -c -mcpu=arm926ej-s -g tcpip.c -o tcpip.o
arm-none-eabi-gcc -c -mcpu=arm926ej-s -g timer.c -o timer.o
arm-none-eabi-gcc -c -mcpu=arm926ej-s -g interrupts.c -o interrupts.o
arm-none-eabi-ld -T t.ld ts.o t.o lan91c111.o tcpip.o timer.o interrupts.o -o t.elf
arm-none-eabi-objcopy -O binary t.elf t.bin
rm *.o *.elf
echo ready to go?
read dummy
qemu-system-arm -M versatilepb -m 128M -kernel t.bin -net user -net nic,model=smc91c111 -redir tcp:8080::7 -redir tcp:8081::80 -redir udp:8080::7 -net dump,file=qemu.pcap -serial mon:stdio