Opened 6 years ago

Last modified 4 years ago

#45 accepted defect

Compile error on kernel rev136: SSB and OHCI undefined references

Reported by: Erik Grootjans Owned by: amain
Priority: minor Milestone: milestone:next-release
Component: openwrt Version: 2.0
Severity: severity 3 Keywords:


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'
make[5]: * [vmlinux] Error 1
make[5]: Leaving directory `/home/erik/src/trunk/build/openwrt-brcm47xx-Broadcom-b43-trunk-default/build_dir/linux-brcm47xx/linux-'
* home/erik/src/trunk/build/openwrt-brcm47xx-Broadcom-b43-trunk-default/build_dir/linux-brcm47xx/linux- Error 2
make[4]: Leaving directory `/home/erik/src/trunk/build/openwrt-brcm47xx-Broadcom-b43-trunk-default/target/linux/brcm47xx'
make[3]: * [compile] Error 2
make[3]: Leaving directory `/home/erik/src/trunk/build/openwrt-brcm47xx-Broadcom-b43-trunk-default/target/linux'
* [target/linux/compile] Error 2
make[2]: Leaving directory `/home/erik/src/trunk/build/openwrt-brcm47xx-Broadcom-b43-trunk-default'
make[1]: * home/erik/src/trunk/build/openwrt-brcm47xx-Broadcom-b43-trunk-default/staging_dir/target-mipsel_uClibc-0.9.31/stamp/.target_compile Error 2
make[1]: Leaving directory `/home/erik/src/trunk/build/openwrt-brcm47xx-Broadcom-b43-trunk-default'
* [world] Error 2
make: Leaving directory `/home/erik/src/trunk/build/openwrt-brcm47xx-Broadcom-b43-trunk-default'
make: * [openwrt/build] Fout 2

Attachments (1)

brcm47ohci-plugin-20110607.tar.gz (1.4 KB) - added by amain 6 years ago.
OHCI/EHCI SSB patch for in kernel compile

Download all attachments as: .zip

Change History (17)

comment:1 Changed 6 years ago by amain

  • Status changed from new to accepted

Reproduced. Could be an OpenWrt bug: Needs further investigation.

comment:2 Changed 6 years ago by amain

  • Priority changed from major to blocker
  • Summary changed from Compile error on kernel rev136 to Compile error on kernel rev136: SSB and OHCI undefined references

comment:3 Changed 6 years ago by amain

related to ticket #36?

comment:4 Changed 6 years ago by amain

Committed a workaround for brcm47xx in changeset #140. Kernel now compiles normal again. Note, no OHCI HCD support compiled in temporarily. Also updated ticked 7267 @ OpenWrt.

comment:5 Changed 6 years ago by amain

  • Severity set to severity 4

Problem still persists. Somehow ehci-ssb.c(and ohci-ssb.c) which contains the function ssb_ehci_detach is not compiled and linked into the kernel.

comment:6 Changed 6 years ago by amain

keep OHCI HCD support compiled as a module and NOT directly into the kernel. If read correctly OHCI is used for USB 1.1.

comment:7 Changed 6 years ago by anonymous

I have an issue when including in the kernel as well as building as a module.... compiling in gives me the error above while as a module it simply doesn't work with any USB 1.1 devices.... lsusb only gives me the USB 2.0 root hub and not the 1.1

comment:8 Changed 6 years ago by amain

Looking at my Asus WL-500GD I can see it uses UHCI( which is compiled in the kernel ) for USB 1.1 traffic. So that fully works:

usb 2-1: new full speed USB device using uhci_hcd and address 2
usb 2-1: New USB device found, idVendor=046d, idProduct=08ad
usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0

I can imagine problems arise when partly stuff is compiled into the kernel and partly not. And above compile error is also showing us there is some trouble somewhere for those needing OHCI.

comment:9 Changed 6 years ago by amain

I'll give it another try to find out why it doesn't compile. But if someone can help it be much appreciated?

comment:10 Changed 6 years ago by amain

After many many hours I was able to create patch to allow OHCI to be compiled into the kernel. It loads now just fine on my Wl-500GD and Wl-500g Premium v1. Unfortunately I don't have OHCI hardware, so it would be nice if someone could test.

Changed 6 years ago by amain

OHCI/EHCI SSB patch for in kernel compile

comment:11 Changed 6 years ago by amain

Note: the patch I created is about getting it compiled. I saw some strange code lines which need be reviewed by OpenWrt. Once I get some feedback, I will communicate to OpenWrt.

comment:12 Changed 6 years ago by zhitch@…

it seems this patch is for kernel and the version for rt-n16 with OHCI is sure how to add the patch

comment:13 Changed 6 years ago by amain

Yes, I was afraid of that. The plugin contains 2 files, one patch for OpenWrt and one patch for DebWrt.

DebWrt Patch:

cd trunk
patch -p1 < /tmp/000-re-enable-ohci.patch

This patch re-enables compiling of ohic-hcd for brcm47xx.


cd trunk
cd build/<openwrt-build-dir>
cd target/linux/brcm47xx/patches-<kvers>/
patch -p5 < /tmp/001.ohci_fix_kcompile.patch

The last one will create the actual OpenWrt patch ( 998-ohci_fix_kcompile.patch ). This one will automatically applied after OpenWrt downloaded and unpacked the kernel. Of course you can also manually apply this patch if OpenWrt was already extracted.

Note: still working on the best way to create 'patch' plugins. This is not yet it :-)

Last edited 6 years ago by amain (previous) (diff)

comment:14 Changed 6 years ago by amain

Updated OpenWrt ticket Let's see if there is some response :-)

comment:15 Changed 5 years ago by amain

OPenWrt ticket was closed. Package kmod-usb-brcm47xx was created. We should adapt and use it.

comment:16 Changed 4 years ago by amain

  • Component changed from debian to openwrt
  • Milestone set to next-release
  • Priority changed from blocker to minor
  • Severity changed from severity 4 to severity 3

Add Comment

Modify Ticket

as accepted The owner will remain amain.

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

Note: See TracTickets for help on using tickets.