Forum Discussion
Altera_Forum
Honored Contributor
20 years agoproblem with usb driver
hi,
I have boot uclinux kernel successful,then i plug a usb disk on my board,that's ok.But it show errors when i run the follow code:
[/CODE]fdisk -l /dev/sda
fdisk:Bad command or file name
[CODE]mount -t vfat /dev/sda1 /mnt
FAT:Code page cp437 not found
mount failed:Invalid argument[/B]
please help me,thank you!
17 Replies
- Altera_Forum
Honored Contributor
TO_BE_DONE
- Altera_Forum
Honored Contributor
TO_BE_DONE
- Altera_Forum
Honored Contributor
Hi,hippo. I have solved the usb problem by enable fdisk in busybox. Now,I want to programme my apps by using the device driver,how can i do? Which files should i include? Thahk you! http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by zhengkaike@Jun 4 2006, 10:02 PMhi,hippo.
i have solved the usb problem by enable fdisk in busybox.
now,i want to programme my apps by using the device driver,how can i do?
which files should i include?
thahk you! http://forum.niosforum.com/work2/style_emoticons/<#emo_dir#>/smile.gif
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=15884)
--- quote end ---
--- Quote End --- You can access the mounted usb disk as normal file. So just include stdio.h and stdlib.h should work.
- Altera_Forum
Honored Contributor
Hi,hippo.
Could you tell me how to hang a usb disk on my board automatic not by execute the "mount" command in nios2-termimal? Thank you! - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by zhengkaike@Jun 5 2006, 03:12 PM hi,hippo.could you tell me how to hang a usb disk on my board automatic not by execute
the "mount" command in nios2-termimal?
thank you!
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=15901)
--- quote end ---
--- Quote End --- You can add the mount command or other initialization into vendors/Altera/nios2nommu/rc . it will be installed to romfs/etc/rc .
- Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by hippo+jun 5 2006, 02:28 am--><div class='quotetop'>quote (hippo @ jun 5 2006, 02:28 am)</div>--- quote start ---
<!--quotebegin-zhengkaike@Jun 5 2006, 03:12 PM hi,hippo.
could you tell me how to hang a usb disk on my board automatic not by execute
the "mount" command in nios2-termimal?
thank you!
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=15901)
--- quote end ---
--- Quote End --- You can add the mount command or other initialization into vendors/Altera/nios2nommu/rc . it will be installed to romfs/etc/rc . <div align='right'><{post_snapback}> (index.php?act=findpost&pid=15902)</div> [/b] --- Quote End --- Hi,hippo. I have added the mount command(#mount -t vfat /dev/sda1 /mnt)into vendors/Altera/nios2nommu/rc ,but it need to execute mount manual all the same,and there is nothing under the path of /mnt . please help me! thak you!
- Altera_Forum
Honored Contributor
did you rebuild the kernel with,
make make romfs make linux image ? What is your boot message now? May be you have to add busybox sleep, and wait several seconds for usb disk to be detected before mount usb. sleep 15 mount -t vfat /dev/sda1 /mnt - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by hippo@Jun 5 2006, 05:32 AM did you rebuild the kernel with,make
make romfs
make linux image ?
what is your boot message now?
may be you have to add busybox sleep, and wait several seconds for usb disk to be detected before mount usb.
sleep 15
mount -t vfat /dev/sda1 /mnt
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=15911)
--- quote end ---
--- Quote End --- Sorry,hippo. I can't solve the problem. The mount command always be executed before the usb disk be detected. my step: 1. add the mount command into vendors/Altera/nios2nommu/rc . 2. make menuconfig busybox-->[*]sleep 3. make 4. make romfs 5. make linux image Is there any problem? Thank you.
- Altera_Forum
Honored Contributor
add "make -C user/busybox clean" after step2.
boot uClinux, run "busybox", to see what you have built in busybox. What is your rc now?