linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Philip Prindeville <philipp_subx@redfish-solutions.com>
To: Ed W <lists@wildgooses.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: Cross compiling currently broken?
Date: Thu, 03 Sep 2009 10:14:19 -0600	[thread overview]
Message-ID: <4A9FEB5B.8020904@redfish-solutions.com> (raw)
In-Reply-To: <4A94319B.9030903@wildgooses.com>

Ed W wrote:
> It would appear that there is something broken with the current Makefile 
> when crosscompiling - I need a bit of help figuring out a proper solution.
>
> In this case it's barely cross compiling, I just want to use a kernel I 
> compiled somewhere, but isn't installed (I'm also in a chroot).  
> According to the docs (http://linuxwireless.org/en/users/Download) I 
> should do something like:
>
>   make KLIB=/home/mcgrof/kernels/linux-2.6.27.22 \
>    KLIB_BUILD=/home/mcgrof/kernels/linux-2.6.27.22
>
> However, the makefile then installs the files in completely the wrong 
> location, eg the following puts the files in 
> /usr/src/linux/lib/modules/2.6.30.5-grsec-wrap/ !!
>
>   make KLIB=/usr/src/linux \
>    KLIB_BUILD=/usr/src/linux install-modules
>
> So KLIB should apparently be something like /lib/modules/xyz.  However, 
> this is still wrong because the line below puts the files in: 
> /lib/modules/2.6.30.5-grsec-wrap/lib/modules/2.6.30.5-grsec-wrap/
>
>   make KLIB=/lib/modules/2.6.30.5-grsec-wrap/ \
>     KLIB_BUILD=/usr/src/linux  install-modules
>
>
> Adding unsetting KMODPATH_ARG seems to do the trick (but seems unintended?):
>
>   make KLIB=/lib/modules/2.6.30.5-grsec-wrap/ \
>     KLIB_BUILD=/usr/src/linux KMODPATH_ARG= install-modules
>
>
> But I still get repeated errors while building (where this is the 
> currently running kernel, but the modules dir is unavailable in this 
> chroot):
>
>   FATAL: Could not load 
> /lib/modules/2.6.29.6-grsec2.1.14-vs2.3.0.36.14/modules.dep: No such 
> file or directory
>   FATAL: Could not load 
> /lib/modules/2.6.29.6-grsec2.1.14-vs2.3.0.36.14/modules.dep: No such 
> file or directory
>
>
> This appears to be caused by these lines at the top of the makefile:
>   MADWIFI=$(shell $(MODPROBE) -l ath_pci)
>   OLD_IWL=$(shell $(MODPROBE) -l iwl4965)
>
> Clearly these need some parametrisation to include the running kernel 
> name.  Something like this might pluck out the correct
> uname:
> KERNELRELEASE = $(cat $(KLIB_BUILD)/include/config/kernel.release 2> 
> /dev/null)
>
>
> I'm not quite clear what all the KLIB/KLIB_BUILD vars are supposed to be 
> achieving, but at present they aren't working correctly when overridden 
> to build a non installed kernel.  I'm surprised more people aren't 
> hitting this?
>
> Grateful if someone with a bit more experience could suggest a proper fix?
>
> Thanks
>
> Ed W
>   

Try the patch I posted a few weeks ago.  It solved this issue for us.

-Philip


      parent reply	other threads:[~2009-09-03 16:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-25 18:46 Cross compiling currently broken? Ed W
2009-08-25 19:08 ` Luis R. Rodriguez
2009-08-25 19:26   ` Ed W
2009-09-03 16:14 ` Philip Prindeville [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A9FEB5B.8020904@redfish-solutions.com \
    --to=philipp_subx@redfish-solutions.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lists@wildgooses.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).