mirror of
git://projects.qi-hardware.com/xburst-tools.git
synced 2024-11-01 18:22:28 +02:00
add stage1 stage2 makefile
correct the struct fw_args_t to fw_args in stage1
This commit is contained in:
parent
e0ae71e850
commit
28262cce66
@ -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:
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user