vento vento - 5 months ago 26
Linux Question

Crosscompile Linux 3.15.3 for mips(el) vu solo2 Vlan module support (8021q)

i could already successfully crosscompile some binarys for mipsel vusolo2, ob ubuntu 14.04 32 bits with the toolchain mipsel-tuxbox-linux-gnu that i got from here http://shivanet.ro/tmp/mipsel-tuxbox-linux-gnu.tar.bz2.
I did install copy the toolchain to the directory /opt/cross/mipsel-tuxbox-linux-gnu.
Vusolo2 sat receiver runs linux 3.15.3 kernel, now i need vlan support (module 8021q). The idea ist to crosscompile the vlan module or the kernel if necessary and copy it to que box. What i did was download the sources for linux 3.15.3 then :

make ARCH=mips defconfig
make ARCH=mips menuconfig


Selected vlan support (8021q)
Then i issued the command with the path to my toolchain:

ARCH=mips CROSS_COMPILE=/opt/cross/mipsel-tuxbox-linux-gnu/bin/mipsel-tuxbox-linux-gnu-gcc make all


not certain if i have to select make all or make modules, my toolchain is not found.

root@BM2LTSR66MSvex:/opt/linux-3.13.5# ARCH=mips CROSS_COMPILE=/opt/cross/mipsel-tuxbox-linux-gnu/bin/mipsel-tuxbox-linux-gnu-gcc make all
/bin/sh: 1: /opt/cross/mipsel-tuxbox-linux-gnu/bin/mipsel-tuxbox-linux-gnu-gccgcc: not found
/bin/sh: 1: /opt/cross/mipsel-tuxbox-linux-gnu/bin/mipsel-tuxbox-linux-gnu-gccgcc: not found
make: /opt/cross/mipsel-tuxbox-linux-gnu/bin/mipsel-tuxbox-linux-gnu-gccgcc: Befehl nicht gefunden
/bin/sh: 1: /opt/cross/mipsel-tuxbox-linux-gnu/bin/mipsel-tuxbox-linux-gnu-gccgcc: not found
/bin/sh: 1: /opt/cross/mipsel-tuxbox-linux-gnu/bin/mipsel-tuxbox-linux-gnu-gccgcc: not found
scripts/kconfig/conf --silentoldconfig Kconfig
/bin/sh: 1: /opt/cross/mipsel-tuxbox-linux-gnu/bin/mipsel-tuxbox-linux-gnu-gccgcc: not found
/bin/sh: 1: /opt/cross/mipsel-tuxbox-linux-gnu/bin/mipsel-tuxbox-linux-gnu-gccgcc: not found
/bin/sh: 1: /opt/cross/mipsel-tuxbox-linux-gnu/bin/mipsel-tuxbox-linux-gnu-gccgcc: not found
/bin/sh: 1: /opt/cross/mipsel-tuxbox-linux-gnu/bin/mipsel-tuxbox-linux-gnu-gccgcc: not found
make: /opt/cross/mipsel-tuxbox-linux-gnu/bin/mipsel-tuxbox-linux-gnu-gccgcc: Befehl nicht gefunden
CHK include/config/kernel.release
UPD include/config/kernel.release
WRAP arch/mips/include/generated/asm/cputime.h
WRAP arch/mips/include/generated/asm/current.h
WRAP arch/mips/include/generated/asm/emergency-restart.h
WRAP arch/mips/include/generated/asm/local64.h
WRAP arch/mips/include/generated/asm/mutex.h
WRAP arch/mips/include/generated/asm/parport.h
WRAP arch/mips/include/generated/asm/percpu.h
WRAP arch/mips/include/generated/asm/scatterlist.h
WRAP arch/mips/include/generated/asm/sections.h
WRAP arch/mips/include/generated/asm/segment.h
WRAP arch/mips/include/generated/asm/serial.h
WRAP arch/mips/include/generated/asm/trace_clock.h
WRAP arch/mips/include/generated/asm/preempt.h
WRAP arch/mips/include/generated/asm/ucontext.h
WRAP arch/mips/include/generated/asm/xor.h
WRAP arch/mips/include/generated/uapi/asm/auxvec.h
WRAP arch/mips/include/generated/uapi/asm/ipcbuf.h
CHK include/generated/uapi/linux/version.h
UPD include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
CC kernel/bounds.s
/bin/sh: 1: /opt/cross/mipsel-tuxbox-linux-gnu/bin/mipsel-tuxbox-linux-gnu-gccgcc: not found
make[1]: *** [kernel/bounds.s] Fehler 127
make: *** [prepare0] Fehler 2


What ist the right way to inform make where my toolchain is? I noticed that make is looking for mipsel-tuxbox-linux-gnu-gccgcc instead of mipsel-tuxbox-linux-gnu-gcc.
Thanks in advance, kindly
Vento

PS : Hi, just could compile everything, first i got a 8021q.ko that i have copied to the vusolo 2 MIPS BCM 7356 processor, (lib/modules/linux-3.15.3). In Menuconfig, was no option for a BCM7356 i have selected, Texas instruments and the option little endian. Made :
root@BM2LTSR66MSvex:/opt/linux-3.13.5/net/8021q# file 8021q.ko 8021q.ko: ELF 32-bit LSB relocatable, MIPS, MIPS32 version 1 (SYSV),BuildID[sha1]=5be101e941197b08a4e3c2b1554e5fb002ca6ed7, not stripped


Seems to be the right format but when i try to start load it on the Vuplus Solo2:

root@vusolo2:/lib/modules/3.13.5# lsmod | grep 8021q
root@vusolo2:/lib/modules/3.13.5# modprobe 8021q
modprobe: ERROR: could not insert '8021q': Exec format error


Do i have to use other options when compiling the file?

Thanks Vento

Answer

You've got wrong cross-compiling tools suffix:

CROSS_COMPILE=/opt/cross/mipsel-tuxbox-linux-gnu/bin/mipsel-tuxbox-linux-gnu-

It will be extended to mipsel-tuxbox-linux-gnu-gcc, mipsel-tuxbox-linux-gnu-ld, etc.