Commit 71295c2b authored by Henrik Nordstrom's avatar Henrik Nordstrom
Browse files

jtag-loop: Add Makefile recipe

parent be2a89d9
...@@ -8,6 +8,8 @@ TOOLS += nand-part ...@@ -8,6 +8,8 @@ TOOLS += nand-part
MISC_TOOLS = phoenix_info MISC_TOOLS = phoenix_info
CROSS_COMPILE ?= arm-none-eabi-
.PHONY: all clean .PHONY: all clean
all: $(TOOLS) all: $(TOOLS)
...@@ -15,7 +17,7 @@ all: $(TOOLS) ...@@ -15,7 +17,7 @@ all: $(TOOLS)
misc: $(MISC_TOOLS) misc: $(MISC_TOOLS)
clean: clean:
@rm -vf $(TOOLS) $(MISC_TOOLS) *.o *.elf @rm -vf $(TOOLS) $(MISC_TOOLS) *.o *.elf *.sunxi *.bin *.nm *.orig
$(TOOLS): Makefile common.h $(TOOLS): Makefile common.h
...@@ -40,13 +42,22 @@ fel: fel.c ...@@ -40,13 +42,22 @@ fel: fel.c
.dummy: fel-pio.bin .dummy: fel-pio.bin
fel-pio.bin: fel-pio.elf fel-pio.nm fel-pio.bin: fel-pio.elf fel-pio.nm
arm-none-eabi-objcopy -O binary fel-pio.elf fel-pio.bin $(CROSS_COMPILE)objcopy -O binary fel-pio.elf fel-pio.bin
fel-pio.elf: fel-pio.c fel-pio.elf: fel-pio.c fel-pio.lds
arm-none-eabi-gcc -g -Os -fno-common -fno-builtin -ffreestanding -nostdinc -mno-thumb-interwork -Wall -Wstrict-prototypes -fno-stack-protector -Wno-format-nonliteral -Wno-format-security -fno-toplevel-reorder fel-pio.c -nostdlib -o fel-pio.elf -T fel-pio.lds $(CROSS_COMPILE)gcc -g -Os -fpic -fno-common -fno-builtin -ffreestanding -nostdinc -mno-thumb-interwork -Wall -Wstrict-prototypes -fno-stack-protector -Wno-format-nonliteral -Wno-format-security -fno-toplevel-reorder fel-pio.c -nostdlib -o fel-pio.elf -T fel-pio.lds
fel-pio.nm: fel-pio.elf fel-pio.nm: fel-pio.elf
arm-none-eabi-nm fel-pio.elf | grep -v " _" >fel-pio.nm $(CROSS_COMPILE)nm fel-pio.elf | grep -v " _" >fel-pio.nm
jtag-loop.elf: jtag-loop.c jtag-loop.lds
$(CROSS_COMPILE)gcc -g -Os -fpic -fno-common -fno-builtin -ffreestanding -nostdinc -mno-thumb-interwork -Wall -Wstrict-prototypes -fno-stack-protector -Wno-format-nonliteral -Wno-format-security -fno-toplevel-reorder jtag-loop.c -nostdlib -o jtag-loop.elf -T jtag-loop.lds -Wl,-N
jtag-loop.bin: jtag-loop.elf
$(CROSS_COMPILE)objcopy -O binary jtag-loop.elf jtag-loop.bin
jtag-loop.sunxi: jtag-loop.bin
mksunxiboot jtag-loop.bin jtag-loop.sunxi
bootinfo: bootinfo.c bootinfo: bootinfo.c
......
SECTIONS
{
. = 0x0030;
.text : { *(.text) }
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment