OpenWrt Forum Archive

Topic: Errors installing USB drivers - HELP !

The content of this topic has been archived on 16 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I currently have the router within am intRAnet.  I have NO wifi devices and will not have them for quite some time in the future.

I had Whiterussian rc6 running on the router and everything seemed to work include the two (2)  USB pen drives at 1 gig each that I use.. 

USB IS NOT WORKING NOW.  There is NO /dev/sda1 below.

I have installed Kamikaze 7.0.9 on my WRTSL54gs.  I got the image with;
wget http://downloads.openwrt.org/kamikaze/7 … uashfs.trx

into my /tmp directory and used mtd to install the base system;

mtd -r write openwrt-brcm47xx-2.6-squashfs.trx linux

I manually set the route up with;

route add default gw 192.168.1.X   ;to my outside connection

to /tmp/resolv.conf  I did a;

echo "nameserver aaa.bbb.ccc.14" > resolv.conf; echo "nameserver aaa.bbb.ccc.130" >> resolv.conf; echo "domain mydomain.com" >> resolv.conf

And as a result can ping the outside.

uname -a gives me a;
Linux OpenWrt 2.6.22 #2 Sun Sep 30 20:38:47 CEST 2007 mips unknown

Now I did an ipkg update
root@OpenWRT:~# ipkg update

root@OpenWrt:~# ipkg update
Downloading http://downloads.openwrt.org/kamikaze/7 … s/Packages
Updated list of available packages in /usr/lib/ipkg/lists/release
Downloading http://downloads.openwrt.org/kamikaze/p … l/Packages
Updated list of available packages in /usr/lib/ipkg/lists/packages
Done.

That seemed to work.

Now I did NOT do a root@OpenWRT:~# ipkg install libusb

Following the document at; http://wiki.openwrt.org/UsbStorageHowto … =%28usb%29
I did a;
root@OpenWRT:~# I did a ipkg install for all the USB packages mentioned in the HOWTO for USB

And I did ipkg install for the nls packages.

root@OpenWrt:~# ls /lib/modules/2.6.22/
ath_hal.ko            ppp_async.ko          usbcore.ko
ath_pci.ko            ppp_generic.ko        vfat.ko
ath_rate_minstrel.ko  pppoe.ko              wlan.ko
crc-ccitt.ko          pppox.ko              wlan_acl.ko
diag.ko               scsi_mod.ko           wlan_ccmp.ko
ehci-hcd.ko           sd_mod.ko             wlan_scan_ap.ko
ext3.ko               slhc.ko               wlan_scan_sta.ko
fat.ko                switch-adm.ko         wlan_tkip.ko
jbd.ko                switch-core.ko        wlan_wep.ko
nls_base.ko           switch-robo.ko        wlan_xauth.ko
nls_cp437.ko          usb-storage.ko


WHERE IS /dev/sda1 ?

root@OpenWrt:~# ls /dev
console         mtd2            mtdblock4       ttyS0
full            mtd2ro          null            ttyS1
kmem            mtd3            port            urandom
kmsg            mtd3ro          ppp             usb1
log             mtd4            ptmx            usbdev1.1_ep00
mem             mtd4ro          pts             usbdev1.1_ep81
mtd0            mtdblock0       random          zero
mtd0ro          mtdblock1       root
mtd1            mtdblock2       shm
mtd1ro          mtdblock3       tty
root@OpenWrt:~#

lsmod has;root@OpenWrt:~# lsmod
Module                  Size  Used by    Tainted: P
usb_storage            27664  0
sd_mod                 18416  0
scsi_mod               71968  2 usb_storage,sd_mod
ehci_hcd               28016  0
ath_pci                94384  0
wlan_xauth               480  0
wlan_wep                4000  0
wlan_tkip               9664  0
wlan_ccmp               5408  0
wlan_acl                1888  0
ath_rate_minstrel       7840  0
ath_hal               271168  2 ath_pci,ath_rate_minstrel
wlan_scan_sta           8736  0
wlan_scan_ap            2624  0
wlan                  146400  9 ath_pci,wlan_xauth,wlan_wep,wlan_tkip,wlan_ccmp,wlan_acl,ath_rate_minstrel,wlan_scan_sta,wlan_scan_ap
ppp_async               9664  0
ppp_generic            20000  1 ppp_async
slhc                    5408  1 ppp_generic
crc_ccitt               1024  1 ppp_async
vfat                    8512  0
fat                    42448  1 vfat
ext3                   97040  0
jbd                    54672  1 ext3
nls_cp437               4416  0
usbcore               102032  3 usb_storage,ehci_hcd
nls_base                4416  3 vfat,fat,nls_cp437
switch_robo             4048  0
switch_core             5056  1 switch_robo
diag                    8272  0
root@OpenWrt:~#

root@OpenWrt:~# dmesg
Linux version 2.6.22 (nbd@ds10) (gcc version 4.1.2) #2 Sun Sep 30 20:38:47 CEST 2007
CPU revision is: 00029006
ssb: Core 0 found: ChipCommon (cc 0x800, rev 0x03, vendor 0x4243)
ssb: Core 1 found: Fast Ethernet (cc 0x806, rev 0x06, vendor 0x4243)
ssb: Core 2 found: Fast Ethernet (cc 0x806, rev 0x06, vendor 0x4243)
ssb: Core 3 found: USB 1.1 Hostdev (cc 0x808, rev 0x03, vendor 0x4243)
ssb: Core 4 found: PCI (cc 0x804, rev 0x08, vendor 0x4243)
ssb: Core 5 found: MIPS 3302 (cc 0x816, rev 0x03, vendor 0x4243)
ssb: Core 6 found: V90 (cc 0x807, rev 0x02, vendor 0x4243)
ssb: Core 7 found: IPSEC (cc 0x80B, rev 0x00, vendor 0x4243)
ssb: Core 8 found: MEMC SDRAM (cc 0x80F, rev 0x02, vendor 0x4243)
ssb: Initializing MIPS core...
ssb: set_irq: core 0x0806, irq 2 => 2
ssb: set_irq: core 0x0806, irq 3 => 3
ssb: set_irq: core 0x0804, irq 0 => 4
ssb: Sonics Silicon Backplane found at address 0x18000000
Determined physical RAM map:
memory: 01100000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
On node 0 totalpages: 4352
  Normal zone: 34 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 4318 pages, LIFO batch:0
Built 1 zonelists.  Total pages: 4318
Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2 init=/etc/preinit noinitrd console=ttyS0,115200
Primary instruction cache 16kB, physically tagged, 2-way, linesize 16 bytes.
Primary data cache 16kB, 2-way, linesize 16 bytes.
Synthesized TLB refill handler (20 instructions).
Synthesized TLB load handler fastpath (32 instructions).
Synthesized TLB store handler fastpath (31 instructions).
Synthesized TLB modify handler fastpath (30 instructions).
PID hash table entries: 128 (order: 7, 512 bytes)
Using 132.000 MHz high precision timer.
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 14608k/17408k available (2030k kernel code, 2800k reserved, 297k data, 120k init, 0k highmem)
Calibrating delay loop... 263.16 BogoMIPS (lpj=526336)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
ssb: PCIcore in host mode found
registering PCI controller with io_map_base unset
PCI: fixing up bridge
PCI: Setting latency timer of device 0000:00:00.0 to 64
PCI: Fixing up device 0000:00:00.0
Time: MIPS clocksource has been installed.
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
squashfs: version 3.0 (2006/03/15) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing enabled
serial8250: ttyS0 at MMIO 0x0 (irq = 3) is a 16550A
serial8250: ttyS1 at MMIO 0x0 (irq = 3) is a 16550A
b44.c:v1.01 (Jun 16, 2006)
eth0: Broadcom 10/100BaseT Ethernet 00:18:39:ee:13:d4
eth1: Broadcom 10/100BaseT Ethernet 00:90:4c:60:00:2b
flash init: 0x1c000000 0x02000000
Physically mapped flash: Found 1 x16 devices at 0x0 in 16-bit bank
Physically mapped flash: Found an alias at 0x800000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1000000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1800000 for the chip at 0x0
Intel/Sharp Extended Query Table at 0x0031
Using buffer write method
cfi_cmdset_0001: Erase suspend on write enabled
erase region 0: offset=0x0,size=0x20000,blocks=64
Flash device: 0x800000 at 0x1fc00000
bootloader size: 262144
Creating 4 MTD partitions on "Physically mapped flash":
0x00000000-0x00040000 : "cfe"
0x00040000-0x007e0000 : "linux"
0x000f8000-0x007e0000 : "rootfs"
mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only
0x00200000-0x007e0000 : "rootfs_data"
0x007e0000-0x00800000 : "nvram"
nf_conntrack version 0.5.0 (136 buckets, 1088 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP vegas registered
NET: Registered protocol family 1
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFS: Mounted root (squashfs filesystem) readonly.
Freeing unused kernel memory: 120k freed
Warning: unable to open an initial console.
Algorithmics/MIPS FPU Emulator v1.5
diag: Detected 'Linksys WRTSL54GS'
b44: eth0: Link is up at 100 Mbps, full duplex.
b44: eth0: Flow control is off for TX and off for RX.
Probing device eth0: found!
mini_fo: using base directory: /
mini_fo: using storage directory: /jffs
device eth0 entered promiscuous mode
b44: eth0: Link is up at 100 Mbps, full duplex.
b44: eth0: Flow control is off for TX and off for RX.
br-lan: port 1(eth0) entering learning state
br-lan: topology change detected, propagating
br-lan: port 1(eth0) entering forwarding state
b44: eth1: PHY Reset would not complete.
BFL_ENETADM not set in boardflags. Use force=1 to ignore.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
PPP generic driver version 2.4.2
wlan: 0.8.4.2 (svn r2568)
ath_hal: module license 'Proprietary' taints kernel.
ath_hal: 0.9.30.13 (AR5210, AR5211, AR5212, AR5416, RF5111, RF5112, RF2413, RF5413, RF2133, REGOPS_FUNC)
ath_rate_minstrel: Minstrel automatic rate control algorithm 1.2 (svn r2568)
ath_rate_minstrel: look around rate set to 10%
ath_rate_minstrel: EWMA rolloff level set to 75%
ath_rate_minstrel: max segment size in the mrr set to 6000 us
wlan: mac acl policy registered
ath_pci: 0.9.4.5 (svn r2568)
PCI: Enabling device 0000:00:02.2 (0000 -> 0002)
PCI: Fixing up device 0000:00:02.2
ehci_hcd 0000:00:02.2: EHCI Host Controller
ehci_hcd 0000:00:02.2: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:02.2: irq 6, io mem 0x40000000
ehci_hcd 0000:00:02.2: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 5 ports detected
SCSI subsystem initialized
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
root@OpenWrt:~#


How can I get my two usb pendrives to work like they did a few hours ago in Whiterussian rc6 ?

(Last edited by Harley^ on 9 Dec 2007, 06:11)

This has now been corrected and repaired.  The errors were USER (MY) errors.

ALL USB ipkgs must be installed. Follow along with :  http://wiki.openwrt.org/UsbStorageHowto

However,  note there is a segmentation fault when the following is installed.

ipkg install kmod-usb-ohci - 2.6.22-brcm47xx-1      ; MUST BE INSTALLED.

You can ignore the seg fault but it is an indication of problems in the package.

At this point /dev/sda1  and /dev/sdb1  become visible

The USB drives are then formatted using mke2fs -j /dev/sda1

and mke2fs -j /dev/sdb1 

Then they are mounted for use with the following small script.

#!/bin/sh
mkdir -p /mnt/usbsda1
mkdir -p /mnt/usbsdb1
mount /dev/sda1 /mnt/usbsda1
mount /dev/sdb1 /mnt/usbsdb1
ln -s /mnt/usbsda1 /home
ln -s /mnt/usbsdb1 /xtra

Thanks to ndb, Cisien agaffney and matteo for the assistance.

The discussion might have continued from here.