Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

Anyone want to get the source code for the Linux (etc.) in your car?

This site may earn commission on affiliate links.
Other than mild curiosity, I don't think there is anything here of interest. It's not like a car is a $50 network hub you can hack. I would not drive nor want to ride in a car with user modified software. I'm sure there's just an embedded linux thing with various CAN and other bus interfaces and some user level software to manage the display. Probably all stuff you can just download except for the user level stuff. Yawn.
 
It opens up the car to many user-modifications which otherwise would not be possible.

drees, I'm not really interested in getting into a big debate here, but you are making a lot of assumptions about what one could do with Tesla provided GPLed source code.

As I stated in my previous post, Tesla is only obligated to provide the components that are licensed under GPL and any modifications they made to those components. So at most, I suspect you may get the source code for the kernel used to run the touch-screen display and the tool chain that goes along with it. But none of the actual software that controls the car or provides the user interface would be provided, as it is proprietary software and not required to be licensed under the GPL.

I also hope that Tesla has locked down the hardware/software so that only authorized software digitally signed by Tesla Motors can run on the vehicle. Considering that the vehicle is updated over-the-air, I hope they have very good security in place to prevent hacking or malicious software updates. The last thing I would want is to be driving my vehicle with my family in the car and have some half-wit teenage hacker disable the passenger airbag for the "lulz". So it is unlikely you will be able to install a customized version of the software in any case. See Tivoization - Wikipedia, the free encyclopedia

This open/closed system debate has been beaten to death before, but this is a $100k 4600 lb. motor vehicle, not a few hundred dollar DVR or cell phone. So let's keep the hacking to the fun little non-lethal devices, and instead ask Tesla nicely for an app SDK.
 
Last edited by a moderator:
If we're going to squabble, we might as well use the source article: Tesla CTO Talks Model S, Batteries and In-car Linux | PCWorld

JBS: We wrote most of the software in the car ourselves. All of the screens you see were programmed here, designed here, and we have a whole team of software engineers upstairs implementing that and making it a reality. We are using an operating system that is a version of something called Linux. That is open source, very robust standard, for the display and entertainment. For the control and motor and things like that, we don't have operating systems. They run in a lower level and are actually running C code, so we have engineers upstairs writing in the C programming language, building the control loops from scratch. We write it, we model it, we test it here.

IDGNS: So if the Linux crashes, the car won't go off the road?

JBS: That's a key point. The whole entertainment system, those touchscreens, all of the applications you might load are totally separate from the propulsion of the car. In fact you could, if you had to, turn off the screens in the car while driving and the car still drives just fine. You couldn't see your Google Map, but you could still drive and stop and do everything else.
 
What percentage of people really care about this? They just want their car to work and to enjoy it. As long as Tesla didn't steal code from another company then I'm fine with it. You should feel free to request what you think you have the right to see and see where it goes from there.
 
I don't think anyone here wants to hack it, they just want to know the right to hack it is established. In the immortal words of my then teenage son, "Mom, as long as there are bored teenage boys not old enough to drive, code is gonna get hacked."

I can only imagine what will happen when that code is on the car they're not driving. Oy.
 
I want them to release what's required by the various open source licenses just because I think that's important.

I'm interested in an API to program against, but I'm not likely to pour through the code itself unless I have a problem to solve. I love coding, but I've got to have a problem in mind or it's like reading the dictionary.
 
> JBS: That's a key point. The whole entertainment system, those touchscreens, all of the applications you might load are totally separate from the propulsion of the car. In fact you could, if you had to, turn off the screens in the car while driving and the car still drives just fine. You couldn't see your Google Map, but you could still drive and stop and do everything else. [bonnie1194]

Thank you Bonnie for pulling that up. If I can switch that 17in screen over to my media player without affecting the System in any way, that is good news. Figured as much but never quite sure about those interactive controls derived from touch screens and how they might affect the System.
--
 
I want them to release what's required by the various open source licenses just because I think that's important.

I'm interested in an API to program against, but I'm not likely to pour through the code itself unless I have a problem to solve. I love coding, but I've got to have a problem in mind or it's like reading the dictionary.

I don't think the Linux source will include Tesla's API. There ought to be layers between the Linux level which is subject to any non-Tesla copyright, and the API for custom apps.

It opens up the car to many user-modifications which otherwise would not be possible.

That seems blatantly wrong. The OS itself needs to be protected against modifications. If GPL required the possibility to mess with the OS, then Tesla would need to use something non-GPL.
 
He has no legal right to ask for source until he has received a copy of the software (aka, his car).

I'm a bit surprised at all the people who are defending Tesla. I suspect that most of these people have not written any GPL software themselves. Tesla should know better than to violate software licenses - didn't they ship GPL code with the Roadster as well?

It is Tesla's legal responsibility to provide source for any GPL software shipping in the car and any modifications to said GPL software. If Tesla doesn't like the terms of the license - they are free to use other software instead.
People are defending Tesla because there are a lot more important issues and getting a copy of the source code (which would only include the Linux kernel and kernel modifications, NOT the entire source code for the entire Tesla OS, so it won't actually be very useful for figuring out how to write an application for the Tesla OS) is very, very far down on the list. It seems like an issue being raised just to raise an issue.

As for legal trouble Tesla can get into, I doubt the Linux copyright holders would bear down on Tesla any time soon (they are the only ones who have to legal right to sue Tesla, not any user). The entire GPL legal situation is extremely murky and enforcement is virtually non-existent (see closed source Linux video card drivers for an example).
 
Last edited:
Sorry, the release of a stock Linux 3.0 kernel with 12 lines added, if even that, that call hooks in a private, non-GPL kernel module, as well as the source code to fileutils, coreutils, etc. does nothing to open up the car to "user modifications". It doesn't teach you anything about the car's code. Most importantly, using the GPL'ed kernel and userspace utilities *does not require Tesla to GPL its own code*. Stallman would like that, and for you to believe otherwise, but it's nothing but BS.

This is nothing but ADA-like nuisance behavior. This is where those who don't understand the GPL and the lawsuits typically come out -- the consumer of the product (the car) won't get anything else that he can't get today. Lawsuits and threats against companies that use source code as-is don't do anything to further the industry. I suspect there are people drooling at the mouth to "catch" Tesla here and generate some money for themselves and their lawyers, like the Busybox developers, while doing nothing at all to further the goals of the free software industry.

- - - Updated - - -

(see closed source Linux video card drivers for an example).

This is an example of the misunderstanding behind the requirements of the GPL with relation to these types of things. It is NOT a GPL violation for Linux video card drivers to be closed; the only thing that must be released is code, if any, that is required for the kernel to do anything special for the device. With the kernel in its current state, in almost every case this isn't even needed anymore. Today, you can create a new piece of hardware, write your own proprietary driver for the non-standard bits, and not even need to offer anything but the stock Linux kernel as source.
 
Thanks FlasherZ. Finally someone that understands how GPL applies to a car using the Linux OS.

It is almost certain that the method by which Tesla will allow anyone to integrate "modules" into the entertainment system will have nothing to do with GPL or modifying Linux. They will likely create supported APIs to allow integration of widgets, likely by using a standardized method to do this (e.g. Java sandboxed apps ala Android). I can't see them allowing for customization outside of the entertainment system.
 
It is NOT a GPL violation for Linux video card drivers to be closed; the only thing that must be released is code, if any, that is required for the kernel to do anything special for the device.
Greg Hartman from Novell said "closed source Linux kernel modules" AKA closed source Linux drivers, may be illegal under copyright law because they are derivative works (not tested in court though). Kororaa was accused of violating the GPL by distributing installed closed source video card drivers with the Linux kernel. Tesla seems to fit the same model (they probably have written some custom drivers or included some closed source drivers to work with the hardware in the car).
http://en.wikipedia.org/wiki/Graphics_hardware_and_FOSS

Tesla's OS, like alset mentions, is likely very similar to how Android is structured (as in Linux underneath and something else on top for applications, not necessarily Java) except Android is open source (Tesla's OS is not).
 
Greg Hartman from Novell said [...]
However Greg Hartman is not a legal authority, but "another kernel developer" who "commented".

