Hi all,
I need to cross-compile a driver for my T2080RDB board with next steps:
1- I've follow section 3.3.7 of https://www.nxp.com/docs/en/supporting-information/QORIQ-SDK-2.0-IC-REV0.pdf in order to install standalon toolchain.
2-I've executed environment-setup-ppce6500-fsl-linux to set all necessaries environment variables.
3-I've executed the commands to compile my driver:
make ARCH=powerpc CROSS_COMPILE=/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/bin/powerpc-fsl-linux/powerpc-fsl-linux- -C /patchsourcecode/
Error 1:
/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/bin/powerpc-fsl-linux/powerpc-fsl-linux-ld: unrecognized option '-Wl,-O1'
/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/bin/powerpc-fsl-linux/powerpc-fsl-linux-ld: use the --help option for usage information
scripts/Makefile.build:441: fallo en las instrucciones para el objetivo 'init/mounts.o'
make[1]: *** [init/mounts.o] Error 1
Lokking at /opt/fsl-qoriq/2.0/environment-setup-ppce6500-fsl-linux file I've modified LDFLAGS variable:
export LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"
export LDFLAGS=" -O1 --hash-style=gnu --as-needed"
Error 2:
/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/bin/powerpc-fsl-linux/powerpc-fsl-linux-ld: cannot find libgcc.a: No such file or directory
/opt/fsl-qoriq/2.0/sysroots/x86_64-fslsdk-linux/usr/bin/powerpc-fsl-linux/powerpc-fsl-linux-ld: cannot find libgcc.a: No such file or directory
Makefile:790: fallo en las instrucciones para el objetivo 'vmlinux'
It seem sysroot is not well included into compiler commands but looking environment-setup-ppce6500-fsl-linux file:
export SDKTARGETSYSROOT=/opt/fsl-qoriq/2.0/sysroots/ppce6500-fsl-linux
export CC="powerpc-fsl-linux-gcc -m32 -mhard-float -mcpu=e6500 --sysroot=$SDKTARGETSYSROOT"
export CXX="powerpc-fsl-linux-g++ -m32 -mhard-float -mcpu=e6500 --sysroot=$SDKTARGETSYSROOT"
export CPP="powerpc-fsl-linux-gcc -E -m32 -mhard-float -mcpu=e6500 --sysroot=$SDKTARGETSYSROOT"
¿Somebody could tell me how to solve such errors? and ¿Why they are produced?
Please download ISO QorIQ-SDK-V2.0-PPCE6500-IMAGE-20160527-yocto.iso, and run the script fsl-toolchain/fsl-qoriq-glibc-x86_64-ppce6500-toolchain-2.0.sh to install Toolchain.
Please run the following command to setup the build environment.
$ source /opt/fsl-qoriq/2.0/environment-setup-ppce6500-fsl-linux
Please run the following commands to build your driver
$ unset LDFLAGS
$ make CC="$CC" LD="$LD" -C /patchsourcecode/