Opened 8 years ago

Closed 6 years ago

Last modified 4 years ago

#7267 closed defect (fixed)

ssb and ohci-hcd impossible to build-in the kernel

Reported by: julien.bresciani@… Owned by: hauke
Priority: high Milestone: Barrier Breaker 14.07
Component: kernel Version: Trunk
Keywords: ssb ohci ehci usb built-in Cc:

Description (last modified by hauke)

while building openwrt , i do a config for booting from usb stick and having access to a usb serial converter from the boot ,for that
i build the ohci-hci and ehci hci in the kernel and not as a module.

this error occurs since a while (i got the error in every revision i tested for 10.03 , and the error was already here in 8.09.
I saw some posts in the forums about this problem that is sensed to be solved but seems the bug is remaining.
the goal is to boot a debian in a wl500GD V2. I already managed to compile the openwrt kernel with built-in usb , with a trunk from mid 2007.

here is the error result at the end kernel of compilation.

drivers/built-in.o: In function `ssb_ohci_remove':
ohci-hcd.c:(.text.ssb_ohci_remove+0x44): undefined reference to `ssb_ehci_detach'
ohci-hcd.c:(.text.ssb_ohci_remove+0x44): relocation truncated to fit: R_MIPS_26 against `ssb_ehci_detach'
drivers/built-in.o: In function `ssb_ohci_probe':
ohci-hcd.c:(.text.ssb_ohci_probe+0x28c): undefined reference to `ssb_ehci_attach'
ohci-hcd.c:(.text.ssb_ohci_probe+0x28c): relocation truncated to fit: R_MIPS_26 against `ssb_ehci_attach'

in the kernel_menuconfig , the EHCI is selected to be built in the kernel , also the ehci ssb support , same for ohci and ohci ssb support. the ssb support is also selected as built in.

Attachments (2)

.config (55.8 KB) - added by amain@… 7 years ago.
kernel .config file
998-ohci_fix_kcompile.patch (1.5 KB) - added by amain <amain@…> 6 years ago.
Fix to link OHCI into the kernel

Download all attachments as: .zip

Change History (8)

comment:1 Changed 8 years ago by hauke

  • Description modified (diff)
  • Owner changed from developers to hauke
  • Status changed from new to assigned

Are you really sure you are building USB_EHCI_HCD into the kernel and not as module?

Please post your modification and configuration.

comment:2 Changed 7 years ago by amain@…

Got the exact same error message recently. Trunk, r24259:


kernel config USB relevant options:

See attachment for full kernel config.

Building goes fine when excluding/unsetting CONFIG_USB_OHCI_HCD. Setting CONFIG_USB_OHCI_HCD=m seems to be ignored somehow and results that it's not set.

Changed 7 years ago by amain@…

kernel .config file

comment:3 Changed 7 years ago by amain@…

error message:
drivers/built-in.o: In function `ssb_ohci_remove':
ohci-hcd.c:(.text.ssb_ohci_remove+0x6c): undefined reference to `ssb_ehci_detach'
ohci-hcd.c:(.text.ssb_ohci_remove+0x6c): relocation truncated to fit: R_MIPS_26 against `ssb_ehci_detach'
drivers/built-in.o: In function `ssb_ohci_probe':
ohci-hcd.c:(.text.ssb_ohci_probe+0x2c8): undefined reference to `ssb_ehci_attach'
ohci-hcd.c:(.text.ssb_ohci_probe+0x2c8): relocation truncated to fit: R_MIPS_26 against `ssb_ehci_attach'

comment:4 Changed 6 years ago by amain <amain@…>

Found the problem and several other potential problems. Functions ssb_ehci_attach(..) and ssb_ehci_detach(..) declared as static, instead of extern. Hence the "undefined reference". Further the number of arguments do not match for ssb_ehci_detach, when SSB is set. It seems when loaded as a kernel module this difference seem to be solved by the kernel upon insertion? When compiling into the kernel, it needs be exact.

Another observation in ehci-ssb.c, funciton static void ssb_ehci_detach(struct ssb_device *dev), ssb_device_disable(..) called twice?

    ssb_device_disable(dev, 0);
    ssb_device_disable(dev, 0);

Created a patch, which works(meaning users can link into the kernel and use USB devices connected via OHCI), but my knowledge on this part is too limited. I think it is good to have a good look at USB SSB part of the code.



Changed 6 years ago by amain <amain@…>

Fix to link OHCI into the kernel

comment:5 Changed 6 years ago by hauke

  • Resolution set to fixed
  • Status changed from assigned to closed

This should be fixed in trunk in r29575.
The structure of the usb drivers were changed and building into the kernel should work now.

comment:6 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.