LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   Cross-compiling navit application for am4378 (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/cross-compiling-navit-application-for-am4378-4175707009/)

ananthavidhya 01-27-2022 03:44 AM

Cross-compiling navit application for am4378
 
SBC:AM4378 BASED
OS:TI'sSDK 04.02 BUILDED CUSTOM OS
TOOLCHAIN:Linux-DEVKIT IN TI's SDK04.02
GOAL: TO CROSS-COMPILE NAVIT APPLICATION (WHICH IS OPENING FINE ON DEKSTOP)
DEPENDENCIES:GLUT,OPENGL
FAILED AT:
1)BUILDING NAVIT
CMAKE STEP:
-- Could NOT find OpenGL (missing: OPENGL_gl_LIBRARY)
-- Could NOT find GLUT (missing: GLUT_glut_LIBRARY)


MAKE STEP:
/tmp/ccfYt1C3.s: Assembler messages:
/tmp/ccfYt1C3.s:702: Error: bad instruction `lock'
/tmp/ccfYt1C3.s:703: Error: bad instruction `incl [r3]'
/tmp/ccfYt1C3.s:704: Error: bad instruction `setne r2'
/tmp/ccfYt1C3.s:738: Error: bad instruction `lock'
/tmp/ccfYt1C3.s:739: Error: bad instruction `decl [r3]'
/tmp/ccfYt1C3.s:740: Error: bad instruction `setne r2'
/tmp/ccfYt1C3.s:807: Error: bad instruction `lock'
/tmp/ccfYt1C3.s:808: Error: bad instruction `decl [r3]'
/tmp/ccfYt1C3.s:809: Error: bad instruction `setne r2'
/tmp/ccfYt1C3.s:1018: Error: bad instruction `lock'
/tmp/ccfYt1C3.s:1019: Error: bad instruction `decl [r3]'
/tmp/ccfYt1C3.s:1020: Error: bad instruction `setne r2'
/tmp/ccfYt1C3.s:1185: Error: bad instruction `lock'
/tmp/ccfYt1C3.s:1186: Error: bad instruction `decl [r3]'
/tmp/ccfYt1C3.s:1187: Error: bad instruction `setne r2'
/tmp/ccfYt1C3.s:1295: Error: bad instruction `lock'
/tmp/ccfYt1C3.s:1296: Error: bad instruction `decl [r3]'
/tmp/ccfYt1C3.s:1297: Error: bad instruction `setne r2'
/tmp/ccfYt1C3.s:1597: Error: bad instruction `lock'
/tmp/ccfYt1C3.s:1598: Error: bad instruction `decl [r3]'
/tmp/ccfYt1C3.s:1599: Error: bad instruction `setne r2'
/tmp/ccfYt1C3.s:1643: Error: bad instruction `lock'
/tmp/ccfYt1C3.s:1644: Error: bad instruction `decl [r3]'
/tmp/ccfYt1C3.s:1645: Error: bad instruction `setne r2'
navit/graphics/qt_qpainter/CMakeFiles/graphics_qt_qpainter.dir/build.make:67: recipe for target 'navit/graphics/qt_qpainter/CMakeFiles/graphics_qt_qpainter.dir/RenderArea.cpp.o' failed
make[2]: *** [navit/graphics/qt_qpainter/CMakeFiles/graphics_qt_qpainter.dir/RenderArea.cpp.o] Error 1
CMakeFiles/Makefile2:533: recipe for target 'navit/graphics/qt_qpainter/CMakeFiles/graphics_qt_qpainter.dir/all' failed
make[1]: *** [navit/graphics/qt_qpainter/CMakeFiles/graphics_qt_qpainter.dir/all] Error 2
Makefile:149: recipe for


2)SO UNTILL I LINKED OPENGL AND GLUT PACKAGES TO MY TOOLCHAIN DIRECTORY I CANNOT CROSS-COMPILE NAVIT

3)BUT I COULDN'T ABLE TO ACHIEVE THE CROSS-COMPILING OF GLUT AND OPENGL LIBRARIES

4)SOME ONE PLEASE HELP ME DOING THIS

PRIOR THANKS
A.N.V.Lavanya

business_kid 01-27-2022 06:03 AM

Hello ananthavidhya,

I don't know if it's possible to cross compile for that cpu, because you have given us no information really. To cross compile, you need
  • a toolchain of kernel headers, glibc & gcc
  • A set of Posix libraries
To help you, we'd need to know what your processor is based on. On a point of principle, I'm not going to look up the AM4378 to find out what it is, because that's the sort of information you should be supplying. We also need good details on your host and how you are making the libraries available to your compiler. If you're following some guide, point us to it.

