gnuradio-android
gnuradio-android copied to clipboard
ADI rework
Thanks for the PR. As already mentioned, I'd have some more high-level questions.
- What's the reason to downgrade GNU Radio? Shouldn't it be rather straightforward to port OOTs to 3.9 as opposed to downgrading GNU Radio to 3.8.
- If downgrading is really necessary, did you test existing applications if they work with GNU Radio 3.8?
- AFAIS, you download some dependencies and ship some with git. Why this inconsistency?
- Why did you restructure
build.sh
but notbuild_aarch64.sh
? - Why do you ship fftw and add it as submodule?
- What does android_deploy_to_dev do?
- What's the relevance of the QT-specific scripts?
-
build_aarch64.sh
fails building zmq -
build.sh
doesn't work at all.
Did you test these changes separately from your modifications that you use on top?
Sorry for my late reply, I wanted to do some more polishing first.
- We kept GNU Radio 3.8 because Scopy is still using it, therefore it would've required some extra work to upgrade it now
- Haven't tested the existing applications, they probably need to be ported
- We either haven't found them all on git or the compiling process would've been too tedious. I'm still working on gettext and fftw
- Didn't do any work in
build_aarch64.sh
, sincebuild.sh
is now capable of building any architecture. Should we deletebuild_aarch64.sh
? - This is something that slipped me, we gave up using the submodule due to an issue with OCAML and downloaded the archive instead, I'm now testing again the submodule
- Both android_deploy_to_dev and the QT-specific scripts weren't relevant here, I have removed them
- Again, we haven't done any work in build_aarch64.sh
- The script had all the function calls commented, that might've been the reason, I've done some rearranging since
Okay, so I added a few fixes and patches.
gr-iio does not support gnuradio 3.9. It will be mainlined in 3.10. I can revert the PR back to gnuradio 3.9 but you will lose gr-iio as they are not compatible - https://github.com/analogdevicesinc/gr-iio/blob/upgrade-3.8-merge/README.md
I switched all the dependencies to git including fftw. build_aarch64 is not used. You can just use
build_dependencies.sh aarch64
build_dependencies.sh arm
build_dependencies.sh x86_64
build_dependencies.sh i686
Make sure you edit build_system_setup.sh with your system setup before running anything
One thing to note is that this uses a new (still experimental - https://github.com/libusb/libusb/pull/874) version of libusb that works (almost) out of the box with Android. You just need to call https://github.com/analogdevicesinc/scopy/blob/master/src/tool_launcher.cpp#L125-L128 before using libusb to "register" it to the JNI(I think) - when this PR is merged, we'll probably add something to libiio so you can skip this step.
Since you were using a custom libusb, the drivers that use calls such as libusb2_xxx will probably not work and you'll have to switch to the mainline implementation for several submodules (uhd/rtlsdr/hackrf/etc..)
Since this is gnuradio 3.8 you could switch the OOTs to their 3.8 versions and they should work. Alternatively you can use 3.9 and patch gr-iio to use 3.8 (i haven't investigated what the effort for this would be)
I updated build_dependencies.sh script to show what works and what doesn't.
Hi Adrian, thanks for the heads-up. Just to confirm:
- this is now ready for review?
- in its current form, it requires (1) back-porting all applications to GNU Radio 3.8 and (2) adapting all HW drivers?
I started to dig a bit deeper and have some questions:
- I tried to build for
aarch64
but gettext fails. Any idea? Does the commit from the PR work for you? Why is this new dependency needed in the first place? (Same question for the other new repositories.)
po-gram-gen.tab.c:161:10: fatal error: 'po-gram-gen.tab.h' file not found
#include "po-gram-gen.tab.h"
- I saw many
sysroot
references that are commented out. What's the issue? Can they just be deleted? - My understanding is that I have to configure
build_system_setup.sh
. Why does it need a QT directory? Why are the other QT references needed throughout the code? It also wants a JDK? Why? Are these two variables optional? - There is a comment in the code that someone should handle circular dependencies. Who and what's the issue here? It seems to be related to
libiconv
, which seems to be a new dependency that was not needed before.
I commented-out the new projects and started the build with boost. But this also failed with:
cp: cannot stat '/home/basti/src/gnuradio-android/Boost-for-Android/configs/user-config-ndk19-1_76_0.jam': No such file or directory
Bastian, sorry about the huge delay, I didn't get notifications for this thread for some reason ... I don't know if you found any answers to your questions but here's my input:
"this is now ready for review?"
- we're going to use this script to build the docker image that build our application, so yes - it is ready for review. the dependencies are built by just running ./build_dependencies.sh aarch64 . I attached a full build output on my machine for reference. - https://gist.github.com/adisuciu/cf0969a9c4bcb073b40b493d0fb406b8
"in its current form, it requires (1) back-porting all applications to GNU Radio 3.8 and (2) adapting all HW drivers?"
- You basically have 2 alternatives of using gr-iio with your android apps
- build gnuradio 3.8 and use 3.8 versions of gr-OOTs
- use gnuradio 3.9 and port gr-iio to 3.9
- gnuradio 3.10 released which supports gr-iio out of the box in all cases you need to port the drivers to use the mentioned libusb version - which again, should be pretty easy - I can provide further info on this if needed.
"There is a comment in the code that someone should handle circular dependencies. Who and what's the issue here? It seems to be related to libiconv, which seems to be a new dependency that was not needed before."
- libiconv and gettext are dependencies for libxml2 which is a dependency for libiio. Reading it a second time, the comment is not that great so I'm going to explain. Building the libiconv library twice, will handle the circular dependency. As far as i can remember, libiconv depends on gettext and viceversa. So it's all taken care of. The comment is not a "TODO", it just explains why I'm building the library twice. That part of the build was done a while ago (when I had a lot less knowledge about how this whole thing should work) and maybe it can all be removed, as libiconv should be part of the ndk although i'm not 100% sure. This implementation works, even though it's a little ugly.
"My understanding is that I have to configure build_system_setup.sh. Why does it need a QT directory? Why are the other QT references needed throughout the code? It also wants a JDK? Why? Are these two variables optional?"
- JDK and Qt are needed for compiling and deploying a (Qt) app, they shouldn't be required for building dependencies
"I saw many sysroot references that are commented out. What's the issue? Can they just be deleted?"
- There definetly are a few comments that can be deleted - we can create a different branch where we can collaborate on this script
P.S In the attached build, i disabled thrift and libzmq(from build_dependencies.sh) because for some reason it doesn't build for me and it's not needed in my project. I'm sure the solution is super easy ..
Tbh, I don't fully get your reply. But AFAIS this PR has many issues, making it just frustrating for both of us. So I'd suggest to just keep things separate and give up on this.
I just reread my comment, and I forgot to mention the questions that I was answering. I updated my comment. I also see that gnuradio 3.10 was released so that may also be worth investigating. In any case, if you no longer want to purse this, feel free to close the pr.