Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a Ubuntu and I have cross compiled an ath9k driver for an ARM architecture. The problem is a can't make the install work as I want to work. README says the following:

Building for external kernels

If you have a kernel you do not have installed but yet want to build the compat-wireless-2.6 drivers for it you can use this syntax:

make KLIB=/home/mcgrof/kernels/linux-2.6.23.9 KLIB_BUILD=/home/mcgrof/kernels/linux->2.6.23.9

If you have a kernel installed, which is not your currently running kernel (e.g. via distro updates; plus its corresponding kernel-dev package), you can use this syntax:

make KLIB=/lib/modules/2.6.30.6-53.fc11.x86_64

and to install to your system's root path for the non-running kernel:

make KLIB=/lib/modules/2.6.30.6-53.fc11.x86_64 KMODPATH_ARG='INSTALL_MOD_PATH=' install

My build command is the following:

make ARCH=arm CROSS_COMPILE=/home/roncsak/building/toolchain-arm-linux-gnueabihf/gcc-lw-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/bin/arm-linux-gnueabihf- KLIB=/home/roncsak/building/linux/linux-3.0.35-boundary KLIB_BUILD=/home/roncsak/building/linux/linux-3.0.35-boundary

(Building is a success.)

According to README I should install like this:

make ARCH=arm CROSS_COMPILE=/home/roncsak/building/toolchain-arm-linux-gnueabihf/gcc-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/bin/arm-linux-gnueabihf- KLIB=/home/roncsak/building/linux/linux-3.0.35-boundary KLIB_BUILD=/home/roncsak/building/linux/linux-3.0.35-boundary KMODPATH_ARG='INSTALL_MOD_PATH=/home/roncsak/building/targetfs/rfs/lib/modules/3.0.35' install

Unfortunatelly my install won't work. The result is the following:

make -C /home/roncsak/building/linux/linux-3.0.35-boundary M=/home/roncsak/building/ath9/compat-wireless-3.1.1-1 modules
make[1]: Entering directory `/home/roncsak/building/linux/linux-3.0.35-boundary'
  Building modules, stage 2.
  MODPOST 9 modules
WARNING: "ewma_init" [/home/roncsak/building/ath9/compat-wireless-3.1.1-1/net/mac80211/mac80211.ko] undefined!
WARNING: "ewma_add" [/home/roncsak/building/ath9/compat-wireless-3.1.1-1/net/mac80211/mac80211.ko] undefined!
make[1]: Leaving directory `/home/roncsak/building/linux/linux-3.0.35-boundary'
make -C /home/roncsak/building/linux/linux-3.0.35-boundary M=/home/roncsak/building/ath9/compat-wireless-3.1.1-1 "INSTALL_MOD_DIR=updates" INSTALL_MOD_PATH=/home/roncsak/building/buildDir/targetfs/rfs/lib/modules/3.0.35/ \
        modules_install
make[1]: Entering directory `/home/roncsak/building/linux/linux-3.0.35-boundary'
  INSTALL /home/roncsak/building/ath9/compat-wireless-3.1.1-1/compat/compat.ko
  INSTALL /home/roncsak/building/ath9/compat-wireless-3.1.1-1/drivers/net/wireless/ath/ath.ko
  INSTALL /home/roncsak/building/ath9/compat-wireless-3.1.1-1/drivers/net/wireless/ath/ath9k/ath9k.ko
  INSTALL /home/roncsak/building/ath9/compat-wireless-3.1.1-1/drivers/net/wireless/ath/ath9k/ath9k_common.ko
  INSTALL /home/roncsak/building/ath9/compat-wireless-3.1.1-1/drivers/net/wireless/ath/ath9k/ath9k_htc.ko
  INSTALL /home/roncsak/building/ath9/compat-wireless-3.1.1-1/drivers/net/wireless/ath/ath9k/ath9k_hw.ko
  INSTALL /home/roncsak/building/ath9/compat-wireless-3.1.1-1/net/mac80211/mac80211.ko
  INSTALL /home/roncsak/building/ath9/compat-wireless-3.1.1-1/net/rfkill/rfkill-regulator.ko
  INSTALL /home/roncsak/building/ath9/compat-wireless-3.1.1-1/net/wireless/cfg80211.ko
  DEPMOD  3.0.35
WARNING: /home/roncsak/building/buildDir/targetfs/rfs/lib/modules/3.0.35//lib/modules/3.0.35/updates/net/wireless/cfg80211.ko needs unknown symbol rfkill_unregister
WARNING: /home/roncsak/building/buildDir/targetfs/rfs/lib/modules/3.0.35//lib/modules/3.0.35/updates/net/wireless/cfg80211.ko needs unknown symbol rfkill_blocked
WARNING: /home/roncsak/building/buildDir/targetfs/rfs/lib/modules/3.0.35//lib/modules/3.0.35/updates/net/wireless/cfg80211.ko needs unknown symbol rfkill_destroy
WARNING: /home/roncsak/building/buildDir/targetfs/rfs/lib/modules/3.0.35//lib/modules/3.0.35/updates/net/wireless/cfg80211.ko needs unknown symbol rfkill_resume_polling
WARNING: /home/roncsak/building/buildDir/targetfs/rfs/lib/modules/3.0.35//lib/modules/3.0.35/updates/net/wireless/cfg80211.ko needs unknown symbol rfkill_pause_polling
WARNING: /home/roncsak/building/buildDir/targetfs/rfs/lib/modules/3.0.35//lib/modules/3.0.35/updates/net/wireless/cfg80211.ko needs unknown symbol rfkill_set_hw_state
WARNING: /home/roncsak/building/buildDir/targetfs/rfs/lib/modules/3.0.35//lib/modules/3.0.35/updates/net/wireless/cfg80211.ko needs unknown symbol rfkill_alloc
WARNING: /home/roncsak/building/buildDir/targetfs/rfs/lib/modules/3.0.35//lib/modules/3.0.35/updates/net/wireless/cfg80211.ko needs unknown symbol rfkill_register
WARNING: /home/roncsak/building/buildDir/targetfs/rfs/lib/modules/3.0.35//lib/modules/3.0.35/updates/net/wireless/cfg80211.ko needs unknown symbol rfkill_set_sw_state
WARNING: /home/roncsak/building/buildDir/targetfs/rfs/lib/modules/3.0.35//lib/modules/3.0.35/updates/net/mac80211/mac80211.ko needs unknown symbol ewma_add
WARNING: /home/roncsak/building/buildDir/targetfs/rfs/lib/modules/3.0.35//lib/modules/3.0.35/updates/net/mac80211/mac80211.ko needs unknown symbol ewma_init
WARNING: /home/roncsak/building/buildDir/targetfs/rfs/lib/modules/3.0.35//lib/modules/3.0.35/updates/net/rfkill/rfkill-regulator.ko needs unknown symbol rfkill_unregister
WARNING: /home/roncsak/building/buildDir/targetfs/rfs/lib/modules/3.0.35//lib/modules/3.0.35/updates/net/rfkill/rfkill-regulator.ko needs unknown symbol rfkill_destroy
WARNING: /home/roncsak/building/buildDir/targetfs/rfs/lib/modules/3.0.35//lib/modules/3.0.35/updates/net/rfkill/rfkill-regulator.ko needs unknown symbol rfkill_alloc
WARNING: /home/roncsak/building/buildDir/targetfs/rfs/lib/modules/3.0.35//lib/modules/3.0.35/updates/net/rfkill/rfkill-regulator.ko needs unknown symbol rfkill_register
make[1]: Leaving directory `/home/roncsak/building/linux/linux-3.0.35-boundary'
mkdir: cannot create directory `/usr/lib/compat-wireless/': Permission denied
make: *** [install-scripts] Error 1

How should I do that right?

share|improve this question
2  
mkdir: cannot create directory '/usr/lib/compat-wireless/': Permission denied You can (and you should) compile as a regular user but you must install your module as root. –  lgeorget Apr 23 '13 at 18:02
    
I don't want to install to '/usr/lib/compat-wireless/' because the compiled source is for arm architecture. I want to install this to '/home/roncsak/building/targetfs/' where my compiled drivers, modules and everything else are present. –  roncsak Apr 23 '13 at 18:25
1  
Ok. I had a doubt about what you were trying to do. That's why I commented and not posted as an answer. Why do you want to install the modules if they are for another kernel ? Can't you just keep your modules compiled and install them in the system you compiled them for ? –  lgeorget Apr 23 '13 at 19:40
    
Yeah, I kinda working with a build system... I have a path on my host where the dir tree looks like a linux system. I can't install on target system because target system should (and have to) work without any other modification. Compiling on target system is too slow and also slowing manifacturing. –  roncsak Apr 23 '13 at 19:56
    
As a workaround, I guess you could install the module manually, there are not so many files. But if you entered the line as they say in the README and that the variable INSTALL_MOD_PATH doesn't work as advertised, you should consider filing a bug report. –  lgeorget Apr 23 '13 at 20:01
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.