Re: [OpenWrt-Devel] [PATCH] use NTP server received via DHCP

2016-01-27 Thread David Lang

Just a side note while you are working in this area.

all the documentation for udhcpc (including it's default config settings) says 
that it uses one default file path, but when it's run that path gets overridden 
on the command line and a different file is used instead.


The default in the config should be changed to what's actually used and the 
extra copy should be eliminated.


David Lang
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Question about custom script at init on Trunk.-

2016-01-27 Thread David Lang
Since it's just two files that you are wanting to override for your images, go 
to the top level directory (where you do your make menuconfig) and create the 
directory files and put the files that you want to override in there (in the 
appropriate directory, so to override /etc/config/wireless, make the file 
files/etc/config/wireless)


much easier than maintaining a different version of the package just to change a 
couple files.


David Lang

On Tue, 26 Jan 2016, Guillermo Javier Nardoni wrote:


Date: Tue, 26 Jan 2016 21:19:54 -0300
From: Guillermo Javier Nardoni 
To: openwrt-devel@lists.openwrt.org, guille...@geryon.com.ar
Subject: [OpenWrt-Devel] Question about custom script at init on Trunk.-

Hello everyone,

At first, I should say that I?ve been away a long time from openwrt-devel
mailing list.

I was using Barrier Braker 14.07 to build our custom firmware, usually for
TP-Link WR740/741 v3/v4, but recently we have received TP-Link WR740 v5
(a.k.a. 741 v5) so I figured out that Barrier Braker don?t have support for
it, at least not native one.
Googling I found a solution which I?ve flashed it first with a stripped
custom firmware found on Internet and then, via console, do a beautifull
reflash with WR741 v4 firmware (build by us) and everything Works perfect!.

Since I?m not the one who flashes the devices I did a new git from trunk
versión of OpenWrt (CHAOS CALMER (15.05)) because it has native support for
TP-Link TL-WR740N versión 5 but when I looked into the code I?ve figured
out, again, that the code changed a lot since the BB 14.07 and I don?t know
how to adapt the custom configurations.

The reason I changed those 2 files it is because of the users sometimes (i
mean always) press the reset button and it won?t allow us to remotely
recofigure the device and to use one port of the switch to bridge it with
the WAN port to use them just because we have ATAs devices that don?t
support NAT etc etc.
When a user presses the reset button, it resets the device and configure it
with a standard configuration which let the user to have Telephone (VoIP),
Internet, Wifi and we can Access remotely to reconfigure it as I said
before.

On BB 14.07 I?ve just modified 2 files:
./package/base-files/files/lib/functions/uci-defaults.sh
??.

ucidef_add_switch() {
    local name=$1
    local reset=$2
    local enable=$3
    uci batch 

Re: [OpenWrt-Devel] Question about custom script at init on Trunk.-

2016-01-27 Thread Karl Palsson
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Eric Schultz  wrote:
> Guillermo,
> 
> It's always best to use a custom package if you can. Modifying
> upstream leads to problems like this.
> 
> I don't think you'd need those changes in uci-defaults.sh.
> Instead, I think you should put your changes in your own
> uci-default, like 02_network, but your own. Use a number after
> 02, like 03_custom and put it in /etc/uci-defaults. It should
> run on first boot. As long as this uci-default script completes
> successfully, I think the change should occur and the script
> itself should be deleted so it doesn't run again.
> 

Along these lines, I've tried putting in something like
80_mystuff, where I want to set some configurations options for
various packages that depend on the hardware they're running on.
However, the uci-defaults files are run in alphabetical order, so
while 80_mystuff might come after the 01_leds, 02_network stuff
from core OpenWrt, the uci-defaults files from packages normally
don't seem to have a numerical prefix. This then means that my
80_mystuff script tries to set a config option in a file that
doesn't exist yet.

Now, yes, I can have my 80_mystuff script go and try and create
the package config files it might want to modify, but really, I
want "mystuff" to run _last_ or at least, after all the packages
have run. Is there any better system for this other than just
naming my script z_mystuff instead of 80_mystuff? Is that
expected to be "good enough" ?

I'm trying this, because I've _been_ trying to use packages
instead of modifying upstream, but when I want my package to do
different things for different targets, it's seemed easier to
hook into the existing target code, rather than trying to copy
target detection and config into a package Config.in options

Sincerely,
Karl Palsson

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBAgAGBQJWqJbVAAoJEBmotQ/U1cr29HwP/3I3TemR4suETncwKdssUHpt
7RP4+SPgSZPENNub4xlViSYz8aB69AQZ+wgwzQZR8p3UbzCtc02BJoa0ikDx8H4F
EvYap9GhQ3hCKznTD9GbZCvGLaqAHLn9wmMlPzPcrqQeMQICdsiXhg1c410tICiO
JBWwoZvg5bbBStfyh1vX4kvNX3tVMFYgJePSL8r3o/BgX9+q9jCIaZbae2A7Q4xU
1fVuxPXJLlxRDGdA/woFGFX1iokzaZL+yP6jY9+TW/VtA6MiLNBxnYn5X5C78i0Q
L9of5vOYkZ4s9FvgsKV99x3Bdqkmnbza0lRt8nGsOKtvWd3CH/sTBX9mpXZKQPsu
pSfzgbv3rz5Bmix5HG1vuEqbrA+i6VE7pyS5YstXfIu8GWCtjAlUGSjxLQolrl2x
+yaaU7EEIuqa855mhw6dQ5KL5CJQPITiyohsOsB0VsjSaLP6VmUqCPGohNlwK6Zr
YslCozrzZf507mieYz5N5F4jRXoLMnO8UuVuBzr0ImZzw7Zy0zZaJm/yLNOaBUvM
NGiIFBlXHRsutcHMA4PBwGAn/y3nSC4bZ8V8ip2mmJlNgJpb9mSBDfngahv5n7X5
OboDzgZRWJxAlZgjH06vQNFhP6SuCv7i4pSVifnwydXALUakRmv7A9lk8elR1meE
1Ops4PWevuKM7VURfgaY
=Wijj
-END PGP SIGNATURE-
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Question about custom script at init on Trunk.-

2016-01-27 Thread David Lang

On Wed, 27 Jan 2016, Karl Palsson wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Eric Schultz  wrote:

Guillermo,

It's always best to use a custom package if you can. Modifying
upstream leads to problems like this.

I don't think you'd need those changes in uci-defaults.sh.
Instead, I think you should put your changes in your own
uci-default, like 02_network, but your own. Use a number after
02, like 03_custom and put it in /etc/uci-defaults. It should
run on first boot. As long as this uci-default script completes
successfully, I think the change should occur and the script
itself should be deleted so it doesn't run again.



Along these lines, I've tried putting in something like
80_mystuff, where I want to set some configurations options for
various packages that depend on the hardware they're running on.
However, the uci-defaults files are run in alphabetical order, so
while 80_mystuff might come after the 01_leds, 02_network stuff
from core OpenWrt, the uci-defaults files from packages normally
don't seem to have a numerical prefix. This then means that my
80_mystuff script tries to set a config option in a file that
doesn't exist yet.

Now, yes, I can have my 80_mystuff script go and try and create
the package config files it might want to modify, but really, I
want "mystuff" to run _last_ or at least, after all the packages
have run. Is there any better system for this other than just
naming my script z_mystuff instead of 80_mystuff? Is that
expected to be "good enough" ?

I'm trying this, because I've _been_ trying to use packages
instead of modifying upstream, but when I want my package to do
different things for different targets, it's seemed easier to
hook into the existing target code, rather than trying to copy
target detection and config into a package Config.in options


typically people use 99stuff and figure that the order of 99s doesn't really 
matter much


the other thing is that I believe that rc.local gets run out of the very last of 
the numbered items, so you can put stuff there.


David Lang___
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] Question about custom script at init on Trunk.-

2016-01-27 Thread David Lang

On Wed, 27 Jan 2016, Karl Palsson wrote:


Along these lines, I've tried putting in something like
80_mystuff, where I want to set some configurations options for
various packages that depend on the hardware they're running on.
However, the uci-defaults files are run in alphabetical order, so
while 80_mystuff might come after the 01_leds, 02_network stuff
from core OpenWrt, the uci-defaults files from packages normally
don't seem to have a numerical prefix. This then means that my
80_mystuff script tries to set a config option in a file that
doesn't exist yet.

Now, yes, I can have my 80_mystuff script go and try and create
the package config files it might want to modify, but really, I
want "mystuff" to run _last_ or at least, after all the packages
have run. Is there any better system for this other than just
naming my script z_mystuff instead of 80_mystuff? Is that
expected to be "good enough" ?


what I do is to flash the base image on a device, and then tweak it until I get 
things working and then create a new image including that file.


If I need different versions for different devices, I work on each one 
separately and then figure a way to detect the different conditions.


Another example from Scale, We use Raspberry Pi computers to run self-service 
registration stations and to provide digital signs when connected to large TVs. 
I use a single image that checks to see if it has a mouse attached, if so it's a 
registration station, otherwise it's a sign and then the appropriate thing gets 
launched.


you can use IP addresses/ranges, DHCP parameters, holding a button, or many 
other things to detect the different conditions.


David Lang___
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


[OpenWrt-Devel] [malta] CC 15.05 backport request -r46269 malta-add-harddisk-support

2016-01-27 Thread Vincent Fortier
Hi all,

>From following the list in the past few weeks I believe there may be a CC
15.05.1 planned for release?  If so could it be possible to backport the
trivial patch to add harddisk support for the malta platform?

I tested it yesterday against latest update to CC 15.05 and it worked
flawlessly.  Commit info: 76bfcd46bd55263947461e40bd02047922755c72

Thnx in advance!

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


Re: [OpenWrt-Devel] Question about custom script at init on Trunk.-

2016-01-27 Thread Karl Palsson
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David Lang  wrote:
> >
> > Now, yes, I can have my 80_mystuff script go and try and create
> > the package config files it might want to modify, but really, I
> > want "mystuff" to run _last_ or at least, after all the packages
> > have run. Is there any better system for this other than just
> > naming my script z_mystuff instead of 80_mystuff? Is that
> > expected to be "good enough" ?
> >
> > I'm trying this, because I've _been_ trying to use packages
> > instead of modifying upstream, but when I want my package to do
> > different things for different targets, it's seemed easier to
> > hook into the existing target code, rather than trying to copy
> > target detection and config into a package Config.in options
> 
> typically people use 99stuff and figure that the order of 99s
> doesn't really matter much
> 

Well, the thing is, 99 isn't last. that's what I was getting at.

$ ls -l build_dir/target-mips_34kc_uClibc-0.9.33.2/root-ar71xx/etc/uci-defaults/
total 140
- -rw-r--r-- 1 karlp karlp 128 Jan 26 13:32 00_uhttpd_ubus
- -rwxrwxr-x 1 karlp karlp 17158 Jan 20 17:20 01_leds -rwxrwxr-x 1
karlp karlp 10391 Jan 20 17:22 02_network -rwxrwxr-x 1 karlp
karlp 1673 Sep 25 11:01 03_network-switchX-migration -rwxrwxr-x 1
karlp karlp 351 Sep 25 11:01 03_network-vlan-migration -rwxrwxr-x
1 karlp karlp 1244 Sep 25 11:01 04_led_migration -rwxrwxr-x 1
karlp karlp 232 Sep 25 11:01 09_fix-seama-header -rw-rw-r-- 1
karlp karlp 193 Sep 25 11:01 09_fix-trx-header -rw-r--r-- 1 karlp
karlp 74 Jan 27 10:56 10-fstab -rw-rw-r-- 1 karlp karlp 418 Sep
25 11:01 10_migrate-shadow -rw-rw-r-- 1 karlp karlp 450 Sep 25
11:01 11_migrate-sysctl -rw-rw-r-- 1 karlp karlp 377 Sep 25 11:01
12_network-generate-ula -rw-rw-r-- 1 karlp karlp 377 Sep 25 11:01
99_stuff_here -rw-rw-r-- 1 karlp karlp 211 Aug 21 12:40
agent_etactica -rwxr-xr-x 1 karlp karlp 83 Jan 11 15:05
luci-i18n-english -rwxr-xr-x 1 karlp karlp 1285 Jan 26 13:33
mosquitto.uci-defaults -rw-rw-r-- 1 karlp karlp 479 Aug 21 12:40
mpacker -rwxrwxr-x 1 karlp karlp 291 Aug 21 12:40 mq_delta_gadget
- -rwxrwxr-x 1 karlp karlp 970 Aug 21 12:40 mrelay -rwxr-xr-x 1
karlp karlp 300 Jan 26 13:29 odhcpd.defaults -rwxrwxr-x 1 karlp
karlp 224 Sep 24 14:24 snmpd

Here's what you really have in a new image. Putting things in
"99_stuff" just won't work very well. All the package provided
uci-defaults files, which are the ones I want to extend/augment
with my own files have to come later. They are run at
/etc/rc.d/S10boot,

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQIbBAEBAgAGBQJWqLMzAAoJEBmotQ/U1cr2bW8P93PKOyhaBckgfSaOgeDCI23A
T7Tx9N3pRkVoZ9D+DAU+HdmMdWUB8Wt59Qzn37OYSxGyieYTflkgLgCluTX5Mkxg
Hew64Vq3TVlZIcoBGiDbDE+YiNBqQ26bO3BTeCtuq6vIdzl2fX9LO8Hv0sKCFXpt
fgb/B3eNaUQdrFeZZNj+Ay3/ZxUJz8ofYp4BcV9rY9NF1HdesLrdJ9MIcIfPRWrc
cyyTsukrzfMilkeujOqjsNrJdlteU1+jJ844jnMGsOjw9YhB3k+g7sF+z5B2yeOL
EmBy5CJo4sDZYJOKdeA5w9LbVjPhS1cqpfRj6u+CEWVJHvHwsmUDR9OroVzfyUw/
GZHzsOwrTClaRrvgKV8Z/sZTCOFD+8STZs+kucD46JBkmUDAmnkMQrAT0F18lQXm
PEDWWn/aF9IoWXEOjBbOQNrGhzcjF1emoGpgPgD29o5y30gr0qW/kpFPSkUu0wup
3A1iyT5vwWxbP89Wd6n5PslE0K3e3om6TbNPNHd1s2H1l5dac4LVODfb5sHAkyCs
8YYZzPD7YFVZeN5aNpFmgfzQtPoop3sR/hZb/Ay44P1Y1kAAzRXcglF3iXm7j691
amd4KMMv+NVbWyU2p65ZfKNFCS7pDjfh4MbE6UZIlYkjDipqJRx8ZRQD6Qvmq98k
yLIkjtpNL4eW/q997rE=
=eSyW
-END PGP SIGNATURE-
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Question about custom script at init on Trunk.-

2016-01-27 Thread David Lang

On Wed, 27 Jan 2016, Karl Palsson wrote:


David Lang  wrote:


Now, yes, I can have my 80_mystuff script go and try and create
the package config files it might want to modify, but really, I
want "mystuff" to run _last_ or at least, after all the packages
have run. Is there any better system for this other than just
naming my script z_mystuff instead of 80_mystuff? Is that
expected to be "good enough" ?

I'm trying this, because I've _been_ trying to use packages
instead of modifying upstream, but when I want my package to do
different things for different targets, it's seemed easier to
hook into the existing target code, rather than trying to copy
target detection and config into a package Config.in options


typically people use 99stuff and figure that the order of 99s
doesn't really matter much



Well, the thing is, 99 isn't last. that's what I was getting at.

$ ls -l build_dir/target-mips_34kc_uClibc-0.9.33.2/root-ar71xx/etc/uci-defaults/
total 140
- -rw-r--r-- 1 karlp karlp 128 Jan 26 13:32 00_uhttpd_ubus
- -rwxrwxr-x 1 karlp karlp 17158 Jan 20 17:20 01_leds -rwxrwxr-x 1
karlp karlp 10391 Jan 20 17:22 02_network -rwxrwxr-x 1 karlp
karlp 1673 Sep 25 11:01 03_network-switchX-migration -rwxrwxr-x 1
karlp karlp 351 Sep 25 11:01 03_network-vlan-migration -rwxrwxr-x
1 karlp karlp 1244 Sep 25 11:01 04_led_migration -rwxrwxr-x 1
karlp karlp 232 Sep 25 11:01 09_fix-seama-header -rw-rw-r-- 1
karlp karlp 193 Sep 25 11:01 09_fix-trx-header -rw-r--r-- 1 karlp
karlp 74 Jan 27 10:56 10-fstab -rw-rw-r-- 1 karlp karlp 418 Sep
25 11:01 10_migrate-shadow -rw-rw-r-- 1 karlp karlp 450 Sep 25
11:01 11_migrate-sysctl -rw-rw-r-- 1 karlp karlp 377 Sep 25 11:01
12_network-generate-ula -rw-rw-r-- 1 karlp karlp 377 Sep 25 11:01
99_stuff_here -rw-rw-r-- 1 karlp karlp 211 Aug 21 12:40
agent_etactica -rwxr-xr-x 1 karlp karlp 83 Jan 11 15:05
luci-i18n-english -rwxr-xr-x 1 karlp karlp 1285 Jan 26 13:33
mosquitto.uci-defaults -rw-rw-r-- 1 karlp karlp 479 Aug 21 12:40
mpacker -rwxrwxr-x 1 karlp karlp 291 Aug 21 12:40 mq_delta_gadget
- -rwxrwxr-x 1 karlp karlp 970 Aug 21 12:40 mrelay -rwxr-xr-x 1
karlp karlp 300 Jan 26 13:29 odhcpd.defaults -rwxrwxr-x 1 karlp
karlp 224 Sep 24 14:24 snmpd


badly wrapped.


Here's what you really have in a new image. Putting things in
"99_stuff" just won't work very well. All the package provided
uci-defaults files, which are the ones I want to extend/augment
with my own files have to come later. They are run at
/etc/rc.d/S10boot,


S99_whatever will run after S10_whatever. The S## files are run at startup, in 
order and the K## files are run at shutdown in reverse order (since shutdown can 
sometimes require different ordering than startup. If something is in there with 
just ## I'm not sure if they are even run.


David Lang
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Question about custom script at init on Trunk.-

2016-01-27 Thread Karl Palsson
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David Lang  wrote:
> On Wed, 27 Jan 2016, Karl Palsson wrote:
> 
> > David Lang  wrote:
> >>>
> >>> Now, yes, I can have my 80_mystuff script go and try and create
> >>> the package config files it might want to modify, but really, I
> >>> want "mystuff" to run _last_ or at least, after all the packages
> >>> have run. Is there any better system for this other than just
> >>> naming my script z_mystuff instead of 80_mystuff? Is that
> >>> expected to be "good enough" ?
> >>>
> >>> I'm trying this, because I've _been_ trying to use packages
> >>> instead of modifying upstream, but when I want my package to do
> >>> different things for different targets, it's seemed easier to
> >>> hook into the existing target code, rather than trying to copy
> >>> target detection and config into a package Config.in options
> >>
> >> typically people use 99stuff and figure that the order of 99s
> >> doesn't really matter much
> >>
> >
> > Well, the thing is, 99 isn't last. that's what I was getting at.
> >
> > $ ls -l 
> > build_dir/target-mips_34kc_uClibc-0.9.33.2/root-ar71xx/etc/uci-defaults/
> > total 140
> 
> badly wrapped.
> 
> > Here's what you really have in a new image. Putting things in
> > "99_stuff" just won't work very well. All the package provided
> > uci-defaults files, which are the ones I want to extend/augment
> > with my own files have to come later. They are run at
> > /etc/rc.d/S10boot,
> 
> S99_whatever will run after S10_whatever. The S## files are run
> at startup, in order and the K## files are run at shutdown in
> reverse order (since shutdown can sometimes require different
> ordering than startup. If something is in there with just ##
> I'm not sure if they are even run.

I think you may have misunderstood. S10_boot runs the files in
/etc/uci-defaults/*

The files in _/etc/uci-defaults/_ do not all start with a
numerical prefix, and are provided by any and all package that
has any config it wants to run. So, for a _package_ that wants to
do something "late" to do any sort of special target
configuration, such as changing serial ports or mount points for
an application based on the hardware it's running on, anything
like 99-xxx is not going to reliably be late at all.

Naming your uci-defaults file something like z999-something
will probably work, but it's pretty gross. If you instead try and
add your own _init_ script, with a START=99, you now don't even
run until the applications whose config you want to adjust have
already attempted startup, at whatever START=xx tag they have in
their own provided init script.

So, /etc/uci-defaults/z999-something works, but is there a
better way?

Cheers,
Karl P

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBAgAGBQJWqONhAAoJEBmotQ/U1cr2E7QP/jQz2mZp75xiZDEx8tnSwuku
XcYObMug6vtUAO+RAnzAkhLCp+A+37dwxMhvRgCrTMwTncpELncuwoFIJZ7fd5yQ
+vHV1e0S0WUgNNEjKOy8iCPnXugatI82F7prUZNNb6LjnwlnD2MQdEUF3prFm0eZ
WdQDuE+oShtN/L2V/RcGqF+wnl1c8/PQX+XJ558+1TqBRAjIckkgv+T6E/ysiZ0O
3TfFSpYRftXZ/EQnxeO8J5vCkJb3q7kZ84fZVf9Awr5MuD5zjKnJTIuXpBBcne59
3HM2BCGtlCwn0AWrvg/8lTRSyYN2biubygrsj/w901cEKd+i3Hb9E/VwIY38pEyE
3jXywYvWkKk+rgAw5A7cZk8hYj5Tc3b8E235H1h5tOUJzk/XdDK9lisuTuKK+aib
MS6qx8U5gx1cJ2yrUQL9BFv5FWKAh63W/aPweqK18QhQjCcTWMreDRodlasS8TT+
jLptAl10BITtjztRXrlRjaq+BHEu8dU1/jTN97puBApuIiuHpcbjY9e8LoixvGG0
S1w4oT10NkccYyEcXGdHN+u+k0NOKp74sRaLx/vTjvygI2e/BMW2nha5xzhQQEzt
oJDrQLh4pOV31IQTa2AzbTKVF9pk40ii7+zZOLLQ8pqJnsi7gTa+MDykdgiuXbHG
sEF7mAr2OFE9QF9Ih9uk
=HZHN
-END PGP SIGNATURE-
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Question about custom script at init on Trunk.-

2016-01-27 Thread Jo-Philipp Wich
Hi,

> So, /etc/uci-defaults/z999-something works, but is there a
> better way?

Not yet - but we could start changing packages to use numerical
prefixes. I do not suppose that sooo many uci-default scripts are used.

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH][ar71xx] Routerboard 951G Switch Fix

2016-01-27 Thread Anton Kalmykov


Hi, 951G owners!
I have RB951G-2HnD device with AR9344 rev 3. It is configured like that:
- Balanced 2 WAN ports (mwan3)
- ipsec LAN-to-LAN
- OpenVPN server
- about 30 clients (wi-fi, lan)

My results for different ath79_eth0_pll_data.pll_1000 values:

0x3e00 - it worked fine with Barrier Breaker, but sometimes (one or two 
times per day) it was restarting suddenly. It was happening after I have 
configured mwan3.
0x0600 - it works wonderful with Chaos Calmer. The configuration is the 
same. No problem with reboot. So, I would recommend this value.
unpatched - of course it doesn't work. :-)

If it's useful, please add this information to wiki-page:
https://wiki.openwrt.org/toh/mikrotik/rb2011uias#tracking_reported_experience_with_suggested_patch_for_the_5_gige_ports

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


Re: [OpenWrt-Devel] [PATCH][ar71xx] Routerboard 951G Switch Fix

2016-01-27 Thread John Crispin


On 27/01/2016 17:03, Anton Kalmykov wrote:
> 
> Hi, 951G owners!
> I have RB951G-2HnD device with AR9344 rev 3. It is configured like that:
> - Balanced 2 WAN ports (mwan3)
> - ipsec LAN-to-LAN
> - OpenVPN server
> - about 30 clients (wi-fi, lan)
> 
> My results for different ath79_eth0_pll_data.pll_1000 values:
> 
> 0x3e00 - it worked fine with Barrier Breaker, but sometimes (one or
> two times per day) it was restarting suddenly. It was happening after I
> have configured mwan3.
> 0x0600 - it works wonderful with Chaos Calmer. The configuration is

so the conensus is that 0x0600 is correct ?

John



> the same. No problem with reboot. So, I would recommend this value.
> unpatched - of course it doesn't work. :-)
> 
> If it's useful, please add this information to wiki-page:
> https://wiki.openwrt.org/toh/mikrotik/rb2011uias#tracking_reported_experience_with_suggested_patch_for_the_5_gige_ports
> 
> 
> -- 
> Anton
> ___
> 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


[OpenWrt-Devel] [PATCH v4] base-files: For sysfixtime use hwclock if RTC available

2016-01-27 Thread Petr Štetiar
From: Daniel Dickinson 

On systems that have an RTC prefer it to the file-based time fixup (i.e.
use hwclock when there is a permanent clock instead of the faked up time
logic that is needed when there is not RTC).

We can't rely on hctosys kernel feature either as we're usually using
RTC as kernel modules which are usually being loaded after hctosys was
run, leading in the following error:

  hctosys: unable to open rtc device (rtc0)

Signed-off-by: Daniel Dickinson 
Signed-off-by: Petr Štetiar 
---
 Changes in v4:
 * simplified with using start() in boot() (blogic)

 package/base-files/files/etc/init.d/sysfixtime |   14 ++
 1 file changed, 14 insertions(+)

diff --git a/package/base-files/files/etc/init.d/sysfixtime 
b/package/base-files/files/etc/init.d/sysfixtime
index 4010e06..ab946f6 100755
--- a/package/base-files/files/etc/init.d/sysfixtime
+++ b/package/base-files/files/etc/init.d/sysfixtime
@@ -2,10 +2,24 @@
 # Copyright (C) 2013-2014 OpenWrt.org
 
 START=00
+STOP=90
+
+RTC_DEV=/dev/rtc0
+HWCLOCK=/sbin/hwclock
 
 boot() {
+   start && exit 0
+
local curtime="$(date +%s)"
local maxtime="$(find /etc -type f -exec date -r {} +%s \; | sort -nr | 
head -n1)"
[ $curtime -lt $maxtime ] && date -s @$maxtime
 }
 
+start() {
+   [ -e "$RTC_DEV" ] && [ -e "$HWCLOCK" ] && $HWCLOCK -s -f $RTC_DEV
+}
+
+stop() {
+   [ -e "$RTC_DEV" ] && [ -e "$HWCLOCK" ] && $HWCLOCK -w -f $RTC_DEV && \
+   logger -t sysfixtime "saved '$(date)' to $RTC_DEV"
+}
-- 
1.7.9.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH][ar71xx] Routerboard 951G Switch Fix

2016-01-27 Thread David Hutchison
Hello John,

Of course this has been over a year since I submitted (
http://patchwork.ozlabs.org/patch/419857/ ); however I remember in one
of our e-mail threads that you ( or Felix? ) thought it was possible
to pull the correct pll_1000 value from the bootloader? Is that still
a possibility?

If you could somehow acquire the correct value directly from the boot
args; that would seem ideal.

-- Davey

On Wed, Jan 27, 2016 at 9:27 AM, John Crispin  wrote:
>
>
> On 27/01/2016 17:03, Anton Kalmykov wrote:
>>
>> Hi, 951G owners!
>> I have RB951G-2HnD device with AR9344 rev 3. It is configured like that:
>> - Balanced 2 WAN ports (mwan3)
>> - ipsec LAN-to-LAN
>> - OpenVPN server
>> - about 30 clients (wi-fi, lan)
>>
>> My results for different ath79_eth0_pll_data.pll_1000 values:
>>
>> 0x3e00 - it worked fine with Barrier Breaker, but sometimes (one or
>> two times per day) it was restarting suddenly. It was happening after I
>> have configured mwan3.
>> 0x0600 - it works wonderful with Chaos Calmer. The configuration is
>
> so the conensus is that 0x0600 is correct ?
>
> John
>
>
>
>> the same. No problem with reboot. So, I would recommend this value.
>> unpatched - of course it doesn't work. :-)
>>
>> If it's useful, please add this information to wiki-page:
>> https://wiki.openwrt.org/toh/mikrotik/rb2011uias#tracking_reported_experience_with_suggested_patch_for_the_5_gige_ports
>>
>>
>> --
>> Anton
>> ___
>> 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
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/2] kernel: other: add PWM controller support

2016-01-27 Thread Pushpal Sidhu
I just realized that this isn't necessary for imx anymore as it's
static in the 4.4 kernel. I'll mark it as 'not applicable'.

- Pushpal

On Tue, Jan 26, 2016 at 2:37 PM, Pushpal Sidhu  wrote:
> This adds basic PWM controller support and support for i.MX
>
> Signed-off-by: Tim Harvey 
> Signed-off-by: Pushpal Sidhu 
> ---
>  package/kernel/linux/modules/other.mk | 36 
> +++
>  1 file changed, 36 insertions(+)
>
> diff --git a/package/kernel/linux/modules/other.mk 
> b/package/kernel/linux/modules/other.mk
> index 3039180..8edf8a6 100644
> --- a/package/kernel/linux/modules/other.mk
> +++ b/package/kernel/linux/modules/other.mk
> @@ -371,6 +371,42 @@ endef
>  $(eval $(call KernelPackage,mmc))
>
>
> +define KernelPackage/pwm
> +  SUBMENU:=$(OTHER_MENU)
> +  TITLE:=Pulse-Width Modulation support
> +  KCONFIG:= \
> +   CONFIG_PWM=y \
> +   CONFIG_REGULATOR_PWM=n \
> +   CONFIG_PWM_FSL_FTM=n
> +endef
> +
> +define KernelPackage/pwm/description
> + Pulse Width Modulation subsystem.
> +endef
> +
> +$(eval $(call KernelPackage,pwm))
> +
> +define AddDepends/pwm
> +  SUBMENU:=$(OTHER_MENU)
> +  DEPENDS+=kmod-pwm $(1)
> +endef
> +
> +define KernelPackage/pwm-imx
> +  SUBMENU:=$(OTHER_MENU)
> +  TITLE:=IMX Pulse-Width Modulation support
> +  KCONFIG:=CONFIG_PWM_IMX
> +  FILES:= $(LINUX_DIR)/drivers/pwm/pwm-imx.ko
> +  DEPENDS:=@TARGET_imx6
> +  AUTOLOAD:=$(call AutoProbe,pwm-imx)
> +  $(call AddDepends/pwm)
> +endef
> +
> +define KernelPackage/pwm-imx/description
> + Freescale IMX Pulse Width Modulation support.
> +endef
> +
> +$(eval $(call KernelPackage,pwm-imx))
> +
>  define KernelPackage/sdhci
>SUBMENU:=$(OTHER_MENU)
>TITLE:=Secure Digital Host Controller Interface support
> --
> 2.7.0
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCHv2 5/8] ath9k: enable GPIO buttons

2016-01-27 Thread Michal
From: Michal Cieslakiewicz 

Enable platform-defined GPIO button support for ath9k device. Key poller
is activated for attached platform buttons. Requires ath9k GPIO chip access.

Signed-off-by: Michal Cieslakiewicz 
---

(Patch offset adjusted due to lines removal in preceding patch v2 4/8)

 .../patches/550-ath9k_enable_gpio_buttons.patch| 164 +
 .../ar71xx/files/arch/mips/ath79/dev-ap9x-pci.c|  18 +++
 .../ar71xx/files/arch/mips/ath79/dev-ap9x-pci.h|   7 +
 .../generic/files/include/linux/ath9k_platform.h   |   4 +
 4 files changed, 193 insertions(+)
 create mode 100644 
package/kernel/mac80211/patches/550-ath9k_enable_gpio_buttons.patch

diff --git 
a/package/kernel/mac80211/patches/550-ath9k_enable_gpio_buttons.patch 
b/package/kernel/mac80211/patches/550-ath9k_enable_gpio_buttons.patch
new file mode 100644
index 000..5d4617a
--- /dev/null
+++ b/package/kernel/mac80211/patches/550-ath9k_enable_gpio_buttons.patch
@@ -0,0 +1,164 @@
+--- a/drivers/net/wireless/ath/ath9k/ath9k.h
 b/drivers/net/wireless/ath/ath9k/ath9k.h
+@@ -825,6 +825,13 @@ int ath_create_gpio_led(struct ath_softc
+ void ath9k_register_gpio_chip(struct ath_softc *sc);
+ void ath9k_unregister_gpio_chip(struct ath_softc *sc);
+ 
++/**/
++/*  GPIO Buttons  */
++/**/
++
++void ath9k_init_buttons(struct ath_softc *sc);
++void ath9k_deinit_buttons(struct ath_softc *sc);
++
+ #else
+ static inline void ath_init_leds(struct ath_softc *sc)
+ {
+@@ -843,6 +850,13 @@ static inline void ath9k_register_gpio_c
+ static inline void ath9k_unregister_gpio_chip(struct ath_softc *sc)
+ {
+ }
++
++void ath9k_init_buttons(struct ath_softc *sc)
++{
++}
++void ath9k_deinit_buttons(struct ath_softc *sc)
++{
++}
+ #endif
+ 
+ //
+@@ -1039,6 +1053,7 @@ struct ath_softc {
+   const char *led_default_trigger;
+   struct list_head leds;
+   struct ath9k_gpio_chip *gpiochip;
++  struct platform_device *btnpdev;/* gpio-keys-polled */
+ #endif
+ 
+ #ifdef CPTCFG_ATH9K_DEBUGFS
+--- a/drivers/net/wireless/ath/ath9k/gpio.c
 b/drivers/net/wireless/ath/ath9k/gpio.c
+@@ -24,6 +24,8 @@
+ #ifdef CPTCFG_MAC80211_LEDS
+ 
+ #include 
++#include 
++#include 
+ 
+ static void ath_led_brightness(struct led_classdev *led_cdev,
+  enum led_brightness brightness)
+@@ -308,6 +310,83 @@ void ath9k_unregister_gpio_chip(struct a
+   sc->gpiochip = NULL;
+ }
+ 
++/**/
++/*  GPIO Buttons  */
++/**/
++
++/* add GPIO buttons */
++void ath9k_init_buttons(struct ath_softc *sc)
++{
++  struct ath9k_platform_data *pdata = sc->dev->platform_data;
++  struct platform_device *pdev;
++  struct gpio_keys_platform_data gkpdata;
++  struct gpio_keys_button *bt;
++  int i;
++
++  if (!sc->gpiochip)
++  return;
++
++  bt = kmemdup(pdata->btns,
++   pdata->num_btns * sizeof(struct gpio_keys_button),
++   GFP_KERNEL);
++
++  if (!bt)
++  return;
++
++  pdev = platform_device_alloc("gpio-keys-polled", PLATFORM_DEVID_AUTO);
++
++  if (!pdev)
++  goto err_bt_free;
++
++  for (i = 0; i < pdata->num_btns; i++) {
++  ath9k_hw_cfg_gpio_input(sc->sc_ah, pdata->btns[i].gpio);
++  bt[i].gpio = sc->gpiochip->gchip.base + pdata->btns[i].gpio;
++  }
++
++  memset(&gkpdata, 0, sizeof(struct gpio_keys_platform_data));
++  gkpdata.buttons = bt;
++  gkpdata.nbuttons = pdata->num_btns;
++  gkpdata.poll_interval = pdata->btn_poll_interval;
++
++  if (platform_device_add_data(pdev, &gkpdata, sizeof(gkpdata)))
++  goto err_pdev_put;
++
++  if (platform_device_add(pdev))
++  goto err_pdev_put;
++
++  sc->btnpdev = pdev;
++
++  return;
++
++err_pdev_put:
++  platform_device_put(pdev);
++
++err_bt_free:
++  kfree(bt);
++}
++
++/* remove GPIO buttons */
++void ath9k_deinit_buttons(struct ath_softc *sc)
++{
++  struct gpio_keys_platform_data *gkpdata;
++  struct gpio_keys_button *bt = NULL;
++
++  if (!sc->gpiochip || !sc->btnpdev)
++  return;
++
++  gkpdata = sc->btnpdev->dev.platform_data;
++  if (gkpdata)
++  bt = gkpdata->buttons;
++
++  platform_device_del(sc->btnpdev);
++  platform_device_put(sc->btnpdev);
++
++  sc->btnpdev = NULL;
++
++  if (bt)
++  kfree(bt);
++}
++
+ #endif
+ 
+ /***/
+--- a/drivers/net/wireless/ath/ath9k/init.c
 b/drivers/net/wireless/ath/ath9k/init.c
+@@ -981,6 +981,7 @@ int ath9k_init_device(u16 devid, struct
+ 
+   ath9k_register_gpio_chip(sc);
+   ath_init_leds(sc);
++  ath9k_init_buttons(sc);
+   ath_start_rfkill_poll(sc);
+ 
+   return 0;
+@@ -1026,6 +1027,7 @@ void ath9k_deinit_device(struct ath_soft
+   ath9k_ps_wakeup(sc);
+ 
+   wiphy_rfkill_stop_polling(sc->hw->wiphy);
++  ath9k_deinit_but

[OpenWrt-Devel] [PATCHv2 4/8] ath9k: enable access to GPIO

2016-01-27 Thread Michal
From: Michal Cieslakiewicz 

Enable access to GPIO chip and its pins for Atheros AR92xx
wireless devices. For now AR9285 and AR9287 are supported.

Signed-off-by: Michal Cieslakiewicz 
---

(Removed unneeded pdata pointer check in ath9k_register_gpio_chip() function)

 .../patches/549-ath9k_enable_gpio_chip.patch   | 229 +
 1 file changed, 229 insertions(+)
 create mode 100644 
package/kernel/mac80211/patches/549-ath9k_enable_gpio_chip.patch

diff --git a/package/kernel/mac80211/patches/549-ath9k_enable_gpio_chip.patch 
b/package/kernel/mac80211/patches/549-ath9k_enable_gpio_chip.patch
new file mode 100644
index 000..d49c80f
--- /dev/null
+++ b/package/kernel/mac80211/patches/549-ath9k_enable_gpio_chip.patch
@@ -0,0 +1,229 @@
+--- a/drivers/net/wireless/ath/ath9k/ath9k.h
 b/drivers/net/wireless/ath/ath9k/ath9k.h
+@@ -24,6 +24,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ 
+ #include "common.h"
+ #include "debug.h"
+@@ -817,6 +818,13 @@ void ath_fill_led_pin(struct ath_softc *
+ int ath_create_gpio_led(struct ath_softc *sc, int gpio, const char *name,
+ const char *trigger, bool active_low);
+ 
++/***/
++/*  GPIO Chip  */
++/***/
++
++void ath9k_register_gpio_chip(struct ath_softc *sc);
++void ath9k_unregister_gpio_chip(struct ath_softc *sc);
++
+ #else
+ static inline void ath_init_leds(struct ath_softc *sc)
+ {
+@@ -828,6 +836,13 @@ static inline void ath_deinit_leds(struc
+ static inline void ath_fill_led_pin(struct ath_softc *sc)
+ {
+ }
++
++static inline void ath9k_register_gpio_chip(struct ath_softc *sc)
++{
++}
++static inline void ath9k_unregister_gpio_chip(struct ath_softc *sc)
++{
++}
+ #endif
+ 
+ //
+@@ -963,6 +978,12 @@ struct ath_led {
+   struct led_classdev cdev;
+ };
+ 
++struct ath9k_gpio_chip {
++  struct ath_softc *sc;
++  char label[32];
++  struct gpio_chip gchip;
++};
++
+ struct ath_softc {
+   struct ieee80211_hw *hw;
+   struct device *dev;
+@@ -1017,6 +1038,7 @@ struct ath_softc {
+ #ifdef CPTCFG_MAC80211_LEDS
+   const char *led_default_trigger;
+   struct list_head leds;
++  struct ath9k_gpio_chip *gpiochip;
+ #endif
+ 
+ #ifdef CPTCFG_ATH9K_DEBUGFS
+--- a/drivers/net/wireless/ath/ath9k/gpio.c
 b/drivers/net/wireless/ath/ath9k/gpio.c
+@@ -22,6 +22,9 @@
+ //
+ 
+ #ifdef CPTCFG_MAC80211_LEDS
++
++#include 
++
+ static void ath_led_brightness(struct led_classdev *led_cdev,
+  enum led_brightness brightness)
+ {
+@@ -60,6 +63,10 @@ static int ath_add_led(struct ath_softc
+   else
+   ath9k_hw_set_gpio(sc->sc_ah, gpio->gpio, gpio->active_low);
+ 
++  /* If there is GPIO chip configured, reserve LED pin */
++  if (sc->gpiochip)
++  gpio_request(sc->gpiochip->gchip.base + gpio->gpio, gpio->name);
++
+   return 0;
+ }
+ 
+@@ -116,6 +123,9 @@ void ath_deinit_leds(struct ath_softc *s
+ 
+   while (!list_empty(&sc->leds)) {
+   led = list_first_entry(&sc->leds, struct ath_led, list);
++  /* If there is GPIO chip configured, free LED pin */
++  if (sc->gpiochip)
++  gpio_free(sc->gpiochip->gchip.base + led->gpio->gpio);
+   list_del(&led->list);
+   ath_led_brightness(&led->cdev, LED_OFF);
+   led_classdev_unregister(&led->cdev);
+@@ -186,6 +196,118 @@ void ath_fill_led_pin(struct ath_softc *
+   /* LED off, active low */
+   ath9k_hw_set_gpio(ah, ah->led_pin, (ah->config.led_active_high) ? 0 : 
1);
+ }
++
++/***/
++/*  GPIO Chip  */
++/***/
++
++/* gpio_chip handler : set GPIO to input */
++static int ath9k_gpio_pin_cfg_input(struct gpio_chip *chip, unsigned offset)
++{
++  struct ath9k_gpio_chip *gc = container_of(chip, struct ath9k_gpio_chip,
++gchip);
++
++  ath9k_hw_cfg_gpio_input(gc->sc->sc_ah, offset);
++
++  return 0;
++}
++
++/* gpio_chip handler : set GPIO to output */
++static int ath9k_gpio_pin_cfg_output(struct gpio_chip *chip, unsigned offset,
++   int value)
++{
++  struct ath9k_gpio_chip *gc = container_of(chip, struct ath9k_gpio_chip,
++gchip);
++
++  ath9k_hw_cfg_output(gc->sc->sc_ah, offset,
++  AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
++  ath9k_hw_set_gpio(gc->sc->sc_ah, offset, value);
++
++  return 0;
++}
++
++/* gpio_chip handler : query GPIO direction (0=out, 1=in) */
++static int ath9k_gpio_pin_get_dir(struct gpio_chip *chip, unsigned offset)
++{
++  struct ath9k_gpio_chip *gc = container_of(chip, struct ath9k_gpio_chip,
++gchip);
++  struct ath_hw *ah = gc->sc->sc_ah;
++
++  return !((REG_READ(ah, AR_GPIO_OE_OUT) >> (offset * 2)) & 3);
++}
++
++/* gpio_chip handler

Re: [OpenWrt-Devel] [PATCH][ar71xx] Routerboard 951G Switch Fix

2016-01-27 Thread Anton Kalmykov


Hello John,
Sorry, I'm mistaken: my value is 0x6f00 (NOT 0x0600) and it works 
correctly.
And, yes, taking value from the bootloader is a nice idea, it would be good!

Anton

27.01.2016, 21:28, John Crispin wrote:


On 27/01/2016 17:03, Anton Kalmykov wrote:
> 
> Hi, 951G owners!

> I have RB951G-2HnD device with AR9344 rev 3. It is configured like that:
> - Balanced 2 WAN ports (mwan3)
> - ipsec LAN-to-LAN
> - OpenVPN server
> - about 30 clients (wi-fi, lan)
> 
> My results for different ath79_eth0_pll_data.pll_1000 values:
> 
> 0x3e00 - it worked fine with Barrier Breaker, but sometimes (one or

> two times per day) it was restarting suddenly. It was happening after I
> have configured mwan3.
> 0x0600 - it works wonderful with Chaos Calmer. The configuration is

so the conensus is that 0x0600 is correct ?

John



> the same. No problem with reboot. So, I would recommend this value.
> unpatched - of course it doesn't work. :-)
> 
> If it's useful, please add this information to wiki-page:

> 
https://wiki.openwrt.org/toh/mikrotik/rb2011uias#tracking_reported_experience_with_suggested_patch_for_the_5_gige_ports
> 
> 
> -- 
> Anton

> ___
> 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
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Question about custom script at init on Trunk.-

2016-01-27 Thread David Lang

On Wed, 27 Jan 2016, Karl Palsson wrote:


I think you may have misunderstood. S10_boot runs the files in
/etc/uci-defaults/*

The files in _/etc/uci-defaults/_ do not all start with a
numerical prefix, and are provided by any and all package that
has any config it wants to run. So, for a _package_ that wants to
do something "late" to do any sort of special target
configuration, such as changing serial ports or mount points for
an application based on the hardware it's running on, anything
like 99-xxx is not going to reliably be late at all.

Naming your uci-defaults file something like z999-something
will probably work, but it's pretty gross. If you instead try and
add your own _init_ script, with a START=99, you now don't even
run until the applications whose config you want to adjust have
already attempted startup, at whatever START=xx tag they have in
their own provided init script.

So, /etc/uci-defaults/z999-something works, but is there a
better way?


why do you have to change the files from something in uci-defaults?

can't you just put the corrected configs in the image (most of them are scripts, 
so you can add the needed smarts to them to have them pull in variables from 
elsewhere)


you can run a S01 script in init.d (or something late enough to work, early 
enough to run before whatever you need to change) and have it populate the 
variables that other things will use.


David Lang
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] kernel patch editing using QUILT=1

2016-01-27 Thread Rick van der Zwet
Hi,

As quilt is used for patch management it seems that behaviour as
described on the wiki
(https://wiki.openwrt.org/doc/devel/patches#adding_or_editing_kernel_patches)
between packages and kernel is different. For packages it will prepare
the environment when issued:

 make package/example/{clean,prepare} V=s QUILT=1

where-as for the kernel it will prepare _and_ apply the patches, when
issued:

make target/linux/{clean,prepare} V=s QUILT=1

Which command to issue to ensure the kernel environment is only prepared
instead?

Best regards,
/Rick
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Build error for IPQ806X

2016-01-27 Thread Tathagata Das
Hello,

I am getting build error while compiling latest OpenWRT trunk for IPQ806x.
Below is the error message.

Inconsistent kallsyms data
Try make KALLSYMS_EXTRA_PASS=1 as a workaround
make[4]: *** [vmlinux] Error 1

Regards,
Tathagata
---
Alumnus Software Ltd
Infinity, Tower-II, 2nd Floor,
Plot A3, Block GP, Sector V
Salt Lake City
Kolkata 700091
Phone : +91-33-23575626, +91-33-23575627, +91-33-23575628
 +91-33-23571036,+91-33-23571037, +91-33-23571038,
 +91-33-23571039 
Fax : +91-33-23575268
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel