Linux-arm Development

Source: Internet
Author: User
Tags ssh port gdb debugger automake
Linux-arm development-general Linux technology-Linux technology and application information. For details, refer to the following section. Simple configuration of the linux-arm development environment is the first step in ARM learning. Many beginners may struggle to configure the development environment for a long time. We recommend that you take a look at the Wei Dongshan video. It is very detailed and the code will basically be explained to you (many videos won't be explained to you). It is suitable for beginners.
Simple configuration of fedora8 Development Environment
Simple configuration of linux-arm Development Environment
Window:
Install terminal software such as SecureCRT and putty
Install ftp software, such as cutftp.
Configure the serial port tool Super Terminal
Install the tftp service, or use tftp on linux.
On linux:
1. ssh
By default, ssh should be installed in fedora8, so no installation is required.
You can query it as follows:
Rpm-qa openssh
If the display of information such as openssh-4.7p1-4.fc8 indicates that the installation is complete, if not, then directly use yum install openssh to install.
Then, open the ssh port in Firewall. You can also directly modify/etc/sysconfig/iptables and add
-A RH-Firewall-1-INPUT-m state -- state NEW-m tcp-p tcp -- dport 22-j ACCEPT
Then restart # service sshd restart.
2. vnc
Switch to the root user
# Yum install vnc-server Installation
# Vim/etc/sysconfig/vncservers
Join
VNCSERVERS = "1: misswhile"
VNCSERVERARGS [1] = "-geometry 1024x768-depth 16", etc.
Add the following password:
$ Vncpasswd
$ Password:
$ Verify:
Start service # service vncserver start
Modify ~ /. Vnc/xstartup to enable the support window
Twm & comment out
Join
Exec gnome-session &
Open Port: iptables added-A RH-Firewall-1-INPUT-m state -- state NEW-m tcp-p tcp -- dport 5901-j ACCEPT
Restart the service.
3, samb
# Yum-y install samba
# Yum-y install samba-client
# Yum-y install system-config-samba
# Chkconfig smb on
Then, choose Desktop> System Settings> Administration> Samba to set shared directories and users, read/write attributes, and so on.
4. the tftp process is similar to the above process...
5. the nfs installation process is the same. Note that you need to open several ports. Otherwise, you cannot mount the network. If you have no special security requirements, disable the firewall.
After completing these steps, you can access the samba folder of linux Through Network neighbors on Windows and edit and copy files.
In Windows, you can use putty, SecureCRT, and VNC client to control linux Hosts.
Cross-Compiling of u-boot, linux kernel, and root file system on linux on Windows
The arm Development Board can mount the root file system on linux on the network.
Of course, it can be completed only on a linux host, but Windows is also a good tool when you are not familiar with editing tools on linux. :)
Simple configuration of Ubuntu Development Environment
I. Chinese Environment Settings
1. Set ubuntu Chinese reality
Choose System> System Management> Language Support (System> Administration> Language Support in the top menu) and select a Chinese entry from the list. At the same time, change the default language to Chinese, and close the setup program as per your needs.
2. Configure the font sudo fontconfig-voodoo-f-s zh_CN
3. Install the fcitx Input Method
Sudo apt-get install im-switch libapt-pkg-perl fcitx
Sudo im-switch-s fcitx
4. PDF browser sudo apt-get install unzip read
Ii. ubuntu Development Environment Settings
1. Question mark? C/C ++ Man hands ??.
Sudo apt-get install manpages-dev
2. Question? Gcc, g ++, make
Sudo apt-get install build-essential
3. Question? Header files and libraries
Sudo apt-get install libc6-dev libstdc ++ 6-4.0-dev
4. Install libncurses5-dev
Sudo apt-get install libncurses5-dev
5. Install the gdb debugger
Sudo apt-get install gdb
6. Install and install the graphical interface ddd Debugger
Sudo apt-get install ddd
7. Install the automake Tool
Sudo apt-get install automake
Sudo apt-get install autoconf
Sudo apt-get install autogen
* Autoconf is a tool used to generate shell scripts that can automatically configure the software source code package to adapt to a variety of UNIX systems.
* Automake is a tool that automatically generates Makefile. in from the Makefile. am file.
8. install indent sudo apt-get install indent
Adjust the format of the original C code file.
Sudo apt-get install libtool
GNU libtool is a common library supporting scripts that hides the complexity of dynamic libraries in a unified and portable interface.
9. Installation documentation
Sudo apt-get install binutils-doc cpp-doc gcc-4.0-doc gcc-doc glibc-doc libstdc ++ 6-4.0-doc stl-manual
Cpp-4.0-doc
10. Install the editor
Sudo apt-get install emacs21
Iii. ubuntu file sharing and transmission settings
1. Configure tftp
(1) install sudo apt-get install tftp tftpd
The former is the client, and the latter is the service program.
Tftp is controlled by inetd. For ubuntu or debian systems, inetd is not installed by default. The installation is as follows: sudo apt-get install netkit-inetd
(2) create a tftpboot in the/directory and change the attribute to 777.
Cd/
Sudo mkdir tftpboot
Sudo chmod 777 tftpboot
(3) Modify/etc/inetd. conf
Tftp dgram udp wait nobody/usr/sbin/tcpd/usr/sbin/in. tftpd/tftpboot
(4) Reload the inetd process
Sudo/etc/init. d/inetd reload
(5) test
Create a file in the/tftpboot folder
Touch aaa
Go to the user folder
Cd/home/user1/
Tftp localhost
Tftp> get aaa
2. Configure Samba
(1) install samba
Sudo apt-get install samba
(2) create and configure Shared Folders
Mkdir/home/user1/share
Chmod 777/home/user1/share
(3) back up and edit smb. conf to allow network users to access
Sudo cp/etc/samba/smb. conf/etc/samba/smb. conf_backup
Sudo gedit/etc/samba/smb. conf
Find security = user
Replace
# Security = user
Security = user
Username map =/etc/samba/smbusers
Find
Workgroup = MSHOME
Replace
Workgroup = WORKGROUP
Displays charset = UTF-8
Unix charset = UTF-8
Dos charset = cp936
Add at the end:
[Winshare]
Comment = Shared Folder with username and password
Path =/home/user1/share
Public = yes
Writable = yes
Valid users = network
Create mask = 0700
Directory mask = 0700
Force user = nobody
Force group = nogroup
Available = yes
Browseable = yes
(4) Add the network access account
Code:
Sudo useradd network
Sudo smbpasswd-a network
Sudo gedit/etc/samba/smbusers
Add:
System_username = "shijian"
Network = "network"
(5) Restart samba
Sudo/etc/init. d/samba restart
In this way, you can access the sharing of ubuntu in other windows PCs.
(6) How ubuntu accesses other windows
Use the shortcut key ALT + F2.
Enter "smb: // IP address", and press ENTER
3. Configure NFS
(1) install NFS
By default, the NFS server is not installed on Debian/Ubuntu. First, install the NFS service program:
Sudo apt-get install nfs-kernel-server
(When nfs-kernel-server is installed, apt will automatically install nfs-common and portmap)
(2) Configure/etc/exports
The NFS mount directory and permissions are defined by the/etc/exports file.
Share the IP address of 192.168.0. * In the/armsys2440/root directory, add the following statement at the end of the file:
/Armsys2440/root 192.168.2. * (rw, sync, no_root_squash)
Or:/armsys2440/root 192.168.0.0/24 (rw, sync, no_root_squash)
Run sudo exportfs-r
Update and run sudo/etc/init. d/nfs-kernel-server restart
Restart the nfs service
(3) test NFS
Try mounting the local disk (assuming the IP address of the local host is 192.168.0.1, Mount/home/zp/share to/mnt)
Sudo mount-t nfs 192.168.0.1:/armsys2440/root/mnt
Run $ df to check the result sudo umount/mnt
Some parameters can be used:
Mount-o nolock, rsize = 1024, wsize = 1024, timeo = 15 192.168.2.130:/tmp/
(4) mount the remote shared mount-t nfs 192.168.0. ***:/home/***/share/mnt/share
4. Configure minicom
Install minicom
Sudo apt-get install minicom
Iv. Cross-compilation environment settings
Install the Cross Compiler
Sudo mkdir/us r/local/arm
Cd/user/local/arm
Sudo tar zxvf/home/usr/arm-linux-toolchains.tgz
Check whether the/usr/local/arm folder exists after execution.
Add the PATH of the cross compiler to the PATH for ease of use:
Sudo vi/etc/bash_bashrc
Add the following code:
If [-d/usr/local/arm]; then
PATH =/usr/local/arm/2.95.3/bin: "$ {PATH }"
Fi
V. uboot
Uboot, kernel, File System
1. uboot Compilation
Create the armsys2440 directory, copy Linux/u-boot/uboot.tar.gz in the CD to armsys2440, and decompress the file:
Cd/armsys2440
Tar xvzf uboot.tar.gz
To obtain the uboot directory, follow these steps:
Cd uboot
Make distclean
Make smdk2440_config
Make
2. kernel Compilation
(1) Extract
Cd armsys2440
Tar xzvf/mnt/cdrom/linux/kernel/kernel-armsys2440-xxxxxx.tgz
(2) configure the command line as follows:
Cd/armsys2440/kernel2440
Make menuconfig
(3) Compile
The command line is as follows:
Make clean
Make dep
Make zImage
After compilation, the linux kernel compressed image file zImage will be obtained under the kernel/arch/arm/boot AND/tftpboot directories.
3. File System
Create the/armsys2440/root directory, copy the Linux/rootfilesystem/root_armsys2440_0.20.yaffs.tgz compressed file on the CD to this directory, and decompress the file to obtain the directory required by the root file system. Rename the root_armsys2440_0.1.tgz compressed file to root_armsys.tgz.
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.