# [SOLVED]AR9271 open firmware compilation. Need help.

## cord

Hello All,

I have wi-fi with AR9271 chipset and want to compile open firmware.

How-to says:

```

$ make toolchain

...

then

...

$ make -C target_firmware

```

I try to do it but have no luck  :Sad: 

http://bpaste.net/show/366142/

So, what is the problem?

Do I need 'make toolchain' or gentoo lets to use the system staff gcc? (how?)

ps emerge --infoLast edited by cord on Sun Jun 15, 2014 1:26 pm; edited 1 time in total

----------

## nlsa8z6zoz7lyih3ap

The package sys-kernel/linux-firmware contains

some drivers for this.

 *Quote:*   

> equery files linux-firmware|grep 9271
> 
> /lib/firmware/ar9271.fw
> 
> /lib/firmware/htc_9271.fw
> ...

 

Perhaps this would meet your needs. It would, of course, install easily.

----------

## cord

 *nlsa8z6zoz7lyih3ap wrote:*   

> The package sys-kernel/linux-firmware contains
> 
> some drivers for this.
> 
>  *Quote:*   equery files linux-firmware|grep 9271
> ...

 

Thanks, but it is little outdated there... and it's not @FREE.

----------

## cord

Ok. The compilation error is solved. It was because of PaX (in softmode there are no errors).

But another one thing is the necessary compilation of own toolchain (gcc, binutils, etc.). So, for making 44KiB firmware file we need to download (!) and compile dozens of MiB   :Confused:  Unfortunately it seems to be hard linked in Makefile.

Maybe someone can prompt how to unlink of toolchain compiling, and how to use system staff toolchain instead  :Smile: 

Makefile

----------

## NeddySeagoon

cord,

```
TARGET=xtensa-elf
```

You need a cross compiler .... the fimware is going to run on a xtensa CPU, not a Intel/AMD one, so you cannot use your native toolchain.

Have a look at crossdev but I don't know if xtensa is supported.

The Makefile builds the cross compiler then uses the cross compiler to build your firmware.

----------

## cord

Oh, I see now. Ok. Solved.

----------

