It's a pivotal challenge to update the software in embedded systems due to many restrictions such as unreliable network and power supply, limited bandwidth, harsh environment, etc. This slide aims to provide the background knowledge and the open source tool to achieve the software update in embedded systems.
1. Software Update for Embedded
Systems
By Using Open Source Software
SZ Lin (林上智)
Embedded Linux Development Center,
Software R&D Engineer
08/18, 2019
COSCUP 2019
2. About Me
2
SZ LIN (林上智)
Software Engineer at Moxa
Debian Developer
CIP Technical Steering Committee
Linux Foundation Project
Blog - https://szlin.me
4. 4
Copyright Patent
A patent gives its owner the right to
exclude others from making, using,
selling, and importing an invention
for a limited period of time, usually
twenty years.
src: https://en.wikipedia.org/wiki/Patent
Copyright is a legal right, that grants
the creator of an original work
exclusive rights to determine whether,
and under what conditions, this
original work may be used by others
src: https://en.wikipedia.org/wiki/Copyright
5. 5
Copyright Patent
Identify key recommended processes
for effective open source management.
It is a shared defensive patent pool
with the mission to protect Linux.
8. 8
Open Source
Policy
Software
Staff
1.1.1
1.1.2
Program
Open Source
inquiry contact info.
2.1.1
Open Source
Contribution Policy
5.1.1
5.1.3
training, internal
wiki, other
practical
communication
Contribution
Process
5.1.2
Documentation
1. Awareness of participants
2. Program scope
1.3.1 1.4.1
Conformance
Documentation
1. Program meet
specification
2. Keep at least 18
months
6.1.1, 6.2.1
Review
Process
1.5.1
2.1.2
Release
Process
4.1.*
Development
Documentation
1. R&R
2. Role competencies
3. Competence evaluation
4. Name of role
5. Review and remediation
of non-compliant cases.
1.2.*
2.2.*
Open Source
Obligation
Compliance
Artifacts
Supplied
Software
Open Source
Version
Copyright
3.1.*
3.2.1
9. Processes, Tooling and Support
9
OpenChain
Trust between entities in the supply chain
The OpenChain Project builds
trust in open source by making
open source license
compliance simpler and more
consistent
SPDX
Trust for software packages
Software Package Data Exchange
(SPDX) is a file format used to
document information on the
software licenses under which a
given piece of computer
software is distributed.
FOSSology
Free scanning technology
FOSSology is a open source
license compliance software
system and toolkit
16. Year 2038 Problem
• The time_t datatype is a data type in the ISO C
library and kernel structure defined for storing
system time values.
• 32-bit system can represent dates from
Dec 13 1901
Jan 19th 2038
• It causes integer overflowing on 03:14:08 UTC 19
January 2038
16
18. 18
User Applications
GNU/ Linux
GNU C library
Init system
User
Space
Kernel
Space
Hardware and peripheral devices
Architecture-dependent firmware
Bootloader
Kernel
System call interface
Toolchain
Root filesystem
19. The Components Might Be Updated
19
Components Size Update frequency Risk
Peripheral devices
firmware
< 10 MB Rarely Mid
Bootloader
(including SPL)
< 1 MB Rarely High
Device tree <100 kB Rarely High
Linux kernel < 10 MB Regularly High
Root file system Variant Regularly High
Application Variant Often Low
System
configuration
< 1 MB Rarely Low
20. Characteristics of Industrial Embedded
Linux Devices
20
1
Multiple devices
Remote management
5
Middle of nowhere
Human-less warehouse or site
Harsh environment
Unreliable network and power supply
2
Bandwidth limited
Wireless focus
3
Multiple version supported
Rollback version
4
Longevity
Long-term support at least 10 years life cycle
6
21. The Media for Firmware Update
21
Wire cable
Wireless
network
Portable
storage
On-site
22. Suggested Requirements
22
Basic Features
Fail-safe
Roll-back
Exception report
Signatures
Multiple storage type support (e.g., NOR/NAND flash, eMMC)
Build system integration
Remote access (e.g., OTA)
Additional Features
Online and offline updates
Encryption
Delta-updates
Successful update detection
Proactive updating
23. Update Approaches
23
Components Size Complexity Time Cost
Image/ block based Large Low Very High
File based Variant Low Variant
Package based
(e.g., deb, rpm)
Variant Low Variant
Delta based Low Very High Variant
25. Asymmetric/ Symmetric Firmware Updates [1]
25
Bootloader/ Firmware
Recovery OS
User Data/ Configuration
Main OS
Bootloader/ Firmware
Main OS – A (Active)
User Data/ Configuration
Main OS – B (Inactive)
Asymmetric Firmware Updates
• Fail-safe
• Downtime
Symmetric Firmware Updates
• Seamless update
• Roll-back
• Fail-safe
• Double copy of OS
To maintain our position as the leading provider of connectivity, we are supported by three strong connectivity solutions divisions: Edge Connectivity*, Industrial Computing*, and Networking Infrastructure*. The value we bring with our connectivity infrastructure solutions is to build reliable networks that can connect all things in automation and improve the productivity and efficiency in many industrial applications such as rail, power, oil & gas, ITS, factory, marine, and more.
(*Edge Connectivity:
Serial connectivity: Commit stable long-term supply to the year 2025 and beyond. Driver/OS support from the outdated Windows CE to the latest Windows 10.
I/O connectivity: offers coding-free control logic)
(*Industrial Computing:
System-view design: fanless with wide temperature operating range, high performance with 4G LTE connectivity in a compact size)
(*Network Infrastructure:
Industrial Ethernet: cover edge-to-core product portfolio with advanced redundancy technologies
Industrial wireless LAN: Seamless wireless roaming communication < 150ms
Industrial routers: 3-in-1 design with firewall/NAT/VPN
Network management: GUI design for industrial automation usage)
Glibc has architecture optimized str/mem routines
Stack smashing protection
Heap corruption detection
glibc is the C library from the GNU project. It's the C library used by virtually all desktop and server GNU/Linux systems. It's feature-full, portable, complies to standards, but a bit bloated.
Embedded GLIBC (EGLIBC) is a variant of the GNU C Library (GLIBC) optimized for embedded systems. Its goals include reduced footprint, support for cross-compiling and cross-testing, while maintaining source and binary compatibility with GLIBC. The project is discontinued.
uClibc is an alternate C library, which features a much smaller footprint. This library can be an interesting alternative if flash space and/or memory footprint is an issue. However, the space advantages gained using uClibc are becoming less important as the price of memory and flash continues to drop. It is still useful C library for embedded systems without an MMU.
uClibc-ng is a spin-off of uClibc C library. The main goal of the spin-off is to do regular releases and do a lot of automatic runtime testing.
musl New standard C library. musl is lightweight, fast, simple, free, and strives to be correct in the sense of standards-conformance and safety.
Toolchain
Init system include C library?
LPWAN
To deliver success for mission-critical applications, our solutions also come with a comprehensive coverage of industrial approvals such as class 1 Div. 2 certified solutions for oil and gas applications and EN50155-compliant railway solutions that adhere to the durability and reliability requirements for operation in various harsh environments.
Fail-safe
Roll-back
Signatures
Multiple storage type support (e.g., NOR/NAND flash, eMMC)
Build system integration
Remote Access (e.g., OTA)