Posted: Sun Apr 05, 2015 18:27 Post subject: Entware/Optware on MODERN Fractal/Brainslayer builds
Is it possible?
My router doesn't have any of the old builds compatible with OTRW2 ...
Using an EA6500v1 router, I found the following Entware which seems to be compatible with MIPS chips:
https://github.com/Entware/entware/wiki/FAQ
I used mipselsf — for MIPSEL soft-float based devices
USB stick is formatted and successfully mounted:
365MB /jffs (ext2)
540MB /opt (ext2)
Installing the above Entware seems to work but simple programs (e.g. nano) do NOT work.
root@DD-WRT:~# cd /jffs
root@DD-WRT:/jffs# ls
root@DD-WRT:/jffs# mkdir scripts
mkdir: can't create directory 'scripts': Read-only file system
Even if Entware is installed - it will not start after reboot. jffs seems to be disabled.
Have you read installation instructions? _________________ My forum.
You need to logout (ssh) and login again for profile environment variables to be set correctly (Tomato, AsusWRT). I cannot say for DDWRT.
Check that TERMINFO and TERM variables are set correctly. _________________ My forum.
For MIPS, you need export LD_LIBRARY_PATH=/opt/lib:$PATH
(or source Entware's etc/profile) and Entware will work fine. Startup/opt mount scripts can be placed in GUI (nvram) or in /jffs/etc/config
You need to logout (ssh) and login again for profile environment variables to be set correctly (Tomato, AsusWRT). I cannot say for DDWRT.
Check that TERMINFO and TERM variables are set correctly.
What should the TERMINFO be?
How can I ensure that this gets set properly on every boot?
tsynik wrote:
For MIPS, you need export LD_LIBRARY_PATH=/opt/lib:$PATH
(or source Entware's etc/profile) and Entware will work fine. Startup/opt mount scripts can be placed in GUI (nvram) or in /jffs/etc/config
So just put "LD_LIBRARY_PATH=/opt/lib:$PATH" into the startup script in the GUI?
....
How can I ensure that this gets set properly on every boot?
....
You must check that environment from /opt/etc/profile is applied on login.
Services setup in /opt/etc/init.d should start on every boot. _________________ My forum.
Also, Entware should not need LD_LIBRARY_PATH variable. uClibc is patched to look in '/opt/lib' instead '/lib' if this variable isn't set. If it is set, it first looks there, so what can go wrong is if LD_LIBRARY_PATH variable contains path(s) to some conflicting libraries. Unsetting the variable manually in the shell should work:
Code:
export LD_LIBRARY_PATH=
(of course, this will have effect for your current interactive shell session only)
Also, to find out which library is being wrongly picked up, you can use ldd utility. Do this before unsetting/changing
LD_LIBRARY_PATH variable:
Of course, I know that. And it works with everything, except the libc. So Entware's uClibc (and uClibc in my feed) is patched to fall back to '/opt/lib' instead of '/lib'. In short this is the locations order that shared libraries are looked into:
-rpath dirs
-LD_LIBRARY_PATH dirs
-fallback to default locations (usually '/lib:/usr/lib:/usr/X11R6/lib', Entware's uClibc is patched to look in '/opt/lib:/opt/X11R6/lib')
So what may be wrong here in OP's setup is that there's a bug in Entware with -rpat linker flag not set for nano, resulting in firmware's libncurses being picked up instead of Entware's. Just a theory, and this is why I wanted to see the output of 'ldd /opt/bin/nano'