Hi,
On Sat Apr 18, 2015 at 22:26:15 +0800, Youren Shen wrote:
> I'm trying to port L4Linux 3.14 to Linux Kernel 3.4. But when I complied
> the kernel, this error happened:
> /home/shenyouren/workspace/kernel/kernel_exynos5250/arch/l4/kernel/main.c:
> In function 'cpu0_startup':
> /home/shenyouren/workspace/kernel/kernel_exynos5250/arch/l4/kernel/main.c:2124:2:
> error: implicit declaration of function 'set_my_cpu_offset'
> [-Werror=implicit-function-declaration]
>
> I checked main.c file:
>
> #include <asm/unistd.h>
> #include <asm/percpu.h>
> #include <asm/generic/l4lib.h>
>
> So I add one percpu.h file with definition of 'set_my_cpu_offset' in
> /home/shenyouren/workspace/kernel/kernel_exynos5250/arch/l4/include/asm/arch-arm/,
> however this error still happened.
>
> Then I add the definition of this function to
> /home/shenyouren/workspace/kernel/kernel_exynos5250/include/linux/percpu.h,
> then the error message will not show.
>
> Also, discard the change in $(src)/include/linux/percpu.h, then I change
> the main.c file to include absolute path of percpu.h.
>
> #include <asm/unistd.h>
> #include
> </home/shenyouren/workspace/kernel/kernel_exynos5250/arch/l4/include/asm/arch-arm/percpu.h>
> #include <asm/generic/l4lib.h>
>
> It passed the complied to.
When you put a header file in arch/l4/include/asm/arch-arm/ including it
via <asm/foo.h> should work.
> So that is say, the #include <asm/percpu.h> is reference to
> src/include/linux/percpu.h. That really strange.
So, include <linux/percpu.h> in main.c right away?
The L4 part of L4Linux you're looking at is for 3.14 and you apply it to
Linux 3.4, please expect that things are different and need adaption.
> I do not change the Makefile in arch/l4, and I really confused about this
> error.
> Now this problem occurs to me again, when complied the
> arch/l4/kernel/timer.c file, this error happened:
>
> /home/shenyouren/workspace/kernel/kernel_exynos5250/arch/l4/kernel/timer.c:153:35:
> warning: 'struct clock_event_device' declared inside parameter list
> [enabled by default]
> /home/shenyouren/workspace/kernel/kernel_exynos5250/arch/l4/kernel/timer.c:153:35:
> warning: its scope is only this definition or declaration, which is
> probably not what you want [enabled by default]
>
> but the definition of this to file should be defined in clockchips.h which
> is include in timer.c:
>
> #include <linux/timex.h>
> #include <linux/clockchips.h>
> #include <linux/irq.h>
>
> Thank you for your reading, I just want to know what's the rule of L4Linux
> header file linking, and solve this problem.
> I'd be so appreciated if anyone can give me some help!
There's a #ifdef CONFIG_GENERIC_CLOCKEVENTS_BUILD in clockchips.h.
Not defined?
Adam
--
Adam adam@os.inf.tu-dresden.de
Lackorzynski http://os.inf.tu-dresden.de/~adam/