Lastly, if you're not an experienced linux user, forget this as an idea and mark this solved. If you are experienced, head over to linuxfromscrtatch.org and read into the CLFS project. That will show you how things are done.

ananthavidhya 01-29-2022 02:51 AM

Thank you sir for your reply.
I am sorry if the information provided is insufficient.
As you pointed me about some details for providing me help here i am ready to give the information.
1)Firstly we are using arm processor "4378" based SBC.
2)SBC is our custom design board.
3)We are planning to implement a car navigation guiding tool in the board.
4)For that we want a utility we found one such very popular utility called "NAVIT"[Hope you are familiar with].
Coming to software:
5)We builded os using Ti's SDK. With this we builded os and able to boot the device.
Coming to application:
6)Now we downloaded the NAVIT source code from main website.
7)We builded the NAVIT app from source code using the cmake followed by make steps.
8)NAVIT app builded successfully on Desktop and i run the application also i showed up maps successfully.
9)Now the same i am going to implement on our ARM Board.
10)For that required Tool chain we are using is TI's SDK linux-devkit (Where in this folder all the cross-compiling compilers are present).
11)To create environment i sourced the environment file present under the linux-devkit folder in TI's SDK.
12)After that the same cmake,and make steps i did where i got 2 kinds of issues
a)opengl,glut libraries failed to link message during cmake log.
b)assembler error during make step.
13)So for this reason i am trying to cross-compile opengl , glut packages for arm board.
14) To build these packages the method i followed is mentioned in this link
https://software-dl.ti.com/processor...g_the_SDK.html
15)But through above method i couldn't achieve this since the packages are in skipped list and tehy are not builded saying unsupported in the curernt version SDK.


Now i am seeking help for someone please help me in achieving cross-compiling OpenGL,Glut pacakges for my Final goal.
I hope i explained the issue in very detailed manner. If someone understand my issue guide me,please help me.
Any sort of help is needed very badly.
Thanks & Regards
A.N.V.Lavanya

business_kid 01-29-2022 05:02 AM

Now we know. 'Arm cpu' on it's own isn't really enough - the Cortex number matters. Just like intel cpu or amd cpu.

You need a set of libraries to link against that program. If you run 'ldd /path/to/program' it will list you all trhe libraries it's using.

Handier than cross-compiling is compiling:D. You can get an arm sbc and install linux on it. I have a Raspberry Pi 4, and it just needs a keyboard, mouse and monitor and you're good to go. Here's where you need the details on the AM4738. There are decent systems there.

Alternatively, head over to http://www.linuxfromscratch.org and look at the CLFS project, which is specifically about cross compiling and offers instructions.

blue_z 02-12-2022 04:17 PM

I don't know the capabilities of the TI SDK, but Buildroot has been around for years to provide an easy-to-use build environment for embedded Linux. Current releases have built-in support for OpenGL and the FreeGLUT library. You would have to create a new "package" for Navit. Your custom application(s) could be cross-built either externally or by Buildroot if you create a package for it.
Regardless Buildroot is capable of cross-building all of your firmware for your board without a steep learning curve (like Yocto).

For serious development, forget about "native" compiling on a SBC. You would not have the storage capacity or processing power of a decent desktop or laptop PC. Buildroot and Yocto are the tools that most professionals use for embedded Linux development.



Addendum

Apparently the TI SDK is based on Yocto.
And it seems that you're trying to build the Navit code with just the cross-toolchain outside of the SDK, which defeats the entire purpose of the SDK/Yocto.
Suggest you search the web for articles on "Buildroot vs Yocto" such as "Deciding between Buildroot & Yocto".

Regards

ananthavidhya 03-26-2022 03:36 AM

Thank you all for your time.
So I am bit confusing with many terms like as here I am describing.
1.navit website they refering as we need to modify .xml file to add new graphics where I didn't find exactly navit.xml but navit_shipped.xml
2.so I started to edit it but strucked with first line only called gtk_drawing_area.
3.then I did some depth study which given ne confusion of terms egl,gtkdrawingarea,opengl es,opengl.
4.arm4378 evaluation board has navigation application where it using opengl es it is pvr tool.
5.now what changes do I need to do inside navit source code to make it work on arm board with opengles ??
Please someone guide me
Or share me any links of tutorials.
Thanks in advance.

business_kid 03-26-2022 04:55 AM

IMHO, if you're reading of an xml file, you're starting in the wrong place. Please reread post #2 and start there.


All times are GMT -5. The time now is 10:36 PM.