Skip to content
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

Port to openwrt triggers a segment fault. #58

Open
itgb opened this issue Jan 8, 2020 · 10 comments
Open

Port to openwrt triggers a segment fault. #58

itgb opened this issue Jan 8, 2020 · 10 comments

Comments

@itgb
Copy link

itgb commented Jan 8, 2020

This issue is related to #40.
we have port it to openwrt , however there is a new issue occurs: it trigger segment fault error. The error.log is following ,pls help.
err.log

@Frans-Willem
Copy link
Owner

Could you describe how you compiled for OpenWRT so I can give it a shot myself ?

@itgb
Copy link
Author

itgb commented Jan 9, 2020

Morning Frans-Willem, Thanks for your reply. My team has fix the issue by upgrade boostp to higher version. .If you decide to support openwrt, I can share it.

@Frans-Willem
Copy link
Owner

Hi Ivan,

Yes, I'd definitely be interested in any changes required to make this work on more platforms, especially since there have already been other requests at getting it working on OpenWrt :)
If there's any code changes required, feel free to open a pull request, or just zip up what you have, and I'll see to it that it'll get merged in.
I will need some instructions on how exactly you're building for OpenWRT though. I'm no stranger to cross compiling, but I'm not sure exactly how you pulled in boost, stlab, and the other dependencies.

@itgb
Copy link
Author

itgb commented Jan 10, 2020

Hi Ivan,

Yes, I'd definitely be interested in any changes required to make this work on more platforms, especially since there have already been other requests at getting it working on OpenWrt :)
If there's any code changes required, feel free to open a pull request, or just zip up what you have, and I'll see to it that it'll get merged in.
I will need some instructions on how exactly you're building for OpenWRT though. I'm no stranger to cross compiling, but I'm not sure exactly how you pulled in boost, stlab, and the other dependencies.

ok,i will share it after Spring Festvival.

@itgb
Copy link
Author

itgb commented Jan 10, 2020

Hi Ivan,

Yes, I'd definitely be interested in any changes required to make this work on more platforms, especially since there have already been other requests at getting it working on OpenWrt :)
If there's any code changes required, feel free to open a pull request, or just zip up what you have, and I'll see to it that it'll get merged in.
I will need some instructions on how exactly you're building for OpenWRT though. I'm no stranger to cross compiling, but I'm not sure exactly how you pulled in boost, stlab, and the other dependencies.

I make a super simple tutorial for How to port Aqarahub to openwrt or lede. Please check it in attachment .
how to port Aqarahub to lede or openwrt.zip

@khongpt
Copy link

khongpt commented Jan 31, 2020

Morning Frans-Willem, Thanks for your reply. My team has fix the issue by upgrade boostp to higher version. .If you decide to support openwrt, I can share it.

Could you please to share STlab library port for Lede/openwrt Makefile or how to compile AqaraHub ipk package. Thanks in advance

@0kulist
Copy link

0kulist commented Feb 7, 2020

Hi khongpt,
Because openwrt has many targets, you have to be more specific. Mine, for example, is powerpc 8540 (tp-link wdr4900v1).
Managed to compile AqaraHub for powerpc, but I get "Illegal instruction" after "IO service starting" (maybe because floating point instructions), so there's more work to be done. For now I'm trying to get it work on a qemu ppc32 emulator for testing, which is also a pain. I don't want to dive into the code for now, but I tend to think that this is unavoidable.

Update: Successful run on qemu ppc32 4.2.0 debian 8.11 with double pass-through.

@0kulist
Copy link

0kulist commented Feb 8, 2020

@Frans-Willem , thank you for this nice piece of software.
Unfortunately, I have no luck running it on my ppc32 router, I get "Illegal instruction" right after "IO Service starting". I guess it might be related to USB stick communication. Strace fragment:

writev(1, [{iov_base="IO Service starting", iov_len=19}, {iov_base="\n", iov_len=1}], 2IO Service starting
) = 20
epoll_pwait(4, [{EPOLLIN, {u32=276407656, u64=1187161842884018176}}, {EPOLLOUT, {u32=276506848, u64=1187587869280043008}}], 128, 0, NULL, 8) = 2
mmap2(NULL, 135168, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7615000
--- SIGILL {si_signo=SIGILL, si_code=ILL_ILLOPC, si_addr=0x101da01c} ---
+++ killed by SIGILL +++
Illegal instruction

Any ideas on how to debug it further ?

@ghost
Copy link

ghost commented Aug 15, 2020

@0kulist what router is that? PPC32 is rare. Are you sure you compiled the right architecture? Illegal instruction means the program tried to use something not supported by your processor.

@0kulist
Copy link

0kulist commented Sep 25, 2020

@voltagex - Router is TP-Link TL-WDR4900 v1 with e500v2 cpu (Freescale P1014) . After digging, it seems that it is lacking some FP instructions.

But I gave up trying, bought an additional $35 TV-Box with Linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants