[OpenWrt-Devel] [PATCH 3/3] linux: add support of Synopsys ARC boards
Jonas Gorski
jogo at openwrt.org
Wed Sep 2 04:32:40 EDT 2015
On Thu, Aug 27, 2015 at 1:03 PM, Alexey Brodkin
<Alexey.Brodkin at synopsys.com> wrote:
> This patch introduces support of new boards with ARC cores.
>
> [1] Synopsys SDP board
> This is a new-generation development board from Synopsys that
> consists of base-board and CPU tile-board (which might have a real
> ASIC or FPGA with CPU image).
> It sports a lot of DesignWare peripherals like GMAC, USB, SPI, I2C
> etc and is intended to be used for early development of ARC-based
> products.
>
> [2] nSIM
> This is a virtual board implemented in Synopsys proprietary
> software simulator (even though available for free for open source
> community). This board has only serial port as a peripheral and so
> it is meant to be used for runtime testing which is especially
> useful during bring-up of new tools and platforms.
> What's also important ARC cores are very configurable so there're
> many variations of options like cache sizes, their line lengths,
> additional hardware blocks like multipliers, dividers etc. And this
> board could be used to make sure built software still runs on
> different HW configurations.
>
> Note there's a prerequisite http://patchwork.ozlabs.org/patch/502081/
>
> Cc: Felix Fietkau <nbd at openwrt.org>
> Cc: Jo-Philipp Wich <jow at openwrt.org>
> Signed-off-by: Alexey Brodkin <abrodkin at synopsys.com>
> ---
> include/kernel.mk | 2 +
> target/Config.in | 9 +
> target/linux/arc/Makefile | 28 +
> target/linux/arc/axs10x/README | 19 +
> .../linux/arc/axs10x/base-files/etc/config/network | 18 +
> target/linux/arc/axs10x/base-files/etc/inittab | 5 +
> target/linux/arc/axs10x/config-4.1 | 127 +++
> target/linux/arc/axs10x/target.mk | 8 +
> target/linux/arc/image/Makefile | 12 +
> target/linux/arc/nsim/README | 19 +
> target/linux/arc/nsim/base-files/etc/inittab | 5 +
> target/linux/arc/nsim/config-4.1 | 88 ++
> target/linux/arc/nsim/target.mk | 9 +
> ...Add-support-for-AXS101-SDP-software-devel.patch | 911 +++++++++++++++++++++
> ...Tweak-DDR-port-aperture-mappings-for-perf.patch | 65 ++
> ...ARC-axs101-Add-missing-__init-annotations.patch | 71 ++
> .../0004-ARC-RIP-broken-64bit-RTSC.patch | 186 +++++
> ...openwrt-arc-remove-dependency-on-DEVTMPFS.patch | 36 +
> .../0006-ARC-axs101-support-early-8250-uart.patch | 67 ++
> 19 files changed, 1685 insertions(+)
> create mode 100644 target/linux/arc/Makefile
> create mode 100644 target/linux/arc/axs10x/README
> create mode 100644 target/linux/arc/axs10x/base-files/etc/config/network
> create mode 100644 target/linux/arc/axs10x/base-files/etc/inittab
> create mode 100644 target/linux/arc/axs10x/config-4.1
> create mode 100644 target/linux/arc/axs10x/target.mk
> create mode 100644 target/linux/arc/image/Makefile
> create mode 100644 target/linux/arc/nsim/README
> create mode 100644 target/linux/arc/nsim/base-files/etc/inittab
> create mode 100644 target/linux/arc/nsim/config-4.1
> create mode 100644 target/linux/arc/nsim/target.mk
> create mode 100644 target/linux/arc/patches-4.1/0001-ARC-axs101-Add-support-for-AXS101-SDP-software-devel.patch
> create mode 100644 target/linux/arc/patches-4.1/0002-ARC-axs101-Tweak-DDR-port-aperture-mappings-for-perf.patch
> create mode 100644 target/linux/arc/patches-4.1/0003-ARC-axs101-Add-missing-__init-annotations.patch
> create mode 100644 target/linux/arc/patches-4.1/0004-ARC-RIP-broken-64bit-RTSC.patch
> create mode 100644 target/linux/arc/patches-4.1/0005-openwrt-arc-remove-dependency-on-DEVTMPFS.patch
> create mode 100644 target/linux/arc/patches-4.1/0006-ARC-axs101-support-early-8250-uart.patch
>
> diff --git a/include/kernel.mk b/include/kernel.mk
> index 6a613fe..878a366 100644
> --- a/include/kernel.mk
> +++ b/include/kernel.mk
> @@ -64,6 +64,8 @@ ifneq (,$(findstring uml,$(BOARD)))
> LINUX_KARCH=um
> else ifneq (,$(findstring $(ARCH) , aarch64 aarch64_be ))
> LINUX_KARCH := arm64
> +else ifneq (,$(findstring $(ARCH) , arceb ))
> + LINUX_KARCH := arc
> else ifneq (,$(findstring $(ARCH) , armeb ))
> LINUX_KARCH := arm
> else ifneq (,$(findstring $(ARCH) , mipsel mips64 mips64el ))
> diff --git a/target/Config.in b/target/Config.in
> index baae8d6..571b06e 100644
> --- a/target/Config.in
> +++ b/target/Config.in
> @@ -100,6 +100,13 @@ config aarch64_be
> select BIG_ENDIAN
> bool
>
> +config arc
> + bool
> +
> +config arceb
> + select BIG_ENDIAN
> + bool
> +
> config arm
> bool
>
> @@ -179,6 +186,8 @@ config ARCH
> string
> default "aarch64" if aarch64
> default "aarch64_be" if aarch64_be
> + default "arc" if arc
> + default "arceb" if arceb
> default "arm" if arm
> default "armeb" if armeb
> default "i386" if i386
> diff --git a/target/linux/arc/Makefile b/target/linux/arc/Makefile
> new file mode 100644
> index 0000000..ad252cb
> --- /dev/null
> +++ b/target/linux/arc/Makefile
> @@ -0,0 +1,28 @@
> +#
> +# Copyright (C) 2015 OpenWrt.org
> +#
> +# This is free software, licensed under the GNU General Public License v2.
> +# See /LICENSE for more information.
> +#
> +include $(TOPDIR)/rules.mk
> +
> +ARCH:=arc
> +BOARD:=arc
> +BOARDNAME:=Synopsys DesignWare
> +CFLAGS:=-Os -pipe -fno-caller-saves -matomic
> +MAINTAINER:=Alexey Brodkin <abrodkin at synopsys.com>
> +SUBTARGETS:=axs10x nsim
> +
> +KERNEL_PATCHVER:=4.1
> +
> +KERNELNAME:=vmlinux
> +
> +DEVICE_TYPE:=developerboard
> +
> +include $(INCLUDE_DIR)/target.mk
> +
> +define Target/Description
> + Synopsys DesignWare boards
> +endef
> +
> +$(eval $(call BuildTarget))
> diff --git a/target/linux/arc/axs10x/README b/target/linux/arc/axs10x/README
> new file mode 100644
> index 0000000..fcefeeb
> --- /dev/null
> +++ b/target/linux/arc/axs10x/README
> @@ -0,0 +1,19 @@
> +The AXS10x Platform consists of a DesignWare AXC001 CPU
> +Card (with ARC 770D core) in case of AXS101 or AXC003 CPU Card
> +(typically with ARC HS38 core) in case of AXS103 mounted on an
> +ARC Software Development Platform Mainboard with DesignWare peripherals:
> + * SD/MMC contoller
> + * Gigabit network contoller
> + * Serial ports (8250-compatible)
> + * USB 2.0
> + * SPI
> + * I2C
> +
> +As of today we build vmlinux image for that board and that image
> +could be loaded in board's memory via JTAG.
> +
> +If Digilent USB JTAG probe is used following command line could be used:
> +-------->8-------
> +mdb -digilent vmlinux
> +-------->8-------
> +
> diff --git a/target/linux/arc/axs10x/base-files/etc/config/network b/target/linux/arc/axs10x/base-files/etc/config/network
> new file mode 100644
> index 0000000..1d46510
> --- /dev/null
> +++ b/target/linux/arc/axs10x/base-files/etc/config/network
> @@ -0,0 +1,18 @@
> +config interface 'loopback'
> + option ifname 'lo'
> + option proto 'static'
> + option ipaddr '127.0.0.1'
> + option netmask '255.0.0.0'
> +
> +config interface 'lan'
> + option ifname 'eth0'
> + option type 'bridge'
> + option proto 'dhcp'
> +
> +config interface 'wan6'
> + option ifname '@wan'
> + option proto 'dhcpv6'
> +
> +config globals 'globals'
> + option ula_prefix 'fdd3:b396:94ac::/48'
> +
> diff --git a/target/linux/arc/axs10x/base-files/etc/inittab b/target/linux/arc/axs10x/base-files/etc/inittab
> new file mode 100644
> index 0000000..672cbba
> --- /dev/null
> +++ b/target/linux/arc/axs10x/base-files/etc/inittab
> @@ -0,0 +1,5 @@
> +::sysinit:/etc/init.d/rcS S boot
> +::shutdown:/etc/init.d/rcS K shutdown
> +tts/0::askfirst:/bin/ash --login
> +ttyS3::askfirst:/bin/ash --login
> +tty1::askfirst:/bin/ash --login
> diff --git a/target/linux/arc/axs10x/config-4.1 b/target/linux/arc/axs10x/config-4.1
> new file mode 100644
> index 0000000..2cd3471
> --- /dev/null
> +++ b/target/linux/arc/axs10x/config-4.1
> @@ -0,0 +1,127 @@
> +#
> +# ARC Architecture Configuration
> +#
Please run make kernel_{menu|old|def}config to make this configs
contain only the differences to the generic config. Also please move
all common options from both subtargets into a
target/linux/arc/config-4.1.
Also apart from the select ARC_HAS_COH_CACHES if SMP, is there any
reason to nsim needs to be a subtarget? If subtargets, I would expect
750D/770/HS subtargets.
(snip the rest)
> diff --git a/target/linux/arc/axs10x/target.mk b/target/linux/arc/axs10x/target.mk
> new file mode 100644
> index 0000000..69c5c47
> --- /dev/null
> +++ b/target/linux/arc/axs10x/target.mk
> @@ -0,0 +1,8 @@
> +BOARDNAME:=AXS10x
> +
> +define Target/Description
> + Synopsys Designware SDP board.
> +endef
> +
> +FEATURES += ramdisk usb
> +DEFAULT_PACKAGES += kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-mmc kmod-sdhci
> diff --git a/target/linux/arc/image/Makefile b/target/linux/arc/image/Makefile
> new file mode 100644
> index 0000000..df19461
> --- /dev/null
> +++ b/target/linux/arc/image/Makefile
> @@ -0,0 +1,12 @@
> +#
> +# Copyright (C) 2015 OpenWrt.org
> +#
> +# This is free software, licensed under the GNU General Public License v2.
> +# See /LICENSE for more information.
> +#
> +include $(TOPDIR)/rules.mk
> +include $(INCLUDE_DIR)/image.mk
> +
> +# use default targets for everything
> +
> +$(eval $(call BuildImage))
> diff --git a/target/linux/arc/nsim/README b/target/linux/arc/nsim/README
> new file mode 100644
> index 0000000..2ab98b0
> --- /dev/null
> +++ b/target/linux/arc/nsim/README
> @@ -0,0 +1,19 @@
> +This is a simulator of pretty simple board with ARC770 CPU and
> +serial port as the only peripheral.
> +
> +Still this is useful for runtime smoke testing.
> +
> +Free instance of the simulator is available here after simple registration
> +and approval from Synopsys staff:
> + http://www.synopsys.com/cgi-bin/dwarcnsim/req1.cgi
> +
> +Once downloaded and extracted it might be executed like that:
> +
> +nsimdrv -prop=nsim_isa_family=a700 -prop=nsim_isa_atomic_option=1 \
> + -prop=nsim_mmu=3 -prop=icache=32768,64,2,0 -prop=dcache=32768,64,4,0 \
> + -prop=nsim_isa_dpfp=none -prop=nsim_isa_shift_option=2 \
> + -prop=nsim_isa_swap_option=1 -prop=nsim_isa_bitscan_option=1 \
> + -prop=nsim_isa_sat=1 -prop=nsim_isa_mpy32=1 \
> + -prop=nsim_isa_enable_timer_0=1 -prop=nsim_isa_enable_timer_1=1 \
> + -prop=nsim_mem-dev=uart0 vmlinux
> +
> diff --git a/target/linux/arc/nsim/base-files/etc/inittab b/target/linux/arc/nsim/base-files/etc/inittab
> new file mode 100644
> index 0000000..a855c34
> --- /dev/null
> +++ b/target/linux/arc/nsim/base-files/etc/inittab
> @@ -0,0 +1,5 @@
> +::sysinit:/etc/init.d/rcS S boot
> +::shutdown:/etc/init.d/rcS K shutdown
> +tts/0::askfirst:/bin/ash --login
> +ttyARC0::askfirst:/bin/ash --login
> +tty1::askfirst:/bin/ash --login
> diff --git a/target/linux/arc/nsim/config-4.1 b/target/linux/arc/nsim/config-4.1
> new file mode 100644
> index 0000000..f53c763
> --- /dev/null
> +++ b/target/linux/arc/nsim/config-4.1
> @@ -0,0 +1,88 @@
> +#
> +# ARC Architecture Configuration
> +#
> +CONFIG_ARC=y
Same comment here.
> diff --git a/target/linux/arc/nsim/target.mk b/target/linux/arc/nsim/target.mk
> new file mode 100644
> index 0000000..a36d98b
> --- /dev/null
> +++ b/target/linux/arc/nsim/target.mk
> @@ -0,0 +1,9 @@
> +BOARDNAME:=nSIM
> +
> +define Target/Description
> + Simple nSIM simulator of ARC cores.
> + Its only peripheral is serial port.
> + Useful for simple smoke-testing.
> +endef
> +
> +FEATURES += ramdisk
> \ No newline at end of file
Please fix this ^ ;)
Jonas
_______________________________________________
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