这是我的链接脚本
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
OUTPUT_ARCH(arm)
STACK_FIQ_SIZE = 1K;
STACK_IRQ_SIZE = 1K;
STACK_SVC_SIZE = 1K;
STACK_ABT_SIZE = 1K;
STACK_UDF_SIZE = 1K;
STACK_SYS_SIZE = 1K;
MEMORY
{
sram_stack_fiq : org = 40K-1K, len = 1K
sram_stack_irq : org = 40K-2K, len = 1K
sram_stack_svc : org = 40K-3K, len = 1K
sram_stack_abt : org = 40K-4K, len = 1K
sram_stack_udf : org = 40K-5K, len = 1K
sram_stack_sys : org = 40K-6K, len = 1K
sram : org = 0x00000000, len = 40K-6K
}
SECTIONS
{
.text : {
* (.vector)
jin_boot0_start.o (.text)
* (.text)
} > sram
. = ALIGN(4);
.data : {
* (.data)
} > sram
. = ALIGN(4);
.bss : {
* (.bss)
} > sram
. = ALIGN(4);
.sram_stack_fiq : {
. += STACK_FIQ_SIZE;
PROVIDE(stack_fiq_start = .);
} > sram_stack_fiq
. = ALIGN(4);
.sram_stack_irq : {
. += STACK_IRQ_SIZE;
PROVIDE(stack_irq_start = .);
} > sram_stack_irq
. = ALIGN(4);
.sram_stack_svc : {
. += STACK_SVC_SIZE;
PROVIDE(stack_svc_start = .);
} > sram_stack_svc
. = ALIGN(4);
.sram_stack_abt : {
. += STACK_ABT_SIZE;
PROVIDE(stack_abt_start = .);
} > sram_stack_abt
. = ALIGN(4);
.sram_stack_udf : {
. += STACK_UDF_SIZE;
PROVIDE(stack_udf_start = .);
} > sram_stack_udf
. = ALIGN(4);
.sram_stack_sys : {
. += STACK_SYS_SIZE;
PROVIDE(stack_sys_start = .);
} > sram_stack_sys
}
利用下面fel命令或者jlink加载到sram正常运行:
sudo sunxi-fel -p write 0 jin_boot0.bin
sudo sunxi-fel exec 0x00000000
loadbin jin_boot0.bin,0
setpc 0
然后利用mksunxi加入全志头部
mksunxi/mksunxi jin_boot0.bin
bootloader size= e59ff200
The bootloader head has been fixed
烧写到flash
sunxi-fel -p spiflash-write 0 jin_boot0.bin
100% [================================================] 6 kB, 77.5 kB/s
重启brom跑到fel模式了
离线
应该是brom代码检测flash里面内容的校验没通过吧
最近编辑记录 Jin劲 (2019-06-12 00:01:26)
离线
Bootloader size这么大,肯定有点问题
uboot的spl好像有24K这么大[捂脸]
离线