LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-09-2013, 02:02 PM   #1
srg_btl
LQ Newbie
 
Registered: Apr 2013
Posts: 1

Rep: Reputation: Disabled
How to cross compile Microwindows for ARM arch


Hello! Have some problem with cross-compile of Microwindows.
Here are my steps:
0. Download cross-compile toolchain
Code:
wget http://www.codesourcery.com/sgpp/lite/arm/portal/package5383/public/arm-none-linux-gnueabi/arm-2009q3-67-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
sudo mkdir –p /opt/toolchain
sudo cp arm-2009q3-67-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 /opt/toolchain
cd /opt/toolchain
sudo tar –jxvf arm-2009q3-67-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
export PATH=/opt/toolchain/arm-2009q3/bin:$PATH
1. Download last version (v. 0.92) of Microwindows

Code:
	
cd ~
wget ftp://microwindows.censoft.com/pub/microwindows/microwindows-full-0.92.tar.gz
	tar xvf microwindows-full-0.92.tar.gz
2. Pre-configuration: install next packages:

Code:
	
sudo apt-get install libjpeg-dev libpng-dev python-dev libfreetype6-dev
3. Edit config file for ARM architecture

Code:
cd microwindows-0.92/src
nano config
And edited next lines:
Code:
ARCH                     = LINUX-ARM
ARMTOOLSPREFIX           = arm-none-linux-gnueabi-	
INCJPEG                  = /usr/include/
INCPNG                   = /usr/include/
INCZ                     = /usr/include/
INCTIFF                  = /usr/include/
LIBFT2LIB                = /usr/lib/libfreetype.a
4. Run make

After then I have next messages:
Code:
cc1: warning: include location "/usr/include/" is unsafe for cross-compilation
cc1: warning: include location "/usr/include/freetype2" is unsafe for cross-compilation
In file included from /home/user/microwindows-0.92/src/include/windows.h:19,
                 from /home/user/microwindows-0.92/src/mwin/winmain.c:44:
/home/user/microwindows-0.92/src/include/windef.h:131: warning: function declaration isn't a prototype
/home/user/microwindows-0.92/src/include/windef.h:132: warning: function declaration isn't a prototype
/home/user/microwindows-0.92/src/include/windef.h:133: warning: function declaration isn't a prototype
/home/user/microwindows-0.92/src/mwin/winmain.c: In function 'MwSelect':
/home/user/microwindows-0.92/src/mwin/winmain.c:356: error: impossible constraint in 'asm'
/home/user/microwindows-0.92/src/mwin/winmain.c:357: error: impossible constraint in 'asm'
/home/user/microwindows-0.92/src/mwin/winmain.c:358: error: impossible constraint in 'asm'
make[1]: *** [/home/user/microwindows-0.92/src/obj/mwin/winmain.o] Error 1
make: *** [subdir-/home/user/microwindows-0.92/src/mwin] Error 2
What's wrang? And how I can fix it?
 
Old 04-10-2013, 08:53 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,241

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
What's in the cross compile toolchain?

You need arm kernel headers, a libc, and a compiler. The kernel headers are includes in /usr/include. It seems to be reading your x86 ones. Then try

CC=/path/to/arm/compiler
./configure --includedir=/opt/toolchain/include --libdir=/opt/toolchain/lib
(guessing wildly here)
to point the configure at your arm ones. Better getting a guide on this. But you get the idea - the syustem is going to reach for the x86 stuff automatically.
 
Old 04-10-2013, 12:22 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
And :
Quote:
sudo apt-get install libjpeg-dev libpng-dev python-dev libfreetype6-dev
.. those packages cannot be used for arm.

All dependencies for Microwindows must be cross compiled for arm
to e.g. /opt/cross**, before you start the Microwindows build.

-
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Cross-compile cherokee for ARM xbyte1024 Linux - Software 0 04-05-2012 08:43 AM
Cross Compile GLib for ARM striker07 Programming 4 04-27-2011 07:49 AM
Help to cross compile vlc to arm 4monkeys Linux - Embedded & Single-board computer 3 03-14-2011 05:33 AM
cannot compile cross-gcc for arm ecco_the_dolphin Linux - Software 1 05-24-2010 05:02 PM
how to cross compile tslib for arm ? sunr2007 Linux - Embedded & Single-board computer 3 06-29-2009 12:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:13 AM.

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