Basic concepts of embedded Linux development

1.2.1 What are the contents of embedded Linux development?

Embedded Linux system is equivalent to a complete PC software system.
Insert picture description here
Take Windows as an example:

① When the computer is turned on, who displays those interfaces?
It is BIOS, what does it do? Some self-checks, and then read windows from the hard drive and start it.
Similarly, this BIOS corresponds to the bootloader in embedded Linux.
The function of Bootloader is to read the Linux kernel from devices such as Flash, SD card, and start it.

② Where are the necessary software for Windows system, such as IE, file browser, etc. stored?
On the C drive, there are various system software.
Correspondingly, the files necessary for system operation are called the root file system under Linux.

③ Windows can recognize the C drive and D drive, so it must have the ability to read and write hard drives.
We call this ability a driver. Of course, it is not only operating the hard disk, but also other hardware such as network card, USB and so on.
Embedded Linux can read and execute applications from Flash, and it must also have Flash drivers. Of course, it is not just Flash.

④ After Windows starts, we are talking about QQ and playing games. These are APPs and they are stored on the disk.

Similarly, we also have various APPs in the embedded Linux system, which are located on the root file system.

Simply put, the embedded LINUX system contains:

① bootloader: used to start the Linux kernel

② Linux kernel (including driver): Provide process management, file management, hardware driver, etc.

③ Root file system: files and programs necessary for system operation

④ APP: Save on the root file system

1.2.2 What is the development process in daily work?

Bootloader, Linux kernel, APP and other software need to be compiled in Ubuntu; but it is more convenient to read and modify these source codes under Windows.

Therefore, we need to store the source code on both Windows and Ubuntu.

① Read, research, modify on Windows (it will be very convenient to use Source insight), and upload to Ubuntu after modification (using Filezilla)

② Compile and make on Ubuntu (it will be very convenient to log in Ubuntu remotely with MobaXterm)

③ Download the prepared executable program to the development board to run and test (use MobaXterm to connect to the serial port of the development board).

Throughout the development process, we will use Windows, Ubuntu, and development boards, as shown in the following figure:
Insert picture description here

1.2.3 What needs to be done to build a development environment

Here is just a list of things to be done, which will be covered one by one later.

  1. Install VMware, download the Ubuntu image
  2. Install various
    apps on Windows. These apps are: SourceInsight, FileZilla, MobaXterm, Notepad++
  3. Download source code and tool chain
    Tool chain: You must download or upload to Ubuntu, and set the PATH environment variable. (To put it simply, the tool chain is the compiler)
    Source code: u-boot, Linux kernel, you can download it when you learn it, and save a copy for Windows and Ubuntu.
    Note: The root file system is made using buildroot, it does not need to be placed on Windows.
  4. Connect the development board
    ① Connect the power cord to the development board,
    ② Connect the serial cable of the development board to the Windows computer; and use MobaXterm to connect the serial port.
    ③ The network cable of the development board is connected to the router or switch. For network settings, please refer to the following documents (not to do it first):
  5. Programming the system
    If the development board system crashes, or there is no system on the new board, please follow the development board manual manual to program the system.

Guess you like

Origin blog.csdn.net/thisway_diy/article/details/108621854