New package: Entware-ng

Marvell Kirkwood based
Post Reply
Mijzelf
Posts: 6251
Joined: Mon Jun 16, 2008 10:45 am

Re: New package: Entware-ng

Post by Mijzelf » Sun Jan 14, 2018 1:28 pm

Entware-ng indeed starts/stops the (executable) scripts in /opt/etc/init.d/, but you can't simply move the scripts from /ffp/start/ to that directory.

You'll have to exchange the she-bang. An FFP script starts with #!/ffp/bin/sh, an Entware-ng script should start with #!/bin/sh .
Further in Entware-ng a script ending with '.sh', is sourced, which means that it will run in the context of the calling script. That has a speed advantage, but if the script crashes, it will also take down the calling script, stopping the Entware-ng startup. So you'd better remove the extension.

dexhain
Posts: 28
Joined: Tue Apr 02, 2013 11:50 am

Re: New package: Entware-ng

Post by dexhain » Fri Jan 19, 2018 12:59 pm

Anyone having issues with the January batch of entware-ng updates (11th, I think)? I can't use bash as my shell anymore, just exits straight way. Have switched to ash for the user shell (/opt/bin/sh), and if I try to launch bash from there:

Code: Select all

root@NSA325:/usr/local/zy-pkgs/opt/home$ bash
root@NSA325:~$ exit
root@NSA325:/usr/local/zy-pkgs/opt/home$
I only type bash, the exit happens automatically and immediately. Have tried using the default /opt/etc/profile, but doesn't make a difference. Also tried re-installing the bash package, but no joy

Also having issues with python3, even after a complete uninstall and reinstall of all python3 packages. Can't create a virtual environment using virtualenv, get the following error:

Code: Select all

ValueError: '/opt/lib/python3.6/distutils/__init__.py/__init__.pyc' is not a package
Any ideas?

philippetev
Posts: 82
Joined: Tue Apr 17, 2012 7:45 am

Re: New package: Entware-ng

Post by philippetev » Mon Jan 22, 2018 10:18 pm

Guys, does anyone know why bash exits every time when I try to start it? It issues the "exit" command every time and I'm back to busybox. Is there any way to change the default shell in Entware-ng from busybox to bash?
ZyXEL NSA-310 FW 4.70(AFK.1) MetaRepository + Fonz Fun Plug 0.7zypkg004

Mijzelf
Posts: 6251
Joined: Mon Jun 16, 2008 10:45 am

Re: New package: Entware-ng

Post by Mijzelf » Tue Jan 23, 2018 6:48 pm

I'm afraid that's a complicated issue. According to strace it tries to call pselect6, just before it exits, and pselect6 is not implemented.

Code: Select all

write(2, "admin@NSA325:/tmp/slog$ ", 24) = 24
pselect6(1, [0], NULL, NULL, NULL, {[], 8}) = -1 ENOSYS (Function not implemented)
ioctl(0, SNDCTL_TMR_STOP or SNDRV_TIMER_IOCTL_GINFO or TCSETSW, {B38400 opost isig icanon echo ...}) = 0
rt_sigaction(SIGINT, {0x6a480, [], SA_RESTORER, 0x400f43d0}, {0xb6af4, [], SA_RESTORER, 0x400f43d0}, 8) = 0
rt_sigaction(SIGTERM, {0x69fac, [], SA_RESTORER|SA_RESTART, 0x400f43d0}, {0xb6af4, [], SA_RESTORER, 0x400f43d0}, 8) = 0
rt_sigaction(SIGHUP, {0x6a720, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x400f43d0}, {0xb6af4, [], SA_RESTORER,
 0x400f43d0}, 8) = 0
rt_sigaction(SIGALRM, {0x6a720, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x400f43d0}, {0xb6af4, [], SA_RESTORER
, 0x400f43d0}, 8) = 0
rt_sigaction(SIGWINCH, {0x69f98, [], SA_RESTORER, 0x400f43d0}, {0xb624c, [], SA_RESTORER|SA_RESTART, 0x400f43d0}, 8) = 0
rt_sigaction(SIGINT, {0x6a480, [], SA_RESTORER, 0x400f43d0}, {0x6a480, [], SA_RESTORER, 0x400f43d0}, 8) = 0
write(2, "exit\n", 5)
That is strange, the function should be available since kernel 2.6.16.

I transplanted the Entware tree to my NAS520, and suddenly bash works. The corresponding log from the NAS520:

