Hi,
I'm unsing a Umbuntu machine as a build machine. There I installed the toochain from "fsl-networking-eglibc-i686-ppce500v2-toolchain-QorIQ-SDK-V1.8.sh". I got it from SDK1v8 Virtual Envioroment for PPCE500mc. (yes, using e500v2 toolchain obtained from e550mc virtual enviroment, this is not a problem).
With the toochain installed in defaul path, I was able to compile (in build machine), the linux 3.12.xx. targeting QorIQ P1010! So, I'm cross-compiling from an Unbuntu build machine to a P1010.
In MenuConfig's Linux 3.12, I selected "Freescale 85xx" as Processor Type (I'm targeting P1010). I did not set "Workarround erratum A-006184". I did set SPE enable!
Them I did: "source /opt/fsl-networking/QorIQ-SDK-V1.8/environment-setup-ppce500v2-fsl-linux-gnuspe", and
make all V=2 LIBGCC=/opt/fsl-networking/QorIQ-SDK-V1.8/sysroots/ppce500v2-fsl-linux-gnuspe/usr/lib/powerpc-fsl-linux-gnuspe/4.9.2/libgcc.a in order to xcompile the kernell.
I added LIBCC=/opt/..." n make command, because otherwise I got an error: powerpc-fsl-linux-gnuspe-ld: cannot find libgcc.a: No such file or directory
Why this happen? Why I need to pass LIBGCC like that? If I do export LIBGCC="...", it will not be accessible!
After all this, I was able to xcompile the linux 3.12 targeting P1010 (then using ppce500v2 toochain ),
After I also did also performed :
make headers_install INSTALL_HDR_PATH=$PWD/../linux-inc V=1
But my question is: When compiling a 3th party code, I'm getting "'struct task_struct' declared inside parameter list" in "linux/arch/powerpc/include/asm/hw_breakpoint.h"!
To be clear, the flag: CONFIG_HAVE_HW_BREAKPOINT is NOT set anyway.
Why this happens? Could this issue related with any configuration option in Kernel MenuConfig?
There is anyone with a tip?
Log Error:
In file included from /home/amacedo/zebic/lib/linux/arch/powerpc/include/asm/processor.h:36:0,
from /home/amacedo/zebic/lib/linux/arch/powerpc/include/asm/thread_info.h:33,
from /home/amacedo/zebic/lib/linux/include/linux/thread_info.h:54,
from /home/amacedo/zebic/lib/linux/include/linux/preempt.h:9,
from /home/amacedo/zebic/lib/linux/include/linux/spinlock.h:50,
from /home/amacedo/zebic/lib/linux/include/linux/mmzone.h:7,
from /home/amacedo/zebic/lib/linux/include/linux/gfp.h:4,
from /home/amacedo/zebic/lib/linux/include/linux/slab.h:14,
from /home/amacedo/zebic/lib/sdk-xgs-robo-6.4.8/systems/linux/kernel/modules/include/lkm.h:65,
from /home/amacedo/zebic/lib/sdk-xgs-robo-6.4.8/systems/linux/kernel/modules/shared/gmodule.c:50:
/home/amacedo/zebic/lib/linux/arch/powerpc/include/asm/hw_breakpoint.h:96:69: error: 'struct task_struct' declared inside parameter list [-Werror]
static inline void thread_change_pc(struct task_struct *tsk, struct pt_regs *regs) { }
^
/home/amacedo/zebic/lib/linux/arch/powerpc/include/asm/hw_breakpoint.h:96:69: error: its scope is only this definition or declaration, which is probably not what you want [-Werror]
Thanks in advance for any tip.
The following command sequence is recommended for kernel building:
• $ bitbake -c cleansstate virtual/kernel
• $ bitbake -c patch virtual/kernel //change kernel source code if it is needed
• $ bitbake -c menuconfig virtual/kernel
• $ bitbake virtual/kernel // Rebuild kernel:
The following command sequence is recommended for standalone comiling the test.c code using the e500v2 toolchain:
sudo chmod 777 /opt/fsl-networking/QorIQ-SDK-V1.5/environment-setup-ppce500v2-fsl_networking-linux-gnuspe
/opt/fsl-networking/QorIQ-SDK-V1.5/environment-setup-ppce500v2-fsl_networking-linux-gnuspe
Compile the source file.
/opt/fsl-networking/QorIQ-SDK-V1.5/sysroots/i686-fsl_networking_sdk-linux/usr/bin/ppce500v2-fsl_networking-linux-gnuspe/powerpc-fsl_networking-linux-gnuspe-gcc -g -o test test.c
Have a great day,
Pavel
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Pavel,
Thanks a lot for your reply.
What you have suggested is similar to what I have done to get the Linux kerne 3.12 from Virtual Enviroment to my Build system...
Why are you suggesting to build the linux kernel in Virtual Enviroment, and the move it again to my build machine?
I need to work in a build machine, I'm using Virtual Enviroment only to obtain the toolchains and the Linux Kernel.
What could went wrong in order to have this kind of errors regarding "'struct task_struct' declared inside parameter list: in /arch/powerpc/include/asm/hw_breakpoint.h"" ?
Beside the error, I'm point out, there is also those ones, that I do belive that they are related:
In file included from /home/amacedo/zebic/lib/linux/arch/powerpc/include/asm/thread_info.h:33:0,
from /home/amacedo/zebic/lib/linux/include/linux/thread_info.h:54,
from /home/amacedo/zebic/lib/linux/include/linux/preempt.h:9,
from /home/amacedo/zebic/lib/linux/include/linux/spinlock.h:50,
from /home/amacedo/zebic/lib/linux/include/linux/mmzone.h:7,
from /home/amacedo/zebic/lib/linux/include/linux/gfp.h:4,
from /home/amacedo/zebic/lib/linux/include/linux/slab.h:14,
from /home/amacedo/zebic/lib/sdk-xgs-robo-6.4.8/systems/linux/kernel/modules/include/lkm.h:65,
from /home/amacedo/zebic/lib/sdk-xgs-robo-6.4.8/systems/linux/kernel/modules/include/gmodule.h:49,
from /home/amacedo/zebic/lib/sdk-xgs-robo-6.4.8/systems/linux/kernel/modules/uk-proxy/linux-uk-proxy.c:47:
/home/amacedo/zebic/lib/linux/arch/powerpc/include/asm/processor.h:158:2: error: unknown type name 'vector128'
vector128 vr[32] __attribute__((aligned(16)));
^
/home/amacedo/zebic/lib/linux/arch/powerpc/include/asm/processor.h:159:2: error: unknown type name 'vector128'
vector128 vscr __attribute__((aligned(16)));
^
In file included from /home/amacedo/zebic/lib/linux/include/linux/timex.h:65:0,
from /home/amacedo/zebic/lib/linux/include/linux/jiffies.h:8,
from /home/amacedo/zebic/lib/linux/include/linux/ktime.h:25,
from /home/amacedo/zebic/lib/linux/include/linux/timer.h:5,
from /home/amacedo/zebic/lib/linux/include/linux/workqueue.h:8,
from /home/amacedo/zebic/lib/linux/include/linux/srcu.h:34,
from /home/amacedo/zebic/lib/linux/include/linux/notifier.h:15,
from /home/amacedo/zebic/lib/linux/include/linux/memory_hotplug.h:6,
from /home/amacedo/zebic/lib/linux/include/linux/mmzone.h:824,
from /home/amacedo/zebic/lib/linux/include/linux/gfp.h:4,
from /home/amacedo/zebic/lib/linux/include/linux/slab.h:14,
from /home/amacedo/zebic/lib/sdk-xgs-robo-6.4.8/systems/linux/kernel/modules/include/lkm.h:65,
from /home/amacedo/zebic/lib/sdk-xgs-robo-6.4.8/systems/linux/kernel/modules/include/gmodule.h:49,
from /home/amacedo/zebic/lib/sdk-xgs-robo-6.4.8/systems/linux/kernel/modules/uk-proxy/linux-uk-proxy.c:47:
/home/amacedo/zebic/lib/linux/arch/powerpc/include/asm/timex.h: In function 'get_cycles':
/home/amacedo/zebic/lib/linux/arch/powerpc/include/asm/timex.h:51:23: error: 'CPU_FTR_601' undeclared (first use in this function)
: "=r" (ret) : "i" (CPU_FTR_601), "i" (SPRN_TBRL));
^
/home/amacedo/zebic/lib/linux/arch/powerpc/include/asm/timex.h:51:23: note: each undeclared identifier is reported only once for each function it appears in
In file included from /home/amacedo/zebic/lib/linux/arch/powerpc/include/asm/io.h:35:0,
from /home/amacedo/zebic/lib/linux/include/linux/io.h:22,
from /home/amacedo/zebic/lib/linux/include/linux/pci.h:31,
from /home/amacedo/zebic/lib/sdk-xgs-robo-6.4.8/systems/linux/kernel/modules/include/lkm.h:85,
from /home/amacedo/zebic/lib/sdk-xgs-robo-6.4.8/systems/linux/kernel/modules/include/gmodule.h:49,
from /home/amacedo/zebic/lib/sdk-xgs-robo-6.4.8/systems/linux/kernel/modules/uk-proxy/linux-uk-proxy.c:47:
/home/amacedo/zebic/lib/linux/arch/powerpc/include/asm/mmu.h: In function 'mmu_has_feature':
/home/amacedo/zebic/lib/linux/arch/powerpc/include/asm/mmu.h:126:10: error: 'cur_cpu_spec' undeclared (first use in this function)
return (cur_cpu_spec->mmu_features & feature);
^
/home/amacedo/zebic/lib/linux/arch/powerpc/include/asm/mmu.h: In function 'mmu_clear_feature':
/home/amacedo/zebic/lib/linux/arch/powerpc/include/asm/mmu.h:131:2: error: 'cur_cpu_spec' undeclared (first use in this function)
cur_cpu_spec->mmu_features &= ~feature;
^
gmake[4]: *** [/home/amacedo/zebic/lib/sdk-xgs-robo-6.4.8/build/linux-e500v2-3_12/e500v2-3_12/systems/linux/kernel/modules/uk-proxy/linux-uk-proxy.o] Error 1
gmake[3]: *** [uk-proxy] Error 2
After this, have you more help to me?
thanks
antónio