Solutions for building ping and nfs in embedded Linux development environment

Solutions for building ping and nfs in embedded Linux development environment

1. Embedded Software Level

1) Bootloader->Bootloader

The loading and startup task of the entire embedded system is completely handed over to the Bootloader. Its main task is to read the kernel image from the hard disk into RAM, and then jump to the kernel entry to start the kernel (operating system)! In layman's terms, the role of Bootloader is to initialize the hardware and start the operating system.

U-BOOT is the most commonly used Bootloader. After downloading uboot to the nand flash (ROM) of the development board, you can use the simulation software Secure CRT to perform initial settings on the development board. Including the environment variables, IP and other settings of the development board, which lay the foundation for downloading the kernel and loading the file system later.

2) Linux Kernel

Configure different system kernels to meet different hardware and software requirements. Generally based on the existing kernel modification

Configure kernel -> Compile kernel -> Install kernel -> Clean kernel process files (make clean)

Configure the kernel: make menuconfig ARCH=arm Select the required driver and protocol file in the menu-based interactive interface

Compile the kernel: make uImage(kernel name) ARCH=arm CROSS_COMPILE=arm-linux-

Install the kernel: Download uImage to 20000fc0 (210 development board boot address) based on uboot through tftp server "tftp uImage 20007fc0"

3) File System

Simply put, a file system is a directory structure. Since the devices of the Linux operating system exist in the system in the form of files, these files are classified and managed, and an interface for interaction with the kernel is provided, which forms a certain directory structure, namely the file system.

Basic process:

  • a. Set the root file system directory rootfs and internal storage file directories bin, dev, lib, sbin, sys, usr, mnt, etc.;
  • b. Add kernel module to the file system, in the linux kernel directory "/home/S4-Driver/linux-smart210/";

" make modules ARCH=arm CROSS_COMPILE=arm-linux- " kernel compilation

" make modules——install ARCH=arm INSTALL_MOD_PATH=/home/S5-/rootfs " Copy the kernel file to the root file directory

  • c. Install the cross compiler busybox in the root directory "/.../rootfs", configure the kernel -> compile the kernel -> install the copy make install;
  • d. Mount the root file system using nfs, which can be used to create a real-time online root file system rootfs;

SecureCRT -> Configure the development board parameters through uboot (nfs configuration items) -> Download the Linux kernel from the tftp server -> Run bootm 20007fc0 to mount it!

2. Occasional Problems

1. A series of issues with the development board ping

1) Model structure construction: PC -> wired network card -> router -> direct network cable -> development board network port;

2) a. Set the virtual machine to bridge mode to ensure that the external network can find the Linux virtual machine IP;

b. If the PC uses a wired network card, select Realtak USB (wired network port) for the PC and Linux virtual network adapter;

c. Ensure that the IP addresses of the Linux virtual machine, PC, and development board are in the same network segment;

3) Turn off the firewall of the Linux virtual machine and PC so that the PC can ping Linux and the development board

After eliminating the hardware interface problem, communication will be possible.

2.nfs mount problem

Problems such as "Server is not responding" and "unable to mount root" may occur during nfs mounting. The main reason is that there are problems with the setting parameters and download address of nfs mounting. For example, the download address of smart210 is 20007fc0 (not 20008000). NFS uses UDP communication protocol by default. The mounting parameters can be searched online. Just try it a few times and there will be no problem. The premise is to ensure that the Linux NFS server can be used normally.

The above is all the knowledge points about setting up the embedded Linux development environment and solving problems with ping and nfs. Thank you for your support of 123WORDPRESS.COM.

You may also be interested in:
  • How to implement one-click deployment of nfs in linux
  • Detailed steps to build an NFS file sharing server in Linux
  • Linux NFS service security hardening method
  • Detailed explanation of NFS configuration tutorial under Linux
  • Analysis of Linux NFS server installation and configuration ideas
  • How to install and configure Linux NFS server (with pictures and text)
  • Linux NFS installation configuration and common problems, /etc/exports configuration file, showmount command
  • How to mount the nfs network file system between linux systems
  • Working principle and example analysis of Linux NFS mechanism

<<:  The difference between Update and select in MySQL for single and multiple tables, and views and temporary tables

>>:  Vue Element front-end application development table list display

Recommend

MySQL online log library migration example

Let me tell you about a recent case. A game log l...

Specific method to delete mysql service

MySQL prompts the following error I went to "...

Getting Started: A brief introduction to HTML's basic tags and attributes

HTML is made up of tags and attributes, which are...

CentOS7 installation zabbix 4.0 tutorial (illustration and text)

Disable SeLinux setenforce 0 Permanently closed: ...

How to run JavaScript in Jupyter Notebook

Later, I also added how to use Jupyter Notebook i...

Nexus private server construction principle and tutorial analysis

one. Why build a Nexus private server? All develo...

Steps to build a file server using Apache under Linux

1. About the file server In a project, if you wan...

mysql three tables connected to create a view

Three tables are connected. Field a of table A co...

How to modify the initial password of MySQL on MAC

Problem description: I bought a Mac and installed...

Common structural tags in XHTML

structure body, head, html, title text abbr, acro...