Skip to content
Snippets Groups Projects
Commit fb5166ce authored by Mike Frysinger's avatar Mike Frysinger
Browse files

Blackfin: add init.elf helper code


This creates a standalone ELF that executes just the Blackfin initcode.
This is useful for people who want to program the low level aspects of
the CPU (memory/clocks/etc...) and can easily be used with JTAG for
quick booting while developing.

Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
parent 08a82a44
No related branches found
No related tags found
No related merge requests found
......@@ -1075,7 +1075,8 @@ clean:
$(obj)board/voiceblue/eeprom \
$(obj)board/armltd/{integratorap,integratorcp}/u-boot.lds \
$(obj)u-boot.lds \
$(obj)arch/blackfin/cpu/bootrom-asm-offsets.[chs]
$(obj)arch/blackfin/cpu/bootrom-asm-offsets.[chs] \
$(obj)arch/blackfin/cpu/init.{lds,elf}
@rm -f $(obj)include/bmp_logo.h
@rm -f $(obj)lib/asm-offsets.s
@rm -f $(obj)nand_spl/{u-boot.lds,u-boot-nand_spl.lds,u-boot-spl,u-boot-spl.map,System.map}
......
bootrom-asm-offsets.[chs]
init.lds
init.elf
......@@ -13,7 +13,7 @@ include $(TOPDIR)/config.mk
LIB = $(obj)lib$(CPU).o
EXTRA :=
EXTRA := init.elf
CEXTRA := initcode.o
SEXTRA := start.o
SOBJS := interrupt.o cache.o
......@@ -61,6 +61,11 @@ ifneq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS)
fi
endif
$(obj)init.lds: init.lds.S
$(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P $^ -o $@
$(obj)init.elf: $(obj)init.lds $(obj)init.o $(obj)initcode.o
$(LD) $(LDFLAGS) -T $^ -o $@
#########################################################################
# defines $(obj).depend target
......
#include <asm/blackfin.h>
ENTRY(_start)
sp.l = LO(L1_SRAM_SCRATCH_END - 20);
sp.h = HI(L1_SRAM_SCRATCH_END - 20);
call _initcode;
1:
emuexcpt;
jump 1b;
END(_start)
/*
* linker script for simple init.elf
*
* Copyright (c) 2005-2011 Analog Device Inc.
*
* Licensed under the GPL-2 or later.
*/
#include <config.h>
#include <asm/blackfin.h>
#undef ALIGN
#undef ENTRY
OUTPUT_ARCH(bfin)
MEMORY
{
l1_code : ORIGIN = L1_INST_SRAM, LENGTH = L1_INST_SRAM_SIZE
}
ENTRY(_start)
SECTIONS
{
.text.l1 : { *(.text .text.*) } >l1_code
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment