Last change
on this file since 16 was
16,
checked in by guillaume, 16 years ago
|
Publication tt-loader v0.2.2
|
File size:
1.2 KB
|
Rev | Line | |
---|
[11] | 1 | CC = gcc |
---|
| 2 | INCLUDES = |
---|
| 3 | CFLAGS = -Wall -O2 -g $(INCLUDES) |
---|
| 4 | LIBS = -lusb |
---|
| 5 | LDFLAGS = -g $(LIBS) |
---|
| 6 | APP_NAME = tt-loader |
---|
[16] | 7 | APP_VERSION = 0.2.2 |
---|
[11] | 8 | |
---|
| 9 | # Adapt this to your system |
---|
| 10 | CROSS ?= armv5tel-redhat-linux-gnueabi |
---|
| 11 | DIS_ADDR ?= 0 |
---|
| 12 | |
---|
[12] | 13 | # You can overide the name of the extracted MTD partition to get the kernel |
---|
| 14 | KERNEL_MTD ?= mtd4 |
---|
[11] | 15 | |
---|
[12] | 16 | OBJS = main.o crc32.o |
---|
| 17 | |
---|
[11] | 18 | all: $(APP_NAME) |
---|
| 19 | |
---|
| 20 | $(APP_NAME): $(OBJS) |
---|
| 21 | $(CC) $(LDFLAGS) -o $@ $^ |
---|
| 22 | |
---|
| 23 | clean: |
---|
| 24 | rm -rf $(APP_NAME) *.o *~ |
---|
| 25 | $(MAKE) -C 2nd clean |
---|
| 26 | |
---|
| 27 | 2nd: |
---|
| 28 | $(MAKE) -C 2nd all |
---|
| 29 | |
---|
| 30 | pkg: 2nd |
---|
| 31 | rm -f $(APP_NAME)-$(APP_VERSION).tar.gz |
---|
[16] | 32 | mkdir -p $(APP_NAME)-$(APP_VERSION)/2nd |
---|
| 33 | cp -a Makefile *.c COPYING README CMD-SYNTAX start-kernel.txt \ |
---|
| 34 | commands.txt write-splash.txt FlashWriteNAND.txt tt-loader.sh \ |
---|
| 35 | $(APP_NAME)-$(APP_VERSION) |
---|
| 36 | cp -a 2nd/arm.ld 2nd/*.h 2nd/*.c 2nd/Makefile 2nd/start.S 2nd/2nd.bin \ |
---|
| 37 | $(APP_NAME)-$(APP_VERSION)/2nd |
---|
| 38 | tar czf $(APP_NAME)-$(APP_VERSION).tar.gz $(APP_NAME)-$(APP_VERSION) |
---|
| 39 | rm -rf $(APP_NAME)-$(APP_VERSION) |
---|
[11] | 40 | |
---|
| 41 | %.dis: %.bin |
---|
| 42 | rm -f $@ |
---|
| 43 | $(CROSS)-objcopy -I binary -O elf32-littlearm -B arm $< $(@F).elf |
---|
| 44 | $(CROSS)-objdump -D --adjust-vma=$(DIS_ADDR) $(@F).elf > $@ |
---|
| 45 | rm -f $(@F).elf |
---|
| 46 | |
---|
[12] | 47 | # Extract kernel from mtd4 nand partition extraction |
---|
| 48 | kernel.bin: $(KERNEL_MTD) |
---|
| 49 | ./kernel-extract.sh $^ $@ |
---|
| 50 | |
---|
[11] | 51 | .PHONY: all clean 2nd |
---|
Note: See
TracBrowser
for help on using the repository browser.