Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
20 years ago

Mounting usb flash stick

I am developing a USB IP core, and I am now at the stage where I am attempting to create a uClinux driver.

With the new driver compiled into the kernel, and debug messages enabled, I see the following when I insert a flash stick.

console text (http://www.base2designs.com/console_text.txt)

As far as I can tell, when the flash stick is inserted, it is correctly detected, but then again I'm not too sure what all the messages mean. Could somebody take a look at the console messages, and tell me if there are any problems that I should be investigating.

If all is well, and the flash stick is indeed correctly attached, how do I get read write access. I've read in places that I should add a line to my /etc/fstab file, but I cannot find the fstab file. I tried;

mount -n /dev/sda /mnt/ide0

but no success.

cat /proc/partitions
major minor # blocks  name
   3     0      62976 hda
   3     1      62960 hda1
  31     0       4096 mtdblock0
  31     1       2048 mtdblock1
  31     2       1024 mtdblock2
  31     3       1024 mtdblock3
   8     0      63488 sda
   8     1      63457 sda1#  mount -n /dev/sda /mnt/ide0
mount -n /dev/sda /mnt/ide0
mount: special device /dev/sda does not exist

14 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    ........

    scsi0 : SCSI emulation for USB Mass Storage devices

    Vendor: F3D6368? Model: ?Fash Disk 1.6? Rev: !?

    Type: Direct-Access ANSI SCSI revision: 02

    SCSI device sda: 129281 512-byte hdwr sectors (66 MB)

    sda: assuming Write Enabled

    sda: assuming drive cache: write through

    /dev/scsi/host0/bus0/target0/lun0:<6>check_part[0]=17241628:<7>usb-storage: que

    uecommand called

    res=0:<6>check_part[1]=17248964:<6>res=0: unknown partition table

    Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0

    hi! i added sl811 to altera cyc board, and run uclinux .

    the"unknown partition table" have troubled me for a few days.

    do u know how to solve it???

    thank u!!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    # fdisk -l

    /dev/ide/host0/bus0/target0/lun0:<6>check_part[0]=17241628:<6>res=0:<6>check_pa

    rt[1]=17248964: p1

    res=1:

    Disk /dev/hda: 4 heads, 32 sectors, 246 cylinders

    Units = <7>usb-storage: queuecommand called

    cylinders of 128 * 512 bytes

    Device Boot Start End Blocks Id System

    /dev/hda1 1 246 15728 83 Linux

    Disk /dev/sda: 3 heads, 43 sectors, 1002 cylinders

    Units = cylinders of 129 * 512 bytes

    Disk /dev/sda doesn&#39;t contain a valid partition table#
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hello cetic,

    <div class='quotetop'>QUOTE </div>

    --- Quote Start ---

    you say in the opencores project that the 50MHz oscillator on the Altera Nios evalboard must be changed by a 48MHz oscillator. I suppose this is because the USB ip in the FPGA must run at a specific frequency that cannot be generated by a PLL from the original 50MHz. Is this true ? If yes, what is that frequency ?[/b]

    --- Quote End ---

    The FPGA must run at 48MHz. If you only want to use low speed mode, then you can get away with using the PLL to generate 47.62MHz, but for full speed mode the USB 1.1 spec requires 0.05% clock tolerance.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hello sfielding,

    thanks for your answer. On my custom board, I have a 20MHz oscillator, and with the M/N ratio of a PLL, I cannot generate 48MHz. Do you think that it is possible to put 2 PLLs in series to get the 48MHz ? Is this achievable and stable ? I am using a cyclone C6.

    Thanks

    Best regards

    pod