Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

U-Boot with SPL #63

Open
CodeNinja89 opened this issue Apr 29, 2014 · 3 comments
Open

U-Boot with SPL #63

CodeNinja89 opened this issue Apr 29, 2014 · 3 comments

Comments

@CodeNinja89
Copy link

Hi,
I'm compiling U-Boot for Sun6i (Allwinner A31s). To compile u-boot with spl, I did:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- sun6i CONFIG_SPL=y

It does everything but in the end it says:

spl/u-boot-spl.lds:1: ignoring invalid character `#' in expression
arm-linux-gnueabihf-ld:/root/lin-sun/u-boot-allwinner-sunxi-a31-d794569/spl/u-boot-spl.lds:1: syntax error
make[2]: *** [/root/lin-sun/u-boot-allwinner-sunxi-a31-d794569/spl/u-boot-spl] Error 1

and I do not get any u-boot-with-spl.bin

Any help?

@CodeNinja89
Copy link
Author

if its any help, I'll put my generated lds file

//#define CONFIG_SUN6I_FPGA
//#define CONFIG_SYS_MONITOR_BASE 0x00000000
//#define CONFIG_MMC_SUNXI_USE_DMA
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
OUTPUT_ARCH(arm)
ENTRY(_start)
SECTIONS
{
. = 0x00000000;
. = ALIGN(4);
.text :
{
arch/arm/cpu/armv7/start.o (.text)
(.text)
}
. = ALIGN(4);
.rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata
))) }
. = ALIGN(4);
.data : {
_(.data)
}
. = ALIGN(4);
. = .;
__u_boot_cmd_start = .;
.u_boot_cmd : { *(.u_boot_cmd) }
__u_boot_cmd_end = .;
. = ALIGN(4);
__image_copy_end = .;
.rel.dyn : {
_rel_dyn_start = .;
*(.rel
)
__rel_dyn_end = .;
}
.dynsym : {
__dynsym_start = .;
*(.dynsym)
}
_end = .;
.bss __rel_dyn_start (OVERLAY) : {
__bss_start = .;
*(.bss)
. = ALIGN(4);
bss_end = .;
}
/DISCARD/ : { (.dynstr) }
/DISCARD/ : { (.dynamic) }
/DISCARD/ : { (.plt) }
/DISCARD/ : { (.interp) }
/DISCARD/ : { (.gnu) }
}

@atilag
Copy link

atilag commented Jun 15, 2014

Hi @CodeNinja89 , I could fix the very same issue in other repository I had by removing "-ansi" cpp flag from the Makefile (I think that ./spl/Makefile is enough). I'm trying to build .spl file for this platform too (sun6i) but I cannot go any further than:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- sun6i CONFIG_SPL=y
make: *** No rule to make target sun6i'. Stop. I even tried: make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- sun6i_config CONFIG_SPL=y make: *** No rule to make targetsun6i_config'. Stop.
make: *** [sun6i_config] Error 1

What did you do in order to overcome this problem?

Thanks!!

@hno
Copy link
Member

hno commented Jun 15, 2014

sun6i is not yet supported by sunxi u-boot.

Additionally

To build u-boot for your board you have to "make yourboardname" if your
board is alreday supported by u-boot. The SPL is different for every
hardware, not only CPU type.

If your board is not yet supported by u-boot then some additional steps
are needed to collect the information u-boot needs for SPL. See
http://linux-sunxi.org/New_Device_howto

Regards
Henrik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants