1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2024-11-01 10:22:48 +02:00

add-dfu-image-generation.patch

Integrate udfu image generation to ease testing with GTA02 NOR

Signed-off-by: Andy Green <andy@openmoko.com>
This commit is contained in:
Andy Green 2008-08-13 00:34:06 +01:00
parent a2dfa2c956
commit 8783cd9896
2 changed files with 17 additions and 6 deletions

View File

@ -31,8 +31,14 @@ C_OBJS = $(patsubst %.c,%.o, $(C_SRCS))
SRCS = ${S_SRCS} ${C_SRCS} SRCS = ${S_SRCS} ${C_SRCS}
OBJS = ${S_OBJS} ${C_OBJS} OBJS = ${S_OBJS} ${C_OBJS}
# GTA02 A5 and A6 U-Boot will eat these for DFU action
UDFU_VID = 0x1d50
UDFU_PID = 0x5119
UDFU_REV = 0x350
TARGET = src/start_kboot_all TARGET = src/start_kboot_all
IMAGE = $(IMAGE_DIR)/start IMAGE = $(IMAGE_DIR)/kboot
UDFU_IMAGE = $(IMAGE_DIR)/kboot.udfu
%.o: %.S %.o: %.S
@$(CC) $(CFLAGS) -o $@ $< @$(CC) $(CFLAGS) -o $@ $<
@ -40,13 +46,15 @@ IMAGE = $(IMAGE_DIR)/start
%.o: %.c %.o: %.c
@$(CC) $(CFLAGS) -o $@ $< @$(CC) $(CFLAGS) -o $@ $<
all:${TARGET} all:${UDFU_IMAGE}
${OBJS}:${SRCS} ${OBJS}:${SRCS}
${TARGET}:${OBJS} ${UDFU_IMAGE}:${OBJS}
$(LD) ${LDFLAGS} -T$(LDS) -g $(OBJS) -o ${TARGET} $(LD) ${LDFLAGS} -T$(LDS) -g $(OBJS) -o ${TARGET}
$(OBJCOPY) -O binary -S ${TARGET} ${IMAGE} $(OBJCOPY) -O binary -S ${TARGET} ${IMAGE}
$(MKUDFU) -v ${UDFU_VID} -p ${UDFU_PID} -r ${UDFU_REV} \
-d ${IMAGE} ${UDFU_IMAGE}
$(OBJDUMP) -D ${TARGET} >${IMAGE}.dis $(OBJDUMP) -D ${TARGET} >${IMAGE}.dis
blink_led:src/led_on.S blink_led:src/led_on.S
@ -55,4 +63,4 @@ blink_led:src/led_on.S
$(OBJCOPY) -O binary -S led_on_temp.o $(IMAGE)/led_on $(OBJCOPY) -O binary -S led_on_temp.o $(IMAGE)/led_on
clean: clean:
rm -f src/*.o src/*~ include/*~ ${IMAGE}* ${TARGET} rm -f src/*.o src/*~ include/*~ ${IMAGE}* ${TARGET} ${UDFU_IMAGE}

View File

@ -2,7 +2,7 @@
# Include the make variables (CC, etc...) # Include the make variables (CC, etc...)
# #
#CROSS_COMPILE=arm-softfloat-linux-gnu- #CROSS_COMPILE=arm-softfloat-linux-gnu-
CROSS_COMPILE=arm-angstrom-linux-gnueabi- CROSS_COMPILE=/usr/local/openmoko/arm/bin/arm-angstrom-linux-gnueabi-
AS = $(CROSS_COMPILE)as AS = $(CROSS_COMPILE)as
LD = $(CROSS_COMPILE)ld LD = $(CROSS_COMPILE)ld
@ -10,4 +10,7 @@ CC = $(CROSS_COMPILE)gcc
OBJCOPY = $(CROSS_COMPILE)objcopy OBJCOPY = $(CROSS_COMPILE)objcopy
OBJDUMP = $(CROSS_COMPILE)objdump OBJDUMP = $(CROSS_COMPILE)objdump
export CROSS_COMPILE AD LD CC OBJCOPY OBJDUMP # we need the mkudfu tool from U-Boot build
MKUDFU = ../uboot/u-boot/tools/mkudfu
export CROSS_COMPILE AD LD CC OBJCOPY OBJDUMP MKUDFU