Hi, 2016년 10월 14일 17:09에 박성제 이(가) 쓴 글: > Dear developers,. > > > > I’m trying to build a kernel for tizen TM1. ( > <https://review.tizen.org/gerrit/#/projects/profile/mobile/platform/kernel/l > inux-3.10-sc7730,dashboards/default> profile/mobile/platform/kernel/linux-3. > 10-sc7730) > > I have tried two versions of toolchain. > > > > gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabihf.tar.xz > > and > > gcc-linaro-6.1.1-2016.08-x86_64_arm-linux-gnueabihf.tar.xz > > > > And I have referenced two sites. > https://source.tizen.org/documentation/developer-guide/getting-started- > guide/installing-development-tools , > https://wiki.tizen.org/wiki/Porting_Guide#Kernel_Build > > > > But the compilation was failed with two errors,. > > One is the duplicated symbol “return_address” > > And the other is “undefined symbol “uwi””. > > > > ----------------- build error ------------------------- > > LD init/mounts.o > > init/do_mounts_rd.o: In function `return_address': > > /root/workspace/linux-3.10-sc7730/arch/arm/include/asm/ftrace.h:51: > multiple definition of `return_address' > > init/do_mounts.o:/root/workspace/linux-3.10- > sc7730/arch/arm/include/asm/ftrace.h:51: first defined here > > init/do_mounts_initrd.o: In function `return_address': > > /root/workspace/linux-3.10-sc7730/arch/arm/include/asm/ftrace.h:51: > multiple definition of `return_address' > > init/do_mounts.o:/root/workspace/linux-3.10- > sc7730/arch/arm/include/asm/ftrace.h:51: first defined here > > scripts/Makefile.build:441: recipe for target 'init/mounts.o' failed > > make[1]: *** [init/mounts.o] Error 1 > > Makefile:797: recipe for target 'init' failed > > make: *** [init] Error 2 > > /usr/local/bin/build.tizen: 12: exit: Illegal number: -1 > > nicesj.park@nclab:~/workspace/linux-3.10-sc7730# > <mailto:nicesj.park@nclab:~/workspace/linux-3.10-sc7730#> > > -------------------------------------------------------- > > > > So I wrote a patch to fix these errors. > > Is this a right approach to figure it out? > > Of course, after applying my patch, the tm1 device booted well. But I’m > not sure that all device functions are working well..
This is a right approach to fix the issue. Linux mainline kernel is fixed already with same way, commit aeea3592a13bf12861943e44fc48f1f270941f8d Author: Behan Webster <beh...@converseincode.com> Date: Wed Sep 24 01:06:46 2014 +0100 ARM: 8158/1: LLVMLinux: use static inline in ARM ftrace.h With compilers which follow the C99 standard (like modern versions of gcc and clang), "extern inline" does the wrong thing (emits code for an externally linkable version of the inline function). In this case using static inline and removing the NULL version of return_address in return_address.c does the right thing. Signed-off-by: Behan Webster <beh...@converseincode.com> Reviewed-by: Mark Charlebois <charl...@gmail.com> Acked-by: Steven Rostedt <rost...@goodmis.org> Signed-off-by: Russell King <rmk+ker...@arm.linux.org.uk> diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h index 39eb16b..bfe2a2f 100644 --- a/arch/arm/include/asm/ftrace.h +++ b/arch/arm/include/asm/ftrace.h @@ -45,7 +45,7 @@ static inline unsigned long ftrace_call_adjust(unsigned long addr) #else -extern inline void *return_address(unsigned int level) +static inline void *return_address(unsigned int level) { return NULL; } diff --git a/arch/arm/kernel/return_address.c b/arch/arm/kernel/return_address.c index fafedd8..f6aa84d 100644 --- a/arch/arm/kernel/return_address.c +++ b/arch/arm/kernel/return_address.c @@ -63,11 +63,6 @@ void *return_address(unsigned int level) #warning "TODO: return_address should use unwind tables" #endif -void *return_address(unsigned int level) -{ - return NULL; -} - #endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) / else */ EXPORT_SYMBOL_GPL(return_address); We will apply this patch to TM1 kernel. > > > > Best regards, > > nicesj. > > > > Ps. Patchset. (based on: commit ee59be35abfd69893c7ab1efb022622c5e9cc073) > > diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h > > index 39eb16b..bfe2a2f 100644 > > --- a/arch/arm/include/asm/ftrace.h > > +++ b/arch/arm/include/asm/ftrace.h > > @@ -45,7 +45,7 @@ void *return_address(unsigned int); > > > > #else > > > > -extern inline void *return_address(unsigned int level) > > +static inline void *return_address(unsigned int level) > > { > > return NULL; > > } > > diff --git a/arch/arm/kernel/return_address.c > b/arch/arm/kernel/return_address.c > > index fafedd8..f6aa84d 100644 > > --- a/arch/arm/kernel/return_address.c > > +++ b/arch/arm/kernel/return_address.c > > @@ -63,11 +63,6 @@ void *return_address(unsigned int level) > > #warning "TODO: return_address should use unwind tables" > > #endif > > > > -void *return_address(unsigned int level) > > -{ > > - return NULL; > > -} > > - > > #endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) / > else */ > > > > EXPORT_SYMBOL_GPL(return_address); > > diff --git a/drivers/cpufreq/cpufreq_sprdemand.c > b/drivers/cpufreq/cpufreq_sprdemand.c > > index 23f9f09..4a4bc77 100644 > > --- a/drivers/cpufreq/cpufreq_sprdemand.c > > +++ b/drivers/cpufreq/cpufreq_sprdemand.c > > @@ -98,12 +98,14 @@ struct work_struct unplug_all_work; > > static int cpu_num_limit_temp; > > static void sprd_thm_unplug_cpu(struct work_struct *work); > > > > +#if 0 > > static DEFINE_PER_CPU(struct unplug_work_info, uwi); > > > > static DEFINE_SPINLOCK(g_lock); > > static unsigned int percpu_total_load[CONFIG_NR_CPUS] = {0}; > > static unsigned int percpu_check_count[CONFIG_NR_CPUS] = {0}; > > static int cpu_score = 0; > > +#endif Also will check it but this way, using #if 0, is not good. Thanks for report, Inki Dae > > > > /* FIXME. default touch boost is enabled */ > > #define CONFIG_TOUCH_BOOST > > > > > _______________________________________________ > Dev mailing list > Dev@lists.tizen.org > https://lists.tizen.org/listinfo/dev > _______________________________________________ Dev mailing list Dev@lists.tizen.org https://lists.tizen.org/listinfo/dev