LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 01-27-2022, 03:44 AM   #1
ananthavidhya
LQ Newbie
 
Registered: Jan 2022
Posts: 4

Rep: Reputation: 0
Post 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
 
Old 01-27-2022, 06:03 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,286

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
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.
 
Old 01-29-2022, 02:51 AM   #3
ananthavidhya
LQ Newbie
 
Registered: Jan 2022
Posts: 4

Original Poster
Rep: Reputation: 0
Post

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
 
Old 01-29-2022, 05:02 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,286

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
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. 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.
 
Old 02-12-2022, 04:17 PM   #5
blue_z
Member
 
Registered: Jul 2015
Location: USA
Distribution: Ubuntu, Lubuntu, Mint, custom embedded
Posts: 104

Rep: Reputation: Disabled
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

Last edited by blue_z; 02-12-2022 at 04:46 PM.
 
Old 03-26-2022, 03:36 AM   #6
ananthavidhya
LQ Newbie
 
Registered: Jan 2022
Posts: 4

Original Poster
Rep: Reputation: 0
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.
 
Old 03-26-2022, 04:55 AM   #7
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,286

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


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
learning cross compiling-compiling library from soruce brianmay27 Linux - Software 1 12-31-2012 05:28 AM
gps Navit gpsd Earthmate BT-20 using Ubuntu 11.04 tvedgar Linux - Software 1 07-08-2011 07:03 PM
Cross virtualization (not cross architecture) Skaperen Linux - Virtualization and Cloud 2 11-19-2010 01:23 PM
Navit--package for gpx2navit_txt mma8x Linux - Software 4 11-30-2009 01:00 PM
Cross-compiling v/s cross-building kushalkoolwal Programming 3 05-13-2009 05:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 08:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration