Re: [OpenWrt-Devel] Fwd: [PATCH][include] Update CyaSSL library to last version 2.6.0

2013-05-25 Thread Massimo Vellucci
Hi,
  after several tests with also other people of the ML I found a stable
version of the patch to use version 2.6 of the library CyaSSL.
With CyaSSL was able to recompile curl without requiring the OpenSSL library
. The size of CyaSSL library is 300K compared to OpenSSL
library that is 1500K there is much more space for build custom rom.

The diff of the Makefile is as attached into email and must be remove the
folder patches.
If the update of CyaSSL can be integrated into the trunk version of OpenWRT I
can work to the Makefile to curl allows you to choose OpenSSL or
CyaSSLcrypto library.


diff -ur a/cyassl/Makefile b/cyassl/Makefile
--- a/cyassl/Makefile   2013-05-25 19:18:22.0 +0200
+++ b/cyassl/Makefile   2013-05-25 17:34:24.0 +0200
@@ -8,16 +8,14 @@
 include $(TOPDIR)/rules.mk

 PKG_NAME:=cyassl
-PKG_VERSION:=1.6.5
-PKG_RELEASE:=2
+PKG_VERSION:=2.6.0
+PKG_RELEASE:=1

 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
 PKG_SOURCE_URL:=http://www.yassl.com/
-PKG_MD5SUM:=98c2c6350acf1d089756a1de9ccb9903
+PKG_MD5SUM:=9c48fd4ab677c11b4612fb4eb15444d9

-PKG_FIXUP:=patch-libtool
 PKG_INSTALL:=1
-PKG_BUILD_PARALLEL:=1

 include $(INCLUDE_DIR)/package.mk

@@ -37,8 +35,15 @@
 TARGET_CFLAGS += $(FPIC)

 CONFIGURE_ARGS += \
-   --without-zlib \
-   --enable-singleThreaded
+   --enable-dtls \
+   --enable-static \
+   --enable-opensslextra \
+   --enable-singlethreaded \
+   --disable-examples
+
+ifeq ($(CONFIG_TARGET_x86),y)
+  CONFIGURE_ARGS += --without-pic
+endif

 define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include


Waiting for your opinions, bye
Massimo




2013/5/23 Massimo Vellucci vema...@gmail.com

 Hi,
 sorry for the delay, I found the problem about the curl library. There
 is a bug in configure.ac file of curl package.
 You have to add the file 100-sizeof_long_long.patch in the 
 pathtrunk/feeds/packages/libs/curl/patches

 diff -u a/configure.ac b/configure.ac
 --- a/configure.ac  2013-02-06 10:47:19.0 +0100
 +++ b/configure.ac  2013-05-23 22:00:59.233980076 +0200
 @@ -2928,6 +2928,7 @@

  AC_CHECK_SIZEOF(size_t)
  AC_CHECK_SIZEOF(long)
 +AC_CHECK_SIZEOF(long long)
  AC_CHECK_SIZEOF(int)
  AC_CHECK_SIZEOF(short)
  CURL_CONFIGURE_LONG


 Curl did not determine the size of the type long long that is a value
 necessary to CyaSSL.


 My libs/curl/Makefile

 --- libs/curl/Makefile
 +++ libs/curl/Makefile

 @@ -43,7 +43,7 @@
$(call Package/curl/Default)
SECTION:=libs
CATEGORY:=Libraries
 -  DEPENDS:=+libopenssl +zlib
 +  DEPENDS:=+libcyassl +zlib
