Re: [LEDE-DEV] urandom seed & /etc mount time

2016-06-02 Thread John Crispin


On 02/06/2016 09:04, Etienne Champetier wrote:
> Hi John,
> 
> Le 2 juin 2016 07:04, "John Crispin"  > a écrit :
>>
>>
>> On 01/06/2016 23:39, Etienne Champetier wrote:
>> > Hi,
>> >
>> > i'm thinking about adding a urandom seed like any distro do,
>> > just need to know when /etc is first monted (inside procd or via
> init scripts?)
>> >
>> > Regards
>> > Etienne
>>
>> from within mount_root
> 
> First called in "boot" init script? After ubus has started?
> 
>>
>> John
>>
> 

i was not telling the truth

package/base-files/files/lib/preinit/80_mount_root

it depends on what kind of setup you have. on a !overlay setup /etc will
be available earlier. however after the 80_mount_root script executed,
/etc should be available on all setups, so probably best to hook it int
preinit as 81_urandom_seed ?

John

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] Multi-Profile selection support

2016-06-02 Thread Daniel Dickinson
On Mon, 2016-05-23 at 13:38 +0200, Felix Fietkau wrote: 
> Hi Daniel et al.
> 
> after a long delay, I finally got around to looking into multi profile
> selection again. After reviewing your code and thinking about it some
> more, I decided to go with a slightly different approach from the one
> that you took.
> 

Just to let you know I haven't forgotten about this, and hope to get to
it soon.  I've been sidetracked by some development I needed to do to
get some desktop/laptop system things I wanted working right.

Regards,

Daniel

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [RFC v3 2/2] x86: use sysfs DMI information to populate sysinfo

2016-06-02 Thread Karl Palsson

Dirk Neukirchen  wrote:
> On 01.06.2016 17:14, Jo-Philipp Wich wrote:
> > Use the DMI data available in sysfs to extract manufacturer and model info
> > and write it to /tmp/sysinfo/.
> > 
> > The data will be picked up by board_detect and can be used by e.g. LuCI to
> > display a more appropriate model description.
> > 
> > On an APU board the files will contain the following values:
> > 
> > # cat /tmp/sysinfo/model
> > PC Engines APU
> > 
> > # cat /tmp/sysinfo/board_name
> > pc-engines-apu
> > 
> > Signed-off-by: Jo-Philipp Wich 
> > ---
> >  target/linux/x86/base-files/lib/preinit/20_sysinfo | 16 
> >  1 file changed, 16 insertions(+)
> >  create mode 100644 target/linux/x86/base-files/lib/preinit/20_sysinfo
> > 
> > diff --git a/target/linux/x86/base-files/lib/preinit/20_sysinfo 
> > b/target/linux/x86/base-files/lib/preinit/20_sysinfo
> > new file mode 100644
> > index 000..0b836ce
> > --- /dev/null
> > +++ b/target/linux/x86/base-files/lib/preinit/20_sysinfo
> > @@ -0,0 +1,16 @@
> > +do_sysinfo_x86() {
> > +   local vendor product boardname
> > +
> > +   vendor="$(cat /sys/devices/virtual/dmi/id/sys_vendor 2>/dev/null)"
> > +   product="$(cat /sys/devices/virtual/dmi/id/product_name 2>/dev/null)"
> > +
> > +   [ -n "$vendor" -a -n "$product" ] || return
> > +
> > +   boardname="$(printf "%s %s" "$vendor" "$product" | tr 'A-Z' 'a-z' | tr 
> > -cs 'a-z0-9_-' '-')"
> > +
> > +   mkdir -p /tmp/sysinfo
> > +   echo "$boardname" > /tmp/sysinfo/board_name
> > +   echo "$vendor $product" > /tmp/sysinfo/model
> 
> Issue 1:
> Maybe change up variable naming to keep more in line with
> sysfs/DMI standards ? as future reference: [1]
> 
> on my normal(?) Intel ATX motherboard both sysfs entries are
> empty but board_name & board_vendor exist: I might expect to
> get /tmp/sysinfo/board_name from board_* and not from the sys_*
> or product* domain
> 
> cat /sys/devices/virtual/dmi/id/board_vendor 
> Intel Corporation
> cat /sys/devices/virtual/dmi/id/board_name 
> DZ77RE-75K
> 

fwiw, my hp laptop (and a colleagues other, newer HP) has both
sys_vendor and product_name (and they're sane...)
sys_vendor:Hewlett-Packard (board_vendor also exists, and is the
same as sys_vendor) product_name:HP EliteBook 8470p

It also has board_name, but it's "useless" 
board_name:179B

I generally like the patch though, it seems like a clear
improvement, even if there turn out to be edge cases.

Cheers,
Karl P


signature.asc
Description: OpenPGP Digital Signature
___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] package/util-linux: Fix libmount build under uClibc

2016-06-02 Thread Alexey Brodkin
Hi Waldemar,

On Wed, 2016-06-01 at 19:28 +0200, Waldemar Brodkorb wrote:
> Hi Alexey,
> 
> Alexey Brodkin wrote,
> 
> > 
> > Hi Waldemar,
> > 
> > On Mon, 2016-05-30 at 14:12 +0300, Alexey Brodkin wrote:
> > > 
> > > Hello,
> > > 
> > > On Thu, 2016-05-26 at 14:55 +0300, Alexey Brodkin wrote:
> > > > 
> > > > 
> > > > Hello,
> > > > 
> > > > On Mon, 2016-05-23 at 17:46 +0300, Alexey Brodkin wrote:
> > > > > 
> > > > > 
> > > > > 
> > > > > This fixes util-linux building with uClibc.
> > > > > Patch is taken as it is from Buildroot:
> > > > > https://git.busybox.net/buildroot/plain/package/util-linux/0001-Fix-libmount-build-under-uClibc.patch?id=baccb
> > > > > 506a
> > > > > 6f
> > > > > ea
> > > > > bf114623866568121f49712f5df
> > > > > 
> > > > > Signed-off-by: Alexey Brodkin 
> > > > > ---
> > > > >  .../004-Fix-libmount-build-under-uClibc.patch  | 153 
> > > > > +
> > > > >  1 file changed, 153 insertions(+)
> > > > >  create mode 100644 
> > > > > package/utils/util-linux/patches/004-Fix-libmount-build-under-uClibc.patch
> > We are discussing one issue with "util-linux" package building.
> > The problem is in "util-linux" wants to use alloc modifier (either "%as"
> > or "%ms") in scanf().
> > 
> > Looks like uClibc still doesn't support neither "%ms" nor "%as" (this one
> > is obsolete glibc-specific so let's not bother with it anyways).
> > 
> > Now to work-around this missing requirement we used to use
> > an off-the-tree patch like this one in Buildroot:
> > https://git.busybox.net/buildroot/tree/package/util-linux/0001-Fix-libmount-build-under-uClibc.patch
> > 
> > OpenWRT:
> > https://git.lede-project.org/?p=source.git;a=blob;f=package/utils/util-linux/patches/001-no-printf-alloc.patch;h=ad9
> > eef0
> > 959bf0c8ce269e8039d4d05ef58e1d527;hb=8a7b28071fba84e297796c46d46e12b0967804e8
> > 
> > Gentoo:
> > https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-apps/util-linux/files/util-linux-2.21.1-no-printf-alloc
> > .pat
> > ch?revision=1.2
> > 
> > The question to you is where do you think we should fix mentioned problem:
> >  1) In uClibc-ng with addition of "%ms" support in scanf or
> I would prefer this solution. I have started reading the code, but I
> can't give you any guarantee when I can work on this.
> Do you have free resources to cook up a patch? :)

You mean if I'm up to implement this missing feature in uClibc?
Well I'd like to but as well not sure if and when I have time for that :)

For now we have a work-around with mentioned patches. So that's not a 
showstopper.

-Alexey
___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] _GNU_SOURCE should be defined for building vs uClibc

2016-06-02 Thread Karl Palsson

Waldemar Brodkorb  wrote:
> > 
> > This still doesn't work on the uclibc in openwrt-CC branch. The
> > O_PATH definitions are in asm-generic/fcntl.h, which can be
> > included via linux/fcntl.h, _GNU_SOURCE doesn't get this pulled
> > in though.
> > 
> > I attempted to add includes for linux/fcntl, but it just gives me
> > redeclaration errors for struct flock.
> 
> The definition where added to uClibc-ng after 1.0.9 release.
> LEDE included 1.0.14 recently. You need to update.
> 

I'm well aware that it would work if I was on living on the
bleeding edge of latest LEDE. [1] I'm just reporting that, up
until this O_PATH landed, procd fixes were still backportable to
the last _released_ version of openwrt/lede. (uclibc 0.9.33.2)
That is no longer the case.

Sincerely,
Karl P


[1] Everything always works, you just haven't pulled the latest!

signature.asc
Description: OpenPGP Digital Signature
___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] package/util-linux: Fix libmount build under uClibc

2016-06-02 Thread John Crispin


On 02/06/2016 13:00, Alexey Brodkin wrote:
> Hi Waldemar,
> 
> On Wed, 2016-06-01 at 19:28 +0200, Waldemar Brodkorb wrote:
>> Hi Alexey,
>>
>> Alexey Brodkin wrote,
>>
>>>
>>> Hi Waldemar,
>>>
>>> On Mon, 2016-05-30 at 14:12 +0300, Alexey Brodkin wrote:

 Hello,

 On Thu, 2016-05-26 at 14:55 +0300, Alexey Brodkin wrote:
>
>
> Hello,
>
> On Mon, 2016-05-23 at 17:46 +0300, Alexey Brodkin wrote:
>>
>>
>>
>> This fixes util-linux building with uClibc.
>> Patch is taken as it is from Buildroot:
>> https://git.busybox.net/buildroot/plain/package/util-linux/0001-Fix-libmount-build-under-uClibc.patch?id=baccb
>> 506a
>> 6f
>> ea
>> bf114623866568121f49712f5df
>>
>> Signed-off-by: Alexey Brodkin 
>> ---
>>  .../004-Fix-libmount-build-under-uClibc.patch  | 153 
>> +
>>  1 file changed, 153 insertions(+)
>>  create mode 100644 
>> package/utils/util-linux/patches/004-Fix-libmount-build-under-uClibc.patch
>>> We are discussing one issue with "util-linux" package building.
>>> The problem is in "util-linux" wants to use alloc modifier (either "%as"
>>> or "%ms") in scanf().
>>>
>>> Looks like uClibc still doesn't support neither "%ms" nor "%as" (this one
>>> is obsolete glibc-specific so let's not bother with it anyways).
>>>
>>> Now to work-around this missing requirement we used to use
>>> an off-the-tree patch like this one in Buildroot:
>>> https://git.busybox.net/buildroot/tree/package/util-linux/0001-Fix-libmount-build-under-uClibc.patch
>>>
>>> OpenWRT:
>>> https://git.lede-project.org/?p=source.git;a=blob;f=package/utils/util-linux/patches/001-no-printf-alloc.patch;h=ad9
>>> eef0
>>> 959bf0c8ce269e8039d4d05ef58e1d527;hb=8a7b28071fba84e297796c46d46e12b0967804e8
>>>
>>> Gentoo:
>>> https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-apps/util-linux/files/util-linux-2.21.1-no-printf-alloc
>>> .pat
>>> ch?revision=1.2
>>>
>>> The question to you is where do you think we should fix mentioned problem:
>>>  1) In uClibc-ng with addition of "%ms" support in scanf or
>> I would prefer this solution. I have started reading the code, but I
>> can't give you any guarantee when I can work on this.
>> Do you have free resources to cook up a patch? :)
> 
> You mean if I'm up to implement this missing feature in uClibc?
> Well I'd like to but as well not sure if and when I have time for that :)
> 
> For now we have a work-around with mentioned patches. So that's not a 
> showstopper.
> 
> -Alexey
> 

well,t he requirement for keeping uclibc support in the tree is that
people fix uclibc issues. so someone has to fix it. waldemar promised to
address uclibc issues if we use his ng tree.

John


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] _GNU_SOURCE should be defined for building vs uClibc

2016-06-02 Thread John Crispin


On 02/06/2016 13:03, Karl Palsson wrote:
> 
> Waldemar Brodkorb  wrote:
>>>
>>> This still doesn't work on the uclibc in openwrt-CC branch. The
>>> O_PATH definitions are in asm-generic/fcntl.h, which can be
>>> included via linux/fcntl.h, _GNU_SOURCE doesn't get this pulled
>>> in though.
>>>
>>> I attempted to add includes for linux/fcntl, but it just gives me
>>> redeclaration errors for struct flock.
>>
>> The definition where added to uClibc-ng after 1.0.9 release.
>> LEDE included 1.0.14 recently. You need to update.
>>
> 
> I'm well aware that it would work if I was on living on the
> bleeding edge of latest LEDE. [1] I'm just reporting that, up
> until this O_PATH landed, procd fixes were still backportable to
> the last _released_ version of openwrt/lede. (uclibc 0.9.33.2)
> That is no longer the case.
> 
> Sincerely,
> Karl P
> 
> 
> [1] Everything always works, you just haven't pulled the latest!
> 

