Application Notes | NXP iMX 93 Development Board OTA Function Construction

Publisher:EE小广播Latest update time:2024-05-23 Source: EEWORLD Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.


image.png


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

# ##Configure the default directory, comment out

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:

http://192.168.1.20:8001, if successful, it will be as shown in the following figure:

image.png

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.


image.png




Reference address:Application Notes | NXP iMX 93 Development Board OTA Function Construction

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

NXP CTO: Edge computing will make remote connections better
By: NXP CTO Lars Reger Now that I’ve been working from home for a few months, I have to say that remote work is both a miracle and an opportunity for innovation that, believe it or not, will make remote connections better. The wonder is that my home and devices are a classic example of “edge” computing, and I enga
[Embedded]
NXP launches MC33777 to revolutionize electric vehicle battery pack monitoring technology
NXP releases the MC33777, the first battery junction box integrated circuit (IC) that integrates sensing, decision-making and actuation capabilities in a single device. Compared with previous generations, it redefines battery management systems with outstanding performance and safety in high-voltage applications.
[Power Management]
NXP launches MC33777 to revolutionize electric vehicle battery pack monitoring technology
NXP LPC1100 GPIO port operation
The GPIO ports of LPC1100 are mapped to the address space from 0x5000,0000 to 0x5003,FFFF. There are 4 ports in total, and each port occupies 64K bytes of space. See the table below for details: Port 0: 0x5000,0000 - 0x5000,FFFF Port 1: 0x5001,0000 - 0x5001,FFFF Port 2: 0x5002,0000 - 0x5002,FFFF Port 3: 0x5003
[Microcontroller]
Automotive Domain Controller Architecture and the Heart of OTA: The Four Major Gateways (Part 2)
In 2011, Texas Instruments launched the J6 series of cockpit chips. Volkswagen, Audi, BMW, and Mercedes-Benz are still using J6. In 2017, Texas Instruments began to design the J7 series of chips. Texas Instruments has never been very interested in digital processor chips. Analog devices are the main source of profit f
[Automotive Electronics]
Automotive Domain Controller Architecture and the Heart of OTA: The Four Major Gateways (Part 2)
NXP Expands Secure Ultra-Wideband (UWB) Portfolio to Support Emerging IoT Use Cases
Recently, Sina Auto learned that NXP Semiconductors announced at its annual developer conference that it has achieved a new milestone in promoting secure ultra-wideband (UWB) technology as a global standard for precise positioning and high-precision sensing. Following the launch of UWB solutions in mobile devices and
[Automotive Electronics]
NXP Expands Secure Ultra-Wideband (UWB) Portfolio to Support Emerging IoT Use Cases
Unity Technologies and NXP collaborate to develop human-machine interface for high-fidelity immersive gaming in cars
Las Vegas, NV, USA – January 8, 2020 – Unity  Technologies, creator of the world’s most widely used real-time 3D development platform  , today announced that it is collaborating with NXP Semiconductors NV (Nasdaq: NXPI), the world’s largest supplier of automotive semiconductors , to deliver an HMI toolchain running o
[Automotive Electronics]
MPC5744P-NXP various modules (drivers) sample code
The author debugged each module based on the reference manual and official sample code. S32 has sample codes for 5746C, 5748G, 5744P, etc. The method to obtain the NXP driver sample code is as follows: 1. NXP driver sample code twenty three) 2. Development Demo Board Information My development board is DEVKIT-MO
[Microcontroller]
MPC5744P-NXP various modules (drivers) sample code
Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号