[U-Boot] [Patch 1/17] add mips64 build configuration in mips/config.mk

Daniel Schwierzeck daniel.schwierzeck at gmail.com
Wed Aug 15 23:48:48 CEST 2012


2012/8/14 Zhi-zhou Zhang <etou.zh at gmail.com>:
> diff --git a/arch/mips/config.mk b/arch/mips/config.mk
> index 6ab8acd..12df150 100644
> --- a/arch/mips/config.mk
> +++ b/arch/mips/config.mk
> @@ -23,9 +23,13 @@
>
>  CROSS_COMPILE ?= mips_4KC-
>
> +ifeq "$(CPU)" "mips64"
> +CONFIG_STANDALONE_LOAD_ADDR ?= 0xFfffFfff80200000 -T mips64.lds
> +PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__ -DCONFIG_64BIT
> +else
>  CONFIG_STANDALONE_LOAD_ADDR ?= 0x80200000 -T mips.lds
> -
>  PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__
> +endif

please define CONFIG_64BIT and CONFIG_STANDALONE_LOAD_ADDR in your board config

>
>  #
>  # From Linux arch/mips/Makefile
> @@ -47,8 +51,16 @@ PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__
>  # On the other hand, we want PIC in the U-Boot code to relocate it from ROM
>  # to RAM. $28 is always used as gp.
>  #
> +ifeq "$(CPU)" "mips64"
> +PLATFORM_CPPFLAGS += -G 0 -mabicalls -mabi=64 -fpic
> +PLATFORM_CPPFLAGS += -msoft-float
> +PLATFORM_LDFLAGS += -G 0 -static -n -nostdlib -m elf64ltsmip
> +PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
> +LDFLAGS_FINAL += --gc-sections
> +else
>  PLATFORM_CPPFLAGS += -G 0 -mabicalls -fpic
>  PLATFORM_CPPFLAGS += -msoft-float
>  PLATFORM_LDFLAGS += -G 0 -static -n -nostdlib
>  PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
>  LDFLAGS_FINAL += --gc-sections
> +endif
>

do not duplicate code. Append -m elf64ltsmip and -mabi=64
in arch/mips/cpu/mips64/config.mk

-- 
Best regards,
Daniel


More information about the U-Boot mailing list