send a patch for procd ala

#ifndef O_PATH
#define O_PATH
#endif

drama solved

John

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] git.openwrt.org site half broken

2016-06-02 Thread Etienne Champetier
Hi,

someone messed with git.openwrt.org nginx config, i can't get the js and css.

see https://git.openwrt.org/project/static/gitweb.css (doesn't look
like a css :) )

Cheers
Etienne

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] Add info about git URLs in Lede Git Web

2016-06-02 Thread Alexey Brodkin
Hello,

I think it would be quite convenient to add info about URLs
that could be used for accessing Lede repos via git.

In OpenWRT Git Web we had something like that:
--->8---
URL  http://git.openwrt.org/openwrt.git
     https://git.openwrt.org/openwrt.git
     git://git.openwrt.org/openwrt.git
--->8---

In case of Lede we don't have this information for example here:
https://git.lede-project.org/?p=source.git;a=summary

and every time one needs to figure out what is a correct URL that
should be passed to git. And it's not only URL itself but what
could be even more important what protocols could be used: git, http, https?

-Alexey
___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] Add info about git URLs in Lede Git Web

2016-06-02 Thread Bjørn Mork
Alexey Brodkin  writes:

> Hello,
>
> I think it would be quite convenient to add info about URLs
> that could be used for accessing Lede repos via git.
>
> In OpenWRT Git Web we had something like that:
> --->8---
> URL  http://git.openwrt.org/openwrt.git
>      https://git.openwrt.org/openwrt.git
>      git://git.openwrt.org/openwrt.git
> --->8---
>
> In case of Lede we don't have this information for example here:
> https://git.lede-project.org/?p=source.git;a=summary
>
> and every time one needs to figure out what is a correct URL that
> should be passed to git. And it's not only URL itself but what
> could be even more important what protocols could be used: git, http, https?

+1


This should be as easy as setting

  @git_base_url_list = ('http://git.lede-project.org', 
'git://git.lede-project.org');

in gitweb.conf



Bjørn

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] Supported device list and documentation over at openwrt.org

2016-06-02 Thread Fernando Frediani
This is a fantastic thing in OpenWrt and very helpful and I think
should be ported to LEDEas is. And I made myself available to help
with this once a Wiki is defined. However, if I understood correctlly,
someone pointed that "we" don't want specific device page which is
strange in my point of view.

Fernando

On 1 June 2016 at 20:45, Gareth Parker  wrote:
> There is a lot of very useful specific router documentation still over at
> openwrt.org, technical details, de-bricking info, device mods, plus loads
> more info and photos relating to lots of individual devices.  Would it not
> be wise to also bring this over to the lede website?  I quite often refer
> back to a lot of this documentation.  With the openwrt problems and changes
> recently and people leaving openwrt for lede, I’m worried this documentation
> is in jeopardy of being lost.  I’ve seen this happen with other websites.
> If this were to happen it would certainly make life very difficult for some
> people, I often refer back to the openwrt website for quite a few things
> from time to time.  This plus the forum history is not mirrored anywhere
> else I’m aware of, correct me if I’m wrong though.
>
> Gareth
>
>
>
> ___
> Lede-dev mailing list
> Lede-dev@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [uclibc-ng-devel] [PATCH] package/util-linux: Fix libmount build under uClibc

2016-06-02 Thread Max Filippov
Hi Alexey,

On Wed, Jun 1, 2016 at 10:56 AM, Alexey Brodkin
 wrote:
> We are discussing one issue with "util-linux" package building.
> The problem is in "util-linux" wants to use alloc modifier (either "%as"
> or "%ms") in scanf().
>
> Looks like uClibc still doesn't support neither "%ms" nor "%as" (this one
> is obsolete glibc-specific so let's not bother with it anyways).

a while ago I touched %m support for %c and %[...] in uclibc
(b2d27c71bd13820a4263fa7ebda4c1a4a95b501c),
I've got an impression that %ms was working. I've expanded
test/stdio/scanf_m.c a bit (attached) and it appears to work.
So I'm curious, how the issue manifests itself.

-- 
Thanks.
-- Max
From a018296d1908ad02f942cab0559a24ed3dd261e8 Mon Sep 17 00:00:00 2001
From: Max Filippov 
Date: Thu, 2 Jun 2016 18:24:28 +0300
Subject: [PATCH] tests: add %ms scanf format test

Signed-off-by: Max Filippov 
---
 test/stdio/scanf_m.c | 17 ++---
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/test/stdio/scanf_m.c b/test/stdio/scanf_m.c
index 0ce78b6..e1dde27 100644
--- a/test/stdio/scanf_m.c
+++ b/test/stdio/scanf_m.c
@@ -5,20 +5,23 @@
 int main(void)
 {
 	const char *buf = "hello world";
-	char *ps = NULL, *pc = NULL;
-	char s[6], c;
+	char *ps = NULL, *pc = NULL, *ps2 = NULL;
+	char s[6], c, s2[5];
 
-	/* Check that %[...]/%c work. */
-	sscanf(buf, "%[a-z] %c", s, &c);
-	/* Check that %m[...]/%mc work. */
-	sscanf(buf, "%m[a-z] %mc", &ps, &pc);
+	/* Check that %[...]/%c/%s work. */
+	sscanf(buf, "%[a-z] %c %s", s, &c, s2);
+	/* Check that %m[...]/%mc/%ms work. */
+	sscanf(buf, "%m[a-z] %mc %ms", &ps, &pc, &ps2);
 
 	if (strcmp(ps, "hello") != 0 || *pc != 'w' ||
-	strcmp(s, "hello") != 0 || c != 'w')
+	strcmp(ps2, "orld") != 0 ||
+	strcmp(s, "hello") != 0 || c != 'w' ||
+	strcmp(s2, "orld") != 0)
 		return 1;
 
 	free(ps);
 	free(pc);
+	free(ps2);
 
 	return 0;
 }
-- 
2.1.4

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] Add info about git URLs in Lede Git Web

2016-06-02 Thread Ted Hess
Check it out now...

/ted

On Thu, 2016-06-02 at 13:41 +, Alexey Brodkin wrote:
> Hello,
> 
> I think it would be quite convenient to add info about URLs
> that could be used for accessing Lede repos via git.
> 
> In OpenWRT Git Web we had something like that:
> --->8---
> URL  http://git.openwrt.org/openwrt.git
>      https://git.openwrt.org/openwrt.git
>      git://git.openwrt.org/openwrt.git
> --->8---
> 
> In case of Lede we don't have this information for example here:
> https://git.lede-project.org/?p=source.git;a=summary
> 
> and every time one needs to figure out what is a correct URL that
> should be passed to git. And it's not only URL itself but what
> could be even more important what protocols could be used: git, http, https?
> 
> -Alexey
> ___
> Lede-dev mailing list
> Lede-dev@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] Add info about git URLs in Lede Git Web

2016-06-02 Thread John Crispin


On 02/06/2016 19:02, Ted Hess wrote:
> Check it out now...
> 

 the funk soul brothers

> /ted
> 
> On Thu, 2016-06-02 at 13:41 +, Alexey Brodkin wrote:
>> Hello,
>>
>> I think it would be quite convenient to add info about URLs
>> that could be used for accessing Lede repos via git.
>>
>> In OpenWRT Git Web we had something like that:
>> --->8---
>> URL  http://git.openwrt.org/openwrt.git
>>  https://git.openwrt.org/openwrt.git
>>  git://git.openwrt.org/openwrt.git
>> --->8---
>>
>> In case of Lede we don't have this information for example here:
>> https://git.lede-project.org/?p=source.git;a=summary
>>
>> and every time one needs to figure out what is a correct URL that
>> should be passed to git. And it's not only URL itself but what
>> could be even more important what protocols could be used: git, http, https?
>>
>> -Alexey
>> ___
>> Lede-dev mailing list
>> Lede-dev@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/lede-dev
> 
> 
> ___
> Lede-dev mailing list
> Lede-dev@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev
> 

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] Add info about git URLs in Lede Git Web

2016-06-02 Thread Alexey Brodkin
Hi Ted,

On Thu, 2016-06-02 at 13:02 -0400, Ted Hess wrote:
> Check it out now...

Indeed it's there!

Thanks a bunch!

-Alexey
___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [uclibc-ng-devel] [PATCH] package/util-linux: Fix libmount build under uClibc

2016-06-02 Thread Alexey Brodkin
Hi Max,

