On 2015-11-03 00:27, Alexey Brodkin 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. > > Cc: Felix Fietkau <n...@openwrt.org> > Cc: Jo-Philipp Wich <j...@openwrt.org> > Signed-off-by: Alexey Brodkin <abrod...@synopsys.com> > --- > > Changes compared to v2: > * Fixed copyright dates > * Cleaned-up init scripts > > Changes compared to v1: > * Switched to SoC-centered design. Now instead of common ARC700 > support we claim support of boards based on ARC770D. > This allows to use the same one build of kernel binary for both > boards. > > * Implemented run-time scripts that parse Device Tree compatible > tag and according to it do configuration of serial port and network. > > * Implemented ability to patch in built Linux kernel external .dtb > > * Linux kernel switched from 4.1 to 4.3 > > * Rebased on current master > > include/kernel.mk | 2 + > target/Config.in | 9 + > target/linux/arc770/Makefile | 26 +++ > target/linux/arc770/base-files/etc/inittab | 4 + > .../arc770/base-files/etc/uci-defaults/02_network | 23 +++ > target/linux/arc770/base-files/lib/arc.sh | 76 +++++++ > .../base-files/lib/preinit/01_preinit_arc.sh | 10 + > target/linux/arc770/config-4.3 | 142 +++++++++++++ > target/linux/arc770/dts/axc001.dtsi | 100 +++++++++ > target/linux/arc770/dts/axs101.dts | 21 ++ > target/linux/arc770/dts/axs10x_mb.dtsi | 224 > +++++++++++++++++++++ > target/linux/arc770/dts/nsim_700.dts | 70 +++++++ > target/linux/arc770/dts/skeleton.dtsi | 37 ++++ > target/linux/arc770/generic/profiles/00-default.mk | 16 ++ > target/linux/arc770/generic/profiles/01-minimal.mk | 15 ++ > target/linux/arc770/generic/profiles/02-axs101.mk | 17 ++ > .../linux/arc770/generic/profiles/03-nsim_700.mk | 16 ++ > target/linux/arc770/generic/target.mk | 8 + > target/linux/arc770/image/Makefile | 42 ++++ > ...openwrt-arc-remove-dependency-on-DEVTMPFS.patch | 36 ++++ > .../0002-openwrt-arc-add-OWRTDTB-section.patch | 91 +++++++++ > 21 files changed, 985 insertions(+) > create mode 100644 target/linux/arc770/Makefile > create mode 100644 target/linux/arc770/base-files/etc/inittab > create mode 100644 target/linux/arc770/base-files/etc/uci-defaults/02_network > create mode 100644 target/linux/arc770/base-files/lib/arc.sh > create mode 100644 > target/linux/arc770/base-files/lib/preinit/01_preinit_arc.sh > create mode 100644 target/linux/arc770/config-4.3 > create mode 100644 target/linux/arc770/dts/axc001.dtsi > create mode 100644 target/linux/arc770/dts/axs101.dts > create mode 100644 target/linux/arc770/dts/axs10x_mb.dtsi > create mode 100644 target/linux/arc770/dts/nsim_700.dts > create mode 100644 target/linux/arc770/dts/skeleton.dtsi > create mode 100644 target/linux/arc770/generic/profiles/00-default.mk > create mode 100644 target/linux/arc770/generic/profiles/01-minimal.mk > create mode 100644 target/linux/arc770/generic/profiles/02-axs101.mk > create mode 100644 target/linux/arc770/generic/profiles/03-nsim_700.mk > create mode 100644 target/linux/arc770/generic/target.mk > create mode 100644 target/linux/arc770/image/Makefile > create mode 100644 > target/linux/arc770/patches-4.3/0001-openwrt-arc-remove-dependency-on-DEVTMPFS.patch > create mode 100644 > target/linux/arc770/patches-4.3/0002-openwrt-arc-add-OWRTDTB-section.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 Minor nitpick: The above parts should be folded into the previous patch.
> diff --git a/target/linux/arc770/config-4.3 b/target/linux/arc770/config-4.3 > new file mode 100644 > index 0000000..aba6908 > --- /dev/null > +++ b/target/linux/arc770/config-4.3 > @@ -0,0 +1,142 @@ > +# > +# ARC Architecture Configuration > +# > +CONFIG_ARC=y > + [...] Please run make kernel_oldconfig to refresh the target kernel config. This file is not meant to be hand-written. If you want to make changes to it, you can use make kernel_menuconfig. > diff --git a/target/linux/arc770/image/Makefile > b/target/linux/arc770/image/Makefile > --- /dev/null > +++ b/target/linux/arc770/image/Makefile > @@ -0,0 +1,42 @@ > +# > +# 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 > + > +Image/Build/Initramfs=$(call Image/Build/Profile/$(PROFILE),initramfs) > + > +# $(1), lowercase board name like "axs101" > +# $(2), DTS filename without .dts extension > +# $(3), optional filename suffix, e.g. "-initramfs" > +define PatchKernelDtb > + cp $(KDIR)/vmlinux$(3).elf $(KDIR)/vmlinux-$(1)$(3).elf > + $(LINUX_DIR)/scripts/dtc/dtc -O dtb -o $(KDIR)/$(2).dtb ../dts/$(2).dts > + $(STAGING_DIR_HOST)/bin/patch-dtb $(KDIR)/vmlinux-$(1)$(3).elf > $(KDIR)/$(2).dtb > +endef > + > +# $(1), lowercase board name > +# $(2), DTS filename without .dts extension > +# $(3), optional filename suffix, e.g. "-initramfs" > +MkImageDtb=$(call PatchKernelDtb,$(1),$(2),$(3)) > + > +# $(1), squashfs/initramfs > +# $(2), lowercase board name > +# $(3), DTS filename without .dts extension > +BuildFirmware/OF/initramfs=$(call MkImageDtb,$(2),$(3),-initramfs) > + > +BuildFirmware/axs101/initramfs=$(call > BuildFirmware/OF/initramfs,$(1),axs101,axs101) > +BuildFirmware/nsim_700/initramfs=$(call > BuildFirmware/OF/initramfs,$(1),nsim_700,nsim_700) > + > +Image/Build/Profile/axs101=$(call BuildFirmware/axs101/$(1),$(1)) > +Image/Build/Profile/nsim_700=$(call BuildFirmware/nsim_700/$(1),$(1)) > + > +define Image/Build/Profile/Default > + $(call Image/Build/Profile/axs101,$(1)) > + $(call Image/Build/Profile/nsim_700,$(1)) > +endef > + > +$(eval $(call BuildImage)) Please use the new image building code instead. You can find examples in the bcm53xx image Makefile. - Felix _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel