-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
YTuner not working on OpenWRT #37
Comments
Hi Reinhard, |
Hi Greg, All in all, sounds awesome, I help where I can 😊 To be honest, I never manually ran an application on OpenWRT, but only used the packaging tool opkg. But it should work as with any other Linux Distro. May I ask, where have you found the libraries for Linux_ARM_OpenWrt_2203? I would need 2305.
So I had a look at /lib and only found the ld-musl-armhf.so.1 library and libc.so |
I have tried to manually install libpthread, libdl and librt but I will check on that and will let you know |
One question: which version of openwrt is running ? I do have Proxmox running on arm64 and amd64. So I can do the tests also and can check it out. https://downloads.openwrt.org/releases/22.03.5/targets/armvirt/64/ regard's Beatrice |
Dear Beatrice, yep, I am running 2305. |
https://downloads.openwrt.org/releases/22.03.5/targets/armvirt/64/ or https://downloads.openwrt.org/releases/22.03.7/targets/armvirt/64/ This is the one I can actually checkout. |
you could use this, armsr replaces armvirt, according to 23.05 releasenotes Release notes of 23.05 (https://openwrt.org/releases/23.05/notes-23.05.0): Highlights of device support |
Okay.. I do love Proxmox .. Is running.. I will go forward to configure.. |
Great work, looks good! Are you running arm v8 or v7? The link in your last posting is arm v8, |
I can use both. |
I see, thanks |
I have issues while Opkg cannot update. Operation not permitted. I wasn't firm with openwrt. Other question: Which package of ytuner have you used ?. There is dir arm v32 a separated package. I think you used wrong package |
this is the package that I used: |
What operating system is behind openwrt ? Greg: I informed in my last postings regarding alpine Linux. |
It's not based on Alpine but like Alpine, it uses BusyBox and musl. About missing libraries, yep, that's what I thought about yesterday.
@coffeegreg |
Question: why using openwrt ?. It's so easy running on all platforms I didn't know if gcompat Library is available. This will fix your issue similar alpine. |
Instead of explaining why, I think it is best to cite from Wikipedia: OpenWrt is configured using a command-line interface (ash shell) or a web interface (LuCI). There are about 8000 optional software packages available for installation via the opkg package management system. Installing OpenWRT is aseasy as upgrading the Vendors Firmware via the Routers Webinterface. That does not work with alpine. Not to speak of LUCI, that is not available on alpine. |
Have you installed bash for starting ytuner ? And what about the missed c-libs ?. There is no compile for openwrt needed. If you are using such exotic hardware, support will end here. |
Thanks for your effort giving it a try. I would say ARM is ARM, no matter in wihch device it is soldered - so I think the issue is not necessarily the hardware rather than the software (OS). |
Nope. You can install free pascal on your openwrt system and compile yourself, or using supported distros. Greg told you: He has not all hardware available to test. Proxmox is designed for 64 bit systems only. |
@TheBossME I think it is perfectly legitimate to ask for support for a further distribution. |
Agreed 👍 Again: Feel free to install Free Pascal on your hardware and start compile. I have no Pascal knowledge. Installing I386 OS'SES is possible to install. But this will not help you as I understand right ?. My other plan is, installing ytuner cluster instances for everybody with a default configuration. Will this be helpful for ya ? |
I think that's up to Greg. As I understood in his reply here, he suggested to give it a try, but he needs my help for testing. I am looking forward to help where I can :)
me neither, I also have no Pascal knowledge
It would help to see if it is a hardware or software related issue. Conclusion: one or some libraries are missing.
I don't know but I would expect some difficulties regarding copyright due to the vtuner API. I would prefer a solution running privately on my own hardware. Nevertheless, I appreciate your offer, thank you! |
Finally: It is library issue. If free pascal has no compile option for the needed library, it will not run. Schönen Nachmittag |
it's weird, because ldd returns for i386: ldd returns for arm: |
It is not, the libraries needed to run the application (e.g. gcompat) are definitely missing. Please try to add the alpine repository, maybe you can install it from there. scanelf -i ~/vtuner |
Dear Beatrice, I have tried as you suggested, for testing purpose, but I get an As I said, I think it is perfectly legitimate to ask for support for a further distribution. I appreciate your effort, but I am counting on @coffeegreg Greg and that I am going to support him in any way possible for me. |
I wrote a message here yesterday and went to sleep. This morning I went to work and just got back and I see ... 25 new messages. 👀 You have not been idle ... 👍
Yes, This is what I'm going to try. 👍
Yes, it is.
Agree.
Agree ... but 🤔 ... some functionality that requires or will require more CPU computing power may not work properly.
That's not entirely true ...
Great ❗ 🚀
In the case of YTuner, there can be no question of violating any copyrights. No one stole anything from anyone and did no reverse engineering on it. The implemented YTuner functionality is based on the analysis of network traffic to/from AVR. That's all, everything in accordance with the law.
Agree.
I'm afraid that wouldn't be easy if at all possible. That's why freepascal can compile for other OSs and CPU arch.
Compiling is not the problem, just testing it on a real platform.
True. 😞
ABSOLUTELY FANTASTIC IDEA ❗ ❗ 🚀 👏 I have to go now... I'll add the rest when I get back. Why does a day only have 24 hours? 🤔 😉 |
I wrote about :
We can see |
There is already some service listening on TCP port 80 |
Yep, I also thought that if it is not present, than ldd should say Nevertheless, this does the trick, so I assume for openwrt fpc should link to /lib/ld-musl-armhf.so.1 instead of /lib/ld-linux-armhf.so.3
No worries, have a nice evening |
@coffeegreg I took this image: I downloaded this YTuner release: /~https://github.com/coffeegreg/YTuner/releases/download/1.2.3/ytuner-1.2.3-x86_64-linux.zip It's not possible to run YTuner, I do get the exact same So I've checked with and now YTuner is starting normally as expected.
So from the above mentioned findings, and depending on the depth of YTuner links into glibc, it could be that YTuner will run flawlessly with musl libc and we do not need these libraries: libc6-compat or gcompat, the already existing (in Alpine as well as in OpenWrt) libc is enough. It looks like a general problem with the linux images (no matter if arm, i386 or x86_64). |
I think I could identify the underlying issue: runtime linker. running
doing the same on my OpenWrt machine (after installing package binutils) gives: So the .interp header field gives So ld-linux-armhf.so.3, that is shown by ldd, is the runtime linker in the ELF .interp header. And that's the reason why ytuner starts, when we create a symbolic link for the expected runtime linker So I think there should be a setting in FPC to change the runtime linker to musl on Alpine/Openwrt. |
I disagree. Look at my docker tutorial based on Alpine Linux image.
No. FPC is based on a set of libraries (Linux distr., Solaris, FreeBSD, OpenBSD, MacOS etc) provided to it. In my case, from Fedora or Ubuntu, Solaris, FreeBSD .... As I wrote earlier ... FPC
and builds binaries for selected OSs based on this knowledge. Most Linux distributions are compatible with default libraries but If I understood correctly, in your case the following link helped:
Maybe in case of OpenWRT I need to add also 'ld-linux-' ... 🤔 Without the correct result of the above function, the YTuner may not work properly. Finally, I'm glad to know that YTuner start on OpenWRT 👍 but ... as you can see ... You have to take care about correct YTuner configuration (grant access to TCP port 80 (web service) and UDP port 53 (DNS service - optional) or run on another interface) |
Correct. I thought you had Please try to run another test program : This will tell me if any changes to the code are needed. Once you have placed in your file system all the required files provided with the YTuner 1.2.3 zip archive and configure all settings you can try the new |
the gcompat library works, because it provides glibc compatibility (as the name gcompat suggests) for musl libc systems. Why the symbolic link does work is explained in my previous post. its because of the .interp ELF header. I assume, would YTuner be compiled for musl libc instead of glibc, the .interp would change to the correct runtime linker ld-musl-armhf.so.1 If you have an Alpine machine running, even on a KVM Qemu VM, you could verify it yourself by adding a symbolic link. |
The picture in my posting above( #37 (comment)) NO additional libraries like gcompat, etc... are required, i've confirmed it on OpenWrt and Alpine Linux. ld-musl-armhf.so.1 is also nothing else than a symbolic link to /lib/libc.so |
I'm not sure if that's even possible... I don't know FPC that well.
I don't have it ... and not much free time either. 😉 I prefer to spend it coding new features in YTuner. A few more interesting ideas to implement... 👍 |
🤔 ... Beatrice @TheBossME ... What do you think about this? 😉 |
I have just tested your test1.zip ELF .interp header is again Only when adding the symbolic link as follows: |
I need to know what it printed on the console... 😉 |
This screenshot (quoted from above) is the proof that you do not need the libraries. first line: |
I would say the important information is this: Only when adding the symbolic link as follows: Here is the output with the symbolic link to the ld-musl-armhf.so.1:
|
I understand that the |
May I ask what do you expect from the test1 program? May I ask, don't you trust my findings?
|
No. I want to know if any additional code should be added to support OpenWRT so that YTuner can locate itself when it starts.
I suspect that OpenWRT doesn't have this problem but I would like to make sure. |
Since Alpine and OpenWrt are both based on musl and busybox, it should be fine, i guess. I will check if FPC can compile against musl instead of glibc |
Let's summarize. We did a good job and thanks to one link we managed to run Ytuner on OpenWRT. 👏 In the process we discovered some interesting things and are wiser for new experiences. 👍 |
To be honest, I would say that it requires workarounds. Either symbolic link or gcompat library, as with Alpine Linux. I think the goal should be to compile against musl for Alpine Linux/OpenWrt |
Let's implement into the lovely AVM device FRITZ!Box 🤣🙏🙋♀️ |
Yeah .... and my old Huawei EchoLife GPON too 😆 |
I think I can close this record 68-comments issue. 👀 |
@TheBossME |
Dear Greg,
I've just tried to get YTuner running on my R7800 running OpenWRT.
First I made the ytuner executable with chmod +x
Nevertheless, executing YTuner always leads to:
-bash: ./ytuner not found
i digged a bit deeper and I think its an issue with the loader.
According to the OpenWRT HDDB the R7800 has the following Architecture:
ARMv7 Processor rev 0 (v7l), arm_cortex-a15_neon-vfpv4
Regards, Reinhard
The text was updated successfully, but these errors were encountered: