OpenWrt Forum Archive

Topic: usb with linksys 350

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

Hi
i am new in openwrt and flashed my linksys WRT 350 v2 with the latest firmware blackfire 10.3.
I am trying to use flash disk for installing package but dont know ho to do it successfull .i have tried several tutorial on how to mount usb flash disk but it not working please can you help ...  below is my kenel log

Linux version 2.6.32.10 (openwrt@wrt1.marcant.net) (gcc version 4.3.3 (GCC) ) #16 Tue Apr 6 16:58:21 CEST 2010
CPU: Feroceon [41069260] revision 0 (ARMv5TEJ), cr=a0053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Linksys WRT350N v2
Clearing invalid memory bank 0KB@0xffffffff
Clearing invalid memory bank 0KB@0xffffffff
Clearing invalid memory bank 0KB@0xffffffff
Ignoring unrecognised tag 0x00000000
Ignoring unrecognised tag 0x00000000
Ignoring unrecognised tag 0x00000000
Memory policy: ECC disabled, Data cache writeback
On node 0 totalpages: 8192
free_area_init_node: node 0, pgdat c0260654, node_mem_map c0272000
  Normal zone: 64 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 8128 pages, LIFO batch:0
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line: root=/dev/mtdblock1 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200
PID hash table entries: 128 (order: -3, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 32MB = 32MB total
Memory: 29984KB available (2232K code, 137K data, 96K init, 0K highmem)
Hierarchical RCU implementation.
NR_IRQS:64
Calibrating delay loop... 332.59 BogoMIPS (lpj=1662976)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
Orion ID: MV88F5181L-Rev-A1. TCLK=166666667.
Applying Orion-1/Orion-NAS PCIe config read transaction workaround
pci 0000:00:00.0: reg 10 64bit mmio pref: [0xf1000000-0xf10fffff]
pci 0000:00:00.0: reg 18 32bit mmio: [0x000000-0x1ffffff]
PCI: bus0: Fast back to back transfers disabled
pci 0000:01:00.0: reg 10 64bit mmio pref: [0x000000-0x1ffffff]
pci 0000:01:00.0: reg 18 64bit mmio pref: [0x10000000-0x1fffffff]
pci 0000:01:00.0: reg 20 64bit mmio: [0xf1000000-0xf10fffff]
pci 0000:01:00.0: reg 30 32bit mmio pref: [0xe0000000-0xe7ffffff]
pci 0000:01:00.0: supports D1 D2
pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot
pci 0000:01:00.0: PME# disabled
pci 0000:01:07.0: reg 10 32bit mmio: [0x40000000-0x4000ffff]
PCI: bus1: Fast back to back transfers enabled
bio: create slab <bio-0> at 0
Switching to clocksource orion_clocksource
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
NET: Registered protocol family 1
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
msgmni has been set to 58
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 3) is a 16550A
console [ttyS0] enabled
physmap platform flash device: 00800000 at f4000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 8-bit bank
Amd/Fujitsu Extended Query Table at 0x0040
physmap-flash.0: Swapping erase regions for broken CFI table.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
cmdlinepart partition parsing not available
RedBoot partition parsing not available
Using physmap partition information
Creating 7 MTD partitions on "physmap-flash.0":
0x000000000000-0x000000100000 : "kernel"
0x000000100000-0x000000750000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=290000, len=4C0000
0x000000290000-0x000000750000 : "rootfs_data"
0x000000760000-0x0000007a0000 : "lang"
0x0000007a0000-0x0000007c0000 : "nvram"
0x0000007c0000-0x000000800000 : "u-boot"
0x000000750000-0x000000760000 : "eRcOmM_do_not_touch"
0x000000000000-0x000000750000 : "image"
MV-643xx 10/100/1000 ethernet driver version 1.4
mv643xx_eth smi: probed
net eth0: port 0 with MAC address 00:00:00:00:51:81
i2c /dev entries driver
Registered led device: wrt350nv2:green:power
Registered led device: wrt350nv2:green:security
Registered led device: wrt350nv2:orange:power
Registered led device: wrt350nv2:green:usb
Registered led device: wrt350nv2:green:wireless
TCP westwood registered
NET: Registered protocol family 17
Distributed Switch Architecture driver version 0.1
eth0[0]: detected a Marvell 88E6131 switch
dsa slave smi: probed
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
VFS: Mounted root (squashfs filesystem) readonly on device 31:1.
Freeing init memory: 96K
Please be patient, while OpenWrt loads ...
mini_fo: using base directory: /
mini_fo: using storage directory: /overlay
eth0: link up, 1000 Mb/s, full duplex, flow control disabled
device lan2 entered promiscuous mode
device eth0 entered promiscuous mode
device lan1 entered promiscuous mode
lan1: link up, 100 Mb/s, full duplex, flow control disabled
wan: link up, 100 Mb/s, full duplex, flow control disabled
br-lan: port 2(lan1) entering forwarding state
device lan3 entered promiscuous mode
device lan4 entered promiscuous mode
Generic kernel compatibility enabled based on linux-next next-20100113
cfg80211: Calling CRDA to update world regulatory domain
cfg80211: World regulatory domain updated:
    (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
    (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
    (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
    (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
ath: EEPROM regdomain: 0x37
ath: EEPROM indicates we should expect a direct regpair map
ath: Country alpha2 being used: AW
ath: Regpair used: 0x37
phy0: Selected rate control algorithm 'ath9k_rate_control'
Registered led device: ath9k-phy0::radio
Registered led device: ath9k-phy0::assoc
Registered led device: ath9k-phy0::tx
Registered led device: ath9k-phy0::rx
phy0: Atheros AR5416 MAC/BB Rev:2 AR2133 RF Rev:81 mem=0xc2b00000, irq=36
cfg80211: Calling CRDA for country: AW
cfg80211: Regulatory domain changed to country: AW
    (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
    (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)
    (5170000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 2000 mBm)
    (5250000 KHz - 5330000 KHz @ 40000 KHz), (N/A, 2000 mBm)
    (5490000 KHz - 5710000 KHz @ 40000 KHz), (N/A, 2700 mBm)
PPP generic driver version 2.4.2
ip_tables: (C) 2000-2006 Netfilter Core Team
NET: Registered protocol family 24
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
orion-ehci orion-ehci.0: Marvell Orion EHCI
orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
orion-ehci orion-ehci.0: irq 17, io mem 0xf1050000
orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
nf_conntrack version 0.5.0 (470 buckets, 1880 max)
CONFIG_NF_CT_ACCT is deprecated and will be removed soon. Please use
nf_conntrack.acct=1 kernel parameter, acct=1 nf_conntrack module option or
sysctl net.netfilter.nf_conntrack_acct=1 to enable it.
usb 1-1: new high speed USB device using orion-ehci and address 2
usb 1-1: configuration #1 chosen from 1 choice
uhci_hcd: USB Universal Host Controller Interface driver
Initializing USB Mass Storage driver...
scsi0 : SCSI emulation for USB Mass Storage devices
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
scsi 0:0:0:0: Direct-Access     Generic  USB2.0           1.00 PQ: 0 ANSI: 2
sd 0:0:0:0: [sda] 2037248 512-byte logical blocks: (1.04 GB/994 MiB)
usb-storage: device scan complete
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Assuming drive cache: write through
sda: sda1
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Attached SCSI removable disk

mount /dev/sda1 /mnt will mount your flash drive at  /mnt


There appears to be 2 ways of getting the system to boot from usb flash, one is

http://wiki.openwrt.org/doc/howto/rootf … nalstorage

and the other

http://wiki.openwrt.org/oldwiki/usbstoragehowto

the first requires block-extroot to be part of the flash ie you will have to compile your own flash image . I have tried just installing the packages and it wont work ( on a asus wl-600g that is) the ipk file says this too.

the second is older and some what involved and doesn't quite fit. I have just got it workng I believe ( it needs a few tests) I will post my method soon. ( this is for the asus wl-600g but should be the same ) . The trouble with the old method is that the usb modules dont get loaded soon enough . some of the /etc/rc.d/S** has to be run before you can pivot root. I dont know if this is a 10.03 thing but I think I have a work around.

pale

EDIT :

I cannot get the
init calls "/etc/init.d/rcS S boot"
to read the /etc/init.d/rcS on the external fs . It somehow finds the one on the jffs even though I have pivot root ed before this point. ( this is driving me spare aagghhh)

I can get the system to to mount the usb drives and pivot root . Thus any thing that I now install goes to the usb fs . If I install samba3 the S60samba start script goes in the external usbfs /etc/rc.d/ and thus does NOT get run on a reboot. as init looks in the internal jffs  /etc/rc.d/. the only way I have managed to get thing to work is to manualy copy the S60samba script to the internal jffs /etc/rc.d/. I have managed to pivot root at S17 so stuff after this can see the usb fs.

I dont know where to get the source for 10.03-1 rc1 from to compile a firmware with block-extroot in it.

(Last edited by pale on 30 Aug 2010, 14:36)

Hi Pale and thanks for your answer

i  having a problem with my WRT350N V2 on wich i install openwrt blackfire 10.03 "orion" image

i am was planning to extend the overlay to could install more package that is why i follow this howto for 10.3: http://wiki.openwrt.org/inbox/howto/con … ge-overlayWhen follow all instructions i can see that the overlay is extend but when i installl package it still install to the root directory .End when the root directory is full i have a segmentation fault while status still showing me a lot of free space on the overlay that did not move att all even after installing packages...
But when i change the destination in opkg.conf to " dest root /overlay " instead of " dest root /' the new mounted overlay grown u and confirm that packages are installed on new overlay but it seem that those packages are not load when system boot from external storage ...( i mean menu did not show ..like when i install coovachilli and webif lua coova chilli...) i have even try to add to etc/profile PATH bin lib and usr / bin or sbin but menu still don't show

is there anything i haven't tried....please need a help...


Serge ZOUMENOU

(Last edited by delacosta456 on 6 Sep 2010, 20:50)

I'm afraid that is about all I know at the moment , I am learning this stuff too.

pale

The discussion might have continued from here.