From 24c2f5125e253d241abed39c59f76b6417f45306 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 15 Jul 2017 22:53:20 +0200 Subject: [PATCH] sunxi: Add A64 support with cortex53 subtarget This adds initial support for the A64 Allwinner SoC to LEDE. It will be build in the new cortexa53 subtarget. Currently it only supports the pine64 and the image is able to boot on this SoC. Camera, Ethernet, HDMI and other parts are currently not working. Signed-off-by: Hauke Mehrtens --- target/linux/sunxi/Makefile | 2 +- target/linux/sunxi/cortexa53/config-default | 100 ++++++++++++++++++++ target/linux/sunxi/cortexa53/target.mk | 13 +++ target/linux/sunxi/image/Makefile | 1 + target/linux/sunxi/image/cortex-a53.mk | 20 ++++ 5 files changed, 135 insertions(+), 1 deletion(-) create mode 100644 target/linux/sunxi/cortexa53/config-default create mode 100644 target/linux/sunxi/cortexa53/target.mk create mode 100644 target/linux/sunxi/image/cortex-a53.mk diff --git a/target/linux/sunxi/Makefile b/target/linux/sunxi/Makefile index 65d43358c9..982eecbcbd 100644 --- a/target/linux/sunxi/Makefile +++ b/target/linux/sunxi/Makefile @@ -11,7 +11,7 @@ ARCH:=arm BOARD:=sunxi BOARDNAME:=Allwinner A1x/A20/A3x FEATURES:=fpu usb ext4 display rtc squashfs -SUBTARGETS:=cortexa8 cortexa7 +SUBTARGETS:=cortexa8 cortexa7 cortexa53 MAINTAINER:=Zoltan HERPAI KERNEL_PATCHVER:=4.9 diff --git a/target/linux/sunxi/cortexa53/config-default b/target/linux/sunxi/cortexa53/config-default new file mode 100644 index 0000000000..58ac214695 --- /dev/null +++ b/target/linux/sunxi/cortexa53/config-default @@ -0,0 +1,100 @@ +CONFIG_64BIT=y +CONFIG_ARCH_DMA_ADDR_T_64BIT=y +CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y +CONFIG_ARCH_HAS_GIGANTIC_PAGE=y +CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y +CONFIG_ARCH_HAS_KCOV=y +CONFIG_ARCH_MMAP_RND_BITS=18 +CONFIG_ARCH_MMAP_RND_BITS_MAX=24 +CONFIG_ARCH_MMAP_RND_BITS_MIN=18 +CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11 +CONFIG_ARCH_SELECT_MEMORY_MODEL=y +CONFIG_ARCH_SPARSEMEM_DEFAULT=y +CONFIG_ARCH_SPARSEMEM_ENABLE=y +CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y +CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y +CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y +CONFIG_ARCH_WANT_FRAME_POINTERS=y +CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y +CONFIG_ARM64=y +# CONFIG_ARM64_16K_PAGES is not set +CONFIG_ARM64_4K_PAGES=y +# CONFIG_ARM64_64K_PAGES is not set +CONFIG_ARM64_CONT_SHIFT=4 +# CONFIG_ARM64_CRYPTO is not set +# CONFIG_ARM64_HW_AFDBM is not set +# CONFIG_ARM64_LSE_ATOMICS is not set +CONFIG_ARM64_PAGE_SHIFT=12 +# CONFIG_ARM64_PAN is not set +# CONFIG_ARM64_PTDUMP is not set +# CONFIG_ARM64_RANDOMIZE_TEXT_OFFSET is not set +# CONFIG_ARM64_UAO is not set +CONFIG_ARM64_VA_BITS=39 +CONFIG_ARM64_VA_BITS_39=y +# CONFIG_ARM64_VA_BITS_48 is not set +# CONFIG_ARM64_VHE is not set +CONFIG_ARM_AMBA=y +CONFIG_ARM_GIC_V3=y +# CONFIG_ARM_SBSA_WATCHDOG is not set +# CONFIG_ARM_SP805_WATCHDOG is not set +CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y +# CONFIG_COMMON_CLK_VERSATILE is not set +CONFIG_COMMON_CLK_XGENE=y +# CONFIG_COMPAT is not set +# CONFIG_DEBUG_ALIGN_RODATA is not set +CONFIG_DEBUG_RODATA=y +CONFIG_FRAME_POINTER=y +# CONFIG_FSL_ERRATUM_A008585 is not set +CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y +CONFIG_GENERIC_CPU_AUTOPROBE=y +CONFIG_GENERIC_CSUM=y +CONFIG_GENERIC_IRQ_MIGRATION=y +CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y +CONFIG_HAVE_ARCH_HUGE_VMAP=y +CONFIG_HAVE_ARCH_KASAN=y +CONFIG_HAVE_CMPXCHG_DOUBLE=y +CONFIG_HAVE_CMPXCHG_LOCAL=y +CONFIG_HAVE_DEBUG_BUGVERBOSE=y +CONFIG_HAVE_EBPF_JIT=y +CONFIG_HAVE_KVM_MSI=y +CONFIG_HAVE_MEMORY_PRESENT=y +CONFIG_HAVE_PATA_PLATFORM=y +CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000 +# CONFIG_KASAN is not set +CONFIG_KERNEL_MODE_NEON=y +CONFIG_KVM_ARM_PMU=y +CONFIG_KVM_ARM_VGIC_V3_ITS=y +CONFIG_MODULES_USE_ELF_RELA=y +CONFIG_NEED_SG_DMA_LENGTH=y +CONFIG_NO_IOPORT_MAP=y +# CONFIG_NUMA is not set +CONFIG_PARTITION_PERCPU=y +# CONFIG_PCI_DOMAINS is not set +# CONFIG_PHY_XGENE is not set +# CONFIG_PINCTRL_GR8 is not set +# CONFIG_PINCTRL_SUN4I_A10 is not set +CONFIG_PINCTRL_SUN50I_A64=y +# CONFIG_PINCTRL_SUN5I_A10S is not set +# CONFIG_PINCTRL_SUN5I_A13 is not set +# CONFIG_PINCTRL_SUN6I_A31 is not set +# CONFIG_PINCTRL_SUN6I_A31S is not set +# CONFIG_PINCTRL_SUN6I_A31_R is not set +# CONFIG_PINCTRL_SUN7I_A20 is not set +# CONFIG_PINCTRL_SUN8I_A23 is not set +# CONFIG_PINCTRL_SUN8I_A23_R is not set +# CONFIG_PINCTRL_SUN8I_A33 is not set +# CONFIG_PINCTRL_SUN8I_A83T is not set +# CONFIG_PINCTRL_SUN8I_H3 is not set +# CONFIG_PINCTRL_SUN8I_H3_R is not set +# CONFIG_PINCTRL_SUN9I_A80 is not set +# CONFIG_PINCTRL_SUN9I_A80_R is not set +# CONFIG_RANDOMIZE_BASE is not set +# CONFIG_SERIAL_AMBA_PL010 is not set +# CONFIG_SERIAL_AMBA_PL011 is not set +CONFIG_SPARSEMEM=y +CONFIG_SPARSEMEM_EXTREME=y +CONFIG_SPARSEMEM_MANUAL=y +CONFIG_SPARSEMEM_VMEMMAP=y +CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y +CONFIG_SUN50I_A64_CCU=y +CONFIG_SYSCTL_EXCEPTION_TRACE=y diff --git a/target/linux/sunxi/cortexa53/target.mk b/target/linux/sunxi/cortexa53/target.mk new file mode 100644 index 0000000000..6715d00bda --- /dev/null +++ b/target/linux/sunxi/cortexa53/target.mk @@ -0,0 +1,13 @@ +# +# Copyright (C) 2017 Hauke Mehrtens +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +ARCH:=aarch64 +BOARDNAME:=Allwinner A64 +CPU_TYPE:=cortex-a53 +KERNELNAME:=Image dtbs diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile index 20ecf66a9c..8f95c61906 100644 --- a/target/linux/sunxi/image/Makefile +++ b/target/linux/sunxi/image/Makefile @@ -41,5 +41,6 @@ endef include cortex-a7.mk include cortex-a8.mk +include cortex-a53.mk $(eval $(call BuildImage)) diff --git a/target/linux/sunxi/image/cortex-a53.mk b/target/linux/sunxi/image/cortex-a53.mk new file mode 100644 index 0000000000..bbb253f0ae --- /dev/null +++ b/target/linux/sunxi/image/cortex-a53.mk @@ -0,0 +1,20 @@ +# +# Copyright (C) 2013-2016 OpenWrt.org +# Copyright (C) 2016 Yousong Zhou +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +ifeq ($(SUBTARGET),cortexa53) + +define Device/sun50i-a64-pine64-plus + DEVICE_TITLE:=Pine64 Plus A64 + SUPPORTED_DEVICES:=pine64,pine64-plus + SUNXI_DTS:=allwinner/sun50i-a64-pine64-plus + KERNEL_NAME := Image + KERNEL := kernel-bin +endef + +TARGET_DEVICES += sun50i-a64-pine64-plus + +endif -- 2.30.2