Embedded Linux system development course

Pioneer of code farmers 2021-01-21 08:14:16
embedded linux development course


In the process of learning embedded development , Especially at the beginning , Including all kinds of tutorials , It's all about learning linux, Seldom talk about how to use linux To develop their own embedded projects , That is, there is no concept of a global situation , Simple understanding , The general process is as follows :

One 、 Build the development environment

The operating system, of course, is LInux, Or in win Install virtual machine under the system , Download the corresponding GCC Cross compiler installation , Or install the cross compiler provided by the manufacturer .

This step , It's equivalent to win Under the system , To install a IDE development environment , Such as MDK,IAR etc. .

Two 、 Configure the development host

Mainly configuration minicom, The serial assistant ,minicom The software is used as a monitor and keyboard input tool to debug the information output of embedded development board , It's a very convenient tool , When we develop other embedded programs , In fact, a lot of time also uses serial port debugging , So the ultimate principles are interlinked .

configure network , Mainly configuration NFS Network file system , This is mainly used to download programs , Of course, it can be done without configuration , There are many other ways .

3、 ... and 、 Set up the bootstrap installed in the program's bootloader

frequently-used bootloader There are mainly u-boot、vivi etc. , It seems that the mainstream is u-boot, This chip is transplanted and modified according to its own specific chip . Some chips have no built-in bootloader , This requires the development board to write Flash Fewer procedures , You can also use it windows The passage of the next JTAG Fewer parallel ports and emulators Flash Chip program , Also have linux Open source code under J-Flash Program , So when designing your own hardware , There are many ways to reserve .

Simple speak , In fact, it's about making your own board u-boot, Initialization complete , Kernel boot , download 、 Burning and writing, etc .

Four 、 Porting embedded Linux operating system

If there's one for you CPU Of Linux be perfect , such as uCLinux、ARM-Linux、PPC-Linux etc. , without , Try to transplant your own linux 了 , Then add your own specific hardware driver , Debug and modify , For band MMU Of CPU You can debug the driver in a modular way , And for uCLinux Such a system needs to be compiled into the kernel , Integrated with the kernel , Then debug .

5、 ... and 、 Set up the root file system

The previous article talked about , No root file system Linux It doesn't work , You also need the root file system . So you need to download and use busybox Software to make the root file system .

Then according to their own application needs to add other programs , The default startup script generally does not meet the requirements of the application ( Because all embedded development is freely customized ), So you need to modify the startup script in the root file system , Its storage location is as follows /etc Under the table of contents , Include :/etc/init.d/rc.S、/etc/profile、/etc/.profile etc. , Automatically mount the configuration file of the file system /etc/fstab, In fact, it is to customize the program you want to start , The specific situation will vary with the system , The root file system is usually set as read-only in embedded system , Need to use mkcramfs、genromfs And other tools to generate fewer image files .

6、 ... and 、 Build the application Flash Disk partition

You usually use jffs2 perhaps YAFF file system , This requires drivers for these file systems to be provided in the kernel , Some systems use NOR FLASH, Some systems use NAND FLASH, There are also two systems flash All use , that jffs2 What is the function of ?

The introduction in the encyclopedia is :jffs2 Full name journalling flash filesystem version2( Flash log file system version 2 ), Its function is to manage MTD Log file system implemented on device , The log system is also necessary for a complete system , Whether it's windows still linux, With these, it's not a hooligan , Hey .jffs2 It is not intended to provide functions similar to traditional file systems , It will only be directly in MTD A file system that implements a log structure on the device , In addition to providing a log structured file system with outage reliability ,jffs2 It will also be managed in it MTD On the device " Loss balance " and “ data compression ” Other characteristics .

MTD(memory technology device Memory technology devices ), Is a variety of flash.

7、 ... and 、 Developing applications

Applications can be put into the root file system , You can also put it in yaffs、jffs2 File system , Some applications don't use the root file system , Design applications and kernels directly together , It's like uCOS-II The way .

Actually , Wrote this , This step is the ultimate goal , The previous steps are all for this step , My own understanding , There are three ways to develop application presentation :

(1) Let's talk about application and kernel design together , Similar to uCOS-II The way , This kind of way belongs to private customization , The types of functions implemented are relatively few , It's just exclusive , But the stability requirements are high , For example, complex switches 、 Firewall, etc , Maybe more interested in linux The stability of the system and all kinds of excellent peripheral resources .

(2) be based on qt etc. GUI Developing applications , I always thought qt yes linux You can't get around it , In fact, with the understanding of , Not always ,qt It's actually a desktop system , for instance ubuntu, For a master , It doesn't matter whether there is a desktop or not , Because everything can pass through shell To complete , Use qt It's user-friendly , So for those that need to operate , Embedded device with screen , This is a good plan . For example, there are various handheld instruments with screens on the industrial touch screen , It's all in this way .

(3) No screen , Just a simple human-computer interface , For example, serial port , Key , Nixie tube , It can also realize complex function development , for instance , It's possible to develop one based on linux Of PLC, Programmable solutions , By scripting , This is also a good solution to achieve .

8、 ... and 、 Burning the kernel 、 The root file system 、 Applications

No matter how you load , Modules are good , All these developments , Process information , It's all about burning flash Medium , And then what the application needs , Just load the corresponding function program .

Nine 、 Launch product

Wrote last , Find out , I was superstitious before linux, Not to say that linux Not good. , But rather , For embedded development engineers , No best , Only the most suitable , Develop a product , What kind of , No need to , It's all local .

For example, a simple running Lantern , You have to use embedded linux programme , That's Shaobao , Just a simple 2051, Bare metal programs can be developed , It's cheap , Easy to use .

Develop a small controller device , If the function is not too complicated , You can use a little more advanced CPU, Bare metal or ucos Wait to develop , Very convenient also , Also can do many custom version of small industrial controller .

Development of a high type controller device , The function is complex , It even requires complex screen interaction , Like mobile phone. ( Android is linux My son ,OS yes linux My cousin ), ATM , Server trading system , that linux It's perfect .

![](https://oscimg.oschina.net/oscnet/up-33e0b7d30703178bca85c4d6a212787a914.png)

That's all Liangxu tutorial website For all of you Linux Related knowledge .

版权声明
本文为[Pioneer of code farmers]所创,转载请带上原文链接,感谢
https://javamana.com/2021/01/20210121081319695m.html

  1. 【计算机网络 12(1),尚学堂马士兵Java视频教程
  2. 【程序猿历程,史上最全的Java面试题集锦在这里
  3. 【程序猿历程(1),Javaweb视频教程百度云
  4. Notes on MySQL 45 lectures (1-7)
  5. [computer network 12 (1), Shang Xuetang Ma soldier java video tutorial
  6. The most complete collection of Java interview questions in history is here
  7. [process of program ape (1), JavaWeb video tutorial, baidu cloud
  8. Notes on MySQL 45 lectures (1-7)
  9. 精进 Spring Boot 03:Spring Boot 的配置文件和配置管理,以及用三种方式读取配置文件
  10. Refined spring boot 03: spring boot configuration files and configuration management, and reading configuration files in three ways
  11. 精进 Spring Boot 03:Spring Boot 的配置文件和配置管理,以及用三种方式读取配置文件
  12. Refined spring boot 03: spring boot configuration files and configuration management, and reading configuration files in three ways
  13. 【递归,Java传智播客笔记
  14. [recursion, Java intelligence podcast notes
  15. [adhere to painting for 386 days] the beginning of spring of 24 solar terms
  16. K8S系列第八篇(Service、EndPoints以及高可用kubeadm部署)
  17. K8s Series Part 8 (service, endpoints and high availability kubeadm deployment)
  18. 【重识 HTML (3),350道Java面试真题分享
  19. 【重识 HTML (2),Java并发编程必会的多线程你竟然还不会
  20. 【重识 HTML (1),二本Java小菜鸟4面字节跳动被秒成渣渣
  21. [re recognize HTML (3) and share 350 real Java interview questions
  22. [re recognize HTML (2). Multithreading is a must for Java Concurrent Programming. How dare you not
  23. [re recognize HTML (1), two Java rookies' 4-sided bytes beat and become slag in seconds
  24. 造轮子系列之RPC 1:如何从零开始开发RPC框架
  25. RPC 1: how to develop RPC framework from scratch
  26. 造轮子系列之RPC 1:如何从零开始开发RPC框架
  27. RPC 1: how to develop RPC framework from scratch
  28. 一次性捋清楚吧,对乱糟糟的,Spring事务扩展机制
  29. 一文彻底弄懂如何选择抽象类还是接口,连续四年百度Java岗必问面试题
  30. Redis常用命令
  31. 一双拖鞋引发的血案,狂神说Java系列笔记
  32. 一、mysql基础安装
  33. 一位程序员的独白:尽管我一生坎坷,Java框架面试基础
  34. Clear it all at once. For the messy, spring transaction extension mechanism
  35. A thorough understanding of how to choose abstract classes or interfaces, baidu Java post must ask interview questions for four consecutive years
  36. Redis common commands
  37. A pair of slippers triggered the murder, crazy God said java series notes
  38. 1、 MySQL basic installation
  39. Monologue of a programmer: despite my ups and downs in my life, Java framework is the foundation of interview
  40. 【大厂面试】三面三问Spring循环依赖,请一定要把这篇看完(建议收藏)
  41. 一线互联网企业中,springboot入门项目
  42. 一篇文带你入门SSM框架Spring开发,帮你快速拿Offer
  43. 【面试资料】Java全集、微服务、大数据、数据结构与算法、机器学习知识最全总结,283页pdf
  44. 【leetcode刷题】24.数组中重复的数字——Java版
  45. 【leetcode刷题】23.对称二叉树——Java版
  46. 【leetcode刷题】22.二叉树的中序遍历——Java版
  47. 【leetcode刷题】21.三数之和——Java版
  48. 【leetcode刷题】20.最长回文子串——Java版
  49. 【leetcode刷题】19.回文链表——Java版
  50. 【leetcode刷题】18.反转链表——Java版
  51. 【leetcode刷题】17.相交链表——Java&python版
  52. 【leetcode刷题】16.环形链表——Java版
  53. 【leetcode刷题】15.汉明距离——Java版
  54. 【leetcode刷题】14.找到所有数组中消失的数字——Java版
  55. 【leetcode刷题】13.比特位计数——Java版
  56. oracle控制用户权限命令
  57. 三年Java开发,继阿里,鲁班二期Java架构师
  58. Oracle必须要启动的服务
  59. 万字长文!深入剖析HashMap,Java基础笔试题大全带答案
  60. 一问Kafka就心慌?我却凭着这份,图灵学院vip课程百度云