Re: [OpenWrt-Devel] minimal work needed to build just the toolchain
On 03.03.2015 13:17, John Crispin wrote: On 03/03/2015 12:27, Claudio Thomas wrote: Hi, the same question was already discussed on 2008-01, but it seems to me, that some iterim steps are no more necessary... I guess that there has been some improvements made in the last 7 years :-) Therefore, I would thankful for a confirmation of my assumption. Actually I do the following: 1. make clean ckeckout of BB from git 2. copy my actual working .config into the checkout to avoid reselecting all config options (and probably missing some of them :-) ) 3. run make toolchain/install = the full toolchain should now be located in ./ staging_dir/toolchain-architecture_gcc-compilerver_uClibc-libcver/bin/ Is this correct? Is the created toolchain complete or do I have missed any important step? Claudio Hi, make menuconfig - [x] Package the OpenWrt-based Toolchain exit save make relocatable toolchain will be inside bin/$target/ John Thanks, Claudio -- Working on OpenWrt CC for Xmodus GSM Router XM1710E http://www.xmodus-systems.de/openwrt ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] MI424WR Rev I Hynix NAND Error
I wrote the image to flash using tftp from uboot, I'm having trouble isolating the cause of the ECC errors, what I'm not sure of is if there's a quirk with the Hynix NAND that the Eon NAND doesn't have. It would appear that the Hynix and Eon NAND chips are used interchangeably for this router model(this was tested on 2 of the same model where that appears to be the only difference), the odd part is that the Eon NAND works without issue so I would assume that the Hynix NAND is sensitive to a particular setting that the Eon is not as the stock firmware does not appear to differentiate any settings between the two NAND chips from what I could tell by looking at the stock source code. We tried changing the chip-delay parameter in the openwrt dtsi file to match the GPL source https://github.com/jameshilliard/actiontec_opensrc_mi424wr-rev-i_fw-40-21-18/blob/34b1f338344ebd36543c9fbcb4870bb6f6914cb8/rg/vendor/marvell/feroceon/linux-2.6/arch/arm/mach-feroceon-kw2/nand.c#L211 but that didn't seem to resolve the issue. Would you have any suggestions on what I should try next or how to debug this further? Are there any non-standard settings in the GPL source that stand out as needing to be configured in openwrt for this NAND chip to function correctly? On Wed, Mar 4, 2015 at 10:00 AM, Conor O'Gorman i...@conorogorman.net wrote: On 22/02/15 01:36, James Hilliard wrote: I've been trying to install OpenWRT on an Actiontec MI424WR Rev I, however some variants of this router use a Hynix NAND chip that OpenWRT doesn't seem to be able to access. There are other versions of this router that use a Eon NAND chip that works fine. I've attached the full boot-log. The stock firmware is the same for both NAND Chips. You have nand ECC errors. The flash detection looks reasonable. You need to check the ECC handling mode ie. software, hardware, etc. And you may want to check how you wrote the image to flash. Conor ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] MI424WR Rev I Hynix NAND Error
On 22/02/15 01:36, James Hilliard wrote: I've been trying to install OpenWRT on an Actiontec MI424WR Rev I, however some variants of this router use a Hynix NAND chip that OpenWRT doesn't seem to be able to access. There are other versions of this router that use a Eon NAND chip that works fine. I've attached the full boot-log. The stock firmware is the same for both NAND Chips. You have nand ECC errors. The flash detection looks reasonable. You need to check the ECC handling mode ie. software, hardware, etc. And you may want to check how you wrote the image to flash. Conor ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] toolchain/uClibc: Add uClibc snapshot as selectable version
Hi all, One for discussion, I'm sure. :-) There hasn't been a uClibc release since May 2012, but some useful things have landed in git since then... for example, make/get/setcontext are necessary for uClibc + gccgo/libgo (c.f. my last patch set). This adds a non-default option for a known-good nightly snapshot. I'm sure you will have comments on some of the... hmm... odd things I've done. Let me know! I suspect the nightly snapshot tarballs will disappear (it looks like they're rolled over after a couple of weeks), so it might be best to change this to a git checkout. But I did it this way to get it ready for feedback. Thanks, Jeff Signed-off-by: Jeff Waugh j...@bethesignal.org --- toolchain/uClibc/Config.in | 4 + toolchain/uClibc/Config.version| 4 + toolchain/uClibc/common.mk | 11 ++ toolchain/uClibc/config-20150304/arm | 7 + toolchain/uClibc/config-20150304/armeb | 7 + toolchain/uClibc/config-20150304/avr32 | 12 ++ toolchain/uClibc/config-20150304/common| 214 + toolchain/uClibc/config-20150304/cris | 8 + toolchain/uClibc/config-20150304/debug | 6 + toolchain/uClibc/config-20150304/i386 | 21 +++ toolchain/uClibc/config-20150304/i686 | 21 +++ toolchain/uClibc/config-20150304/m68k | 6 + toolchain/uClibc/config-20150304/mips | 17 ++ toolchain/uClibc/config-20150304/mips64| 17 ++ toolchain/uClibc/config-20150304/mips64.32 | 18 +++ toolchain/uClibc/config-20150304/mips64.64 | 18 +++ toolchain/uClibc/config-20150304/mips64.n32| 18 +++ toolchain/uClibc/config-20150304/mips64el | 17 ++ toolchain/uClibc/config-20150304/mips64el.32 | 18 +++ toolchain/uClibc/config-20150304/mips64el.64 | 18 +++ toolchain/uClibc/config-20150304/mips64el.n32 | 18 +++ toolchain/uClibc/config-20150304/mipsel| 17 ++ toolchain/uClibc/config-20150304/mipsel.cobalt | 17 ++ toolchain/uClibc/config-20150304/powerpc | 6 + toolchain/uClibc/config-20150304/powerpc.e500 | 6 + toolchain/uClibc/config-20150304/sparc | 8 + toolchain/uClibc/config-20150304/sparc.leon| 8 + toolchain/uClibc/config-20150304/x86_64| 6 + 28 files changed, 548 insertions(+) create mode 100644 toolchain/uClibc/config-20150304/arm create mode 100644 toolchain/uClibc/config-20150304/armeb create mode 100644 toolchain/uClibc/config-20150304/avr32 create mode 100644 toolchain/uClibc/config-20150304/common create mode 100644 toolchain/uClibc/config-20150304/cris create mode 100644 toolchain/uClibc/config-20150304/debug create mode 100644 toolchain/uClibc/config-20150304/i386 create mode 100644 toolchain/uClibc/config-20150304/i686 create mode 100644 toolchain/uClibc/config-20150304/m68k create mode 100644 toolchain/uClibc/config-20150304/mips create mode 100644 toolchain/uClibc/config-20150304/mips64 create mode 100644 toolchain/uClibc/config-20150304/mips64.32 create mode 100644 toolchain/uClibc/config-20150304/mips64.64 create mode 100644 toolchain/uClibc/config-20150304/mips64.n32 create mode 100644 toolchain/uClibc/config-20150304/mips64el create mode 100644 toolchain/uClibc/config-20150304/mips64el.32 create mode 100644 toolchain/uClibc/config-20150304/mips64el.64 create mode 100644 toolchain/uClibc/config-20150304/mips64el.n32 create mode 100644 toolchain/uClibc/config-20150304/mipsel create mode 100644 toolchain/uClibc/config-20150304/mipsel.cobalt create mode 100644 toolchain/uClibc/config-20150304/powerpc create mode 100644 toolchain/uClibc/config-20150304/powerpc.e500 create mode 100644 toolchain/uClibc/config-20150304/sparc create mode 100644 toolchain/uClibc/config-20150304/sparc.leon create mode 100644 toolchain/uClibc/config-20150304/x86_64 diff --git a/toolchain/uClibc/Config.in b/toolchain/uClibc/Config.in index 08ea00a..3bd14bd 100644 --- a/toolchain/uClibc/Config.in +++ b/toolchain/uClibc/Config.in @@ -11,6 +11,10 @@ choice select UCLIBC_VERSION_0_9_33 bool uClibc 0.9.33.2 + config UCLIBC_USE_VERSION_20150304 + select UCLIBC_VERSION_20150304 + bool uClibc snapshot (2015-03-14) + endchoice # Debug version. diff --git a/toolchain/uClibc/Config.version b/toolchain/uClibc/Config.version index dd302f2..56af6b4 100644 --- a/toolchain/uClibc/Config.version +++ b/toolchain/uClibc/Config.version @@ -1,9 +1,13 @@ config UCLIBC_VERSION string depends on USE_UCLIBC + default 20150304 if UCLIBC_VERSION_20150304 default 0.9.33.2 if UCLIBC_VERSION_0_9_33 default 0.9.33.2 config UCLIBC_VERSION_0_9_33 default y if !TOOLCHAINOPTS USE_UCLIBC bool + +config UCLIBC_VERSION_20150304 + bool diff --git a/toolchain/uClibc/common.mk b/toolchain/uClibc/common.mk index 435e4c2..0d9bec3 100644 --- a/toolchain/uClibc
[OpenWrt-Devel] [PATCH 1/2] gccgo/libgo toolchain support for OpenWrt
Hi all, I'm sure there are style weirdnesses with this. Commentary much appreciated! - Jeff - It won't work with uClibc 0.99.33.x because it requires make/get/setcontext - It DOES work with a recent uClibc snapshot (with UCLIBC_HAS_CONTEXT_FUNCS), as well as eglibc - It works with gcc 4.8, and 4.9 with an additional fix submitted separately Only very slightly adapted from Geert-Johan Riemer's work, plus fixes on top. - https://github.com/GeertJohan/openwrt-go/tree/add-gccgo-and-libgo - https://lists.openwrt.org/pipermail/openwrt-devel/2014-January/023214.html Signed-off-by: Jeff Waugh j...@bethesignal.org --- package/libs/toolchain/Makefile| 42 ++ toolchain/gcc/Config.in| 7 toolchain/gcc/common.mk| 2 +- .../400-libgo-do-not-redefine-CPU_COUNT.patch | 15 .../patches/4.8-linaro/401-go1-needs-libm.patch| 11 ++ .../patches/4.9-linaro/401-go1-needs-libm.patch| 11 ++ 6 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 toolchain/gcc/patches/4.8-linaro/400-libgo-do-not-redefine-CPU_COUNT.patch create mode 100644 toolchain/gcc/patches/4.8-linaro/401-go1-needs-libm.patch create mode 100644 toolchain/gcc/patches/4.9-linaro/401-go1-needs-libm.patch diff --git a/package/libs/toolchain/Makefile b/package/libs/toolchain/Makefile index 42b9935..2666d5a 100644 --- a/package/libs/toolchain/Makefile +++ b/package/libs/toolchain/Makefile @@ -254,6 +254,34 @@ define Package/libgfortran/config endmenu endef + +define Package/libgo +$(call Package/gcc/Default) + TITLE:=Go support library + DEPENDS+=@INSTALL_GCCGO +endef + +define Package/libgo/config + menu Configuration + depends on EXTERNAL_TOOLCHAIN PACKAGE_libgo + + config LIBGO_ROOT_DIR + string + prompt libgo shared library base directory + depends on EXTERNAL_TOOLCHAIN PACKAGE_libgo + default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN + default / if NATIVE_TOOLCHAIN + + config LIBGO_FILE_SPEC + string + prompt libgo shared library files (use wildcards) + depends on EXTERNAL_TOOLCHAIN PACKAGE_libgo + default ./usr/lib/libgo.so.* + + endmenu +endef + + define Package/ldd $(call Package/libc/Default) DEPENDS:=@!USE_MUSL @@ -410,6 +438,11 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),) $(if $(CONFIG_TARGET_avr32)$(CONFIG_TARGET_coldfire),,$(CP) $(TOOLCHAIN_DIR)/lib/libgfortran.so.* $(1)/usr/lib/) endef + define Package/libgo/install + $(INSTALL_DIR) $(1)/usr/lib + $(if $(CONFIG_GCC_VERSION_4_6)$(CONFIG_TARGET_avr32)$(CONFIG_TARGET_coldfire),,$(CP) $(TOOLCHAIN_DIR)/lib/libgo.so.* $(1)/usr/lib/) + endef + define Package/libssp/install $(INSTALL_DIR) $(1)/lib $(CP) $(TOOLCHAIN_DIR)/lib/libssp.so.* $(1)/lib/ @@ -559,6 +592,14 @@ else done endef + define Package/libgo/install + for file in $(call qstrip,$(CONFIG_LIBGO_FILE_SPEC)); do \ + dir=`dirname file` ; \ + $(INSTALL_DIR) $(1)/dir ; \ + $(CP) $(call qstrip,$(CONFIG_LIBGO_ROOT_DIR))/file $(1)/dir/ ; \ + done + endef + define Package/libssp/install for file in $(call qstrip,$(CONFIG_LIBSSP_FILE_SPEC)); do \ dir=`dirname file` ; \ @@ -642,5 +683,6 @@ $(eval $(call BuildPackage,libpthread)) $(eval $(call BuildPackage,libthread-db)) $(eval $(call BuildPackage,librt)) $(eval $(call BuildPackage,libgfortran)) +$(eval $(call BuildPackage,libgo)) $(eval $(call BuildPackage,ldd)) $(eval $(call BuildPackage,ldconfig)) diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in index ecd7c26..ec87d32 100644 --- a/toolchain/gcc/Config.in +++ b/toolchain/gcc/Config.in @@ -74,3 +74,10 @@ config INSTALL_GFORTRAN default n help Build/install GNU fortran compiler ? + +config INSTALL_GCCGO + bool + prompt Build/install gccgo compiler? if TOOLCHAINOPTS !(GCC_VERSION_4_4_7 || GCC_VERSION_4_6 || GCC_VERSION_4_6_LINARO) !UCLIBC_VERSION_0_9_33 + default n + help + Build/install GNU gccgo compiler ? diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk index 925964e..9c01bbd 100644 --- a/toolchain/gcc/common.mk +++ b/toolchain/gcc/common.mk @@ -99,7 +99,7 @@ HOST_STAMP_CONFIGURED:=$(GCC_BUILD_DIR)/.configured HOST_STAMP_INSTALLED:=$(STAGING_DIR_HOST)/stamp/.gcc_$(GCC_VARIANT)_installed SEP:=, -TARGET_LANGUAGES:=c,c++$(if $(CONFIG_INSTALL_LIBGCJ),$(SEP)java)$(if $(CONFIG_INSTALL_GFORTRAN),$(SEP)fortran) +TARGET_LANGUAGES:=c,c++$(if $(CONFIG_INSTALL_LIBGCJ),$(SEP)java)$(if $(CONFIG_INSTALL_GFORTRAN),$(SEP)fortran)$(if $(CONFIG_INSTALL_GCCGO),$(SEP)go) export libgcc_cv_fixed_point=no ifdef CONFIG_USE_UCLIBC diff --git
[OpenWrt-Devel] [PATCH 2/2] toolchain/gcc/final: Add --disable-werror
Hi all, This was the least dirty way I could find to stop the build blowing up with a maybe-uninitialized error. The code in question hadn't changed upstream, either... at least until it was removed. Thanks, Jeff I'm not convinced this is the right thing to do, but it's required for libgo to build from gcc 4.9. Thus, separate commit / patch. Signed-off-by: Jeff Waugh j...@bethesignal.org --- toolchain/gcc/final/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/toolchain/gcc/final/Makefile b/toolchain/gcc/final/Makefile index 3fb5ccf..955c92b 100644 --- a/toolchain/gcc/final/Makefile +++ b/toolchain/gcc/final/Makefile @@ -8,7 +8,8 @@ GCC_CONFIGURE += \ --enable-languages=$(TARGET_LANGUAGES) \ --enable-shared \ --enable-threads \ - --with-slibdir=$(TOOLCHAIN_DIR)/lib + --with-slibdir=$(TOOLCHAIN_DIR)/lib \ + --disable-werror ifneq ($(CONFIG_GCC_VERSION_4_5)$(CONFIG_GCC_VERSION_4_6),) GCC_CONFIGURE += \ -- 1.9.1 ___ 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: Add uClibc snapshot as selectable version
On 04.03.2015 20:13, Jeff Waugh wrote: There hasn't been a uClibc release since May 2012, but some useful things have landed in git since then... for example, make/get/setcontext are necessary for uClibc + gccgo/libgo (c.f. my last patch set). This adds a non-default option for a known-good nightly snapshot. I'm sure you will have comments on some of the... hmm... odd things I've done. Let me know! adding uclibc snapshots maybe other (patched) variants might improve well some things (quality ? pressure to release new stable version?) uclibc version problems affect other uclibc users too [0],[1],[2] and this came up regularly in the past and its a little bit messy to have potentially slightly different uclibc versions between projects [3][4] (hoping that these are the correct uclibc patch/variants links for buildroot and yocto project) Its probably a good thing to get easier access to a uclibc variant than using - abandoned eglibc = bad (EGLIBC is no longer developed and such goals are now being addressed directly in GLIBC. ) - musl (experimental) [0] http://lists.uclibc.org/pipermail/uclibc/2014-February/048252.html [1] http://lists.uclibc.org/pipermail/uclibc/2015-February/048769.html [2] http://lists.uclibc.org/pipermail/uclibc/2014-July/048399.html [3] http://git.buildroot.net/buildroot/tree/package/uclibc [4] http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-core/uclibc/uclibc-git ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] procd: Use pkg-config to find json-c
Hi, Karl On 4 March 2015 at 21:51, Karl Palsson ka...@tweak.net.au wrote: Comments inline, I thought I'd made similar comments earlier, but perhaps I forgot... William Holland william.holl...@codethink.co.uk wrote: --- CMakeLists.txt |4 plug/hotplug.c |2 +- service/validate.c |2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5414677..0296735 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,10 @@ SET(SOURCES procd.c signal.c watchdog.c state.c inittab.c rcS.c ubus.c system.c service/service.c service/instance.c service/validate.c service/trigger.c service/watch.c plug/coldplug.c plug/hotplug.c utils/utils.c) +INCLUDE(FindPkgConfig) +PKG_CHECK_MODULES(JSONC json-c json) +INCLUDE_DIRECTORIES(${JSONC_INCLUDE_DIRS}) + find_library(json NAMES json-c json) procd is only used in openwrt in releases that came after the json-c library moved to version 0.11. There's no need for this backward compatibility in new code Yeah, legacy json-c support was dropped in libubox [1] and not long ago. [1] libubox: drop legacy json-c support, http://git.openwrt.org/?p=project/libubox.git;a=commitdiff;h=cbf80de7f4df61960f386cb01a899cf4228d38f3 SET(LIBS ubox ubus ${json} blobmsg_json json_script) diff --git a/plug/hotplug.c b/plug/hotplug.c index 061833a..aa0e070 100644 --- a/plug/hotplug.c +++ b/plug/hotplug.c @@ -22,7 +22,7 @@ #include libubox/blobmsg_json.h #include libubox/json_script.h #include libubox/uloop.h -#include json/json.h +#include json.h Why not json-c/json.h ? The package makefile for libjson-c installs into the json-c directory. Why do you need this? Why would you want to be different to other platforms? Details about the practices used by other platforms will help here. AFAIK, - pkg-config file of json-c project itself currently defines the include path to be usr/include/json-c - -I/usr/include/json-c is the current output of pkg-config --cflags json-c on Debian Wheezy, Ubuntu 14.04, and MacPorts for Mac OS X Mavericks. - lldpd is the only package besides libubox among OpenWrt base packages that depends on libjson-c and it expects to find the header with #include json.h [2]. Well, current code mostly works and I am fine with it, but if something was to be changed I hope the above information could be useful. [2] https://github.com/vincentbernat/lldpd/blob/master/src/client/jsonc_writer.c#L26 Regards yousong #include fcntl.h #include unistd.h diff --git a/service/validate.c b/service/validate.c index a33a48e..cedd1ed 100644 --- a/service/validate.c +++ b/service/validate.c @@ -13,7 +13,7 @@ #include libubox/blobmsg_json.h #include libubox/avl-cmp.h -#include json/json.h +#include json.h Same #include ../procd.h -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel -- Sent using Mailpile, Free Software from www.mailpile.is ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ 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: Add uClibc snapshot as selectable version
On Thu, Mar 5, 2015 at 7:04 AM, Dirk Neukirchen dirkneukirc...@web.de wrote: Its probably a good thing to get easier access to a uclibc variant than using - abandoned eglibc = bad (EGLIBC is no longer developed and such goals are now being addressed directly in GLIBC. ) By the way, I've also been working on a patch to re-introduce glibc. I'll send that through soon. :-) ___ 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: Add uClibc snapshot as selectable version
On Thu, Mar 5, 2015 at 7:04 AM, Dirk Neukirchen dirkneukirc...@web.de wrote: adding uclibc snapshots maybe other (patched) variants might improve well some things (quality ? pressure to release new stable version?) So we have some options: 1) use uclibc-snapshot.tar.bz2 instead of a dated, known working version (though we can't check the md5sum) 2) use uclibc git at a specific revision 3) use uclibc git at head 4) anything I don't know about? uclibc-ng? I'm leaning towards (2) at this point, and will send through a patch for that. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] at91: add SAMA5D3-Xplained board UBI parameters to makefile.
Signed-off-by: Songjun Wu songjun...@atmel.com --- target/linux/at91/image/Makefile |3 +++ 1 file changed, 3 insertions(+) diff --git a/target/linux/at91/image/Makefile b/target/linux/at91/image/Makefile index f88cab4..49e2bee 100644 --- a/target/linux/at91/image/Makefile +++ b/target/linux/at91/image/Makefile @@ -10,6 +10,9 @@ include $(INCLUDE_DIR)/image.mk UBIFS_OPTS = -F -m 2048 -e 126KiB -c 2048 -U UBI_OPTS = -m 2048 -p 128KiB -s 512 +AT91SAMA5D3XPLAINED_UBIFS_OPTS = -m 2048 -e 124KiB -c 2048 +AT91SAMA5D3XPLAINED_UBI_OPTS = -m 2048 -p 128KiB -s 2048 + define Build/Clean $(MAKE) -C u-boot clean endef -- 1.7.9.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: Add uClibc snapshot as selectable version
Hi all, Here's an alternative version of my uClibc snapshot change. This one just uses uClibc-snapshot.tar.bz2, which is super-easy but has some drawbacks: - You won't get a like-for-like build from a fresh OpenWrt checkout (though once you've cached the download, you'll have like-for-like builds from it) - The LIBC_SO_VERSION may change upstream, which will break the build until someone fixes it in toolchain/uClibc/common.mk We can work around both by just fetching a known-good git revision, but I'm struggling to get it to fetch from git at all thus far (I think it's a problem with my ifdef checks). Will keep trying. Anyway, just popping this here for more feedback if warranted. Thanks, Jeff Signed-off-by: Jeff Waugh j...@bethesignal.org --- Config.in |4 Config.version|4 common.mk | 10 + config-snapshot/arm |7 + config-snapshot/armeb |7 + config-snapshot/avr32 | 12 ++ config-snapshot/common| 214 ++ config-snapshot/cris |8 + config-snapshot/debug |6 + config-snapshot/i386 | 21 config-snapshot/i686 | 21 config-snapshot/m68k |6 + config-snapshot/mips | 17 +++ config-snapshot/mips64| 17 +++ config-snapshot/mips64.32 | 18 +++ config-snapshot/mips64.64 | 18 +++ config-snapshot/mips64.n32| 18 +++ config-snapshot/mips64el | 17 +++ config-snapshot/mips64el.32 | 18 +++ config-snapshot/mips64el.64 | 18 +++ config-snapshot/mips64el.n32 | 18 +++ config-snapshot/mipsel| 17 +++ config-snapshot/mipsel.cobalt | 17 +++ config-snapshot/powerpc |6 + config-snapshot/powerpc.e500 |6 + config-snapshot/sparc |8 + config-snapshot/sparc.leon|8 + config-snapshot/x86_64|6 + 28 files changed, 547 insertions(+) diff --git a/toolchain/uClibc/Config.in b/toolchain/uClibc/Config.in index 08ea00a..43447d1 100644 --- a/toolchain/uClibc/Config.in +++ b/toolchain/uClibc/Config.in @@ -11,6 +11,10 @@ choice select UCLIBC_VERSION_0_9_33 bool uClibc 0.9.33.2 + config UCLIBC_USE_VERSION_SNAPSHOT + select UCLIBC_VERSION_SNAPSHOT + bool uClibc snapshot + endchoice # Debug version. diff --git a/toolchain/uClibc/Config.version b/toolchain/uClibc/Config.version index dd302f2..955ef8f 100644 --- a/toolchain/uClibc/Config.version +++ b/toolchain/uClibc/Config.version @@ -1,9 +1,13 @@ config UCLIBC_VERSION string depends on USE_UCLIBC + default snapshot if UCLIBC_VERSION_SNAPSHOT default 0.9.33.2 if UCLIBC_VERSION_0_9_33 default 0.9.33.2 config UCLIBC_VERSION_0_9_33 default y if !TOOLCHAINOPTS USE_UCLIBC bool + +config UCLIBC_VERSION_SNAPSHOT + bool diff --git a/toolchain/uClibc/common.mk b/toolchain/uClibc/common.mk index 435e4c2..b866d9a 100644 --- a/toolchain/uClibc/common.mk +++ b/toolchain/uClibc/common.mk @@ -15,6 +15,12 @@ LIBC_SO_VERSION:=$(PKG_VERSION) PATCH_DIR:=$(PATH_PREFIX)/patches-$(PKG_VERSION) CONFIG_DIR:=$(PATH_PREFIX)/config-$(PKG_VERSION) +PKG_SNAPSHOT:=$(if $(findstring .,$(PKG_VERSION)),,y) +ifdef $(PKG_SNAPSHOT) +PKG_SOURCE_URL:=http://www.uclibc.org/downloads/snapshots/ +LIBC_SO_VERSION:=0.9.34-git +endif + PKG_MD5SUM_0.9.33.2 = a338aaffc56f0f5040e6d9fa8a12eda1 PKG_MD5SUM=$(PKG_MD5SUM_$(PKG_VERSION)) @@ -69,6 +75,10 @@ define Host/Prepare $(QUILT_CMD) push -a; \ fi ) + $(if $(PKG_SNAPSHOT), \ + rm -d $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)-$(PKG_VERSION); \ + mv $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)-$(PKG_VERSION) + ) ln -snf $(PKG_NAME)-$(PKG_VERSION) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) endef diff --git a/toolchain/uClibc/config-snapshot/arm b/toolchain/uClibc/config-snapshot/arm new file mode 100644 index 000..b68617b --- /dev/null +++ b/toolchain/uClibc/config-snapshot/arm @@ -0,0 +1,7 @@ +ARCH_ANY_ENDIAN=y +ARCH_LITTLE_ENDIAN=y +ARCH_WANTS_LITTLE_ENDIAN=y +# COMPILE_IN_THUMB_MODE is not set +TARGET_ARCH=arm +TARGET_arm=y +# USE_BX is not set diff --git a/toolchain/uClibc/config-snapshot/armeb b/toolchain/uClibc/config-snapshot/armeb new file mode 100644 index 000..d4932e8 --- /dev/null +++ b/toolchain/uClibc/config-snapshot/armeb @@ -0,0 +1,7 @@ +ARCH_ANY_ENDIAN=y +ARCH_BIG_ENDIAN=y +ARCH_WANTS_BIG_ENDIAN=y +# COMPILE_IN_THUMB_MODE is not set +TARGET_ARCH=arm +TARGET_arm=y +# USE_BX is not set diff --git a/toolchain/uClibc/config-snapshot/avr32 b/toolchain/uClibc/config-snapshot/avr32 new file mode 100644 index 000..729fbc9 --- /dev/null +++ b/toolchain/uClibc/config-snapshot/avr32 @@ -0,0 +1,12 @@ +ARCH_BIG_ENDIAN=y +CONFIG_AVR32_AP7=y
Re: [OpenWrt-Devel] [PATCH] toolchain/uClibc: Add uClibc snapshot as selectable version
On Thu, Mar 5, 2015 at 1:19 PM, Jeff Waugh j...@bethesignal.org wrote: 1) use uclibc-snapshot.tar.bz2 instead of a dated, known working version (though we can't check the md5sum) 2) use uclibc git at a specific revision 3) use uclibc git at head 4) anything I don't know about? uclibc-ng? I'm leaning towards (2) at this point, and will send through a patch for that. It's a pity that (1) is just *so* easy. And although it won't produce like-for-like builds from a fresh checkout of OpenWrt, if you've already downloaded the snapshot tarballs then your own builds will be like-for-like. At least in that context. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Ethernet problem with R8000
On Wed, 2015-03-04 at 10:29 +, Conor O'Gorman wrote: On 04/03/15 05:29, Ian Kent wrote: On Sat, 2015-02-28 at 23:07 +0800, Ian Kent wrote: The only things I can say for sure are, packets sent are seen by the bgmac driver and the driver gets a transmit completion interrupt which it processes. However, no packets is seen coming from the router switch port. Similarly no interrupts are seen by the driver for incoming packets at all. Thanks for giving this some thought. Can you access switch chip registers? Reckon so. This device uses the bgmac driver. What I've looked at so far is the DMA state and error registers and how the Descriptor stop index (last posted descriptor for transmit, etc) registers change for the DMA controller transmit and receive queues (see below link). I've also done some printks to check some key values in the driver and that looks ok too. All looks as it should in that no error bits are set and the status register shows the transmit and receive functions are enabled and AFAICS the magic to poke the DMA engine is being done as it should. It's puzzling. Truth is I can't find anything that looks even a little wrong comparing it to the router GPL source code and the brcmfmac DMA code referenced in the link blow. It's even stranger that network packets pass through the router when I have a machine plugged into a port and into the network on another port, just nothing ever passes from the router to the network and visa versa. There may be counters in there, that will indicate if packets are making it that far, in or out. You may see counters indicating errors. You might be able to work out the arangement of ports from that info. You may have to configure some of the switch registers to get the correct arrangement of the ports and/or vlan settings. Haven't seen counters as such. There are a bunch of counters listed in the b53 switch driver (mib entries, but I haven't checked the device registers actually hold these values) that essentially reflect what I'm seeing but don't offer much else. It would be good if someone could identify devices using bcm53xx that are known to work and, if available point to a boot log. And in case anyone is interested my most recent R8000 boot log is here: https://www.dropbox.com/s/jx8d771fcu22dcz/debug-3.txt?dl=0 But there are a bunch of other registers, maybe I should go hunting I'm working from this http://bcm-v4.sipsolutions.net/mac-gbit/Registers and this for the DMA http://bcm-v4.sipsolutions.net/802.11/DMA#A64_Bit_DMA. Ian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Ethernet problem with R8000
On 04/03/15 05:29, Ian Kent wrote: On Sat, 2015-02-28 at 23:07 +0800, Ian Kent wrote: The only things I can say for sure are, packets sent are seen by the bgmac driver and the driver gets a transmit completion interrupt which it processes. However, no packets is seen coming from the router switch port. Similarly no interrupts are seen by the driver for incoming packets at all. Can you access switch chip registers? There may be counters in there, that will indicate if packets are making it that far, in or out. You may see counters indicating errors. You might be able to work out the arangement of ports from that info. You may have to configure some of the switch registers to get the correct arrangement of the ports and/or vlan settings. Conor ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] procd: Use pkg-config to find json-c
Comments inline, I thought I'd made similar comments earlier, but perhaps I forgot... William Holland william.holl...@codethink.co.uk wrote: --- CMakeLists.txt |4 plug/hotplug.c |2 +- service/validate.c |2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5414677..0296735 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,10 @@ SET(SOURCES procd.c signal.c watchdog.c state.c inittab.c rcS.c ubus.c system.c service/service.c service/instance.c service/validate.c service/trigger.c service/watch.c plug/coldplug.c plug/hotplug.c utils/utils.c) +INCLUDE(FindPkgConfig) +PKG_CHECK_MODULES(JSONC json-c json) +INCLUDE_DIRECTORIES(${JSONC_INCLUDE_DIRS}) + find_library(json NAMES json-c json) procd is only used in openwrt in releases that came after the json-c library moved to version 0.11. There's no need for this backward compatibility in new code SET(LIBS ubox ubus ${json} blobmsg_json json_script) diff --git a/plug/hotplug.c b/plug/hotplug.c index 061833a..aa0e070 100644 --- a/plug/hotplug.c +++ b/plug/hotplug.c @@ -22,7 +22,7 @@ #include libubox/blobmsg_json.h #include libubox/json_script.h #include libubox/uloop.h -#include json/json.h +#include json.h Why not json-c/json.h ? The package makefile for libjson-c installs into the json-c directory. Why do you need this? Why would you want to be different to other platforms? #include fcntl.h #include unistd.h diff --git a/service/validate.c b/service/validate.c index a33a48e..cedd1ed 100644 --- a/service/validate.c +++ b/service/validate.c @@ -13,7 +13,7 @@ #include libubox/blobmsg_json.h #include libubox/avl-cmp.h -#include json/json.h +#include json.h Same #include ../procd.h -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel -- Sent using Mailpile, Free Software from www.mailpile.is___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] procd: Use pkg-config to find json-c
Sorry I missed your reply to Yousong Zhou's email addressing the #include json.h issue. So should it simple be the following? diff --git a/plug/hotplug.c b/plug/hotplug.c index 061833a..6df7971 100644 --- a/plug/hotplug.c +++ b/plug/hotplug.c @@ -22,7 +22,7 @@ #include libubox/blobmsg_json.h #include libubox/json_script.h #include libubox/uloop.h -#include json/json.h +#include json-c/json.h #include fcntl.h #include unistd.h diff --git a/service/validate.c b/service/validate.c index a33a48e..bceddac 100644 --- a/service/validate.c +++ b/service/validate.c @@ -13,7 +13,7 @@ #include libubox/blobmsg_json.h #include libubox/avl-cmp.h -#include json/json.h +#include json-c/json.h #include ../procd.h Thanks Will On 04/03/15 13:51, Karl Palsson wrote: Comments inline, I thought I'd made similar comments earlier, but perhaps I forgot... William Holland william.holl...@codethink.co.uk wrote: --- CMakeLists.txt |4 plug/hotplug.c |2 +- service/validate.c |2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5414677..0296735 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,10 @@ SET(SOURCES procd.c signal.c watchdog.c state.c inittab.c rcS.c ubus.c system.c service/service.c service/instance.c service/validate.c service/trigger.c service/watch.c plug/coldplug.c plug/hotplug.c utils/utils.c) +INCLUDE(FindPkgConfig) +PKG_CHECK_MODULES(JSONC json-c json) +INCLUDE_DIRECTORIES(${JSONC_INCLUDE_DIRS}) + find_library(json NAMES json-c json) procd is only used in openwrt in releases that came after the json-c library moved to version 0.11. There's no need for this backward compatibility in new code SET(LIBS ubox ubus ${json} blobmsg_json json_script) diff --git a/plug/hotplug.c b/plug/hotplug.c index 061833a..aa0e070 100644 --- a/plug/hotplug.c +++ b/plug/hotplug.c @@ -22,7 +22,7 @@ #include libubox/blobmsg_json.h #include libubox/json_script.h #include libubox/uloop.h -#include json/json.h +#include json.h Why not json-c/json.h ? The package makefile for libjson-c installs into the json-c directory. Why do you need this? Why would you want to be different to other platforms? #include fcntl.h #include unistd.h diff --git a/service/validate.c b/service/validate.c index a33a48e..cedd1ed 100644 --- a/service/validate.c +++ b/service/validate.c @@ -13,7 +13,7 @@ #include libubox/blobmsg_json.h #include libubox/avl-cmp.h -#include json/json.h +#include json.h Same #include ../procd.h -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel