1. Overview
Over-the-Air Technology (OTA) is a technology that remotely manages mobile terminal devices and SIM card data through the air interface of mobile communications. This article uses swupdate to perform OTA upgrades. Swupdate is an upgrade service framework program based on the embedded Linux platform. It provides partition upgrade, file upgrade, differential upgrade (patch application) functions, and provides an open interface for users to add custom upgrade processing functions. This application note mainly describes how to use the OTA function built in the Mir system based on the NXP iMX 93 core board (MYC-LMX9X core board) to achieve remote upgrades of the MYC-LMX9X file system.
2. Environmental Preparation
2.1. Software Resources
-
OTA upgrade file creation tool: ota-generate_swu.tar.gz (path: 03_Tools/ota-tools).
-
MYC-LMX9X-Core file system: myir-image-core-myd-lmx9x.ext4 (path: 02_Images/ or compiled through Yocto. For compilation-related information, see the Software Development Guide).
-
Ubuntu operating system host environment, either a virtual machine or a PC host with Ubuntu installed, no version requirements.
2.2. Hardware resources
-
Mir is based on the NXP iMX 93 development board (or MYC-LMX9X core board + self-developed baseboard, the self-developed baseboard requires at least one network port or a Wifi chip).
-
Network cable or Wi-Fi antenna.
-
Development board power supply, serial port cable and other accessories required to ensure the development board can run normally and start up.
2.3. Host environment configuration
To perform OTA upgrade, you must build an Http server in the Ubuntu host environment. The following will take the Http server construction process of Ubuntu18.04 as an example, and the username will be myir. For subsequent OTA upgrades, the Http server will be directly configured to be directly usable in the future. This process is for reference only. If any errors that are not described in the following instructions occur during the construction process using other versions of the Ubuntu system, please consult the Internet for solutions.
-
Install apache2
sudo apt install -y apache2
-
Configure the environment
The default port is 80. To prevent conflicts caused by other uses, change it to a custom port: 8001. Modify the listening port in the /etc/apache2/ports.conf file:
$: vi /etc/apache2/ports.conf
Listen 8001 ## Other lines remain unchanged
Modify the port and access directory of the /etc/apache2/sites-enabled/000-default.conf file for subsequent use.
$: vi /etc/apache2/sites-enabled/000-default.conf
## Other lines remain unchanged #DocumentRoot /var/www/html ## Default browser access directory, comment out
DocumentRoot /home/myir/swupdate ##Change to this directory, please modify the user name according to the modification
Modify the apache2 configuration file /etc/apache2/apache2.conf:
$: vi /etc/apache2/apache2.conf
##Find the following line and modify it to the following content
#
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
-
Restart the service
$: sudo /etc/init.d/apache2 restart
-
test
If it is a virtual machine, please modify the Ubuntu network configuration to a bridged network card so that the virtual machine and the Windows host are under the same IP. If it is another environment, you can directly open the browser and enter http://{hostIP}:8001 in the browser. Here, hostIP is the IP address of Ubuntu configured with the http server. For example, if the IP address of Ubuntu is 192.168.1.20, enter in the browser:
Figure 2-1. http is successfully built
3. Upgrade Principle
OTA can be simply understood as an online firmware upgrade. After the firmware is downloaded from the server, it is written to the corresponding partition. In this process, there may be power outages during burning or other reasons that may cause partition damage. Therefore, MYD-LMX9X chooses the AB symmetrical partition method to save the file system.
3.1. Introduction to AB partition
3.2.Swupdate Introduction
This section will introduce the swupdate update that will be performed after entering the file system in the previous section. The update is started by the systemd service and is an automatic update. You only need to modify the configuration of the corresponding IP address path.
First, let's introduce the swu file that is needed for swupdate updates. This file is produced by a script. The production tool compressed package has been stored in 03_Tools and is named ota-generate_swu.tar.gz. The specific production process will be introduced in the subsequent chapter 4.1. Here we first introduce the configuration file sw-description of the swu file, which is as follows:
4. Operation steps
4.1. Remote Upgrade
To realize the OTA function, at least two devices are required, namely the server and the client. There is only one server, which is MYD-LMX9X (the MYD-LMX9X development board is used as an example in this article). The development board is connected to the PC through the serial port, or the serial port of the development board can be remotely accessed through ssh. For this step, you can read the quick start guide and evaluation guide for specific information. Then store the swu file required for OTA on the PC host, and then the development board executes the corresponding command to complete the OTA upgrade. The following is a detailed introduction to the operation steps and precautions.
4.1.1. Create swu file
First, obtain the OTA upgrade file creation tool: ota-generate_swu.tar.gz through the Mir Electronics Download Center link of MYD-LMX9X or the Baidu network disk sharing link.
4.1.2. Update the system
After completing the above steps, boot into the file system, modify /etc/swupdate.sh, and change the network address to the actual IP address and the corresponding file path:
echo "SWUPDATE_ARGS="-v -d -uhttp://192.168.1.20/swupdate-ota/myd-lmx9x_1.1.swu -e stable,main"" > /etc/myir-swupdate.cfg
Save after modification. The swu file will be automatically updated after restarting the development board.
Mir is based on the NXP i.MX 93 series products - MYC-LMX9X core board and development board. Based on the market verification of the i.MX 6 and i.MX 8 series products, the NXP i.MX 9 series inherits the advantages of the previous generation products while further improving the balance of performance, resource utilization and price. The i.MX 93 processor is equipped with a dual-core Cortex-A55@1.7 GHz+Cortex-M33@250MHz, taking into account multi-tasking and real-time requirements, and integrating a 0.5 TOPS NPU to enable low-cost lightweight AI applications.
Previous article:Remi Pi Ubuntu System Porting Guide
Next article:Microsoft stops developing and abandons NTLM protocol, Win11 24H2 and Server 2025 still retain it
Recommended ReadingLatest update time:2024-11-16 09:47
- Popular Resources
- Popular amplifiers
- Siemens PLC Programming Technology and Application Cases (Edited by Liu Zhenquan, Wang Hanzhi, Yang Kun, etc.)
- Learning PLC is easy - PLC ladder diagram and statement table with pictures (Li Changjun, Zhou Hua)
- A Complete Illustrated Guide to Operational Amplifier Applications (Written by Wang Zhenhong)
- How to read electrical control circuit diagrams (Classic best-selling books on electronics and electrical engineering) (Zheng Fengyi)
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- How to use logic analyzer to debug SPI anomalies
- TI C6000 CodecEngine integrated algorithm core calling principle
- Commonly used techniques in PCB design
- [Silicon Labs Development Kit Review] Using TensorFlow to Prototype Gesture Recognition Project
- When IAR STM8 uses registers as uart, an error occurs when writing the receive interrupt. Please solve it
- EEWORLD University Hall----Live Replay: ADI Reference Voltage Source Product Technology and Application Selection
- Revolutionizing radar design with electronically reconfigurable GaN power amplifiers
- About the debugging of ML75308 optical rainfall chip???
- R&D Management
- [Raspberry Pi Pico Review] Power-on initial test