Cross-compiling Atheros_CSI openwrt on router from Ubuntu


I have already built the firmware image and updated the firmware of my router. Now, I am trying to obtain CSI data from my router for that I need to cross-compile this source code:Atheros-CSI-TOOL. It already has the makefile configured and it tells to just set the environment and give the "make" command. Which I did,

But I am getting this error:

**mips-openwrt-linux-gcc csi_fun.o main.o -o recvCSI**
**make: mips-openwrt-linux-gcc: Command not found**
**make: *** [recvCSI] Error 127**

I have already set the PATH to the bin directory which contains "mips-openwrt-linux-gcc", this is the output of the echo $PATH:

As you can see I have set the path for the toolchain directory.

What is the issue which is causing the problem?
Thanks in advance.

Have you tried to create a package for the tool and build it within the OpenWrt build system?

Errors of that sort are often due to the lack of the full environment that the build system creates for compilation.

Do you mean package like the Makefile package? It was already created in the folder I cloned from the Github, here is the reference: Atheros-CSI tool, see page 9, 3rd para.
So, no I didn't create any package. and the Makefile already had environment mentioned, posting the Makefile here for reference:

**OBJS = csi_fun.o main.o**
**CC = mips-openwrt-linux-gcc**

**CFLAGS= -std=gnu99**

**recvCSI: $(OBJS)**
**	$(CC) $(OBJS) -o recvCSI**

**csi_fun.o: csi_fun.c csi_fun.h**
**	$(CC) -c $(CFLAGS) -I $(INCLUDE_DIR) -o $@ $<**

**recvCSI.o: main.c csi_fun.h**
**	$(CC) -c $(CFLAGS) -I $(INCLUDE_DIR) -o $@ $<**

**	rm -f *.o recvCSI**

With all the "magic" in cross-compiling, I usually find it worth my time to "wrap" the distribution in an OpenWrt package with an OpenWrt Makefile.

Actually, I am quite new at this and haven't created any package before. I don't know how to wrap the distribution in an OpenWRT package with a Makefile, that's why I didn't create it till now. Do you think the issue is somehow related to that, in that case, I would have to learn to do it.

There's a section on using GNU autotools in Packaging guidelines here on the forums that might be helpful as well. I know that a lot of packages effectively just "wrap" the existing makefile from the upstream source.