Re: [LEDE-DEV] [PATCH] [ramips] Added NixCore X1 target V2

2016-06-08 Thread John Crispin
Hi Drew,

just sent a new version please.

John

On 08/06/2016 20:52, John Crispin wrote:
> Hi Drew,
> 
> since CC a few things have changed. the new dts file looks good, i will
> merge it tomorrow, rebase the userland script changes and change the
> image generation code to the new style. i'll put the patch into my
> staging tree and let you know where to find it so you can test it.
> 
> Thanks,
>   John
> 
> On 07/06/2016 21:13, Drew from NixCore wrote:
>> John,
>>
>> I took a look at the dtsi file and see how the dts is updating the
>> settings.  I have
>> a dts that builds, but I would like a sanity check before submitting the
>> patch again.
>>
>> http://pastebin.com/EunNmAf4
>>
>> If this looks good I will update the 16M DTS and then submit again.
>>
>> Thanks,
>>
>> Drew
>>
>> On 06/06/2016 11:12 PM, John Crispin wrote:
>>> Hi Drew,
>>>
>>> this patch seems to use the old devicetree layout and image building
>>> code. do you think you could rebase this and make it work ontop of
>>> latest source.git or do you need help to do that ? this patch wont apply
>>> as is.
>>>
>>> another question, did you build this yourself or is this a rebranded
>>> whitelabel product ? i think we already support this board (or one that
>>> looks almost identical, need to see if i can find it in my router zoo
>>> today)
>>>
>>> John
>>>
>>> On 07/06/2016 02:16, Drew from NixCore wrote:
 Added NixCore X1 ramips target http://nixcores.com. This builds 8M
 and 16M
 images

 Signed-off-by: Drew Gaylo 
 diff --git a/target/linux/ramips/base-files/etc/board.d/02_network
 b/target/linux/ramips/base-files/etc/board.d/02_network
 index 4728c75..69c0125 100755
 --- a/target/linux/ramips/base-files/etc/board.d/02_network
 +++ b/target/linux/ramips/base-files/etc/board.d/02_network
 @@ -77,6 +77,7 @@ ramips_setup_interfaces()
   mt7628|\
   mzk-750dhp|\
   mzk-w300nh2|\
 +nixcore|\
   oy-0001|\
   pbr-m1|\
   psg1208|\
 diff --git a/target/linux/ramips/base-files/lib/ramips.sh
 b/target/linux/ramips/base-files/lib/ramips.sh
 index cbe455d..76f0e43 100755
 --- a/target/linux/ramips/base-files/lib/ramips.sh
 +++ b/target/linux/ramips/base-files/lib/ramips.sh
 @@ -316,6 +316,9 @@ ramips_board_detect() {
   *"NCS601W")
   name="ncs601w"
   ;;
 +*"NixcoreX1")
 +name="nixcore-x1"
 +;;
   *"NW718")
   name="nw718"
   ;;
 diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh
 b/target/linux/ramips/base-files/lib/upgrade/platform.sh
 index 91c9997..0094568 100755
 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
 +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
 @@ -94,6 +94,7 @@ platform_check_image() {
   mzk-w300nh2|\
   mzk-wdpr|\
   nbg-419n|\
 +nixcore|\
   nw718|\
   oy-0001|\
   pbr-m1|\
 diff --git a/target/linux/ramips/dts/NIXCOREX1-16M.dts
 b/target/linux/ramips/dts/NIXCOREX1-16M.dts
 new file mode 100644
 index 000..c7ec410
 --- /dev/null
 +++ b/target/linux/ramips/dts/NIXCOREX1-16M.dts
 @@ -0,0 +1,186 @@
 +/dts-v1/;
 +
 +/include/ "rt5350.dtsi"
 +
 +/ {
 +compatible = "NixcoreX1", "ralink,rt5350-soc";
 +model = "NixcoreX1";
 +
 +palmbus@1000 {
 +/* Re-enable the gpio1 ports */
 +gpio1: gpio@660 {
 +status = "okay";
 +};
 +
 +i2c@900 {
 +status = "okay";
 +};
 +uart@500 {
 +status = "okay";
 +/* Mix of uart and gpio */
 +reset-names = "gpio uartf";
 +};
 +spi@b00 {
 +status = "okay";
 +
 +m25p80@0 {
 +#address-cells = <1>;
 +#size-cells = <1>;
 +compatible = "s25fl064k";
 +reg = <0>;
 +linux,modalias = "m25p80", "s25fl064k";
 +spi-max-frequency = <1000>;
 +
 +partition@0 {
 +label = "uboot";
 +reg = <0x0 0x3>;
 +read-only;
 +};
 +
 +partition@3 {
 +label = "uboot-env";
 +reg = <0x3 0x1>;
 +read-only;
 +};
 +
 +factory: partition@4 {
 +label = "factory";
 +reg = <0x4 0x1>;
 +read-only;
 +};
 +
 +partition@5 {
 +label = 

[LEDE-DEV] [PATCH 1/2] libunwind: initial version 1.1

2016-06-08 Thread Yousong Zhou
The package Makefile was based on work at link [1] with the following
changes

 1. Disable minidebuginfo support thus no dependency on liblzma
 2. Add 2 patches for building against musl-libc and building with
mips16 enabled
 3. Add LICENSE and DEPENDS info, etc.

[1] https://github.com/rpi-openwrt/rpi-packages/tree/master/libs/libunwind

Signed-off-by: Yousong Zhou 
---
 package/libs/libunwind/Makefile| 53 ++
 .../libs/libunwind/patches/001-disable-tests.patch | 22 +
 .../patches/002-fix-building-getcontext_S.patch| 19 
 .../003-fix-missing-ef_reg-defs-with-musl.patch| 47 +++
 4 files changed, 141 insertions(+)
 create mode 100644 package/libs/libunwind/Makefile
 create mode 100644 package/libs/libunwind/patches/001-disable-tests.patch
 create mode 100644 
package/libs/libunwind/patches/002-fix-building-getcontext_S.patch
 create mode 100644 
package/libs/libunwind/patches/003-fix-missing-ef_reg-defs-with-musl.patch

diff --git a/package/libs/libunwind/Makefile b/package/libs/libunwind/Makefile
new file mode 100644
index 000..ec19656
--- /dev/null
+++ b/package/libs/libunwind/Makefile
@@ -0,0 +1,53 @@
+#
+# Copyright (C) 2008-2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libunwind
+PKG_VERSION:=1.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://download.savannah.gnu.org/releases/libunwind
+PKG_MD5SUM:=fb4ea2f6fbbe45bf032cd36e586883ce
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+PKG_LICENSE:=X11
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_MAINTAINER:=Yousong Zhou 
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libunwind
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=The libunwind project
+  URL:=http://www.nongnu.org/libunwind/
+  DEPENDS:=@(mips||mipsel||powerpc||i386||x86_64)
+endef
+
+define Package/libunwind/description
+  Libunwind defines a portable and efficient C programming interface (API) to 
determine the call-chain of a program.
+endef
+
+CONFIGURE_ARGS += --enable-minidebuginfo=no
+
+define Package/libunwind/install
+   $(INSTALL_DIR) $(1)/usr/lib
+   $(CP) $(PKG_INSTALL_DIR)/usr/lib/libunwin*.so* $(1)/usr/lib/
+endef
+
+define Build/InstallDev
+   $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig
+   $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include
+   $(CP) $(PKG_INSTALL_DIR)/usr/lib/libunwin*.so* $(1)/usr/lib
+   $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
+endef
+
+$(eval $(call BuildPackage,libunwind))
diff --git a/package/libs/libunwind/patches/001-disable-tests.patch 
b/package/libs/libunwind/patches/001-disable-tests.patch
new file mode 100644
index 000..9700fea
--- /dev/null
+++ b/package/libs/libunwind/patches/001-disable-tests.patch
@@ -0,0 +1,22 @@
+--- a/Makefile.am
 b/Makefile.am
+@@ -36,7 +36,7 @@
+ 
+ nodist_include_HEADERS = include/libunwind-common.h
+ 
+-SUBDIRS = src tests doc
++SUBDIRS = src doc
+ 
+ noinst_HEADERS = include/dwarf.h include/dwarf_i.h include/dwarf-eh.h \
+   include/compiler.h include/libunwind_i.h include/mempool.h  \
+--- a/Makefile.in
 b/Makefile.in
+@@ -313,7 +313,7 @@
+   $(am__append_7) $(am__append_8) $(am__append_9) \
+   $(am__append_10)
+ nodist_include_HEADERS = include/libunwind-common.h
+-SUBDIRS = src tests doc
++SUBDIRS = src doc
+ noinst_HEADERS = include/dwarf.h include/dwarf_i.h include/dwarf-eh.h \
+   include/compiler.h include/libunwind_i.h include/mempool.h  \
+   include/remote.h\
diff --git a/package/libs/libunwind/patches/002-fix-building-getcontext_S.patch 
b/package/libs/libunwind/patches/002-fix-building-getcontext_S.patch
new file mode 100644
index 000..10b1dd1
--- /dev/null
+++ b/package/libs/libunwind/patches/002-fix-building-getcontext_S.patch
@@ -0,0 +1,19 @@
+diff -uprN a/src/mips/getcontext.S b/src/mips/getcontext.S
+--- a/src/mips/getcontext.S2012-10-06 12:54:38.0 +0800
 b/src/mips/getcontext.S2016-06-08 13:35:25.033051679 +0800
+@@ -24,12 +24,12 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
+ 
+ #include "offsets.h"
+-#include 
+ 
+   .text
++  .set nomips16
+ 
+ #if _MIPS_SIM == _ABIO32
+-# if __BYTE_ORDER == __BIG_ENDIAN
++# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+ #  define OFFSET 4
+ # else
+ #  define OFFSET 0
+
diff --git 
a/package/libs/libunwind/patches/003-fix-missing-ef_reg-defs-with-musl.patch 
b/package/libs/libunwind/patches/003-fix-missing-ef_reg-defs-with-musl.patch
new file mode 100644
index 000..465abb4
--- /dev/null
+++ b/package/libs/libunwind/patches/003-fix-missing-ef_reg-defs-with-musl.patch
@@ -0,0 +1,47 @@
+diff -uprN 

[LEDE-DEV] [PATCH 2/2] strace: add option for enabling stack trace support

2016-06-08 Thread Yousong Zhou
Signed-off-by: Yousong Zhou 
---
 package/devel/strace/Makefile | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/package/devel/strace/Makefile b/package/devel/strace/Makefile
index 8a0d2e8..df560fd 100644
--- a/package/devel/strace/Makefile
+++ b/package/devel/strace/Makefile
@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
 PKG_NAME:=strace
 
 PKG_VERSION:=4.11
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_MD5SUM:=a15d2555a7febb56d00c6e1a51c655dc
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
@@ -23,6 +23,7 @@ PKG_LICENSE_FILES:=COPYRIGHT
 PKG_MAINTAINER:=Felix Fietkau 
 
 PKG_FIXUP:=autoreconf
+PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_strace_libunwind
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
@@ -39,6 +40,7 @@ define Package/strace
   SECTION:=utils
   CATEGORY:=Utilities
   TITLE:=System call tracer
+  DEPENDS:=+PACKAGE_strace_libunwind:libunwind
   URL:=http://strace.sourceforge.net/
 endef
 
@@ -47,6 +49,13 @@ A useful diagnostic, instructional, and debugging tool. 
Allows you to track what
 system calls a program makes while it is running.
 endef
 
+define Package/strace/config
+config PACKAGE_strace_libunwind
+   bool "Enable stack tracing support using libunwind (experimental)"
+   default n
+endef
+
+CONFIGURE_ARGS += --with-libunwind=$(if 
$(CONFIG_PACKAGE_strace_libunwind),yes,no)
 MAKE_FLAGS := \
CCOPT="$(TARGET_CFLAGS)"
 
-- 
2.6.4


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] xtables-addons: fix kmod-ipt-sysrq missing crypto_hash dependency

2016-06-08 Thread Christian Lamparter
This patch fixes the following dependency issue when building
kmod-ipt-sysrq module package from xtable-addons library:
"Package kmod-ipt-sysrq is missing dependencies for the following libraries:"
crypto_hash.ko"

By looking at the code, the kmod-ipt-sysrq module just needs
an additional dependency on kmod-crypto-manager.

Cc: Dirk Neukirchen 
Signed-off-by: Christian Lamparter 
---
 package/network/utils/xtables-addons/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/utils/xtables-addons/Makefile 
b/package/network/utils/xtables-addons/Makefile
index 0842e11..9224922 100644
--- a/package/network/utils/xtables-addons/Makefile
+++ b/package/network/utils/xtables-addons/Makefile
@@ -145,7 +145,7 @@ $(eval $(call BuildTemplate,lscan,lscan,xt_lscan,xt_lscan,))
 $(eval $(call BuildTemplate,lua,Lua 
PacketScript,xt_LUA,LUA/xt_LUA,+kmod-ipt-conntrack-extra))
 $(eval $(call BuildTemplate,psd,psd,xt_psd,xt_psd,))
 $(eval $(call BuildTemplate,quota2,quota2,xt_quota2,xt_quota2,))
-$(eval $(call 
BuildTemplate,sysrq,SYSRQ,xt_SYSRQ,xt_SYSRQ,+kmod-ipt-compat-xtables))
+$(eval $(call 
BuildTemplate,sysrq,SYSRQ,xt_SYSRQ,xt_SYSRQ,+kmod-ipt-compat-xtables 
+kmod-crypto-manager))
 $(eval $(call 
BuildTemplate,tarpit,TARPIT,xt_TARPIT,xt_TARPIT,+kmod-ipt-compat-xtables))
 
 $(eval $(call BuildPackage,iptaccount))
-- 
2.8.1


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] [ramips] Added NixCore X1 target V2

2016-06-08 Thread John Crispin
Hi Drew,

since CC a few things have changed. the new dts file looks good, i will
merge it tomorrow, rebase the userland script changes and change the
image generation code to the new style. i'll put the patch into my
staging tree and let you know where to find it so you can test it.

Thanks,
John

On 07/06/2016 21:13, Drew from NixCore wrote:
> John,
> 
> I took a look at the dtsi file and see how the dts is updating the
> settings.  I have
> a dts that builds, but I would like a sanity check before submitting the
> patch again.
> 
> http://pastebin.com/EunNmAf4
> 
> If this looks good I will update the 16M DTS and then submit again.
> 
> Thanks,
> 
> Drew
> 
> On 06/06/2016 11:12 PM, John Crispin wrote:
>> Hi Drew,
>>
>> this patch seems to use the old devicetree layout and image building
>> code. do you think you could rebase this and make it work ontop of
>> latest source.git or do you need help to do that ? this patch wont apply
>> as is.
>>
>> another question, did you build this yourself or is this a rebranded
>> whitelabel product ? i think we already support this board (or one that
>> looks almost identical, need to see if i can find it in my router zoo
>> today)
>>
>> John
>>
>> On 07/06/2016 02:16, Drew from NixCore wrote:
>>> Added NixCore X1 ramips target http://nixcores.com. This builds 8M
>>> and 16M
>>> images
>>>
>>> Signed-off-by: Drew Gaylo 
>>> diff --git a/target/linux/ramips/base-files/etc/board.d/02_network
>>> b/target/linux/ramips/base-files/etc/board.d/02_network
>>> index 4728c75..69c0125 100755
>>> --- a/target/linux/ramips/base-files/etc/board.d/02_network
>>> +++ b/target/linux/ramips/base-files/etc/board.d/02_network
>>> @@ -77,6 +77,7 @@ ramips_setup_interfaces()
>>>   mt7628|\
>>>   mzk-750dhp|\
>>>   mzk-w300nh2|\
>>> +nixcore|\
>>>   oy-0001|\
>>>   pbr-m1|\
>>>   psg1208|\
>>> diff --git a/target/linux/ramips/base-files/lib/ramips.sh
>>> b/target/linux/ramips/base-files/lib/ramips.sh
>>> index cbe455d..76f0e43 100755
>>> --- a/target/linux/ramips/base-files/lib/ramips.sh
>>> +++ b/target/linux/ramips/base-files/lib/ramips.sh
>>> @@ -316,6 +316,9 @@ ramips_board_detect() {
>>>   *"NCS601W")
>>>   name="ncs601w"
>>>   ;;
>>> +*"NixcoreX1")
>>> +name="nixcore-x1"
>>> +;;
>>>   *"NW718")
>>>   name="nw718"
>>>   ;;
>>> diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh
>>> b/target/linux/ramips/base-files/lib/upgrade/platform.sh
>>> index 91c9997..0094568 100755
>>> --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
>>> +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
>>> @@ -94,6 +94,7 @@ platform_check_image() {
>>>   mzk-w300nh2|\
>>>   mzk-wdpr|\
>>>   nbg-419n|\
>>> +nixcore|\
>>>   nw718|\
>>>   oy-0001|\
>>>   pbr-m1|\
>>> diff --git a/target/linux/ramips/dts/NIXCOREX1-16M.dts
>>> b/target/linux/ramips/dts/NIXCOREX1-16M.dts
>>> new file mode 100644
>>> index 000..c7ec410
>>> --- /dev/null
>>> +++ b/target/linux/ramips/dts/NIXCOREX1-16M.dts
>>> @@ -0,0 +1,186 @@
>>> +/dts-v1/;
>>> +
>>> +/include/ "rt5350.dtsi"
>>> +
>>> +/ {
>>> +compatible = "NixcoreX1", "ralink,rt5350-soc";
>>> +model = "NixcoreX1";
>>> +
>>> +palmbus@1000 {
>>> +/* Re-enable the gpio1 ports */
>>> +gpio1: gpio@660 {
>>> +status = "okay";
>>> +};
>>> +
>>> +i2c@900 {
>>> +status = "okay";
>>> +};
>>> +uart@500 {
>>> +status = "okay";
>>> +/* Mix of uart and gpio */
>>> +reset-names = "gpio uartf";
>>> +};
>>> +spi@b00 {
>>> +status = "okay";
>>> +
>>> +m25p80@0 {
>>> +#address-cells = <1>;
>>> +#size-cells = <1>;
>>> +compatible = "s25fl064k";
>>> +reg = <0>;
>>> +linux,modalias = "m25p80", "s25fl064k";
>>> +spi-max-frequency = <1000>;
>>> +
>>> +partition@0 {
>>> +label = "uboot";
>>> +reg = <0x0 0x3>;
>>> +read-only;
>>> +};
>>> +
>>> +partition@3 {
>>> +label = "uboot-env";
>>> +reg = <0x3 0x1>;
>>> +read-only;
>>> +};
>>> +
>>> +factory: partition@4 {
>>> +label = "factory";
>>> +reg = <0x4 0x1>;
>>> +read-only;
>>> +};
>>> +
>>> +partition@5 {
>>> +label = "firmware";
>>> +reg = <0x5 0x7b>;
>>> +};
>>> +};
>>> +
>>> +spidev@1 {
>>> +compatible = "linux,spidev";
>>> +spi-max-frequency = <1000>;
>>> +   

Re: [LEDE-DEV] Add Hawkboard (OMAP-L138) support

2016-06-08 Thread Alexander Couzens
On Wed, 25 May 2016 13:34:18 +0200
Marcin Gołaś  wrote:

> Dear LEDE developers,
> 
> Is it possible to port LEDE and run it on Hawkboard (OMAP-L138)?
> Please let me know if anyone is able to help me in this subject.
> 
> Thanks,
> Marcin

Hi Marcin,

after a short look into the architecture, the board is supported by
the linux kernel, but hasn't yet migrated to devicetree, but the cpu
is supported by devicetree.
The cpu is an arm926ej, this would result in a new platform,
because our still supported omap platform use a different architecture:

omap24xx -> arm1136j-s
omap -> cortex-9

So yes, it's possible to add it, but you have to create a new platform
and it also needs a maintainer, who take care of the platform for the
long run.

Best,
lynxis
-- 
Alexander Couzens

mail: lyn...@fe80.eu
jabber: lyn...@fe80.eu
mobile: +4915123277221
gpg: 390D CF78 8BF9 AA50 4F8F  F1E2 C29E 9DA6 A0DF 8604


pgpW6q1cUoYc6.pgp
Description: OpenPGP digital signature
___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] cavium: Ignore MEM boot param when too small

2016-06-08 Thread Michał Osowiecki
Cisco RV0XX u-boot sets MEM=2048 as boot param. We assume that at least 
4MB (mem_alloc_size) of ram is needed to run linux on cavium boards, so 
if mem < 4M - ignore it and set default value



Signed-off-by: Michał Osowiecki 

--- a/arch/mips/cavium-octeon/setup.c   2016-06-06 18:15:32.0 +0200
+++ b/arch/mips/cavium-octeon/setup.c   2016-06-08 15:28:56.642919151 +0200
@@ -941,6 +941,11 @@
 * to consistently work.
 */
mem_alloc_size = 4 << 20;
+
+   /* Ignore bootarg MEM <= 4MB */
+   if (MAX_MEMORY <= mem_alloc_size)
+   MAX_MEMORY = 512ull << 20;
+
if (mem_alloc_size > MAX_MEMORY)
mem_alloc_size = MAX_MEMORY;


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] brcm2708: take over maintainership

2016-06-08 Thread Álvaro Fernández Rojas
Hello Florian,

Do you mind if I take over brcm2708's maintainership?
https://git.lede-project.org/?p=source.git;a=blob;f=target/linux/brcm2708/Makefile;hb=HEAD#l14

Regards,
Álvaro.

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] package/devel/gdb-arc: Add target GDB for ARC

2016-06-08 Thread Alexey Brodkin
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 /* DEFINE_INLINE_P */
++#endif /*