Top Banner
19

Embedding Linux For An Automotive Environment

May 11, 2015

Download

Technology

FSCONS

Running Linux on an embedded node in the automotive environment adds a number of new challenges that have to be addressed. One of the problems we have been working on is start-up times. We have trimmed the start-up time of the Linux kernel in less than 0.2 seconds on low end hardware. This presentation will look into and discuss some of the trade-offs we did to get the system starting up quicker on a limited hardware.

In an automotive environment many systems have to have there communication up within factions of a second, as the car get more complex more CPU power is needed in many different places. Traditional automotive solutions have been using two CPU’s on each node one small quick starting to handle the communication and one for the applications. If only one CPU can get the main applications starting quick enough that can make the hardware both simpler and cheaper.

About Mecel
Mecel is a systems and software development company with more than 25 years of experience in developing solutions for the automotive industry. We specialize in in-car communication technologies, user interface development and consumer device interaction.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Embedding Linux For An Automotive Environment
Page 2: Embedding Linux For An Automotive Environment

page 2 6 November, 2008Name of Presentation

Embedding Linux For An Automotive Environment

Who is I, Anders Arnholm, What is Mecel

What differs an embedded system to a conventional desktop

What differs automotive from other embedded systems

Some example automotive solutions

Kernel start up optimizations, an example

Don’t forget to ask

Page 3: Embedding Linux For An Automotive Environment

page 3 6 November, 2008Name of Presentation

Me, Myself and I

Page 4: Embedding Linux For An Automotive Environment

page 4 6 November, 2008Name of Presentation

Mecel

Page 5: Embedding Linux For An Automotive Environment

page 5 6 November, 2008Name of Presentation

Embedded vs Desktop

What is an embedded system

How does embedded differ

Some words on requirements for Embedded and real-time computing

Page 6: Embedding Linux For An Automotive Environment

page 6 6 November, 2008Name of Presentation

Embedded system

An embedded system is a computer system designed to perform one or a few dedicated functions often with real-time computing constraints. It is embedded as part of a complete device often including hardware and mechanical parts. By contrast, a general-purpose computer, such as a personal computer (PC), is designed to be flexible and to meet a wide range of end-user needs. Embedded systems control many devices in common use today.

From Wikipedia, the free encyclopedia

Page 7: Embedding Linux For An Automotive Environment

page 7 6 November, 2008Name of Presentation

Few functions, Similar/Same Hardware

Solves one or a few problems

Mobile phone, smart phones moves into general computing

GPS Navigator

Engine Control Module

Hardware and Software one bundle

Can test on all hardware

Can test all software configurations

Expected to always work

Page 8: Embedding Linux For An Automotive Environment

page 8 6 November, 2008Name of Presentation

Real Time Myth? Or Fact?

Real time Real-time computing, have a fixed deadline. An event in the

system need to have an answer within a fixed time. The idea is that the result must arrive in time or the result is invalid. This have to happened regardless of system load

Often one know it’s a real time constraint but not the real limit

Many system run worst case scenario all the time Jitter problems

Jitter are small variations of a periodic signal. Many embedded systems work on tasks where the jitter have big effects on the result. Often the results of jitter can be bigger than the real time needs

Effects audio Communications networks and busses

Page 9: Embedding Linux For An Automotive Environment

page 9 6 November, 2008Name of Presentation

Automotive vs Embedded

The automotive industry designs, develops, manufactures, markets, and sells motor vehicles, and is one of the world's most important economic sectors by revenue.

Usually, Cars, Light Commercial Vehicles, Heavy Commercial Vehicles and Busses.

All cars are an embedded systems Automotive industry are conservative Automotive industry are regulated Electronic Control Unit (ECU)

Page 10: Embedding Linux For An Automotive Environment

page 10 6 November, 2008Name of Presentation

Example System, Gauge Cluster

Main CPU Freescale i.MX51 600 MHzCortex-A8 + Linux

GPU

Renesas V850 + embedded system for communication

Media Oriented Systems Transport (MOST)Connecting to mediaplayer to show some information for the driver in the cluster and hud display.

CANInput for car information such as speed, RPM, etc

Local Interconnect Network (LIN) To connect with the physical keys for user interaction such as button on the steering wheel.

Page 11: Embedding Linux For An Automotive Environment

page 11 6 November, 2008Name of Presentation

Example System, Communications node

Automotive communications busses are limited

Either slow or expensive

All systems use a mix of busses

Node connected to communications busses, and transfers messages mostly to and from the HMI for the driver.

AutoSAR with a small real time OS

Page 12: Embedding Linux For An Automotive Environment

page 12 6 November, 2008Name of Presentation

Zodiac Infotainment platform

2009 Demo platform

Based on Genivi IVI – Russellville

Using Mecel Populus

Using Mecel Betula

Youtube video player

Internet radio

Podcast support

Speech recognition

Page 13: Embedding Linux For An Automotive Environment

page 13 6 November, 2008Name of Presentation

Demo - Autonomy

CPU: Freescale (PowerPC) - MPC5121e

128 Mb RAM

64 MB Flash

Touch screen

Bluetooth

GPS

Can interface

Page 14: Embedding Linux For An Automotive Environment

page 14 6 November, 2008Name of Presentation

Embedded solutions for Automotive

AUTOSAR

Linux

Genivi Alliance – Delphi is Founding and Charter member

LTIB – Linux Target Image Builder, Used by Freescale

Buildroot – Also commonly used

Windows Embedded Automotive

QNX

Custom software

Page 15: Embedding Linux For An Automotive Environment

page 15 6 November, 2008Name of Presentation

Optimizing Linux start-up time

Focus on kernel start up

We like to have a one cpu solution

For CAN communication start up time critical target < 100 ms

Low end system

OMAP OSK5912

ARM9 – 192 Mhz

32 Mb NOR Flash

32 Mb RAM

Page 16: Embedding Linux For An Automotive Environment

page 16 6 November, 2008Name of Presentation

Optimize the kernel

Quiet output

Pre-calculate bogomips

Remove Legacy PTY

Remove Hotplug

Remove MTD

Remove Init

Select filesystem

Page 17: Embedding Linux For An Automotive Environment

page 17 6 November, 2008Name of Presentation

Flash Filesystems

JFFS2 Compressed filesystem Standard fs for flash drives Supports NAND flash devices

Cramfs Compressed filesystem Can be used without decompression Linear Cramfs support application XIP

AXFS Compressed filesystem Supports XIP Read only

Page 18: Embedding Linux For An Automotive Environment

page 18 6 November, 2008Name of Presentation

Execute in Place

Don’t copy the code into ram memory

Optimize code for speed not size

Flash slower that ram

For applications need special filesystem, Linear CRAMFS or AXFS

Read only FS

Page 19: Embedding Linux For An Automotive Environment

page 19 6 November, 2008Name of Presentation

Boot times

CongurationBefore shell

is startedAfter shell is

startedShell start

time

Unoptimized with JFFS2

5.428 100% 6.207 100% 0.779

Optimized with JFFS2

2.771 51% 2.964 47% 0.193

Optimized with Cramfs

2.627 48% 2.814 45% 0.187

Optimized with AXFS

1.451 27% 1.576 25% 0.125

Optimized XIP with AXFS

0.189 3% 0.360 6% 0.171