from rtos to linux · 2017-11-07 · serious about softwareserious about software why linux, from...
TRANSCRIPT
![Page 1: From RTOS to Linux · 2017-11-07 · Serious About SoftwareSERIOUS ABOUT SOFTWARE Why Linux, from an RTOS? > You will get an increasing amount of control and choice over practically](https://reader034.vdocuments.site/reader034/viewer/2022042115/5e91c389da9dfe74136f9bcd/html5/thumbnails/1.jpg)
Automotive Linux Summit
From RTOS to Linux
![Page 2: From RTOS to Linux · 2017-11-07 · Serious About SoftwareSERIOUS ABOUT SOFTWARE Why Linux, from an RTOS? > You will get an increasing amount of control and choice over practically](https://reader034.vdocuments.site/reader034/viewer/2022042115/5e91c389da9dfe74136f9bcd/html5/thumbnails/2.jpg)
Serious About Software SERIOUS ABOUT SOFTWARE
> The requirements of your embedded system are growing rapidly, and many of them are not truly real-time.
Why from an RTOS to Linux?
![Page 3: From RTOS to Linux · 2017-11-07 · Serious About SoftwareSERIOUS ABOUT SOFTWARE Why Linux, from an RTOS? > You will get an increasing amount of control and choice over practically](https://reader034.vdocuments.site/reader034/viewer/2022042115/5e91c389da9dfe74136f9bcd/html5/thumbnails/3.jpg)
Serious About Software SERIOUS ABOUT SOFTWARE
> You need to support complex applications with requirements for network and peripheral connectivity (bluetooth, wi-fi, usb...)
Why from an RTOS to Linux?
![Page 4: From RTOS to Linux · 2017-11-07 · Serious About SoftwareSERIOUS ABOUT SOFTWARE Why Linux, from an RTOS? > You will get an increasing amount of control and choice over practically](https://reader034.vdocuments.site/reader034/viewer/2022042115/5e91c389da9dfe74136f9bcd/html5/thumbnails/4.jpg)
Serious About Software SERIOUS ABOUT SOFTWARE
Why Linux, from an RTOS?
> You will get an increasing amount of control and choice over practically everything, including
– operating system
– toolchain and programming languages
– middleware
– application frameworks.
![Page 5: From RTOS to Linux · 2017-11-07 · Serious About SoftwareSERIOUS ABOUT SOFTWARE Why Linux, from an RTOS? > You will get an increasing amount of control and choice over practically](https://reader034.vdocuments.site/reader034/viewer/2022042115/5e91c389da9dfe74136f9bcd/html5/thumbnails/5.jpg)
Serious About Software SERIOUS ABOUT SOFTWARE
Why Linux?
> No need to reinvent the wheel, you can reuse
– existing hardware drivers
– existing libraries
– existing tools and applications.
> Some of these are available as industry-standard configurations, like GENIVI.
![Page 6: From RTOS to Linux · 2017-11-07 · Serious About SoftwareSERIOUS ABOUT SOFTWARE Why Linux, from an RTOS? > You will get an increasing amount of control and choice over practically](https://reader034.vdocuments.site/reader034/viewer/2022042115/5e91c389da9dfe74136f9bcd/html5/thumbnails/6.jpg)
Serious About Software SERIOUS ABOUT SOFTWARE
Reuse wisely!
> The amount of choice can be staggering, picking the right middleware and libraries requires time and analysis.
> It's important to be aware of the various licensing options of existing components.
![Page 7: From RTOS to Linux · 2017-11-07 · Serious About SoftwareSERIOUS ABOUT SOFTWARE Why Linux, from an RTOS? > You will get an increasing amount of control and choice over practically](https://reader034.vdocuments.site/reader034/viewer/2022042115/5e91c389da9dfe74136f9bcd/html5/thumbnails/7.jpg)
Serious About Software SERIOUS ABOUT SOFTWARE
Caveats of Linux
> Linux doesn't magically make your hardware do its own bringup.
> Linux doesn't magically make your board support package work.
> Linux doesn't magically make your BSP optimized.
![Page 8: From RTOS to Linux · 2017-11-07 · Serious About SoftwareSERIOUS ABOUT SOFTWARE Why Linux, from an RTOS? > You will get an increasing amount of control and choice over practically](https://reader034.vdocuments.site/reader034/viewer/2022042115/5e91c389da9dfe74136f9bcd/html5/thumbnails/8.jpg)
Serious About Software SERIOUS ABOUT SOFTWARE
Caveats of Linux
> The Linux distributions are different, be aware of packaging differences, init/upstart/systemd differences, choose a target distribution, and choose wisely.
![Page 9: From RTOS to Linux · 2017-11-07 · Serious About SoftwareSERIOUS ABOUT SOFTWARE Why Linux, from an RTOS? > You will get an increasing amount of control and choice over practically](https://reader034.vdocuments.site/reader034/viewer/2022042115/5e91c389da9dfe74136f9bcd/html5/thumbnails/9.jpg)
Serious About Software SERIOUS ABOUT SOFTWARE
Caveats of Linux
> Hardware-accelerated graphics require BSP work and often depend on closed-source components.
> Hardware-accelerated video requires BSP work, pipeline optimization and often depends on closed-source components.
![Page 10: From RTOS to Linux · 2017-11-07 · Serious About SoftwareSERIOUS ABOUT SOFTWARE Why Linux, from an RTOS? > You will get an increasing amount of control and choice over practically](https://reader034.vdocuments.site/reader034/viewer/2022042115/5e91c389da9dfe74136f9bcd/html5/thumbnails/10.jpg)
Serious About Software SERIOUS ABOUT SOFTWARE
When?
> When developing with an RTOS starts feeling painful,
– having to reinvent wheels that already exist for Linux.
– missing deadlines due to sheer complexity of such reinvented wheels.
– you have MMU-equipped hardware that is capable of running Linux.
![Page 11: From RTOS to Linux · 2017-11-07 · Serious About SoftwareSERIOUS ABOUT SOFTWARE Why Linux, from an RTOS? > You will get an increasing amount of control and choice over practically](https://reader034.vdocuments.site/reader034/viewer/2022042115/5e91c389da9dfe74136f9bcd/html5/thumbnails/11.jpg)
Serious About Software SERIOUS ABOUT SOFTWARE
When not?
> If you're running a strictly-real-time system, Linux may not be any easier.
> If you don't have an MMU, Linux might not be a good choice.
> Even if you can run Linux on a toaster, perhaps you shouldn't.
![Page 12: From RTOS to Linux · 2017-11-07 · Serious About SoftwareSERIOUS ABOUT SOFTWARE Why Linux, from an RTOS? > You will get an increasing amount of control and choice over practically](https://reader034.vdocuments.site/reader034/viewer/2022042115/5e91c389da9dfe74136f9bcd/html5/thumbnails/12.jpg)
Serious About Software SERIOUS ABOUT SOFTWARE
How?
> One reasonable option is doing a gradual port.
– most of the architecture of the system remains as is, and is ported as directly as possible.
> Another, perhaps more time-consuming option (at least initially) is to fix the architecture first.
– time-to-market will be longer initially.
![Page 13: From RTOS to Linux · 2017-11-07 · Serious About SoftwareSERIOUS ABOUT SOFTWARE Why Linux, from an RTOS? > You will get an increasing amount of control and choice over practically](https://reader034.vdocuments.site/reader034/viewer/2022042115/5e91c389da9dfe74136f9bcd/html5/thumbnails/13.jpg)
Serious About Software SERIOUS ABOUT SOFTWARE
"Fix the architecture"?
> Many legacy RTOS systems are so bare-bones that the middleware, or even applications, do memory/resource management and scheduling.
> Legacy systems also often do these things in an unfortunately system-dependent fashion.
![Page 14: From RTOS to Linux · 2017-11-07 · Serious About SoftwareSERIOUS ABOUT SOFTWARE Why Linux, from an RTOS? > You will get an increasing amount of control and choice over practically](https://reader034.vdocuments.site/reader034/viewer/2022042115/5e91c389da9dfe74136f9bcd/html5/thumbnails/14.jpg)
Serious About Software SERIOUS ABOUT SOFTWARE
"Fix the architecture"?
> Fixing the system dependencies is the first thing to do.
> Allowing an operating system to do the resource management and scheduling is the second
![Page 15: From RTOS to Linux · 2017-11-07 · Serious About SoftwareSERIOUS ABOUT SOFTWARE Why Linux, from an RTOS? > You will get an increasing amount of control and choice over practically](https://reader034.vdocuments.site/reader034/viewer/2022042115/5e91c389da9dfe74136f9bcd/html5/thumbnails/15.jpg)
Serious About Software SERIOUS ABOUT SOFTWARE
Ok, what about the gradual port?
> Don't change the module division and architecture of your RTOS application stack in the first phase.
> Port the application stack as directly as possible.
> Optimize when the basic port is done, change the architecture gradually to be more suitable for a "full OS" environment.
![Page 16: From RTOS to Linux · 2017-11-07 · Serious About SoftwareSERIOUS ABOUT SOFTWARE Why Linux, from an RTOS? > You will get an increasing amount of control and choice over practically](https://reader034.vdocuments.site/reader034/viewer/2022042115/5e91c389da9dfe74136f9bcd/html5/thumbnails/16.jpg)
Serious About Software SERIOUS ABOUT SOFTWARE
What about my RTOS?
> Don't "burn the platform".
> Porting things to Linux can be very easy. Maintaining architectural compatibility with a legacy system can be very hard.
![Page 17: From RTOS to Linux · 2017-11-07 · Serious About SoftwareSERIOUS ABOUT SOFTWARE Why Linux, from an RTOS? > You will get an increasing amount of control and choice over practically](https://reader034.vdocuments.site/reader034/viewer/2022042115/5e91c389da9dfe74136f9bcd/html5/thumbnails/17.jpg)
Serious About Software SERIOUS ABOUT SOFTWARE
Existing competences
> Driver/BSP competence transfers well, although the driver model takes some getting used to.
> Domain knowledge transfers well.
![Page 18: From RTOS to Linux · 2017-11-07 · Serious About SoftwareSERIOUS ABOUT SOFTWARE Why Linux, from an RTOS? > You will get an increasing amount of control and choice over practically](https://reader034.vdocuments.site/reader034/viewer/2022042115/5e91c389da9dfe74136f9bcd/html5/thumbnails/18.jpg)
Serious About Software SERIOUS ABOUT SOFTWARE
Existing competences
> Applications and middleware may require adopting a new thought model.
> The design approach is different when going from strict real-time to general-purpose programming.
![Page 19: From RTOS to Linux · 2017-11-07 · Serious About SoftwareSERIOUS ABOUT SOFTWARE Why Linux, from an RTOS? > You will get an increasing amount of control and choice over practically](https://reader034.vdocuments.site/reader034/viewer/2022042115/5e91c389da9dfe74136f9bcd/html5/thumbnails/19.jpg)
Serious About Software SERIOUS ABOUT SOFTWARE
Horror stories...
> We have seen applications "ported" from legacy RTOSes to Linux that consisted of a single binary handling everything in an embedded device, weighing in at 100 megabytes in executable size, doing custom memory management, custom threading and scheduling.
![Page 20: From RTOS to Linux · 2017-11-07 · Serious About SoftwareSERIOUS ABOUT SOFTWARE Why Linux, from an RTOS? > You will get an increasing amount of control and choice over practically](https://reader034.vdocuments.site/reader034/viewer/2022042115/5e91c389da9dfe74136f9bcd/html5/thumbnails/20.jpg)
Serious About Software SERIOUS ABOUT SOFTWARE
...and silver linings
> The aforementioned applications can be made to work for a quick time-to-market port.
> With further development, they can be made sane.
> The end result is an application stack that is easier to develop further and maintain.
![Page 21: From RTOS to Linux · 2017-11-07 · Serious About SoftwareSERIOUS ABOUT SOFTWARE Why Linux, from an RTOS? > You will get an increasing amount of control and choice over practically](https://reader034.vdocuments.site/reader034/viewer/2022042115/5e91c389da9dfe74136f9bcd/html5/thumbnails/21.jpg)
Serious About Software SERIOUS ABOUT SOFTWARE
Conclusions
> Adopting Linux can speed up development, and ease maintenance.
> Linux is not a free lunch.
> Going from an RTOS to Linux may be a one-way journey.
> Often the journey is well worth it.
![Page 22: From RTOS to Linux · 2017-11-07 · Serious About SoftwareSERIOUS ABOUT SOFTWARE Why Linux, from an RTOS? > You will get an increasing amount of control and choice over practically](https://reader034.vdocuments.site/reader034/viewer/2022042115/5e91c389da9dfe74136f9bcd/html5/thumbnails/22.jpg)