Re: [RFT] Kernels for next release
The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software.--- Begin Message --- Hi Paul, Hauke, > > I would be fine to remove the arc770 and the ipq807x targets. > > I removed ipq807x for now, arc770 should receive a patch within the next days. Well, actually the original patch for ARC770 posted by Evgeniy some time ago is good. I mean this one: https://patchwork.ozlabs.org/project/openwrt/patch/mailman.11570.1635883327.1923571.openwrt-de...@lists.openwrt.org/ A problem mentioned in the commit message is due to something in either glibc or some other part of the toolchain, which causes problems in user space. More gory details of that issue you may find here: https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/issues/400 I'm not sure though when we have time to really look into it, as ARCompact ISA (AKA ARCv1) is being deemphasized in favor to ARCv2 (ARC HS3x/4x) & ARCv3 (ARC HS5x/6x) processors. > > There is no hardware available on the consumer market supported by arc770 > > and I think archs38 is the successor anyway. If someone wants to add > > support for real hardware using ARC CPUs later it can be added again. > > Alexey could you please comment on this? Do you think it makes more sense to > focus on archs38? For a time being I'd propose to keep ARC770 as long as it builds since there're quite some HW exist in the wild with these processors and from time to time people appear asking about OpenWrt port for those devices... Though I don't remember anybody contributing anything except us... so maybe there's no interest in it in the community really. Then maybe mark ARC770 as being obsolete/EOL'ed in OpenWrt as well and remove it in the next release cycle. But given even building consumes resources you may want to get rid of this thing right now. Then it's your call ;) -Alexey --- End Message --- ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: arc700 + glibc fails
Hi Rosen, > From: Rosen Penev > Sent: Thursday, December 24, 2020 8:07 AM > To: Alexey Brodkin > Cc: Hauke Mehrtens ; openwrt-de...@openwrt.org > ; Evgeniy Didin ; > arc-...@synopsys.com > Subject: Re: arc700 + glibc fails [snip] > --- a/sysdeps/arc/atomic-machine.h > +++ b/sysdeps/arc/atomic-machine.h > @@ -64,6 +64,10 @@ typedef uintmax_t uatomic_max_t; >__atomic_val_bysize (__arch_compare_and_exchange_val, int, \ >mem, new, old, __ATOMIC_ACQUIRE) > > +#ifdef __ARC700__ > +#define atomic_full_barrier() ({ asm volatile ("sync":::"memory"); }) > +#else > #define atomic_full_barrier() ({ asm volatile ("dmb 3":::"memory"); }) > +#endif > > #endif /* _ARC_BITS_ATOMIC_H */ > --- a/sysdeps/unix/sysv/linux/arc/syscall.S > +++ b/sysdeps/unix/sysv/linux/arc/syscall.S > @@ -24,8 +24,13 @@ ENTRY (syscall) > mov_s r1, r2 > mov_s r2, r3 > mov_s r3, r4 > +#ifdef __ARC700__ > + mov r4, r5 > + mov r5, r6 > +#else > mov_s r4, r5 > mov_s r5, r6 > +#endif > > ARC_TRAP_INSN > brhir0, -4096, L (call_syscall_err) > --- a/sysdeps/unix/sysv/linux/arc/sysdep.h > +++ b/sysdeps/unix/sysv/linux/arc/sysdep.h > @@ -128,7 +128,11 @@ L (call_syscall_err): > ASM_LINE_SEP\ > movr8, __NR_##syscall_name ASM_LINE_SEP\ > ARC_TRAP_INSN ASM_LINE_SEP > > +# ifdef __ARC700__ > +# define ARC_TRAP_INSN trap0 > +# else > # define ARC_TRAP_INSN trap_s 0 > +# endif > > #else /* !__ASSEMBLER__ */ > > @@ -139,7 +143,11 @@ extern long int __syscall_error (long int); > hidden_proto (__syscall_error) > # endif > > +# ifdef __ARC700__ > +# define ARC_TRAP_INSN "trap0 \n\t" > +# else > # define ARC_TRAP_INSN "trap_s 0 \n\t" > +#endif > > # undef INTERNAL_SYSCALL_NCS > # define INTERNAL_SYSCALL_NCS(number, nr_args, args...)\ > > Initial results look promising. I'll test compilation before submitting. LGTM, though it's funny we seem to have this hunk already in upstream: ->8- /* Return nonzero iff ELF header is compatible with the running host. */ static inline int elf_machine_matches_host (const Elf32_Ehdr *ehdr) { return (ehdr->e_machine == EM_ARCV2/* ARC HS. */ || ehdr->e_machine == EM_ARC_COMPACT); /* ARC 700. */ } ->8- [snip] > > I'd suggest for a moment to stop building for ARC700 while this discussion > > is in progress and some people who's opinion I'd like to hear also are > > on the Christmas break. > > ARC700 can be marked as BROKEN which means disabled by default. What does that mean in a sense of support? I.e. it won't be built in OpenWrt infrastructure as well as no binaries, nor packages will be built for the next releases of OpenWrt? If so I guess it might be OK, though read-on... > > So if ARC doesn't add a lot of troubles for the community, let's keep it > > in the project. > Not having hardware is quite limiting. That is, we can compile > binaries but there's no way to test if anything compiled actually > runs. I don't think even QEMU supports ARC. My colleagues are busy upstreaming QEMU port for ARCv2, see https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg5.html. Review is in progress now and once everybody is happy it will be merged (I guess after a couple of re-spins as it usually happens). But the port itself is pretty stable and known to work well with both the Linux as well as Zephyr RTOS (where it's even a part of their SDK, see https://github.com/zephyrproject-rtos/sdk-ng/releases). So if of any interest you may play with it: * Sources are here: https://github.com/foss-for-synopsys-dwc-arc-processors/qemu * Build instructions are here: https://github.com/foss-for-synopsys-dwc-arc-processors/qemu/wiki/Building-QEMU-for-ARC I haven't tried to run images built with OpenWrt but what gets built with Buildroot works nice. So if it makes any sense I may try with OpenWrt and provide detailed instructions on how to get QEMU for ARC up and running. > No musl support is also irksome. Nobody wants uClibc-ng in here and > only a few want glibc in here. If glibc goes, ARC will go with it. Ok, good. We don't have any plans for musl support as of today, but glibc will be supported surely, moreover we plan to submit all our work right to the upstream project as we do with all the other open source components. -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: arc700 + glibc fails
Hi Rosen, Hauke! > On Wed, Dec 23, 2020 at 6:54 AM Hauke Mehrtens wrote: > > > > Hi, > > > > ARC was switched from uClibc to glibc here: > > https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=95f1002acab574c24ad78f4453f091bf5a6731c7 > > uClibc support was removed from OpenWrt in the next commit. > > > > It looks like arc700 is not supported by glibc 2.32, only ARC HS38 is > > supported. Correct, upstream glibc v2.32 only supports ARCv2 as of today. I forgot about that fact during discussion about uClibc removal here https://github.com/openwrt/openwrt/pull/3673#issuecomment-747373099 because we used to add support for ARCompact ISA (i.e. ARC700 cores) via off-the-tree-patch, see https://github.com/foss-for-synopsys-dwc-arc-processors/glibc/commit/571c4c3df73bddbbb012b792a62f03e76b980ef3 and note how simple it is fixing exactly the issue reported here. > > On the arc770 target I am getting this compiler errors in the glibc: > > - > > msort.c: Assembler messages: > > msort.c:201: Error: opcode 'dmb' not supported for target arc700 > > - > > http://buildbot.openwrt.org/master/images/builders/arc770%2Fgeneric/builds/749 > > > > After this one is fixed I get this one: > > - > > ../sysdeps/unix/sysv/linux/arc/syscall.S: Assembler messages: > > ../sysdeps/unix/sysv/linux/arc/syscall.S:27: Error: register must be > > either r0-r3 or r12-r15 for instruction 'mov_s' > > ../sysdeps/unix/sysv/linux/arc/syscall.S:28: Error: register must be > > either r0-r3 or r12-r15 for instruction 'mov_s' > > - > > > > Does anyone plan to fix glibc with arc700 or should we just remove the > > arc770 target, the arhs38 target is compiling? So indeed what we may do here is either to retrofit ARC700 into existing glibc via aforementioned patch in OpenWrt or remove support of ARC700 at all. I'd suggest for a moment to stop building for ARC700 while this discussion is in progress and some people who's opinion I'd like to hear also are on the Christmas break. > I'll look into it. My vote is to remove support for ARC altogether as > it doesn't seem any hardware uses it except for some dev kits. Well that I'd prefer to not do. Even though in upstream OpenWrt indeed we only have 2 development boards which we support, there might be other users (and here I mean companies, not even individuals) which use or plan to use OpenWrt on their ARC-based SoCs/boards. The fact those boards are not exposed to wider audience and are not sold as affordable consumer Wi-Fi routers doesn't mean they don't exist. Moreover with recent introduction of ARCv3 processors which include 64-bit cores we're planning to add their support in OpenWrt as well as soon as our toolchain matures a little bit so that we're confident majority of packages could be built with it normally. So if ARC doesn't add a lot of troubles for the community, let's keep it in the project. > > I think the archs38 target was not runtime tested with glibc, could > > someone with access to the hardware please check if it is still working > > with glibc in master. gdbserver also got ARC support please also check > > if this now works and we can remove the dependency on !arc. Right, there's a chance we haven't run glibc flavor of OpenWrt on ARC, previously focused on uClibc. But we'll do that now, thanks for the hint! -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] packages: Use https instead of git
Hi Imre, On Wed, 2017-02-15 at 13:20 +0100, Imre Kaloz wrote: > Hi Alexey, > > On 2017-02-15 11:11, Alexey Brodkin wrote: > > > > From: Alexey Brodkin > > > > On some [especially corporate] networks non-standard ports are blocked > > and git is one of them. So switch to more convenient https transport. > > > > Signed-off-by: Alexey Brodkin > > Please make this a configuration option instead. Why add another option? What is a difference between https vs git for getting stuff from git repos? As long as you don't need to push your commits https is fine. But given we just pack tarballs from git repos there's no sense in pure git protocol, no? -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] telephony: Use https instead of git
From: Alexey Brodkin On some [especially corporate] networks non-standard ports are blocked and git is one of them. So switch to more convenient https transport. Signed-off-by: Alexey Brodkin --- net/rtpproxy/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rtpproxy/Makefile b/net/rtpproxy/Makefile index 7b4fe90e9dc5..6f1e796b0502 100644 --- a/net/rtpproxy/Makefile +++ b/net/rtpproxy/Makefile @@ -12,7 +12,7 @@ PKG_VERSION:=2.0.0 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=git://github.com/sippy/rtpproxy.git +PKG_SOURCE_URL:=https://github.com/sippy/rtpproxy.git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_VERSION:=d5926892630139bcbe55d1f3fa36764c881648bc PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -- 2.7.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] routing: Use https instead of git
From: Alexey Brodkin On some [especially corporate] networks non-standard ports are blocked and git is one of them. So switch to more convenient https transport. Signed-off-by: Alexey Brodkin --- batmand/Makefile| 2 +- bmx6/Makefile | 2 +- bmx7/Makefile | 2 +- mcproxy/Makefile| 2 +- minimalist-pcproxy/Makefile | 2 +- mrd6/Makefile | 2 +- nodogsplash/Makefile| 2 +- ohybridproxy/Makefile | 2 +- vis/Makefile| 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/batmand/Makefile b/batmand/Makefile index b4ed30171041..425d35594303 100644 --- a/batmand/Makefile +++ b/batmand/Makefile @@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=batmand PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=git://git.open-mesh.org/batmand.git +PKG_SOURCE_URL:=https://git.open-mesh.org/batmand.git PKG_REV:=b67a7087b51d7a5e90d27ac39116d1f57257c86e PKG_VERSION:=1440 PKG_RELEASE:=0 diff --git a/bmx6/Makefile b/bmx6/Makefile index 425c298cde13..52a83addafcc 100644 --- a/bmx6/Makefile +++ b/bmx6/Makefile @@ -29,7 +29,7 @@ PKG_NAME:=bmx6 PKG_SOURCE_PROTO:=git #PKG_SOURCE_URL:=git://bmx6.net/bmx6.git -PKG_SOURCE_URL:=git://github.com/axn/bmx6.git +PKG_SOURCE_URL:=https://github.com/axn/bmx6.git PKG_REV:=2a87b770d3f9c254e3927dc159e2f425f2e0e83a PKG_VERSION:=r2015080701 diff --git a/bmx7/Makefile b/bmx7/Makefile index 215ec727562c..ef3a0a1c7472 100644 --- a/bmx7/Makefile +++ b/bmx7/Makefile @@ -28,7 +28,7 @@ PKG_NAME:=bmx7 PKG_SOURCE_PROTO:=git #PKG_SOURCE_URL:=git://bmx6.net/bmx6.git -PKG_SOURCE_URL:=git://github.com/axn/bmx6.git +PKG_SOURCE_URL:=https://github.com/axn/bmx6.git #PKG_SOURCE_URL:=file:///usr/src/bmx6/bmx6.git PKG_REV:=589ee21b49d370056a24d8931d663626608f3c12 diff --git a/mcproxy/Makefile b/mcproxy/Makefile index c155055a0269..d709097d2e9a 100644 --- a/mcproxy/Makefile +++ b/mcproxy/Makefile @@ -13,7 +13,7 @@ PKG_VERSION:=2014-12-31-$(PKG_SOURCE_VERSION) PKG_RELEASE:=3 PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=git://github.com/mcproxy/mcproxy.git +PKG_SOURCE_URL:=https://github.com/mcproxy/mcproxy.git PKG_MAINTAINER:=Steven Barth PKG_LICENSE:=GPL-2.0+ diff --git a/minimalist-pcproxy/Makefile b/minimalist-pcproxy/Makefile index 36faa8d802e4..8b8cf24c7bd4 100644 --- a/minimalist-pcproxy/Makefile +++ b/minimalist-pcproxy/Makefile @@ -12,7 +12,7 @@ PKG_VERSION:=2015-01-12-$(PKG_SOURCE_VERSION) PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=git://github.com/fingon/minimalist-pcproxy.git +PKG_SOURCE_URL:=https://github.com/fingon/minimalist-pcproxy.git PKG_MAINTAINER:=Markus Stenberg PKG_LICENSE:=GPL-2.0 diff --git a/mrd6/Makefile b/mrd6/Makefile index a20ea26ab2a1..a617e5e90d0f 100644 --- a/mrd6/Makefile +++ b/mrd6/Makefile @@ -13,7 +13,7 @@ PKG_VERSION:=2013-11-30-$(PKG_SOURCE_VERSION) PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=git://github.com/hugosantos/mrd6.git +PKG_SOURCE_URL:=https://github.com/hugosantos/mrd6.git PKG_MAINTAINER:=Steven Barth PKG_LICENSE:=GPL-2.0+ diff --git a/nodogsplash/Makefile b/nodogsplash/Makefile index 971fbac8fe78..edadb8731608 100644 --- a/nodogsplash/Makefile +++ b/nodogsplash/Makefile @@ -14,7 +14,7 @@ PKG_RELEASE:=2 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=git://github.com/nodogsplash/nodogsplash.git +PKG_SOURCE_URL:=https://github.com/nodogsplash/nodogsplash.git PKG_SOURCE_VERSION:=485d6dba05cce7a4ed87c28beaaf1199c0f832cf PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_BUILD_PARALLEL:=1 diff --git a/ohybridproxy/Makefile b/ohybridproxy/Makefile index 7d88f5d862ec..ea23137f3111 100644 --- a/ohybridproxy/Makefile +++ b/ohybridproxy/Makefile @@ -12,7 +12,7 @@ PKG_VERSION:=2016-06-28-$(PKG_SOURCE_VERSION) PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=git://github.com/sbyx/ohybridproxy.git +PKG_SOURCE_URL:=https://github.com/sbyx/ohybridproxy.git PKG_MAINTAINER:=Steven Barth PKG_LICENSE:=GPL-2.0 diff --git a/vis/Makefile b/vis/Makefile index 316224a39f27..af58f5e00390 100644 --- a/vis/Makefile +++ b/vis/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=vis PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=git://git.open-mesh.org/vis.git +PKG_SOURCE_URL:=https://git.open-mesh.org/vis.git PKG_REV:=e141311c6a4fc824efbad536c137ed279905d825 PKG_VERSION:=1440 PKG_RELEASE:=0 -- 2.7.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] packages: Use https instead of git
From: Alexey Brodkin On some [especially corporate] networks non-standard ports are blocked and git is one of them. So switch to more convenient https transport. Signed-off-by: Alexey Brodkin --- libs/dmx_usb_module/Makefile | 2 +- libs/libhttp-parser/Makefile | 2 +- libs/libsoxr/Makefile | 2 +- libs/protobuf-c/Makefile | 2 +- libs/yajl/Makefile| 2 +- net/acme/Makefile | 2 +- net/coova-chilli/Makefile | 2 +- net/horst/Makefile| 2 +- net/linuxptp/Makefile | 2 +- net/lispmob/Makefile | 2 +- net/mii-tool/Makefile | 2 +- net/opentracker/Makefile | 2 +- net/port-mirroring/Makefile | 2 +- net/wifidog/Makefile | 2 +- sound/forked-daapd/Makefile | 2 +- sound/shairplay/Makefile | 2 +- sound/shairport-sync/Makefile | 2 +- sound/shairport/Makefile | 2 +- utils/acl/Makefile| 2 +- utils/ap51-flash/Makefile | 2 +- utils/ecdsautils/Makefile | 2 +- utils/evtest/Makefile | 2 +- utils/mbtools/Makefile| 2 +- utils/openocd/Makefile| 2 +- utils/pps-tools/Makefile | 2 +- utils/rtklib/Makefile | 2 +- utils/rtl-sdr/Makefile| 2 +- utils/sispmctl/Makefile | 2 +- utils/triggerhappy/Makefile | 2 +- 29 files changed, 29 insertions(+), 29 deletions(-) diff --git a/libs/dmx_usb_module/Makefile b/libs/dmx_usb_module/Makefile index d9e458fbe7eb..4487437d3f88 100644 --- a/libs/dmx_usb_module/Makefile +++ b/libs/dmx_usb_module/Makefile @@ -14,7 +14,7 @@ PKG_RELEASE:=0.1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=git://github.com/lowlander/dmx_usb_module.git +PKG_SOURCE_URL:=https://github.com/lowlander/dmx_usb_module.git PKG_SOURCE_PROTO:=git PKG_SOURCE_VERSION:=ee99ca7edbd9e093480ad63341ac007394047bde PKG_MAINTAINER:=Martijn Zilverschoon diff --git a/libs/libhttp-parser/Makefile b/libs/libhttp-parser/Makefile index fe28b4cab263..db0a201f4867 100644 --- a/libs/libhttp-parser/Makefile +++ b/libs/libhttp-parser/Makefile @@ -16,7 +16,7 @@ PKG_LICENSE_FILES:=LICENSE-MIT PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=git://github.com/joyent/http-parser.git +PKG_SOURCE_URL:=https://github.com/nodejs/http-parser.git PKG_SOURCE_PROTO:=git PKG_SOURCE_VERSION:=56f7ad0e2e5a80f79d214015c91e1f17d11d109f diff --git a/libs/libsoxr/Makefile b/libs/libsoxr/Makefile index 9881fbb9d871..52cbf4779baf 100644 --- a/libs/libsoxr/Makefile +++ b/libs/libsoxr/Makefile @@ -13,7 +13,7 @@ PKG_VERSION:=0.1.1 PKG_RELEASE:=3 PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=git://git.code.sf.net/p/soxr/code +PKG_SOURCE_URL:=https://git.code.sf.net/p/soxr/code PKG_SOURCE_VERSION:=$(PKG_VERSION) PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz diff --git a/libs/protobuf-c/Makefile b/libs/protobuf-c/Makefile index 16b2f2be326e..e2d17c06ee16 100644 --- a/libs/protobuf-c/Makefile +++ b/libs/protobuf-c/Makefile @@ -13,7 +13,7 @@ PKG_RELEASE:=$(PKG_SOURCE_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=git://github.com/protobuf-c/protobuf-c.git +PKG_SOURCE_URL:=https://github.com/protobuf-c/protobuf-c.git PKG_SOURCE_PROTO:=git PKG_SOURCE_VERSION:=$(PKG_VERSION) diff --git a/libs/yajl/Makefile b/libs/yajl/Makefile index f9a2877a034e..79bf9b6bc01b 100644 --- a/libs/yajl/Makefile +++ b/libs/yajl/Makefile @@ -18,7 +18,7 @@ PKG_REV:=66cb08ca2ad8581080b626a75dfca266a890afb2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_VERSION:=$(PKG_REV) -PKG_SOURCE_URL:=git://github.com/lloyd/yajl.git +PKG_SOURCE_URL:=https://github.com/lloyd/yajl.git PKG_SOURCE_PROTO:=git include $(INCLUDE_DIR)/package.mk diff --git a/net/acme/Makefile b/net/acme/Makefile index 9d35f8005fcd..a75b5b5bafc4 100644 --- a/net/acme/Makefile +++ b/net/acme/Makefile @@ -14,7 +14,7 @@ PKG_RELEASE:=1 PKG_LICENSE:=GPLv3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE).tar.xz -PKG_SOURCE_URL:=git://github.com/Neilpang/acme.sh.git +PKG_SOURCE_URL:=https://github.com/Neilpang/acme.sh.git PKG_SOURCE_PROTO:=git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE) PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE) diff --git a/net/coova-chilli/Makefile b/net/coova-chilli/Makefile index b926a1d0843d..ed54eb010ed2 100644 --- a/net/coova-chilli/Makefile +++ b/net/coova-chilli/Makefile @@ -15,7 +15,7 @@ PKG_LICENSE_FILES:=COPYING PKG_RELEASE:=4 PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=git://github.com/coova/coova-chilli +PKG_SOURCE_URL:=https://github.com/coova/coova-chilli PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_VERSION:=b93de20a288c01c2ba28e96e31ad6da01627f45f PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz diff --git
[OpenWrt-Devel] [PATCH v2] mac80211: Make wlcore platform-independent
TI wl18xx and wl12xx are Wi-Fi/Bluetooth combo modules that could be found on different existing boards. But it is possible to get those modules as a separate component and use with existing boards as well as new boards equipped with either module may appear so we remove dependency on OMAP instead we add dependency on MMC because this Wi-Fi module uses SDIO interface. Signed-off-by: Alexey Brodkin Cc: Jo-Philipp Wich Cc: Felix Fietkau Cc: Imre Kaloz --- Changes v1 -> v2: * Added dependency on kmod-mmc because SDIO interface is used by TI's wl12/18xx modules. Build-tested for AR7xxx/9xxx and ARC platforms. package/kernel/mac80211/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index 25adbfb..50f225e 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -1378,7 +1378,7 @@ endef define KernelPackage/wlcore $(call KernelPackage/mac80211/Default) TITLE:=TI common driver part - DEPENDS+= @TARGET_omap +kmod-mac80211 +@DRIVER_11N_SUPPORT + DEPENDS+= +kmod-mmc +kmod-mac80211 +@DRIVER_11N_SUPPORT FILES:= \ $(PKG_BUILD_DIR)/drivers/net/wireless/ti/wlcore/wlcore.ko \ $(PKG_BUILD_DIR)/drivers/net/wireless/ti/wlcore/wlcore_sdio.ko -- 2.6.3 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [LEDE-DEV] [PATCH] mac80211: Make wlcore platform-independent
Hi Felix, On Tue, 2016-11-08 at 16:08 +0100, Felix Fietkau wrote: > On 2016-11-08 15:46, Alexey Brodkin wrote: > > > > TI wl18xx and wl12xx are Wi-Fi/Bluetooth combo modules > > that could be found on different existing boards. > > > > But it is possible to get those modules as a separate > > component and use with existing boards as well as > > new boards equipped with either module may appear so we > > remove dependency on OMAP. > > > > Signed-off-by: Alexey Brodkin > > Cc: Jo-Philipp Wich > > Cc: Felix Fietkau > > Cc: Imre Kaloz > > --- > > package/kernel/mac80211/Makefile | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/package/kernel/mac80211/Makefile > > b/package/kernel/mac80211/Makefile > > index 25adbfb..b0c040c 100644 > > --- a/package/kernel/mac80211/Makefile > > +++ b/package/kernel/mac80211/Makefile > > @@ -1378,7 +1378,7 @@ endef > > define KernelPackage/wlcore > > $(call KernelPackage/mac80211/Default) > > TITLE:=TI common driver part > > - DEPENDS+= @TARGET_omap +kmod-mac80211 +@DRIVER_11N_SUPPORT > > + DEPENDS+= +kmod-mac80211 +@DRIVER_11N_SUPPORT > I think this will cause build failures unless you add the missing > dependencies on mmc support (which omap enables in the kernel image, but > other platforms don't). Right! I did build test for Synopsys boards and here as well we have MMC support enabled by default. So let me add that dependency explicitly in the respin. -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] mac80211: Make wlcore platform-independent
TI wl18xx and wl12xx are Wi-Fi/Bluetooth combo modules that could be found on different existing boards. But it is possible to get those modules as a separate component and use with existing boards as well as new boards equipped with either module may appear so we remove dependency on OMAP. Signed-off-by: Alexey Brodkin Cc: Jo-Philipp Wich Cc: Felix Fietkau Cc: Imre Kaloz --- package/kernel/mac80211/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index 25adbfb..b0c040c 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -1378,7 +1378,7 @@ endef define KernelPackage/wlcore $(call KernelPackage/mac80211/Default) TITLE:=TI common driver part - DEPENDS+= @TARGET_omap +kmod-mac80211 +@DRIVER_11N_SUPPORT + DEPENDS+= +kmod-mac80211 +@DRIVER_11N_SUPPORT FILES:= \ $(PKG_BUILD_DIR)/drivers/net/wireless/ti/wlcore/wlcore.ko \ $(PKG_BUILD_DIR)/drivers/net/wireless/ti/wlcore/wlcore_sdio.ko -- 2.6.3 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [LEDE-DEV] [PATCH] linux/arc*: disable MAC frame filter in DW GMAC
Hi Daniel, On Tue, 2016-08-16 at 17:12 +0200, Daniel Golle wrote: > Hi Alexey, > > On Tue, Aug 16, 2016 at 06:06:20AM +0000, Alexey Brodkin wrote: > > > > Hi Felix, > > > > On Wed, 2016-07-27 at 17:19 +0200, Felix Fietkau wrote: > > > > > > On 2016-07-27 14:11, Alexey Brodkin wrote: > > > > > > > > > > > > For some [still unknown] reason in ARC SDP boards > > > > DW GMAC doesn't enter promiscuous mode if eth0 gets > > > > added to the br-lan interface before Ethernet PHY finishes > > > > autonegotiation (PHY gets reset on DW GMAC start). > > > > > > I think this is something we need to look at more closely instead of > > > just papering over it in this way. By the way, arc* aren't the only ones > > > using stmmac, ipq806x uses it as well and might be equally affected. > > > Did you check if the network stack tells the driver to go into promisc > > > mode? Or does the frame filtering registers simply get clobbered > > > somewhere internally? > > > > > > Let's do some more testing and get this fixed properly... > > > > So I spent quite some time with that, short summary could be found here: > > http://lists.infradead.org/pipermail/linux-snps-arc/2016-August/001395.html > > > > Probably most important summary for us here is: > > ->8-- > > Unfortunately I cannot figure out why GMAC behaves that way. > > As per GMAC's databook the only reason for it to not react on a register > > being written is missing input clock but there's no reason for the > > clock to be missing and I don't seem to have a way to check if there's > > a problem with clock or not. > > ->8-- > > > > It worth trying on other boards with DW GMAC but the only other board > > except ARC SDP ones is Cubieboard2 with sunxi-gmac (which is a kind of > > DW GMAC as I may see from its Linux's driver) but on CB2 all works as > > exected. If somebody wants to volunteer I'll be more than happy to work > > with him/her trying to get more datapoints. > > stmac/dwmac works as expected on Oxford/PLXTECH OX82x/NAS782x (oxnas > target on OpenWrt/LEDE) as well. That's good to know but remember what was my use-case to reproduce the problem in questions - DW GMAC must be put in promisq mode while PHY has no link established (the simplest option is to unplug the cable). Have you tried exactly that scenario? -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [LEDE-DEV] [PATCH] linux/arc*: disable MAC frame filter in DW GMAC
Hi Felix, On Wed, 2016-07-27 at 17:19 +0200, Felix Fietkau wrote: > On 2016-07-27 14:11, Alexey Brodkin wrote: > > > > For some [still unknown] reason in ARC SDP boards > > DW GMAC doesn't enter promiscuous mode if eth0 gets > > added to the br-lan interface before Ethernet PHY finishes > > autonegotiation (PHY gets reset on DW GMAC start). > > I think this is something we need to look at more closely instead of > just papering over it in this way. By the way, arc* aren't the only ones > using stmmac, ipq806x uses it as well and might be equally affected. > Did you check if the network stack tells the driver to go into promisc > mode? Or does the frame filtering registers simply get clobbered > somewhere internally? > > Let's do some more testing and get this fixed properly... So I spent quite some time with that, short summary could be found here: http://lists.infradead.org/pipermail/linux-snps-arc/2016-August/001395.html Probably most important summary for us here is: ->8-- Unfortunately I cannot figure out why GMAC behaves that way. As per GMAC's databook the only reason for it to not react on a register being written is missing input clock but there's no reason for the clock to be missing and I don't seem to have a way to check if there's a problem with clock or not. ->8-- It worth trying on other boards with DW GMAC but the only other board except ARC SDP ones is Cubieboard2 with sunxi-gmac (which is a kind of DW GMAC as I may see from its Linux's driver) but on CB2 all works as exected. If somebody wants to volunteer I'll be more than happy to work with him/her trying to get more datapoints. And I do think in the meantime it's good to apply this patch so people get working Wireless AP without extra patching of sources or what's even better with snapshot images. -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [LEDE-DEV] [PATCH] linux/arc*: disable MAC frame filter in DW GMAC
Hi Felix, On Wed, 2016-07-27 at 17:19 +0200, Felix Fietkau wrote: > On 2016-07-27 14:11, Alexey Brodkin wrote: > > > > For some [still unknown] reason in ARC SDP boards > > DW GMAC doesn't enter promiscuous mode if eth0 gets > > added to the br-lan interface before Ethernet PHY finishes > > autonegotiation (PHY gets reset on DW GMAC start). > > I think this is something we need to look at more closely instead of > just papering over it in this way. By the way, arc* aren't the only ones > using stmmac, ipq806x uses it as well and might be equally affected. > Did you check if the network stack tells the driver to go into promisc > mode? Or does the frame filtering registers simply get clobbered > somewhere internally? > Let's do some more testing and get this fixed properly... Yeah I know DW GMAC is used a lot around the globe in different forms. For example I have Cubieboard2 where it is used and there I cannot reproduce the same problem. Luckily I have access to GMAC documentation and so I was able to check that Linux driver correctly programs "MAC frame filter" in different situations and still in some cases even if "PR" bit (bit #0) is set CPU doesn't get packages which DST MAC differs from GMAC's one. I.e. it looks like hardware for some reason operates not in the mode it was instructed/programmed to be in. I tried to check if "MAC frame filter" register gets corrupted every time new value was about to be written there but I haven't seen unexpected values. So either that "corruption" happens as a side-effect of some other operations or internal state-machine enters unexpected state based on some external events. If someone may try my reproduction scenario on other boards with DW GMAC it might give us more datapoints here. So what I do (before connection of network cable!) is: -->8- ifconfig eth0 up brctl addbr br0 brctl addif br0 eth0 ifconfig br0 up tcpdump -vv -i eth0 -n -e -->8- Then connect network cable and see if tcpdump shows anything. -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] toolchain/gcc/arc-2016.03: Fix building on hosts with gcc 6.x
On attempt to build ARC toolchain on the host with gcc 6.1 I saw the same failure as described in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69959 This change adds a back-port of the fix from upstream gcc, see https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=233572 Note the fix is already a part of gcc-5.4 and gcc-6.1 so no need for the same fix for others. Signed-off-by: Alexey Brodkin --- .../arc-2016.03/950-fix-building-with-gcc6.patch | 153 + 1 file changed, 153 insertions(+) create mode 100644 toolchain/gcc/patches/arc-2016.03/950-fix-building-with-gcc6.patch diff --git a/toolchain/gcc/patches/arc-2016.03/950-fix-building-with-gcc6.patch b/toolchain/gcc/patches/arc-2016.03/950-fix-building-with-gcc6.patch new file mode 100644 index 000..e958380 --- /dev/null +++ b/toolchain/gcc/patches/arc-2016.03/950-fix-building-with-gcc6.patch @@ -0,0 +1,153 @@ +From 5dce741e00f86a08a4c174fb3605d896f210ab52 Mon Sep 17 00:00:00 2001 +From: Bernd Edlinger +Date: Wed, 27 Jul 2016 13:30:03 +0300 +Subject: [PATCH] 2016-02-19 Jakub JelinekBernd Edlinger + + +* Make-lang.in: Invoke gperf with -L C++. +* cfns.gperf: Remove prototypes for hash and libc_name_p +inlines. +* cfns.h: Regenerated. +* except.c (nothrow_libfn_p): Adjust. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233572138bc75d-0d04-0410-961f-82ee72b054a4 + +This patch fixes building of gcc-4.x by gcc-6.x, for more details see +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69959 + +Signed-off-by: Alexey Brodkin +--- + gcc/cp/Make-lang.in | 2 +- + gcc/cp/cfns.gperf | 10 ++ + gcc/cp/cfns.h | 41 ++--- + gcc/cp/except.c | 3 ++- + 4 files changed, 19 insertions(+), 37 deletions(-) + +diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in +index dce523a..36a1a97 100644 +--- a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in +@@ -115,7 +115,7 @@ else + # deleting the $(srcdir)/cp/cfns.h file. + $(srcdir)/cp/cfns.h: + endif +- gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \ ++ gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \ + $(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h + + # +diff --git a/gcc/cp/cfns.gperf b/gcc/cp/cfns.gperf +index c4c4e2a..5c40933 100644 +--- a/gcc/cp/cfns.gperf b/gcc/cp/cfns.gperf +@@ -1,3 +1,5 @@ ++%language=C++ ++%define class-name libc_name + %{ + /* Copyright (C) 2000-2013 Free Software Foundation, Inc. + +@@ -16,14 +18,6 @@ for more details. + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING3. If not see + <http://www.gnu.org/licenses/>. */ +-#ifdef __GNUC__ +-__inline +-#endif +-static unsigned int hash (const char *, unsigned int); +-#ifdef __GNUC__ +-__inline +-#endif +-const char * libc_name_p (const char *, unsigned int); + %} + %% + # The standard C library functions, for feeding to gperf; the result is used +diff --git a/gcc/cp/cfns.h b/gcc/cp/cfns.h +index 42dd3cf..6c79864 100644 +--- a/gcc/cp/cfns.h b/gcc/cp/cfns.h +@@ -1,5 +1,5 @@ +-/* ANSI-C code produced by gperf version 3.0.3 */ +-/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */ ++/* C++ code produced by gperf version 3.0.4 */ ++/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ --output-file cfns.h cfns.gperf */ + + #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ +@@ -28,7 +28,7 @@ + #error "gperf generated tables don't work with this execution character set. Please report a bug to ." + #endif + +-#line 1 "cfns.gperf" ++#line 3 "cfns.gperf" + + /* Copyright (C) 2000-2013 Free Software Foundation, Inc. + +@@ -47,25 +47,18 @@ for more details. + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING3. If not see + <http://www.gnu.org/licenses/>. */ +-#ifdef __GNUC__ +-__inline +-#endif +-static unsigned int hash (const char *, unsigned int); +-#ifdef __GNUC__ +-__inline +-#endif +-const char * libc_name_p (const char *, unsigned int); + /* maximum key range = 391, duplicates = 0 */ + +-#ifdef __GNUC__ +-__inline +-#else +-#ifdef __cplusplus +-inline +-#endif +-#endif +-static unsigned int +-hash (register const char *str, register unsigned int len) ++class libc_name ++{ ++private: ++ static inline unsigned int hash (const char *str, unsigned int len); ++public: ++ static const char *libc_name_p (const char *str, unsigned int len); ++}; ++ ++inline unsigned int ++libc_name::hash (register const char *str, register un
[OpenWrt-Devel] [PATCH] linux/arc*: disable MAC frame filter in DW GMAC
For some [still unknown] reason in ARC SDP boards DW GMAC doesn't enter promiscuous mode if eth0 gets added to the br-lan interface before Ethernet PHY finishes autonegotiation (PHY gets reset on DW GMAC start). As a work-around we completely disable frame filtering in GMAC hardware which gives us working bridge that consists of eth0 and wlan0 (USB Wi-Fi dongle). I.e. we finally have working "Dumb AP" setup made of ARC AXS10x boards. Given this is pretty ugly hack we're applying it only for affected platforms which do require eth0 to enter promiscuous mode to operate in a bridge with wlan0. Signed-off-by: Alexey Brodkin --- ...-stmmac-Disable-fame-filtering-completely.patch | 36 ++ ...-stmmac-Disable-fame-filtering-completely.patch | 36 ++ 2 files changed, 72 insertions(+) create mode 100644 target/linux/arc770/patches-4.4/700-stmmac-Disable-fame-filtering-completely.patch create mode 100644 target/linux/archs38/patches-4.4/700-stmmac-Disable-fame-filtering-completely.patch diff --git a/target/linux/arc770/patches-4.4/700-stmmac-Disable-fame-filtering-completely.patch b/target/linux/arc770/patches-4.4/700-stmmac-Disable-fame-filtering-completely.patch new file mode 100644 index 000..d47f155 --- /dev/null +++ b/target/linux/arc770/patches-4.4/700-stmmac-Disable-fame-filtering-completely.patch @@ -0,0 +1,36 @@ +From 0031b9011cb2b2b1de4dbb4f9620303aec760db4 Mon Sep 17 00:00:00 2001 +From: Alexey Brodkin +Date: Wed, 27 Jul 2016 11:33:14 +0300 +Subject: [PATCH] stmmac: Disable fame filtering completely + +For some [still unknown] reason in ARC SDP boards +DW GMAC doesn't enter promiscuous mode if eth0 gets +added to the br-lan interface before Ethernet PHY finishes +autonegotiation (PHY gets reset on DW GMAC start). + +As a work-around we completely disable frame filtering +in GMAC hardware which gives us working bridge that consists +of eth0 and wlan0 (USB Wi-Fi dongle). I.e. we finally have +working "Dumb AP" setup made of ARC AXS10x boards. + +Signed-off-by: Alexey Brodkin +--- + drivers/net/ethernet/stmicro/stmmac/common.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/stmicro/stmmac/common.h +index 623c6ed..6396b81 100644 +--- a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/stmicro/stmmac/common.h +@@ -42,7 +42,7 @@ + #define DWMAC_CORE_3_50 0x35 + + #undef FRAME_FILTER_DEBUG +-/* #define FRAME_FILTER_DEBUG */ ++#define FRAME_FILTER_DEBUG + + /* Extra statistic and debug information exposed by ethtool */ + struct stmmac_extra_stats { +-- +2.7.4 + diff --git a/target/linux/archs38/patches-4.4/700-stmmac-Disable-fame-filtering-completely.patch b/target/linux/archs38/patches-4.4/700-stmmac-Disable-fame-filtering-completely.patch new file mode 100644 index 000..d47f155 --- /dev/null +++ b/target/linux/archs38/patches-4.4/700-stmmac-Disable-fame-filtering-completely.patch @@ -0,0 +1,36 @@ +From 0031b9011cb2b2b1de4dbb4f9620303aec760db4 Mon Sep 17 00:00:00 2001 +From: Alexey Brodkin +Date: Wed, 27 Jul 2016 11:33:14 +0300 +Subject: [PATCH] stmmac: Disable fame filtering completely + +For some [still unknown] reason in ARC SDP boards +DW GMAC doesn't enter promiscuous mode if eth0 gets +added to the br-lan interface before Ethernet PHY finishes +autonegotiation (PHY gets reset on DW GMAC start). + +As a work-around we completely disable frame filtering +in GMAC hardware which gives us working bridge that consists +of eth0 and wlan0 (USB Wi-Fi dongle). I.e. we finally have +working "Dumb AP" setup made of ARC AXS10x boards. + +Signed-off-by: Alexey Brodkin +--- + drivers/net/ethernet/stmicro/stmmac/common.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/stmicro/stmmac/common.h +index 623c6ed..6396b81 100644 +--- a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/stmicro/stmmac/common.h +@@ -42,7 +42,7 @@ + #define DWMAC_CORE_3_50 0x35 + + #undef FRAME_FILTER_DEBUG +-/* #define FRAME_FILTER_DEBUG */ ++#define FRAME_FILTER_DEBUG + + /* Extra statistic and debug information exposed by ethtool */ + struct stmmac_extra_stats { +-- +2.7.4 + -- 2.7.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] linux: Get rid of 000-keep_initrafs_the_default.patch
With that patch in place for initramfs no additional options are reported for "/" partition. What's really important is missing info about sizes. Which in its turn makes opkg think that there's no space on "/" partition to install software. I understand that's a sort of corner-case, people rarely install packages on ramfs but anyways why not? Just in case that's what I see with the patch: -->8 root@lede:/# cat /proc/mounts rootfs / rootfs rw 0 0 proc /proc proc rw,nosuid,nodev,noexec,noatime 0 0 sysfs /sys sysfs rw,nosuid,nodev,noexec,noatime 0 0 tmpfs /tmp tmpfs rw,nosuid,nodev,noatime 0 0 tmpfs /dev tmpfs rw,nosuid,relatime,size=512k,mode=755 0 0 devpts /dev/pts devpts rw,nosuid,noexec,relatime,mode=600 0 0 debugfs /sys/kernel/debug debugfs rw,noatime 0 0 -->8 And without: -->8 root@lede:/# cat /proc/mounts rootfs / rootfs rw,size=256168k,nr_inodes=32021 0 0 proc /proc proc rw,nosuid,nodev,noexec,noatime 0 0 sysfs /sys sysfs rw,nosuid,nodev,noexec,noatime 0 0 tmpfs /tmp tmpfs rw,nosuid,nodev,noatime 0 0 tmpfs /dev tmpfs rw,nosuid,relatime,size=512k,mode=755 0 0 devpts /dev/pts devpts rw,nosuid,noexec,relatime,mode=600 0 0 debugfs /sys/kernel/debug debugfs rw,noatime 0 0 -->8 Note how different is entry for rootfs. And given there's no known rationale for that patch we're getting rid of it. Signed-off-by: Alexey Brodkin Cc: Jonas Gorski Cc: Rafał Miłecki Cc: John Crispin Cc: Felix Fietkau --- .../000-keep_initrafs_the_default.patch| 25 -- .../000-keep_initrafs_the_default.patch| 25 -- .../000-keep_initrafs_the_default.patch| 25 -- 3 files changed, 75 deletions(-) delete mode 100644 target/linux/generic/patches-3.18/000-keep_initrafs_the_default.patch delete mode 100644 target/linux/generic/patches-4.1/000-keep_initrafs_the_default.patch delete mode 100644 target/linux/generic/patches-4.4/000-keep_initrafs_the_default.patch diff --git a/target/linux/generic/patches-3.18/000-keep_initrafs_the_default.patch b/target/linux/generic/patches-3.18/000-keep_initrafs_the_default.patch deleted file mode 100644 index d4164ca..000 --- a/target/linux/generic/patches-3.18/000-keep_initrafs_the_default.patch +++ /dev/null @@ -1,25 +0,0 @@ -Upstream changed the default rootfs to tmpfs when none has been passed -to the kernel - this doesn't fit our purposes, so change it back. - -Signed-off-by: Imre Kaloz - a/init/do_mounts.c -+++ b/init/do_mounts.c -@@ -623,6 +623,7 @@ int __init init_rootfs(void) - if (err) - return err; - -+#if 0 - if (IS_ENABLED(CONFIG_TMPFS) && !saved_root_name[0] && - (!root_fs_names || strstr(root_fs_names, "tmpfs"))) { - err = shmem_init(); -@@ -630,6 +631,9 @@ int __init init_rootfs(void) - } else { - err = init_ramfs_fs(); - } -+#else -+ err = init_ramfs_fs(); -+#endif - - if (err) - unregister_filesystem(&rootfs_fs_type); diff --git a/target/linux/generic/patches-4.1/000-keep_initrafs_the_default.patch b/target/linux/generic/patches-4.1/000-keep_initrafs_the_default.patch deleted file mode 100644 index 5e56d44..000 --- a/target/linux/generic/patches-4.1/000-keep_initrafs_the_default.patch +++ /dev/null @@ -1,25 +0,0 @@ -Upstream changed the default rootfs to tmpfs when none has been passed -to the kernel - this doesn't fit our purposes, so change it back. - -Signed-off-by: Imre Kaloz - a/init/do_mounts.c -+++ b/init/do_mounts.c -@@ -628,6 +628,7 @@ int __init init_rootfs(void) - if (err) - return err; - -+#if 0 - if (IS_ENABLED(CONFIG_TMPFS) && !saved_root_name[0] && - (!root_fs_names || strstr(root_fs_names, "tmpfs"))) { - err = shmem_init(); -@@ -635,6 +636,9 @@ int __init init_rootfs(void) - } else { - err = init_ramfs_fs(); - } -+#else -+ err = init_ramfs_fs(); -+#endif - - if (err) - unregister_filesystem(&rootfs_fs_type); diff --git a/target/linux/generic/patches-4.4/000-keep_initrafs_the_default.patch b/target/linux/generic/patches-4.4/000-keep_initrafs_the_default.patch deleted file mode 100644 index e6f1be4..000 --- a/target/linux/generic/patches-4.4/000-keep_initrafs_the_default.patch +++ /dev/null @@ -1,25 +0,0 @@ -Upstream changed the default rootfs to tmpfs when none has been passed -to the kernel - this doesn't fit our purposes, so change it back. - -Signed-off-by: Imre Kaloz - a/init/do_mounts.c -+++ b/init/do_mounts.c -@@ -633,6 +633,7 @@ int __init init_rootfs(void) - if (err) - return err;
[OpenWrt-Devel] [PATCH] sunxi/pcduino3: Remove selection of absent rtl8188eu
Since commit 217a64375547 "wireless: remove rtl8188eu (staging)" there's no point in selection of the missing module. Signed-off-by: Alexey Brodkin Cc: John Crispin Cc: Zoltan Herpai --- target/linux/sunxi/profiles/pcduino3.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/sunxi/profiles/pcduino3.mk b/target/linux/sunxi/profiles/pcduino3.mk index 4d6dcb1..1c4e753 100644 --- a/target/linux/sunxi/profiles/pcduino3.mk +++ b/target/linux/sunxi/profiles/pcduino3.mk @@ -9,7 +9,7 @@ define Profile/Linksprite_pcDuino3 NAME:=pcDuino3 PACKAGES:=\ uboot-sunxi-Linksprite_pcDuino3 kmod-sun4i-emac kmod-rtc-sunxi \ - kmod-net-rtl8188eu kmod-ata-core kmod-ata-sunxi + kmod-ata-core kmod-ata-sunxi endef define Profile/Linksprite_pcDuino3/Description -- 2.7.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Do we really need 000-keep_initrafs_the_default.patch?
Hello, I'm wondering why there's a need for "000-keep_initrafs_the_default.patch"? It could be found here: -->8 target/linux/generic/patches-3.18/000-keep_initrafs_the_default.patch target/linux/generic/patches-4.1/000-keep_initrafs_the_default.patch target/linux/generic/patches-4.4/000-keep_initrafs_the_default.patch -->8 With that patch in place for initramfs no additional options are reported for "/" partition. What's really important is missing info about sizes. Which in its turn makes opkg think that there's no space on "/" partition to install software. I understand that's a sort of corner-case, people rarely install packages on ramfs but anyways why not? Just in case that's what I see with the patch: -->8 root@lede:/# cat /proc/mounts rootfs / rootfs rw 0 0 proc /proc proc rw,nosuid,nodev,noexec,noatime 0 0 sysfs /sys sysfs rw,nosuid,nodev,noexec,noatime 0 0 tmpfs /tmp tmpfs rw,nosuid,nodev,noatime 0 0 tmpfs /dev tmpfs rw,nosuid,relatime,size=512k,mode=755 0 0 devpts /dev/pts devpts rw,nosuid,noexec,relatime,mode=600 0 0 debugfs /sys/kernel/debug debugfs rw,noatime 0 0 -->8 And without: -->8 root@lede:/# cat /proc/mounts rootfs / rootfs rw,size=256168k,nr_inodes=32021 0 0 proc /proc proc rw,nosuid,nodev,noexec,noatime 0 0 sysfs /sys sysfs rw,nosuid,nodev,noexec,noatime 0 0 tmpfs /tmp tmpfs rw,nosuid,nodev,noatime 0 0 tmpfs /dev tmpfs rw,nosuid,relatime,size=512k,mode=755 0 0 devpts /dev/pts devpts rw,nosuid,noexec,relatime,mode=600 0 0 debugfs /sys/kernel/debug debugfs rw,noatime 0 0 -->8 Note how different is entry for rootfs. If there're no objections I'll go ahead and send a patch that gets rid of all 3 patches mentioned above. -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Add ARC platforms to platforms wiki
Hi Florian, On Thu, 2016-07-21 at 11:23 -0700, Florian Fainelli wrote: > On 07/21/2016 10:45 AM, Alexey Brodkin wrote: > > > > Hello, > > > > I'm wondering if there's a chance to add information about ARC > > platforms in the Wiki here https://dev.openwrt.org/wiki/platforms? > > Done Thanks a lot! -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Add ARC platforms to platforms wiki
Hello, I'm wondering if there's a chance to add information about ARC platforms in the Wiki here https://dev.openwrt.org/wiki/platforms? I think something like this will work == Target name Platform Architecture Endianness Developer(s)Known Issues/Notes -- arc770 Synopsys DesignWare ARC 770D ARC little abrodkin arc770 archs38 Synopsys DesignWare ARC HS38 ARC little abrodkin archs38 == Regards, Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] linux: arc: disable kernel unwinding to fix modules loading
With update of binutils for ARC (this is now based on upstream 2.26) we noticed issues with loadable kernel modules. Something like that was happening: ->8--- mbcache: unknown relocation: 49 insmod: can't insert './mbcache.ko': invalid module format ->8--- More details could be found in that discussion in binutils mailing list: http://thread.gmane.org/gmane.comp.gnu.binutils/74662 As of now the simplest work-around is to disable in-kernel unwinder for now. That will at least allow us to use modules again. Signed-off-by: Alexey Brodkin Cc: Vineet Gupta Cc: John Crispin --- target/linux/arc770/config-4.4 | 3 +-- target/linux/archs38/config-4.4 | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/target/linux/arc770/config-4.4 b/target/linux/arc770/config-4.4 index 87fd7e3..d6905d7 100644 --- a/target/linux/arc770/config-4.4 +++ b/target/linux/arc770/config-4.4 @@ -18,7 +18,7 @@ CONFIG_ARC_CURR_IN_REG=y CONFIG_ARC_DBG=y # CONFIG_ARC_DBG_TLB_MISS_COUNT is not set # CONFIG_ARC_DBG_TLB_PARANOIA is not set -CONFIG_ARC_DW2_UNWIND=y +# CONFIG_ARC_DW2_UNWIND is not set CONFIG_ARC_EMUL_UNALIGNED=y # CONFIG_ARC_FPU_SAVE_RESTORE is not set CONFIG_ARC_HAS_DCACHE=y @@ -78,7 +78,6 @@ CONFIG_HAVE_FUTEX_CMPXCHG=y CONFIG_HAVE_IOREMAP_PROT=y CONFIG_HAVE_LATENCYTOP_SUPPORT=y CONFIG_HAVE_MEMBLOCK=y -CONFIG_HAVE_MOD_ARCH_SPECIFIC=y CONFIG_HAVE_NET_DSA=y CONFIG_HAVE_OPROFILE=y CONFIG_HAVE_PERF_EVENTS=y diff --git a/target/linux/archs38/config-4.4 b/target/linux/archs38/config-4.4 index 9ea33c6..c7dc264 100644 --- a/target/linux/archs38/config-4.4 +++ b/target/linux/archs38/config-4.4 @@ -15,7 +15,7 @@ CONFIG_ARC_CURR_IN_REG=y CONFIG_ARC_DBG=y # CONFIG_ARC_DBG_TLB_MISS_COUNT is not set # CONFIG_ARC_DBG_TLB_PARANOIA is not set -CONFIG_ARC_DW2_UNWIND=y +# CONFIG_ARC_DW2_UNWIND is not set CONFIG_ARC_HAS_COH_CACHES=y CONFIG_ARC_HAS_DCACHE=y # CONFIG_ARC_HAS_DCCM is not set @@ -85,7 +85,6 @@ CONFIG_HAVE_FUTEX_CMPXCHG=y CONFIG_HAVE_IOREMAP_PROT=y CONFIG_HAVE_LATENCYTOP_SUPPORT=y CONFIG_HAVE_MEMBLOCK=y -CONFIG_HAVE_MOD_ARCH_SPECIFIC=y CONFIG_HAVE_NET_DSA=y CONFIG_HAVE_OPROFILE=y CONFIG_HAVE_PERF_EVENTS=y @@ -175,7 +174,6 @@ CONFIG_SRCU=y CONFIG_STACKTRACE=y CONFIG_STMMAC_ETH=y CONFIG_STMMAC_PLATFORM=y -# CONFIG_SUNXI_SRAM is not set CONFIG_TICK_CPU_ACCOUNTING=y CONFIG_UNINLINE_SPIN_UNLOCK=y CONFIG_USB_SUPPORT=y -- 2.5.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] toolchain/gdb: Use correct folder name for ARC patches
Even though ARC tools were released as arc-2016.03 we have a little bit different version name for GDB. That's because both Binutils and GDB come from the same git repo but from different branches (and so different tags). Also removing an extra patch that made its way into release. Signed-off-by: Alexey Brodkin --- .../100-no_extern_inline.patch | 0 .../{arc-2016.03 => arc-2016.03-gdb}/110-no_testsuite.patch | 0 .../120-fix-compile-flag-mismatch.patch | 0 .../gdb/patches/arc-2016.03/200-arc-fix-target-mask.patch | 13 - 4 files changed, 13 deletions(-) rename toolchain/gdb/patches/{arc-2016.03 => arc-2016.03-gdb}/100-no_extern_inline.patch (100%) rename toolchain/gdb/patches/{arc-2016.03 => arc-2016.03-gdb}/110-no_testsuite.patch (100%) rename toolchain/gdb/patches/{arc-2016.03 => arc-2016.03-gdb}/120-fix-compile-flag-mismatch.patch (100%) delete mode 100644 toolchain/gdb/patches/arc-2016.03/200-arc-fix-target-mask.patch diff --git a/toolchain/gdb/patches/arc-2016.03/100-no_extern_inline.patch b/toolchain/gdb/patches/arc-2016.03-gdb/100-no_extern_inline.patch similarity index 100% rename from toolchain/gdb/patches/arc-2016.03/100-no_extern_inline.patch rename to toolchain/gdb/patches/arc-2016.03-gdb/100-no_extern_inline.patch diff --git a/toolchain/gdb/patches/arc-2016.03/110-no_testsuite.patch b/toolchain/gdb/patches/arc-2016.03-gdb/110-no_testsuite.patch similarity index 100% rename from toolchain/gdb/patches/arc-2016.03/110-no_testsuite.patch rename to toolchain/gdb/patches/arc-2016.03-gdb/110-no_testsuite.patch diff --git a/toolchain/gdb/patches/arc-2016.03/120-fix-compile-flag-mismatch.patch b/toolchain/gdb/patches/arc-2016.03-gdb/120-fix-compile-flag-mismatch.patch similarity index 100% rename from toolchain/gdb/patches/arc-2016.03/120-fix-compile-flag-mismatch.patch rename to toolchain/gdb/patches/arc-2016.03-gdb/120-fix-compile-flag-mismatch.patch diff --git a/toolchain/gdb/patches/arc-2016.03/200-arc-fix-target-mask.patch b/toolchain/gdb/patches/arc-2016.03/200-arc-fix-target-mask.patch deleted file mode 100644 index 7e51d588..000 --- a/toolchain/gdb/patches/arc-2016.03/200-arc-fix-target-mask.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/bfd/config.bfd b/bfd/config.bfd -index 5145d4a..a9c9c99 100644 a/bfd/config.bfd -+++ b/bfd/config.bfd -@@ -275,7 +275,7 @@ case "${targ}" in - targ_defvec=am33_elf32_linux_vec - ;; - -- arc*-*-elf* | arc*-*-linux-uclibc*) -+ arc*-*-elf* | arc*-*-linux-*) - targ_defvec=arc_elf32_le_vec - targ_selvecs=arc_elf32_be_vec - ;; -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] package/devel/gdb-arc: Add target GDB for ARC
ARC port of GDB is not yet upstream so we need to use sources from Synopsys GitHub repo. Given Synopys' commitment to upstream ARC support in GDB in the nearest future it might be simpler to add a separate package for ARC GDB instead of patching generic GDB package. This way once ARC GDB stuff gets uptreamed we'll only need to remove that new "gdb-arc" package. Note 1 very minor change in generic gdb package was done - it now depends on !arc (while "gdb-arc" depends on "arc"). Signed-off-by: Alexey Brodkin --- package/devel/{gdb => gdb-arc}/Makefile| 44 -- .../gdb-arc/patches/100-no_extern_inline.patch | 32 .../devel/gdb-arc/patches/110-no_testsuite.patch | 21 +++ .../patches/120-fix-compile-flag-mismatch.patch| 11 ++ package/devel/gdb/Makefile | 2 +- 5 files changed, 90 insertions(+), 20 deletions(-) copy package/devel/{gdb => gdb-arc}/Makefile (64%) create mode 100644 package/devel/gdb-arc/patches/100-no_extern_inline.patch create mode 100644 package/devel/gdb-arc/patches/110-no_testsuite.patch create mode 100644 package/devel/gdb-arc/patches/120-fix-compile-flag-mismatch.patch diff --git a/package/devel/gdb/Makefile b/package/devel/gdb-arc/Makefile similarity index 64% copy from package/devel/gdb/Makefile copy to package/devel/gdb-arc/Makefile index f6d5fec..c42b108 100644 --- a/package/devel/gdb/Makefile +++ b/package/devel/gdb-arc/Makefile @@ -7,13 +7,15 @@ include $(TOPDIR)/rules.mk -PKG_NAME:=gdb -PKG_VERSION:=7.11 +PKG_NAME:=gdb-arc +PKG_VERSION:=arc-2016.03-gdb PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=@GNU/gdb -PKG_MD5SUM:=b5c784685e1cde65ba135feea86b6d75 +PKG_SOURCE:=gdb-arc-2016.03-gdb.tar.gz +PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/archive/$(PKG_VERSION) +PKG_MD5SUM:=775caaf6385c16f20b6f53c0a2b95f79 + +PKG_BUILD_DIR:=$(BUILD_DIR)/binutils-gdb-arc-2016.03-gdb PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 @@ -21,31 +23,31 @@ PKG_LICENSE:=GPL-3.0+ include $(INCLUDE_DIR)/package.mk -define Package/gdb/Default +define Package/gdb-arc/Default SECTION:=devel CATEGORY:=Development - DEPENDS:=+!USE_MUSL:libthread-db +PACKAGE_zlib:zlib + DEPENDS:=+!USE_MUSL:libthread-db +PACKAGE_zlib:zlib @arc URL:=http://www.gnu.org/software/gdb/ endef -define Package/gdb -$(call Package/gdb/Default) - TITLE:=GNU Debugger +define Package/gdb-arc +$(call Package/gdb-arc/Default) + TITLE:=GNU Debugger for ARC DEPENDS+=+libreadline +libncurses +zlib endef -define Package/gdb/description +define Package/gdb-arc/description GDB, the GNU Project debugger, allows you to see what is going on `inside' another program while it executes -- or what another program was doing at the moment it crashed. endef -define Package/gdbserver -$(call Package/gdb/Default) +define Package/gdbserver-arc +$(call Package/gdb-arc/Default) TITLE:=Remote server for GNU Debugger endef -define Package/gdbserver/description +define Package/gdbserver-arc/description GDBSERVER is a program that allows you to run GDB on a different machine than the one which is running the program being debugged. endef @@ -55,7 +57,11 @@ CONFIGURE_ARGS+= \ --with-system-readline \ --without-expat \ --without-lzma \ - --disable-werror + --disable-werror \ + --disable-binutils \ + --disable-ld \ + --disable-gas \ + --disable-sim CONFIGURE_VARS+= \ ac_cv_search_tgetent="$(TARGET_LDFLAGS) -lncurses -lreadline" @@ -74,15 +80,15 @@ define Build/Install install-gdb endef -define Package/gdb/install +define Package/gdb-arc/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdb $(1)/usr/bin/ endef -define Package/gdbserver/install +define Package/gdbserver-arc/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdbserver $(1)/usr/bin/ endef -$(eval $(call BuildPackage,gdb)) -$(eval $(call BuildPackage,gdbserver)) +$(eval $(call BuildPackage,gdb-arc)) +$(eval $(call BuildPackage,gdbserver-arc)) diff --git a/package/devel/gdb-arc/patches/100-no_extern_inline.patch b/package/devel/gdb-arc/patches/100-no_extern_inline.patch new file mode 100644 index 000..8c18c6e --- /dev/null +++ b/package/devel/gdb-arc/patches/100-no_extern_inline.patch @@ -0,0 +1,32 @@ +--- a/sim/common/sim-arange.c b/sim/common/sim-arange.c +@@ -280,11 +280,7 @@ sim_addr_range_delete (ADDR_RANGE *ar, a + build_search_tree (ar); + } + +-#endif /* DEFINE_NON_INLINE_P */ +- +-#if DEFINE_INLINE_P +- +-SIM_ARANGE_INLINE int ++int + sim_addr_range_hit_p (ADDR_RANGE *ar, address_word addr) + { + ADDR_RANGE_TREE *t = ar->range_tree; +@@ -301,4 +297,4 @@ sim_addr_range_hit_p (ADDR_RANGE *ar, ad + return 0; + } + +-#endif /*
Re: [OpenWrt-Devel] [LEDE-DEV] [PATCH] package/devel/gdb: Add support of ARC gdb
Hi John, On Fri, 2016-06-03 at 11:09 +0200, John Crispin wrote: > Hi, > > On 01/06/2016 17:32, Alexey Brodkin wrote: > > > > As of today gdb port for ARC is not yet in upstream even though > > we're working hard on that. > > > > Still to allow ARC users to debug user-space apps on top of > > Linux kernel we're adding here support for building GDB from > > sources hosted on our GitHub here: > > https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/releases/tag/arc-2016.03-gdb > > > > Likewise for host GDB sources that come from unified git repository > > (which is the case for upstream binutils/gdb today) we need to disable > > building of binutils in gdb: > > -->8-- > > --disable-binutils > > --disable-ld > > --disable-gas > > -->8-- > > > these work for !arc targets. disabling them for all targets because they > are broken on arc seem weird even if they might not be used. > > rather than cluttering the makefile how about marking the packahe broken > for arc and adding a new one called gdb-arc that depends on arc only. > this will allow us to keep gdb clean and just drop the gdb-arc package > once the fixes treacled down the tree. Well all 3 options except "--sim" are very valid because modern GDB sources come from "unified" git repo where binutils co-exist with gdb. That's done on purpose because a lot of stuff indeed is the same in both projects. And there's really no point in building either binutils, ld or gas when we're building GDB. Disabling those options we at least saving some time and in some cases may escape build failures. Mentioned build failures might happen with some even release versions of GDB tarballs. Again that is because gdb comes from the same unified repo BUT (and that's important) still from the separate branch and so some parts of binutils might be taken from "binutils" branch in unstable state. In other words disabling build of not used components is pretty safe and future-proof. And simulator falls here as well - we don't need it anyways for either arch/board. As for adding a separate package... we'll need to propagate new Kconfig symbol in other files and so instead of limiting changes to 1 file we'll spread our contamination all over source tree. Do we really want it? -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] package/devel/gdb: Add support of ARC gdb
Hi Dirk, On Wed, 2016-06-01 at 18:21 +0200, Dirk Neukirchen wrote: > On 01.06.2016 17:32, Alexey Brodkin wrote: > > > > Also we disable sim because if the following breakage while > > building with it: > > >8 > > /usr/bin/env bash ./../common/genmloop.sh -shell /usr/bin/env bash \ > > -mono -fast -pbb -switch sem5-switch.c \ > > -cpu a5f -infile ./mloop5.in \ > > -outfile-suffix 5 > > unknown option: bash > > Makefile:699: recipe for target 'stamp-5mloop' failed > > make[7]: *** [stamp-5mloop] Error 1 > > >8 > rules.mk with its SHELL:=/usr/bin/env bash is the culprit I think so. > I had some issues when I set CONFIG_SHELL in the same way > - using SHELL:=/bin/bash probably fixes this but might have > other side effects or breakage (globally/for other packages) Indeed. But anyways we don't need GDB's simulator to be built here, so change itself is pretty sane. -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] package/devel/gdb: Add support of ARC gdb
As of today gdb port for ARC is not yet in upstream even though we're working hard on that. Still to allow ARC users to debug user-space apps on top of Linux kernel we're adding here support for building GDB from sources hosted on our GitHub here: https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/releases/tag/arc-2016.03-gdb Likewise for host GDB sources that come from unified git repository (which is the case for upstream binutils/gdb today) we need to disable building of binutils in gdb: -->8-- --disable-binutils --disable-ld --disable-gas -->8-- Also we disable sim because if the following breakage while building with it: >8 /usr/bin/env bash ./../common/genmloop.sh -shell /usr/bin/env bash \ -mono -fast -pbb -switch sem5-switch.c \ -cpu a5f -infile ./mloop5.in \ -outfile-suffix 5 unknown option: bash Makefile:699: recipe for target 'stamp-5mloop' failed make[7]: *** [stamp-5mloop] Error 1 >8-------- Signed-off-by: Alexey Brodkin Cc: John Crispin Cc: Felix Fietkau --- package/devel/gdb/Makefile | 23 ++-- .../001-gdb-pr14523-mips-signal-number.patch | 0 .../gdb/patches/{ => 7.11}/100-musl_fix.patch | 0 .../patches/arc-2016.03/100-no_extern_inline.patch | 32 ++ .../gdb/patches/arc-2016.03/110-no_testsuite.patch | 21 ++ .../120-fix-compile-flag-mismatch.patch| 11 .../arc-2016.03/200-arc-fix-target-mask.patch | 13 + 7 files changed, 98 insertions(+), 2 deletions(-) rename package/devel/gdb/patches/{ => 7.11}/001-gdb-pr14523-mips-signal-number.patch (100%) rename package/devel/gdb/patches/{ => 7.11}/100-musl_fix.patch (100%) create mode 100644 package/devel/gdb/patches/arc-2016.03/100-no_extern_inline.patch create mode 100644 package/devel/gdb/patches/arc-2016.03/110-no_testsuite.patch create mode 100644 package/devel/gdb/patches/arc-2016.03/120-fix-compile-flag-mismatch.patch create mode 100644 package/devel/gdb/patches/arc-2016.03/200-arc-fix-target-mask.patch diff --git a/package/devel/gdb/Makefile b/package/devel/gdb/Makefile index f6d5fec..2e6b332 100644 --- a/package/devel/gdb/Makefile +++ b/package/devel/gdb/Makefile @@ -8,12 +8,27 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gdb + +ifeq ($(CONFIG_arc),y) +PKG_VERSION:=arc-2016.03-gdb + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/archive/$(PKG_VERSION) +PKG_MD5SUM:=775caaf6385c16f20b6f53c0a2b95f79 +GDB_DIR:=binutils-$(PKG_NAME)-$(PKG_VERSION) +else PKG_VERSION:=7.11 -PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/gdb PKG_MD5SUM:=b5c784685e1cde65ba135feea86b6d75 +GDB_DIR:=$(PKG_NAME)-$(PKG_VERSION) +endif + +PKG_RELEASE:=1 + +PATCH_DIR:=./patches/$(PKG_VERSION) +PKG_BUILD_DIR:=$(BUILD_DIR)/$(GDB_DIR) PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 @@ -55,7 +70,11 @@ CONFIGURE_ARGS+= \ --with-system-readline \ --without-expat \ --without-lzma \ - --disable-werror + --disable-werror \ + --disable-binutils \ + --disable-ld \ + --disable-gas \ + --disable-sim CONFIGURE_VARS+= \ ac_cv_search_tgetent="$(TARGET_LDFLAGS) -lncurses -lreadline" diff --git a/package/devel/gdb/patches/001-gdb-pr14523-mips-signal-number.patch b/package/devel/gdb/patches/7.11/001-gdb-pr14523-mips-signal-number.patch similarity index 100% rename from package/devel/gdb/patches/001-gdb-pr14523-mips-signal-number.patch rename to package/devel/gdb/patches/7.11/001-gdb-pr14523-mips-signal-number.patch diff --git a/package/devel/gdb/patches/100-musl_fix.patch b/package/devel/gdb/patches/7.11/100-musl_fix.patch similarity index 100% rename from package/devel/gdb/patches/100-musl_fix.patch rename to package/devel/gdb/patches/7.11/100-musl_fix.patch diff --git a/package/devel/gdb/patches/arc-2016.03/100-no_extern_inline.patch b/package/devel/gdb/patches/arc-2016.03/100-no_extern_inline.patch new file mode 100644 index 000..8c18c6e --- /dev/null +++ b/package/devel/gdb/patches/arc-2016.03/100-no_extern_inline.patch @@ -0,0 +1,32 @@ +--- a/sim/common/sim-arange.c b/sim/common/sim-arange.c +@@ -280,11 +280,7 @@ sim_addr_range_delete (ADDR_RANGE *ar, a + build_search_tree (ar); + } + +-#endif /* DEFINE_NON_INLINE_P */ +- +-#if DEFINE_INLINE_P +- +-SIM_ARANGE_INLINE int ++int + sim_addr_range_hit_p (ADDR_RANGE *ar, address_word addr) + { + ADDR_RANGE_TREE *t = ar->range_tree; +@@ -301,4 +297,4 @@ sim_addr_range_hit_p (ADDR_RANGE *ar, ad + return 0; + } + +-#endif /* DEFINE_INLINE_P */ ++#endif /* DEFINE_NON_INLINE_P */ +--- a/sim/common/sim-arange.h b/sim/common/sim-arange.h +@@ -73,7 +73,7 @@ extern void sim_addr_range_delete (ADDR_ + + /* Return non-zero if ADDR is in range AR, traversing the entire t
[OpenWrt-Devel] [PATCH] arc: Build uImage as well as vmlinux output files
Initially for ARC we were building vmlinux images because it was both simpler and more convenient to debug Linux kernel in runt-time via JTAG. Now when base system works quite nice we may finally use U-Boot for loading the system image as well. Still we keep building vmlinux images as some of our boards are development boards and loading images with JTAG could be at some points very beneficial. Note for U-Boot header it's required to specify 2 values: * loading address * entry point (if it doesn't match loading address) and in case of ARC entry point (EP) not only differs from loading address but also changes from build to build due to initramfs being placed between loading address and text section. To accommodate that feature we have to calculate EP after vmlinux gets built and before call to mkimage. Signed-off-by: Alexey Brodkin --- target/linux/arc770/image/Makefile | 44 ++--- target/linux/archs38/image/Makefile | 44 ++--- 2 files changed, 72 insertions(+), 16 deletions(-) diff --git a/target/linux/arc770/image/Makefile b/target/linux/arc770/image/Makefile index 6b9c5e4..47c936e 100644 --- a/target/linux/arc770/image/Makefile +++ b/target/linux/arc770/image/Makefile @@ -7,6 +7,13 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk +# On ARC initramfs is put before entry point and so entry point moves +# in memory from build to built. Thus we need to extract EP from vmlinux +# every time late in building process. +define Build/calculate-ep + $(eval KERNEL_ENTRY=$(shell $(KERNEL_CROSS)readelf -h $(LINUX_DIR)/vmlinux | grep "Entry point address" | grep -o 0x.*)) +endef + define Build/patch-dtb $(call Image/BuildDTB,../dts/$(DEVICE_DTS).dts,$@.dtb) $(STAGING_DIR_HOST)/bin/patch-dtb $@ $@.dtb @@ -16,26 +23,47 @@ endef define Device/Default PROFILES = Default $$(DEVICE_PROFILE) KERNEL_DEPENDS = $$(wildcard ../dts/$$(DEVICE_DTS).dts) - KERNEL_SUFFIX := .elf - KERNEL_INITRAMFS := kernel-bin | patch-dtb - KERNEL_INITRAMFS_NAME = $$(KERNEL_NAME)-initramfs.elf DEVICE_PROFILE := DEVICE_DTS := endef DEVICE_VARS += DEVICE_PROFILE DEVICE_DTS -define add_arc770 - define Device/$(1) +define Device/vmlinux + KERNEL_SUFFIX := .elf + KERNEL_INITRAMFS := kernel-bin | patch-dtb + KERNEL_INITRAMFS_NAME = vmlinux-initramfs.elf +endef + +define Device/uImage + KERNEL_SUFFIX := .bin + KERNEL_INITRAMFS := kernel-bin | patch-dtb | calculate-ep | uImage none + KERNEL_LOADADDR := 0x8000 +endef + +define add_arc770_uImage + define Device/$(1)-uImage +$(call Device/uImage) +DEVICE_PROFILE := $(1) +DEVICE_DTS := $(1) + endef + TARGET_DEVICES += $(1)-uImage +endef + +define add_arc770_vmlinux + define Device/$(1)-vmlinux +$(call Device/vmlinux) DEVICE_PROFILE := $(1) DEVICE_DTS := $(1) endef - TARGET_DEVICES += $(1) + TARGET_DEVICES += $(1)-vmlinux endef # DesignWare AXS101 -$(eval $(call add_arc770,axs101)) +$(eval $(call add_arc770_vmlinux,axs101)) +$(eval $(call add_arc770_uImage,axs101)) # nSIM with ARC770 -$(eval $(call add_arc770,nsim_700)) +$(eval $(call add_arc770_vmlinux,nsim_700)) +$(eval $(call add_arc770_uImage,nsim_700)) $(eval $(call BuildImage)) diff --git a/target/linux/archs38/image/Makefile b/target/linux/archs38/image/Makefile index 9b0e53f..03bd8ee 100644 --- a/target/linux/archs38/image/Makefile +++ b/target/linux/archs38/image/Makefile @@ -7,6 +7,13 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk +# On ARC initramfs is put before entry point and so entry point moves +# in memory from build to built. Thus we need to extract EP from vmlinux +# every time before generation of uImage. +define Build/calculate-ep + $(eval KERNEL_ENTRY=$(shell $(KERNEL_CROSS)readelf -h $(LINUX_DIR)/vmlinux | grep "Entry point address" | grep -o 0x.*)) +endef + define Build/patch-dtb $(call Image/BuildDTB,../dts/$(DEVICE_DTS).dts,$@.dtb) $(STAGING_DIR_HOST)/bin/patch-dtb $@ $@.dtb @@ -16,26 +23,47 @@ endef define Device/Default PROFILES = Default $$(DEVICE_PROFILE) KERNEL_DEPENDS = $$(wildcard ../dts/$$(DEVICE_DTS).dts) - KERNEL_SUFFIX := .elf - KERNEL_INITRAMFS := kernel-bin | patch-dtb - KERNEL_INITRAMFS_NAME = $$(KERNEL_NAME)-initramfs.elf DEVICE_PROFILE := DEVICE_DTS := endef DEVICE_VARS += DEVICE_PROFILE DEVICE_DTS -define add_archs38 - define Device/$(1) +define Device/vmlinux + KERNEL_SUFFIX := .elf + KERNEL_INITRAMFS := kernel-bin | patch-dtb + KERNEL_INITRAMFS_NAME = vmlinux-initramfs.elf +endef + +define Device/uImage + KERNEL_SUFFIX := .bin + KERNEL_INITRAMFS := kernel-bin | patch-dtb | calculate-ep | uImage none + KERNEL_LOADADDR := 0x8000 +endef + +define add_archs38_uImage + define Device/$(1)-uImage +$(call Device/uImage) +DEVICE_PROFILE := $(1) +DEVICE_DTS := $(1) + endef + TARGET_DEVICES += $(1)-uImage +endef
[OpenWrt-Devel] [PATCH] procd: Update to latest head
This includes a fix for building against uClibc: http://git.openwrt.org/?p=project/procd.git;a=commit;h=9a6f83d3c168523ac7b898ae481c2fd8c501d6a6 Signed-off-by: Alexey Brodkin Cc: John Crispin --- package/system/procd/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile index 7ba2be3..cb7ab05 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=procd -PKG_VERSION:=2016-05-19 +PKG_VERSION:=2016-05-24 PKG_RELEASE=$(PKG_SOURCE_VERSION) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(OPENWRT_GIT)/project/procd.git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=1418c6ce8559ea125c525c2663105fa5ff14905e +PKG_SOURCE_VERSION:=9a6f83d3c168523ac7b898ae481c2fd8c501d6a6 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz CMAKE_INSTALL:=1 -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] _GNU_SOURCE should be defined for building vs uClibc
In uClibc-ng O_PATH and O_DIRECTORY are only defined if _GNU_SOURCE is defined. So explicitly define _GNU_SOURCE in sources that use O_PATH and O_DIRECTORY. Without that extra definition that's what happens when building procd. utils/utils.c: ->8-- .../openwrt/build_dir/target-arc_arc700_uClibc-1.0.14/procd-2016-05-19/utils/utils.c: In function 'patch_fd': .../openwrt/build_dir/target-arc_arc700_uClibc-1.0.14/procd-2016-05-19/utils/utils.c:168:22: error: 'O_PATH' undeclared (first use in this function) dfd = open("/dev", O_PATH|O_DIRECTORY); ^ .../openwrt/build_dir/target-arc_arc700_uClibc-1.0.14/procd-2016-05-19/utils/utils.c:168:22: note: each undeclared identifier is reported only once for each function it appears in .../openwrt/build_dir/target-arc_arc700_uClibc-1.0.14/procd-2016-05-19/utils/utils.c:168:29: error: 'O_DIRECTORY' undeclared (first use in this function) dfd = open("/dev", O_PATH|O_DIRECTORY); ^ CMakeFiles/init.dir/build.make:182: recipe for target 'CMakeFiles/init.dir/utils/utils.c.o' failed ->8-- inittab.c: ->8-- .../openwrt/build_dir/target-arc_arc700_uClibc-1.0.14/procd-2016-05-19/inittab.c: In function 'dev_exist': .../openwrt/build_dir/target-arc_arc700_uClibc-1.0.14/procd-2016-05-19/inittab.c:72:21: error: 'O_PATH' undeclared (first use in this function) dfd = open("/dev", O_PATH|O_DIRECTORY); ^ .../git/openwrt/build_dir/target-arc_arc700_uClibc-1.0.14/procd-2016-05-19/inittab.c:72:21: note: each undeclared identifier is reported only once for each function it appears in .../git/openwrt/build_dir/target-arc_arc700_uClibc-1.0.14/procd-2016-05-19/inittab.c:72:28: error: 'O_DIRECTORY' undeclared (first use in this function) dfd = open("/dev", O_PATH|O_DIRECTORY); ^ CMakeFiles/procd.dir/build.make:134: recipe for target 'CMakeFiles/procd.dir/inittab.c.o' failed make[6]: *** [CMakeFiles/procd.dir/inittab.c.o] Error 1 ->8-- Signed-off-by: Alexey Brodkin Cc: Waldemar Brodkorb Cc: John Crispin Cc: Jo-Philipp Wich --- inittab.c | 1 + utils/utils.c | 1 + 2 files changed, 2 insertions(+) diff --git a/inittab.c b/inittab.c index 528396e..6dde11a 100644 --- a/inittab.c +++ b/inittab.c @@ -12,6 +12,7 @@ * GNU General Public License for more details. */ +#define _GNU_SOURCE #include #include #include diff --git a/utils/utils.c b/utils/utils.c index e2e3396..8f14aad 100644 --- a/utils/utils.c +++ b/utils/utils.c @@ -12,6 +12,7 @@ * GNU General Public License for more details. */ +#define _GNU_SOURCE #include #include #include "utils.h" -- 2.5.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] toolchain: uClibc: Bump to the most recent version 1.0.14
This change updates uClibc version to the most recent 1.0.14 release. Signed-off-by: Alexey Brodkin --- toolchain/uClibc/Config.version | 2 +- toolchain/uClibc/common.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/toolchain/uClibc/Config.version b/toolchain/uClibc/Config.version index b9c0627..3c1c54d 100644 --- a/toolchain/uClibc/Config.version +++ b/toolchain/uClibc/Config.version @@ -1,7 +1,7 @@ config UCLIBC_VERSION string depends on USE_UCLIBC - default "1.0.9" + default "1.0.14" config UCLIBC_VERSION_NG bool diff --git a/toolchain/uClibc/common.mk b/toolchain/uClibc/common.mk index 2828156..878bd76 100644 --- a/toolchain/uClibc/common.mk +++ b/toolchain/uClibc/common.mk @@ -16,7 +16,7 @@ CONFIG_DIR:=$(PATH_PREFIX)/config PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz LIBC_SO_VERSION:=$(PKG_VERSION) -PKG_MD5SUM=64bbe13301ffa6ba30c5c1ddec335583 +PKG_MD5SUM=8eed7f3635216142c1c5e122874b89c6 HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)-$(PKG_VERSION) -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] package/util-linux: Fix libmount build under uClibc
This fixes util-linux building with uClibc. Patch is taken as it is from Buildroot: https://git.busybox.net/buildroot/plain/package/util-linux/0001-Fix-libmount-build-under-uClibc.patch?id=baccb506a6feabf114623866568121f49712f5df Signed-off-by: Alexey Brodkin --- .../004-Fix-libmount-build-under-uClibc.patch | 153 + 1 file changed, 153 insertions(+) create mode 100644 package/utils/util-linux/patches/004-Fix-libmount-build-under-uClibc.patch diff --git a/package/utils/util-linux/patches/004-Fix-libmount-build-under-uClibc.patch b/package/utils/util-linux/patches/004-Fix-libmount-build-under-uClibc.patch new file mode 100644 index 000..10cc3a5 --- /dev/null +++ b/package/utils/util-linux/patches/004-Fix-libmount-build-under-uClibc.patch @@ -0,0 +1,153 @@ +From 44d733203637666926964957af7af23429ddcecf Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Mon, 18 Apr 2016 09:58:56 -0300 +Subject: [PATCH] Fix libmount build under uClibc + +See https://bugs.gentoo.org/show_bug.cgi?id=406303 +http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-apps/util-linux/files/util-linux-2.21.1-no-printf-alloc.patch?revision=1.2 + +[Gustavo: converted to git format for 2.28] + +Signed-off-by: Gustavo Zacarias +--- + configure.ac | 1 - + libmount/src/tab_parse.c | 52 + 2 files changed, 52 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 5a00403..3422f11 100644 +--- a/configure.ac b/configure.ac +@@ -948,7 +948,6 @@ AC_ARG_ENABLE([libmount], + ) + UL_BUILD_INIT([libmount]) + UL_REQUIRES_BUILD([libmount], [libblkid]) +-UL_REQUIRES_HAVE([libmount], [scanf_alloc_modifier], [scanf string alloc modifier]) + AM_CONDITIONAL([BUILD_LIBMOUNT], [test "x$build_libmount" = xyes]) + AM_CONDITIONAL([BUILD_LIBMOUNT_TESTS], [test "x$build_libmount" = xyes -a "x$enable_static" = xyes]) + AS_IF([test "x$build_libmount" = xyes], [ +diff --git a/libmount/src/tab_parse.c b/libmount/src/tab_parse.c +index 3f5e14a..2ff1795 100644 +--- a/libmount/src/tab_parse.c b/libmount/src/tab_parse.c +@@ -39,6 +39,10 @@ static void parser_cleanup(struct libmnt_parser *pa) + memset(pa, 0, sizeof(*pa)); + } + ++#ifndef HAVE_SCANF_MS_MODIFIER ++# define UL_SCNsA "%s" ++#endif ++ + static int next_number(char **s, int *num) + { + char *end = NULL; +@@ -69,16 +73,31 @@ static int mnt_parse_table_line(struct libmnt_fs *fs, char *s) + int rc, n = 0, xrc; + char *src = NULL, *fstype = NULL, *optstr = NULL; + ++#ifndef HAVE_SCANF_MS_MODIFIER ++ size_t len = strlen(s) + 1; ++ src = malloc(len); ++ fstype = malloc(len); ++ fs->target = malloc(len); ++ optstr = malloc(len); ++#endif ++ + rc = sscanf(s, UL_SCNsA" " /* (1) source */ + UL_SCNsA" " /* (2) target */ + UL_SCNsA" " /* (3) FS type */ + UL_SCNsA" " /* (4) options */ + "%n", /* byte count */ + ++#ifdef HAVE_SCANF_MS_MODIFIER + &src, + &fs->target, + &fstype, + &optstr, ++#else ++ src, ++ fs->target, ++ fstype, ++ optstr, ++#endif + &n); + xrc = rc; + +@@ -144,6 +163,16 @@ static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, char *s) + unsigned int maj, min; + char *fstype = NULL, *src = NULL, *p; + ++#ifndef HAVE_SCANF_MS_MODIFIER ++ size_t len = strlen(s) + 1; ++ fs->root = malloc(len); ++ fs->target = malloc(len); ++ fs->vfs_optstr = malloc(len); ++ fs->fs_optstr = malloc(len); ++ fstype = malloc(len); ++ src = malloc(len); ++#endif ++ + rc = sscanf(s, "%d " /* (1) id */ + "%d " /* (2) parent */ + "%u:%u "/* (3) maj:min */ +@@ -155,9 +184,15 @@ static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, char *s) + &fs->id, + &fs->parent, + &maj, &min, ++#ifdef HAVE_SCANF_MS_MODIFIER + &fs->root, + &fs->target, + &fs->vfs_optstr, ++#else ++ fs->root, ++ fs->target, ++ fs->vfs_optstr, ++#endif + &end); + + if (rc >= 7 && end > 0) +@@ -177,9 +212,15 @@ static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, char *s) + UL_SCNsA" " /* (9) source */ +
[OpenWrt-Devel] [PATCH] toolchain: Bump ARC tools to arc-2016.03
This change switches ARC tools to the most recent arc-2016.03 version. ARC GNU tools of version arc-2016.03 bring some quite significant changes like: * Binutils v2.26+ (upstream commit id 202ac19 with additional ARC * patches) * GCC v4.8.5 * GDB 7.10 More about changes, improvements and fixes could be found here: https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/tag/arc-2016.03 Signed-off-by: Alexey Brodkin --- toolchain/binutils/Config.in| 8 toolchain/binutils/Config.version | 4 ++-- toolchain/binutils/Makefile | 8 .../patches/arc-2016.03/200-arc-fix-target-mask.patch | 13 + toolchain/gcc/Config.version| 2 +- toolchain/gcc/common.mk | 8 .../001-revert_register_mode_search.patch | 0 .../{arc-2015.06 => arc-2016.03}/002-weak_data_fix.patch| 0 .../003-universal_initializer.patch | 0 .../{arc-2015.06 => arc-2016.03}/004-case_insensitive.patch | 0 .../{arc-2015.06 => arc-2016.03}/010-documentation.patch| 0 .../{arc-2015.06 => arc-2016.03}/020-no-plt-backport.patch | 0 .../{arc-2015.06 => arc-2016.03}/100-uclibc-conf.patch | 0 .../210-disable_libsanitizer_off_t_check.patch | 0 .../800-arc-disablelibgmon.patch| 0 .../{arc-2015.06 => arc-2016.03}/820-libgcc_pic.patch | 0 .../850-use_shared_libgcc.patch | 0 .../{arc-2015.06 => arc-2016.03}/851-libgcc_no_compat.patch | 0 .../{arc-2015.06 => arc-2016.03}/860-use_eh_frame.patch | 0 .../{arc-2015.06 => arc-2016.03}/870-ppc_no_crtsavres.patch | 0 .../{arc-2015.06 => arc-2016.03}/880-no_java_section.patch | 0 .../{arc-2015.06 => arc-2016.03}/910-mbsd_multi.patch | 0 .../920-specs_nonfatal_getenv.patch | 0 .../940-no-clobber-stamp-bits.patch | 0 toolchain/gdb/Makefile | 6 +++--- .../100-no_extern_inline.patch | 4 ++-- .../{arc-2015.06-gdb => arc-2016.03}/110-no_testsuite.patch | 4 ++-- .../120-fix-compile-flag-mismatch.patch | 2 +- .../gdb/patches/arc-2016.03/200-arc-fix-target-mask.patch | 13 + 29 files changed, 49 insertions(+), 23 deletions(-) create mode 100644 toolchain/binutils/patches/arc-2016.03/200-arc-fix-target-mask.patch rename toolchain/gcc/patches/{arc-2015.06 => arc-2016.03}/001-revert_register_mode_search.patch (100%) rename toolchain/gcc/patches/{arc-2015.06 => arc-2016.03}/002-weak_data_fix.patch (100%) rename toolchain/gcc/patches/{arc-2015.06 => arc-2016.03}/003-universal_initializer.patch (100%) rename toolchain/gcc/patches/{arc-2015.06 => arc-2016.03}/004-case_insensitive.patch (100%) rename toolchain/gcc/patches/{arc-2015.06 => arc-2016.03}/010-documentation.patch (100%) rename toolchain/gcc/patches/{arc-2015.06 => arc-2016.03}/020-no-plt-backport.patch (100%) rename toolchain/gcc/patches/{arc-2015.06 => arc-2016.03}/100-uclibc-conf.patch (100%) rename toolchain/gcc/patches/{arc-2015.06 => arc-2016.03}/210-disable_libsanitizer_off_t_check.patch (100%) rename toolchain/gcc/patches/{arc-2015.06 => arc-2016.03}/800-arc-disablelibgmon.patch (100%) rename toolchain/gcc/patches/{arc-2015.06 => arc-2016.03}/820-libgcc_pic.patch (100%) rename toolchain/gcc/patches/{arc-2015.06 => arc-2016.03}/850-use_shared_libgcc.patch (100%) rename toolchain/gcc/patches/{arc-2015.06 => arc-2016.03}/851-libgcc_no_compat.patch (100%) rename toolchain/gcc/patches/{arc-2015.06 => arc-2016.03}/860-use_eh_frame.patch (100%) rename toolchain/gcc/patches/{arc-2015.06 => arc-2016.03}/870-ppc_no_crtsavres.patch (100%) rename toolchain/gcc/patches/{arc-2015.06 => arc-2016.03}/880-no_java_section.patch (100%) rename toolchain/gcc/patches/{arc-2015.06 => arc-2016.03}/910-mbsd_multi.patch (100%) rename toolchain/gcc/patches/{arc-2015.06 => arc-2016.03}/920-specs_nonfatal_getenv.patch (100%) rename toolchain/gcc/patches/{arc-2015.06 => arc-2016.03}/940-no-clobber-stamp-bits.patch (100%) rename toolchain/gdb/patches/{arc-2015.06-gdb => arc-2016.03}/100-no_extern_inline.patch (91%) rename toolchain/gdb/patches/{arc-2015.06-gdb => arc-2016.03}/110-no_testsuite.patch (73%) rename toolchain/gdb/patches/{arc-2015.06-gdb => arc-2016.03}/120-fix-compile-flag-mismatch.patch (85%) create mode 100644 toolchain/gdb/patches/arc-2016.03/200-arc-fix-target-mask.patch diff --git a/toolchain/binutils/Config.in b/toolchain/binutils/Config.in index c32f43c..2960c94 100644 --- a/toolchain/binutils/Config.in +++ b/toolchain/binutils/Config.in @@ -3,7 +3,7 @@ choice prompt &quo
Re: [OpenWrt-Devel] [LEDE-DEV] [PATCH] include/kernel: Do not strip kernel's Elf
Hi Felix, On Wed, 2016-05-18 at 15:49 +0200, Felix Fietkau wrote: > On 2016-05-18 15:06, Alexey Brodkin wrote: > > > > Hi Felix, > > > > On Wed, 2016-05-18 at 14:57 +0200, Felix Fietkau wrote: > > > > > > On 2016-05-16 16:42, Alexey Brodkin wrote: > > > > > > > > > > > > If an image gets built as an Elf there's a chance > > > > it will be used by developers for debugging purposes. > > > > In that case it's very helpful to keep debugging info > > > > in that image. > > > > > > > > I would think that most OWRT-powered devices in production > > > > will use some form of binary image for booting so Elf > > > > flavours could be left a bit bulkier with more debug info > > > > inside. > > > > > > > > Signed-off-by: Alexey Brodkin > > > You can get the bulky one directly from the kernel source directory, and > > > there is definitely some value in having stripped ELF binaries as well > > > for devices that can load them. > > Well indeed in kernel's source directory we have an unstripped elf. > > But what happens at least in case of ARC we build only one kernel's elf > > and then as a post-built step we patch in .dtb for all boards we build OWRT. > > > > In other words in "bin/arc770-uClibc" folder I have: > > 1) openwrt-arc770-generic-axs101-initramfs.elf > > 2) openwrt-arc770-generic-nsim_700-initramfs.elf > > > > Both are stripped but work as they are on the corresponding boards. > > > > In > > "build_dir/target-arc_arc700_uClibc-1.0.9/linux-arc770_generic/linux-4.4.7/" > > I have perfectly unstripped vmlinux but it won't work on either board > > because of > > missing device tree blob. > > > > That means if one wants to get image for a board X with debug symbols he or > > she > > will need to do manual patching in of .dtb. Which is not the most > > convenient thing ever. > It's a lot simpler than that: You can boot the stripped and patched elf > image from bin/ and use the vmlinux from the kernel source for the > debugger afterwards. They are fully compatible. Good point. So indeed if we do want stuff in "bin/" folder to be stripped that seems to be the simplest approach. But what if we with addition of another config option: a) toggle kernel's CONFIG_DEBUG_INFO b) use "--strip-unneeded" instead of currently used "-S" (which is an alias to "--strip-all"). -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [LEDE-DEV] [PATCH] include/kernel: Do not strip kernel's Elf
Hi Felix, On Wed, 2016-05-18 at 14:57 +0200, Felix Fietkau wrote: > On 2016-05-16 16:42, Alexey Brodkin wrote: > > > > If an image gets built as an Elf there's a chance > > it will be used by developers for debugging purposes. > > In that case it's very helpful to keep debugging info > > in that image. > > > > I would think that most OWRT-powered devices in production > > will use some form of binary image for booting so Elf > > flavours could be left a bit bulkier with more debug info > > inside. > > > > Signed-off-by: Alexey Brodkin > You can get the bulky one directly from the kernel source directory, and > there is definitely some value in having stripped ELF binaries as well > for devices that can load them. Well indeed in kernel's source directory we have an unstripped elf. But what happens at least in case of ARC we build only one kernel's elf and then as a post-built step we patch in .dtb for all boards we build OWRT. In other words in "bin/arc770-uClibc" folder I have: 1) openwrt-arc770-generic-axs101-initramfs.elf 2) openwrt-arc770-generic-nsim_700-initramfs.elf Both are stripped but work as they are on the corresponding boards. In "build_dir/target-arc_arc700_uClibc-1.0.9/linux-arc770_generic/linux-4.4.7/" I have perfectly unstripped vmlinux but it won't work on either board because of missing device tree blob. That means if one wants to get image for a board X with debug symbols he or she will need to do manual patching in of .dtb. Which is not the most convenient thing ever. -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] include/kernel: Do not strip kernel's Elf
If an image gets built as an Elf there's a chance it will be used by developers for debugging purposes. In that case it's very helpful to keep debugging info in that image. I would think that most OWRT-powered devices in production will use some form of binary image for booting so Elf flavours could be left a bit bulkier with more debug info inside. Signed-off-by: Alexey Brodkin --- include/kernel-defaults.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk index 406fd46..0166dc5 100644 --- a/include/kernel-defaults.mk +++ b/include/kernel-defaults.mk @@ -142,7 +142,7 @@ endif define Kernel/CopyImage cmp -s $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux$(1).debug || { \ $(KERNEL_CROSS)objcopy -O binary $(OBJCOPY_STRIP) -S $(LINUX_DIR)/vmlinux $(LINUX_KERNEL)$(1); \ - $(KERNEL_CROSS)objcopy $(OBJCOPY_STRIP) -S $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux$(1).elf; \ + $(KERNEL_CROSS)objcopy $(OBJCOPY_STRIP) $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux$(1).elf; \ $(CP) $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux$(1).debug; \ $(foreach k, \ $(if $(KERNEL_IMAGES),$(KERNEL_IMAGES),$(filter-out dtbs,$(KERNELNAME))), \ -- 2.5.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [LEDE-DEV] Failed to execute /usr/libexec/login.sh
Hi Alvaro, Daniel, On Thu, 2016-05-12 at 08:36 +0200, Álvaro Fernández Rojas wrote: Hello Daniel, It looks like Luka has already fixed this: https://dev.openwrt.org/changeset/49376 Indeed mentioned commit fixes previously observed problem. Thanks for the pointer. -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Failed to execute /usr/libexec/login.sh
Hi Daniel, Looks like one recent commit: ->8- commit a1860283b37c7a26f78c7387227a42219e8b4d4d Author: luka Date: Tue May 10 22:36:25 2016 + image / basefiles: make console password configurable Signed-off-by: Daniel Dickinson Signed-off-by: John Crispin git-svn-id: svn://svn.openwrt.org/openwrt/trunk@49325 3c298f89-4303-0410-b956-a3cf2f4a3e73 ->8- breaks something for my boards (in particular arc770-based boards). I'm unable to activate console now. That's what I'm getting every time I press ENTER: ->8- Failed to execute /usr/libexec/login.sh Please press Enter to activate this console. Failed to execute /usr/libexec/login.sh Please press Enter to activate this console. ->8- If I revert mentioned commit problem goes away. Any thoughts on what might be wrong here? Probably something is missing in my board's init scripts etc? -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] libffi: bump to version 3.2.1
Among many fixes and improvements this new version adds support of ARC architecture (ARC port was actually introduced in v3.1 but while at it why not to update to the most recent version). Which allows to build dependent projects like Python etc. Signed-off-by: Alexey Brodkin --- libs/libffi/Makefile | 6 ++-- libs/libffi/patches/001-fix-includedir-pkg.patch | 36 2 files changed, 3 insertions(+), 39 deletions(-) delete mode 100644 libs/libffi/patches/001-fix-includedir-pkg.patch diff --git a/libs/libffi/Makefile b/libs/libffi/Makefile index cd16a85..b5daa13 100644 --- a/libs/libffi/Makefile +++ b/libs/libffi/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libffi -PKG_VERSION:=3.0.13 +PKG_VERSION:=3.2.1 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=ftp://sourceware.org/pub/libffi/ -PKG_MD5SUM:=45f3b6dbc9ee7c7dfbbbc5feba571529 +PKG_MD5SUM:=83b89587607e3eb65c70d361f13bab43 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE @@ -66,7 +66,7 @@ define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(CP) \ - $(PKG_INSTALL_DIR)/usr/include/*.h \ + $(PKG_INSTALL_DIR)/usr/lib/$(PKG_NAME)-$(PKG_VERSION)/include/*.h \ $(1)/usr/include/ endef diff --git a/libs/libffi/patches/001-fix-includedir-pkg.patch b/libs/libffi/patches/001-fix-includedir-pkg.patch deleted file mode 100644 index 812d7a4..000 --- a/libs/libffi/patches/001-fix-includedir-pkg.patch +++ /dev/null @@ -1,36 +0,0 @@ a/libffi.pc.in -+++ b/libffi.pc.in -@@ -1,10 +1,10 @@ - prefix=@prefix@ - exec_prefix=@exec_prefix@ - libdir=@libdir@ --includedir=${libdir}/@PACKAGE_NAME@-@PACKAGE_VERSION@/include -+includedir=@includedir@ - - Name: @PACKAGE_NAME@ - Description: Library supporting Foreign Function Interfaces - Version: @PACKAGE_VERSION@ --Libs: -L${libdir} -lffi --Cflags: -I${includedir} -+Libs: -lffi -+Cflags: a/include/Makefile.am -+++ b/include/Makefile.am -@@ -5,5 +5,5 @@ AUTOMAKE_OPTIONS=foreign - DISTCLEANFILES=ffitarget.h - EXTRA_DIST=ffi.h.in ffi_common.h - --includesdir = $(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include -+includesdir = $(includedir) - nodist_includes_HEADERS = ffi.h ffitarget.h a/include/Makefile.in -+++ b/include/Makefile.in -@@ -250,7 +250,7 @@ top_srcdir = @top_srcdir@ - AUTOMAKE_OPTIONS = foreign - DISTCLEANFILES = ffitarget.h - EXTRA_DIST = ffi.h.in ffi_common.h --includesdir = $(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include -+includesdir = $(includedir) - nodist_includes_HEADERS = ffi.h ffitarget.h - all: all-am - -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] toolchain/uClibc: enable UCLIBC_HAS_OBSOLETE_BSD_SIGNAL
Hi Karl, On Fri, 2016-04-15 at 10:01 +, Karl Palsson wrote: > Alexey Brodkin wrote: > > > > This is required to build net-snmp. > What version of net-snmp are you using? Is this because ARC is > still on uclibc instead of musl like everyone else? Indeed as of today the only libc for ARC is uClibc. We're working now on glibc port for ARC and once done will look at musl. > net-snmp (5.4.4) built fine (and still builds fine) on uclibc in the 15.05 > branch. Well frankly I haven't tried to build 15.05 so not really sure if net-snmp will be built with uClibc. But I'll be surprised if it will. Because from what I saw uClibc 0.9.33.2 used in 15.05 has no differences in regard of sighold and friends. I think I'll try it. Still IMHO observation that I made when building from current master is pretty valid but let's see what gives 15.05 building. > When are you planning on moving off uclibc? Well I don't have a solid answer for this. As I said we're working on glibc now and I think soon we'll be sending patches for upstream review but it will take some time before our port gets accepted upstream. In comparison ARC port of uClibc is now completely upstream in both olde good uClibc and its new and shiny uClibc-ng fork. And that's exactly what we want - use upstream projects but not a fork on our GitHub etc. > snmpnetstat isn't even installed, could you just disable building it? Essentially I may disable it but that's not a solution right? -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] toolchain/uClibc: enable UCLIBC_HAS_OBSOLETE_BSD_SIGNAL
This is required to build net-snmp. If that options is disabled in uClibc then net-snmp doesn't detect sighold support on its configuration stage and so defines HAVE_SIGHOLD as 0. That in its turn causes compilation of the following branch of timerPause() in apps/snmpnetstat: -->8 int oldmask; oldmask = sigblock(sigmask(SIGALRM)); if (!signalled) { sigpause(0); } sigsetmask(oldmask); -->8 Now in uClibc all 3 sigblock(), sigmask() and sigsetmask() were removed back in 2005, see: https://git.busybox.net/uClibc/commit/?id=5aa7aa7fa7ec2a0fe567ac0b2595b46add6f3594 And all that causes net-snmp linkage to fail this way: -->8 .libs/if.o: In function `intpr': if.c:(.text+0x908): undefined reference to `sigmask' if.c:(.text+0x90e): undefined reference to `sigblock' if.c:(.text+0x924): undefined reference to `sigsetmask' -->8 If we enable UCLIBC_HAS_OBSOLETE_BSD_SIGNAL in uClibc then branch with sighold is used in timerPause() and everything builds as expected. Signed-off-by: Alexey Brodkin --- toolchain/uClibc/config/common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolchain/uClibc/config/common b/toolchain/uClibc/config/common index ec72701..b476639 100644 --- a/toolchain/uClibc/config/common +++ b/toolchain/uClibc/config/common @@ -144,7 +144,7 @@ UCLIBC_HAS_LIBUTIL=y UCLIBC_HAS_LONG_DOUBLE_MATH=y UCLIBC_HAS_NETWORK_SUPPORT=y UCLIBC_HAS_NFTW=y -# UCLIBC_HAS_OBSOLETE_BSD_SIGNAL is not set +UCLIBC_HAS_OBSOLETE_BSD_SIGNAL=y # UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL is not set UCLIBC_HAS_PRINTF_M_SPEC=y # UCLIBC_HAS_PROFILING is not set -- 2.5.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] arc770/axs101: mimic real wireless router
Even though ARC SDP board has only 1 wired connection (eth0) and barely might be treated as a full-scale router we're mimicking that so the one ond only eth0 wired interface is wan and wlan0 serves its own network behind NAT. For that we enable firewall and DNS server on the board and rearranging interfaces: eth0 becomes wan, wlan0 is leff in lan but gets its internal static IP address (192.168.1.1). Signed-off-by: Alexey Brodkin --- target/linux/arc770/base-files/etc/board.d/02_network | 3 ++- target/linux/arc770/generic/profiles/00-default.mk| 2 +- target/linux/arc770/generic/profiles/02-axs101.mk | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/target/linux/arc770/base-files/etc/board.d/02_network b/target/linux/arc770/base-files/etc/board.d/02_network index dabc539..da53f91 100755 --- a/target/linux/arc770/base-files/etc/board.d/02_network +++ b/target/linux/arc770/base-files/etc/board.d/02_network @@ -10,7 +10,8 @@ board_config_update case "$( arc_board_name )" in "arc-sdp"*) - ucidef_set_interface_lan "eth0" "dhcp" + ucidef_set_interface_wan "eth0" "dhcp" + ucidef_set_interface_lan "wlan0" ;; esac diff --git a/target/linux/arc770/generic/profiles/00-default.mk b/target/linux/arc770/generic/profiles/00-default.mk index c30317a..88fd96b 100644 --- a/target/linux/arc770/generic/profiles/00-default.mk +++ b/target/linux/arc770/generic/profiles/00-default.mk @@ -7,7 +7,7 @@ define Profile/Default NAME:=Default Profile (all drivers) - PACKAGES:= kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-mmc kmod-sdhci kmod-ath9k-htc wpad-mini + PACKAGES:= kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-mmc kmod-sdhci kmod-ath9k-htc wpad-mini firewall dnsmasq endef define Profile/Default/Description diff --git a/target/linux/arc770/generic/profiles/02-axs101.mk b/target/linux/arc770/generic/profiles/02-axs101.mk index 56a97e5..7525066 100644 --- a/target/linux/arc770/generic/profiles/02-axs101.mk +++ b/target/linux/arc770/generic/profiles/02-axs101.mk @@ -7,7 +7,7 @@ define Profile/axs101 NAME:=Synopsys DesignWare AXS101 - PACKAGES:= kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-mmc kmod-sdhci kmod-ath9k-htc wpad-mini + PACKAGES:= kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-mmc kmod-sdhci kmod-ath9k-htc wpad-mini firewall dnsmasq endef define Profile/axs101/Description -- 2.5.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] arc770: build kmod-ath9k-htc wpad-mini by default
Hi John, > > From: Alexey Brodkin [abrod...@synopsys.com] > Sent: Friday, April 01, 2016 5:39 PM > To: John Crispin > Cc: openwrt-devel@lists.openwrt.org; Alexey Brodkin > Subject: [PATCH] arc770: build kmod-ath9k-htc wpad-mini by default > > AXS101 beind a development board lacks built-in wireles inerfaces. > So we have to use external USB dongles to turn the board into > wireless router. > > The best USB Wi-Fi dongles to work in AP-mode seem to be based on > ath9k-htc chipset. > > And so with that change we add support of mentioned dongles in > default and axs101 builds. > > Signed-off-by: Alexey Brodkin I'm wondering if there're any comments on this one or it could be applied? -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] arc770: enable unaligned access handling simulation in software
Hi John, > > From: Alexey Brodkin [abrod...@synopsys.com] > Sent: Friday, April 01, 2016 5:43 PM > To: John Crispin > Cc: openwrt-devel@lists.openwrt.org; Alexey Brodkin > Subject: [PATCH] arc770: enable unaligned access handling simulation in > software > > This enables misaligned access handling by software in Linux kernel. > > With some wireless drivers (ath9k-htc and mt7601u for example) we see > misaligned accesses here and there and to cope with that without > fixing stuff in the drivers we're just gracefully handling it on ARC. > > Signed-off-by: Alexey Brodkin I'm wondering if there're any comments on this one or it could be applied? -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] arc770: enable unaligned access handling simulation in software
This enables misaligned access handling by software in Linux kernel. With some wireless drivers (ath9k-htc and mt7601u for example) we see misaligned accesses here and there and to cope with that without fixing stuff in the drivers we're just gracefully handling it on ARC. Signed-off-by: Alexey Brodkin --- target/linux/arc770/config-4.4 | 5 ++-- ...rc-enable-unaligned-access-in-kernel-mode.patch | 31 ++ 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 target/linux/generic/patches-4.4/333-arc-enable-unaligned-access-in-kernel-mode.patch diff --git a/target/linux/arc770/config-4.4 b/target/linux/arc770/config-4.4 index c8f021d..87fd7e3 100644 --- a/target/linux/arc770/config-4.4 +++ b/target/linux/arc770/config-4.4 @@ -19,7 +19,7 @@ CONFIG_ARC_DBG=y # CONFIG_ARC_DBG_TLB_MISS_COUNT is not set # CONFIG_ARC_DBG_TLB_PARANOIA is not set CONFIG_ARC_DW2_UNWIND=y -# CONFIG_ARC_EMUL_UNALIGNED is not set +CONFIG_ARC_EMUL_UNALIGNED=y # CONFIG_ARC_FPU_SAVE_RESTORE is not set CONFIG_ARC_HAS_DCACHE=y # CONFIG_ARC_HAS_DCCM is not set @@ -162,7 +162,8 @@ CONFIG_SRCU=y CONFIG_STACKTRACE=y CONFIG_STMMAC_ETH=y CONFIG_STMMAC_PLATFORM=y -# CONFIG_SUNXI_SRAM is not set +CONFIG_SYSCTL_ARCH_UNALIGN_ALLOW=y +CONFIG_SYSCTL_ARCH_UNALIGN_NO_WARN=y CONFIG_TICK_CPU_ACCOUNTING=y CONFIG_UNINLINE_SPIN_UNLOCK=y CONFIG_USB_SUPPORT=y diff --git a/target/linux/generic/patches-4.4/333-arc-enable-unaligned-access-in-kernel-mode.patch b/target/linux/generic/patches-4.4/333-arc-enable-unaligned-access-in-kernel-mode.patch new file mode 100644 index 000..76a9ce8 --- /dev/null +++ b/target/linux/generic/patches-4.4/333-arc-enable-unaligned-access-in-kernel-mode.patch @@ -0,0 +1,31 @@ +From af737b55fc7c61f17da9ae89fba536e0a9338e98 Mon Sep 17 00:00:00 2001 +From: Alexey Brodkin +Date: Mon, 14 Mar 2016 17:26:34 +0300 +Subject: [PATCH] arc: enable unaligned access in kernel mode + +This enables misaligned access handling even in kernel mode. +Some wireless drivers (ath9k-htc and mt7601u) use misaligned accesses +here and there and to cope with that without fixing stuff in the drivers +we're just gracefully handling it on ARC. + +Signed-off-by: Alexey Brodkin +--- + arch/arc/kernel/unaligned.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arc/kernel/unaligned.c b/arch/arc/kernel/unaligned.c +index abd961f..0b0cc97 100644 +--- a/arch/arc/kernel/unaligned.c b/arch/arc/kernel/unaligned.c +@@ -206,7 +206,7 @@ int misaligned_fixup(unsigned long address, struct pt_regs *regs, + char buf[TASK_COMM_LEN]; + + /* handle user mode only and only if enabled by sysadmin */ +- if (!user_mode(regs) || !unaligned_enabled) ++ if (!unaligned_enabled) + return 1; + + if (no_unaligned_warning) { +-- +2.5.0 + -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] arc770: build kmod-ath9k-htc wpad-mini by default
AXS101 beind a development board lacks built-in wireles inerfaces. So we have to use external USB dongles to turn the board into wireless router. The best USB Wi-Fi dongles to work in AP-mode seem to be based on ath9k-htc chipset. And so with that change we add support of mentioned dongles in default and axs101 builds. Signed-off-by: Alexey Brodkin --- target/linux/arc770/generic/profiles/00-default.mk | 2 +- target/linux/arc770/generic/profiles/02-axs101.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/arc770/generic/profiles/00-default.mk b/target/linux/arc770/generic/profiles/00-default.mk index b12ceb1..c30317a 100644 --- a/target/linux/arc770/generic/profiles/00-default.mk +++ b/target/linux/arc770/generic/profiles/00-default.mk @@ -7,7 +7,7 @@ define Profile/Default NAME:=Default Profile (all drivers) - PACKAGES:= kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-mmc kmod-sdhci + PACKAGES:= kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-mmc kmod-sdhci kmod-ath9k-htc wpad-mini endef define Profile/Default/Description diff --git a/target/linux/arc770/generic/profiles/02-axs101.mk b/target/linux/arc770/generic/profiles/02-axs101.mk index 60cf0fc..56a97e5 100644 --- a/target/linux/arc770/generic/profiles/02-axs101.mk +++ b/target/linux/arc770/generic/profiles/02-axs101.mk @@ -7,7 +7,7 @@ define Profile/axs101 NAME:=Synopsys DesignWare AXS101 - PACKAGES:= kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-mmc kmod-sdhci + PACKAGES:= kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-mmc kmod-sdhci kmod-ath9k-htc wpad-mini endef define Profile/axs101/Description -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] mac80211: install old firmware for ath9k-htc on target as well
Hi Hauke, On Tue, 2016-03-15 at 23:31 +0100, Hauke Mehrtens wrote: > On 03/15/2016 02:06 PM, Alexey Brodkin wrote: > > > > In commit > > http://git.openwrt.org/?p=openwrt.git;a=commit;h=3990e15258808b145226d7e95332c4708f9f9463 > > I got rid of older ath9k_htc firmware in favor of newer ones. > > > > But that was not completely correct. > > New v1.4 ath9k_htc firmwares are supported in Linux kernels >= 4.4. > > And since not all boards were moved to 4.4 yet it makes perfect > > sense to get back installation of older firmwares for compatibility > > purposes. > > > NACK > > ath9k_htc is provided by compat-wireless and not taken from normal > kernel. The compat-wireless version in trunk is based on a version more > recent than 4.4 independent of the kernel actually in use. You can > assume that the ath9k_htc driver is similar to the one used in kernel > 4.5 for all OpenWrt kernels in trunk. That makes perfect sense. -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] mac80211: install old firmware for ath9k-htc on target as well
Hi Paul, On Wed, 2016-03-16 at 12:35 +0300, Paul Fertser wrote: > Hi Alexey, > > On Tue, Mar 15, 2016 at 06:05:29PM +0000, Alexey Brodkin wrote: > > > > Frankly I don't see Oleksij says v1.4 could be moved on top of v1.3 > > file (I mean older file will be replaced). > Yes, he didn't mention it in his commit message but he clarified that > to me in private talk. > > > > > (but first somebody must test it - and I cannot because I only have device > > with OpenWRT with kernel 4.4) I don't see a reason to add this mess. > > > > We're talking about extra ~100k of space. Does it worth these games? > I'm not saying it does, just wanted to highlight that the newer > firmware can work with the older kernels too, but of course it's up to > the OpenWrt maintainers to decide on the best course of actions. Well given your sacred knowledge I would suggest to send a patch to "linux-firmware" which does exactly that - moves v1.4 on top of older version and then out discussion here would become pointless :) Care to send a patch with explanation? -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] mac80211: install old firmware for ath9k-htc on target as well
Hi Paul, On Tue, 2016-03-15 at 17:36 +0300, Paul Fertser wrote: > Hello Alexey, > > Alexey Brodkin writes: > > > > In commit > > http://git.openwrt.org/?p=openwrt.git;a=commit;h=3990e15258808b145226d7e95332c4708f9f9463 > > I got rid of older ath9k_htc firmware in favor of newer ones. > Please see > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e904cf6fe23022cde4e0ea9d41601411a315a3dc > for more details about the specific kernel change. Oleksij Rempel > (ath9k_htc firmware maintainer) says that older kernels will work with > firmware version 1.4.0 too if the filenames match older firmware. So > probably to support all kernels currently in use the latest firmware > should be installed to the old location. And once < 4.4 is phased out, > you can move to the proper new location. Frankly I don't see Oleksij says v1.4 could be moved on top of v1.3 file (I mean older file will be replaced). What that patch does it allows developers to use another (3rd) firmware blob from "/lib/firmware/ath9k_htc" with name "htc_[9271|7010]-1.dev.0.fw" if special module arg "ath9k_htc use_dev_fw=1" is set. Even though if replacement could work i.e. if we copy "/lib/firmware/ath9k_htc/htc_[9271|7010]-1.4.0.fw" over "/lib/firmware/htc_[9271|7010].fw" and USB dongle will work (but first somebody must test it - and I cannot because I only have device with OpenWRT with kernel 4.4) I don't see a reason to add this mess. We're talking about extra ~100k of space. Does it worth these games? I'd prefer strict solution which matches what all other distributions including Buildroot and full-scale Fedora/Debian ones. Moreover fixup on removal of the last <4.4 kernel will be much simpler - we'll need just to remove a couple of extra lines but not modify paths very carefully. -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] mac80211: install old firmware for ath9k-htc on target as well
In commit http://git.openwrt.org/?p=openwrt.git;a=commit;h=3990e15258808b145226d7e95332c4708f9f9463 I got rid of older ath9k_htc firmware in favor of newer ones. But that was not completely correct. New v1.4 ath9k_htc firmwares are supported in Linux kernels >= 4.4. And since not all boards were moved to 4.4 yet it makes perfect sense to get back installation of older firmwares for compatibility purposes. Signed-off-by: Alexey Brodkin Cc: John Crispin --- package/firmware/linux-firmware/qca.mk | 5 + 1 file changed, 5 insertions(+) diff --git a/package/firmware/linux-firmware/qca.mk b/package/firmware/linux-firmware/qca.mk index 7ad27ef..e5faa8a 100644 --- a/package/firmware/linux-firmware/qca.mk +++ b/package/firmware/linux-firmware/qca.mk @@ -9,6 +9,11 @@ $(eval $(call BuildPackage,ar3k-firmware)) Package/ath9k-htc-firmware = $(call Package/firmware-default,AR9271/AR7010 firmware) define Package/ath9k-htc-firmware/install + $(INSTALL_DIR) $(1)/lib/firmware + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/htc_9271.fw \ + $(PKG_BUILD_DIR)/htc_7010.fw \ + $(1)/lib/firmware $(INSTALL_DIR) $(1)/lib/firmware/ath9k_htc $(INSTALL_DATA) \ $(PKG_BUILD_DIR)/ath9k_htc/htc_9271-1.4.0.fw \ -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 2/2 v2] linux: add support of Synopsys ARCHS38-based boards
On Mon, 2016-01-18 at 20:51 +0300, Alexey Brodkin wrote: > This patch introduces support of new boards with ARC HS38 cores. > > ARC HS38 is a new generation of ARC cores which utilize ARCv2 ISA. > As with ARC770 we're addind support for 2 boards for now: > > [1] Synopsys SDP board (AXS103) > This is the same base-board as in AXS101 but with > FPGA-based CPU-tile where ARCHs38 core is implemented. > > [2] nSIM > Again this is the same simulation engine but configured for > new instruction set and features of new CPU. > > Signed-off-by: Alexey Brodkin > Cc: Felix Fietkau > Cc: Jo-Philipp Wich > Cc: Jonas Gorski > --- > > Changes v1 -> v2: > * Toolchain changes were moved to a separate patch > * Kernel patches were moved to target/linux/generic I'm wondering if there's a chance to get this patch applied? -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 1/2 v2] toolchain: add support of ARCv2 architecture
Hello, On Mon, 2016-01-18 at 20:51 +0300, Alexey Brodkin wrote: > This change adds support of ARC ISAv2 processors in > OpenWRT toolchain. > > In general gcc for ARC may compile code for both ISA versions > simultaneously but libgcc will be built only for default > architecture that's why it's necessary to specify --with-cpu > on gcc configuration. > > As for uClibc we need to use different configurations for > different ARC ISAs. > > Signed-off-by: Alexey Brodkin > Cc: Felix Fietkau > Cc: Jo-Philipp Wich > Cc: Jonas Gorski > --- > > Changes v1 -> v2: > * Toolchain changes were moved to a separate patch I'm wondering if there's a chance to get this patch applied? -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 0/2 v2] linux: add support of ARC HS38-based boards
Hi Felix, Jonas, On Mon, 2016-02-01 at 19:21 +0300, Alexey Brodkin wrote: > Hello, > > On Fri, 2016-01-22 at 23:44 +0300, Alexey Brodkin wrote: > > Hi Felix, > > > > On Mon, 2016-01-18 at 20:51 +0300, Alexey Brodkin wrote: > > > This patch introduces support of new boards with ARC HS38 cores. > > > > > > ARC HS38 is a new generation of ARC cores which utilize ARCv2 ISA. > > > Because of new ISA ARC HS38 are binary incompatible with ARC 700 > > > cores which requires both separate toolchain and target applications > > > including Linux kernel for that new cores. > > > > > > As with ARC770 we're addind support for 2 boards for now: > > > > > > [1] Synopsys SDP board (AXS103) > > > This is the same base-board as in AXS101 but with > > > FPGA-based CPU-tile where ARCHs38 core is implemented. > > > > > > [2] nSIM > > > Again this is the same simulation engine but configured for > > > new instruction set and features of new CPU. > > > > Any chance that tiny series gets reviewed sometime soon? > > Ping! I'm wondering if there's a problem with this series? It's been a while since I sent that last respin and it would be nice to get it either reviewed or accepted if there're no complaints. Regards, Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] build: don't add -fno-plt for ARC
Curent ARC toolchain fails to build libstdc++ if -fno-plt is used. Lots of following error messages appear: --->8-- ... staging_dir/toolchain-arc_arc700_gcc-arc-2015.06_uClibc-1.0.9/arc-openwrt-linux-uclibc/bin/ld: BFD (GNU Binutils) 2.23.2 assertion fail elf32-arc.c:2786 collect2: error: ld returned 1 exit status --->8-- In newer binutils (still in development) for ARC rewritten from scratch this seem to not happen, so once new binutils for ARC hit the street this patch might be reverted. Signed-off-by: Alexey Brodkin Cc: Felix Fietkau Cc: Jo-Philipp Wich Cc: Jonas Gorski --- config/Config-devel.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/Config-devel.in b/config/Config-devel.in index 5970ac2..938f0b3 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 + default "-fno-caller-saves -fno-plt" if !CONFIG_EXTERNAL_TOOLCHAIN && !arc default "-fno-caller-saves" help Extra target-independent optimizations to use when building for the target. -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 0/2 v2] linux: add support of ARC HS38-based boards
Hello, On Fri, 2016-01-22 at 23:44 +0300, Alexey Brodkin wrote: > Hi Felix, > > On Mon, 2016-01-18 at 20:51 +0300, Alexey Brodkin wrote: > > This patch introduces support of new boards with ARC HS38 cores. > > > > ARC HS38 is a new generation of ARC cores which utilize ARCv2 ISA. > > Because of new ISA ARC HS38 are binary incompatible with ARC 700 > > cores which requires both separate toolchain and target applications > > including Linux kernel for that new cores. > > > > As with ARC770 we're addind support for 2 boards for now: > > > > [1] Synopsys SDP board (AXS103) > > This is the same base-board as in AXS101 but with > > FPGA-based CPU-tile where ARCHs38 core is implemented. > > > > [2] nSIM > > Again this is the same simulation engine but configured for > > new instruction set and features of new CPU. > > Any chance that tiny series gets reviewed sometime soon? Ping! -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 0/2 v2] linux: add support of ARC HS38-based boards
Hi Felix, On Mon, 2016-01-18 at 20:51 +0300, Alexey Brodkin wrote: > This patch introduces support of new boards with ARC HS38 cores. > > ARC HS38 is a new generation of ARC cores which utilize ARCv2 ISA. > Because of new ISA ARC HS38 are binary incompatible with ARC 700 > cores which requires both separate toolchain and target applications > including Linux kernel for that new cores. > > As with ARC770 we're addind support for 2 boards for now: > > [1] Synopsys SDP board (AXS103) > This is the same base-board as in AXS101 but with > FPGA-based CPU-tile where ARCHs38 core is implemented. > > [2] nSIM > Again this is the same simulation engine but configured for > new instruction set and features of new CPU. Any chance that tiny series gets reviewed sometime soon? -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/2 v2] linux: add support of Synopsys ARCHS38-based boards
This patch introduces support of new boards with ARC HS38 cores. ARC HS38 is a new generation of ARC cores which utilize ARCv2 ISA. As with ARC770 we're addind support for 2 boards for now: [1] Synopsys SDP board (AXS103) This is the same base-board as in AXS101 but with FPGA-based CPU-tile where ARCHs38 core is implemented. [2] nSIM Again this is the same simulation engine but configured for new instruction set and features of new CPU. Signed-off-by: Alexey Brodkin Cc: Felix Fietkau Cc: Jo-Philipp Wich Cc: Jonas Gorski --- Changes v1 -> v2: * Toolchain changes were moved to a separate patch * Kernel patches were moved to target/linux/generic include/target.mk | 1 + target/linux/archs38/Makefile | 26 +++ target/linux/archs38/base-files.mk | 3 + .../archs38/base-files/etc/board.d/02_network | 19 ++ target/linux/archs38/base-files/lib/arc.sh | 50 + .../base-files/lib/preinit/01_preinit_arc.sh | 9 + target/linux/archs38/config-4.4| 183 + target/linux/archs38/dts/axc003_idu.dtsi | 126 target/linux/archs38/dts/axs103_idu.dts| 25 +++ target/linux/archs38/dts/axs10x_mb.dtsi| 225 + target/linux/archs38/dts/nsim_hs_idu.dts | 73 +++ target/linux/archs38/dts/skeleton.dtsi | 37 .../linux/archs38/generic/profiles/00-default.mk | 16 ++ .../linux/archs38/generic/profiles/01-minimal.mk | 15 ++ target/linux/archs38/generic/profiles/02-axs103.mk | 16 ++ .../linux/archs38/generic/profiles/03-nsim_hs.mk | 15 ++ target/linux/archs38/generic/target.mk | 8 + target/linux/archs38/image/Makefile| 41 18 files changed, 888 insertions(+) create mode 100644 target/linux/archs38/Makefile create mode 100644 target/linux/archs38/base-files.mk create mode 100755 target/linux/archs38/base-files/etc/board.d/02_network create mode 100644 target/linux/archs38/base-files/lib/arc.sh create mode 100644 target/linux/archs38/base-files/lib/preinit/01_preinit_arc.sh create mode 100644 target/linux/archs38/config-4.4 create mode 100644 target/linux/archs38/dts/axc003_idu.dtsi create mode 100644 target/linux/archs38/dts/axs103_idu.dts create mode 100644 target/linux/archs38/dts/axs10x_mb.dtsi create mode 100644 target/linux/archs38/dts/nsim_hs_idu.dts create mode 100644 target/linux/archs38/dts/skeleton.dtsi create mode 100644 target/linux/archs38/generic/profiles/00-default.mk create mode 100644 target/linux/archs38/generic/profiles/01-minimal.mk create mode 100644 target/linux/archs38/generic/profiles/02-axs103.mk create mode 100644 target/linux/archs38/generic/profiles/03-nsim_hs.mk create mode 100644 target/linux/archs38/generic/target.mk create mode 100644 target/linux/archs38/image/Makefile diff --git a/include/target.mk b/include/target.mk index d8c0212..f712244 100644 --- a/include/target.mk +++ b/include/target.mk @@ -265,6 +265,7 @@ ifeq ($(DUMP),1) CPU_TYPE ?= arc700 CPU_CFLAGS += -matomic CPU_CFLAGS_arc700 = -marc700 +CPU_CFLAGS_archs = -marchs endif DEFAULT_CFLAGS=$(strip $(CPU_CFLAGS) $(CPU_CFLAGS_$(CPU_TYPE)) $(CPU_CFLAGS_$(CPU_SUBTYPE))) endif diff --git a/target/linux/archs38/Makefile b/target/linux/archs38/Makefile new file mode 100644 index 000..166d3d5 --- /dev/null +++ b/target/linux/archs38/Makefile @@ -0,0 +1,26 @@ +# +# Copyright (C) 2016 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 +CPU_TYPE:=archs +BOARD:=archs38 +BOARDNAME:=Synopsys DesignWare ARC HS38 +MAINTAINER:=Alexey Brodkin +SUBTARGETS:=generic + +KERNEL_PATCHVER:=4.4 + +DEVICE_TYPE:=developerboard + +include $(INCLUDE_DIR)/target.mk + +define Target/Description + Synopsys DesignWare boards +endef + +$(eval $(call BuildTarget)) diff --git a/target/linux/archs38/base-files.mk b/target/linux/archs38/base-files.mk new file mode 100644 index 000..fdd2c71 --- /dev/null +++ b/target/linux/archs38/base-files.mk @@ -0,0 +1,3 @@ +define Package/base-files/install-target + rm -f $(1)/etc/config/network +endef diff --git a/target/linux/archs38/base-files/etc/board.d/02_network b/target/linux/archs38/base-files/etc/board.d/02_network new file mode 100755 index 000..da86ee0 --- /dev/null +++ b/target/linux/archs38/base-files/etc/board.d/02_network @@ -0,0 +1,19 @@ +#!/bin/sh +# +# Copyright (C) 2016 OpenWrt.org +# + +. /lib/arc.sh +. /lib/functions/uci-defaults.sh + +board_config_update + +case "$( arc_board_name )" in +"arc-sdp"*) + ucidef_set_interface_lan "eth0" "dhcp" + ;; +esac + +board_config_flush + +exit 0 diff --git a/target/linux/archs38/base-files/lib/arc.sh b/target/linux/ar
[OpenWrt-Devel] [PATCH 1/2 v2] toolchain: add support of ARCv2 architecture
This change adds support of ARC ISAv2 processors in OpenWRT toolchain. In general gcc for ARC may compile code for both ISA versions simultaneously but libgcc will be built only for default architecture that's why it's necessary to specify --with-cpu on gcc configuration. As for uClibc we need to use different configurations for different ARC ISAs. Signed-off-by: Alexey Brodkin Cc: Felix Fietkau Cc: Jo-Philipp Wich Cc: Jonas Gorski --- Changes v1 -> v2: * Toolchain changes were moved to a separate patch toolchain/gcc/common.mk | 1 + toolchain/uClibc/common.mk| 3 ++- toolchain/uClibc/config/archs | 10 ++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 toolchain/uClibc/config/archs diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk index 648cd2d..458215f 100644 --- a/toolchain/gcc/common.mk +++ b/toolchain/gcc/common.mk @@ -133,6 +133,7 @@ GCC_CONFIGURE:= \ $(call qstrip,$(CONFIG_EXTRA_GCC_CONFIG_OPTIONS)) \ $(if $(CONFIG_mips64)$(CONFIG_mips64el),--with-arch=mips64 \ --with-abi=$(call qstrip,$(CONFIG_MIPS64_ABI))) \ + $(if $(CONFIG_arc),--with-cpu=$(CONFIG_CPU_TYPE)) \ --with-gmp=$(TOPDIR)/staging_dir/host \ --with-mpfr=$(TOPDIR)/staging_dir/host \ --with-mpc=$(TOPDIR)/staging_dir/host \ diff --git a/toolchain/uClibc/common.mk b/toolchain/uClibc/common.mk index ad6ff02..2828156 100644 --- a/toolchain/uClibc/common.mk +++ b/toolchain/uClibc/common.mk @@ -41,8 +41,9 @@ GEN_CONFIG=$(SCRIPT_DIR)/kconfig.pl -n \ $(if $(CONFIG_UCLIBC_ENABLE_DEBUG),$(if $(wildcard $(CONFIG_DIR)/debug),'+' $(CONFIG_DIR)/debug)) \ $(CONFIG_DIR)/$(ARCH)$(strip \ $(if $(wildcard $(CONFIG_DIR)/$(ARCH).$(BOARD)),.$(BOARD), \ + $(if $(filter archs,$(subst ",,$(CONFIG_CPU_TYPE))),hs, \ $(if $(CONFIG_MIPS64_ABI),.$(subst ",,$(CONFIG_MIPS64_ABI)), \ - $(if $(CONFIG_HAS_SPE_FPU),$(if $(wildcard $(CONFIG_DIR)/$(ARCH).e500),.e500) + $(if $(CONFIG_HAS_SPE_FPU),$(if $(wildcard $(CONFIG_DIR)/$(ARCH).e500),.e500)) CPU_CFLAGS = \ -funsigned-char -fno-builtin -fno-asm \ diff --git a/toolchain/uClibc/config/archs b/toolchain/uClibc/config/archs new file mode 100644 index 000..961628e --- /dev/null +++ b/toolchain/uClibc/config/archs @@ -0,0 +1,10 @@ +ARCH_ANY_ENDIAN=y +ARCH_LITTLE_ENDIAN=y +ARCH_WANTS_LITTLE_ENDIAN=y +TARGET_ARCH="arc" +TARGET_arc=y +# CONFIG_ARC_CPU_700 is not set +CONFIG_ARC_CPU_HS=y +CONFIG_ARC_PAGE_SIZE_8K=y +# CONFIG_ARC_PAGE_SIZE_16K is not set +# CONFIG_ARC_PAGE_SIZE_4K is not set -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 0/2 v2] linux: add support of ARC HS38-based boards
This patch introduces support of new boards with ARC HS38 cores. ARC HS38 is a new generation of ARC cores which utilize ARCv2 ISA. Because of new ISA ARC HS38 are binary incompatible with ARC 700 cores which requires both separate toolchain and target applications including Linux kernel for that new cores. As with ARC770 we're addind support for 2 boards for now: [1] Synopsys SDP board (AXS103) This is the same base-board as in AXS101 but with FPGA-based CPU-tile where ARCHs38 core is implemented. [2] nSIM Again this is the same simulation engine but configured for new instruction set and features of new CPU. Alexey Brodkin (2): toolchain: add support of ARCv2 architecture linux: add support of Synopsys ARCHS38-based boards include/target.mk | 1 + target/linux/archs38/Makefile | 26 +++ target/linux/archs38/base-files.mk | 3 + .../archs38/base-files/etc/board.d/02_network | 19 ++ target/linux/archs38/base-files/lib/arc.sh | 50 + .../base-files/lib/preinit/01_preinit_arc.sh | 9 + target/linux/archs38/config-4.4| 183 + target/linux/archs38/dts/axc003_idu.dtsi | 126 target/linux/archs38/dts/axs103_idu.dts| 25 +++ target/linux/archs38/dts/axs10x_mb.dtsi| 225 + target/linux/archs38/dts/nsim_hs_idu.dts | 73 +++ target/linux/archs38/dts/skeleton.dtsi | 37 .../linux/archs38/generic/profiles/00-default.mk | 16 ++ .../linux/archs38/generic/profiles/01-minimal.mk | 15 ++ target/linux/archs38/generic/profiles/02-axs103.mk | 16 ++ .../linux/archs38/generic/profiles/03-nsim_hs.mk | 15 ++ target/linux/archs38/generic/target.mk | 8 + target/linux/archs38/image/Makefile| 41 toolchain/gcc/common.mk| 1 + toolchain/uClibc/common.mk | 3 +- toolchain/uClibc/config/archs | 10 + 21 files changed, 901 insertions(+), 1 deletion(-) create mode 100644 target/linux/archs38/Makefile create mode 100644 target/linux/archs38/base-files.mk create mode 100755 target/linux/archs38/base-files/etc/board.d/02_network create mode 100644 target/linux/archs38/base-files/lib/arc.sh create mode 100644 target/linux/archs38/base-files/lib/preinit/01_preinit_arc.sh create mode 100644 target/linux/archs38/config-4.4 create mode 100644 target/linux/archs38/dts/axc003_idu.dtsi create mode 100644 target/linux/archs38/dts/axs103_idu.dts create mode 100644 target/linux/archs38/dts/axs10x_mb.dtsi create mode 100644 target/linux/archs38/dts/nsim_hs_idu.dts create mode 100644 target/linux/archs38/dts/skeleton.dtsi create mode 100644 target/linux/archs38/generic/profiles/00-default.mk create mode 100644 target/linux/archs38/generic/profiles/01-minimal.mk create mode 100644 target/linux/archs38/generic/profiles/02-axs103.mk create mode 100644 target/linux/archs38/generic/profiles/03-nsim_hs.mk create mode 100644 target/linux/archs38/generic/target.mk create mode 100644 target/linux/archs38/image/Makefile create mode 100644 toolchain/uClibc/config/archs -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] arc: clean-up and move CFLAGS to include/target.mk
Most of currently mentioned CFLAGS in arc770/Makefile are not really required because: [1] "-Os -pipe" are set by default in include/target.mk [2] "-fno-caller-saves" gets enabled via menuconfig as an extra compiler flag for developers So the only one that makes sense is "-matomic" and that one is really essential. Without it many software packges won't build complainin on unresolved atomic ops. Signed-off-by: Alexey Brodkin Cc: Felix Fietkau Cc: Jo-Philipp Wich Cc: Jonas Gorski --- include/target.mk| 1 + target/linux/arc770/Makefile | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/include/target.mk b/include/target.mk index f129298..d8c0212 100644 --- a/include/target.mk +++ b/include/target.mk @@ -263,6 +263,7 @@ ifeq ($(DUMP),1) endif ifeq ($(ARCH),arc) CPU_TYPE ?= arc700 +CPU_CFLAGS += -matomic CPU_CFLAGS_arc700 = -marc700 endif DEFAULT_CFLAGS=$(strip $(CPU_CFLAGS) $(CPU_CFLAGS_$(CPU_TYPE)) $(CPU_CFLAGS_$(CPU_SUBTYPE))) diff --git a/target/linux/arc770/Makefile b/target/linux/arc770/Makefile index 52c5e00..f917338 100644 --- a/target/linux/arc770/Makefile +++ b/target/linux/arc770/Makefile @@ -9,7 +9,6 @@ include $(TOPDIR)/rules.mk ARCH:=arc BOARD:=arc770 BOARDNAME:=Synopsys DesignWare ARC 770D -CFLAGS:=-Os -pipe -fno-caller-saves -matomic MAINTAINER:=Alexey Brodkin SUBTARGETS:=generic -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] arc770/axs101: fix console output
While bumping kernel version kernel command line was unintentionally modified in attempt to make it closer to upstream version. In case of AXS that has not only serial port but HDMI/USB both capable of being debug console we have 2 entries in kernel's command line: --->8- console=tty0 console=ttyS3,115200n8 --->8- But as it turned out OpenWRT uses procd as init instead of Busybox. And in its turn procd gets the first "console" entry from kernel command line (/proc/cmdline) and uses it if default inittab is used: --->8- ... ::askconsole:/bin/ash --login --->8- So what we got is non-functional serial console. That change removes "console=tty0" which brings serial console back to life. Signed-off-by: Alexey Brodkin Cc: Felix Fietkau Cc: Jo-Philipp Wich Cc: Jonas Gorski --- target/linux/arc770/dts/axs101.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/arc770/dts/axs101.dts b/target/linux/arc770/dts/axs101.dts index 769e81a..8718eb4 100644 --- a/target/linux/arc770/dts/axs101.dts +++ b/target/linux/arc770/dts/axs101.dts @@ -17,6 +17,6 @@ compatible = "snps,axs101", "snps,arc-sdp"; chosen { - bootargs = "earlycon=uart8250,mmio32,0xe0022000,115200n8 console=tty0 console=ttyS3,115200n8 consoleblank=0"; + bootargs = "earlycon=uart8250,mmio32,0xe0022000,115200n8 console=ttyS3,115200n8"; }; }; -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 2/2] arc770: move arc patches to taregt/linux/generic
Hi Felix, On Fri, 2016-01-15 at 11:45 +0100, Felix Fietkau wrote: > On 2016-01-15 00:12, Alexey Brodkin wrote: > > Given those patches are relevant to any ARC platform and even > > ISA version it makes perfect sense for patches to exist > > in one place instead of being duplicated for each new ARC-based ASIC. > > > > Note this is a prerequisite for upstreaming of ARC HS38 support in > > OpenWRT. > > > > Signed-off-by: Alexey Brodkin > > Cc: Felix Fietkau > > Cc: Jo-Philipp Wich > > Cc: Jonas Gorski > > --- /dev/null > > +++ > > b/target/linux/generic/patches-4.4/331-arc-remove-dependency-on-DEVTMPFS.patch > > @@ -0,0 +1,36 @@ > > +From adfbf9e6cad93281cffceab078e7f6f2a8e094f9 Mon Sep 17 00:00:00 2001 > > +From: Alexey Brodkin > > +Date: Thu, 13 Aug 2015 01:56:02 +0300 > > +Subject: [PATCH 1/2] openwrt: arc - remove dependency on DEVTMPFS > > + > > +OpenWRT builds initramfs so that it doesn't require DEVTMPFS so dropping > > +this dependency. That helps to escape 2 separate kernel rebuilds with > > +and without initramfs. > > + > > +2 builds happen because OpenWRT first builds kernel and later modules. > > +When building entire kernel with simple "make" INITRAMFS sets to a real > > +value and so was triggering DEVTMPFS selection. Then when building only > > +modules with "make modules" command INITRAMFS is zeroed and so kernel > > +config was changing that lead to full kernel rebuild. > > + > > +Signed-off-by: Alexey Brodkin > > +--- > > + arch/arc/Kconfig | 2 -- > > + 1 file changed, 2 deletions(-) > > + > > +diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig > > +index 6312f60..a95bab3 100644 > > +--- a/arch/arc/Kconfig > > b/arch/arc/Kconfig > > +@@ -12,8 +12,6 @@ config ARC > > + select BUILDTIME_EXTABLE_SORT > > + select COMMON_CLK > > + select CLONE_BACKWARDS > > +- # ARC Busybox based initramfs absolutely relies on DEVTMPFS for /dev > > +- select DEVTMPFS if !INITRAMFS_SOURCE="" > > + select GENERIC_ATOMIC64 > > + select GENERIC_CLOCKEVENTS > > + select GENERIC_FIND_FIRST_BIT > Could you please send this one upstream as well? Adding Vineet so he may comment if that change makes sense upstream. -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/2] arc770: move arc patches to taregt/linux/generic
Given those patches are relevant to any ARC platform and even ISA version it makes perfect sense for patches to exist in one place instead of being duplicated for each new ARC-based ASIC. Note this is a prerequisite for upstreaming of ARC HS38 support in OpenWRT. Signed-off-by: Alexey Brodkin Cc: Felix Fietkau Cc: Jo-Philipp Wich Cc: Jonas Gorski --- ...openwrt-arc-remove-dependency-on-DEVTMPFS.patch | 36 - .../0002-openwrt-arc-add-OWRTDTB-section.patch | 91 -- .../331-arc-remove-dependency-on-DEVTMPFS.patch| 36 + .../patches-4.4/332-arc-add-OWRTDTB-section.patch | 91 ++ 4 files changed, 127 insertions(+), 127 deletions(-) delete mode 100644 target/linux/arc770/patches-4.4/0001-openwrt-arc-remove-dependency-on-DEVTMPFS.patch delete mode 100644 target/linux/arc770/patches-4.4/0002-openwrt-arc-add-OWRTDTB-section.patch create mode 100644 target/linux/generic/patches-4.4/331-arc-remove-dependency-on-DEVTMPFS.patch create mode 100644 target/linux/generic/patches-4.4/332-arc-add-OWRTDTB-section.patch diff --git a/target/linux/arc770/patches-4.4/0001-openwrt-arc-remove-dependency-on-DEVTMPFS.patch b/target/linux/arc770/patches-4.4/0001-openwrt-arc-remove-dependency-on-DEVTMPFS.patch deleted file mode 100644 index 29d9bff..000 --- a/target/linux/arc770/patches-4.4/0001-openwrt-arc-remove-dependency-on-DEVTMPFS.patch +++ /dev/null @@ -1,36 +0,0 @@ -From adfbf9e6cad93281cffceab078e7f6f2a8e094f9 Mon Sep 17 00:00:00 2001 -From: Alexey Brodkin -Date: Thu, 13 Aug 2015 01:56:02 +0300 -Subject: [PATCH 1/2] openwrt: arc - remove dependency on DEVTMPFS - -OpenWRT builds initramfs so that it doesn't require DEVTMPFS so dropping -this dependency. That helps to escape 2 separate kernel rebuilds with -and without initramfs. - -2 builds happen because OpenWRT first builds kernel and later modules. -When building entire kernel with simple "make" INITRAMFS sets to a real -value and so was triggering DEVTMPFS selection. Then when building only -modules with "make modules" command INITRAMFS is zeroed and so kernel -config was changing that lead to full kernel rebuild. - -Signed-off-by: Alexey Brodkin - arch/arc/Kconfig | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig -index 6312f60..a95bab3 100644 a/arch/arc/Kconfig -+++ b/arch/arc/Kconfig -@@ -12,8 +12,6 @@ config ARC - select BUILDTIME_EXTABLE_SORT - select COMMON_CLK - select CLONE_BACKWARDS -- # ARC Busybox based initramfs absolutely relies on DEVTMPFS for /dev -- select DEVTMPFS if !INITRAMFS_SOURCE="" - select GENERIC_ATOMIC64 - select GENERIC_CLOCKEVENTS - select GENERIC_FIND_FIRST_BIT --- -2.4.3 - diff --git a/target/linux/arc770/patches-4.4/0002-openwrt-arc-add-OWRTDTB-section.patch b/target/linux/arc770/patches-4.4/0002-openwrt-arc-add-OWRTDTB-section.patch deleted file mode 100644 index 02e9198..000 --- a/target/linux/arc770/patches-4.4/0002-openwrt-arc-add-OWRTDTB-section.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 690e7f2cad271595ff68cace1c45fb10779bde41 Mon Sep 17 00:00:00 2001 -From: Alexey Brodkin -Date: Fri, 15 Jan 2016 00:34:01 +0300 -Subject: [PATCH 2/2] openwrt: arc - add OWRTDTB section - -This change allows OpenWRT to patch resulting kernel binary with -external .dtb. - -That allows us to re-use exactky the same vmlinux on different boards -given its ARC core configurations match (at least cache line sizes etc). - -""patch-dtb" searches for ASCII "OWRTDTB:" strign and copies external -.dtb right after it, keeping the string in place. - -Signed-off-by: Alexey Brodkin - arch/arc/kernel/head.S| 10 ++ - arch/arc/kernel/setup.c | 4 +++- - arch/arc/kernel/vmlinux.lds.S | 13 + - 3 files changed, 26 insertions(+), 1 deletion(-) - -diff --git a/arch/arc/kernel/head.S b/arch/arc/kernel/head.S -index 689dd86..51154ae 100644 a/arch/arc/kernel/head.S -+++ b/arch/arc/kernel/head.S -@@ -49,6 +49,16 @@ - 1: - .endm - -+; Here "patch-dtb" will embed external .dtb -+; Note "patch-dtb" searches for ASCII "OWRTDTB:" string -+; and pastes .dtb right after it, hense the string precedes -+; __image_dtb symbol. -+ .section .owrt, "aw",@progbits -+ .ascii "OWRTDTB:" -+ENTRY(__image_dtb) -+ .fill 0x4000 -+END(__image_dtb) -+ - .section .init.text, "ax",@progbits - - ; -diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c -index e1b8744..9481c9d 100644 a/arch/arc/kernel/setup.c -+++ b/arch/arc/kernel/setup.c -@@ -370,6 +370,8 @@ static inline int is_kernel(unsigned long addr) - return 0; - } - -+extern struct boot_param_header __image_dtb; -+ - void __init setup_arch(char **cmdline_p) - { - #ifdef CONFIG_ARC_UBOO
[OpenWrt-Devel] [PATCH 1/2] arc770: bump linux kernel from 4.3 to 4.4
This switch involved: [1] Regeneration of config (few options went away) [2] Regeneration of patches so they apply cleanly (different offsets) [3] Update of .dts files because we now explicitly specify memory regions in use as opposed to previously used offset from 0x8000_ Signed-off-by: Alexey Brodkin Cc: Felix Fietkau Cc: Jo-Philipp Wich Cc: Jonas Gorski --- target/linux/arc770/Makefile | 2 +- target/linux/arc770/config-4.3 | 179 - target/linux/arc770/config-4.4 | 169 +++ target/linux/arc770/dts/axc001.dtsi| 2 +- target/linux/arc770/dts/axs101.dts | 2 +- target/linux/arc770/dts/axs10x_mb.dtsi | 1 + target/linux/arc770/dts/skeleton.dtsi | 2 +- ...openwrt-arc-remove-dependency-on-DEVTMPFS.patch | 31 .../0002-openwrt-arc-add-OWRTDTB-section.patch | 82 -- ...openwrt-arc-remove-dependency-on-DEVTMPFS.patch | 36 + .../0002-openwrt-arc-add-OWRTDTB-section.patch | 91 +++ 11 files changed, 301 insertions(+), 296 deletions(-) delete mode 100644 target/linux/arc770/config-4.3 create mode 100644 target/linux/arc770/config-4.4 delete mode 100644 target/linux/arc770/patches-4.3/0001-openwrt-arc-remove-dependency-on-DEVTMPFS.patch delete mode 100644 target/linux/arc770/patches-4.3/0002-openwrt-arc-add-OWRTDTB-section.patch create mode 100644 target/linux/arc770/patches-4.4/0001-openwrt-arc-remove-dependency-on-DEVTMPFS.patch create mode 100644 target/linux/arc770/patches-4.4/0002-openwrt-arc-add-OWRTDTB-section.patch diff --git a/target/linux/arc770/Makefile b/target/linux/arc770/Makefile index f62bf0e..52c5e00 100644 --- a/target/linux/arc770/Makefile +++ b/target/linux/arc770/Makefile @@ -13,7 +13,7 @@ CFLAGS:=-Os -pipe -fno-caller-saves -matomic MAINTAINER:=Alexey Brodkin SUBTARGETS:=generic -KERNEL_PATCHVER:=4.3 +KERNEL_PATCHVER:=4.4 DEVICE_TYPE:=developerboard diff --git a/target/linux/arc770/config-4.3 b/target/linux/arc770/config-4.3 deleted file mode 100644 index 7a13480..000 --- a/target/linux/arc770/config-4.3 +++ /dev/null @@ -1,179 +0,0 @@ -# CONFIG_16KSTACKS is not set -CONFIG_ARC=y -CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y -# CONFIG_ARCH_HAS_GCOV_PROFILE_ALL is not set -# CONFIG_ARCH_HAS_SG_CHAIN is not set -CONFIG_ARCH_REQUIRE_GPIOLIB=y -CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y -CONFIG_ARC_BUILTIN_DTB_NAME="" -CONFIG_ARC_CACHE=y -CONFIG_ARC_CACHE_LINE_SHIFT=5 -CONFIG_ARC_CACHE_PAGES=y -# CONFIG_ARC_CACHE_VIPT_ALIASING is not set -# CONFIG_ARC_CANT_LLSC is not set -# CONFIG_ARC_COMPACT_IRQ_LEVELS is not set -# CONFIG_ARC_CPU_750D is not set -CONFIG_ARC_CPU_770=y -CONFIG_ARC_CURR_IN_REG=y -CONFIG_ARC_DBG=y -# CONFIG_ARC_DBG_TLB_MISS_COUNT is not set -# CONFIG_ARC_DBG_TLB_PARANOIA is not set -CONFIG_ARC_DW2_UNWIND=y -# CONFIG_ARC_EMUL_UNALIGNED is not set -# CONFIG_ARC_FPU_SAVE_RESTORE is not set -CONFIG_ARC_HAS_DCACHE=y -# CONFIG_ARC_HAS_DCCM is not set -CONFIG_ARC_HAS_HW_MPY=y -CONFIG_ARC_HAS_ICACHE=y -# CONFIG_ARC_HAS_ICCM is not set -CONFIG_ARC_HAS_LLSC=y -CONFIG_ARC_HAS_SWAPE=y -# CONFIG_ARC_METAWARE_HLINK is not set -# CONFIG_ARC_MMU_V1 is not set -# CONFIG_ARC_MMU_V2 is not set -CONFIG_ARC_MMU_V3=y -# CONFIG_ARC_PAGE_SIZE_16K is not set -# CONFIG_ARC_PAGE_SIZE_4K is not set -CONFIG_ARC_PAGE_SIZE_8K=y -CONFIG_ARC_PLAT_AXS10X=y -CONFIG_ARC_PLAT_SIM=y -# CONFIG_ARC_PLAT_TB10X is not set -# CONFIG_ARC_UBOOT_SUPPORT is not set -CONFIG_AXS101=y -CONFIG_CLKDEV_LOOKUP=y -CONFIG_CLONE_BACKWARDS=y -CONFIG_COMMON_CLK=y -# CONFIG_CPU_BIG_ENDIAN is not set -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_WORKQUEUE=y -CONFIG_DTC=y -CONFIG_DWMAC_GENERIC=y -# CONFIG_DWMAC_IPQ806X is not set -# CONFIG_DWMAC_LPC18XX is not set -# CONFIG_DWMAC_MESON is not set -# CONFIG_DWMAC_ROCKCHIP is not set -# CONFIG_DWMAC_SOCFPGA is not set -# CONFIG_DWMAC_STI is not set -# CONFIG_DWMAC_SUNXI is not set -CONFIG_DW_APB_ICTL=y -CONFIG_GENERIC_ATOMIC64=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CSUM=y -CONFIG_GENERIC_FIND_FIRST_BIT=y -CONFIG_GENERIC_IO=y -CONFIG_GENERIC_IRQ_CHIP=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -# CONFIG_GEN_RTC is not set -CONFIG_GPIOLIB=y -CONFIG_GPIO_DEVRES=y -CONFIG_GPIO_DWAPB=y -CONFIG_GPIO_GENERIC=y -CONFIG_HAS_DMA=y -CONFIG_HAS_IOMEM=y -# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set -# CONFIG_HAVE_ARCH_BITREVERSE is not set -CONFIG_HAVE_ARCH_KGDB=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set -CONFIG_HAVE_CLK=y -CONFIG_HAVE_CLK_PREPARE=y -CONFIG_HAVE_DEBUG_STACKOVERFLOW=y -CONFIG_HAVE_FUTEX_CMPXCHG=y -# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set -CONFIG_HAVE_IOREMAP_PROT=y -CONFIG_HAVE_LATENCYTOP_SUPPORT=y -CONFIG_HAVE_MEMBLOCK=y -CONFIG_HAVE_MOD_ARCH_SPECIFIC=y -CONFIG_HAVE_NET_DSA=y -CONFIG_HAVE_OPROFILE=y -CONFIG_HAVE_PERF_EVENTS=y -CONFIG_HZ_PERIODIC=y -CONFIG_INITRAMFS_SOURCE="&quo
[OpenWrt-Devel] [PATCH 0/2] ARC770 updates
This series introduces quite minor changes for ARC770 SoC: [1] Linux kernel 4.4 is used now [2] Kernel patches are moved to generic 4.4 patches Alexey Brodkin (2): arc770: bump linux kernel from 4.3 to 4.4 arc770: move arc patches to taregt/linux/generic target/linux/arc770/Makefile | 2 +- target/linux/arc770/config-4.3 | 179 - target/linux/arc770/config-4.4 | 169 +++ target/linux/arc770/dts/axc001.dtsi| 2 +- target/linux/arc770/dts/axs101.dts | 2 +- target/linux/arc770/dts/axs10x_mb.dtsi | 1 + target/linux/arc770/dts/skeleton.dtsi | 2 +- ...openwrt-arc-remove-dependency-on-DEVTMPFS.patch | 31 .../0002-openwrt-arc-add-OWRTDTB-section.patch | 82 -- .../331-arc-remove-dependency-on-DEVTMPFS.patch| 36 + .../patches-4.4/332-arc-add-OWRTDTB-section.patch | 91 +++ 11 files changed, 301 insertions(+), 296 deletions(-) delete mode 100644 target/linux/arc770/config-4.3 create mode 100644 target/linux/arc770/config-4.4 delete mode 100644 target/linux/arc770/patches-4.3/0001-openwrt-arc-remove-dependency-on-DEVTMPFS.patch delete mode 100644 target/linux/arc770/patches-4.3/0002-openwrt-arc-add-OWRTDTB-section.patch create mode 100644 target/linux/generic/patches-4.4/331-arc-remove-dependency-on-DEVTMPFS.patch create mode 100644 target/linux/generic/patches-4.4/332-arc-add-OWRTDTB-section.patch -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] linux: add support of Synopsys ARCHS38-based boards
This patch introduces support of new boards with ARC HS38 cores. ARC HS38 is a new generation of ARC cores which utilize ARCv2 ISA. Because of new ISA ARC HS38 are binary incompatible with ARC 700 cores which requires both separate toolchain and target applications including Linux kernel for that new cores. As with ARC770 we're addind support for 2 boards for now: [1] Synopsys SDP board (AXS103) This is the same base-board as in AXS101 but with FPGA-based CPU-tile where ARCHs38 core is implemented. [2] nSIM Again this is the same simulation engine but configured for new instruction set and features of new CPU. Cc: Felix Fietkau Cc: Jo-Philipp Wich Cc: Jonas Gorski Signed-off-by: Alexey Brodkin --- include/target.mk | 1 + target/linux/archs38/Makefile | 27 +++ target/linux/archs38/base-files.mk | 3 + .../archs38/base-files/etc/board.d/02_network | 19 ++ target/linux/archs38/base-files/lib/arc.sh | 50 + .../base-files/lib/preinit/01_preinit_arc.sh | 9 + target/linux/archs38/config-4.3| 190 + target/linux/archs38/dts/axc003_idu.dtsi | 126 target/linux/archs38/dts/axs103_idu.dts| 25 +++ target/linux/archs38/dts/axs10x_mb.dtsi| 224 + target/linux/archs38/dts/nsim_hs_idu.dts | 73 +++ target/linux/archs38/dts/skeleton.dtsi | 37 .../linux/archs38/generic/profiles/00-default.mk | 16 ++ .../linux/archs38/generic/profiles/01-minimal.mk | 15 ++ target/linux/archs38/generic/profiles/02-axs103.mk | 16 ++ .../linux/archs38/generic/profiles/03-nsim_hs.mk | 15 ++ target/linux/archs38/generic/target.mk | 8 + target/linux/archs38/image/Makefile| 40 ...openwrt-arc-remove-dependency-on-DEVTMPFS.patch | 36 .../0002-openwrt-arc-add-OWRTDTB-section.patch | 91 + toolchain/gcc/common.mk| 1 + toolchain/uClibc/common.mk | 3 +- toolchain/uClibc/config/archs | 10 + 23 files changed, 1034 insertions(+), 1 deletion(-) create mode 100644 target/linux/archs38/Makefile create mode 100644 target/linux/archs38/base-files.mk create mode 100755 target/linux/archs38/base-files/etc/board.d/02_network create mode 100644 target/linux/archs38/base-files/lib/arc.sh create mode 100644 target/linux/archs38/base-files/lib/preinit/01_preinit_arc.sh create mode 100644 target/linux/archs38/config-4.3 create mode 100644 target/linux/archs38/dts/axc003_idu.dtsi create mode 100644 target/linux/archs38/dts/axs103_idu.dts create mode 100644 target/linux/archs38/dts/axs10x_mb.dtsi create mode 100644 target/linux/archs38/dts/nsim_hs_idu.dts create mode 100644 target/linux/archs38/dts/skeleton.dtsi create mode 100644 target/linux/archs38/generic/profiles/00-default.mk create mode 100644 target/linux/archs38/generic/profiles/01-minimal.mk create mode 100644 target/linux/archs38/generic/profiles/02-axs103.mk create mode 100644 target/linux/archs38/generic/profiles/03-nsim_hs.mk create mode 100644 target/linux/archs38/generic/target.mk create mode 100644 target/linux/archs38/image/Makefile create mode 100644 target/linux/archs38/patches-4.3/0001-openwrt-arc-remove-dependency-on-DEVTMPFS.patch create mode 100644 target/linux/archs38/patches-4.3/0002-openwrt-arc-add-OWRTDTB-section.patch create mode 100644 toolchain/uClibc/config/archs diff --git a/include/target.mk b/include/target.mk index f129298..009738a 100644 --- a/include/target.mk +++ b/include/target.mk @@ -264,6 +264,7 @@ ifeq ($(DUMP),1) ifeq ($(ARCH),arc) CPU_TYPE ?= arc700 CPU_CFLAGS_arc700 = -marc700 +CPU_CFLAGS_archs38 = -marchs endif DEFAULT_CFLAGS=$(strip $(CPU_CFLAGS) $(CPU_CFLAGS_$(CPU_TYPE)) $(CPU_CFLAGS_$(CPU_SUBTYPE))) endif diff --git a/target/linux/archs38/Makefile b/target/linux/archs38/Makefile new file mode 100644 index 000..855954a --- /dev/null +++ b/target/linux/archs38/Makefile @@ -0,0 +1,27 @@ +# +# 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 +CPU_TYPE:=archs +BOARD:=archs38 +BOARDNAME:=Synopsys DesignWare ARC HS38 +CFLAGS:=-Os -pipe -fno-caller-saves -matomic +MAINTAINER:=Alexey Brodkin +SUBTARGETS:=generic + +KERNEL_PATCHVER:=4.3 + +DEVICE_TYPE:=developerboard + +include $(INCLUDE_DIR)/target.mk + +define Target/Description + Synopsys DesignWare boards +endef + +$(eval $(call BuildTarget)) diff --git a/target/linux/archs38/base-files.mk b/target/linux/archs38/base-files.mk new file mode 100644 index 000..fdd2c71 --- /dev/null +++ b/target/linux/archs38/base-files.mk @@ -0,0 +1,3 @@ +define Package/base-files/install-target + rm -f $(1
Re: [OpenWrt-Devel] [PATCH v2] axs10x: initilaze network for wireless access-point
Hi Felix, On Mon, 2015-12-07 at 18:01 +0100, Felix Fietkau wrote: > On 2015-12-07 17:57, Alexey Brodkin wrote: > > Hi Felix, > > > > On Mon, 2015-12-07 at 17:49 +0100, Felix Fietkau wrote: > > > On 2015-12-07 17:45, Alexey Brodkin wrote: > > > > ARC SDP board sports only 1 network interface - eth0, > > > > so to operate as an access point it requires at least > > > > another interface (preferably wireless), > > > > so USB Wi-Fi dongle is what we want. > > > > > > > > And with USB Wi-Fi dongle attached ARC SDP board could be > > > > used as a "dumb" wireless access point. > > > > > > > > Now with modified network setup script it is only required > > > > to enable wireless radio on the first boot with > > > > -->8 > > > > uci set wireless.radio0.disabled=0 > > > > uci commit wireless > > > > wifi > > > > -->8 > > > > > > > > Note if by the time initscripts are executed USB Wi-Fi > > > > dongle not yet recognized and set up by Linux kernel > > > > its autodetection by "wifi" tool may not happen > > > > automatically. In that case before issuing command above > > > > one needs to populate /etc/config/wireless config: > > > > -->8 > > > > wifi detect > /etc/config/wireless > > > > -->8 > > > > > > > > Signed-off-by: Alexey Brodkin > > > > Cc: Felix Fietkau > > > > Cc: Jo-Philipp Wich > > > > Cc: Jonas Gorski > > > > --- > > > > > > > > Changes compared to v1: > > > > * Rebased on top of current master > > > > > > > > target/linux/arc770/base-files/etc/board.d/02_network | 1 + > > > > 1 file changed, 1 insertion(+) > > > > > > > > diff --git a/target/linux/arc770/base-files/etc/board.d/02_network > > > > b/target/linux/arc770/base > > > > -files/etc/board.d/02_network > > > > index cd5ad2d..7c74d2d 100755 > > > > --- a/target/linux/arc770/base-files/etc/board.d/02_network > > > > +++ b/target/linux/arc770/base-files/etc/board.d/02_network > > > > @@ -11,6 +11,7 @@ board_config_update > > > > case "$( arc_board_name )" in > > > > "arc-sdp"*) > > > > ucidef_set_interface_lan "eth0" "dhcp" > > > > + uci set network.lan.type='bridge' > > > board.d files should not be calling uci, and I don't think this line > > > even works. By the way, I don't think such a change is needed anymore, > > > did you test the current code as-is? > > > > Frankly I havent's tested it yet. > > From that patch > > http://git.openwrt.org/?p=openwrt.git;a=commitdiff;h=d0c35cbea6d55ddf2bff16e909ddf4feb6779aa5 > > I was under impression that this is only a matter of where init scripts > > were moved. > Not quite. The new files use a different implementation of a similar API > which doesn't generate any uci calls directly anymore. Instead, an > intermediate file - /etc/board.json - is emitted, which gets used to > generate the default config in a generic way. Thanks for explanation. > > BTW I should have named that patch v3, because v2 was sitting in patchwork > > for about 2 weeks already. And since "real" v2 patch does work, see > > http://patchwork.ozlabs.org/patch/548641/ > > (which is tested many times as of today) I floated "v3" right after rebase > > of my local repo. > > > > Any thoughts how I may setup a bridge on eth0 in init scripts in board.d? > Please test the current code, it should have a bridge automatically > without any changes to the existing scripts. Sure, let me try it on my board and if I still see any issues I'll let you know. -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v2] axs10x: initilaze network for wireless access-point
Hi Felix, On Mon, 2015-12-07 at 17:49 +0100, Felix Fietkau wrote: > On 2015-12-07 17:45, Alexey Brodkin wrote: > > ARC SDP board sports only 1 network interface - eth0, > > so to operate as an access point it requires at least > > another interface (preferably wireless), > > so USB Wi-Fi dongle is what we want. > > > > And with USB Wi-Fi dongle attached ARC SDP board could be > > used as a "dumb" wireless access point. > > > > Now with modified network setup script it is only required > > to enable wireless radio on the first boot with > > -->8 > > uci set wireless.radio0.disabled=0 > > uci commit wireless > > wifi > > -->8 > > > > Note if by the time initscripts are executed USB Wi-Fi > > dongle not yet recognized and set up by Linux kernel > > its autodetection by "wifi" tool may not happen > > automatically. In that case before issuing command above > > one needs to populate /etc/config/wireless config: > > -->8 > > wifi detect > /etc/config/wireless > > -->8 > > > > Signed-off-by: Alexey Brodkin > > Cc: Felix Fietkau > > Cc: Jo-Philipp Wich > > Cc: Jonas Gorski > > --- > > > > Changes compared to v1: > > * Rebased on top of current master > > > > target/linux/arc770/base-files/etc/board.d/02_network | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/target/linux/arc770/base-files/etc/board.d/02_network > > b/target/linux/arc770/base > > -files/etc/board.d/02_network > > index cd5ad2d..7c74d2d 100755 > > --- a/target/linux/arc770/base-files/etc/board.d/02_network > > +++ b/target/linux/arc770/base-files/etc/board.d/02_network > > @@ -11,6 +11,7 @@ board_config_update > > case "$( arc_board_name )" in > > "arc-sdp"*) > > ucidef_set_interface_lan "eth0" "dhcp" > > + uci set network.lan.type='bridge' > board.d files should not be calling uci, and I don't think this line > even works. By the way, I don't think such a change is needed anymore, > did you test the current code as-is? Frankly I havent's tested it yet. >From that patch >http://git.openwrt.org/?p=openwrt.git;a=commitdiff;h=d0c35cbea6d55ddf2bff16e909ddf4feb6779aa5 I was under impression that this is only a matter of where init scripts were moved. BTW I should have named that patch v3, because v2 was sitting in patchwork for about 2 weeks already. And since "real" v2 patch does work, see http://patchwork.ozlabs.org/patch/548641/ (which is tested many times as of today) I floated "v3" right after rebase of my local repo. Any thoughts how I may setup a bridge on eth0 in init scripts in board.d? -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2] axs10x: initilaze network for wireless access-point
ARC SDP board sports only 1 network interface - eth0, so to operate as an access point it requires at least another interface (preferably wireless), so USB Wi-Fi dongle is what we want. And with USB Wi-Fi dongle attached ARC SDP board could be used as a "dumb" wireless access point. Now with modified network setup script it is only required to enable wireless radio on the first boot with -->8 uci set wireless.radio0.disabled=0 uci commit wireless wifi -->8 Note if by the time initscripts are executed USB Wi-Fi dongle not yet recognized and set up by Linux kernel its autodetection by "wifi" tool may not happen automatically. In that case before issuing command above one needs to populate /etc/config/wireless config: -->8 wifi detect > /etc/config/wireless -->8---- Signed-off-by: Alexey Brodkin Cc: Felix Fietkau Cc: Jo-Philipp Wich Cc: Jonas Gorski --- Changes compared to v1: * Rebased on top of current master target/linux/arc770/base-files/etc/board.d/02_network | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/arc770/base-files/etc/board.d/02_network b/target/linux/arc770/base-files/etc/board.d/02_network index cd5ad2d..7c74d2d 100755 --- a/target/linux/arc770/base-files/etc/board.d/02_network +++ b/target/linux/arc770/base-files/etc/board.d/02_network @@ -11,6 +11,7 @@ board_config_update case "$( arc_board_name )" in "arc-sdp"*) ucidef_set_interface_lan "eth0" "dhcp" + uci set network.lan.type='bridge' ;; esac -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Daily builds for arc770
Hi Felix, Jonas, On Tue, 2015-12-01 at 02:28 +0300, Alexey Brodkin wrote: > Hello, > > I'm wondering if there's a chance to setup snapshot builder for recently > introduced > ARC770 boards? Any thoughts on this? -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Daily builds for arc770
Hello, I'm wondering if there's a chance to setup snapshot builder for recently introduced ARC770 boards? -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2] mac80211: install new firmware for ath9k-htc on target
For quite some time new firmware for ath9k-htc devices is available in http://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/tree/ath9k_htc/ Moreover ath9k-htc kernel driver expects this new v1.4 firmware to exist in /lib/firmware/ath9k_htc. What happens currently: >8-- [7.83] usb 1-1: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested [7.84] usb 1-1: Direct firmware load for ath9k_htc/htc_9271-1.4.0.fw failed with error -2 [7.85] usb 1-1: Falling back to user helper [7.87] usbcore: registered new interface driver ath9k_htc [7.88] firmware ath9k_htc!htc_9271-1.4.0.fw: firmware_loading_store: map pages failed [7.89] usb 1-1: ath9k_htc: Firmware htc_9271.fw requested [8.20] usb 1-1: ath9k_htc: Transferred FW: htc_9271.fw, size: 50980 [8.44] ath9k_htc 1-1:1.0: ath9k_htc: HTC initialized with 33 credits [ 10.72] ath9k_htc 1-1:1.0: ath9k_htc: FW Version: 1.3 [ 10.74] ath9k_htc 1-1:1.0: FW RMW support: Off [ 10.76] ieee80211 phy0: Atheros AR9271 Rev:1 >8-- And with that patch new firmware is used instead: >8-- [ 33.92] usb 1-1: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested [ 34.23] usb 1-1: ath9k_htc: Transferred FW: ath9k_htc/htc_9271-1.4.0.fw, size: 51008 [ 34.48] ath9k_htc 1-1:1.0: ath9k_htc: HTC initialized with 33 credits [ 34.74] ath9k_htc 1-1:1.0: ath9k_htc: FW Version: 1.4 [ 34.75] ath9k_htc 1-1:1.0: FW RMW support: On >8-- Signed-off-by: Alexey Brodkin Cc: Felix Fietkau Cc: Hauke Mehrtens --- Changes compared to v1: * Removed installation of old firmware package/kernel/mac80211/Makefile | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index 4b4f774..1dd1b84 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -1823,11 +1823,11 @@ endef define KernelPackage/ath9k-htc/install - $(INSTALL_DIR) $(1)/lib/firmware + $(INSTALL_DIR) $(1)/lib/firmware/ath9k_htc $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/htc_9271.fw \ - $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/htc_7010.fw \ - $(1)/lib/firmware/ + $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ath9k_htc/htc_9271-1.4.0.fw \ + $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ath9k_htc/htc_7010-1.4.0.fw \ + $(1)/lib/firmware/ath9k_htc endef define KernelPackage/b43/install -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] mac80211: install new firmware for ath9k-htc on target
For quite some time new firmware for ath9k-htc devices is available in http://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/tree/ath9k_htc/ Moreover ath9k-htc kernel driver expects this new v1.4 firmware to exist in /lib/firmware/ath9k_htc. What happens currently: >8-- [7.83] usb 1-1: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested [7.84] usb 1-1: Direct firmware load for ath9k_htc/htc_9271-1.4.0.fw failed with error -2 [7.85] usb 1-1: Falling back to user helper [7.87] usbcore: registered new interface driver ath9k_htc [7.88] firmware ath9k_htc!htc_9271-1.4.0.fw: firmware_loading_store: map pages failed [7.89] usb 1-1: ath9k_htc: Firmware htc_9271.fw requested [8.20] usb 1-1: ath9k_htc: Transferred FW: htc_9271.fw, size: 50980 [8.44] ath9k_htc 1-1:1.0: ath9k_htc: HTC initialized with 33 credits [ 10.72] ath9k_htc 1-1:1.0: ath9k_htc: FW Version: 1.3 [ 10.74] ath9k_htc 1-1:1.0: FW RMW support: Off [ 10.76] ieee80211 phy0: Atheros AR9271 Rev:1 >8-- And with that patch new firmware is used instead: >8-- [ 33.92] usb 1-1: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested [ 34.23] usb 1-1: ath9k_htc: Transferred FW: ath9k_htc/htc_9271-1.4.0.fw, size: 51008 [ 34.48] ath9k_htc 1-1:1.0: ath9k_htc: HTC initialized with 33 credits [ 34.74] ath9k_htc 1-1:1.0: ath9k_htc: FW Version: 1.4 [ 34.75] ath9k_htc 1-1:1.0: FW RMW support: On >8-- Signed-off-by: Alexey Brodkin Cc: Felix Fietkau --- package/kernel/mac80211/Makefile | 5 + 1 file changed, 5 insertions(+) diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index 4b4f774..7165fc3 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -1828,6 +1828,11 @@ define KernelPackage/ath9k-htc/install $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/htc_9271.fw \ $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/htc_7010.fw \ $(1)/lib/firmware/ + $(INSTALL_DIR) $(1)/lib/firmware/ath9k_htc + $(INSTALL_DATA) \ + $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ath9k_htc/htc_9271-1.4.0.fw \ + $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ath9k_htc/htc_7010-1.4.0.fw \ + $(1)/lib/firmware/ath9k_htc endef define KernelPackage/b43/install -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] ath9k-htc init
Hi Jonas, On Thu, 2015-11-26 at 14:19 +0100, Jonas Gorski wrote: > On Thu, Nov 26, 2015 at 2:07 PM, Alexey Brodkin > wrote: > > Hi Jonas, > > > > On Mon, 2015-11-23 at 16:48 +0100, Jonas Gorski wrote: > > > On Mon, Nov 23, 2015 at 9:21 AM, Alexey Brodkin > > > wrote: > > > > Hi Felix, Jonas, > > > > > > > > While playing with my AXS101 board and USB WI-Fi dongles I bumped in > > > > a couple of issues. Fortunately I found at least one dongle that > > > > works quite nice. That's TP-Link TL-WN721N (or its WN722N sibling) > > > > which is based on Atheros AR9271 chip even though it did require > > > > one unexpected tweak. > > > > > > > > For starters I just selected "kmod-ath9k-htc" in menuconfig and > > > > on boot saw USB device recognized, its firmware was loaded, > > > > "wifi detect" recognized it as well, see log below. > > > > > > > > But then "wlan0" interface was not created on "wifi" command. > > > > > > > > After some googling I somehow came to resolution that "hostapd" > > > > package installation fixes this problem. And indeed once I got > > > > image rebuilt with "CONFIG_PACKAGE_hostapd=y" all worked as expected > > > > and I was able to use my board as a Wi-Fi access point. > > > > > > > > So the question is if this is expected (requirement for "hostapd") > > > > [for "ath9k_htc"]? > > > > > > Yes, hostapd[-mini] (or wpad[-mini]) is required for AP mode, and > > > wpasupplicant or wpad for encrypted STA mode. > > > > Ooops I didn't realize that right away, indeed I'm trying to setup WiFi > > AP and hostAPD (which is really just "host AP Daemon") or alike is a must. > > > > The next question would be which option should I use then? > > 1) good olde HostAPD > > 2) its -mini sibling > > 3) wpad > > 4) its -mini sibling > > OpenWrt default is wpad-mini for wifi capable devices (which is just a > unified binary of hostapd and wpasupplicant to prevent code > duplication and save space). The non-mini versions add support for > enterprisey stuff like radius athentication, which aren't needed for > most home setups. Thanks, now that's completely clear. A bit of-topic. With current configuration: a) network ucidef_set_interface_raw "lan" "eth0" "dhcp" uci set network.lan.type='bridge' b) wireless as set with "wifi detect" I was expecting my board with ath9k-htc Wi-Fi USB dongle to become a "dumb AP". And to some extent it happens. I do see new Wi-Fi network with SSID OpenWRT but devices I'm trying to connect to this network cannot obtain configuration via DHCP. If on say my smartphone I set IP address and gateway manually for OpenWRT Wi-Fi connection then I may reach my access-point. For example I may open LuCI in smartphone's web-browser. But I cannot reach anything behind AP. It looks like bridge (that I do see in ifconfig output) doesn't actually work. I tried to build and run TCP dump but it crashes quite soon (interesting enough because of the same unaligned access exception as ath9k-htc driver itself when multicast_to_unicast is enabled). In other words I wasn't able to figure out myself what's wrong in my setup. I'm wondering if there're known issues or limitations for that king of configuration (bridged ethX and USB wlanX)? > > > > Another minor issue is that USB dongle gets recognized a bit late > > > > so that automatic "wifi detect" gets already executed and > > > > "/etc/config/wireless" isn't created. That requires manual execution of > > > > "wifi detect > /etc/config/wireless". Essentially extending delay in > > > > "package/base-files/files/etc/init.d/boot" makes a difference: > > > > -->8--- > > > > # allow wifi modules time to settle > > > > sleep 15 # instead of 1 > > > > -->8--- > > > > but I'm not sure if we want to do that change for all devices. > > > > Then if there's a better way to make auto population of > > > > "/etc/config/wireless"? > > > > > > Likely the firmware is loaded asynchronously, so the _probe function > > > returns quickly. Our workaround in OpenWrt for other drivers is to > > > make the _probe f
Re: [OpenWrt-Devel] ath9k-htc init
Hi Jonas, On Mon, 2015-11-23 at 16:48 +0100, Jonas Gorski wrote: > On Mon, Nov 23, 2015 at 9:21 AM, Alexey Brodkin > wrote: > > Hi Felix, Jonas, > > > > While playing with my AXS101 board and USB WI-Fi dongles I bumped in > > a couple of issues. Fortunately I found at least one dongle that > > works quite nice. That's TP-Link TL-WN721N (or its WN722N sibling) > > which is based on Atheros AR9271 chip even though it did require > > one unexpected tweak. > > > > For starters I just selected "kmod-ath9k-htc" in menuconfig and > > on boot saw USB device recognized, its firmware was loaded, > > "wifi detect" recognized it as well, see log below. > > > > But then "wlan0" interface was not created on "wifi" command. > > > > After some googling I somehow came to resolution that "hostapd" > > package installation fixes this problem. And indeed once I got > > image rebuilt with "CONFIG_PACKAGE_hostapd=y" all worked as expected > > and I was able to use my board as a Wi-Fi access point. > > > > So the question is if this is expected (requirement for "hostapd") > > [for "ath9k_htc"]? > > Yes, hostapd[-mini] (or wpad[-mini]) is required for AP mode, and > wpasupplicant or wpad for encrypted STA mode. Ooops I didn't realize that right away, indeed I'm trying to setup WiFi AP and hostAPD (which is really just "host AP Daemon") or alike is a must. The next question would be which option should I use then? 1) good olde HostAPD 2) its -mini sibling 3) wpad 4) its -mini sibling > > Another minor issue is that USB dongle gets recognized a bit late > > so that automatic "wifi detect" gets already executed and > > "/etc/config/wireless" isn't created. That requires manual execution of > > "wifi detect > /etc/config/wireless". Essentially extending delay in > > "package/base-files/files/etc/init.d/boot" makes a difference: > > -->8--- > > # allow wifi modules time to settle > > sleep 15 # instead of 1 > > -->8--- > > but I'm not sure if we want to do that change for all devices. > > Then if there's a better way to make auto population of > > "/etc/config/wireless"? > > Likely the firmware is loaded asynchronously, so the _probe function > returns quickly. Our workaround in OpenWrt for other drivers is to > make the _probe function wait for the firmware to have loaded. and > thus the wifi device registered in the linux kernel. This will ensure > the wifi subsystem knows about it when wifi detect is called. This > seems to be missing for ath9k-htc. May I get a reference to an example of that workaround? -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2] axs10x: initilaze network for wireless access-point
ARC SDP board sports only 1 network interface - eth0, so to operate as an access point it requires at least another interface (preferably wireless), so USB Wi-Fi dongle is what we want. And with USB Wi-Fi dongle attached ARC SDP board could be used as a "dumb" wireless access point. Now with modified network setup script it is only required to enable wireless radio on the first boot with -->8 uci set wireless.radio0.disabled=0 uci commit wireless wifi -->8 Note if by the time initscripts are executed USB Wi-Fi dongle not yet recognized and set up by Linux kernel its autodetection by "wifi" tool may not happen automatically. In that case before issuing command above one needs to populate /etc/config/wireless config: -->8 wifi detect > /etc/config/wireless -->8---- Signed-off-by: Alexey Brodkin Cc: Felix Fietkau Cc: Jo-Philipp Wich Cc: Jonas Gorski --- Changes compared to v1: * Reverted to use of ucidef_set_interface_raw script * Removed work-around for driver problem (unaligned read if multicast enabled) target/linux/arc770/base-files/etc/uci-defaults/02_network | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/arc770/base-files/etc/uci-defaults/02_network b/target/linux/arc770/base-files/etc/uci-defaults/02_network index 87cfe81..685b2ab 100644 --- a/target/linux/arc770/base-files/etc/uci-defaults/02_network +++ b/target/linux/arc770/base-files/etc/uci-defaults/02_network @@ -15,6 +15,7 @@ ucidef_set_interface_loopback case "$( arc_board_name )" in "arc-sdp"*) ucidef_set_interface_raw "lan" "eth0" "dhcp" + uci set network.lan.type='bridge' ;; esac -- 2.4.3 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] axs10x: initilaze network for wireless access-point
Hi Jonas, On Mon, 2015-11-23 at 16:54 +0100, Jonas Gorski wrote: > On Mon, Nov 23, 2015 at 9:28 AM, Alexey Brodkin > wrote: > > ARC SDP board sports only 1 network interface - eth0, > > so to operate as an access point it requires at least > > another interface (preferably wireless), > > so USB Wi-Fi dongle is what we want. > > > > And with USB Wi-Fi dongle attached ARC SDP board could be > > used as a "dumb" wireless access point. > > > > Now with modified network setup script it is only required > > to enable wireless radio on the first boot with > > -->8 > > uci set wireless.radio0.disabled=0 > > uci commit wireless > > wifi > > -->8 > > > > Note if by the time initscripts are executed USB Wi-Fi > > dongle not yet recognized and set up by Linux kernel > > its autodetection by "wifi" tool may not happen > > automatically. In that case before issuing command above > > one needs to populate /etc/config/wireless config: > > -->8 > > wifi detect > /etc/config/wireless > > -->8 > > > > Signed-off-by: Alexey Brodkin > > Cc: Felix Fietkau > > Cc: Jo-Philipp Wich > > Cc: Jonas Gorski > > --- > > target/linux/arc770/base-files/etc/uci-defaults/02_network | 12 > > +++- > > 1 file changed, 11 insertions(+), 1 deletion(-) > > > > diff --git a/target/linux/arc770/base-files/etc/uci-defaults/02_network > > b/target/linux/arc770/base-files/etc/uci > > -defaults/02_network > > index 87cfe81..7503f85 100644 > > --- a/target/linux/arc770/base-files/etc/uci-defaults/02_network > > +++ b/target/linux/arc770/base-files/etc/uci-defaults/02_network > > @@ -14,7 +14,17 @@ ucidef_set_interface_loopback > > > > case "$( arc_board_name )" in > > "arc-sdp"*) > > - ucidef_set_interface_raw "lan" "eth0" "dhcp" > > Keep this line instead > > > + uci set network.lan.type='bridge' > > And only add this line. > > > + uci set network.lan.ifname='eth0 wlan0' > > This is unneeded, as netifd will automatically join the wifi interface > to the bridge in the default config (with the option network 'lan' > line in /etc/config/wireless). Yep, I did figure that out just now. So will re-spin it. > > > + # With multicast-to-unicast enabled kernel crashes > > + # on the first wireless client connection in > > + # br_multicast_add_group() -> br_port_group_equal() -> > > + # ether_addr_equal() due to misaligned read. > > + # For some reason "src" being "eth_hdr(skb)->h_source" > > + # is not 16-bit aligned as it is supposed to be. > > + uci set network.lan.multicast_to_unicast='0' > > And this doesn't belong here at all, this is a complete separate issue > and should be fixed where it occurs, not worked around (sounds like an > issue in the ath9k-htc driver). Does ARC not provide emulation of > unaligned accesses like mips does? Well in ARCv1 we can only handle unaligned access in software. Here I mean handle unaligned exception in Linux kernel and copying data back to caller. But this essentially comes with performance penalty. On ARCv2 we may have that feature right in hardware though still not necessary - remember ARC is highly configurable architecture and real users (I mean vendors of ASICs) may use or not use each particular feature. But I'd say unaligned access highlights a problem here (and I'm not yet to blame yet anybody for now). Because what happens compiler attempts to use half-word (two-bytes) read () on a byte-aligned address (something like 0x4000_0001). And that happens in ether_addr_equal() comment for which clearly states: https://github.com/torvalds/linux/blob/master/include/linux/etherdevice.h#L308 >8- Please note: addr1 & addr2 must both be aligned to u16. >8- So what we seeing here "src = eth_hdr(skb)->h_source" is not 2-bytes aligned (=0x9e3c766b) which I believe should not be the case , right? I mean even if unaligned accesses could be supported something doesn't match expectations of ether_addr_equal(). Any thoughts? -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] arc770/axs101: accomodate DW GMAC long reset sequence
Hi Felix, On Mon, 2015-11-23 at 11:45 +0300, Alexey Brodkin wrote: > On ARC SDP board DMA block of DW GMAC gets out of reset much > longer than expected by default driver. > > For now to accomodate this issue we're extending timeout value. > > Signed-off-by: Alexey Brodkin Please disregard that patch. This problem as it turned out was already fixed in hardware, so the patch is no longer required. -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] arc770/axs101: accomodate DW GMAC long reset sequence
On ARC SDP board DMA block of DW GMAC gets out of reset much longer than expected by default driver. For now to accomodate this issue we're extending timeout value. Signed-off-by: Alexey Brodkin --- .../0003-fix-GMAC-init-by-longer-reset-wait.patch | 45 ++ 1 file changed, 45 insertions(+) create mode 100644 target/linux/arc770/patches-4.3/0003-fix-GMAC-init-by-longer-reset-wait.patch diff --git a/target/linux/arc770/patches-4.3/0003-fix-GMAC-init-by-longer-reset-wait.patch b/target/linux/arc770/patches-4.3/0003-fix-GMAC-init-by-longer-reset-wait.patch new file mode 100644 index 000..8bab11d --- /dev/null +++ b/target/linux/arc770/patches-4.3/0003-fix-GMAC-init-by-longer-reset-wait.patch @@ -0,0 +1,45 @@ +From ed78bec3722022f6622f1810111f43e5e752baf6 Mon Sep 17 00:00:00 2001 +From: Alexey Brodkin +Date: Mon, 16 Nov 2015 23:15:54 +0300 +Subject: [PATCH] fix GMAC init by longer reset wait + +On ARC SDP board DMA block of DW GMAC gets out of reset much +longer than expected by default driver. + +For now to accomodate this issue we're extending timeout value. + +Signed-off-by: Alexey Brodkin +--- + drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c | 2 +- + drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c +index 0e8937c..f29cf5b 100644 +--- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c +@@ -39,7 +39,7 @@ static int dwmac1000_dma_init(void __iomem *ioaddr, int pbl, int fb, int mb, + /* DMA SW reset */ + value |= DMA_BUS_MODE_SFT_RESET; + writel(value, ioaddr + DMA_BUS_MODE); +- limit = 10; ++ limit = 1000; + while (limit--) { + if (!(readl(ioaddr + DMA_BUS_MODE) & DMA_BUS_MODE_SFT_RESET)) + break; +diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c +index 9d0971c..651d94c 100644 +--- a/drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c +@@ -41,7 +41,7 @@ static int dwmac100_dma_init(void __iomem *ioaddr, int pbl, int fb, int mb, + /* DMA SW reset */ + value |= DMA_BUS_MODE_SFT_RESET; + writel(value, ioaddr + DMA_BUS_MODE); +- limit = 10; ++ limit = 1000; + while (limit--) { + if (!(readl(ioaddr + DMA_BUS_MODE) & DMA_BUS_MODE_SFT_RESET)) + break; +-- +2.5.0 + -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] axs10x: initilaze network for wireless access-point
ARC SDP board sports only 1 network interface - eth0, so to operate as an access point it requires at least another interface (preferably wireless), so USB Wi-Fi dongle is what we want. And with USB Wi-Fi dongle attached ARC SDP board could be used as a "dumb" wireless access point. Now with modified network setup script it is only required to enable wireless radio on the first boot with -->8 uci set wireless.radio0.disabled=0 uci commit wireless wifi -->8 Note if by the time initscripts are executed USB Wi-Fi dongle not yet recognized and set up by Linux kernel its autodetection by "wifi" tool may not happen automatically. In that case before issuing command above one needs to populate /etc/config/wireless config: -->8 wifi detect > /etc/config/wireless -->8---- Signed-off-by: Alexey Brodkin Cc: Felix Fietkau Cc: Jo-Philipp Wich Cc: Jonas Gorski --- target/linux/arc770/base-files/etc/uci-defaults/02_network | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/target/linux/arc770/base-files/etc/uci-defaults/02_network b/target/linux/arc770/base-files/etc/uci-defaults/02_network index 87cfe81..7503f85 100644 --- a/target/linux/arc770/base-files/etc/uci-defaults/02_network +++ b/target/linux/arc770/base-files/etc/uci-defaults/02_network @@ -14,7 +14,17 @@ ucidef_set_interface_loopback case "$( arc_board_name )" in "arc-sdp"*) - ucidef_set_interface_raw "lan" "eth0" "dhcp" + uci set network.lan='interface' + uci set network.lan.type='bridge' + uci set network.lan.ifname='eth0 wlan0' + uci set network.lan.proto='dhcp' + # With multicast-to-unicast enabled kernel crashes + # on the first wireless client connection in + # br_multicast_add_group() -> br_port_group_equal() -> + # ether_addr_equal() due to misaligned read. + # For some reason "src" being "eth_hdr(skb)->h_source" + # is not 16-bit aligned as it is supposed to be. + uci set network.lan.multicast_to_unicast='0' ;; esac -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] ath9k-htc init
Hi Felix, Jonas, While playing with my AXS101 board and USB WI-Fi dongles I bumped in a couple of issues. Fortunately I found at least one dongle that works quite nice. That's TP-Link TL-WN721N (or its WN722N sibling) which is based on Atheros AR9271 chip even though it did require one unexpected tweak. For starters I just selected "kmod-ath9k-htc" in menuconfig and on boot saw USB device recognized, its firmware was loaded, "wifi detect" recognized it as well, see log below. But then "wlan0" interface was not created on "wifi" command. After some googling I somehow came to resolution that "hostapd" package installation fixes this problem. And indeed once I got image rebuilt with "CONFIG_PACKAGE_hostapd=y" all worked as expected and I was able to use my board as a Wi-Fi access point. So the question is if this is expected (requirement for "hostapd") [for "ath9k_htc"]? Another minor issue is that USB dongle gets recognized a bit late so that automatic "wifi detect" gets already executed and "/etc/config/wireless" isn't created. That requires manual execution of "wifi detect > /etc/config/wireless". Essentially extending delay in "package/base-files/files/etc/init.d/boot" makes a difference: -->8--- # allow wifi modules time to settle sleep 15 # instead of 1 -->8--- but I'm not sure if we want to do that change for all devices. Then if there's a better way to make auto population of "/etc/config/wireless"? -Alexey Generic arc770 + kmod-ath9k-htc (CONFIG_PACKAGE_kmod-ath9k-htc=y): ->8-- [1.14] usb 1-1: new high-speed USB device number 2 using ehci-platform [1.71] init: - preinit - Detected arc-sdp // Synopsys AXS101 Development Board [1.80] random: mktemp urandom read with 3 bits of entropy available Press the [f] key and hit [enter] to enter failsafe mode Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level [4.93] procd: - early - [5.54] procd: - ubus - [6.55] procd: - init - [7.15] Loading modules backported from Linux version master-2015-10-26-0-g28c26cb [7.16] Backport generated by backports.git backports-20150903-4-g12cf266 [7.19] cfg80211: World regulatory domain updated: [7.19] cfg80211: DFS Master region: unset [7.22] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time) [7.24] cfg80211: (2402000 KHz - 2472000 KHz @ 4 KHz), (N/A, 2000 mBm), (N/A) [7.26] cfg80211: (2457000 KHz - 2482000 KHz @ 4 KHz), (N/A, 2000 mBm), (N/A) [7.26] cfg80211: (2474000 KHz - 2494000 KHz @ 2 KHz), (N/A, 2000 mBm), (N/A) [7.28] cfg80211: (517 KHz - 525 KHz @ 8 KHz, 16 KHz AUTO), (N/A, 2000 mBm), (N/A) [7.28] cfg80211: (525 KHz - 533 KHz @ 8 KHz, 16 KHz AUTO), (N/A, 2000 mBm), (0 s) [7.30] cfg80211: (549 KHz - 573 KHz @ 16 KHz), (N/A, 2000 mBm), (0 s) [7.30] cfg80211: (5735000 KHz - 5835000 KHz @ 8 KHz), (N/A, 2000 mBm), (N/A) [7.32] cfg80211: (5724 KHz - 6372 KHz @ 216 KHz), (N/A, 0 mBm), (N/A) [7.36] usb 1-1: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested [7.37] usb 1-1: Direct firmware load for ath9k_htc/htc_9271-1.4.0.fw failed with error -2 [7.38] usb 1-1: Falling back to user helper [7.40] usbcore: registered new interface driver ath9k_htc [7.41] firmware ath9k_htc!htc_9271-1.4.0.fw: firmware_loading_store: map pages failed [7.42] usb 1-1: ath9k_htc: Firmware htc_9271.fw requested [7.73] usb 1-1: ath9k_htc: Transferred FW: htc_9271.fw, size: 50980 [7.97] ath9k_htc 1-1:1.0: ath9k_htc: HTC initialized with 33 credits [ 10.30] ath9k_htc 1-1:1.0: ath9k_htc: FW Version: 1.3 [ 10.30] ath9k_htc 1-1:1.0: FW RMW support: Off [ 10.41] ieee80211 phy0: Atheros AR9271 Rev:1 [ 10.41] cfg80211: Regulatory domain changed to country: CN [ 10.46] cfg80211: DFS Master region: FCC [ 10.46] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time) [ 10.51] cfg80211: (2402000 KHz - 2482000 KHz @ 4 KHz), (N/A, 2000 mBm), (N/A) [ 10.51] cfg80211: (517 KHz - 525 KHz @ 8 KHz, 16 KHz AUTO), (N/A, 2300 mBm), (N/A) [ 10.56] cfg80211: (525 KHz - 533 KHz @ 8 KHz, 16 KHz AUTO), (N/A, 2300 mBm), (0 s) [ 10.56] cfg80211: (5735000 KHz - 5835000 KHz @ 8 KHz), (N/A, 3000 mBm), (N/A) [ 10.61] cfg80211: (5724 KHz - 5940 KHz @ 216 KHz), (N/A, 2800 mBm), (N/A) [ 10.61] cfg80211: (5940 KHz - 6372 KHz @ 216 KHz), (N/A, 4400 mBm), (N/A) [ 10.67] cfg80211: (6372 KHz - 6588 KHz @ 216 KHz), (N/A, 2800 mBm)
Re: [OpenWrt-Devel] my arc needs help
Hello, On Sun, 2015-11-22 at 03:33 +0100, dlora...@gmail.com wrote: > hello > > i'm currently working on my first arc device > > it's a VAP2404 from Arris or Motorola > it's given as Liveplug Wifi Livebox Orange VAP2404 by the french Orange ISP > > information: > https://www.arrisi.com/globalassets/resources/data-sheets/365-095-17385-x-3.pdf > > it's very similar to these : > VAP2400, Motorola VAP2500 > > > https://wikidevi.com/wiki/Motorola_VAP2500 > > instead of the others, vap2404 have 4 eth ports > > it's holding these chips : > 88e6071-nnc2 (marvell) > MX25L12845EMI-10G (macronix) > 5ps5162 (?) > QT2518B (quantenna) > QT2018BC (quantenna) > > https://wikidevi.com/wiki/Motorola_VAP2500 > this console shows the OEM firmware booting, if i'm not wrong, on a linux > os shell. > > is owrt supported? i think so, or soon : > > https://lists.openwrt.org/pipermail/openwrt-devel/2015-September/035570.html > > it's seems to be an ARC processor > > but the remaining question is : > which image i should use? > http://downloads.openwrt.org/chaos_calmer/15.05/ > > i don't find the right one.. > i little help would be appreciated As of today the first ARC boards are indeed supported in OpenWRT. These are nSIM (which is actually a simulated board) and AXS101 development board. So your board is not supported yet. Moreover since I don't have access to the mentioned board I barely may add its support in OpenWRT myself. But I'll be happy to help you with doing a port of OpenWRT for your board. Please take a look at my most recent patch that adds support of ARC boards: http://git.openwrt.org/?p=openwrt.git;a=commit;h=b9445c19461ce20e43a9dbee4d8c550b4ad97817 You may use that as a reference for preparing your port. -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v5] linux: add support of Synopsys ARC770-based boards
Hi Felix, Jonas, On Tue, 2015-11-17 at 16:47 +0300, Alexey Brodkin wrote: > Hi Felix, Jonas, > > On Fri, 2015-11-13 at 21:39 +0300, 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 > > Cc: Jo-Philipp Wich > > Cc: Jonas Gorski > > Signed-off-by: Alexey Brodkin > > --- > > Changes compared to v4: > > * Removed DTS variable from profile descriptions in > >target/linux/arc770/generic/profiles/0x-yyy > > * Reworked board type detection in base-files/lib/arc.sh > >Now looking for a full match of "compatible" property. > > > > Changes compared to v3: > > * Accomodate new KERNEL_INITRAMFS_NAME variable for building .elfs > > * Add and use "model" property in device tree description > > * Remove extra console from kernel command line > > * Use new buildsystem for resulting images > > * Nuked ARC-specific inittab, use default one instead > > * Linux kernel config is passed through "make kernel_oldconfig" > > * eth0 is now LAN instead of WAN > > > > 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 > > Any comments on this one or there's a chance it could be applied? Ping! -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] mac80211: fix autoprobing of mt7601u driver
Strigng passed to autoprobing script should match module's name. Currently that string is missing trailing "u". With that change mt7601u driver really gets autoloaded on USB Wi-Fi dongle insertion: -->8--- [0.93] hub 2-0:1.0: USB hub found [0.94] hub 2-0:1.0: 1 port detected [1.15] usb 1-1: new high-speed USB device number 2 using ehci-platform [1.72] init: - preinit - Detected arc-sdp // Synopsys AXS101 Development Board [1.81] random: mktemp urandom read with 3 bits of entropy available Press the [f] key and hit [enter] to enter failsafe mode Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level [4.94] procd: - early - [5.54] procd: - ubus - [6.55] procd: - init - Please press Enter to activate this console. [7.16] Loading modules backported from Linux version master-2015-10-26-0-g28c26cb [7.17] Backport generated by backports.git backports-20150903-4-g12cf266 [7.20] cfg80211: World regulatory domain updated: [7.23] cfg80211: DFS Master region: unset [7.23] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time) [7.25] cfg80211: (2402000 KHz - 2472000 KHz @ 4 KHz), (N/A, 2000 mBm), (N/A) [7.27] cfg80211: (2457000 KHz - 2482000 KHz @ 4 KHz), (N/A, 2000 mBm), (N/A) [7.27] cfg80211: (2474000 KHz - 2494000 KHz @ 2 KHz), (N/A, 2000 mBm), (N/A) [7.29] cfg80211: (517 KHz - 525 KHz @ 8 KHz, 16 KHz AUTO), (N/A, 2000 mBm), (N/A) [7.29] cfg80211: (525 KHz - 533 KHz @ 8 KHz, 16 KHz AUTO), (N/A, 2000 mBm), (0 s) [7.31] cfg80211: (549 KHz - 573 KHz @ 16 KHz), (N/A, 2000 mBm), (0 s) [7.31] cfg80211: (5735000 KHz - 5835000 KHz @ 8 KHz), (N/A, 2000 mBm), (N/A) [7.33] cfg80211: (5724 KHz - 6372 KHz @ 216 KHz), (N/A, 0 mBm), (N/A) [7.47] usb 1-1: reset high-speed USB device number 2 using ehci-platform [7.62] mt7601u 1-1:1.0: ASIC revision: 76010001 MAC revision: 76010500 [7.63] mt7601u 1-1:1.0: Firmware Version: 0.1.00 Build: 7640 Build time: 201302052146 [8.04] mt7601u 1-1:1.0: Warning: unsupported EEPROM version 0d [8.05] mt7601u 1-1:1.0: EEPROM ver:0d fae:00 [8.05] mt7601u 1-1:1.0: EEPROM country region 01 (channels 1-13) [8.32] usbcore: registered new interface driver mt7601u -->8--- Signed-off-by: Alexey Brodkin Cc: Dirk Neukirchen Cc: Felix Fietkau Cc: John Crispin --- package/kernel/mac80211/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index f2427de..1d81508 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -1163,7 +1163,7 @@ define KernelPackage/mt7601u TITLE:=MT7601U-based USB dongles Wireless Driver DEPENDS+= +kmod-mac80211 +@DRIVER_11N_SUPPORT @USB_SUPPORT +kmod-usb-core FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/mediatek/mt7601u/mt7601u.ko - AUTOLOAD:=$(call AutoProbe,mt7601) + AUTOLOAD:=$(call AutoProbe,mt7601u) endef -- 2.5.0 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v5] linux: add support of Synopsys ARC770-based boards
Hi Felix, Jonas, On Fri, 2015-11-13 at 21:39 +0300, 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 > Cc: Jo-Philipp Wich > Cc: Jonas Gorski > Signed-off-by: Alexey Brodkin > --- > Changes compared to v4: > * Removed DTS variable from profile descriptions in >target/linux/arc770/generic/profiles/0x-yyy > * Reworked board type detection in base-files/lib/arc.sh >Now looking for a full match of "compatible" property. > > Changes compared to v3: > * Accomodate new KERNEL_INITRAMFS_NAME variable for building .elfs > * Add and use "model" property in device tree description > * Remove extra console from kernel command line > * Use new buildsystem for resulting images > * Nuked ARC-specific inittab, use default one instead > * Linux kernel config is passed through "make kernel_oldconfig" > * eth0 is now LAN instead of WAN > > 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 Any comments on this one or there's a chance it could be applied? -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] gdb: use separate patches for upstream and ARC gdb
With bump of upstream GDB from 7.9 to 7.10 at least 100-no_extern_inline.patch became incompatible with ARC gdb (which is still based on upstream 7.9 branch). So until ARC support is not completely upstreamed (which we expect to happen in coming months) we'll need to have separate patches for ARC gdb. This time clean build-tested for Netgear WNDRMAC & AXS101. Signed-off-by: Alexey Brodkin Cc: Felix Fietkau Cc: John Crispin Cc: Jonas Gorski --- toolchain/gdb/Makefile | 2 ++ toolchain/gdb/patches/100-no_extern_inline.patch | 32 -- toolchain/gdb/patches/110-no_testsuite.patch | 21 -- .../patches/120-fix-compile-flag-mismatch.patch| 11 .../gdb/patches/7.10/100-no_extern_inline.patch| 32 ++ toolchain/gdb/patches/7.10/110-no_testsuite.patch | 21 ++ .../7.10/120-fix-compile-flag-mismatch.patch | 11 .../arc-2015.06-gdb/100-no_extern_inline.patch | 32 ++ .../patches/arc-2015.06-gdb/110-no_testsuite.patch | 21 ++ .../120-fix-compile-flag-mismatch.patch| 11 10 files changed, 130 insertions(+), 64 deletions(-) delete mode 100644 toolchain/gdb/patches/100-no_extern_inline.patch delete mode 100644 toolchain/gdb/patches/110-no_testsuite.patch delete mode 100644 toolchain/gdb/patches/120-fix-compile-flag-mismatch.patch create mode 100644 toolchain/gdb/patches/7.10/100-no_extern_inline.patch create mode 100644 toolchain/gdb/patches/7.10/110-no_testsuite.patch create mode 100644 toolchain/gdb/patches/7.10/120-fix-compile-flag-mismatch.patch create mode 100644 toolchain/gdb/patches/arc-2015.06-gdb/100-no_extern_inline.patch create mode 100644 toolchain/gdb/patches/arc-2015.06-gdb/110-no_testsuite.patch create mode 100644 toolchain/gdb/patches/arc-2015.06-gdb/120-fix-compile-flag-mismatch.patch diff --git a/toolchain/gdb/Makefile b/toolchain/gdb/Makefile index 38ffb0b..f74b64e 100644 --- a/toolchain/gdb/Makefile +++ b/toolchain/gdb/Makefile @@ -24,6 +24,8 @@ PKG_MD5SUM:=2a35bac41fa8e10bf04f3a0dd7f7f363 GDB_DIR:=$(PKG_NAME)-$(PKG_VERSION) endif +PATCH_DIR:=./patches/$(PKG_VERSION) + HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(GDB_DIR) HOST_BUILD_PARALLEL:=1 diff --git a/toolchain/gdb/patches/100-no_extern_inline.patch b/toolchain/gdb/patches/100-no_extern_inline.patch deleted file mode 100644 index 8c18c6e..000 --- a/toolchain/gdb/patches/100-no_extern_inline.patch +++ /dev/null @@ -1,32 +0,0 @@ a/sim/common/sim-arange.c -+++ b/sim/common/sim-arange.c -@@ -280,11 +280,7 @@ sim_addr_range_delete (ADDR_RANGE *ar, a - build_search_tree (ar); - } - --#endif /* DEFINE_NON_INLINE_P */ -- --#if DEFINE_INLINE_P -- --SIM_ARANGE_INLINE int -+int - sim_addr_range_hit_p (ADDR_RANGE *ar, address_word addr) - { - ADDR_RANGE_TREE *t = ar->range_tree; -@@ -301,4 +297,4 @@ sim_addr_range_hit_p (ADDR_RANGE *ar, ad - return 0; - } - --#endif /* DEFINE_INLINE_P */ -+#endif /* DEFINE_NON_INLINE_P */ a/sim/common/sim-arange.h -+++ b/sim/common/sim-arange.h -@@ -73,7 +73,7 @@ extern void sim_addr_range_delete (ADDR_ - - /* Return non-zero if ADDR is in range AR, traversing the entire tree. -If no range is specified, that is defined to mean "everything". */ --SIM_ARANGE_INLINE int -+extern int - sim_addr_range_hit_p (ADDR_RANGE * /*ar*/, address_word /*addr*/); - #define ADDR_RANGE_HIT_P(ar, addr) \ - ((ar)->range_tree == NULL || sim_addr_range_hit_p ((ar), (addr))) diff --git a/toolchain/gdb/patches/110-no_testsuite.patch b/toolchain/gdb/patches/110-no_testsuite.patch deleted file mode 100644 index 1b284ea..000 --- a/toolchain/gdb/patches/110-no_testsuite.patch +++ /dev/null @@ -1,21 +0,0 @@ a/gdb/configure -+++ b/gdb/configure -@@ -870,8 +870,7 @@ MAKEINFOFLAGS - YACC - YFLAGS - XMKMF' --ac_subdirs_all='testsuite --gdbtk -+ac_subdirs_all='gdbtk - multi-ice - gdbserver' - -@@ -5610,7 +5610,7 @@ $as_echo "$with_auto_load_safe_path" >&6 - - - --subdirs="$subdirs testsuite" -+subdirs="$subdirs" - - - # Check whether to support alternative target configurations diff --git a/toolchain/gdb/patches/120-fix-compile-flag-mismatch.patch b/toolchain/gdb/patches/120-fix-compile-flag-mismatch.patch deleted file mode 100644 index c8b41f2..000 --- a/toolchain/gdb/patches/120-fix-compile-flag-mismatch.patch +++ /dev/null @@ -1,11 +0,0 @@ a/gdb/gdbserver/configure -+++ b/gdb/gdbserver/configure -@@ -2468,7 +2468,7 @@ $as_echo "$as_me: error: \`$ac_var' was - ac_cache_corrupted=: ;; - ,);; - *) -- if test "x$ac_old_val" != "x$ac_new_val"; then -+ if test "`echo x$ac_old_val`" != "`echo x$ac_new_val`"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac
[OpenWrt-Devel] [PATCH v5] linux: add support of Synopsys ARC770-based boards
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 Cc: Jo-Philipp Wich Cc: Jonas Gorski Signed-off-by: Alexey Brodkin --- Changes compared to v4: * Removed DTS variable from profile descriptions in target/linux/arc770/generic/profiles/0x-yyy * Reworked board type detection in base-files/lib/arc.sh Now looking for a full match of "compatible" property. Changes compared to v3: * Accomodate new KERNEL_INITRAMFS_NAME variable for building .elfs * Add and use "model" property in device tree description * Remove extra console from kernel command line * Use new buildsystem for resulting images * Nuked ARC-specific inittab, use default one instead * Linux kernel config is passed through "make kernel_oldconfig" * eth0 is now LAN instead of WAN 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/linux/arc770/Makefile | 26 +++ target/linux/arc770/base-files.mk | 3 + .../arc770/base-files/etc/uci-defaults/02_network | 23 +++ target/linux/arc770/base-files/lib/arc.sh | 50 + .../base-files/lib/preinit/01_preinit_arc.sh | 9 + target/linux/arc770/config-4.3 | 179 target/linux/arc770/dts/axc001.dtsi| 100 + target/linux/arc770/dts/axs101.dts | 22 ++ target/linux/arc770/dts/axs10x_mb.dtsi | 224 + target/linux/arc770/dts/nsim_700.dts | 71 +++ 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 | 16 ++ .../linux/arc770/generic/profiles/03-nsim_700.mk | 15 ++ target/linux/arc770/generic/target.mk | 8 + target/linux/arc770/image/Makefile | 40 ...openwrt-arc-remove-dependency-on-DEVTMPFS.patch | 36 .../0002-openwrt-arc-add-OWRTDTB-section.patch | 91 + 20 files changed, 983 insertions(+) create mode 100644 target/linux/arc770/Makefile create mode 100644 target/linux/arc770/base-files.mk 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
Re: [OpenWrt-Devel] [PATCH 2/2 v4] linux: add support of Synopsys ARC770-based boards
Hi Jonas, On Wed, 2015-11-11 at 13:47 +0100, Jonas Gorski wrote: > On Wed, Nov 11, 2015 at 1:38 PM, Alexey Brodkin > wrote: > > Hi Jonas, > > > > On Wed, 2015-11-11 at 12:19 +0100, Jonas Gorski wrote: > > > Hi Alexey, > > > > > > On Tue, Nov 10, 2015 at 5:40 PM, Alexey Brodkin > > > wrote: > > > > Hi Jonas, > > > > > > > > On Tue, 2015-11-10 at 12:02 +0100, Jonas Gorski wrote: > > > > > > > Hi Alexey, > > > I see what you want, but the way you are doing it is quite error prone > > > and inefficient. If you insist on using the compatible, i suggest: > > > > > > 1. Extract the first one instead of grepping through the full > > > compatible set, so you don't need to invoke grep for each comparison > > > (also dropping the misuse of cat ;p). > > > > The problem is how multientry compatible string is presented in /proc fs: > > >8 > > $ cat /proc/device-tree/compatible > > snps,axs101snps,arc-sdp > > >8 > > > > You see there's no delimiter between "snps,axs101" and "snps,arc-sdp". > > So how should I extract "snps,arc-sdp" from /proc/device-tree/compatible? > > Well, you want to use it, you figure it out ;p. > > This is mostly a display issue. If you look at the actual data with > e.g. hexdump: > > 62 72 63 6d 2c 62 63 6d 39 36 33 32 38 61 76 6e |brcm,bcm96328avn| > 67 00 62 72 63 6d 2c 62 63 6d 36 33 32 38 00 |g.brcm,bcm6328.| > > you will see that these are two properly null-terminated strings. It's > just that printing to stdout swallows the terminators, but anything > working with the data should properly see them as two distinct values. Thanks for the hint. I do see now an example in bcm53xx/base-files/lib/upgrade/platform.sh. But again note that as of today we (ARC) have only one board (ARC SDP) which has "compatible" string that consists from 2 sub-strings. All other boards we have now in upstream have simple "compatible" sting. What worse ARC SDP's "compatible" property mentions its flavor "axs101" or "axs103" (we may even call this "model", right?) and only then there's "arc-sdp" - which is the name we want to use for peripherals setup. Checking for the 1-st sub-string in "compatible" property is not universal for ARC. For simple one-entry "compatible" property it will return that one entry which is fine, but for ARC SDP it will return 2 different values depending on CPU-card being used: * "snps,axs101" or * "snps,axs103". Checking for the 2nd entry in "compatible" property make no sense for all boards except ARC SDP. Checking for the last entry will work for all boards today, but I'm not sure that there will be no other board with for example 3 entries from which the one in the middle will make sense for OpenWRT. So maybe solution would be in checking for a full match and doing the same things for both "snps,axs101;snps,arc-sdp" and "snps,axs103;snps,arc-sdp"? I.e. something like this will work: >8--- compatible="$( cat /proc/device-tree/compatible )" case "$compatible" in "snps,axs101""snps,arc-sdp") board="arc-sdp"; ;; "snps,nsim") board="arc-nsim"; ;; esac >8--- Any thoughts? Note there's no "axs103" entry yet. I'll add it here in the following patch series that adds support of ARCv2 architecture. -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 2/2 v4] linux: add support of Synopsys ARC770-based boards
Hi Jonas, On Wed, 2015-11-11 at 12:19 +0100, Jonas Gorski wrote: > Hi Alexey, > > On Tue, Nov 10, 2015 at 5:40 PM, Alexey Brodkin > wrote: > > Hi Jonas, > > > > On Tue, 2015-11-10 at 12:02 +0100, Jonas Gorski wrote: > > > Hi Alexey, > I see what you want, but the way you are doing it is quite error prone > and inefficient. If you insist on using the compatible, i suggest: > > 1. Extract the first one instead of grepping through the full > compatible set, so you don't need to invoke grep for each comparison > (also dropping the misuse of cat ;p). The problem is how multientry compatible string is presented in /proc fs: >8 $ cat /proc/device-tree/compatible snps,axs101snps,arc-sdp >8 You see there's no delimiter between "snps,axs101" and "snps,arc-sdp". So how should I extract "snps,arc-sdp" from /proc/device-tree/compatible? -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 2/2 v4] linux: add support of Synopsys ARC770-based boards
Hi Jonas, On Tue, 2015-11-10 at 12:02 +0100, Jonas Gorski wrote: > Hi Alexey, > > On Sat, Nov 7, 2015 at 2:25 PM, Alexey Brodkin > wrote: > > This patch introduces support of new boards with ARC cores. > (snip) > > > diff --git a/target/linux/arc770/base-files/lib/arc.sh > > b/target/linux/arc770/base-files/lib/arc.sh > > new file mode 100644 > > index 000..17ce657 > > --- /dev/null > > +++ b/target/linux/arc770/base-files/lib/arc.sh > > @@ -0,0 +1,49 @@ > > +#!/bin/sh > > +# > > +# Copyright (C) 2015 OpenWrt.org > > +# > > + > > +# defaults > > +ARC_BOARD_NAME="generic" > > +ARC_BOARD_MODEL="Generic ARC board" > > + > > +arc_board_detect() { > > + local board > > + local model > > + > > + [ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/" > > + > > + model="$( cat /proc/device-tree/model )" > > + > > + # Extract just one "compatible" value out of > > "snps,axs101snps,arc-sdp" > > + # which is a concatenation of "snps,axs101" and "snps,arc-sdp". > > + if cat /proc/device-tree/compatible | grep -q "snps,arc-sdp"; then > > + board="arc-sdp"; > > + fi > > + > > + if cat /proc/device-tree/compatible | grep -q "snps,nsim"; then > > + board="nsim"; > > + fi > > I guess I wasn't clear enough, the idea of using the model property is > so that you can then just do > > case "$model" in > "Synopsys AXS101 Development Board";) > board="arc-sdp"; > ;; > "Synopsys ARC770 nSIM simulator") > board="nsim"; > ;; > esac Well my implementation was intentional. See we have 2 flavors of ARC SDP board: AXS101 and AXS103. They have the same base-board (where all peripherals really reside) and different CPU-cards: AXS101 sports CPU-card with ARC770-based ASIC; AXS103 sports CPU-card with ARC HS38 in FPGA. So I wanted to detect existence of ARC SDP base-board and then set say network interfaces according to available devices. And difference in CPU type is not important here because it has no impact on the board behavior. Makes any sense? > > > diff --git a/target/linux/arc770/generic/profiles/02-axs101.mk > > b/target/linux/arc770/generic/profiles/02-axs101.mk > > new file mode 100644 > > index 000..42effd2 > > --- /dev/null > > +++ b/target/linux/arc770/generic/profiles/02-axs101.mk > > @@ -0,0 +1,17 @@ > > +# > > +# Copyright (C) 2015 OpenWrt.org > > +# > > +# This is free software, licensed under the GNU General Public License v2. > > +# See /LICENSE for more information. > > +# > > + > > +define Profile/axs101 > > + NAME:=Synopsys DesignWare AXS101 > > + PACKAGES:= kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-mmc kmod-sdhci > > + DTS := axs101 > > What's the point of th DTS variable? It's already defined for the > Device definition, and I don't see any code referencing it. Well I thought about it. Other SoCs and boards for some reason have different names for: 1) board 2) profile 3) .dts-file But in arc770 case I was able to align all of them so right that blindly copy-pasted thingy must go away. -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/2 v4] linux: add support of Synopsys ARC770-based boards
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 Cc: Jo-Philipp Wich Cc: Jonas Gorski Signed-off-by: Alexey Brodkin --- Changes compared to v3: * Accomodate new KERNEL_INITRAMFS_NAME variable for building .elfs * Add and use "model" property in device tree description * Remove extra console from kernel command line * Use new buildsystem for resulting images * Nuked ARC-specific inittab, use default one instead * Linux kernel config is passed through "make kernel_oldconfig" * eth0 is now LAN instead of WAN 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/linux/arc770/Makefile | 26 +++ target/linux/arc770/base-files.mk | 3 + .../arc770/base-files/etc/uci-defaults/02_network | 23 +++ target/linux/arc770/base-files/lib/arc.sh | 49 + .../base-files/lib/preinit/01_preinit_arc.sh | 9 + target/linux/arc770/config-4.3 | 179 target/linux/arc770/dts/axc001.dtsi| 100 + target/linux/arc770/dts/axs101.dts | 22 ++ target/linux/arc770/dts/axs10x_mb.dtsi | 224 + target/linux/arc770/dts/nsim_700.dts | 71 +++ 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 | 40 ...openwrt-arc-remove-dependency-on-DEVTMPFS.patch | 36 .../0002-openwrt-arc-add-OWRTDTB-section.patch | 91 + 20 files changed, 984 insertions(+) create mode 100644 target/linux/arc770/Makefile create mode 100644 target/linux/arc770/base-files.mk 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 (,$(findstrin
[OpenWrt-Devel] [PATCH 1/2 v4] toolchain: add support of ARC architecture
This includes binutils, gcc, gdb and uClibc-ng. Latest release of ARC gcc (as of today it is "arc-2015.06") is based on upstream gcc 4.8.4. Sources are available on GitHub, see: https://github.com/foss-for-synopsys-dwc-arc-processors/gcc Latest release of ARC binutils (as of today it is "arc-2015.06") is based on upstream binutils 2.23. Sources are available on GitHub, see: https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/releases/tag/arc-2015.06 Latest release of ARC GDB (as of today this is "arc-2015.06-gdb") is based on upstream gdb 7.9.1. Sources are available on GitHub, see: https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/releases/tag/arc-2015.06-gdb Note that for binutils and gdb that come from unified git repository (which is the case for upstream binutils/gdb today) we need to disable building of gdb in binutils and binutils in gdb hence in binutils: -->8-- --disable-sim --disable-gdb -->8-- and in gdb: -->8-- --disable-binutils --disable-ld --disable-gas -->8-- Also in gdb we disable sim because if the following breakage while building with it: >8 /usr/bin/env bash ./../common/genmloop.sh -shell /usr/bin/env bash \ -mono -fast -pbb -switch sem5-switch.c \ -cpu a5f -infile ./mloop5.in \ -outfile-suffix 5 unknown option: bash Makefile:699: recipe for target 'stamp-5mloop' failed make[7]: *** [stamp-5mloop] Error 1 >8 Cc: Felix Fietkau Cc: John Crispin Cc: Jonas Gorski Signed-off-by: Alexey Brodkin --- Changes compared to v3: * Move target/Config.in from 2/2 (target) to 1/2 (toolchain) * Fix identation in binutils/Makefile * Remove extra condition in uClibc/Config.version * Rebased on top of current master Changes compared to v2: * Rebased on top of the current master. In particular that commit touches uClibc files: http://git.openwrt.org/?p=openwrt.git;a=commit;h=b70a36d1d969f5aa9ad081c9a395633793582a5a Changes compared to v1: * Binutils Kconfig description is now similar to Gcc and uClibc. This allows selection of different versions of binutils. * CONFIG_BINUTILS_VERSION_2_23_ARC is used for deciding if we need to obtain ARC's binutils. * Rebased on current master include/site/arc | 30 +++ include/target.mk | 4 + target/Config.in | 9 + toolchain/Config.in| 9 +- toolchain/binutils/Config.in | 23 +- toolchain/binutils/Config.version | 17 ++ toolchain/binutils/Makefile| 29 ++- toolchain/gcc/Config.in| 9 + toolchain/gcc/Config.version | 9 +- toolchain/gcc/common.mk| 31 ++- .../001-revert_register_mode_search.patch | 65 ++ .../patches/arc-2015.06/002-weak_data_fix.patch| 42 .../arc-2015.06/003-universal_initializer.patch| 94 .../patches/arc-2015.06/004-case_insensitive.patch | 14 ++ .../patches/arc-2015.06/010-documentation.patch| 23 ++ .../patches/arc-2015.06/020-no-plt-backport.patch | 28 +++ .../gcc/patches/arc-2015.06/100-uclibc-conf.patch | 33 +++ .../210-disable_libsanitizer_off_t_check.patch | 11 + .../arc-2015.06/800-arc-disablelibgmon.patch | 18 ++ .../gcc/patches/arc-2015.06/820-libgcc_pic.patch | 36 +++ .../arc-2015.06/850-use_shared_libgcc.patch| 47 .../patches/arc-2015.06/851-libgcc_no_compat.patch | 12 + .../gcc/patches/arc-2015.06/860-use_eh_frame.patch | 42 .../patches/arc-2015.06/870-ppc_no_crtsavres.patch | 11 + .../patches/arc-2015.06/880-no_java_section.patch | 11 + .../gcc/patches/arc-2015.06/910-mbsd_multi.patch | 253 + .../arc-2015.06/920-specs_nonfatal_getenv.patch| 14 ++ .../arc-2015.06/940-no-clobber-stamp-bits.patch| 11 + toolchain/gdb/Makefile | 19 +- toolchain/uClibc/common.mk | 1 + toolchain/uClibc/config/arc| 11 + 31 files changed, 935 insertions(+), 31 deletions(-) create mode 100644 include/site/arc create mode 100644 toolchain/binutils/Config.version create mode 100644 toolchain/gcc/patches/arc-2015.06/001-revert_register_mode_search.patch create mode 100644 toolchain/gcc/patches/arc-2015.06/002-weak_data_fix.patch create mode 100644 toolchain/gcc/patches/arc-2015.06/003-universal_initializer.patch create mode 100644 toolchain/gcc/patches/arc-2015.06/004-case_insensitive.patch create mode 100644 toolchain/gcc/patches/arc-2015.06/010-documentation.patch create mode 100644 toolchain/gcc/patches/arc-2015.06/020-no-plt-backport.patch create mode 100644 toolchain/gcc/patches/arc-2015.06/100-uclibc-conf.p
[OpenWrt-Devel] [PATCH 0/2 v4] OpenWRT port for Designware ARC cores
This series introduces support of DesignWare ARC cores in OpenWRT. In particular it adds support of 2 boards (nSIM and ARc SDP) based on ARC770D SoC. There're following important changes compared to v3: * Significantly simplified init script for ARC with a) Console settings being reused form kernel default console b) Model now comes directly from Device Tree description c) The one and only Ethernet interface eth0 is configured as DHCP LAN * New buildsystem is used for creation of resulting images * Linux kernel config is passed through "make kernel_oldconfig" Alexey Brodkin (2): toolchain: add support of ARC architecture linux: add support of Synopsys ARC770-based boards include/kernel.mk | 2 + include/site/arc | 30 +++ include/target.mk | 4 + target/Config.in | 9 + target/linux/arc770/Makefile | 26 +++ target/linux/arc770/base-files.mk | 3 + .../arc770/base-files/etc/uci-defaults/02_network | 23 ++ target/linux/arc770/base-files/lib/arc.sh | 49 .../base-files/lib/preinit/01_preinit_arc.sh | 9 + target/linux/arc770/config-4.3 | 179 +++ target/linux/arc770/dts/axc001.dtsi| 100 target/linux/arc770/dts/axs101.dts | 22 ++ target/linux/arc770/dts/axs10x_mb.dtsi | 224 ++ target/linux/arc770/dts/nsim_700.dts | 71 ++ 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 | 40 ...openwrt-arc-remove-dependency-on-DEVTMPFS.patch | 36 +++ .../0002-openwrt-arc-add-OWRTDTB-section.patch | 91 toolchain/Config.in| 9 +- toolchain/binutils/Config.in | 23 +- toolchain/binutils/Config.version | 17 ++ toolchain/binutils/Makefile| 29 ++- toolchain/gcc/Config.in| 9 + toolchain/gcc/Config.version | 9 +- toolchain/gcc/common.mk| 31 ++- .../001-revert_register_mode_search.patch | 65 ++ .../patches/arc-2015.06/002-weak_data_fix.patch| 42 .../arc-2015.06/003-universal_initializer.patch| 94 .../patches/arc-2015.06/004-case_insensitive.patch | 14 ++ .../patches/arc-2015.06/010-documentation.patch| 23 ++ .../patches/arc-2015.06/020-no-plt-backport.patch | 28 +++ .../gcc/patches/arc-2015.06/100-uclibc-conf.patch | 33 +++ .../210-disable_libsanitizer_off_t_check.patch | 11 + .../arc-2015.06/800-arc-disablelibgmon.patch | 18 ++ .../gcc/patches/arc-2015.06/820-libgcc_pic.patch | 36 +++ .../arc-2015.06/850-use_shared_libgcc.patch| 47 .../patches/arc-2015.06/851-libgcc_no_compat.patch | 12 + .../gcc/patches/arc-2015.06/860-use_eh_frame.patch | 42 .../patches/arc-2015.06/870-ppc_no_crtsavres.patch | 11 + .../patches/arc-2015.06/880-no_java_section.patch | 11 + .../gcc/patches/arc-2015.06/910-mbsd_multi.patch | 253 + .../arc-2015.06/920-specs_nonfatal_getenv.patch| 14 ++ .../arc-2015.06/940-no-clobber-stamp-bits.patch| 11 + toolchain/gdb/Makefile | 19 +- toolchain/uClibc/common.mk | 1 + toolchain/uClibc/config/arc| 11 + 51 files changed, 1919 insertions(+), 31 deletions(-) create mode 100644 include/site/arc create mode 100644 target/linux/arc770/Makefile create mode 100644 target/linux/arc770/base-files.mk 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/ta
[OpenWrt-Devel] [PATCH] include/image.mk: introduce KERNEL_INITRAMFS_NAME variable
In case if we're interested in generation of non-binary images (for example if we want images to be valid .elfs - and that's what we want for ARC now) we have to instruct Device/Build/initramfs target to use input file with some extension (in case of ARC it will be essentially .elf). Otherwise default binary vmlinux-initramfs (without extension) is used and resulting images then are binaries instead of elfs. Now having KERNEL_INITRAMFS_NAME variable it's possible to substitute default $$(KERNEL_NAME)-initramfs with preferred option like $$(KERNEL_NAME)-initramfs.elf. Signed-off-by: Alexey Brodkin Cc: Felix Fietkau Cc: John Crispin --- include/image.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/image.mk b/include/image.mk index 43980bc..5cd0d23 100644 --- a/include/image.mk +++ b/include/image.mk @@ -432,6 +432,7 @@ define Device/Init KERNEL_IMAGE = $$(KERNEL_PREFIX)$$(KERNEL_SUFFIX) KERNEL_INITRAMFS_PREFIX = $$(IMAGE_PREFIX)-initramfs KERNEL_INITRAMFS_IMAGE = $$(KERNEL_INITRAMFS_PREFIX)$$(KERNEL_SUFFIX) + KERNEL_INITRAMFS_NAME = $$(KERNEL_NAME)-initramfs KERNEL_INSTALL := KERNEL_NAME := vmlinux KERNEL_SIZE := @@ -458,11 +459,11 @@ define Device/Build/initramfs $(call Device/Export,$(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE),$(1)) $$(_TARGET): $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE) - $(KDIR)/$$(KERNEL_NAME)-initramfs: image_prepare + $(KDIR)/$$(KERNEL_INITRAMFS_NAME): image_prepare $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE) cp $$^ $$@ - $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/$$(KERNEL_NAME)-initramfs + $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/$$(KERNEL_INITRAMFS_NAME) @rm -f $$@ $$(call concat_cmd,$$(KERNEL_INITRAMFS)) endef -- 2.4.3 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 2/2 v3] linux: add support of Synopsys ARC770-based boards
Hi Jonas, On Thu, 2015-11-05 at 20:04 +0100, Jonas Gorski wrote: > Hi Alexey, > > On Thu, Nov 5, 2015 at 7:14 PM, Alexey Brodkin > wrote: > > Hi Jonas, > > > > On Wed, 2015-11-04 at 20:22 +0300, Alexey Brodkin wrote: > > > Hi Jonas, > > > > > > On Wed, 2015-11-04 at 13:06 +0100, Jonas Gorski wrote: > > > > Hi, > > > > > > > > On Tue, Nov 3, 2015 at 12:27 AM, Alexey Brodkin > > > > wrote: > > > > > + ;; > > > > > +esac > > > > > + > > > > > +uci commit network > > > > > + > > > > > +exit 0 > > > > > diff --git a/target/linux/arc770/base-files/lib/arc.sh > > > > > b/target/linux/arc770/base-files/lib/arc.sh > > > > > new file mode 100644 > > > > > index 000..b15e94b > > > > > --- /dev/null > > > > > +++ b/target/linux/arc770/base-files/lib/arc.sh > > > > > @@ -0,0 +1,76 @@ > > > > > +#!/bin/sh > > > > > +# > > > > > +# Copyright (C) 2015 OpenWrt.org > > > > > +# > > > > > + > > > > > +# defaults > > > > > +ARC_BOARD_NAME="generic" > > > > > +ARC_BOARD_MODEL="Generic arc board" > > > > > + > > > > > +arc_board_detect() { > > > > > + local board > > > > > + local model > > > > > + > > > > > + [ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/" > > > > > + > > > > > + model="$( cat /proc/device-tree/compatible )" > > > > > + > > > > > + # We cannot just use "model" as it is because in case of SDP > > > > > board > > > > > > > > ePAPR says your dts root nodes must have a "model" property that > > > > uniquely identifies the board. I see that is currently missing even in > > > > upstream, so please fix your dts files. Then you won't need to grep in > > > > the compatible. On a side node, ePAPR also says that the recommended > > > > format is the same as compatible but .. *looks at arm* .. apparently > > > > nobody does that. > > > > > > Indeed "model" is a required property. > > > So thanks for that suggestion. > > > > > > Then we'll have: > > > >8-- > > > compatible = "snps,arc-sdp"; > > > model = "snps,axs101"; > > Grepping through the different arch's dts directories, some arches use > compatible like model values (e.g. powerpc), some use free text values > (e.g. arm). Might be something discuss worthy for devicetree ML how > this spec "violation" should be handled. Especially since the example > in Documentation/devicetree/usage-model.txt doesn't have one. > > > > >8-- > > > which looks for sure much better! > > > > > > Will do this for starters here in OpenWRT and will submit a patch upstream > > > in Linux kernel. > > > > I started to think about it and now I understand why we use complicated > > "compatible" value. > > > > This allows us to use multiple platform-specific parts at once. > > We use "snps,arc-sdp" here: > > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arc/kernel/devtree.c#n35 > > and "snps,axs101" here: > > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arc/plat-axs10x/axs10x.c#n464 > > > > In the first case it's not really necessary to use "compatible" node but > > it's usage is quite convenient, see we only need to execute this oneliner: > > >8-- > > of_flat_dt_is_compatible(dt_root, "snps,arc-sdp") > > >8-- > > > > But if we use "model" node instead we'll need to do: > > 1) of_get_property > > 2) strcmp > > > > This is a bit longer, still possible solution. > > > > So even though your proposal is very useful and I'm going to discuss it > > with Vineet Gupta (ARC Linux maintainer) but if you don't mind I'd go > > without that change for this submission. Then if your proposal is > > implemented > > I'll need to rework OpenWRT scripts anyways because newer upstream kernel > > will require that. > > > > Are you OK with that? > > My suggestion was only for the model detection script part, not to > modify anything in the kernel (apart from adding a model property to > the dts files). The kernel should just keep using the compatible > property as it properly handles multiple compatible names etc, and it > doesn't need to be unique. So should I just add "model" property in .dts files in OpenWRT and correct init scripts? This all without patching kernel itself essentially. -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 2/2 v3] linux: add support of Synopsys ARC770-based boards
Hi Jonas, On Wed, 2015-11-04 at 20:22 +0300, Alexey Brodkin wrote: > Hi Jonas, > > On Wed, 2015-11-04 at 13:06 +0100, Jonas Gorski wrote: > > Hi, > > > > On Tue, Nov 3, 2015 at 12:27 AM, Alexey Brodkin > > wrote: > > > + ;; > > > +esac > > > + > > > +uci commit network > > > + > > > +exit 0 > > > diff --git a/target/linux/arc770/base-files/lib/arc.sh > > > b/target/linux/arc770/base-files/lib/arc.sh > > > new file mode 100644 > > > index 000..b15e94b > > > --- /dev/null > > > +++ b/target/linux/arc770/base-files/lib/arc.sh > > > @@ -0,0 +1,76 @@ > > > +#!/bin/sh > > > +# > > > +# Copyright (C) 2015 OpenWrt.org > > > +# > > > + > > > +# defaults > > > +ARC_BOARD_NAME="generic" > > > +ARC_BOARD_MODEL="Generic arc board" > > > + > > > +arc_board_detect() { > > > + local board > > > + local model > > > + > > > + [ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/" > > > + > > > + model="$( cat /proc/device-tree/compatible )" > > > + > > > + # We cannot just use "model" as it is because in case of SDP board > > > > ePAPR says your dts root nodes must have a "model" property that > > uniquely identifies the board. I see that is currently missing even in > > upstream, so please fix your dts files. Then you won't need to grep in > > the compatible. On a side node, ePAPR also says that the recommended > > format is the same as compatible but .. *looks at arm* .. apparently > > nobody does that. > > Indeed "model" is a required property. > So thanks for that suggestion. > > Then we'll have: > >8-- > compatible = "snps,arc-sdp"; > model = "snps,axs101"; > >8-- > which looks for sure much better! > > Will do this for starters here in OpenWRT and will submit a patch upstream > in Linux kernel. I started to think about it and now I understand why we use complicated "compatible" value. This allows us to use multiple platform-specific parts at once. We use "snps,arc-sdp" here: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arc/kernel/devtree.c#n35 and "snps,axs101" here: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arc/plat-axs10x/axs10x.c#n464 In the first case it's not really necessary to use "compatible" node but it's usage is quite convenient, see we only need to execute this oneliner: >8-- of_flat_dt_is_compatible(dt_root, "snps,arc-sdp") >8-- But if we use "model" node instead we'll need to do: 1) of_get_property 2) strcmp This is a bit longer, still possible solution. So even though your proposal is very useful and I'm going to discuss it with Vineet Gupta (ARC Linux maintainer) but if you don't mind I'd go without that change for this submission. Then if your proposal is implemented I'll need to rework OpenWRT scripts anyways because newer upstream kernel will require that. Are you OK with that? -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] include/image.mk: use KERNEL_SUFFIX in Device/Build/initramfs
In case if we're interested in generation of non-binary images (for example if we want images to be valid .elfs - and that's what we want for ARC now) we have to instruct Device/Build/initramfs target to use input file with some extension (in case of ARC it will be essentially .elf). Otherwise default binary vmlinux (without extension) is used and resulting images then are binaries instead of elfs. Signed-off-by: Alexey Brodkin Cc: Felix Fietkau Cc: John Crispin --- include/image.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/image.mk b/include/image.mk index 43980bc..ea7cf34 100644 --- a/include/image.mk +++ b/include/image.mk @@ -462,7 +462,7 @@ define Device/Build/initramfs $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE) cp $$^ $$@ - $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/$$(KERNEL_NAME)-initramfs + $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/$$(KERNEL_NAME)-initramfs$$(KERNEL_SUFFIX) @rm -f $$@ $$(call concat_cmd,$$(KERNEL_INITRAMFS)) endef -- 2.4.3 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 2/2 v3] linux: add support of Synopsys ARC770-based boards
Hi Jonas, On Wed, 2015-11-04 at 13:06 +0100, Jonas Gorski wrote: > Hi, > > On Tue, Nov 3, 2015 at 12:27 AM, 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 > > Cc: Jo-Philipp Wich > > Signed-off-by: Alexey Brodkin > > --- > > diff --git a/target/linux/arc770/base-files/etc/uci-defaults/02_network > > b/target/linux/arc770/base-files/etc/uci > > -defaults/02_network > > new file mode 100644 > > index 000..7db8451 > > --- /dev/null > > +++ b/target/linux/arc770/base-files/etc/uci-defaults/02_network > > @@ -0,0 +1,23 @@ > > +#!/bin/sh > > +# > > +# Copyright (C) 2015 OpenWrt.org > > +# > > + > > +[ -e /etc/config/network ] && exit 0 > > + > > +touch /etc/config/network > > + > > +. /lib/arc.sh > > +. /lib/functions/uci-defaults.sh > > + > > +ucidef_set_interface_loopback > > + > > +case "$( arc_board_name )" in > > +"arc-sdp"*) > > + ucidef_set_interface_wan "eth0" > > If you only have one interface at all, it is usually better to make it > lan/dhcp, else default firewall rules will prevent you from logging in > through http/ssh. You can either borrow kirkwoods set_lan_dhcp (and > maybe move that with a better name to base-files), or use > ucidef_set_interface_raw to configure it appropriately. Corrrect. I used ucidef_set_interface_wan as a "hack" to get its settings automatically via DHCP. So thanks a lot for pointing to better options. For me ucidef_set_interface_raw looks simpler and cleaner so I'll go with: >8-- ucidef_set_interface_raw "lan" "eth0" "dhcp" >8-- as it is done in realview. > > + ;; > > +esac > > + > > +uci commit network > > + > > +exit 0 > > diff --git a/target/linux/arc770/base-files/lib/arc.sh > > b/target/linux/arc770/base-files/lib/arc.sh > > new file mode 100644 > > index 000..b15e94b > > --- /dev/null > > +++ b/target/linux/arc770/base-files/lib/arc.sh > > @@ -0,0 +1,76 @@ > > +#!/bin/sh > > +# > > +# Copyright (C) 2015 OpenWrt.org > > +# > > + > > +# defaults > > +ARC_BOARD_NAME="generic" > > +ARC_BOARD_MODEL="Generic arc board" > > + > > +arc_board_detect() { > > + local board > > + local model > > + > > + [ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/" > > + > > + model="$( cat /proc/device-tree/compatible )" > > + > > + # We cannot just use "model" as it is because in case of SDP board > > ePAPR says your dts root nodes must have a "model" property that > uniquely identifies the board. I see that is currently missing even in > upstream, so please fix your dts files. Then you won't need to grep in > the compatible. On a side node, ePAPR also says that the recommended > format is the same as compatible but .. *looks at arm* .. apparently > nobody does that. Indeed "model" is a required property. So thanks for that suggestion. Then we'll have: >8-- compatible = "snps,arc-sdp"; model = "snps,axs101"; >8-- which looks for sure much better! Will do this for starters here in OpenWRT and will submit a pat
Re: [OpenWrt-Devel] [PATCH 2/2 v3] linux: add support of Synopsys ARC770-based boards
Hi Felix, On Tue, 2015-11-03 at 08:43 +0100, Felix Fietkau wrote: > On 2015-11-03 00:27, Alexey Brodkin wrote: > > This patch introduces support of new boards with ARC cores. [snip] > > 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. Ok, will move it in toolchain patch. > > diff --git a/target/linux/arc770/config-4.3 b/target/linux/arc770/config-4.3 > > new file mode 100644 > > index 000..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. Ok will do that too. > > 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. Could you please elaborate a little bit why this is necessary? IMHO my current implementation is quite clean and understandable. What is also important it allows for more flexibility. For example I may deal with vmlinux.elf instead of objcopied vmlinux (which doesn't include elf header any longer) etc. Moreover bcm53xx has no profiles so it's hard for me to figure out how to deal with profiles properly with this new build code. -Alexey ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/2 v3] linux: add support of Synopsys ARC770-based boards
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 Cc: Jo-Philipp Wich Signed-off-by: Alexey Brodkin --- 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
[OpenWrt-Devel] [PATCH 1/2 v3] toolchain: add support of ARC architecture
This includes binutils, gcc, gdb and uClibc-ng. Latest release of ARC gcc (as of today it is "arc-2015.06") is based on upstream gcc 4.8.4. Sources are available on GitHub, see: https://github.com/foss-for-synopsys-dwc-arc-processors/gcc Latest release of ARC binutils (as of today it is "arc-2015.06") is based on upstream binutils 2.23. Sources are available on GitHub, see: https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/releases/tag/arc-2015.06 Latest release of ARC GDB (as of today this is "arc-2015.06-gdb") is based on upstream gdb 7.9.1. Sources are available on GitHub, see: https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/releases/tag/arc-2015.06-gdb Note that for binutils and gdb that come from unified git repository (which is the case for upstream binutils/gdb today) we need to disable building of gdb in binutils and binutils in gdb hence in binutils: -->8-- --disable-sim --disable-gdb -->8-- and in gdb: -->8-- --disable-binutils --disable-ld --disable-gas -->8-- Also in gdb we disable sim because if the following breakage while building with it: >8 /usr/bin/env bash ./../common/genmloop.sh -shell /usr/bin/env bash \ -mono -fast -pbb -switch sem5-switch.c \ -cpu a5f -infile ./mloop5.in \ -outfile-suffix 5 unknown option: bash Makefile:699: recipe for target 'stamp-5mloop' failed make[7]: *** [stamp-5mloop] Error 1 >8 Cc: Felix Fietkau Cc: John Crispin Signed-off-by: Alexey Brodkin --- Changes compared to v2: * Rebased on top of the current master. In particular that commit touches uClibc files: http://git.openwrt.org/?p=openwrt.git;a=commit;h=b70a36d1d969f5aa9ad081c9a395633793582a5a Changes compared to v1: * Binutils Kconfig description is now similar to Gcc and uClibc. This allows selection of different versions of binutils. * CONFIG_BINUTILS_VERSION_2_23_ARC is used for deciding if we need to obtain ARC's binutils. * Rebased on current master include/site/arc | 30 +++ include/target.mk | 4 + toolchain/Config.in| 9 +- toolchain/binutils/Config.in | 23 +- toolchain/binutils/Config.version | 17 ++ toolchain/binutils/Makefile| 29 ++- toolchain/gcc/Config.in| 9 + toolchain/gcc/Config.version | 9 +- toolchain/gcc/common.mk| 31 ++- .../001-revert_register_mode_search.patch | 65 ++ .../patches/arc-2015.06/002-weak_data_fix.patch| 42 .../arc-2015.06/003-universal_initializer.patch| 94 .../patches/arc-2015.06/004-case_insensitive.patch | 14 ++ .../patches/arc-2015.06/010-documentation.patch| 23 ++ .../patches/arc-2015.06/020-no-plt-backport.patch | 28 +++ .../gcc/patches/arc-2015.06/100-uclibc-conf.patch | 33 +++ .../210-disable_libsanitizer_off_t_check.patch | 11 + .../arc-2015.06/800-arc-disablelibgmon.patch | 18 ++ .../gcc/patches/arc-2015.06/820-libgcc_pic.patch | 36 +++ .../arc-2015.06/850-use_shared_libgcc.patch| 47 .../patches/arc-2015.06/851-libgcc_no_compat.patch | 12 + .../gcc/patches/arc-2015.06/860-use_eh_frame.patch | 42 .../patches/arc-2015.06/870-ppc_no_crtsavres.patch | 11 + .../patches/arc-2015.06/880-no_java_section.patch | 11 + .../gcc/patches/arc-2015.06/910-mbsd_multi.patch | 253 + .../arc-2015.06/920-specs_nonfatal_getenv.patch| 14 ++ .../arc-2015.06/940-no-clobber-stamp-bits.patch| 11 + toolchain/gdb/Makefile | 19 +- toolchain/uClibc/Config.version| 1 + toolchain/uClibc/common.mk | 1 + toolchain/uClibc/config/arc| 11 + 31 files changed, 927 insertions(+), 31 deletions(-) create mode 100644 include/site/arc create mode 100644 toolchain/binutils/Config.version create mode 100644 toolchain/gcc/patches/arc-2015.06/001-revert_register_mode_search.patch create mode 100644 toolchain/gcc/patches/arc-2015.06/002-weak_data_fix.patch create mode 100644 toolchain/gcc/patches/arc-2015.06/003-universal_initializer.patch create mode 100644 toolchain/gcc/patches/arc-2015.06/004-case_insensitive.patch create mode 100644 toolchain/gcc/patches/arc-2015.06/010-documentation.patch create mode 100644 toolchain/gcc/patches/arc-2015.06/020-no-plt-backport.patch create mode 100644 toolchain/gcc/patches/arc-2015.06/100-uclibc-conf.patch create mode 100644 toolchain/gcc/patches/arc-2015.06/210-disable_libsanitizer_off_t_check.patch create mode 100644 toolchain/gcc/patches/arc-2015.06/800-arc-disablelibgmon.patch create mode 100644 toolchain/gcc/patches/arc-