Quick setup of linux development environment

Source: Internet
Author: User
Quick setup of the linux development environment-general Linux technology-Linux programming and kernel information. The following is a detailed description. Author: skysky
(This article is written for the AT2440EVB-I Development Board of longcheng Electronics Company)

1. Create a file system directory
If the directory of the file system is/rootfs, extract rootfs.tar to this directory.
Mkdir/rootfs
Tar zxf rootfs.tar-C/rootfs

2. Configure the nfs File System
Modify the/etc/exports file in the format of the IP address of the shared directory Development Board (permission settings)
Cat/Rootfs 192.168.1.120 (rw, sync, insecure, no_root_squash)
EOM
Restart the nfs server
/Etc/init. d/nfs restart

3. Enable the kernel when writing
Put the uImage to be written to the directory specified by the tftp server (assuming its ip address is 192.168.1.100), and enter the command line status of u-boot.

Run the following commands in sequence:
Set ipaddr 192.168.1.120
Set serverip 192.168.1.100
Erase 0x00040000 0x001dffff
Tftp 0x30000000 uImage
Cp. B 0x30000000 0x00040000 $ (filesize)

Set bootargs root =/dev/nfs nfsroot = 202.192.32.100:/arm/rootfs rw noinitrd init =/linuxrc

Ip = 192.168.1.120: 192.168.1.100: 192.168.1.100: 255.255.255.0: avantech: eth0: off console = ttySAC0, 115200

Set bootcmd cp. B 0x00040000 0x33000000 $ (filesize)

Saveenv
Reset

4. Restart to enter the development environment. Put the compiled program in the/rootfs directory on the linux server and connect it to the Development Board through telnet.

Execute a new program. The following uses the collection program of the usb camera as an example to briefly describe how to use the development environment.
First, copy the camera driver usbcam. ko and the collection program spcaserv to the/rootfs/opt/usbcam directory.
Mkdir/rootfs/opt/usbcam-p
Cp usbcam. ko spcaserv/rootfs/opt/usbcam
Go to the Development Board and run
Insmod/opt/usbcam. ko
./Rootfs/opt/usbcam/spcaserv-w 192.168.1.120: 7070-s 320x240-d/dev/video0
Finally, you can run play. bat in windows to view the images collected from the Development Board.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.