Code: Select all

write(2, "admin@NAS520:/tmp/slog$ ", 24) = 24
pselect6(1, [0], NULL, NULL, NULL, {[], 8}) = 1 (in [0])
read(0, "e", 1)                         = 1
select(1, [0], NULL, [0], {0, 0})       = 0 (Timeout)
write(2, "e", 1)                        = 1
pselect6(1, [0], NULL, NULL, NULL, {[], 8}) = 1 (in [0])
read(0, "x", 1)                         = 1
select(1, [0], NULL, [0], {0, 0})       = 0 (Timeout)
write(2, "x", 1)                        = 1
pselect6(1, [0], NULL, NULL, NULL, {[], 8}) = 1 (in [0])
read(0, "i", 1)                         = 1
select(1, [0], NULL, [0], {0, 0})       = 0 (Timeout)
write(2, "i", 1)                        = 1
pselect6(1, [0], NULL, NULL, NULL, {[], 8}) = 1 (in [0])
read(0, "t", 1)                         = 1
select(1, [0], NULL, [0], {0, 0})       = 0 (Timeout)
write(2, "t", 1)                        = 1
pselect6(1, [0], NULL, NULL, NULL, {[], 8}) = 1 (in [0])
read(0, "\r", 1)                        = 1
write(2, "\n", 1)                       = 1
ioctl(0, SNDCTL_TMR_STOP or SNDRV_TIMER_IOCTL_GINFO or TCSETSW, {B38400 opost isig icanon echo ...}) = 0
rt_sigaction(SIGINT, {0x6a480, [], SA_RESTORER, 0x2ad2b500}, {0xb6af4, [], SA_RESTORER, 0x2ad2b500}, 8) = 0
rt_sigaction(SIGTERM, {0x69fac, [], SA_RESTORER|SA_RESTART, 0x2ad2b500}, {0xb6af4, [], SA_RESTORER, 0x2ad2b500}, 8) = 0
rt_sigaction(SIGHUP, {0x6a720, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x2ad2b500}, {0xb6af4, [], SA_RESTORER,
 0x2ad2b500}, 8) = 0
rt_sigaction(SIGALRM, {0x6a720, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x2ad2b500}, {0xb6af4, [], SA_RESTORER
, 0x2ad2b500}, 8) = 0
rt_sigaction(SIGWINCH, {0x69f98, [], SA_RESTORER, 0x2ad2b500}, {0xb624c, [], SA_RESTORER|SA_RESTART, 0x2ad2b500}, 8) = 0
rt_sigaction(SIGINT, {0x6a480, [], SA_RESTORER, 0x2ad2b500}, {0x6a480, [], SA_RESTORER, 0x2ad2b500}, 8) = 0
gettimeofday({1516732454, 55143}, NULL) = 0
write(2, "exit\n", 5)                   = 5
As you can see it uses pselect6 to wait for keystrokes. And you see me typing 'exit', and bash exits.

Don't know how to handle this. Maybe I have to create a libc for kernel 2.6.15, so that libc will contain a stub for pselect6. But if bash calls pselect6 directly, that won't help. (And it would be bad practice, from the bash maintainers)
Is there any way to change the default shell in Entware-ng from busybox to bash?
viewtopic.php?f=249&t=18281&start=60#p108965

philippetev
Posts: 82
Joined: Tue Apr 17, 2012 7:45 am

Re: New package: Entware-ng

Post by philippetev » Tue Jan 23, 2018 7:21 pm

Mijzelf wrote:I'm afraid that's a complicated issue. According to strace it tries to call pselect6, just before it exits, and pselect6 is not implemented.

Code: Select all

write(2, "admin@NSA325:/tmp/slog$ ", 24) = 24
pselect6(1, [0], NULL, NULL, NULL, {[], 8}) = -1 ENOSYS (Function not implemented)
ioctl(0, SNDCTL_TMR_STOP or SNDRV_TIMER_IOCTL_GINFO or TCSETSW, {B38400 opost isig icanon echo ...}) = 0
rt_sigaction(SIGINT, {0x6a480, [], SA_RESTORER, 0x400f43d0}, {0xb6af4, [], SA_RESTORER, 0x400f43d0}, 8) = 0
rt_sigaction(SIGTERM, {0x69fac, [], SA_RESTORER|SA_RESTART, 0x400f43d0}, {0xb6af4, [], SA_RESTORER, 0x400f43d0}, 8) = 0
rt_sigaction(SIGHUP, {0x6a720, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x400f43d0}, {0xb6af4, [], SA_RESTORER,
 0x400f43d0}, 8) = 0
rt_sigaction(SIGALRM, {0x6a720, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x400f43d0}, {0xb6af4, [], SA_RESTORER
, 0x400f43d0}, 8) = 0
rt_sigaction(SIGWINCH, {0x69f98, [], SA_RESTORER, 0x400f43d0}, {0xb624c, [], SA_RESTORER|SA_RESTART, 0x400f43d0}, 8) = 0
rt_sigaction(SIGINT, {0x6a480, [], SA_RESTORER, 0x400f43d0}, {0x6a480, [], SA_RESTORER, 0x400f43d0}, 8) = 0
write(2, "exit\n", 5)
That is strange, the function should be available since kernel 2.6.16.

I transplanted the Entware tree to my NAS520, and suddenly bash works. The corresponding log from the NAS520:

Code: Select all

write(2, "admin@NAS520:/tmp/slog$ ", 24) = 24
pselect6(1, [0], NULL, NULL, NULL, {[], 8}) = 1 (in [0])
read(0, "e", 1)                         = 1
select(1, [0], NULL, [0], {0, 0})       = 0 (Timeout)
write(2, "e", 1)                        = 1
pselect6(1, [0], NULL, NULL, NULL, {[], 8}) = 1 (in [0])
read(0, "x", 1)                         = 1
select(1, [0], NULL, [0], {0, 0})       = 0 (Timeout)
write(2, "x", 1)                        = 1
pselect6(1, [0], NULL, NULL, NULL, {[], 8}) = 1 (in [0])
read(0, "i", 1)                         = 1
select(1, [0], NULL, [0], {0, 0})       = 0 (Timeout)
write(2, "i", 1)                        = 1
pselect6(1, [0], NULL, NULL, NULL, {[], 8}) = 1 (in [0])
read(0, "t", 1)                         = 1
select(1, [0], NULL, [0], {0, 0})       = 0 (Timeout)
write(2, "t", 1)                        = 1
pselect6(1, [0], NULL, NULL, NULL, {[], 8}) = 1 (in [0])
read(0, "\r", 1)                        = 1
write(2, "\n", 1)                       = 1
ioctl(0, SNDCTL_TMR_STOP or SNDRV_TIMER_IOCTL_GINFO or TCSETSW, {B38400 opost isig icanon echo ...}) = 0
rt_sigaction(SIGINT, {0x6a480, [], SA_RESTORER, 0x2ad2b500}, {0xb6af4, [], SA_RESTORER, 0x2ad2b500}, 8) = 0
rt_sigaction(SIGTERM, {0x69fac, [], SA_RESTORER|SA_RESTART, 0x2ad2b500}, {0xb6af4, [], SA_RESTORER, 0x2ad2b500}, 8) = 0
rt_sigaction(SIGHUP, {0x6a720, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x2ad2b500}, {0xb6af4, [], SA_RESTORER,
 0x2ad2b500}, 8) = 0
rt_sigaction(SIGALRM, {0x6a720, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x2ad2b500}, {0xb6af4, [], SA_RESTORER
, 0x2ad2b500}, 8) = 0
rt_sigaction(SIGWINCH, {0x69f98, [], SA_RESTORER, 0x2ad2b500}, {0xb624c, [], SA_RESTORER|SA_RESTART, 0x2ad2b500}, 8) = 0
rt_sigaction(SIGINT, {0x6a480, [], SA_RESTORER, 0x2ad2b500}, {0x6a480, [], SA_RESTORER, 0x2ad2b500}, 8) = 0
gettimeofday({1516732454, 55143}, NULL) = 0
write(2, "exit\n", 5)                   = 5
As you can see it uses pselect6 to wait for keystrokes. And you see me typing 'exit', and bash exits.

Don't know how to handle this. Maybe I have to create a libc for kernel 2.6.15, so that libc will contain a stub for pselect6. But if bash calls pselect6 directly, that won't help. (And it would be bad practice, from the bash maintainers)
NSA310 actually uses kernel 2.6.31.8....
Yes, got the same result here, it complains about this pselect6 function. Maybe this should be reported to the Entware-ng maintaners....?

EDIT: a quick tour at the bash source code revealed that bash itself doesn't use that function. The function is being used by the readline library, bundled with bash. Tried to compile bash without the readline library support and the built product was usable, but not pleasant at all. Without the library, bash doesn't have the ability to edit the command line and also the command line history function... So, in any case, a libc rebuild will be required.

EDIT2: maybe recompiling the c libraries won't be necessary after all. It seems that pselect code, using by the bundled readline library, is optional and not definite.
From bash-4.4.12/lib/input.c:

Code: Select all

.....
#if defined (HAVE_PSELECT)
  sigset_t empty_set;
  fd_set readfds;
#endif
.....

Code: Select all

.....
#if defined (HAVE_PSELECT)
      sigemptyset (&empty_set);
      FD_ZERO (&readfds);
      FD_SET (fileno (stream), &readfds);
      result = pselect (fileno (stream) + 1, &readfds, NULL, NULL, NULL, &empty_set);
#endif
.....
Yet, the configure script says there is pselect support. Not sure where it gets that info from, I presume it's /opt/include, but it doesn't make any sense to add support for something, included in the headers, but not included in the lib binaries. So, the problem was to prevent the configure script from finding it. After editing it (removed pselect from line 9807 in ./configure), the built product was usable, the only difference was it's huge size, but it's normal, considering a native compilation was made. Maybe I should try to rebuild the package, using the Entware-ng toolchain...
ZyXEL NSA-310 FW 4.70(AFK.1) MetaRepository + Fonz Fun Plug 0.7zypkg004

Mijzelf
Posts: 6251
Joined: Mon Jun 16, 2008 10:45 am

Re: New package: Entware-ng

Post by Mijzelf » Wed Jan 24, 2018 3:24 pm

pselect() is a function in libc, which is available. pselect6 is a function in the kernel. Normally pselect() should do a call to pselect6, but when it detects it does not exist, it can call pselect5 (I think), which does about the same, but has some race conditions (google for 'man pselect6' for details).
the only difference was it's huge size, but it's normal, considering a native compilation was made
Native compilation has nothing to do with the size. Assuming the same compiler version, native or cross, the binary should have the same size.
I think you have to strip your binary. ('strip bash').

philippetev
Posts: 82
Joined: Tue Apr 17, 2012 7:45 am

Re: New package: Entware-ng

Post by philippetev » Wed Jan 24, 2018 8:58 pm

Mijzelf wrote:pselect() is a function in libc, which is available. pselect6 is a function in the kernel. Normally pselect() should do a call to pselect6, but when it detects it does not exist, it can call pselect5 (I think), which does about the same, but has some race conditions (google for 'man pselect6' for details).
So, you're suggesting the kernel part of that chain is missing (at least in the NSA310's kernel)... It makes sense to build the binaries from the Entware-ng repo, using the headers I currently have, otherwise why would anyone offer them in a first place. I haven't had such problem with ffp, but that's probably because of the different (as lib itself and versions) C libs it uses.
Anyway, that looks to me as a pretty much clumsily made thing, because there is obviously not any check if all the links in the chain are in place before requesting that functionality.
Native compilation has nothing to do with the size. Assuming the same compiler version, native or cross, the binary should have the same size.
I think you have to strip your binary. ('strip bash').
Tried that and now the binary is almost as big as the binary that comes with Entware-ng. Thanks for the tip!
ZyXEL NSA-310 FW 4.70(AFK.1) MetaRepository + Fonz Fun Plug 0.7zypkg004

Mijzelf
Posts: 6251
Joined: Mon Jun 16, 2008 10:45 am

Re: New package: Entware-ng

Post by Mijzelf » Thu Jan 25, 2018 8:46 am

philippetev wrote:So, you're suggesting the kernel part of that chain is missing (at least in the NSA310's kernel)...
Not only on the 310 kernel, but also on the 325. So I guess it's on all NSA3xx boxes.
pretty much clumsily
I'm not sure where to put the blame. Entware-ng officially only supports kernel 2.6.32 and up. You can't even run stock Entware-ng on your NAS, because it errors out with 'Fatal, kernel too old'.
To bypass that, I have rebuild Entware-ng libc targeting 2.6.24. That is supposed to mean that libc will implement all relevant kernel calls up to now (or up to the date of the libc sources), but tests for the functionality added between 2.6.24 and now. If the functionality is not present, it will emulate it, or call an older implementation.
That seems to work. This libc libraries have been bearing Entware-ng on the ZyXEL nas for 2 years.

Libc doesn't need to check for the existence of pselect6, because it's targeting 2.6.24 and up. That function is supposed to exist, as it's introduced in 2.6.16.

I can imagine ZyXEL somehow excluded pselect6. (But why?). That would explain the current problem. But why does it show up now? The libc package isn't changed, only bash is. And maybe some other libraries. Normally a binary never calls the kernel directly, but only wrapper functions in libc. I can't imagine libc::pselect() isn't used before, it's a very common function to wait for I/O. But maybe the passed parameters are changed, triggering this bug.
I haven't had such problem with ffp, but that's probably because of the different (as lib itself and versions) C libs it uses.
Indeed. Can't remember the details now, but FFP0.7/arm targets a much older kernel. 2.6.12, or something like that. (And it uses uClibc, not glibc like Entware-ng)

philippetev
Posts: 82
Joined: Tue Apr 17, 2012 7:45 am

Re: New package: Entware-ng

Post by philippetev » Thu Jan 25, 2018 10:45 am

Mijzelf wrote:Not only on the 310 kernel, but also on the 325. So I guess it's on all NSA3xx boxes.
Except maybe the NAS326, which uses much newer kernel (3.x.x). Speaking of which: what happens if the current Entware-ng zypkg finds kernel, which is 2.6.32 and up (like what would happen on NAS326)? Does it still install those down-versioned libs or installs the stock one?
I'm not sure where to put the blame. Entware-ng officially only supports kernel 2.6.32 and up. You can't even run stock Entware-ng on your NAS, because it errors out with 'Fatal, kernel too old'.
To bypass that, I have rebuild Entware-ng libc targeting 2.6.24. That is supposed to mean that libc will implement all relevant kernel calls up to now (or up to the date of the libc sources), but tests for the functionality added between 2.6.24 and now. If the functionality is not present, it will emulate it, or call an older implementation.
That seems to work. This libc libraries have been bearing Entware-ng on the ZyXEL nas for 2 years.

Libc doesn't need to check for the existence of pselect6, because it's targeting 2.6.24 and up. That function is supposed to exist, as it's introduced in 2.6.16.

I can imagine ZyXEL somehow excluded pselect6. (But why?). That would explain the current problem. But why does it show up now? The libc package isn't changed, only bash is. And maybe some other libraries. Normally a binary never calls the kernel directly, but only wrapper functions in libc. I can't imagine libc::pselect() isn't used before, it's a very common function to wait for I/O. But maybe the passed parameters are changed, triggering this bug.
I think it was a matter of time such bugs to occur, considering the use of down-versioned libs for the older kernels. How about if I change the kernel with a newer one, I found some interesting posts like this one.
ZyXEL NSA-310 FW 4.70(AFK.1) MetaRepository + Fonz Fun Plug 0.7zypkg004

Mijzelf
Posts: 6251
Joined: Mon Jun 16, 2008 10:45 am

Re: New package: Entware-ng

Post by Mijzelf » Thu Jan 25, 2018 11:45 am

philippetev wrote:Except maybe the NAS326, which uses much newer kernel (3.x.x).
Leave the maybe. It will run fine on the 326, but that's not an NSA.
Speaking of which: what happens if the current Entware-ng zypkg finds kernel, which is 2.6.32 and up (like what would happen on NAS326)? Does it still install those down-versioned libs or installs the stock one?
By design it won't install the down-versioned libs on kernel >=2.6.32. In case of the 326 it will install the armv7 version of Entware-ng, for which I didn't compile those libs anyway.
How about if I change the kernel with a newer one, I found some interesting posts like this one.
Well, if you are able/willing to change the kernel, you can get problems from the other side. The firmware which can no longer run on the kernel. So you'd need to install Debian or something like that, in which case you don't need Entware-ng anyway.

philippetev
Posts: 82
Joined: Tue Apr 17, 2012 7:45 am

Re: New package: Entware-ng

Post by philippetev » Thu Jan 25, 2018 7:24 pm

BTW I'm reading this ATM. Wow, answer like this one sounds to me like a "If you want that, then do it yourself!". If those two are devs, then I must be Santa Claus or the Easter rabbit.
ZyXEL NSA-310 FW 4.70(AFK.1) MetaRepository + Fonz Fun Plug 0.7zypkg004

barmalej2
Posts: 2398
Joined: Sun Apr 29, 2012 5:24 pm

Re: New package: Entware-ng

Post by barmalej2 » Thu Jan 25, 2018 9:30 pm

philippetev wrote:BTW I'm reading this ATM. Wow, answer like this one sounds to me like a "If you want that, then do it yourself!". If those two are devs, then I must be Santa Claus or the Easter rabbit.
Imho, zyxmon answer was/is correct. Entware-ng uses kernel 2.6.32 sources and compatible glibc, so some of their binaries uses syscalls and glibc functions not available in device using kernel older than 2.6.32. This includes pselect6,ppoll,epoll_pwait kernel syscalls and corresponding glibc functions.

There is no magic here and Zyxel is not sabotaging kernel sources in this case. Although man pages of pselect6 states:
pselect() was added to Linux in kernel 2.6.16. Prior to this, pselect() was emulated in glibc (but see BUGS).
That is not full true. More truly it would be to state-it was added for some of architectures since 2.6.16. For our arm arch it was added only since 2.6.32 kernel:
https://git.kernel.org/pub/scm/linux/ke ... 53919330dd

Similar case, but more funny is with accept4 syscall. Man pages:
The accept4() system call is available starting with Linux 2.6.28
That's correct, but again excluding arm. They simply forgotten to declare accept4 for arm arch and it appeared only since 2.6.36 kernel:
https://git.kernel.org/pub/scm/linux/ke ... 953ee6578e

So, glibc recompilation with stubs using 2.6.15 or even 2.6.31.8 kernel headers will not help to run binaries, which uses at least pselect6,ppoll or epoll_pwait. The only way is to recompile affected binaries itself, because they might have (might not have as well) fallback mechanism avoiding using these kernel syscalls and corresponding glibc functions and will match available your current glibc functions.

philippetev
Posts: 82
Joined: Tue Apr 17, 2012 7:45 am

Re: New package: Entware-ng

Post by philippetev » Thu Jan 25, 2018 10:00 pm

barmalej2 wrote:So, glibc recompilation with stubs using 2.6.15 or even 2.6.31.8 kernel headers will not help to run binaries, which uses at least pselect6,ppoll or epoll_pwait. The only way is to recompile affected binaries itself, because they might have (might not have as well) fallback mechanism avoiding using these kernel syscalls and corresponding glibc functions and will match available your current glibc functions.
So, the solution would be something like what I suggested here (EDIT2)?
ZyXEL NSA-310 FW 4.70(AFK.1) MetaRepository + Fonz Fun Plug 0.7zypkg004

barmalej2
Posts: 2398
Joined: Sun Apr 29, 2012 5:24 pm

Re: New package: Entware-ng

Post by barmalej2 » Fri Jan 26, 2018 7:23 am

Yes. I think so, but the case with pselect is a bit specific. In uClibc by default newselect() and select() syscalls are used and if they are unavailable, fall backs to pselect6. Looking at glibc source it does the same since 2017.05.03:
https://sourceware.org/git/?p=glibc.git ... bd3bd9bf51
but on older versions it is different. Maybe, building latest or patching current glibc version like that:
https://sourceware.org/git/?p=glibc.git ... daf92e94bf
might help as well.

P.S.
After editing it (removed pselect from line 9807 in ./configure), the built product was usable
Instead of editing you can disable pselect at configure stage:

Code: Select all

ac_cv_func_pselect=no ./configure --option1 --option2..... 

philippetev
Posts: 82
Joined: Tue Apr 17, 2012 7:45 am

Re: New package: Entware-ng

Post by philippetev » Fri Jan 26, 2018 8:08 am

barmalej2 wrote:Yes. I think so, but the case with pselect is a bit specific. In uClibc by default newselect() and select() syscalls are used and if they are unavailable, fall backs to pselect6. Looking at glibc source it does the same since 2017.05.03:
https://sourceware.org/git/?p=glibc.git ... bd3bd9bf51
but on older versions it is different. Maybe, building latest or patching current glibc version like that:
https://sourceware.org/git/?p=glibc.git ... daf92e94bf
might help as well.
Yes, but for best result @Mijzelf should implement this in the patched libs, used for the older kernels. Compiling the latest source, targeting the kernel 2.6.24.
EDIT: or just update the patched libs to the latest version 2.26.
barmalej2 wrote:Instead of editing you can disable pselect at configure stage:

Code: Select all

ac_cv_func_pselect=no ./configure --option1 --option2..... 
Good to know. Thanks for the tip!
ZyXEL NSA-310 FW 4.70(AFK.1) MetaRepository + Fonz Fun Plug 0.7zypkg004

Post Reply