[OpenWrt-Devel] Howto force mips64

John Crispin john at phrozen.org
Wed Jun 18 04:45:29 EDT 2014


Hi Martin,

you win the medal as contributor of the day ... i have been fighting
with octeon on and off for almost a month. i just dumped my own series
of patches which tried to fix up uclibc and simple did what you wrote
in the mail and i have a functional image for octeon :)

i just tested this on an esr-lite which seems to work without your
kernel patches. what board are you running on ?

	John

On 17/06/2014 11:24, Martin Fäcknitz wrote:
> force mips64 support is quite simple: set
> 
> CPU_CFLAGS_octeon=-march=octeon -mabi=64
> 
> inside target/linux/octeon/Makefile and replace the same line in 
> include/target.mk. Finally you have to add the following patch:
> 
> diff --git
> a/target/linux/octeon/patches-3.10/9999-cn61xx_support.patch 
> b/target/linux/octeon/patches-3.10/9999-cn61xx_support.patch new
> file mode 100644 index 0000000..18d2f3d --- /dev/null +++
> b/target/linux/octeon/patches-3.10/9999-cn61xx_support.patch @@
> -0,0 +1,47 @@ +Index:
> b/arch/mips/cavium-octeon/executive/cvmx-helper-board.c 
> +===================================================================
>
> 
+--- a/arch/mips/cavium-octeon/executive/cvmx-helper-board.c	2014-05-06
> 15:24:06.000000000 +0200 ++++
> b/arch/mips/cavium-octeon/executive/cvmx-helper-board.c	2014-05-06 
> 15:25:14.000000000 +0200 +@@ -75,6 +75,8 @@ + int
> cvmx_helper_board_get_mii_address(int ipd_port) + { + 	switch
> (cvmx_sysinfo_get()->board_type) { ++	case 20003: ++		return -1; +
> case CVMX_BOARD_TYPE_SIM: + 		/* Simulator doesn't have MII */ +
> return -1; +Index:
> b/arch/mips/cavium-octeon/executive/cvmx-helper.c 
> +===================================================================
>
> 
+--- a/arch/mips/cavium-octeon/executive/cvmx-helper.c	2014-01-25
> 17:27:55.000000000 +0100 ++++
> b/arch/mips/cavium-octeon/executive/cvmx-helper.c	2014-05-06 
> 15:25:47.000000000 +0200 +@@ -83,7 +83,7 @@ +  */ + int
> cvmx_helper_get_number_of_interfaces(void) + { +-	if
> (OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN52XX)) 
> ++	if (OCTEON_IS_MODEL(OCTEON_CN56XX) ||
> OCTEON_IS_MODEL(OCTEON_CN52XX) || OCTEON_IS_MODEL(OCTEON_CN61XX)) +
> return 4; + 	else + 		return 3; +@@ -121,7 +121,8 @@ + + 	if
> (interface == 3) { + 		if (OCTEON_IS_MODEL(OCTEON_CN56XX) +-
> || OCTEON_IS_MODEL(OCTEON_CN52XX)) ++		    ||
> OCTEON_IS_MODEL(OCTEON_CN52XX) ++		    ||
> OCTEON_IS_MODEL(OCTEON_CN6XXX)) + 			return
> CVMX_HELPER_INTERFACE_MODE_LOOP; + 		else + 			return
> CVMX_HELPER_INTERFACE_MODE_DISABLED; +@@ -152,7 +153,9 @@ + +
> mode.u64 = cvmx_read_csr(CVMX_GMXX_INF_MODE(interface)); + +-	if
> (OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN52XX))
> { ++	if (OCTEON_IS_MODEL(OCTEON_CN61XX)) { ++		return
> CVMX_HELPER_INTERFACE_MODE_SGMII; ++	} else if
> (OCTEON_IS_MODEL(OCTEON_CN56XX) || OCTEON_IS_MODEL(OCTEON_CN52XX))
> { + 		switch (mode.cn56xx.mode) { + 		case 0: + 			return
> CVMX_HELPER_INTERFACE_MODE_DISABLED;
> 
> uclibc's mips64 support is broken, so you have to use glibc.
> gcc-4.8 doesn't work for me (invalid TLS related code), therefore
> use gcc-4.6.
> 
> greets
> 
> On 16.06.2014 23:26, Edison Figueira Junior wrote:
>> hello, I can be a beta test if you want :-)
>> 
>> Enviada do meu iPhone
>> 
>>> Em 04/06/2014, às 10:05, John Crispin <john at phrozen.org>
>>> escreveu:
>>> 
>>> octeon is currently only partially working. we will push a fix
>>> to trunk in the next few days. experimental patch is currently
>>> in testing. please be patient for a few dyas
>>> 
>>> 
>>>> On 04/06/2014 14:36, Edison Figueira Junior wrote: Howto
>>>> force to use mips64 for target octeon?
>>>> 
>>>> 
>>>> 
>>>> 
>>>> _______________________________________________
>>>> openwrt-devel mailing list openwrt-devel at lists.openwrt.org 
>>>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>>
>>>> 
_______________________________________________
>>> openwrt-devel mailing list openwrt-devel at lists.openwrt.org 
>>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>
>>> 
_______________________________________________
>> openwrt-devel mailing list openwrt-devel at lists.openwrt.org 
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>> 
> 
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list