Search Linux Wireless

RE: Build iw for 32bit ARM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Steve,
We are building with ptxdist, we have a compiler for arm (arm-linux-gnueabihf-gcc), I am not a total novice in this, and have already written some ptxdist rules, but haven't done it with non-autoconfizzed packages, basically the problem is that if I use the default iw.make from the ptxdist master branch, iw's Makefile tries to compile with the native compiler and native libnl, no matter what option i supply it with, I always get a x86-32 executable. When I modify the iw.make rule with the correct CC (by making a custom compile step), it then fails to find the correct libnl through pkg-config. The iw package is not modified at all. Could you suggest how to hard code the CC (or that it gets it normally from a CC variable supplied to the Makefile) or how to avoid pkg-config and supply the options needed manually. I know this is a step back from multi-platform build practices, but I just need it that way.

--
Lijep pozdrav / Best regards
Jakov Šimunić

-----Original Message-----
From: Steve deRosier <derosier@xxxxxxxxx> 
Sent: Friday, August 31, 2018 5:31 PM
To: Jakov Simunic <jakov.simunic@xxxxxxxxxxxx>
Cc: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>; linux-wireless <linux-wireless@xxxxxxxxxxxxxxx>
Subject: Re: Build iw for 32bit ARM

Hi Jakov,

On Fri, Aug 31, 2018 at 5:59 AM Jakov Simunic <jakov.simunic@xxxxxxxxxxxx> wrote:
>
> Hello,
> I am working on an embedded project which uses an armv7l architecture, which is a 32bit platform, and I am trying to compile iw-4.9 for it, and I don't know how to compile it for 32bit arches.

Unless you're building your Linux system 100% from scratch, you should leverage the build system for your platform. It will automatically do the right thing. You're likely using Buildroot, OpenWRT, OpenEmbedded, Yocto or some other platform that has compilers, build systems, packages and so on. First off, most likely iw is already included. And even if you want to build from your own modified version, theres ways to build using the systems above to just build it in-tree. And finally, even if not, you should use the target libraries and the cross-compilers that are used by your platform.

Step one, if you haven't already, is to get the build system for your platform and configure and build it. Then try building your modified version of iw if the stock one isn't helpful for you. I'd integrate it into the platform build system, but you could build out-of-tree by setting up the right flags and CROSS_COMPILER to point to the toolchain used for your platform. If I were doing that, I'd build the platform in verbose output mode and examine the compiler commandlines for hints.

> Tried adding -m32 to the CFLAGS, everything passes the build except the iw binary, which says:
>
> iw.o: could not read symbols: File in wrong format
> collect2: ld returned 1 exit status
> make: *** [iw] Error 1
>

Most likely your architecture flags to the linker don't match what you gave in the compiler stage. You could always also confirm the format of iw.o with the `file` command.

- Steve




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux