LinuxQuestions.org
Review your favorite Linux distribution.
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 11-22-2011, 03:23 PM   #1
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
how to cross compile code when the target is for another kernel version ?


hi, i would like to get direction on how to compile the rt3090 driver found here:
http://www.ralinktech.com/en/04_supp...ort.php?sn=501

for the 3.1.0 kernel used in openelec.tv.


if i just use make/ gcc on my current fedora-15 setup could i just scp the *.ko to the other machine and load it ?

thanks,

p.s.: another possibility would be installing gcc on the openelec machine but since it is not based on debian/ fedora/ ubuntu there is are no repos.
 
Old 11-22-2011, 09:44 PM   #2
gary185
Member
 
Registered: Jul 2011
Posts: 113

Rep: Reputation: Disabled
i know nothing about openelec but it looks like there is a
gcc meta package in the repository

http://passion-xbmc.org/addons/?Page...repo.installer

i think you have to set up/add the repository installer in some way.
 
Old 11-27-2011, 11:20 PM   #3
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Original Poster
Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
i tried downloading kernel-devel-3.1.0-7.fc16.x86_64.rpm for fedora-15 but i get this error while trying to compile the driver:
Code:
[liveuser@localhost sta]$ ll
total 96
drwxrwxr-x. 2 liveuser liveuser  4096 Nov 27 23:27 chips
drwxrwxr-x. 2 liveuser liveuser  4096 Nov 27 23:27 common
drwxrwxr-x. 5 liveuser liveuser  4096 Nov 27 23:27 include
-rw-rw-r--. 1 liveuser liveuser 14819 Nov 27 23:27 iwpriv_usage.txt
-rw-rw-r--. 1 liveuser liveuser 12573 Nov 27 23:27 Makefile
drwxrwxr-x. 3 liveuser liveuser  4096 Nov 27 23:27 os
-rw-rw-r--. 1 liveuser liveuser 13366 Nov 27 23:27 README_STA_pci
-rw-rw-r--. 1 liveuser liveuser   613 Nov 27 23:27 RT2860STACard.dat
-rw-rw-r--. 1 liveuser liveuser  1124 Nov 27 23:27 RT2860STA.dat
drwxrwxr-x. 2 liveuser liveuser  4096 Nov 27 23:27 sta
-rw-rw-r--. 1 liveuser liveuser 14253 Nov 27 23:27 sta_ate_iwpriv_usage.txt
drwxrwxr-x. 2 liveuser liveuser  4096 Nov 27 23:52 tools
[liveuser@localhost sta]$ make
make -C tools
make[1]: Entering directory `/home/liveuser/sta/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory `/home/liveuser/sta/tools'
/home/liveuser/sta/tools/bin2h
cp -f os/linux/Makefile.6 /home/liveuser/sta/os/linux/Makefile
make -C /lib/modules/2.6.40.6-0.fc15.x86_64/build SUBDIRS=/home/liveuser/sta/os/linux modules
make[1]: Entering directory `/usr/src/kernels/3.1.0-7.fc16.x86_64'
  CC [M]  /home/liveuser/sta/os/linux/../../common/crypt_md5.o
  CC [M]  /home/liveuser/sta/os/linux/../../common/crypt_sha2.o
  CC [M]  /home/liveuser/sta/os/linux/../../common/crypt_hmac.o
  CC [M]  /home/liveuser/sta/os/linux/../../common/crypt_aes.o
  CC [M]  /home/liveuser/sta/os/linux/../../common/crypt_arc4.o
  CC [M]  /home/liveuser/sta/os/linux/../../common/mlme.o
/home/liveuser/sta/os/linux/../../common/mlme.c: In function ‘MlmeResetRalinkCounters’:
/home/liveuser/sta/os/linux/../../common/mlme.c:870:2: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
/home/liveuser/sta/os/linux/../../common/mlme.c:870:2: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
/home/liveuser/sta/os/linux/../../common/mlme.c: In function ‘BssTableSetEntry’:
/home/liveuser/sta/os/linux/../../common/mlme.c:5822:39: warning: operation on ‘Tab->BssOverlapNr’ may be undefined [-Wsequence-point]
  CC [M]  /home/liveuser/sta/os/linux/../../common/cmm_wep.o
  CC [M]  /home/liveuser/sta/os/linux/../../common/action.o
  CC [M]  /home/liveuser/sta/os/linux/../../common/cmm_data.o
  CC [M]  /home/liveuser/sta/os/linux/../../common/rtmp_init.o
  CC [M]  /home/liveuser/sta/os/linux/../../common/cmm_tkip.o
  CC [M]  /home/liveuser/sta/os/linux/../../common/cmm_aes.o
  CC [M]  /home/liveuser/sta/os/linux/../../common/cmm_sync.o
  CC [M]  /home/liveuser/sta/os/linux/../../common/eeprom.o
  CC [M]  /home/liveuser/sta/os/linux/../../common/cmm_sanity.o
  CC [M]  /home/liveuser/sta/os/linux/../../common/cmm_info.o
  CC [M]  /home/liveuser/sta/os/linux/../../common/cmm_cfg.o
  CC [M]  /home/liveuser/sta/os/linux/../../common/cmm_wpa.o
  CC [M]  /home/liveuser/sta/os/linux/../../common/dfs.o
  CC [M]  /home/liveuser/sta/os/linux/../../common/spectrum.o
/home/liveuser/sta/os/linux/../../common/spectrum.c: In function ‘PeerMeasureReportAction’:
/home/liveuser/sta/os/linux/../../common/spectrum.c:1966:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat]
  CC [M]  /home/liveuser/sta/os/linux/../../common/rtmp_timer.o
  CC [M]  /home/liveuser/sta/os/linux/../../common/rt_channel.o
  CC [M]  /home/liveuser/sta/os/linux/../../common/cmm_profile.o
  CC [M]  /home/liveuser/sta/os/linux/../../common/cmm_asic.o
  CC [M]  /home/liveuser/sta/os/linux/../../common/cmm_cmd.o
  CC [M]  /home/liveuser/sta/os/linux/../../sta/assoc.o
  CC [M]  /home/liveuser/sta/os/linux/../../sta/auth.o
  CC [M]  /home/liveuser/sta/os/linux/../../sta/auth_rsp.o
  CC [M]  /home/liveuser/sta/os/linux/../../sta/sync.o
  CC [M]  /home/liveuser/sta/os/linux/../../sta/sanity.o
  CC [M]  /home/liveuser/sta/os/linux/../../sta/rtmp_data.o
  CC [M]  /home/liveuser/sta/os/linux/../../sta/connect.o
  CC [M]  /home/liveuser/sta/os/linux/../../sta/wpa.o
  CC [M]  /home/liveuser/sta/os/linux/../../sta/ags.o
  CC [M]  /home/liveuser/sta/os/linux/../../sta/sta_cfg.o
  CC [M]  /home/liveuser/sta/os/linux/../../common/rtmp_init_inf.o
  CC [M]  /home/liveuser/sta/os/linux/../../os/linux/rt_profile.o
  CC [M]  /home/liveuser/sta/os/linux/../../os/linux/sta_ioctl.o
  CC [M]  /home/liveuser/sta/os/linux/../../os/linux/rt_linux.o
/home/liveuser/sta/os/linux/../../os/linux/rt_linux.c: In function ‘duplicate_pkt’:
/home/liveuser/sta/os/linux/../../os/linux/rt_linux.c:484:3: warning: passing argument 1 of ‘memmove’ makes pointer from integer without a cast [enabled by default]
/usr/src/kernels/3.1.0-7.fc16.x86_64/arch/x86/include/asm/string_64.h:58:7: note: expected ‘void *’ but argument is of type ‘sk_buff_data_t’
/home/liveuser/sta/os/linux/../../os/linux/rt_linux.c:486:3: warning: passing argument 1 of ‘memmove’ makes pointer from integer without a cast [enabled by default]
/usr/src/kernels/3.1.0-7.fc16.x86_64/arch/x86/include/asm/string_64.h:58:7: note: expected ‘void *’ but argument is of type ‘sk_buff_data_t’
/home/liveuser/sta/os/linux/../../os/linux/rt_linux.c: In function ‘ClonePacket’:
/home/liveuser/sta/os/linux/../../os/linux/rt_linux.c:636:23: warning: assignment makes integer from pointer without a cast [enabled by default]
/home/liveuser/sta/os/linux/../../os/linux/rt_linux.c: In function ‘update_os_packet_info’:
/home/liveuser/sta/os/linux/../../os/linux/rt_linux.c:658:15: warning: assignment makes integer from pointer without a cast [enabled by default]
/home/liveuser/sta/os/linux/../../os/linux/rt_linux.c: In function ‘wlan_802_11_to_802_3_packet’:
/home/liveuser/sta/os/linux/../../os/linux/rt_linux.c:679:15: warning: assignment makes integer from pointer without a cast [enabled by default]
/home/liveuser/sta/os/linux/../../os/linux/rt_linux.c: In function ‘send_monitor_packets’:
/home/liveuser/sta/os/linux/../../os/linux/rt_linux.c:952:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat]
/home/liveuser/sta/os/linux/../../os/linux/rt_linux.c: In function ‘RtmpOSNetDevDetach’:
/home/liveuser/sta/os/linux/../../os/linux/rt_linux.c:1701:38: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
/home/liveuser/sta/os/linux/../../os/linux/rt_linux.c: In function ‘RtmpOSNetDevAttach’:
/home/liveuser/sta/os/linux/../../os/linux/rt_linux.c:1738:38: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
  CC [M]  /home/liveuser/sta/os/linux/../../os/linux/rt_main_dev.o
/home/liveuser/sta/os/linux/../../os/linux/rt_main_dev.c: In function ‘MainVirtualIF_close’:
/home/liveuser/sta/os/linux/../../os/linux/rt_main_dev.c:121:13: warning: unused variable ‘Cancelled’ [-Wunused-variable]
  CC [M]  /home/liveuser/sta/os/linux/../../common/ba_action.o
/home/liveuser/sta/os/linux/../../common/ba_action.c: In function ‘convert_reordering_packet_to_preAMSDU_or_802_3_packet’:
/home/liveuser/sta/os/linux/../../common/ba_action.c:1568:2: warning: assignment makes integer from pointer without a cast [enabled by default]
  CC [M]  /home/liveuser/sta/os/linux/../../common/cmm_mac_pci.o
  CC [M]  /home/liveuser/sta/os/linux/../../common/cmm_data_pci.o
  CC [M]  /home/liveuser/sta/os/linux/../../common/ee_prom.o
  CC [M]  /home/liveuser/sta/os/linux/../../common/ee_efuse.o
  CC [M]  /home/liveuser/sta/os/linux/../../common/rtmp_mcu.o
/home/liveuser/sta/os/linux/../../common/rtmp_mcu.c: In function ‘RtmpAsicLoadFirmware’:
/home/liveuser/sta/os/linux/../../common/rtmp_mcu.c:352:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
/home/liveuser/sta/os/linux/../../common/rtmp_mcu.c:355:2: warning: passing argument 1 of ‘writel’ makes integer from pointer without a cast [enabled by default]
/usr/src/kernels/3.1.0-7.fc16.x86_64/arch/x86/include/asm/io.h:63:1: note: expected ‘unsigned int’ but argument is of type ‘ULONG *’
/home/liveuser/sta/os/linux/../../common/rtmp_mcu.c:356:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘ULONG’ [-Wformat]
  CC [M]  /home/liveuser/sta/os/linux/../../chips/rt30xx.o
  CC [M]  /home/liveuser/sta/os/linux/../../common/rt_rf.o
  CC [M]  /home/liveuser/sta/os/linux/../../chips/rt3090.o
  CC [M]  /home/liveuser/sta/os/linux/../../os/linux/rt_pci_rbus.o
  CC [M]  /home/liveuser/sta/os/linux/../../os/linux/rt_rbus_pci_util.o
  CC [M]  /home/liveuser/sta/os/linux/../../os/linux/pci_main_dev.o
/home/liveuser/sta/os/linux/../../os/linux/pci_main_dev.c: In function ‘rt2860_probe’:
/home/liveuser/sta/os/linux/../../os/linux/pci_main_dev.c:309:13: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
/home/liveuser/sta/os/linux/../../os/linux/pci_main_dev.c: In function ‘RTMPrt3xSetPCIePowerLinkCtrl’:
/home/liveuser/sta/os/linux/../../os/linux/pci_main_dev.c:941:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘ULONG’ [-Wformat]
/home/liveuser/sta/os/linux/../../os/linux/pci_main_dev.c:974:5: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘ULONG’ [-Wformat]
/home/liveuser/sta/os/linux/../../os/linux/pci_main_dev.c:986:5: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘ULONG’ [-Wformat]
/home/liveuser/sta/os/linux/../../os/linux/pci_main_dev.c:949:11: warning: unused variable ‘vendor_id’ [-Wunused-variable]
/home/liveuser/sta/os/linux/../../os/linux/pci_main_dev.c:1000:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘ULONG’ [-Wformat]
/home/liveuser/sta/os/linux/../../os/linux/pci_main_dev.c:1027:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘ULONG’ [-Wformat]
/home/liveuser/sta/os/linux/../../os/linux/pci_main_dev.c:934:8: warning: unused variable ‘offset’ [-Wunused-variable]
/home/liveuser/sta/os/linux/../../os/linux/pci_main_dev.c:933:8: warning: unused variable ‘Vendor’ [-Wunused-variable]
/home/liveuser/sta/os/linux/../../os/linux/pci_main_dev.c:1006:4: warning: ‘HostConfiguration’ may be used uninitialized in this function [-Wuninitialized]
  CC [M]  /home/liveuser/sta/os/linux/../../os/linux/cfg80211.o
/home/liveuser/sta/os/linux/../../os/linux/cfg80211.c:679:2: warning: ‘enum tx_power_setting’ declared inside parameter list [enabled by default]
/home/liveuser/sta/os/linux/../../os/linux/cfg80211.c:679:2: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
/home/liveuser/sta/os/linux/../../os/linux/cfg80211.c:678:29: error: parameter 2 (‘Type’) has incomplete type
/home/liveuser/sta/os/linux/../../os/linux/cfg80211.c:676:12: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
/home/liveuser/sta/os/linux/../../os/linux/cfg80211.c:1355:2: warning: initialization from incompatible pointer type [enabled by default]
/home/liveuser/sta/os/linux/../../os/linux/cfg80211.c:1355:2: warning: (near initialization for ‘CFG80211_Ops.set_channel’) [enabled by default]
/home/liveuser/sta/os/linux/../../os/linux/cfg80211.c:1378:2: warning: initialization from incompatible pointer type [enabled by default]
/home/liveuser/sta/os/linux/../../os/linux/cfg80211.c:1378:2: warning: (near initialization for ‘CFG80211_Ops.add_key’) [enabled by default]
/home/liveuser/sta/os/linux/../../os/linux/cfg80211.c:1379:2: warning: initialization from incompatible pointer type [enabled by default]
/home/liveuser/sta/os/linux/../../os/linux/cfg80211.c:1379:2: warning: (near initialization for ‘CFG80211_Ops.get_key’) [enabled by default]
/home/liveuser/sta/os/linux/../../os/linux/cfg80211.c:1380:2: warning: initialization from incompatible pointer type [enabled by default]
/home/liveuser/sta/os/linux/../../os/linux/cfg80211.c:1380:2: warning: (near initialization for ‘CFG80211_Ops.del_key’) [enabled by default]
/home/liveuser/sta/os/linux/../../os/linux/cfg80211.c:1381:2: warning: initialization from incompatible pointer type [enabled by default]
/home/liveuser/sta/os/linux/../../os/linux/cfg80211.c:1381:2: warning: (near initialization for ‘CFG80211_Ops.set_default_key’) [enabled by default]
/home/liveuser/sta/os/linux/../../os/linux/cfg80211.c:1388:2: warning: initialization from incompatible pointer type [enabled by default]
/home/liveuser/sta/os/linux/../../os/linux/cfg80211.c:1388:2: warning: (near initialization for ‘CFG80211_Ops.rfkill_poll’) [enabled by default]
/home/liveuser/sta/os/linux/../../os/linux/cfg80211.c: In function ‘CFG80211_Scaning’:
/home/liveuser/sta/os/linux/../../os/linux/cfg80211.c:2062:2: error: too few arguments to function ‘ieee80211_channel_to_frequency’
include/net/cfg80211.h:2110:12: note: declared here
/home/liveuser/sta/os/linux/../../os/linux/cfg80211.c: In function ‘CFG80211_SupBandInit’:
/home/liveuser/sta/os/linux/../../os/linux/cfg80211.c:2594:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat]
/home/liveuser/sta/os/linux/../../os/linux/cfg80211.c:2622:3: error: too few arguments to function ‘ieee80211_channel_to_frequency’
include/net/cfg80211.h:2110:12: note: declared here
make[2]: *** [/home/liveuser/sta/os/linux/../../os/linux/cfg80211.o] Error 1
make[1]: *** [_module_/home/liveuser/sta/os/linux] Error 2
make[1]: Leaving directory `/usr/src/kernels/3.1.0-7.fc16.x86_64'
make: *** [LINUX] Error 2
[liveuser@localhost sta]$ ll /home/liveuser/sta/os/linux/../../os/linux/cfg80211.o
ls: cannot access /home/liveuser/sta/os/linux/../../os/linux/cfg80211.o: No such file or directory
i am getting close but not quite.
 
  


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
[cross compiling]x86_64 system, compile target i686 ////// Programming 1 03-31-2011 03:56 AM
Compile kernel, migrate to target system Irving Linux - General 2 06-20-2006 06:27 PM
How can I cross compile the kernel? Basel Slackware 5 09-07-2005 06:23 AM
Can gcc cross-compile C code to M68K Assembly? lowpro2k3 Programming 1 03-25-2005 07:50 AM
Cross Compile Kernel. zaicheke Linux - General 1 01-10-2005 11:39 PM

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

All times are GMT -5. The time now is 02:33 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