From 28262cce665649c7a48fae6fba409fb4e5032a8d Mon Sep 17 00:00:00 2001 From: xiangfu Date: Fri, 5 Jun 2009 12:08:13 +0000 Subject: [PATCH] add stage1 stage2 makefile correct the struct fw_args_t to fw_args in stage1 --- flash-tool/Makefile | 2 +- flash-tool/device_stage2/usb_boot/main.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flash-tool/Makefile b/flash-tool/Makefile index 922c1cd..106f1e0 100644 --- a/flash-tool/Makefile +++ b/flash-tool/Makefile @@ -42,7 +42,7 @@ SRC_H= ingenic_cfg.h ingenic_usb.h usb_boot_defines.h \ command_line.h cmd.h config.h SRC_O= $(SRC_C:.c=.o) -$(BINARY_NAME): $(SRC_O) $(SRC_H) Makefile +$(BINARY_NAME): $(SRC_O) $(SRC_H) Makefile stage1 stage2 $(Q_LD)$(CC) -o $@ $(SRC_O) $(LDFLAGS) .c.o: diff --git a/flash-tool/device_stage2/usb_boot/main.c b/flash-tool/device_stage2/usb_boot/main.c index 0c90245..de3bf06 100644 --- a/flash-tool/device_stage2/usb_boot/main.c +++ b/flash-tool/device_stage2/usb_boot/main.c @@ -6,7 +6,7 @@ extern void usb_main(); unsigned int start_addr,got_start,got_end; extern unsigned int UART_BASE; -struct fw_args_t * fw_args; +struct fw_args *fw_args; void c_main(void) { @@ -38,7 +38,7 @@ void c_main(void) *((volatile unsigned int *)(addr)) += offset; //add offset to correct all GOT } - fw_args = (struct fw_args_t *)(start_addr + 0x8); //get the fw args from memory + fw_args = (struct fw_args *)(start_addr + 0x8); //get the fw args from memory if ( fw_args->use_uart > 3 ) fw_args->use_uart = 0; UART_BASE = 0xB0030000 + fw_args->use_uart * 0x1000;