This series of articles introduces how to develop applications in Linux under windows. In Windows, how does one start the target board through TFTP, and how does one "communicate" with the target board through NFS in windows ". And how to generate a cross-compilation toolchain in cygwin. All operations in this article are performed in Windows XP.
TFTP Server SettingsSoftware requirements: tftpsrv.exe file requirements: zimage and ramdisk files are your own startup files. 1. create a directory c:/tftpserver/2 in drive C. run tftpsrv.exe in this directory. create the tftpboot directory in the C:/tftpserver/directory 4. import zimage and ramdisk into tftpboot. ensure that the zimage property-> Security contains the user everyone, and has the execution and read permissions (which can be omitted) 6. open the doscommand window and transfer it to C:/tftpserver. in the DOS window, click tftpsrv.exe dtftpboot/. In this case, tftpserver is started. Note: if the "Security" option is not found in the right-click a partition, check whether the partition is in NTFS format. If not, change it to NTFS format, in the resource manager, click "Tools"> "Folder Options" and remove the check box before "use simple file sharing (recommended. For example:
NFS server settings in WindowsSoftware requirements: SFU file requirements: passwd, group these two files are the user's own password and group files. Example: passwd content root: X: 0: 0: Root:/root:/bin/shgroup content root: X: 0:
InstallA) copy the files passwd and group to the local C:/disk.
B) Run sfu35beta_en.exe, which is a self-extracting file. Specify a directory to release the compressed file. C) Run sfusetup. MSI in the release directory. The micorsoft Windows Services for Unix Setup Wizard window appears. D) Click Next. The customer information window is displayed. E) Click Next. In the license and support information window, select "I accept the agreement ". F) Click Next to display the installation options window. G) Select custom installation and click Next. The selecting components window appears. H) Click the utilities directory item and select entire feature will not be available. The item icon changes to a brown cross. I) use the same option for interix GNU Components Remote connectivity. J) Click the NFS Directory item and select the entire feature (including all subfeature if any) will be installed on local hard drive. The icon of this item changes to a drive with a white background. K) if you use the same choice for authentication tools for NFS, select entire feature (including all subfeature if any) will be installed on local hard drive. L) in the end, only "authentication tools for NFS" and "NFS" are fully installed. M) Click Next. the user name ing window appears. Select password and group files. N) Click Next, enter C:/passwd in the blank bar under password file path and name, and enter C:/group in the blank bar under group file path and name. O) Click Next. In the installationg location window, select the installation location. P) Click Next to start installation (about 21 MB ). Finally, select finish to complete the installation. If you are prompted to restart, restart. (The above installation process is relatively simple. reference the article on the network .)
Note: if there is a conflict with Kaspersky Internet set 6.0, disable Kaspersky before installation.Shared Windows Host directoryA) You do not need to restart. Right-click the directory to be shared and select "properties" from the drop-down menu. The directory Properties window is displayed. B) Select the NFS sharing tab, and select share this folder. Specify the Share Name (a simple name, case-insensitive, such as DIR). Encoding) select GB2312-80; select allow anonymous access; click Permissions, the NFS share permissions window appears, set shared folder read/write properties.
C) Select read-write from the type of access drop-down menu. to grant the target board the root permission on the local file, select allow root access. D) after setting, click OK to return to the directory Properties window. E) Click the "Security" option and add everyone to allow read and control.
Click "application" or "OK" to make the sharing take effect.
To set NFS properties, choose Start> program> Windows Services for Unix> services for Unix administration. F) when the settings window appears, click User Name mapping in the left-side subwindow, click "map" in the tab bar, and then click show user maps. The following figure is displayed:
G) in the Windows user name and Unix user name boxes, enter guest and root respectively.
Click Add to add to mapped users. H) then, Click Show group maps. in the Windows Group Name and Unix group name boxes, enterGuestsAnd Root
Click Add to add to mapped groups. Note: If the "Security" option is not available in the right-click operation, first check whether the partition is in NTFS format. If not, change it to NTFS format, in the resource manager, click "Tools"> "Folder Options" and remove the check box before "use simple file sharing (recommended. For example:Start the target board and mount the Windows directory on the target boardSet the Host IP address to 192.168.1.1, connect the crossover line to the target board, start the target board, start the TFTP service on the host, and run the mount command to mount the NFS directory:
Mount-T nfs-O nolock 192.168.1.1: Invalid _name/mnt
External _name is the name of the shared directory. The contents of the directory should be shared NFS contents on Windows machines. In this way, the compiled program can be put into the shared directory and then run on the target board. Note: If the network is disconnected, check whether the local connection has a firewall. If yes, remove the firewall protection.