On Thu, 2016-06-02 at 19:31 +0300, Max Filippov wrote:
> Hi Alexey,
> 
> On Wed, Jun 1, 2016 at 10:56 AM, Alexey Brodkin
>  wrote:
> > 
> > We are discussing one issue with "util-linux" package building.
> > The problem is in "util-linux" wants to use alloc modifier (either "%as"
> > or "%ms") in scanf().
> > 
> > Looks like uClibc still doesn't support neither "%ms" nor "%as" (this one
> > is obsolete glibc-specific so let's not bother with it anyways).
> a while ago I touched %m support for %c and %[...] in uclibc
> (b2d27c71bd13820a4263fa7ebda4c1a4a95b501c),
> I've got an impression that %ms was working. I've expanded
> test/stdio/scanf_m.c a bit (attached) and it appears to work.
> So I'm curious, how the issue manifests itself.

During configuration of "util-linux" it tests if "%as" or "ms" could
be used when compiling a simple test. If not then "libmount" gets disabled.

Then in OpenWRT/Lede on installation of "util-linux" to staging folder
explicit "cp" is executed for copying some of "libmount" build artifacts and
since "libmount" was never built "cp" fails and so entire build stops.

-Alexey
___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [RFC v3 1/2] x86: enable DMI and DMI_SYSFS

2016-06-02 Thread Stijn Tintel
On 01-06-16 17:14, Jo-Philipp Wich wrote:
> Enable support for DMI decoding in the kernel so that we can access
> manufacturer and model information via sysfs.
>
> Signed-off-by: Jo-Philipp Wich 
> ---
>  target/linux/x86/config-4.4 | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/target/linux/x86/config-4.4 b/target/linux/x86/config-4.4
> index 5b54031..bb6ef65 100644
> --- a/target/linux/x86/config-4.4
> +++ b/target/linux/x86/config-4.4
> @@ -98,7 +98,8 @@ CONFIG_DECOMPRESS_BZIP2=y
>  CONFIG_DECOMPRESS_GZIP=y
>  CONFIG_DEFAULT_IO_DELAY_TYPE=0
>  # CONFIG_DELL_RBU is not set
> -# CONFIG_DMI is not set
> +CONFIG_DMI=y
> +CONFIG_DMI_SYSFS=y
>  CONFIG_DNOTIFY=y
>  CONFIG_DUMMY_CONSOLE=y
>  CONFIG_EARLY_PRINTK=y
This change causes missing symbols for x86/64, possibly other subtargets:
DMIID
LEDS_CLEVO_MAIL

And I think we should enable this for all x86 subtargets.

Stijn

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [uclibc-ng-devel] [PATCH] package/util-linux: Fix libmount build under uClibc

2016-06-02 Thread Max Filippov
On Thu, Jun 2, 2016 at 7:46 PM, Waldemar Brodkorb  wrote:
> Hi,
> Max Filippov wrote,
>
>> Hi Alexey,
>>
>> On Wed, Jun 1, 2016 at 10:56 AM, Alexey Brodkin
>>  wrote:
>> > We are discussing one issue with "util-linux" package building.
>> > The problem is in "util-linux" wants to use alloc modifier (either "%as"
>> > or "%ms") in scanf().
>> >
>> > Looks like uClibc still doesn't support neither "%ms" nor "%as" (this one
>> > is obsolete glibc-specific so let's not bother with it anyways).
>>
>> a while ago I touched %m support for %c and %[...] in uclibc
>> (b2d27c71bd13820a4263fa7ebda4c1a4a95b501c),
>> I've got an impression that %ms was working. I've expanded
>> test/stdio/scanf_m.c a bit (attached) and it appears to work.
>> So I'm curious, how the issue manifests itself.
>
> Thanks for the patch.
> Indeed I was wondering why I have no patch included
> in OpenADK. I am overriding the configure check:
> CONFIGURE_ENV+= have_scanf_alloc_modifier=yes \
> scanf_cv_alloc_modifier=ms
>
> So either the autoconf check is faulty or uClibc-ng implementation
> is somehow not correct.
>
> We need to check the autoconf configure check.

The check looks like this:

|  #include 
|  #include 
|
|  #ifdef __GLIBC__
|
|  #if !(__GLIBC_PREREQ(2, 7))
|  #error %m is not available
|  #endif
|
|  #elif defined(_POSIX_VERSION)
|
|  #if _POSIX_VERSION < 200809L
|  #error %m is not available
|  #endif
|
|  #else
|  #error Your C-library is not supported.
|  #endif


And its result with uClibc-ng is the following:

conftest.c:136:7: error: #error %m is not available
  #error %m is not available

Because we have the following definition in features.h:

/* Major and minor version number of the GNU C library package.  Use
   these macros to test for features in specific releases.  */
/* Don't do it, if you want to keep uClibc happy.  */
#define __GLIBC__   2
#define __GLIBC_MINOR__ 2

-- 
Thanks.
-- Max

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH v2 1/2] lantiq: unmacro tp-link boards

2016-06-02 Thread Hauke Mehrtens
On 06/01/2016 12:30 AM, Alexander Couzens wrote:
> On Tue, 31 May 2016 22:46:11 +0200
> Oswald Buddenhagen  wrote:
> 
>> you're undoing work by hauke et. al from just a few weeks ago. ;)
> ooops. ;P

Not really, I was converting this to the new image build system. This is
just a minor change.

I think this is ok.

Hauke





signature.asc
Description: OpenPGP digital signature
___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH v2 1/2] lantiq: unmacro tp-link boards

2016-06-02 Thread John Crispin


On 02/06/2016 22:57, Hauke Mehrtens wrote:
> On 06/01/2016 12:30 AM, Alexander Couzens wrote:
>> On Tue, 31 May 2016 22:46:11 +0200
>> Oswald Buddenhagen  wrote:
>>
>>> you're undoing work by hauke et. al from just a few weeks ago. ;)
>> ooops. ;P
> 
> Not really, I was converting this to the new image build system. This is
> just a minor change.
> 
> I think this is ok.
> 
> Hauke
> 

indeed, i unmacroed it even more

https://git.lede-project.org/?p=lede/blogic/staging.git;a=commit;h=016e2677b2670a3ccd14c5deaa7c2ace9209eac3

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] urandom-seed: add initial implementation

2016-06-02 Thread Etienne CHAMPETIER
This package:
1) seed /dev/urandom with a saved seed as early as possible
(using /lib/preinit/81_urandom_seed)
2) save a new seed using getrandom() so we are sure /dev/urandom
   pool is initialized (using /etc/init.d/urandom_seed)

seed size is 512 bytes (ie /proc/sys/kernel/random/poolsize / 8)
it's the same size as in ubuntu 14.04 and all systemd systems

seed file is /etc/urandom.seed (need a writable path)

seeding /dev/urandom doesn't change entropy estimation, so we still have
"random: ubus urandom read with 4 bits of entropy available"
messages in the logs, but we can now ignore them

Once tested on enough configuration (jffs2/ext4/ubifs/...)
this package should be added to DEFAULT_PACKAGES

We could also add an urandom.seed at build time to improve first boot

Signed-off-by: Etienne CHAMPETIER 
---
 package/utils/urandom-seed/Makefile| 53 
 .../urandom-seed/files/81_urandom_seed.preinit | 15 ++
 package/utils/urandom-seed/files/getrandom.c   | 58 ++
 package/utils/urandom-seed/files/urandom_seed.init | 19 +++
 4 files changed, 145 insertions(+)
 create mode 100644 package/utils/urandom-seed/Makefile
 create mode 100644 package/utils/urandom-seed/files/81_urandom_seed.preinit
 create mode 100644 package/utils/urandom-seed/files/getrandom.c
 create mode 100644 package/utils/urandom-seed/files/urandom_seed.init

diff --git a/package/utils/urandom-seed/Makefile 
b/package/utils/urandom-seed/Makefile
new file mode 100644
index 000..ac58bfc
--- /dev/null
+++ b/package/utils/urandom-seed/Makefile
@@ -0,0 +1,53 @@
+#
+# Copyright (C) 2016 Etienne CHAMPETIER 
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=urandom-seed
+PKG_RELEASE:=1
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=COPYING
+PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)_$(PKG_RELEASE)
+PKG_FLAGS:=nonshared
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/urandom-seed
+  SECTION:=utils
+  CATEGORY:=Base system
+  TITLE:=Seed /dev/urandom on startup
+  MAINTAINER:=Etienne CHAMPETIER 
+endef
+
+define Package/urandom-seed/description
+This package takes care of loading a previously saved seed into /dev/urandom,
+and save a new seed from getrandom()
+endef
+
+define Build/Prepare
+   mkdir -p $(PKG_BUILD_DIR)
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+   $(TARGET_CC) $(TARGET_CFLAGS) ./files/getrandom.c -o 
$(PKG_BUILD_DIR)/getrandom
+endef
+
+define Package/urandom-seed/install
+   $(INSTALL_DIR) $(1)/usr/bin
+   $(INSTALL_BIN) $(PKG_BUILD_DIR)/getrandom $(1)/usr/bin/
+
+   $(INSTALL_DIR) $(1)/lib/preinit
+   $(INSTALL_DATA) ./files/81_urandom_seed.preinit 
$(1)/lib/preinit/81_urandom_seed
+
+   $(INSTALL_DIR) $(1)/etc/init.d
+   $(INSTALL_BIN) ./files/urandom_seed.init $(1)/etc/init.d/urandom_seed
+endef
+
+$(eval $(call BuildPackage,urandom-seed))
diff --git a/package/utils/urandom-seed/files/81_urandom_seed.preinit 
b/package/utils/urandom-seed/files/81_urandom_seed.preinit
new file mode 100644
index 000..27ff587
--- /dev/null
+++ b/package/utils/urandom-seed/files/81_urandom_seed.preinit
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+do_urandom_seed() {
+S=/etc/urandom.seed
+U=/dev/urandom
+
+[ -c $U ] || { echo "Something is wrong with $U"; return; }
+[ -f $S ] || { echo "Seed file not found: $S"; return; }
+[ -O $S -a -G $S -a ! -x $S ] || { echo "Wrong owner / permissions for 
$S"; return; }
+
+echo "Seeding $U with $S"
+cat $S > $U
+}
+
+boot_hook_add preinit_main do_urandom_seed
diff --git a/package/utils/urandom-seed/files/getrandom.c 
b/package/utils/urandom-seed/files/getrandom.c
new file mode 100644
index 000..2093ef8
--- /dev/null
+++ b/package/utils/urandom-seed/files/getrandom.c
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2016 Etienne Champetier 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+#define _GNU_SOURCE
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define ERROR_EXIT(fmt, ...) do { \
+fprintf(stderr, fmt, ## __VA_ARGS__); \
+return EXIT_FAILURE; \
+} while (0)
+
+int usage(char *name)
+{
+fprintf(stderr, "Usage: %s \n", name);
+fprintf(stderr, " => return  bytes from getrandom()\n");
+return EXIT_FAILURE;
+}
+
+int main(int argc, char *argv[])
+{
+if (argc != 2)
+return usage(argv[0]);
+
+if (isatty(STDOUT_FILENO))

[LEDE-DEV] [PATCH] cyassl/wolfssl: update to 3.9.0

2016-06-02 Thread Kaleb Himes
Hi Dirk and LEDE members,

We noticed this is a reboot of the OpenWRT project whom we actively
supported in the past. We wanted to reach out to the community today
and let you know we are aware of the restructuring going on and look
forward to actively supporting LEDE as we did OpenWRT. As fans of open
source software we provide free support to all open source projects!

Could you tell us a little more about what is new in this community
and what we have missed out on during the reboot? We are excited to
see someone is consciously making an effort to drive development of an
embedded linux distribution.

Could you let us know how our embedded ssl / tls library is working for you?

We try to put out 7-8 releases per year and the latest can always be
retrieved here: https://wolfssl.com/wolfSSL/download/downloadForm.php

Alternatively you can clone our development branch from github here:
https://github.com/wolfSSL/wolfssl

Thank you for your time, we look forward to an ongoing relationship
with the LEDE community and are always eager to collaborate.

Feel free to contact us anytime i...@wolfssl.com or supp...@wolfssl.com.


Kind Regards,

The wolfSSL Team
www.wolfssl.com
Kaleb Himes

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] fix uClibc-ng scanf check

2016-06-02 Thread Waldemar Brodkorb
uClibc-ng tries to be compatible with GNU libc and defines
__GLIBC__ and pretend to be version 2.2.
We once changed it to 2.10, but then some hard to fix problems
in different software packages (gcc) occured.
It would be better if we disable the special GNU libc checks
for uClibc-ng here. uClibc-ng implements the required scanf
functionality.

Signed-off-by: Waldemar Brodkorb 
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index f36b18c..4661c0d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -581,7 +581,7 @@ AC_CACHE_VAL([scanf_cv_alloc_modifier],
  #include 
  #include 
 
- #ifdef __GLIBC__
+ #if defined(__GLIBC__) && !defined(__UCLIBC__)
 
  #if !(__GLIBC_PREREQ(2, 7))
  #error %m is not available
-- 
2.1.4


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev