Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

ftp settings in uClinux

Altera_Forum
Honored Contributor II
1,924 Views

Thanks in advance. 

 

I have a compact flash on the Cyclone III development board and I'd like to be able to ftp files on my compact flash to a Windows machine. 

 

How do I allow access to the compact flash "/mnt" ? Currently I only have access to the "/home/ftp" directory. I've tried a symbolic link in the romfs/home/ftp directory ... and done a "make" to get a new zImage, but I am doing something incorrectly.
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
756 Views

Hi, 

 

just to make sure, you want to copy files from your compact flash to a another pc? 

 

Then you will need to setup a ftp server (daemon) on the board. 

Did you already implemented the MTD Device and installed a Flash File System, i.e. JFFS2? 

If so you just need to mount the filesystem i.e. in /mnt/cf and then make a ftp connection on the board to your pc and then send your files from /mnt/cf/ to the directory on pc. 

 

Urmel
0 Kudos
Altera_Forum
Honored Contributor II
756 Views

Urmel, 

 

Yes, I have the compact flash mounted and I record to it (use ext3). The files are too big to copy to the "/home/ftp" directory and pull from there. 

 

To be clearer. I have no problems when I ftp to a Linux machine unfortunately the end user will have various Windows machines with their standard ftp (no ftp server). So, from the Windows command prompt window I can 

 

ftp xxx.xxx.xxx.xxx  

 

and log onto the NiosII uClinux using the user "ftp" and no password. 

 

and I can pull files from the "/home/ftp" AND send files to the "/home/ftp" directory. 

 

Is there a way to make the "/mnt/cf" directory accessable? 

 

Thanks in advance
0 Kudos
Altera_Forum
Honored Contributor II
756 Views

Hi jpe1313, 

 

did you successfully wrote something from the board to your /mnt directory? So to make sure the compact flash is mounted correctly. 

And what message do you get when trying to access /mnt with ftp? 

 

And did you follow this guide? 

http://www.alterawiki.com/wiki/compact_flash 

 

Urmel
0 Kudos
Altera_Forum
Honored Contributor II
756 Views

Urmel, 

 

Yes, I've successfully used the Compact Flash on numerous projects. I don't do all that is on the wiki link you referenced because I use my compact flash as "ext3" formatted. 

 

I'm not at the evaluation board to give you the exact "ftp" messages but will do so later this afternoon PST. 

 

I think my question is pretty generic - the nios 2 uClinux ftp is set up to use "/home/ftp" how do I allow access to other directories? 

 

Thanks in advance
0 Kudos
Altera_Forum
Honored Contributor II
756 Views

Urmel (and anyone else), 

 

Here is the ftp session to my Cyclone III 1C20 Eval Board.  

NOTE: My IP address is 129.131.7.200 

********************************************************************* 

[janet@localhost ~]$ ftp 129.131.7.200 

Connected to 129.131.7.200. 

220- Welcome to the uClinux ftpd! 

220 uClinux FTP server (GNU inetutils 1.4.1) ready. 

500 'AUTH GSSAPI': command not understood. 

500 'AUTH KERBEROS_V4': command not understood. 

KERBEROS_V4 rejected as an authentication type 

Name (129.131.7.200:janet): ftp 

331 Guest login ok, type your name as password. 

Password: 

230 Guest login ok, access restrictions apply. 

Remote system type is UNIX. 

Using binary mode to transfer files. 

ftp> cd /cf 

550 /cf: No such file or directory. 

ftp>  

 

******************************************************************* 

I'd like to be able to get to the compact flash directory "/cf" and do a "get filename" 

Also an "ls" does not show any files when I put a couple of files there.
0 Kudos
Altera_Forum
Honored Contributor II
756 Views

SOLUTION: 

 

O.K. For my problem I'm going to be performing the ftp from Windows to my uClinux nios. There is still ONE issue Linux to nios2 and that is an "ls" does not work. I did see a thread about this, but I didn't try it: The thread is titled "uClinux FTP Question?" 

 

in the nios2-linux/uclinux-dist/vendors/altera/nios2 directory i modified the "passwd" file to point to my directory, not the "/home/ftp" 

 

root::0:0:root:/:/bin/sh 

ftp:x:14:50:ftp user:/cf:# ###ftp:x:14:50:ftp user:/home/ftp: 

 

I have tested this from a Windows XP machine and it works. I can ftp, do an "ls" and see all the files, and "get" them.  

 

I will test Windows 7 tomorrow... If I don't post again then there were no problems. I may try a Vista machine too, but I think the ftp client is not on the Vista so we'd have to install that and it's not my computer. 

 

Hope this is useful to someone. I've done lots with the Compact Flash the nios and uClinux and it makes a reliable, inexpensive embedded data recorder.
0 Kudos
Reply