This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to fix `multiple definition of `rockchip_cpufreq_get_scale'` error?
Hello Tinker OS team,

I was trying to compile a kernel module for Tinker OS 2.0.8 on a Ubuntu 18.04 box and I got stuck on compiling the file.

When I ran the following command to build a ko file,

$ make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- drivers/tty/serial/sc16is7xx.ko

I got the following error.

 CHK     include/config/kernel.release
 CHK     include/generated/uapi/linux/version.h
 CHK     include/generated/utsrelease.h
make[1]: 'include/generated/mach-types.h' is up to date.
 CHK     include/generated/bounds.h
 CHK     include/generated/timeconst.h
 CHK     include/generated/asm-offsets.h
 CALL    scripts/
 CHK     scripts/mod/devicetable-offsets.h
 MODPOST 1 modules
 LD [M]  drivers/tty/serial/sc16is7xx.ko
drivers/tty/serial/sc16is7xx.mod.o: In function `rockchip_cpufreq_get_scale':
sc16is7xx.mod.c:(.text+0x0): multiple definition of `rockchip_cpufreq_get_scale'
drivers/tty/serial/sc16is7xx.o:sc16is7xx.c:(.text+0x196c): first defined here
scripts/Makefile.modpost:125: recipe for target 'drivers/tty/serial/sc16is7xx.ko' failed
make[1]: *** [drivers/tty/serial/sc16is7xx.ko] Error 1
Makefile:1645: recipe for target 'drivers/tty/serial/sc16is7xx.ko' failed
make: *** [drivers/tty/serial/sc16is7xx.ko] Error 2

I successfully compiled the same ko file on Tinker OS 2.0.7 so the command should work without error on 2.0.8 as well.

Does someone give me suggestions/hints or solutions?

Thanks in advance.
> Does someone give me suggestions/hints or solutions?

Perhaps cross-compiler that comes with Ubuntu 18.04 is not able to deal with sources. Nothing unusual for vendor kernels. Since manual sources fixing is expensive, we are using this workaround One compiler can't compile every source, while 10-15 can.
Armbian. Lightweight Debian Stretch or Ubuntu Bionic for Tinker Board.
Thanks. It was my fault as the ubuntu box wasn't clean, still left older version of compilers, source code and other stuff.
If you manage to adapt Ubuntu with the drivers I would be a taker thanks in advance

Forum Jump:

Users browsing this thread: 1 Guest(s)