Personally, I find it a bit difficult to accept the notion that using open source software (Linux) might require a car manufacturer to open source the code accessing the car's special hardware. That also doesn't seem to be "derivative work" except *perhaps* in some abstract technical sense (if written as a kernel module and using some dynamic library or whatever).

To me it would seem to be invading the authoring rights of those who write software on top of Linux. It must be their *freedom* to open source, or not, their own intellectual achievements. It is *their* intellectual work to which *they* have the copyright, not Richard Stallman's. If the above were the case, it would make me hope that GPL, or any other license that limits the freedom of people to exercise their own copyright for their own work, will never rule the world.
 
Last edited:
Tesla seems to fit the same model (they probably have written some custom drivers or included some closed source drivers to work with the hardware in the car).
http://en.wikipedia.org/wiki/Graphics_hardware_and_FOSS
WILD speculation on your part. They are using NVIDIA Tegra chips and so are most likely using NVIDIA's drivers to run the screens, not their own. I don't see them doing anything w/ the infotainment system that would require proprietary drivers.

I would assume that the only mods they've made to GPL software (if any) would be to add hooks for their stuff like FlasherZ and others posted.
 
If I was in Tesla's shoes, I wouldn't care about restricting access to proprietary drivers or the base OS that their software runs on. There's not lot of intellectual property value in drivers these days and they probably haven't made major changes to the OS.

I would care about restricting access to the source code for the various pieces of software that control the car. That's a whole new software platform. The value of that intellectual property is huge.

I would also ensure that the car would only run the versions of the software that I produced and authenticated. So that even if someone got access to the kernel or the full software suite and modified it, the car wouldn't run the modified software. This is a safety issue. You don't want a software-controlled car to run software you haven't tested and blessed.

This kind of security is possible using Linux (GPL2). Tivo does this. The Tivo-modified Linux kernel is still "free" in that anyone can see it, modify it and use it on their own. But a Tivo box is designed so that it will run only Tivo-generated Linux kernels. Note that the GPL3 license was intentionally designed to make this behavior illegal. But Linux is distributed under the GPL2 license and that isn't likely to change.

GPL2 also allows Tesla to withold access to software they wrote that runs on top the Linux kernel.

Bottom line:

1) With GPL2, you can get a copy of the Linux kernel that Tesla uses and even build your own version. But if Tesla has designed their h/w and the rest of their s/w correctly, the car won't run it. And if you somehow manage to crack that protection and your software becomes partially responsible for a fatal accident, you are so your own it won't be funny. Your warranty will be void. If the protection was hard to crack, Tesla's legal liabilities will be zero. You will certainly be sued in civil court. Your insurance company will almost certainly try and declare you in violation of your policy and refuse to cover you. And you'll be lucky if you're not brought up on criminal charges.

2) Tesla is under no obligation to provide you with source code for the application software it wrote that runs on top of the Linux kernel. And that software is the secret sauce that manages the car, engine, battery pack and charging system.

3) If #1 weren't the case, no one in their right mind would use Linux as a base OS for an embedded system where a software bug can kill people.
 
However Greg Hartman is not a legal authority, but "another kernel developer" who "commented".
My only point there was that the legality of it has not been tested in court. The point of my whole comment was that some of the issues discussed here are not 100% clear cut simply because the Linux copyright holders have not been aggressive in enforcing the copyright/GPL provisions. There are other companies that use GPL that are a lot more aggressive.

WILD speculation on your part. They are using NVIDIA Tegra chips and so are most likely using NVIDIA's drivers to run the screens, not their own. I don't see them doing anything w/ the infotainment system that would require proprietary drivers.
That would fall under the latter part of my comment: "included some closed source drivers to work with the hardware in the car". AFAIK the Tegra 3 drivers are not open source and NVIDIA has only release documentation on the 2D part of the engine (for Tegra in general). Anyways, I don't want to drive the thread off-topic. My main point was that given the relatively lax approach the Linux people have taken in terms lawsuits based on the GPL (maybe on purpose so as to not scare away people using it), I find it unlikely Tesla will have one from them anytime soon, so this is not a high priority legal issue at this point.