linux-sunxi / u-boot-sunxi

Allwinner A1x native u-boot support
https://github.com/linux-sunxi/u-boot-sunxi/wiki
316 stars 333 forks source link

U-Boot with SPL #63

Open CodeNinja89 opened 10 years ago

CodeNinja89 commented 10 years ago

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 commented 10 years ago

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_BYNAME(.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_dynstart = .; *(.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 commented 10 years ago

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 target`sun6i_config'. Stop. make: *\ [sun6i_config] Error 1

What did you do in order to overcome this problem?

Thanks!!

hno commented 10 years ago

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