[LEDE-DEV] [RFC 06/11] sunxi: split into cortex A8 and A7 subtarget
Yousong Zhou
yszhou4tech at gmail.com
Mon Jul 17 20:32:43 PDT 2017
On 18 July 2017 at 06:10, Hauke Mehrtens <hauke at hauke-m.de> wrote:
> Now we can activate some compiler optimizations for the cortex A7.
>
> Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
> ---
> package/boot/uboot-sunxi/Makefile | 17 +++++++++++++
> target/linux/sunxi/Makefile | 3 +--
> target/linux/sunxi/cortexa7/target.mk | 12 ++++++++++
> target/linux/sunxi/cortexa8/target.mk | 12 ++++++++++
> target/linux/sunxi/image/Makefile | 45 +++++++++++++++++++++--------------
> 5 files changed, 69 insertions(+), 20 deletions(-)
> create mode 100644 target/linux/sunxi/cortexa7/target.mk
> create mode 100644 target/linux/sunxi/cortexa8/target.mk
>
> diff --git a/package/boot/uboot-sunxi/Makefile b/package/boot/uboot-sunxi/Makefile
> index 817c47bd20..27dff1074e 100644
> --- a/package/boot/uboot-sunxi/Makefile
> +++ b/package/boot/uboot-sunxi/Makefile
> @@ -26,85 +26,102 @@ define U-Boot/Default
> endef
>
> define U-Boot/A10-OLinuXino-Lime
> + BUILD_SUBTARGET:=cortexa8
> NAME:=A10 OLinuXino LIME
> BUILD_DEVICES:=sun4i-a10-olinuxino-lime
> endef
>
> define U-Boot/A13-OLinuXino
> + BUILD_SUBTARGET:=cortexa8
> NAME:=A13 OlinuXino
> BUILD_DEVICES:=sun5i-a13-olinuxino
> endef
>
> define U-Boot/A20-OLinuXino-Lime
> + BUILD_SUBTARGET:=cortexa7
> NAME:=A20 OLinuXino LIME
> BUILD_DEVICES:=sun7i-a20-olinuxino-lime
> endef
>
> define U-Boot/A20-OLinuXino_MICRO
> + BUILD_SUBTARGET:=cortexa7
> NAME:=A20 OLinuXino MICRO
> BUILD_DEVICES:=sun7i-a20-olinuxino-micro
> endef
>
> define U-Boot/Bananapi
> + BUILD_SUBTARGET:=cortexa7
> NAME:=Bananapi
> BUILD_DEVICES:=sun7i-a20-bananapi
> endef
>
> define U-Boot/Bananapro
> + BUILD_SUBTARGET:=cortexa7
> NAME:=Bananapro
> BUILD_DEVICES:=sun7i-a20-bananapro
> endef
>
> define U-Boot/Cubieboard
> + BUILD_SUBTARGET:=cortexa8
> NAME:=Cubieboard
> BUILD_DEVICES:=sun4i-a10-cubieboard
> endef
>
> define U-Boot/Cubieboard2
> + BUILD_SUBTARGET:=cortexa7
> NAME:=Cubieboard2
> BUILD_DEVICES:=sun7i-a20-cubieboard2
> endef
>
> define U-Boot/Cubietruck
> + BUILD_SUBTARGET:=cortexa7
> NAME:=Cubietruck
> BUILD_DEVICES:=sun7i-a20-cubietruck
> endef
>
> define U-Boot/Hummingbird_A31
> + BUILD_SUBTARGET:=cortexa7
> NAME:=Hummingbird A31 board
> endef
>
> define U-Boot/Mele_M9
> + BUILD_SUBTARGET:=cortexa7
> NAME:=Mele M9 (A31)
> BUILD_DEVICES:=sun6i-a31-m9
> endef
>
> define U-Boot/OLIMEX_A13_SOM
> + BUILD_SUBTARGET:=cortexa8
> NAME:=Olimex A13 SOM
> BUILD_DEVICES:=sun5i-a13-olimex-som
> endef
>
> define U-Boot/Linksprite_pcDuino
> + BUILD_SUBTARGET:=cortexa8
> NAME:=Linksprite pcDuino
> BUILD_DEVICES:=sun4i-a10-pcduino
> endef
>
> define U-Boot/Linksprite_pcDuino3
> + BUILD_SUBTARGET:=cortexa7
> NAME:=Linksprite pcDuino3
> BUILD_DEVICES:=sun7i-a20-pcduino3
> endef
>
> define U-Boot/Lamobo_R1
> + BUILD_SUBTARGET:=cortexa7
> NAME:=Lamobo R1
> BUILD_DEVICES:=sun7i-a20-lamobo-r1
> endef
>
> define U-Boot/orangepi_plus
> + BUILD_SUBTARGET:=cortexa7
> NAME:=Orange Pi Plus (H3)
> BUILD_DEVICES:=sun8i-h3-orangepi-plus
> endef
>
> define U-Boot/pangolin
> + BUILD_SUBTARGET:=cortexa7
> NAME:=Theobroma A31-yQ7 devboard
> UENV:=pangolin
> endef
> diff --git a/target/linux/sunxi/Makefile b/target/linux/sunxi/Makefile
> index 483c9eb21c..65d43358c9 100644
> --- a/target/linux/sunxi/Makefile
> +++ b/target/linux/sunxi/Makefile
> @@ -11,8 +11,7 @@ ARCH:=arm
> BOARD:=sunxi
> BOARDNAME:=Allwinner A1x/A20/A3x
> FEATURES:=fpu usb ext4 display rtc squashfs
> -CPU_TYPE:=cortex-a8
> -CPU_SUBTYPE:=vfpv3
> +SUBTARGETS:=cortexa8 cortexa7
I prefer we use a dash in the subtarget name, e.g. cortex-a7. It's
just more common.
> MAINTAINER:=Zoltan HERPAI <wigyori at uid0.hu>
>
> KERNEL_PATCHVER:=4.9
> diff --git a/target/linux/sunxi/cortexa7/target.mk b/target/linux/sunxi/cortexa7/target.mk
> new file mode 100644
> index 0000000000..f0dbcbe751
> --- /dev/null
> +++ b/target/linux/sunxi/cortexa7/target.mk
> @@ -0,0 +1,12 @@
> +#
> +# Copyright (C) 2013-2016 OpenWrt.org
New file should use updated copyright header.
> +#
> +# This is free software, licensed under the GNU General Public License v2.
> +# See /LICENSE for more information.
> +#
> +
> +include $(TOPDIR)/rules.mk
> +
> +BOARDNAME:=Allwinner A20/A3x
> +CPU_TYPE:=cortex-a7
> +CPU_SUBTYPE:=neon-vfpv4
> diff --git a/target/linux/sunxi/cortexa8/target.mk b/target/linux/sunxi/cortexa8/target.mk
> new file mode 100644
> index 0000000000..c0594721da
> --- /dev/null
> +++ b/target/linux/sunxi/cortexa8/target.mk
> @@ -0,0 +1,12 @@
> +#
> +# Copyright (C) 2013-2016 OpenWrt.org
> +#
> +# This is free software, licensed under the GNU General Public License v2.
> +# See /LICENSE for more information.
> +#
> +
> +include $(TOPDIR)/rules.mk
> +
> +BOARDNAME:=Allwinner A1x
> +CPU_TYPE:=cortex-a8
> +CPU_SUBTYPE:=vfpv3
> diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile
> index d0d86ee10d..1e8cedc70c 100644
> --- a/target/linux/sunxi/image/Makefile
> +++ b/target/linux/sunxi/image/Makefile
> @@ -39,6 +39,8 @@ define Device/Default
> IMAGE/sdcard.img.gz := sunxi-sdcard | append-metadata | gzip
> endef
>
> +ifeq ($(SUBTARGET),cortexa8)
> +
How about we just move them into subfiles like cortex-a8.mk and cortex-a7.mk?
Regards,
yousong
More information about the Lede-dev
mailing list