Best Open Source RTOS candidates for Open Harmony
Best Open Source RTOS candidates for Open. Harmony OS Amit Kucheria Open Source Technology Center 14/12/2020
Lite. OS
Lite. OS Review Observations Problems • Multiple versions with no common architecture and confusing code history (Lite. OS-A, Lite. OS-M, Lite. OS) • • Only supports 3 Hisilicon platforms currently (more on the way, but delayed) GPL violations by using Linux kernel headers in Lite. OS (e. g. base/startup/services/init_lite includes linux/capability. h included from prebuilt sysroot) • No concept of common subsystem code to deal with common buses e. g. serial, SPI, gpio, i 2 c • Lite. OS-A has fragments of code from various operating systems (little kernel, Nutt. X, *BSD) patched to work together • • • All the platform enablement code is binary • 3 High cost to adding new platform support Binary platform enablement unacceptable in EU – government promoting open source software stack for Europe’s goals around digital sovereignty, citizen privacy, and security Huawei Confidential • Difficulties in pulling updated code from upstream projects as a result Lack of support for much-need networking protocols such as BLE, Wifi, 802. 15. 4, Ethernet, Zigbee
Binary blobs Kernel Applications Openharmony: Block Diagram App, Ability and UI Framework Huawei Innovatio Huawei n Innovation Kernel Subsystem Hardware (So. C) 4 Huawei Confidential Driver Virtualisation (DVF) ? ? Driver Foundation (HDF) 4 Distriuted Virtual Bus Network stack (LWIP) BLE OS abstraction 802. 15. 4 OS abstraction So. C driver STM 32 STM 32 Nordic … STM 32 NXP I 2 C GPIO So. C STM 32 Hisilicon … … Distributed Task Scheduling
Analysis of kernels 5 • Comparison of high-level features between Lite. OS and Zephyr, Free. RTOS, Chibi. OS, Nutt. X, Linux • Detailed Analysis on Lite. OS and other open source RTOSes • Lite. OS-M + application framework libraries is less than 4% of the Open. Harmony codebase • No unique feature that isn’t already provided by other kernels • Not the smallest kernel in terms of resource usage (flash and RAM) • The innovation in Open. Harmony is in the application framework, application programming model • Usability: Unable to setup even the simplest connected Io. T demo for L 0, L 1 devices for EU due to binary network technology stack Huawei Confidential
Lite. OS Conclusions • Lite. OS needs more time to mature for the EU market • Cleanup GPL licensing violations • Add support for other So. C platforms (e. g. STM 32, NXP, Nordic) • Create common subsystems for shared functionality • • Bus subsystems (i 2 c, serial, spi, gpio) • Arch support (arm 64, arm 32, risc-v, x 86) Provide Open Source implementations of important subsystems • • Support standard programming APIs • 6 Networking technologies (BLE, Wifi, Ethernet, 802. 15. 4) e. g. POSIX, BSD sockets Huawei Confidential
Open Source RTOS Candidates
Open Source RTOS: Why? • EU Partners expressed little interest in moving to new kernels, want to keep existing kernel • For CPUs, BSPs are overwhelmingly Linux-based • For micro-controllers, there is fragmentation, but consolidation is starting around Zephyr, Free. RTOS • • • 8 Google and Facebook have joined Zephyr Project Partners don’t see any value in new kernels, prefer to focus efforts on their domain-specific applications Open Source kernel is a requirement • By Eclipse foundation • By EU partners and customers • Lite. OS can NOT deliver open source kernel with broad platform support and open network stacks currently • Kernel component is of low value to partners and several exist that already support what they need – use them and focus on the application framework layers in Open. Harmony Huawei Confidential
Open Source RTOS: How to pick one? • Open source • • Broad architecture and platform support (arm, riscv, • Large community with several companies actively contributing • • No single company controlling development (e. g. ARM mbed, Microsoft Thread. X) Feature Breadth and Depth • Io. T Networking technologies (e. g. BLE, Wifi, Ethernet, Thread, 802. 15. 4, Lo. RA, Zigbee) • Bus protocol stacks (e. g. SPI, I 2 C, GPIO, CAN) • Higher layer application protocol stacks (e. g. MQTT, Co. AP, Lw. M 2 M) Use of best practices to improve code quality, avoid security bugs • 9 Public Review of Code Static checkers, Coverity, Coccinelle, MISRA standards Ability to remove any unnecessary feature for small footprint Huawei Confidential
Open Source RTOS: Which one? Snippet from RTOS comparison Property Lite. OS Zephyr Free. RTOS Linux < 10 > 300 50 - 100 > 300 Activity: # of patches merged in 2020 5* 9155 950 74647 Activity: # of companies <5 > 200 11 – 50 > 200 Very limited Many ISAs, Lots of So. Cs, Many Boards Many ISAs, Lots of So. Cs, Several Boards All ISAs, Most So. Cs, Lots of Boards Activity: # of developers Breadth of HW platforms supported 10 Open Source No, HW ports are binary Yes Yes Breadth of Features BLE stack, Wifi Stack, Thread, Ethernet, 802. 15. 4 Partial, but binary blobs Yes Partial Yes Huawei Confidential
Open Source RTOS: Conclusions • Linux is the obvious choice for rich OS in EU • Hopefully, this is not controversial • Based of criteria in previous slide, RTOS comparison was done for Lite. OS, Zephyr, Free. RTOS • Zephyr and Free. RTOS were found to be the only candidates be backed by multiple So. C companies, a vibrant community along with providing a rich feature set • Several EU partners (e. g. Tado, Bosch, Seco) are already using Zephyr or Free. RTOS or planning to move to it • Zephyr is managed by Linux Foundation as a community project just like Linux • Free. RTOS is becoming more closed since Amazon acquisition 11 Huawei Confidential
Open Source RTOS: Recommendations • Recommendation: Start with Zephyr and Linux for EU • • Partners will be able to add support for other RTOS on their own subject to SIG acceptance e. g. Free. RTOS Lite. OS will be added as another kernel option after issues are addressed • Different geographies can use the kernel that they have made investments in • Application Framework Libraries from Open. Harmony will be adjusted to allow support for Zephyr and Linux as needed • Certification tests used to check API compatibility where necessary 12 Huawei Confidential
Thank you. Bring digital to every person, home, and organization for a fully connected, intelligent world. Copyright© 2019 Huawei Technologies Co. , Ltd. All Rights Reserved. The information in this document may contain predictive statements including, without limitation, statements regarding the future financial and operating results, future product portfolio, new technology, etc. There a number of factors that could cause actual results and developments to differ materially from those expressed or implied in the predictive statements. Therefore, such information is provided for reference purpose only and constitutes neither an offer nor an acceptance. Huawei may change the information at any time without notice.
- Slides: 13