[OpenWrt-Devel] [PATCH] mpc85xx: Add T4240 sub-target

John Crispin blogic at openwrt.org
Tue Apr 26 09:33:51 EDT 2016



On 26/04/2016 11:48, Helmut Schaa wrote:
> The Freescale T4240 is a 12 core (24 threads) SoC.
> Add a sub-target to the mpc85xx target to build images for the T4240
> Reference Design Board.
> 
> Currently CPU thread support is only available in 64bit kernel builds,
> hence the sub-target uses the powerpc64 feature flag.
> 
> Using musl libc doesn't compile properly on that sub-target yet, hence
> we'd select glibc by default for T4240.

why does it not compile ? do you get an actual compile error or does it
simply not work as expected ?

> 
> Networking is not yet supported as the required fman/bman/qman/dpaa
> drivers are not yet included in mainline.
> 

can you backport them ?




> Signed-off-by: Helmut Schaa <helmut.schaa at googlemail.com>
> ---
>  config/Config-devel.in                    |  2 +-
>  target/linux/mpc85xx/Makefile             |  2 +-
>  target/linux/mpc85xx/image/Makefile       |  2 +-
>  target/linux/mpc85xx/t4240/config-default | 82 +++++++++++++++++++++++++++++++
>  target/linux/mpc85xx/t4240/target.mk      | 12 +++++
>  toolchain/Config.in                       |  5 +-
>  6 files changed, 100 insertions(+), 5 deletions(-)
>  create mode 100644 target/linux/mpc85xx/t4240/config-default
>  create mode 100644 target/linux/mpc85xx/t4240/target.mk
> 
> diff --git a/config/Config-devel.in b/config/Config-devel.in
> index 938f0b3..474b12f 100644
> --- a/config/Config-devel.in
> +++ b/config/Config-devel.in
> @@ -106,7 +106,7 @@ menuconfig DEVEL
>  
>  	config EXTRA_OPTIMIZATION
>  		string "Additional compiler options" if DEVEL
> -		default "-fno-caller-saves -fno-plt" if !CONFIG_EXTERNAL_TOOLCHAIN && !arc
> +		default "-fno-caller-saves -fno-plt" if !CONFIG_EXTERNAL_TOOLCHAIN && !arc && !powerpc64
>  		default "-fno-caller-saves"
>  		help
>  		  Extra target-independent optimizations to use when building for the target.
> diff --git a/target/linux/mpc85xx/Makefile b/target/linux/mpc85xx/Makefile
> index a32be90..8ba739a 100644
> --- a/target/linux/mpc85xx/Makefile
> +++ b/target/linux/mpc85xx/Makefile
> @@ -12,7 +12,7 @@ BOARDNAME:=Freescale MPC85xx
>  CPU_TYPE:=8540
>  FEATURES:=squashfs
>  MAINTAINER:=Imre Kaloz <kaloz at openwrt.org>
> -SUBTARGETS=generic p1020
> +SUBTARGETS=generic p1020 t4240
>  
>  KERNEL_PATCHVER:=4.4
>  
> diff --git a/target/linux/mpc85xx/image/Makefile b/target/linux/mpc85xx/image/Makefile
> index 25a9b07..82035eb 100644
> --- a/target/linux/mpc85xx/image/Makefile
> +++ b/target/linux/mpc85xx/image/Makefile
> @@ -21,7 +21,7 @@ endef
>  
>  zImage:=$(BIN_DIR)/$(IMG_PREFIX)-zImage
>  
> -DTS_TARGETS = fsl/p1010rdb-pa tl-wdr4900-v1 fsl/p1020rdb
> +DTS_TARGETS = fsl/p1010rdb-pa tl-wdr4900-v1 fsl/p1020rdb fsl/t4240rdb
>  
>  define Image/BuildKernel
>  	cp $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-zImage
> diff --git a/target/linux/mpc85xx/t4240/config-default b/target/linux/mpc85xx/t4240/config-default
> new file mode 100644
> index 0000000..18fd6d6
> --- /dev/null
> +++ b/target/linux/mpc85xx/t4240/config-default
> @@ -0,0 +1,82 @@
> +CONFIG_64BIT=y
> +CONFIG_ALTIVEC=y
> +CONFIG_ARCH_DMA_ADDR_T_64BIT=y
> +CONFIG_ARCH_HAS_ILOG2_U64=y
> +CONFIG_ARCH_HAS_TICK_BROADCAST=y
> +CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
> +CONFIG_ARCH_SELECT_MEMORY_MODEL=y
> +CONFIG_ARCH_SPARSEMEM_ENABLE=y
> +CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y
> +CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y
> +CONFIG_ARCH_WANT_OLD_COMPAT_IPC=y
> +CONFIG_BLOCK_COMPAT=y
> +CONFIG_CLKDEV_LOOKUP=y
> +CONFIG_COMMON_CLK=y
> +CONFIG_COMPAT=y
> +CONFIG_COMPAT_BINFMT_ELF=y
> +CONFIG_COMPAT_NETLINK_MESSAGES=y
> +CONFIG_COMPAT_OLD_SIGACTION=y
> +CONFIG_CORENET_GENERIC=y
> +CONFIG_CPU_RMAP=y
> +# CONFIG_E5500_CPU is not set
> +CONFIG_E6500_CPU=y
> +CONFIG_EPAPR_PARAVIRT=y
> +CONFIG_FORCE_MAX_ZONEORDER=13
> +# CONFIG_FSL_ULI1575 is not set
> +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
> +# CONFIG_GENERIC_CPU is not set
> +# CONFIG_HANGCHECK_TIMER is not set
> +CONFIG_HAVE_CLK=y
> +CONFIG_HAVE_CLK_PREPARE=y
> +CONFIG_HAVE_PERF_EVENTS_NMI=y
> +CONFIG_HAVE_RCU_TABLE_FREE=y
> +CONFIG_HAVE_SETUP_PER_CPU_AREA=y
> +CONFIG_HAVE_VIRT_CPU_ACCOUNTING=y
> +CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
> +# CONFIG_HUGETLBFS is not set
> +CONFIG_IOMMU_SUPPORT=y
> +CONFIG_KERNEL_START=0xc000000000000000
> +# CONFIG_LIQUIDIO is not set
> +CONFIG_LOCK_SPIN_ON_OWNER=y
> +CONFIG_MUTEX_SPIN_ON_OWNER=y
> +CONFIG_NEED_DMA_MAP_STATE=y
> +CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y
> +CONFIG_NET_FLOW_LIMIT=y
> +CONFIG_NR_CPUS=24
> +# CONFIG_NUMA is not set
> +CONFIG_PAGE_OFFSET=0xc000000000000000
> +CONFIG_PCI_BUS_ADDR_T_64BIT=y
> +CONFIG_PGTABLE_LEVELS=4
> +CONFIG_PHYS_64BIT=y
> +CONFIG_PHYS_ADDR_T_64BIT=y
> +CONFIG_PPC64=y
> +CONFIG_PPC_BOOK3E=y
> +CONFIG_PPC_BOOK3E_64=y
> +# CONFIG_PPC_BOOK3S_64 is not set
> +CONFIG_PPC_E500MC=y
> +CONFIG_PPC_EPAPR_HV_PIC=y
> +CONFIG_PPC_FPU=y
> +# CONFIG_PPC_I8259 is not set
> +CONFIG_PPC_OF_BOOT_TRAMPOLINE=y
> +# CONFIG_PPC_OF_PLATFORM_PCI is not set
> +CONFIG_PTE_64BIT=y
> +CONFIG_RATIONAL=y
> +CONFIG_RCU_STALL_COMMON=y
> +# CONFIG_RELOCATABLE is not set
> +CONFIG_RFS_ACCEL=y
> +CONFIG_RPS=y
> +CONFIG_RWSEM_SPIN_ON_OWNER=y
> +CONFIG_SMP=y
> +CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
> +CONFIG_SYSVIPC_COMPAT=y
> +CONFIG_SYS_SUPPORTS_HUGETLBFS=y
> +# CONFIG_THUNDER_NIC_BGX is not set
> +# CONFIG_THUNDER_NIC_PF is not set
> +# CONFIG_THUNDER_NIC_VF is not set
> +CONFIG_TREE_RCU=y
> +# CONFIG_U3_DART is not set
> +# CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is not set
> +CONFIG_WORD_SIZE=64
> +CONFIG_XPS=y
> +CONFIG_ZLIB_DEFLATE=y
> +CONFIG_ZONE_DMA32=y
> diff --git a/target/linux/mpc85xx/t4240/target.mk b/target/linux/mpc85xx/t4240/target.mk
> new file mode 100644
> index 0000000..1b515ab
> --- /dev/null
> +++ b/target/linux/mpc85xx/t4240/target.mk
> @@ -0,0 +1,12 @@
> +BOARDNAME:=T4240
> +FEATURES:=squashfs powerpc64
> +MAINTAINER:=Helmut Schaa <helmut.schaa at googlemail.com>
> +
> +# Let the kernel figure out the correct usage of -m64 and -m32
> +# for different parts.
> +KERNEL_CC:=
> +
> +define Target/Description
> +	Build firmware images for Freescale T4240 based boards.
> +endef
> +
> diff --git a/toolchain/Config.in b/toolchain/Config.in
> index 49c3461..8f27cfb 100644
> --- a/toolchain/Config.in
> +++ b/toolchain/Config.in
> @@ -230,7 +230,7 @@ choice
>  	config LIBC_USE_MUSL
>  		select USE_MUSL
>  		bool "Use musl"
> -		depends on !(arc)
> +		depends on !(arc) && !(powerpc64)
>  
>  endchoice
>  
> @@ -257,6 +257,7 @@ config INSIGHT
>  	  Enable if you want to build insight-gdb.
>  
>  config USE_GLIBC
> +	default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && (powerpc64)
>  	bool
>  
>  config USE_UCLIBC
> @@ -264,7 +265,7 @@ config USE_UCLIBC
>  	bool
>  
>  config USE_MUSL
> -	default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && !(arc)
> +	default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && !(arc) && !(powerpc64)
>  	bool
>  
>  config USE_EXTERNAL_LIBC
> 
_______________________________________________
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