Upload
others
View
10
Download
0
Embed Size (px)
Citation preview
Copyright © 2013 NTT DATA MSE Corporation
NTT DATA MSE CORPORATION May 27, 2013
Solution approach in migration from RTOS to Linux in development of embedded system
2 Copyright © 2013 NTT DATA MSE Corporation
Who am I ?
Hiroto Imamura
NTT DATA MSE CORPRATION Solution Business OHQ Automotive Business Department
Has been working for Linux system development of mobile phone, and provided professional works in various technical areas such as performance optimization, security, architecture design, and system debugging.
Recently working as a consultant in Linux system
development for IVI system utilizing the expertise.
3 Copyright © 2013 NTT DATA MSE Corporation
Changes in circumstances surrounding an automotive area
ITS Smartphone Use
2009 2013 2005 2001 1997
Internal network External network Application Service
Year
Software LOCS
1M
2M
3M
4M
5M
Cloud data Use
Standardization of in Vehicle network
Explosion of software steps by additional functionalities from market needs
4 Copyright © 2013 NTT DATA MSE Corporation
Less cost of common area
Platform
High-value Area
Commoditization area
Platform
Commoditization area
Co
mm
on
Ch
ara
cte
risti
c
Co
mm
on
Ch
ara
cte
risti
c
Growing necessity of use of Linux in automotive industry
Linux
High-value Area
Shift to high-value added development
To high-value development
Base platform for high-value area (Network, Web system)
5 Copyright © 2013 NTT DATA MSE Corporation
Tools and Framework Speed of evolution
Make good use of Linux
6 Copyright © 2013 NTT DATA MSE Corporation
Cloud data Use Smartphone Use
Intelligent Transport System
weather information service
driving information system
Engine/Gear/Brake
ECU Information
Infotainment
Meter
Audio/Video
Steering wheel/Mirror/Battery
Network connection of Automotive systems
7 Copyright © 2013 NTT DATA MSE Corporation
Item RTOS Linux
Execution elements Task Process/Thread
Priority/Scheduler Static Dynamic/TSS
Memory Manager Linear Space MMU
Versatility System specific General purpose
License Proprietary Free
Middleware Additional Included
Application Development Need to develop libraries and framework
Can use variety of libraries and framework
BSP development and porting
Developers prepare Chip vendor prepare
Differences between RTOS and Linux
8 Copyright © 2013 NTT DATA MSE Corporation
Supposed challenges in migration to Linux
Requirement Design
Challenges in migration from RTOS to Linux in development of embedded system
How to realize secure
system?
How to integrate large scale software?
Way of performance enhancement
Coding Evaluation
Testing
Design to realize target performance
within limited resource.
Efficient debug method to solve problems of
freeze/reset/optimization etc.
9 Copyright © 2013 NTT DATA MSE Corporation
Need solutions to migrate from RTOS to Linux
Solution
RTOS → Linux Many challenges !
Various open source software,
tools… What do I choose?
How do I use?
System architectural design,
system debug… Very difficult !
10 Copyright © 2013 NTT DATA MSE Corporation
Suggestion to automotive area
Theme Description
Architectural design
Architectural design in development using embedded Linux. (Priority Design, Memory Usage Design)
Efficient debug method
Critical problem solving method in evaluation phase in development using embedded Linux.(RAM Dump mechanism, Process Tracing and Profiling)
Boot time optimization
Approach method to boot time optimization.(Profiling, Prelinking, Lazy Loading)
Software build
management
Large scale software build management in functionally distributed development.
Security Method to realize secure system that guard resources using embedded Linux.
11 Copyright © 2013 NTT DATA MSE Corporation
Architectural design - challenge
Display
Music Player Navigation
スレッド thread
thread
スレッド thread
Display
Music Player Navigation
スレッド thread
thread
スレッド thread
Priority
Memory
Need appropriate architectural design for Linux to avoid unintentional behavior
Unintentional process execution
Out Of Memory
static priority B > C dynamic priority C > B
Want navigation process to execute…
dynamic prio:119 static prio:117
dynamic prio:120 static prio:116
dynamic prio:120 static prio:117
Music Player Process suddenly
stopped…
Out Of Memory
GPS Data Obtain GPS Data Obtain
12 Copyright © 2013 NTT DATA MSE Corporation
Architectural design - approach
Quality of architectural design leads to product satisfaction and cost down of development
performance evaluation
functional design
architectural design
functional evaluation
system evaluation
priority memory
memory evaluation
Dynamic Memory Solutions
- Memory Leak Detection
- Memory usage measurement tool
Memory Usage Design
- Memory layout
- Lifecycle of memory block
- Resident memory to Non-resident memory
Priority Design
- Thread division and priority by response time of procedure.
- Assign priority procedure into interrupt handler.
- Design evaluation using prototype.
13 Copyright © 2013 NTT DATA MSE Corporation
Efficient debug method - challenge
Reset
Freeze
RAM knows everything
Boot time 30 sec
Response time for user operation 1.2 sec
Lack of frame during video play
Need efficient debugging method for critical problem solving
Freeze…
Reset/freeze
Process’s behavior
System executes, but…
14 Copyright © 2013 NTT DATA MSE Corporation
Store resister set data of bad process and additional info.
Efficient debug method - approach
ftrace bootchart
Reset/Freeze
Process’s behavior
Visualizing system behavior makes efficient problem analysis
System Reboot
RAM Dump to SD or USB
reset
RAM dump obtain (Target)
Dump data analysis
Address conversion
Via SD/USB
Kernel panic Freeze Process defect
Analyze linear address space by address conversion.
Address space conversion and data formatting.
Process Tracing and Profiling
RAM Dump mechanism
freeze
RAM dump obtain (PC)
15 Copyright © 2013 NTT DATA MSE Corporation
Boot time optimization - challenge
Boot
Kernel boot Application Start
Dynamic Library Loading
Driver D Set up -Searching devices
Memory Initialize
Setting A
Setting B
Driver C Set up
Driver B Set up -Searching devices
Search unexisting devices
Loading time of Libraries
Ex) Show up back monitor
Driver A Set up -Searching devices -Initialization
Boot
Kernel boot
Application Start
Memory initialize
Setting A
Setting B
Driver C Set up
Versatility of Linux makes unnecessary procedure
RTOS
Linux
Ex) Show up back monitor
Large system size makes long initializing time
Driver A Set up
16 Copyright © 2013 NTT DATA MSE Corporation
Evaluation
System tuning
System profiling Kernel quiet
Reconfiguration
Shrinking Kernel size
Change order of Initialization
+
Boot time optimization - approach
① System profiling and tuning. ② Delete unnecessary procedure. ③ Reducing library loading time before application start.
Prelinking
Lazy loading
Analysis bottle neck before starting target application, and improve
②
③
+
+
+
+
+…
①
17 Copyright © 2013 NTT DATA MSE Corporation
10000ks 20000ks 30000ks
RTOS system
Linux system
Annual developed software steps in RTOS and Linux (our experience)
Collapsed software development
Failure rate : 89%
Check in Release
Manual Build
Software build management - challenge
More than 3times of RTOS system
Too large to analyze integration failure
Miscommunication Mistake in confirmation
Mistake of check in
Mistake in SCM tool operation
A company developers
Waterfall type distributed development
C company developers
B company developers
A company developers
Waterfall type distributed development
C company developers
B company developers
A company developers
Waterfall type distributed development
C company developers
B company developers
18 Copyright © 2013 NTT DATA MSE Corporation
Build Full-time Team
Full automatic build
Analysis of build result for each pattern
Automatic Smoke test
Build Team
Failure rate : 0.5%
Improved software integration process makes efficient large scale software development
Software build management - approach
Run automatically several build pattern, and specify trouble module.
Pick up test case considering requirement and run automatically.
Feedback of trouble
At build error, recovery build ran. Checked results and put trouble module out of mainstream.
A company developers
Waterfall type distributed development
C company developers
B company developers
A company developers
Waterfall type distributed development
C company developers
B company developers
A company developers
Waterfall type distributed development
C company developers
B company developers
When trouble in integration - Feedback information of error, and avoid developer to make mistake. - Make recovery build not to stop development.
19 Copyright © 2013 NTT DATA MSE Corporation
Administrator is not controlled by DAC. Access request
Resources
administrator
owner
other
Linux kernel
Discretionary Access Control
Owner
Read/Write permitted
The Others
Read/Write prohibited
Accessible
Importance of security is growing as automotive is connected to open network
- Owner set Read/Write/Execute permission to files - Owners’ access control is not applied to administrator - Administrator can access to any resource to guard
Personal information
Frame Number
Vehicle Identification Number
Access request
Access request
Security control by normal access control of Linux (Discretionary Access Control)
Security - challenge
Access permitted
Access denied
20 Copyright © 2013 NTT DATA MSE Corporation
Mandatory Access Control(MAC)
Linux kernel
DAC
policy judgment
MAC is effective for security control of resources
- Define access policy. - Access policy is judged at each access request. - Administrator’s access is under control of MAC.
Access denied
Security control by Mandatory Access Control
Security - approach
Access request
Access request
Access request
Access denied
Access permitted
Resources
Personal information
Frame Number
Vehicle Identification Number
administrator
owner
other
21 Copyright © 2013 NTT DATA MSE Corporation
Automotive-SPICE for Linux/OSS
Specification
Design
requirements Linux
2.4
Linux 2.6 Version UP
Pilot project Product development
Manufacture
System Test
Software Test
Ve
rifi
ca
tio
n
Linux 2.4
Display
Sound
Telephony
Linux 2.6
Linux 2.6
Porting
・Porting Guide ・API differential information
SPICE
22 Copyright © 2013 NTT DATA MSE Corporation
Conclusion
Linux can be platform for creating service
Copyright © 2011 NTT DATA Corporation
Copyright © 2013 NTT DATA MSE Corporation