Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to analyze linux embedded Development

2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

How to parse linux embedded development, many novices are not very clear about this, in order to help you solve this problem, the following small series will explain in detail for everyone, there are people who need this to learn, I hope you can gain something.

Many people who learn embedded systems will learn embedded linux development. In the process of learning, there will always be many problems. Relatively speaking, embedded linux is also considered to be more difficult in embedded learning. How can we break this difficulty? Then we need to start from the root. One of the most important points in learning embedded linux is the process of embedded linux development. See how embedded development Daniel understands embedded linux development. Here are some specific development processes summarized. Of course, in addition to the process, there will definitely be a lot of questions, and here will be the answer for you.

For embedded development process is actually very simple, but there are a lot of small things you need to pay attention to, this is also so many years of experience, let's first look at the specific process:

First, to establish a development environment, you must first install and configure the embedded Linux development environment, this is the basic

Of course, the operating system is LInux, or install the virtual machine under the win system, download the corresponding GCC cross-compiler through the network to install, or install the cross-compiler provided by the product manufacturer.

This step is equivalent to installing an IDE development environment under win system, such as MDK, IAR, etc. At this point, I often have some problems because of this, because the configuration is not matched well, resulting in the following steps can not be carried out, error, to remember that you need to be careful here.

II. Configuration development host

The main configuration minicom, that is, serial assistant, minicom software is used as a debugging embedded development board information output monitor and keyboard input tool, is a very convenient tool, we develop other embedded programs, in fact, many times also use serial debugging, so the final principle is the same.

1. Embedded Linux development process

Configure the network, mainly configure NFS network file system, this is mainly used to download programs, of course, do not configure can also, there are many other ways.

Third, establish the bootloader installed in the program

Commonly used bootloaders mainly include u-boot, vivi, etc., which seems to be the mainstream u-boot, which is transplanted and modified according to its own specific chip. Some chips do not have built-in boot loader, which requires the preparation of Flash on the development board less programs, of course, you can also use windows through JTAG parallel port and emulator less Flash chip programs, there are linux open source J-Flash programs, in their own time, you can reserve multiple ways, this is useful.

Simply speaking, in fact, it is necessary to do a u-boot belonging to your own board, complete initialization, kernel boot, download, burn, etc. In fact, at this point, it will also be a difficult point, there are many things to master here, the burning of this process, kernel guidance, free download on the network under Windows through JTAG parallel port simple emulator burning ARM peripheral Flash chip burning program, there are also open source code under Linux J-Flash program. If you can't write your own development board, you need to modify the source code according to your specific circuit. This is the first step in the normal operation of the system. If you buy a manufacturer's simulator, of course, it is easier to write Flash, which can greatly improve the development speed for those who need to quickly develop their own products, but the core technology is not understood.

And then there's embedded Linux.

1. Embedded Linux development process

If there is a Linux specifically for the CPU you use, such as uCLinux, ARM-Linux, PPC-Linux, etc., if not, you should try to transplant your own Linux, and then add your own specific hardware driver, debugging modifications, for CPU with MMU can use module debugging driver, and for uCLinux such systems need to be compiled into the kernel, and the kernel as a whole, and then debugging. The best thing is to download someone else's ported Linux operating system to get it, which will be efficient

Next is the root file system.

As mentioned in the previous article, Linux does not work properly without a root file system and requires a root file system. So you need to download busybox software to make root file system.

Then add other programs according to your application needs. The default startup script generally does not meet the application requirements.(Because all embedded development is freely customized), it is necessary to modify the startup script in the root file system. Its storage location is under the/etc directory, including: /etc/init.d/rc.S,/etc/profile,/etc/.profile, etc., automatically mount the file system configuration file/etc/fstab, in fact, customize your own program to boot, the specific situation will vary with different systems, the root file system in embedded systems is generally set to read-only, you need to use mkcramfs, genromfs and other tools to generate fewer image files. Remember to watch this step carefully and don't write it wrong to save time.

Once the above is done, the next step is to create a Flash disk partition for the application.

Generally will use jffs2 or YAFF file system, which needs to provide these file system drivers in the kernel, some systems use NOR FLASH, some systems use NAND FLASH, some systems use both flash, then it depends on the specific situation.

3. Develop applications

Applications can be placed in the root file system, yaffs, jffs2 file system, some applications do not use the root file system, directly the application and kernel design together, is similar to uCOS-II way.

In fact, the above steps are also for this step. Here you should note that he has three ways of presenting:

(1)Direct application and kernel design together, similar to uCOS-II

(2)Developing Application Program Based on GUI such as qt

(3)No screen, only simple man-machine interface, such as serial port, keys, digital tube, this can also achieve complex function development

Now it's time to load the burn-in kernel, root file system, and application (which is almost done)

No matter how to load, module or, all these development, process data, are to be burned to flash, and then what the application needs, the corresponding function program can be loaded.

4. Release products

Develop a medium and high-end controller device with complex functions and even complex screen interactions, such as mobile phones (Android is the pro-son of Linux, OS is the pro-cousin of Linux), cash machines, server trading systems, then Linux is very suitable.

To develop a small controller device, if the function is not too complicated, you can use a slightly advanced CPU, bare metal or ucos to develop, it is also very convenient, you can also do a lot of customized versions of industrial small controllers.

According to my many years of experience summary are here, and embedded linux development process is these, follow these steps above, master embedded linux learning is still very simple, these methods you get it, are actual combat experience.

Did reading the above help you? If you still want to have further understanding of related knowledge or read more related articles, please pay attention to the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report