Re: [OpenWrt-Devel] [PATCH 0/2] Initial NAND support for WNDR4300
2013.11.10. 11:58 keltezéssel, Stefan Agner írta: Nevermind, the second time it worked: [2.71] UBI: attaching mtd8 to ubi0 [2.74] UBI: EOF marker found, PEBs from 17 will be erased [2.74] UBI: scanning is finished [2.77] gluebi (pid 1): gluebi_resized: got update notification for unknown UBI device 0 volume 1 [2.78] UBI: volume 1 (rootfs_data) re-sized from 1 to 146 LEBs [2.79] UBI: attached mtd8 (name ubiroot, size 23 MiB) to ubi0 [2.80] UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes [2.81] UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048 [2.81] UBI: VID header offset: 2048 (aligned 2048), data offset: 4096 [2.82] UBI: good PEBs: 184, bad PEBs: 0, corrupted PEBs: 0 [2.82] UBI: user volume: 2, internal volumes: 1, max. volumes count: 128 [2.83] UBI: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 1699075075 [2.84] UBI: available PEBs: 0, total reserved PEBs: 184, PEBs reserved for bad PEB handling: 20 [2.85] UBI: background thread ubi_bgt0d started, PID 263 [2.86] mtd: device 12 (rootfs) set to be root filesystem [2.87] VFS: Mounted root (squashfs filesystem) readonly on device 31:12. Probably because I made no make clean before building the new image with those EOF marker? Yes, that was the reason. Without make clean, the required kernel patch has not been applied. -Gabor ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ar71xx: wndr4300: set official mac addresses
2013.11.10. 18:34 keltezéssel, Stefan Agner írta: Get the factory assigned mac addresses stored in the caldata partition and asign them to lan, wan and radio1. Signed-off-by: Stefan Agner ste...@agner.ch Applied with some changes. Thanks, Gabor ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [Patch][packages][RFC] erlang: update and remove RIPEMD
On 15.11.2013 03:16, Peter Wagner wrote: Hi Dirk, could you please resend the patch. i get: patching file Makefile patch: malformed patch at line 84: 2. As it seems you mail clients wraps the lines. If you can't disable wrapping just attach the patch as file. v2 resent with mail.wrap_long_lines;false now (Thunderbird) attached patchfile too This patch updates erlang to a more current 16B02 and hopefully removes RIPEMD160 support. It's only compile tested - don't know about erlang I used the commit that added ripemd to erlang as a guideline https://github.com/erlang/otp/commit/3881407ea8444c280d9659f40e6c169a1e10310d.patch add ripemd160 support to crypto add ripemd160 message digest support to the crypto app, includes some test cases. and reverted it accordingly i hope. notice: - docs are left untouched - tests are left untouched Signed-off-by: Dirk Neukirchen dirkneukirc...@web.de --- diff --git a/lang/erlang/Makefile b/lang/erlang/Makefile index ddba81c..96d336e 100644 --- a/lang/erlang/Makefile +++ b/lang/erlang/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2009-2012 OpenWrt.org +# Copyright (C) 2009-2013 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=erlang -PKG_VERSION:=R15B01 -PKG_RELEASE:=4 +PKG_VERSION:=R16B02 +PKG_RELEASE:=1 PKG_SOURCE:=otp_src_$(PKG_VERSION).tar.gz PKG_SOURCE_URL:= http://www.erlang.org/download/ \ http://erlang.mirror.su.se/ -PKG_MD5SUM:=f12d00f6e62b36ad027d6c0c08905fad +PKG_MD5SUM:=ca63bcde0e5ae0f2df9457f97b3115a4 PKG_BUILD_DEPENDS:=erlang/host openssl diff --git a/lang/erlang/patches/101-emulator_includes.patch b/lang/erlang/patches/101-emulator_includes.patch index 933c73e..8136e47 100644 --- a/lang/erlang/patches/101-emulator_includes.patch +++ b/lang/erlang/patches/101-emulator_includes.patch @@ -1,11 +1,14 @@ --- a/erts/emulator/Makefile.in +++ b/erts/emulator/Makefile.in -@@ -591,7 +591,7 @@ endif - - - $(OBJDIR)/%.o: beam/%.c -- $(CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $ -o $@ -+ $(CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $ -o $@ - +@@ -642,9 +642,9 @@ endif + + ifneq ($(filter tile-%,$(TARGET)),) + $(OBJDIR)/beam_emu.o: beam/beam_emu.c +- $(V_CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) \ ++ $(V_CC) $(INCLUDES) \ + -OPT:Olimit=0 -WOPT:lpre=off:spre=off:epre=off \ +- $(INCLUDES) -c $ -o $@ ++ $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $ -o $@ else - + # Usually the same as the default rule, but certain platforms (e.g. win32) mix + # different compilers diff --git a/lang/erlang/patches/104-disable_ripemd.patch b/lang/erlang/patches/104-disable_ripemd.patch new file mode 100644 index 000..0995c01 --- /dev/null +++ b/lang/erlang/patches/104-disable_ripemd.patch @@ -0,0 +1,191 @@ +--- a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c +@@ -44,7 +44,6 @@ + #include openssl/md5.h + #include openssl/md4.h + #include openssl/sha.h +-#include openssl/ripemd.h + #include openssl/bn.h + #include openssl/objects.h + #include openssl/rc4.h +@@ -167,10 +166,6 @@ static ERL_NIF_TERM md5(ErlNifEnv* env, + static ERL_NIF_TERM md5_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); + static ERL_NIF_TERM md5_update(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); + static ERL_NIF_TERM md5_final(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +-static ERL_NIF_TERM ripemd160(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +-static ERL_NIF_TERM ripemd160_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +-static ERL_NIF_TERM ripemd160_update(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +-static ERL_NIF_TERM ripemd160_final(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); + static ERL_NIF_TERM sha(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); + static ERL_NIF_TERM sha_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); + static ERL_NIF_TERM sha_update(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +@@ -292,10 +287,6 @@ static ErlNifFunc nif_funcs[] = { + {md5_init, 0, md5_init}, + {md5_update, 2, md5_update}, + {md5_final, 1, md5_final}, +-{ripemd160, 1, ripemd160}, +-{ripemd160_init, 0, ripemd160_init}, +-{ripemd160_update, 2, ripemd160_update}, +-{ripemd160_final, 1, ripemd160_final}, + {sha, 1, sha}, + {sha_init, 0, sha_init}, + {sha_update, 2, sha_update}, +@@ -478,8 +469,6 @@ ERL_NIF_INIT(crypto,nif_funcs,load,NULL, + #define MD5_LEN_96 12 + #define MD4_CTX_LEN (sizeof(MD4_CTX)) + #define MD4_LEN 16 +-#define RIPEMD160_CTX_LEN (sizeof(RIPEMD160_CTX)) +-#define RIPEMD160_LEN 20 + #define SHA_CTX_LEN (sizeof(SHA_CTX)) + #define SHA_LEN 20 + #define SHA_LEN_96 12 +@@ -503,7 +492,6 @@ static ERL_NIF_TERM atom_sha384; + static ERL_NIF_TERM
Re: [OpenWrt-Devel] [PATCH] [1/3] ar71xx: Add kernel support for the WR842N/ND v2
2013.11.10. 20:31 keltezéssel, Martijn Zilverschoon írta: Patch to add kernel support for the TP-LINK WR842N/ND v2 Signed-off-by: Martijn Zilverschoon thefriedzom...@gmail.com Applied. Thanks, Gabor ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] [2/3] ar71xx: add profile for the WR842N/ND v2
2013.11.10. 20:32 keltezéssel, Martijn Zilverschoon írta: Patch to add the profile for the TP-LINK WR842N/ND v2 Signed-off-by: Martijn Zilverschoon thefriedzom...@gmail.com Applied. Thanks, Gabor ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] [2/3] ar71xx: add profile for the WR842N/ND v2
2013.11.11. 14:17 keltezéssel, Martijn Zilverschoon írta: Signed-off-by: Martijn Zilverschoon thefriedzom...@gmail.com 2013/11/11 Martijn Zilverschoon thefriedzom...@gmail.com: Patch to add the profile for the TP-LINK WR842N/ND v2 Small update, because of a change in the Makefile. Applied. Thanks, Gabor ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Boot OpenWRT on RB433 Lite versions (RB433L , RB433UAHL)
Hello, I'm currently struggling with two similar Microtik routers: RB433L , RB433UAHL. They are the Lite version of the well-known rb433, with a lower power consomption. Their amusing property is that the serial port seems present (RX/TX pads) but not initialized at boot, neither by Linux kernel or by the bootloader, which make debugging difficult (On the TX pad, I just get a suspicious periodic square signal after boot) I can't get any of them boot an OpenWRT image (trunk of today) using the netboot procedure described here: http://wp.ayufan.eu/2013/02/the-rb951g-and-openwrt/ (and elsewere). The router does bootp + tftp procedure and seems to ignore the ELF file I give it (I tried all of openwrt-ar71xx-mikrotik-vmlinux.elf openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf openwrt-ar71xx-mikrotik-vmlinux-initramfs-lzma.elf openwrt-ar71xx-mikrotik-vmlinux-lzma.elf ) The netboot procedure does work since I could send the microtik's NPK upgrade package and the routeur did flash itself. Apparently, one person did success in booting a kernel https://forum.openwrt.org/viewtopic.php?id=41490 , but no specific details on the file used not the procedure. I would be very happy to just get to the kernel boot point. Does anyone did play with this kind of hardware ? Thanks OB ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] [packages] zabbix: update to 2.2.0
This patch updates zabbix to version 2.2.0. This patch also fixes the autostart of agentd daemon which could not start with default cfg because of the nonexistence of /etc/zabbix_agentd.conf.d directory. Signed-off-by: Jiri Slachta slac...@cesnet.cz --- admin/zabbix/Makefile |4 ++-- admin/zabbix/patches/001-cross_compile.patch |2 +- .../patches/002-fix-res_send-on-uclibc.patch |6 +++--- admin/zabbix/patches/002-uclibc_loadavg.patch | 11 +-- .../zabbix/patches/010-change-agentd-config.patch | 10 +- 5 files changed, 16 insertions(+), 17 deletions(-) diff --git a/admin/zabbix/Makefile b/admin/zabbix/Makefile index 5ee8425..6183c4f 100644 --- a/admin/zabbix/Makefile +++ b/admin/zabbix/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=zabbix -PKG_VERSION:=2.0.8 +PKG_VERSION:=2.2.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/zabbix -PKG_MD5SUM:=8fef9e6f499295211dd9b2a9db96464b +PKG_MD5SUM:=caec9b3b744dac0b171c0c6b0c240b69 PKG_INSTALL:=1 diff --git a/admin/zabbix/patches/001-cross_compile.patch b/admin/zabbix/patches/001-cross_compile.patch index 8716e84..780e618 100644 --- a/admin/zabbix/patches/001-cross_compile.patch +++ b/admin/zabbix/patches/001-cross_compile.patch @@ -1,6 +1,6 @@ --- a/configure.in 2012-06-21 21:32:23.707912790 + +++ b/configure.in 2012-06-21 21:33:36.213554564 + -@@ -802,25 +802,8 @@ +@@ -804,25 +804,8 @@ dnl Check for %qu format (FreeBSD 4.x) dnl FreeBSD 4.x does not support %llu diff --git a/admin/zabbix/patches/002-fix-res_send-on-uclibc.patch b/admin/zabbix/patches/002-fix-res_send-on-uclibc.patch index 3190659..a5fb677 100644 --- a/admin/zabbix/patches/002-fix-res_send-on-uclibc.patch +++ b/admin/zabbix/patches/002-fix-res_send-on-uclibc.patch @@ -1,6 +1,6 @@ --- a/configure.in 2013-02-14 18:29:28.145419003 +0100 +++ b/configure.in 2013-02-14 18:28:42.873418092 +0100 -@@ -149,6 +149,10 @@ +@@ -151,6 +151,10 @@ AC_MSG_ERROR([Unable to do DNS lookups (libresolv check failed)]) fi LIBS=${LIBS} ${RESOLV_LIBS} @@ -13,7 +13,7 @@ dnl * * --- a/src/libs/zbxsysinfo/common/net.c 2012-06-21 19:49:46.610567432 + +++ b/src/libs/zbxsysinfo/common/net.c 2012-06-21 19:50:35.816628541 + -@@ -418,6 +418,7 @@ +@@ -421,6 +421,7 @@ #else /* not _WINDOWS */ res_init(); /* initialize always, settings might have changed */ @@ -21,7 +21,7 @@ if (-1 == (res = res_mkquery(QUERY, zone, C_IN, type, NULL, 0, NULL, buf, sizeof(buf return SYSINFO_RET_FAIL; -@@ -436,6 +437,11 @@ +@@ -439,6 +440,11 @@ _res.retry = retry; res = res_send(buf, res, answer.buffer, sizeof(answer.buffer)); diff --git a/admin/zabbix/patches/002-uclibc_loadavg.patch b/admin/zabbix/patches/002-uclibc_loadavg.patch index 6effabb..66e93ca 100644 --- a/admin/zabbix/patches/002-uclibc_loadavg.patch +++ b/admin/zabbix/patches/002-uclibc_loadavg.patch @@ -1,10 +1,9 @@ a/src/libs/zbxsysinfo/linux/cpu.c 2013-02-12 12:27:22.0 +0100 -+++ b/src/libs/zbxsysinfo/linux/cpu.c 2013-02-14 18:38:02.517429349 +0100 -@@ -21,6 +21,45 @@ +--- zabbix-2.2.0/src/libs/zbxsysinfo/linux/cpu.c 2013-11-12 07:07:26.0 +0100 zabbix-new/src/libs/zbxsysinfo/linux/cpu.c 2013-11-15 10:38:45.638488128 +0100 +@@ -21,6 +21,44 @@ #include sysinfo.h #include stats.h -+ +/* uclibc and dietlibc do not have this junk -ReneR */ +#if defined (__UCLIBC__) || defined (__dietlibc__) +static int getloadavg (double loadavg[], int nelem) @@ -43,6 +42,6 @@ +} +#endif + - int SYSTEM_CPU_NUM(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result) + int SYSTEM_CPU_NUM(AGENT_REQUEST *request, AGENT_RESULT *result) { - chartmp[16]; + char*type; diff --git a/admin/zabbix/patches/010-change-agentd-config.patch b/admin/zabbix/patches/010-change-agentd-config.patch index 58424e9..57ff815 100644 --- a/admin/zabbix/patches/010-change-agentd-config.patch +++ b/admin/zabbix/patches/010-change-agentd-config.patch @@ -24,7 +24,7 @@ ### Option: LogFileSize # Maximum size of log file in MB. # 0 - disable automatic log rotation. -@@ -105,6 +99,7 @@ Server=127.0.0.1 +@@ -104,6 +98,7 @@ Server=127.0.0.1 # Range: 0-100 # Default: # StartAgents=3 @@ -32,7 +32,7 @@ # Active checks related -@@ -120,8 +115,6 @@ Server=127.0.0.1 +@@ -119,8 +114,6 @@ Server=127.0.0.1 # Default: # ServerActive= @@ -41,7 +41,7 @@ ### Option: Hostname # Unique, case sensitive hostname. # Required for active checks and must match hostname as configured on the server. -@@ -131,8 +124,6 @@ ServerActive=127.0.0.1 +@@ -130,8 +123,6 @@ ServerActive=127.0.0.1 # Default: # Hostname= @@ -50,12 +50,12 @@ ### Option: HostnameItem # Item used for
[OpenWrt-Devel] [PATCH]6rd: Clear correct IPv6 address bits in 6rdcalc
The correct bits are now cleared in the IPv6 address as the shift value to the correct byte in the IPv6 address was wrong. Depending on the stack values this could result in a hanging 6rdcalc program due to an endless loop. Signed-off-by: Hans Dedecker dedec...@gmail.com --- package/6rd/src/6rdcalc.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/package/6rd/src/6rdcalc.c b/package/6rd/src/6rdcalc.c index 56e07d2..87bc397 100644 --- a/package/6rd/src/6rdcalc.c +++ b/package/6rd/src/6rdcalc.c @@ -110,7 +110,7 @@ int main(int argc, const char **argv) /* Clear remaining bits. */ while (v6it 128) { - byte6 = (unsigned char *)(v6.s6_addr) + (v6it 2); + byte6 = (unsigned char *)(v6.s6_addr) + (v6it 3); bit6 = 128 (v6it 0x07); *byte6 = ~bit6; -- 1.7.1 ___ 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]netifd: Check routing table parameter when updating route
On 2013-11-14 17:13, Hans Dedecker wrote: The route table parameter needs to be checked in interface_update_proto_route; a route which has an identical nexthop but a different routing table needs to be deleted and added in the correct routing table. While dumping the route list via ubus; don't display the default route when no default route is enabled. Additonal make the ip4table and ip6table parameters visible when displaying the interface status. Signed-off-by: Hans Dedecker dedec...@gmail.com Please split your patches into smaller ones to separate unrelated changes. This will make review much easier. Thanks, - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [RFC] new target PLXTECH NAS782x (ox820, oxnas)
Hi! Based on the patches to Kernel 3.12 and U-Boot available on https://github.com/kref/ I botched-up an experimental OpenWrt oxnas target https://gitorious.org/openwrt-oxnas/openwrt-oxnas I got a MEDION NAS P89625 (MD 86517), apparently an OEM product based on the ZyXEL/MitraStar STG-212 design which is now fully working (even including LEDs, buttons and I2C). http://wiki.openwrt.org/toh/medion/md86587 Most of target/oxnas/patches-3.12 can be consolidated by having target/oxnas/files/ and only patch files outside of arch/arm/mach-oxnas -- however, as I want to keep this in sync with kref's kernel tree, I found it most convenient/transparent to just use git format-patch to generate the whole patchset and include it as-is in OpenWrt. Also some work has to be done to build the EHCI driver as a module and push whatever left platform code into DT. Another obscurity is that gpio-button-hotplug doesn't trigger any hotplug events while both buttons do work with input-gpio-keys-polled if I install that and remove gpio-button-hotplug. What's the status of gpio-button-hotplug? I also saw that only specific buttons are handled, i.e. the COPY button also present on kirkwood (keycode 0x85) will not work with gpio-button-hotplug, but the reset button should work. Is anyone else interested in having support for the NAS782x target in OpenWrt? How would you like things to be submitted to the mailinglist/patchwork? (- have a look at the gitorious repo I created) Cheers Daniel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] procd: Allow process respawning forever
Use respawn_retry==0 as indication to respawn a process forever. Signed-off-by: Helmut Schaa helmut.sc...@googlemail.com --- instance.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instance.c b/instance.c index 05b0f99..2db1ded 100644 --- a/instance.c +++ b/instance.c @@ -162,7 +162,7 @@ instance_exit(struct uloop_process *p, int ret) in-respawn_count++; else in-respawn_count = 0; - if (in-respawn_count in-respawn_retry) { + if (in-respawn_count in-respawn_retry in-respawn_retry 0 ) { LOG(Instance %s::%s s in a crash loop %d crashes, %ld seconds since last crash\n, in-srv-name, in-name, in-respawn_count, runtime); in-restart = in-respawn = 0; -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [RFC] uClibc: Deactivate oversized thread stack cache
* Sven Eckelmann s...@open-mesh.com [11.11.2013 11:41]: On Friday 08 November 2013 11:32:23 Weedy wrote: Do you have any benches or log dumps that show this fixed it for you? I am not really sure what you are expecting. I can not really show a log of the reset because the device just resets when the oom kicks in or the process is just killed (so it is really boring). And the log of a working system is also extreme boring. What do you want to see when nothing happens? maybe you can show something on the commandline bye forking and forking and show the mem-usage of the tasks? bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [Patch][packages][RFC] erlang: update and remove RIPEMD
Hi, i thought about the patch and as openssl now supports ripemd i will commit the patch from Králik Barnabás. Thanks, Peter On Fri, 15 Nov 2013 10:13:17 +0100 Dirk Neukirchen dirkneukirc...@web.de wrote: On 15.11.2013 03:16, Peter Wagner wrote: Hi Dirk, could you please resend the patch. i get: patching file Makefile patch: malformed patch at line 84: 2. As it seems you mail clients wraps the lines. If you can't disable wrapping just attach the patch as file. v2 resent with mail.wrap_long_lines;false now (Thunderbird) attached patchfile too This patch updates erlang to a more current 16B02 and hopefully removes RIPEMD160 support. It's only compile tested - don't know about erlang I used the commit that added ripemd to erlang as a guideline https://github.com/erlang/otp/commit/3881407ea8444c280d9659f40e6c169a1e10310d.patch add ripemd160 support to crypto add ripemd160 message digest support to the crypto app, includes some test cases. and reverted it accordingly i hope. notice: - docs are left untouched - tests are left untouched Signed-off-by: Dirk Neukirchen dirkneukirc...@web.de --- diff --git a/lang/erlang/Makefile b/lang/erlang/Makefile index ddba81c..96d336e 100644 --- a/lang/erlang/Makefile +++ b/lang/erlang/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2009-2012 OpenWrt.org +# Copyright (C) 2009-2013 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=erlang -PKG_VERSION:=R15B01 -PKG_RELEASE:=4 +PKG_VERSION:=R16B02 +PKG_RELEASE:=1 PKG_SOURCE:=otp_src_$(PKG_VERSION).tar.gz PKG_SOURCE_URL:= http://www.erlang.org/download/ \ http://erlang.mirror.su.se/ -PKG_MD5SUM:=f12d00f6e62b36ad027d6c0c08905fad +PKG_MD5SUM:=ca63bcde0e5ae0f2df9457f97b3115a4 PKG_BUILD_DEPENDS:=erlang/host openssl diff --git a/lang/erlang/patches/101-emulator_includes.patch b/lang/erlang/patches/101-emulator_includes.patch index 933c73e..8136e47 100644 --- a/lang/erlang/patches/101-emulator_includes.patch +++ b/lang/erlang/patches/101-emulator_includes.patch @@ -1,11 +1,14 @@ --- a/erts/emulator/Makefile.in +++ b/erts/emulator/Makefile.in -@@ -591,7 +591,7 @@ endif - - - $(OBJDIR)/%.o: beam/%.c --$(CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $ -o $@ -+$(CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $ -o $@ - +@@ -642,9 +642,9 @@ endif + + ifneq ($(filter tile-%,$(TARGET)),) + $(OBJDIR)/beam_emu.o: beam/beam_emu.c +-$(V_CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) \ ++$(V_CC) $(INCLUDES) \ + -OPT:Olimit=0 -WOPT:lpre=off:spre=off:epre=off \ +- $(INCLUDES) -c $ -o $@ ++ $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $ -o $@ else - + # Usually the same as the default rule, but certain platforms (e.g. win32) mix + # different compilers diff --git a/lang/erlang/patches/104-disable_ripemd.patch b/lang/erlang/patches/104-disable_ripemd.patch new file mode 100644 index 000..0995c01 --- /dev/null +++ b/lang/erlang/patches/104-disable_ripemd.patch @@ -0,0 +1,191 @@ +--- a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c +@@ -44,7 +44,6 @@ + #include openssl/md5.h + #include openssl/md4.h + #include openssl/sha.h +-#include openssl/ripemd.h + #include openssl/bn.h + #include openssl/objects.h + #include openssl/rc4.h +@@ -167,10 +166,6 @@ static ERL_NIF_TERM md5(ErlNifEnv* env, + static ERL_NIF_TERM md5_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); + static ERL_NIF_TERM md5_update(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); + static ERL_NIF_TERM md5_final(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +-static ERL_NIF_TERM ripemd160(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +-static ERL_NIF_TERM ripemd160_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +-static ERL_NIF_TERM ripemd160_update(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +-static ERL_NIF_TERM ripemd160_final(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); + static ERL_NIF_TERM sha(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); + static ERL_NIF_TERM sha_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); + static ERL_NIF_TERM sha_update(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]); +@@ -292,10 +287,6 @@ static ErlNifFunc nif_funcs[] = { + {md5_init, 0, md5_init}, + {md5_update, 2, md5_update}, + {md5_final, 1, md5_final}, +-{ripemd160, 1, ripemd160}, +-{ripemd160_init, 0, ripemd160_init}, +-{ripemd160_update, 2, ripemd160_update}, +-{ripemd160_final, 1, ripemd160_final}, + {sha, 1, sha}, + {sha_init, 0, sha_init}, + {sha_update, 2, sha_update}, +@@ -478,8 +469,6 @@ ERL_NIF_INIT(crypto,nif_funcs,load,NULL, + #define MD5_LEN_96
Re: [OpenWrt-Devel] [PATCH] [packages] erlang - allow compiling NIFs, allow rebar for libraries for Erlang + version bump
Thanks, applied in latest trunk. See: https://dev.openwrt.org/changeset/38817 /Peter On Tue, 5 Nov 2013 10:05:05 +0100 Králik Barnabás krali...@msn.com wrote: (Sorry for triple-posting) This fixes the Erlang package so that libraries for Erlang can easily be packaged for OpenWRT. This means: - static libraries and include files for compiling NIFs are copied in the build environment to usr/{lib,include} - crypto is enabled in host Erlang build so that rebar can be used without further patching Version is bumped and 101-emulator_includes.patch is modified so that R16B02 compiles correctly. Note that erlang-crypto is still broken as per https://dev.openwrt.org/ticket/12959; use patch in comments to this ticket. Signed-off-by: Barnabás Králik krali...@msn.com mailto:krali...@msn.com ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] (no subject)
Hi, I'm trying to get the second UART working on a WR841N v8. The AR9341 SoC does have a AR9330 and a 8250 style UART, which is normally the console. I'm facing some problems to get it working. Does anybody tried to get similar working ? AFAIK the only difference between the AR934x high speed Uart and the AR9330 Uart is the FIFO size (only 4 instead of 16 bytes) and the missing DMA capability, which isn't used. The existing AR9330-uart code in the kernel should provide all necessary routines. To debug the code I'm using it as module (please find attached code) with some light modifications providing the necessary mods. Here is the snpippet of the init code: #define AR71XX_APB_BASE 0x1800 #define AR71XX_UART_SIZE0x100 #define AR934X_UART1_BASE (AR71XX_APB_BASE + 0x0050) #define AR934X_UART1_FIFO_SIZE 4 static struct resource ar933x_uart_resources[] = { { .start = AR934X_UART1_BASE, .end= AR934X_UART1_BASE + AR71XX_UART_SIZE - 1, .flags = IORESOURCE_MEM, }, { .start = ATH79_MISC_IRQ(6), .end= ATH79_MISC_IRQ(6), .flags = IORESOURCE_IRQ, }, }; static struct platform_device ar933x_uart_device = { .name = DRIVER_NAME, .id = -1, .resource = ar933x_uart_resources, .num_resources = ARRAY_SIZE(ar933x_uart_resources), }; platform_device_register(ar933x_uart_device); Before loading the module, I see this: root@OpenWrt:~# find /sys/ -name ar9*art /sys/bus/platform/drivers/ar933x-uart root@OpenWrt:~# root@OpenWrt:~# show-gpio | head -4 JP2 pin 9 GPIO00 O - UART1_TD JP2 pin 3 GPIO01 I l GPIO JP2 pin 5 GPIO02 O h GPIO JP2 pin 7 GPIO03 I - UART1_RD root@OpenWrt:~# find /sys/ -name ar9*art /sys/bus/platform/drivers/ar933x-uart root@OpenWrt:~# ls -l /dev/ttyATH* ls: /dev/ttyATH*: No such file or directory root@OpenWrt:~# io -4 -l 0x14 0x1850 1850: 0266 0200 0282 18500010: Loading the module: root@OpenWrt:~# modprobe ar934x_uart root@OpenWrt:~# dmesg | tail -1 [ 1343.78] ar934x-uart: ttyATH0 at MMIO 0x1850 (irq = 14) is a AR933X UART root@OpenWrt:~# find /sys/ -name ar9*art /sys/bus/platform/devices/ar934x-uart /sys/bus/platform/drivers/ar933x-uart /sys/bus/platform/drivers/ar934x-uart /sys/bus/platform/drivers/ar934x-uart/ar934x-uart /sys/devices/platform/ar934x-uart /sys/module/ar934x_uart root@OpenWrt:~# io -4 -l 0x14 0x1850 1850: 0266 0200 0282 18500010: root@OpenWrt:~# ls -l /dev/ttyATH0 crw-rw-rw-1 root root 253, 0 Nov 15 20:43 /dev/ttyATH0 ttyATH0 was dynamicly generated. Reading the setup of ttyATH0 stty seems to setup the registers. root@OpenWrt:~# stty -a -F /dev/ttyATH0 speed 9600 baud;stty: /dev/ttyATH0 line = 0; intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = undef; eol2 = undef; swtch = undef; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0; -parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel -iutf8 opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke root@OpenWrt:~# io -4 -l 0x14 0x1850 1850: 0355 a008 004e0f88 0383 18500010: but a simple 'cat /dev/ttyATH0' doesn't show any data (there is a PIC MCU connected, which sends a 0x55 and 0x66 every second). A put a printk just before a the tty is fed: static void ar933x_uart_rx_chars(struct ar933x_uart_port *up) { ... if ((up-port.ignore_status_mask AR933X_DUMMY_STATUS_RD) == 0) printk(KERN_INFO %s send 0x%02X to tty\n, __func__, ch); tty_insert_flip_char(port, ch, TTY_NORMAL); which show some data coming: [ 2051.00] ar933x_uart_rx_chars send 0x55 to tty [ 2052.00] ar933x_uart_rx_chars send 0x66 to tty [ 2053.00] ar933x_uart_rx_chars send 0x55 to tty [ 2054.00] ar933x_uart_rx_chars send 0x66 to tty root@OpenWrt:~# cat /proc/interrupts CPU0 4: 0 MIPS eth0 5: 3724 MIPS eth1 7: 274415 MIPS timer 11: 62 MISC serial 14: 32 MISC 47: 0 dummy ath9k ERR: 0 but no output on 'cat /dev/ttyATH0'. The questions is : Why is there no data printed ? There seems to be something missing in the tty_port setup. Does anybody have a hint ? Regards Gerd ar934x_uart.c Description: Binary data ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ixp4xx: support for little endian build
On Sun, 03 Nov 2013 20:41:15 +0100 Imre Kaloz ka...@openwrt.org wrote: On Sat, 02 Nov 2013 20:38:19 +0100, Nathan Hintz nlhi...@hotmail.com wrote: Set ARCH=arm in target/linux/ixp4xx/Makefile snip There are virtually zero LE ixp4xx devices out there, and this config doesn't even support those, only ones where the secondary bootloader swaps endianness before booting the kernel. So, frankly, what's the real-world use of this additional subtarget? Imre ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel Hi Imre: The patches stopped a little short of creating an additional subtarget; but with the patches, it's possible to make a LE build with minor hand modifications to the target Makefile and kernel config. Making an additional official subtarget was not the goal. I've used this in the past for debugging purposes, and am currently using this to experiment with BitTorrent Sync (currently closed source, and not available for BE ARM) using an eglibc build. I don't own any of the other devices you speak of, so I can't address them. I don't believe the patches are harmful to the existing target; so I submitted them with the thought they might be useful to someone else. Thanks, -- Nathan ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel