LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-13-2020, 01:05 PM   #1
vora92
LQ Newbie
 
Registered: Apr 2020
Posts: 2

Rep: Reputation: Disabled
Usb Compilation error


Hello,

Currently i am patching the usb drivers from kernel-3.10.20 to kernel-4.14 in openwrt but i have difficulties in compiling the usb drivers.

the usb drivers is the host drivers.

From the error i understood that it missing the reference for usb enable clock but i don't know how to deal with it.

Can you help me please...

the error while compiling

arm-openwrt-linux-muslgnueabi-ld: drivers/usb/host/usb20/musb_core.o: in function `musb_suspend_noirq':
target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_mt7623/linux-4.14.154/drivers/usb/host/usb20/musb_core.c:2340: undefined reference to `usb_enable_clock'
arm-openwrt-linux-muslgnueabi-ld: target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_mt7623/linux-4.14.154/drivers/usb/host/usb20/musb_core.c:2343: undefined reference to `usb_phy_context_save'
arm-openwrt-linux-muslgnueabi-ld: target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_mt7623/linux-4.14.154/drivers/usb/host/usb20/musb_core.c:2346: undefined reference to `usb_enable_clock'
arm-openwrt-linux-muslgnueabi-ld: drivers/usb/host/usb20/musb_core.o: in function `musb_resume_noirq':
target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_mt7623/linux-4.14.154/drivers/usb/host/usb20/musb_core.c:2360: undefined reference to `usb_enable_clock'
arm-openwrt-linux-muslgnueabi-ld: target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_mt7623/linux-4.14.154/drivers/usb/host/usb20/musb_core.c:2363: undefined reference to `usb_phy_context_restore'
arm-openwrt-linux-muslgnueabi-ld: target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_mt7623/linux-4.14.154/drivers/usb/host/usb20/musb_core.c:2365: undefined reference to `usb_enable_clock'
arm-openwrt-linux-muslgnueabi-ld: drivers/usb/host/usb20/musb_core.o: in function `musb_stage0_irq':
target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_mt7623/linux-4.14.154/drivers/usb/host/usb20/musb_core.c:733: undefined reference to `musb_session_restart'
arm-openwrt-linux-muslgnueabi-ld: target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_mt7623/linux-4.14.154/drivers/usb/host/usb20/musb_core.c:765: undefined reference to `is_switch_charger'
arm-openwrt-linux-muslgnueabi-ld: drivers/usb/host/usb20/musb_gadget_ep0.o: in function `musb_g_ep0_irq':
target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_mt7623/linux-4.14.154/drivers/usb/host/usb20/musb_gadget_ep0.c:784: undefined reference to `musb_sync_with_bat'
arm-openwrt-linux-muslgnueabi-ld: drivers/usb/host/usb20/musb_gadget_ep0.o: in function `forward_to_driver':
target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_mt7623/linux-4.14.154/drivers/usb/host/usb20/musb_gadget_ep0.c:680: undefined reference to `musb_sync_with_bat'
arm-openwrt-linux-muslgnueabi-ld: drivers/usb/host/usb20/musb_gadget.o: in function `musb_gadget_pullup':
target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_mt7623/linux-4.14.154/drivers/usb/host/usb20/musb_gadget.c:2305: undefined reference to `usb_cable_connected'
arm-openwrt-linux-muslgnueabi-ld: drivers/usb/host/usb20/musb_gadget.o: in function `musb_writeb':
target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_mt7623/linux-4.14.154/./include/linux/musb/musb_io.h:137: undefined reference to `usb_enable_clock'
arm-openwrt-linux-muslgnueabi-ld: target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_mt7623/linux-4.14.154/./include/linux/musb/musb_io.h:140: undefined reference to `usb_enable_clock'
 
Old 04-13-2020, 08:15 PM   #2
tinfoil3d
Member
 
Registered: Apr 2020
Location: Japan/RJCC
Distribution: debian, lfs, whatever else i need in qemu
Posts: 268

Rep: Reputation: 75
try grepping for those functions in old kernel tree and check if they exist in newer tree, if they don't then that means you have much more work to do.
it's likely you simply forgot to feed some object file that has those functions, all the errors you get originate from 'ld' so the compilation succeeds, it's the linking stage you're missing some files at fails.
 
1 members found this post helpful.
Old 04-20-2020, 03:01 AM   #3
vora92
LQ Newbie
 
Registered: Apr 2020
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thank you for your reply...
Sorry for the late...

I tried what you suggested to me but i already have this function in my new kernel tree

./include/linux/musb/musb_io.h:42:extern bool usb_enable_clock(bool enable);
./include/linux/musb/musb_io.h:54: usb_enable_clock(true);
./include/linux/musb/musb_io.h:57: usb_enable_clock(false);
./include/linux/musb/musb_io.h:72: usb_enable_clock(true);
./include/linux/musb/musb_io.h:75: usb_enable_clock(false);
./include/linux/musb/musb_io.h:89: usb_enable_clock(true);
./include/linux/musb/musb_io.h:92: usb_enable_clock(false);
./include/linux/musb/musb_io.h:104: usb_enable_clock(true);
./include/linux/musb/musb_io.h:107: usb_enable_clock(false);
./include/linux/musb/musb_io.h:121: usb_enable_clock(true);
./include/linux/musb/musb_io.h:124: usb_enable_clock(false);
./include/linux/musb/musb_io.h:137: usb_enable_clock(true);
./include/linux/musb/musb_io.h:140: usb_enable_clock(false);
./include/linux/musb/mtk_musb.h:35:extern bool usb_enable_clock(bool enable);
 
Old 04-28-2020, 04:17 PM   #4
evamajlak
LQ Newbie
 
Registered: Apr 2020
Posts: 1

Rep: Reputation: Disabled
I also faced this same issue sometime back. I would suggest you go and check the old kernel tree for those functions and start creating newer tree with same name.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Graphical Compilation/ IDE Compilation monika.2dec Ubuntu 4 08-22-2012 06:53 PM
compilation error : /tmp/cczC6Kc3.s:7368: Error: unknown pseudo-op: `.ltorg' nankie Red Hat 0 08-19-2008 10:15 AM
Error during the compilation of Prozilla. How to correct the recursive error? deepumnit Linux - Software 1 01-10-2008 11:02 AM
Kernel compilation error: Error 15: File not found Niceman2005 Linux - General 9 10-04-2007 03:45 AM
Sqwebmail compilation error ... [maildirsearchC.o] Error 1 boogie_maan Linux - Software 0 10-26-2002 07:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration