[OpenWrt-Devel] Embedded Database

2013-04-04 Thread Pietro Paolini
Hello all,
I am looking for a open source database designed for embedded devices, I google 
the problem and I found different solutions :

1 - Embedded InnoDB
2 - Empress Embedded Database
3 - Firebird embedded

They are the more interesting, I found them from 
[http://en.wikipedia.org/wiki/Embedded_database], someone have some experience 
on that 
and has in mind a way or the right DB (which preferably supports triggers) ? 

Thanks in advance,
Pietro.


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Embedded Database

2013-04-04 Thread Bastian Bittorf
* Pietro Paolini pulsarpie...@aol.com [04.04.2013 10:03]:
 1 - Embedded InnoDB
 2 - Empress Embedded Database
 3 - Firebird embedded
 
 They are the more interesting, I found them from 
 [http://en.wikipedia.org/wiki/Embedded_database], someone have some 
 experience on that 
 and has in mind a way or the right DB (which preferably supports triggers) ? 

whats wrong with sqlite3?

bye, bastian
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Embedded Database

2013-04-04 Thread Emmanuel Deloget
Le 04/04/2013 08:52, Pietro Paolini a écrit :
 Hello all,
 I am looking for a open source database designed for embedded devices, I 
 google the problem and I found different solutions :

 1 - Embedded InnoDB
 2 - Empress Embedded Database
 3 - Firebird embedded

 They are the more interesting, I found them from 
 [http://en.wikipedia.org/wiki/Embedded_database], someone have some 
 experience on that 
 and has in mind a way or the right DB (which preferably supports triggers) ? 

I've used SQLite for years. It's small (written in C, not C++, so you don't 
even depend on a libstdc++ - even a tiny one), fast, exists as a library, is 
ACID-compliant, supports triggers and so on. It's C interface is both simple 
and powerfull.


 Thanks in advance,
 Pietro.


Best regards,

-- Emmanuel Deloget
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Embedded Database

2013-04-04 Thread shazz
Usually, with embedded DB, it is a question of storage (i.e. you're storing
data on flash memory or disk)


On Thu, Apr 4, 2013 at 10:29 AM, Emmanuel Deloget 
emmanuel.delo...@efixo.com wrote:

 Le 04/04/2013 08:52, Pietro Paolini a écrit :
  Hello all,
  I am looking for a open source database designed for embedded devices, I
 google the problem and I found different solutions :
 
  1 - Embedded InnoDB
  2 - Empress Embedded Database
  3 - Firebird embedded
 
  They are the more interesting, I found them from [
 http://en.wikipedia.org/wiki/Embedded_database], someone have some
 experience on that
  and has in mind a way or the right DB (which preferably supports
 triggers) ?

 I've used SQLite for years. It's small (written in C, not C++, so you
 don't even depend on a libstdc++ - even a tiny one), fast, exists as a
 library, is ACID-compliant, supports triggers and so on. It's C interface
 is both simple and powerfull.


  Thanks in advance,
  Pietro.
 

 Best regards,

 -- Emmanuel Deloget
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/mailman/listinfo/openwrt-devel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] [packages] block-mount: make nfs entries in generated fstab

2013-04-04 Thread Martin Leopold
Hi,
Any comments on this patch? Is the solution acceptable, or would you prefer
a different solution to the problem?

Br,
Martin


2013/3/24 Martin Leopold martin.leop...@gmail.com

 Hi.
 Attached is a proposed solution to bug #10906: nfs filesystem entries do
 not propagate from /etc/config/fstab to /etc/fstab making it difficult
 or impossible to permanently add NFS file systems.

 For lack of imagination the patch only copies the proposed solution by
 the reporter of the bug. This issue could be handled in many other (and
 more general ways), so if an other solution is desired please let me
 know.

 This is my first patch to OpenWRT, so please bare with me if I'm not
 following etiquette here. I've tried to follow the patch submission
 schema as well as I could, but if I've fallen short - just let me know.

 Cheers,
 Martin

 --
 Martin Leopold
 http://www.leopold.dk/~martin
 +45 2836 1438


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Embedded Database

2013-04-04 Thread Roman Yeryomin
 On Thu, Apr 4, 2013 at 10:29 AM, Emmanuel Deloget
 emmanuel.delo...@efixo.com wrote:

 Le 04/04/2013 08:52, Pietro Paolini a écrit :
  Hello all,
  I am looking for a open source database designed for embedded devices, I
  google the problem and I found different solutions :
 
 On 4 April 2013 11:34, shazz openwrt-de...@metaverse.fr wrote:
 Usually, with embedded DB, it is a question of storage (i.e. you're storing
 data on flash memory or disk)


We are using sqlite and pretty happy with it. Although it might
require some tuning for your application speed (journaling) and space
wise (you might want to limit row count).
But question I would like to ask is: are there any good alternatives to sqlite?

Regards,
Roman
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] Add support for PMC PM25LQ032 SPI Flash in m25p80.c

2013-04-04 Thread Michel Stempin


Le 27/02/2013 13:46, Jonas Gorski a écrit :
 On 27 February 2013 13:25, Florian Fainelli flor...@openwrt.org wrote:
 Hello,


 On 01/31/2013 11:25 AM, Michel Stempin wrote:

 Hi John,

 Le 31/01/2013 09:07, John Crispin a écrit :

 Hi,

 please also send this patch upstream to the mtd list


 Ok, but I can't find any upstream patch for the surrounding PMC devices
 (pm25lv512 and pm25lv010) commited by jogo in revision 29986 (originally
 introduced by nbd in

 trunk/target/linux/generic/patches-2.6.39/084-mtd_m25p80_add_pm25lv_flash_support.patch
 revision 26615).

 How do you want to proceed?


 Send these PMC IDs as well with your Signed-off-by and Jonas's Signed-off-by
 tag as well.
 
 The patch is not from me, but from Gabor, added in r11894 (see
 https://dev.openwrt.org/changeset/11894/).
 
 
 Jonas

I had to integrate the original patch from Gabor, added in r11894 as described 
above, but also another one from Gabor too, added in r22861 (see 
https://dev.openwrt.org/changeset/22861/) to fix erase operation on the 
pm25lv flash chips, as in these chips, PMC is using a vendor-specific sector 
erase command.

Although it has been verified on many devices it wasn't the same case for the 
newer pm25lq032 chip, it was not until yesterday that I was able to find the 
corresponding device datasheet (http://www.issi.com/pdf/Pm25LQ032C.pdf) to 
confirm that the standard sector erase command was supported indeed. Actually, 
both the standard (20h) and the proprietary (D7h) sector erase commands are 
supported, see datasheet page 12.

This datasheet wasn't easy to find, since PMC has been renamed to Chingis 
Technology Corporation after a trademark dispute with PMC-Sierra 
(http://www.chingistek.com/tw/news_02.asp?seq=6), then acquired by ISSI 
(http://phx.corporate-ir.net/phoenix.zhtml?c=68026p=irol-newsArticleID=1716323).

The patch has been sent upstream to the mtd list with my Signed-off-by and 
Gabor's Signed-off-by tag as well:

http://lists.infradead.org/pipermail/linux-mtd/2013-April/046410.html

In the meantime, can someone apply the one-line patch to add support for the 
pm25lq032 to trunk in the different kernel versions, since it is commonly used 
as the default SPI Flash device in the small 3G RT5350F-based routers like 
the Hame MPR-A1, Poray M3, etc.?

- Michel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Can I help integrating port mirroring patches?

2013-04-04 Thread Luka Perkov
Hi Colin,

On Tue, Apr 02, 2013 at 09:35:19PM +0200, Colin Leitner wrote:
 I'm interested in adding port mirroring support to OpenWRT, which allows to
 reuse a switch port to sniff on another port. This is a great debugging
 tool and is supported by most managed switches (e.g. [4]).
 
 The two patches for the rtl8366rb [1] and ar8216 [2] drivers haven't drawn
 much (any?) attention and I wanted to know if I can help integrating them.

Don't be discouraged I think this is a nice feature. We didn't have time for
testing yet.
 
 I dove through a couple of product briefs and datasheets and with the present
 set of switch drivers it should be possible to add port mirroring to the
 majority of drivers (datasheets are a must however):
 
  *  adm6996 - not supported

Why? Software or hardware?

  *  ar8216

I think I have a board with this switch (arv7518pw) and I'll do my best to test
it next week.

Luka
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] [packages] bird bump to 1.3.9

2013-04-04 Thread Daniel Petre
Hello,
this is bird version bump to 1.3.9 !

Signed-off-by: Daniel Petre d...@ip6.ro

Index: feeds/packages/net/bird/Makefile
===
--- feeds/packages/net/bird/Makefile(revision 36193)
+++ feeds/packages/net/bird/Makefile(working copy)
@@ -7,12 +7,12 @@
 include $(TOPDIR)/rules.mk

 PKG_NAME:=bird
-PKG_VERSION:=1.3.7
+PKG_VERSION:=1.3.9
 PKG_RELEASE:=1

 PKG_SOURCE:=bird-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=ftp://bird.network.cz/pub/bird
-PKG_MD5SUM:=c400b008ef834d9e7288dcdbe41b7c15
+PKG_MD5SUM:=86042560b5053dd008ba0b5ecbdde136
 PKG_BUILD_DEPENDS:=libncurses libreadline

 include $(INCLUDE_DIR)/package.mk
Index: feeds/packages/net/bird/patches/0001-change_config_name.patch
===
--- feeds/packages/net/bird/patches/0001-change_config_name.patch
(revision 36193)
+++ feeds/packages/net/bird/patches/0001-change_config_name.patch
(working copy)
@@ -1,20 +0,0 @@
-diff --git a/sysdep/config.h b/sysdep/config.h
-index 03399bd..bc5eb77 100644
 a/sysdep/config.h
-+++ b/sysdep/config.h
-@@ -46,11 +46,11 @@ typedef u16 word;
- #  endif
- #else
- #  ifdef DEBUGGING
--#define PATH_CONFIG bird.conf
--#define PATH_CONTROL_SOCKET bird.ctl
-+#define PATH_CONFIG bird4.conf
-+#define PATH_CONTROL_SOCKET bird4.ctl
- #  else
--#define PATH_CONFIG PATH_CONFIG_DIR /bird.conf
--#define PATH_CONTROL_SOCKET PATH_CONTROL_SOCKET_DIR /bird.ctl
-+#define PATH_CONFIG PATH_CONFIG_DIR /bird4.conf
-+#define PATH_CONTROL_SOCKET PATH_CONTROL_SOCKET_DIR /bird4.ctl
- #  endif
- #endif
-

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Option GlobeSurfer II 7.2 NVRAM contents

2013-04-04 Thread anarchy99
can you please give more details which build and/or patches you used as well
as flashing procedure? i have globesurfer 3 with BCM5354 that i intended to
flash but after other member reported he messed the CFE while trying to
flash it, i gave up

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] [packages] bird bump to 1.3.9

2013-04-04 Thread Daniel Petre
Hello,
this is bird version bump to 1.3.9 while getting rid
of the previous path patch and just correcting init files.

Signed-off-by: Daniel Petre d...@ip6.ro

Index: feeds/packages/net/bird/Makefile
===
--- feeds/packages/net/bird/Makefile(revision 36194)
+++ feeds/packages/net/bird/Makefile(working copy)
@@ -7,12 +7,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bird
-PKG_VERSION:=1.3.7
+PKG_VERSION:=1.3.9
 PKG_RELEASE:=1
 
 PKG_SOURCE:=bird-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=ftp://bird.network.cz/pub/bird
-PKG_MD5SUM:=c400b008ef834d9e7288dcdbe41b7c15
+PKG_MD5SUM:=86042560b5053dd008ba0b5ecbdde136
 PKG_BUILD_DEPENDS:=libncurses libreadline
 
 include $(INCLUDE_DIR)/package.mk
Index: feeds/packages/net/bird/files/bird4.init
===
--- feeds/packages/net/bird/files/bird4.init(revision 36194)
+++ feeds/packages/net/bird/files/bird4.init(working copy)
@@ -7,7 +7,7 @@
 SERVICE_WRITE_PID=1
 
 start() {
-   service_start /usr/sbin/bird4 -d
+   service_start /usr/sbin/bird4 -d -c /etc/bird4.conf
 #  ( SERVICE_MATCH_NAME=1 service_start /usr/sbin/bird4loop )
 }
 
Index: feeds/packages/net/bird/files/bird4.conf
===
--- feeds/packages/net/bird/files/bird4.conf(revision 36194)
+++ feeds/packages/net/bird/files/bird4.conf(working copy)
@@ -8,7 +8,7 @@
 log syslog all;
 
 # Override router ID
-#router id 192.168.0.1;
+router id 192.168.1.1;
 
 # Turn on global debugging of all protocols
 #debug protocols all;
Index: feeds/packages/net/bird/files/bird6.init
===
--- feeds/packages/net/bird/files/bird6.init(revision 36194)
+++ feeds/packages/net/bird/files/bird6.init(working copy)
@@ -7,7 +7,7 @@
 SERVICE_WRITE_PID=1
 
 start() {
-   service_start /usr/sbin/bird6 -d
+   service_start /usr/sbin/bird6 -d -c /etc/bird6.conf
 #  ( SERVICE_MATCH_NAME=1 service_start /usr/sbin/bird6loop )
 }
 
Index: feeds/packages/net/bird/files/bird6.conf
===
--- feeds/packages/net/bird/files/bird6.conf(revision 36194)
+++ feeds/packages/net/bird/files/bird6.conf(working copy)
@@ -8,7 +8,7 @@
 log syslog all;
 
 # Override router ID
-#router id 192.168.0.1;
+router id 1.1.168.192;
 
 # Turn on global debugging of all protocols
 #debug protocols all;
Index: feeds/packages/net/bird/patches/0001-change_config_name.patch
===
--- feeds/packages/net/bird/patches/0001-change_config_name.patch   
(revision 36194)
+++ feeds/packages/net/bird/patches/0001-change_config_name.patch   
(working copy)
@@ -1,20 +0,0 @@
-diff --git a/sysdep/config.h b/sysdep/config.h
-index 03399bd..bc5eb77 100644
 a/sysdep/config.h
-+++ b/sysdep/config.h
-@@ -46,11 +46,11 @@ typedef u16 word;
- #  endif
- #else
- #  ifdef DEBUGGING
--#define PATH_CONFIG bird.conf
--#define PATH_CONTROL_SOCKET bird.ctl
-+#define PATH_CONFIG bird4.conf
-+#define PATH_CONTROL_SOCKET bird4.ctl
- #  else
--#define PATH_CONFIG PATH_CONFIG_DIR /bird.conf
--#define PATH_CONTROL_SOCKET PATH_CONTROL_SOCKET_DIR /bird.ctl
-+#define PATH_CONFIG PATH_CONFIG_DIR /bird4.conf
-+#define PATH_CONTROL_SOCKET PATH_CONTROL_SOCKET_DIR /bird4.ctl
- #  endif
- #endif
- 

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Can I help integrating port mirroring patches?

2013-04-04 Thread Colin Leitner
Hi Luka,

  The two patches for the rtl8366rb [1] and ar8216 [2] drivers haven't drawn
  much (any?) attention and I wanted to know if I can help integrating them.
 
 Don't be discouraged I think this is a nice feature. We didn't have time for
 testing yet.

I fully understand and just poked the mailing list as the patch
submission guide suggested :).
 
  I dove through a couple of product briefs and datasheets and with the 
  present
  set of switch drivers it should be possible to add port mirroring to the
  majority of drivers (datasheets are a must however):
  
   *  adm6996 - not supported
 
 Why? Software or hardware?

The datasheet doesn't mention mirror or monitor. It's a hardware
limitation.

 
   *  ar8216
 
 I think I have a board with this switch (arv7518pw) and I'll do my best to 
 test
 it next week.

The current patch will only work on the AR8327 switch (which is
supported by the ar8216 driver). I'll browse for a datasheet (or contact
Qualcomm, no idea if they're willing to help) and try to add support for
the AR8216 too (although I couldn't find any relevant documentation to
this chip yet).

Colin


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Thought-experiment: big-TLB MIPS global shared segment

2013-04-04 Thread Jay Carlson
I don't know whether this is worth it. I would need to spend a lot more time 
with the simulator and oprofile. But once I had the idea I had to write it 
down. And if somebody decides to build a non-PIC ABI, this is definitely worth 
it.

I mentioned before I'm wondering about the tiny number of TLB entries on the 
low-end MIPS-based routers. Otherwise-decent ath71xx routers like the DIR-825 
have 16 JTLB entries to cover 64M of RAM. The DIR-601-A1 has 32M, and it's 
selling for $13[1] refurbished on newegg.com right now.

The 3.3.8 kernel on these devices seems to see ~47 cycles of latency per TLB 
miss.[2].) These devices have 64k icache/32k dcache; cache misses are ~42 
cycles. Because of how jumpy PIC is, I think we can start missing TLB before 
missing the cache

One no-code solution is to turn on 16kB pages. Unlike 64kB pages, 16k at least 
boots on qemu, Looking at a /proc/self/maps for a shell, the number of TLB 
entries to cover the whole process would go from 167 pairs to 54.[2] The reason 
it's not 4:1 is granularity; there are costs to separating libc.so from libm, 
libgcc_s, and libcrypt. Which reminds me: it might be worth it to do some 
really cheap profiling to let gcc separate hot from cold functions.

Just about every process has libc and libgcc_s mapped, and many will have libm. 
Busybox is a good proportion of workload too. Counting the pure read-only pages 
I see 127 page pairs out of that 167 (or 36 out of 54) which could be mapped by 
a single large TLB entry.

There's existing infrastructure in the Linux kernel for manually mapping huge 
pages. Unfortunately on MIPS it's only working on 64-bit kernels. But it's easy 
to take a power-of-two aligned chunk of physmem and just slam it into every 
process's address space at some aligned virtual address. That's just adding a 
WIRED TLB entry with the Global bit set, and marking that range as not 
available to mmap.

This does not necessarily interfere with the basic shared library scheme. ELF 
PIC code does need per-process initialized data, and data including the GOT 
needs to be at a fixed distance from the code segment. But nothing says they 
have to be adjacent, just reachable via PC-relative addressing. A linker append 
script[5] can just push the data segment 2M away. The address space would look 
like:

++
main program
heap
...
normal shared libraries

=== fixed global readonly segment ===
libc.text
...
libm.text
...
libbusybox.text
=== end global readonly segment ===
...
libc.data = libc.text + 2M
...
libm.data = libm.text + 2M
...
libbusybox.data = libbusybox.text + 2M

stack
++

The primary change required would be to teach ld.so about the global segment 
and the objects present in it. When ld.so would start to load /lib/libc.so, it 
would notice the hard read-only libc.text segment was already present at 
address x, skip mapping libc.text but keep x as the vma offset for the rest of 
/lib/libc.so's segments, which would be mmapped per process as usual.

Note that a squashfs containing libraries with these 2M gaps should function as 
normal if the normal ld.so is used. (Well, the libraries will eat up 2M more 
virtual address space each, but it's just PROT_NONE mappings.) The global 
segment can be positioned randomly on boot, subject to alignment constraints, 
and the position of individual text segments can be shuffled. Although you keep 
per-boot ASLR, you do lose per-process ASLR.

The segment is read-only; how would you get anything in there? My guess is that 
the global segment could be read/write until ld.so launches the real init. 
The /lib filesystem is available, and if the global segment was read-write at 
that point, ld.so could position the text segments normally, although it'd have 
to memcpy instead of mmap them into place.

OK, I'm done. Need to get back to Real Work

Jay

[1]: Well, the DIR-601 is $13 plus a heatsink. I think they have some serious 
overheating issues--which would explain why there are so many refurbished ones. 
I had one in my basement, and when the weather turned cold it stopped locking 
up. Or maybe it was some 12.09 fix

[2]: There are non-architected 4-entry micro-ITLB and DTLBs; they eat a cycle 
on misses present in the JTLB. 

[3]: For mips16 busybox it's 153-148 pairs, or 54-48 pairs. 

[4]: And for mips16 busybox there are 108 read-only pairs, or 30 pairs with 16k 
pages.

[5]: gcc -shared -T offset.ld, were offset.ld is:

SECTIONS
{
   . = . + 0x0020;
   .fakedata : { *(.fakedata) }
}
INSERT AFTER .exception_ranges;

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel