.text
.global _start
_start:
b save_boot_params
//#include "led.h"
#include "types.h"
#include "setjmp.h"
static jmp_buf brom_ctx __section(".data");
static void static_delay(int nSecondWait)
{
if(nSecondWait < 0) return;
volatile unsigned long int i,j;
for(i=nSecondWait;i>0;i--)
for(j=200000;j>0;j--);
}
int save_boot_params(void)
{
int tmp = setjmp(brom_ctx);
if(0 == tmp)
{
static_delay(3); // 等待约30秒后
longjmp(brom_ctx, 888888);
}
//save_boot_params_ret();
// 直接返回2给bootrom
return 2;
}
SECTIONS {
. = 0xfdcc1000;
. = ALIGN(8);
.text :
{
rk3568tpl_start.o(.text)
*(.text)
}
.rodata ALIGN(8) : {*(.rodata*)}
.data ALIGN(8) : { *(.data) }
. = ALIGN(8);
__bss_start = .;
.bss ALIGN(8) : { *(.bss) *(COMMON) }
__bss_end = .;
}
更多回帖