TITLE:=A client-side URL transfer library
  endef

 @@ -70,7 +70,8 @@
  --enable-tftp \
  --disable-verbose \
  --with-random=/dev/urandom \
 ---with-ssl=$(STAGING_DIR)/usr \
 +--with-cyassl=$(STAGING_DIR)/usr \
 +--without-ssl
  --without-ca-bundle \
  --without-gnutls \
  --without-krb4 \
 @@ -81,7 +82,7 @@
  $(call autoconf_bool,CONFIG_IPV6,ipv6) \

  CONFIGURE_VARS += \
 -LIBS=-lcrypto -lssl -lz \
 +LIBS=-lcyassl -lz \
  CC=$(filter-out ccache,$(TARGET_CC))


 With these settings I was able to compile curl for atheros 71xx


 Bye
 Massimo




 2013/5/21 Massimo Vellucci vema...@gmail.com

 I'm sorry but these days I have been very busy with work. I have not
 found the time to do the tests.
 I would like to remove OpenSSL from my application that I am developing and
 using CyaSSL.
 The problem of porting applications from OpenSSL to CyaSSL is requires a
 lot of work. The two libraries are not compatible 100%


 2013/5/21 Ben West b...@gowasabi.net

 For an update, I have since been able to get libcurl to link to the new
 cyassl package, provided I explicitly insert sizeof_long definitions into
 libcurl header files, shown in the patch below.  It is unusual that libcurl
 seems to require these additional defines to link to libcyassl.so, but
 uhttpd-mod-tls does not.

 I'm not sure if this patch resides properly with the package curl,
 perhaps accompanied by another patch that defines a new sub-package
 libcurl-cyassl.

 Massimo, are you using the newer version of cyassl for anything besides
 uhttpd?

 --- curl-7.29.0/include/curl/curl.h.201305182013-05-17
 23:25:23.816083944 -0500
 +++ curl-7.29.0/include/curl/curl.h2013-05-17 23:30:43.304082086
 -0500
 @@ -118,6 +118,13 @@ typedef void CURL;
  #endif
  #endif

 +/* These definitions needed for cyassl */
 +/* The size of `long', as computed by sizeof. */
 +#define SIZEOF_LONG 4
 +
 +/* The size of `long long', as computed by sizeof. */
 +#define SIZEOF_LONG_LONG 8
 +
  #ifndef curl_socket_typedef
  /* socket typedef */
  #if defined(WIN32)  !defined(__LWIP_OPT_H__)



 On Fri, May 17, 2013 at 12:00 PM, Ben West b...@gowasabi.net wrote:

 Thank you for responding.  Below is the diff of the curl Makefile,
 against that included in the Attitude Adjustment v12.09 packages 
 herehttps://dev.openwrt.org/browser/branches/packages_12.09/libs/curl/Makefile
 .

 Note that 

[OpenWrt-Devel] How to enable AP in attitude_adjustment for Tplink WR703n

2013-05-25 Thread jinzhcheng
 Dear All
I checkout r36652 version of attitude_adjustment branch, and build to generate 
openwrt-ar71xx-generic-tl-wr703n-v1-squashfs-factory.bin,
but after download to board, I cant find wlan0 device for AP:

root@OpenWrt:/# ifconfig
br-lanLink encap:Ethernet  HWaddr 84:5D:D7:00:31:88
  inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  RX packets:1 errors:0 dropped:0 overruns:0 frame:0
  TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:0
  RX bytes:334 (334.0 B)  TX bytes:402 (402.0 B)

eth0  Link encap:Ethernet  HWaddr 84:5D:D7:00:31:88
  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  RX packets:1 errors:0 dropped:0 overruns:0 frame:0
  TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:1000
  RX bytes:348 (348.0 B)  TX bytes:402 (402.0 B)
  Interrupt:4

loLink encap:Local Loopback
  inet addr:127.0.0.1  Mask:255.0.0.0
  UP LOOPBACK RUNNING  MTU:16436  Metric:1
  RX packets:96 errors:0 dropped:0 overruns:0 frame:0
  TX packets:96 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:0
  RX bytes:6528 (6.3 KiB)  TX bytes:6528 (6.3 KiB)

I am new hand to openwrt, would you please give me any suggestion? Thank you 
very much!
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel