Re: [OpenWrt-Devel] PostInst delayed to real system

2011-08-10 Thread Lukas Macura

Hi Ithamar,

no, our problem is not uci-defaults. I will try to give some real 
examples, because 1 example is better than 1000 words ;)


- You want to install some sql server into image. And you want to 
preinit its database by some default data. You cannot do this during 
image creation. You need to do it later.


- You want to overwrite configs of asterisk18 package. But not 
/etc/config/asterisk , which belongs to uci, but /etc/asterisk because 
your config system will use another mappings to db. Yes, maybe it does 
not look clean but believe me it can be needed if you are making bigger 
package with another (higher) config possibility.


- You want to create sqlite database and put some defaults there. Again, 
during image creation, you have some /var, but it is not /var of real 
system. You need to postpone this creation and do it after real /var is 
mounted. And I am not speaking about binary compatibility if you would 
want to create it on host system..


So, I really do not want to SPAM on this conference, but my question is:

- Should OpenWrt take care of this scenarios? Or it is package specific 
and every package which needs things like this should do it by itself?


There are four scenarios and we want to choose best one:

- implement it in  application by its way
- implement some delayed postinst in opkg (sounds like bigger hack)
- implement using hook to firstboot() (but in that case, it will not 
work as module)
- create some /lib/postinst.sh with functions like was_run() , 
var_mounted(), ... and postinst scripts can use this like this:


#!/bin/sh

[ -f /lib/postinst.sh ] {
. /lib/postinst.sh
  if var_mounted; then
if ! was_run packagename; then
  do_something_usefull
fi
  fi
}

And init script whic

Thank you,
Lukas

Dne 9.8.2011 03:44, Ithamar R. Adema napsal(a):

On Mon, 2011-08-08 at 20:50 +0200, Lukas Macura wrote:

I know this is little bit more complicated, but maybe it could be used
by more packages to do something useful only one time and only in real
device (like copying some files in right place or analysing target
system to modify them). What are you thinking about this?

Sounds like /etc/uci-defaults to me ;-)

Ithamar.


___
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 v2 1/1] kmod-input-xxx: missing dependency on kmod-input-core

2011-08-10 Thread Philip Prindeville
On 8/10/11 12:16 AM, Hauke Mehrtens wrote:
> On 08/06/2011 11:31 PM, Philip Prindeville wrote:
>> On 8/6/11 10:09 AM, Hauke Mehrtens wrote:
>>> On 07/28/2011 03:31 AM, Philip Prindeville wrote:
 Modules like input-gpio-keys rely on input-core, but that's not currently 
 expressed.

 Signed-off-by: Philip Prindeville 

>>> This patch is wrong.
>>>
>>> x86 has input-core compiled into the kernel and for all other targets
>>> there is already a dependency on kmod-input-core in AddDepends/input.
>>> This patch is not needed at all.
>>>
>>> Hauke
>> It does?
>>
>>
>> philipp@builder ~/openwrt2]$ grep CONFIG_INPUT 
>> target/linux/x86/config-default
>> # CONFIG_INPUT is not set
>> [philipp@builder ~/openwrt2]$ egrep '\' 
>> build_dir/linux-x86_alix2/linux-2.6.39.3/.config
>> # CONFIG_INPUT is not set
>> [philipp@builder ~/openwrt2]$
> Hi,
>
> for the generic and the kvm_guest profile CONFIG_INPUT=y is set and for
> all other x86 profiles CONFIG_INPUT is not set. The code in
> package/kernel/modules/001-depends.mk is wrong. I have not noticed that
> because I am only testing the x86 generic image.
> Could you please try the attached patch. It should disable kmod-input
> just for the generic and kvm_gest profile and activate it for all other
> x86 profiles.
>
> Hauke

Doesn't seem to be working.

I'm building kmod-input-gpio-buttons but that doesn't in turn include 
kmod-input-core.

-Philip

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


Re: [OpenWrt-Devel] New package: fwknopd

2011-08-10 Thread Jonathan Bennett
On Aug 10, 2011 6:59 PM, "Stephen Walker"  wrote:
>
> Is there a reason for the client being disabled?

The main reason is to save space. I have no problem adding it as a second
package. As they result in seperate binaries, it would make more sense to
roll them as separate packages, IMHO. I don't expect the client to be of
much use in an embedded/router setting, but if there is interest, I can
package the client as well.

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


Re: [OpenWrt-Devel] Problems booting ( need help to debug preinit )

2011-08-10 Thread Pawel Pastuszak
Ok found my problem it turns out that ld.so.1 symbolic link is missing from
libc package if it's an external toolchain, here is make patch to solve this
problem.


Index: package/base-files/Makefile
===
--- package/base-files/Makefile(revision 27949)
+++ package/base-files/Makefile(working copy)
@@ -188,7 +188,7 @@
 string
 prompt "libc shared library files (use wildcards)"
 depends EXTERNAL_TOOLCHAIN && PACKAGE_libc
-default "./lib/ld{-*.so,-linux*.so.*}
./lib/lib{anl,c,cidn,crypt,dl,m,nsl,nss_dns,nss_files,resolv,util}{-*.so,.so.*}"
+default "./lib/ld{-*.so,-linux*.so.*,.so.*}
./lib/lib{anl,c,cidn,crypt,dl,m,nsl,nss_dns,nss_files,resolv,util}{-*.so,.so.*}"

 endmenu
 endef



On Wed, Aug 10, 2011 at 4:44 PM, Pawel Pastuszak
wrote:

> Hi all,
>
> I having some problem booting the system after using external tool chain
> which i generated but the time i used to generate the toolchain that image
> works fine.
>
> Here is what i get..
> [2.801721] RAMDISK: gzip image found at block 0
> [3.527982] EXT4-fs (ram0): mounted filesystem without journal. Opts:
> (null)
> [3.535118] VFS: Mounted root (ext4 filesystem) on device 1:0.
> [3.541360] devtmpfs: mounted
> [3.57] Freeing unused kernel memory: 148k init
> [3.550767] Failed to execute /etc/preinit.  Attempting defaults...
> [3.557341] Kernel panic - not syncing: No init found.  Try passing
> init= option to kernel. See Linux Documentation/init.txt for guidance.
> [3.569865] Call Trace:
> [3.572337] [cf435f40] [c00060c0] 0xc00060c0 (unreliable)
> [3.577782] [cf435f80] [c02d2e04] 0xc02d2e04
> [3.582096] [cf435fd0] [c00014e0] 0xc00014e0
> [3.586402] [cf435fe0] [c035185c] 0xc035185c
> [3.590707] [cf435ff0] [c000a8a4] 0xc000a8a4
> [3.595082] Rebooting in 1 seconds..
>
> So my question is since it pointing to preinit what is the best way to
> debug this?
>
> Now i using Revision: 27944 of the trunk. and it based on glibc.
>
> Pawel
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Problems booting ( need help to debug preinit )

2011-08-10 Thread Pawel Pastuszak
Hi all,

I having some problem booting the system after using external tool chain
which i generated but the time i used to generate the toolchain that image
works fine.

Here is what i get..
[2.801721] RAMDISK: gzip image found at block 0
[3.527982] EXT4-fs (ram0): mounted filesystem without journal. Opts:
(null)
[3.535118] VFS: Mounted root (ext4 filesystem) on device 1:0.
[3.541360] devtmpfs: mounted
[3.57] Freeing unused kernel memory: 148k init
[3.550767] Failed to execute /etc/preinit.  Attempting defaults...
[3.557341] Kernel panic - not syncing: No init found.  Try passing init=
option to kernel. See Linux Documentation/init.txt for guidance.
[3.569865] Call Trace:
[3.572337] [cf435f40] [c00060c0] 0xc00060c0 (unreliable)
[3.577782] [cf435f80] [c02d2e04] 0xc02d2e04
[3.582096] [cf435fd0] [c00014e0] 0xc00014e0
[3.586402] [cf435fe0] [c035185c] 0xc035185c
[3.590707] [cf435ff0] [c000a8a4] 0xc000a8a4
[3.595082] Rebooting in 1 seconds..

So my question is since it pointing to preinit what is the best way to debug
this?

Now i using Revision: 27944 of the trunk. and it based on glibc.

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


Re: [OpenWrt-Devel] [Fwknop-discuss] fwknop in openwrt

2011-08-10 Thread Jonathan Bennett
Not sure why, but it's taking the openwrt folks a while to pull fwknop
into trunk. Until that happens, if any of you want to play around with
the binaries, let me know what target you're running on, and I'll be
happy to send you the .ipk file.

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


[OpenWrt-Devel] [PATCH] add LM95241 kernel module

2011-08-10 Thread Daniel Golle
This allows building the module for the national lm95241 i2c temperature sensor.

Signed-off-by: Daniel Golle 

Index: package/kernel/modules/hwmon.mk
===
--- package/kernel/modules/hwmon.mk (revision 27890)
+++ package/kernel/modules/hwmon.mk (working copy)
@@ -89,7 +104,21 @@
 
 $(eval $(call KernelPackage,hwmon-lm90))
 
+define KernelPackage/hwmon-lm95241
+  TITLE:=LM95241 monitoring support
+  KCONFIG:=CONFIG_SENSORS_LM95241
+  FILES:=$(LINUX_DIR)/drivers/hwmon/lm95241.ko
+  AUTOLOAD:=$(call AutoLoad,60,lm95241)
+  $(call AddDepends/hwmon,+kmod-i2c-core)
+endef
 
+define KernelPackage/hwmon-lm95241/description
+ Kernel module for LM95241 thermal monitor chip
+endef
+
+$(eval $(call KernelPackage,hwmon-lm95241))
+
+
 define KernelPackage/hwmon-pc87360
   TITLE:=PC87360 monitoring support
   KCONFIG:= \
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH-v4] samba 3.0.37 update

2011-08-10 Thread Maarten Bezemer
On Wed, 2011-08-10 at 00:07 +0200, Maarten Bezemer wrote:
> I have updated my samba3 patch (again).

It was brought to my attention that the provided patch was not made from
the feeds/package directory, but from the feeds/package/net/samba3
directory. Please keep this in mind when applying the patch.
I will not resend this patch to the list due to its size.

Maarten

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


[OpenWrt-Devel] [PATCH] Update wing package

2011-08-10 Thread Roberto Riggio


This patch updates the wing package to the latest git version and
moves the package the the new "Routing and redirection" submenu.

Signed-off-by: Roberto Riggio 

--
Index: net/wing/files/lib/network/wing.sh
===
--- net/wing/files/lib/network/wing.sh  (revision 27944)
+++ net/wing/files/lib/network/wing.sh  (working copy)
@@ -107,7 +107,9 @@
 	ps | grep /usr/bin/click | grep -v grep | awk '{print $1}' > 
/var/run/$iface.pid


ifconfig "$iface" "$ipaddr" netmask "$netmask"
-   route add default dev "$iface"
+   route -n | grep -q '^0.0.0.0' || {
+   route add default dev "$iface"
+   }

uci_set_state network $config ifname "$iface"
uci_set_state network $config ipaddr "$ipaddr"
Index: net/wing/files/etc/uci-defaults/wing
===
--- net/wing/files/etc/uci-defaults/wing(revision 27944)
+++ net/wing/files/etc/uci-defaults/wing(working copy)
@@ -1,13 +1,6 @@
 uci delete network.mesh
 uci set network.mesh=interface
 uci set network.mesh.proto=wing
-uci set network.mesh.rc=minstrel
-uci set network.mesh.ls=fcfs
-uci set network.mesh.metric=wcett
-uci set network.mesh.prefix=6
-uci set network.mesh.period=1
-uci set network.mesh.tau=10
-uci set network.mesh.debug=false

 uci add firewall zone
 uci set firewall.@zone[-1].name="mesh"
Index: net/wing/Makefile
===
--- net/wing/Makefile   (revision 27944)
+++ net/wing/Makefile   (working copy)
@@ -8,9 +8,9 @@
 include $(TOPDIR)/rules.mk

 PKG_NAME:=wing
-PKG_VERSION:=20110709
+PKG_VERSION:=20110810
 PKG_RELEASE:=1
-PKG_REV:=6aaea18b8e199781dc600681882cb2648f43ec38
+PKG_REV:=99908ec99f1539302f6c3cbbe3e189b5df577bc0

 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=git://github.com/rriggio/click.git
@@ -24,12 +24,13 @@
 include $(INCLUDE_DIR)/host-build.mk

 define Package/wing
-   TITLE:=Wireless mesh networking toolkit
-   SECTION:=net
-   CATEGORY:=Network
-   MAINTAINER:=Roberto Riggio 
-   DEPENDS:=+kmod-tun +libpcap +libstdcpp
-   URL:=http://www.wing-project.org/
+  SECTION:=net
+  CATEGORY:=Network
+  SUBMENU:=Routing and Redirection
+  TITLE:=Wireless mesh networking toolkit
+  MAINTAINER:=Roberto Riggio 
+  DEPENDS:=+kmod-tun +libpcap +libstdcpp
+  URL:=http://www.wing-project.org/
 endef

 define Package/wing/Description
@@ -44,12 +45,16 @@
--enable-tools=host \
--enable-userlevel \
--enable-wifi \
+   --enable-wing \
+   --enable-diffserv \
--disable-linuxmodule \
--disable-dynamic-linking \

 HOST_CONFIGURE_ARGS += \
--enable-userlevel \
--enable-wifi \
+   --enable-wing \
+   --enable-diffserv \
--disable-linuxmodule \

 define Host/Compile
@@ -62,6 +67,7 @@
-f $(PKG_BUILD_DIR)/conf/wing/sample.click \
-A --all -E Discard -E Print -E PrintWifi -E Strip -E Null \
-E InfiniteSource -E RatedSource -E EtherEncap -E UDPIPEncap \
+   -E AggregateWingPacketType -E AggregateCounter \
-E RadiotapEncapHT -E SetTXRateHT \
-E WINGETTMetric -E WINGETXMetric -E WINGHopCountMetric \
-E ProbeTXRate -E MadwifiRate -E AutoRateFallback -E Minstrel \
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v2] Version Bump Minidlna 1.0.21

2011-08-10 Thread Ian Leonard
Version bump minidlna 1.0.21 v2

v2: adjusts 040-configuration-tweak.patch as default kernels enable inotify.

v1: 010-genconfig-checks.patch adjusts two configure checks to use ICONV_PREFIX 
and INTL_PREFIX. These changes were already made previously elsewhere in the 
build process and looks like it was just overlooked here.

040-configuration-tweak.patch was to rebase.

Minidlna's changes were primarily bug fixes and compatibility with newer ffmpeg.

Signed-off-by: Ian Leonard 
---
Index: feeds/packages/multimedia/minidlna/patches/040-configuration-tweak.patch
===
--- feeds/packages/multimedia/minidlna/patches/040-configuration-tweak.patch
(revision 27933)
+++ feeds/packages/multimedia/minidlna/patches/040-configuration-tweak.patch
(working copy)
@@ -3,7 +3,7 @@
 @@ -2,7 +2,7 @@
  port=8200
  
- # network interface to bind to (this is the only interface that will serve 
files)
+ # network interfaces to serve, comma delimited
 -#network_interface=eth0
 +network_interface=br-lan
  
@@ -22,12 +22,3 @@
  
  # set this if you would like to specify the directory where you want MiniDLNA 
to store its database and album art cache
  #db_dir=/var/cache/minidlna
-@@ -28,7 +28,7 @@ album_art_names=Cover.jpg/cover.jpg/Albu
- 
- # set this to no to disable inotify monitoring to automatically discover new 
files
- # note: the default is yes
--inotify=yes
-+inotify=no
- 
- # set this to yes to enable support for streaming .jpg and .mp3 files to a 
TiVo supporting HMO
- enable_tivo=no
Index: feeds/packages/multimedia/minidlna/patches/010-genconfig-checks.patch
===
--- feeds/packages/multimedia/minidlna/patches/010-genconfig-checks.patch   
(revision 27933)
+++ feeds/packages/multimedia/minidlna/patches/010-genconfig-checks.patch   
(working copy)
@@ -39,3 +39,21 @@
  if [ -n "$MISSING" ]; then
echo -e "\nERROR!  Cannot continue."
echo -e "The following required libraries are either missing, or are 
missing development headers:\n"
+@@ -184,7 +184,7 @@ fi
+ echo "" >> ${CONFIGFILE}
+ 
+ echo "/* Enable if the system iconv.h exists.  ID3 tag reading in various 
character sets will not work properly otherwise. */" >> ${CONFIGFILE}
+-if [ -f /usr/include/iconv.h ]; then
++if [ -f ${ICONV_PREFIX}/include/iconv.h ]; then
+ echo "#define HAVE_ICONV_H" >> ${CONFIGFILE}
+ else
+ echo -e "\nWARNING!!  Iconv support not found.  ID3 tag reading may not work."
+@@ -193,7 +193,7 @@ fi
+ echo "" >> ${CONFIGFILE}
+ 
+ echo "/* Enable if the system libintl.h exists for NLS support. */" >> 
${CONFIGFILE}
+-if [ -f /usr/include/libintl.h ]; then
++if [ -f ${INTL_PREFIX}/include/libintl.h ]; then
+ echo "#define ENABLE_NLS" >> ${CONFIGFILE}
+ else
+ echo "/*#define ENABLE_NLS*/" >> ${CONFIGFILE}
Index: feeds/packages/multimedia/minidlna/Makefile
===
--- feeds/packages/multimedia/minidlna/Makefile (revision 27933)
+++ feeds/packages/multimedia/minidlna/Makefile (working copy)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=minidlna
-PKG_VERSION:=1.0.19
+PKG_VERSION:=1.0.21
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION)_src.tar.gz
 PKG_SOURCE_URL:=@SF/minidlna
-PKG_MD5SUM:=8bb5f2c0abc009e16039d7deecf09cf6
+PKG_MD5SUM:=a53e0008ad225843a1782e4af6e5bf0b
 
 PKG_BUILD_PARALLEL:=0
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v2 1/1] kmod-input-xxx: missing dependency on kmod-input-core

2011-08-10 Thread Hauke Mehrtens
On 08/06/2011 11:31 PM, Philip Prindeville wrote:
> On 8/6/11 10:09 AM, Hauke Mehrtens wrote:
>> On 07/28/2011 03:31 AM, Philip Prindeville wrote:
>>> Modules like input-gpio-keys rely on input-core, but that's not currently 
>>> expressed.
>>>
>>> Signed-off-by: Philip Prindeville 
>>>
>> This patch is wrong.
>>
>> x86 has input-core compiled into the kernel and for all other targets
>> there is already a dependency on kmod-input-core in AddDepends/input.
>> This patch is not needed at all.
>>
>> Hauke
> 
> It does?
> 
> 
> philipp@builder ~/openwrt2]$ grep CONFIG_INPUT target/linux/x86/config-default
> # CONFIG_INPUT is not set
> [philipp@builder ~/openwrt2]$ egrep '\' 
> build_dir/linux-x86_alix2/linux-2.6.39.3/.config
> # CONFIG_INPUT is not set
> [philipp@builder ~/openwrt2]$
Hi,

for the generic and the kvm_guest profile CONFIG_INPUT=y is set and for
all other x86 profiles CONFIG_INPUT is not set. The code in
package/kernel/modules/001-depends.mk is wrong. I have not noticed that
because I am only testing the x86 generic image.
Could you please try the attached patch. It should disable kmod-input
just for the generic and kvm_gest profile and activate it for all other
x86 profiles.

Hauke
diff --git a/package/kernel/modules/001-depends.mk b/package/kernel/modules/001-depends.mk
index 602775c..238799e 100644
--- a/package/kernel/modules/001-depends.mk
+++ b/package/kernel/modules/001-depends.mk
@@ -27,11 +27,11 @@ endef
 
 
 define SetDepends/input
-  DEPENDS:= @!TARGET_x86
+  DEPENDS:= @!(TARGET_x86_generic||TARGET_x86_kvm_guest)
 endef
 
 define AddDepends/input
-  DEPENDS+= +!TARGET_x86:kmod-input-core $(1)
+  DEPENDS+= +!(TARGET_x86_generic||TARGET_x86_kvm_guest):kmod-input-core $(1)
 endef
 
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel