1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2024-12-23 21:56:46 +02:00

add stage1 stage2 makefile

correct the struct fw_args_t to fw_args in stage1
This commit is contained in:
xiangfu 2009-06-05 12:08:13 +00:00
parent e0ae71e850
commit 28262cce66
2 changed files with 3 additions and 3 deletions

View File

@ -42,7 +42,7 @@ SRC_H= ingenic_cfg.h ingenic_usb.h usb_boot_defines.h \
command_line.h cmd.h config.h command_line.h cmd.h config.h
SRC_O= $(SRC_C:.c=.o) 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) $(Q_LD)$(CC) -o $@ $(SRC_O) $(LDFLAGS)
.c.o: .c.o:

View File

@ -6,7 +6,7 @@
extern void usb_main(); extern void usb_main();
unsigned int start_addr,got_start,got_end; unsigned int start_addr,got_start,got_end;
extern unsigned int UART_BASE; extern unsigned int UART_BASE;
struct fw_args_t * fw_args; struct fw_args *fw_args;
void c_main(void) void c_main(void)
{ {
@ -38,7 +38,7 @@ void c_main(void)
*((volatile unsigned int *)(addr)) += offset; //add offset to correct all GOT *((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; if ( fw_args->use_uart > 3 ) fw_args->use_uart = 0;
UART_BASE = 0xB0030000 + fw_args->use_uart * 0x1000; UART_BASE = 0xB0030000 + fw_args->use_uart * 0x1000;