QNX RTOS dual boot linux on embedded car infotainment system

Well the title pretty much says it all. I studied embedded systems and programming in college ( Computer Engineer), so I’m fairly comfortable with this topic.

I have a infinti G37 car with a infotainment system which has navigation, mp3 storage on a 9.3gb partition ( os is on a 18gb partition ), access to ac/heater/mileage/ etc, as well as the ability to read cd’s (audio or mp3) and Compact Flash cards. I want to image the drive for backup, buy a new drive, verify the new image on the new drive works, then make a new partition and install linux on it. That sounds fairly straight forward, the only issue is data entry ( I’ll need a keyboard ) and knowing the hardware it is running on. I’m fairly certain the hardware it uses will be able to run windows.

The end product would be to have a linux os that is dual booted with the qnx os and the ability to use the touchscreen 7 inch display as the input/output.

What do you guys think about this? How hard would it be to accomplish this and can you point me in the right direction, without knowing anything about the hardware it is running on?

Thanks :slight_smile:

This sounds quite ambitious. My first question is, what processor is being used? My second question is, why ask about this on a QNX board? It sounds like you want to keep the QNX partition static, and add your own linux partition and/or Windows partition. Dual boot has to do with the boot loader, not QNX, and QNX won’t interfere if you boot off of another partition. Since there probably is no keyboard, the boot loader will need to detect some kind of hardware switch to tell it which partition to boot.

I don’t know what you want to run on the Linux system, but it might be easier to port it to QNX and load it in yourself. Of course that would mean poking into the infotainment system user controls.

I was talking with one of my programmer friends today and I think I’ve decided on a different approach. As you said, I could port a program or utility over to QNX instead of dual booting, which makes more sense anyway. I’m assuming this nav/infotainment system is actually a run-level above the QNX gui, that or its a program loaded on startup. If I could just get access to the standard QNX gui I think I could accomplish most of what I want to do. Where would I look for this information as to what the QNX OS is doing on boot? Is there a config file or some script I can look at and edit to get it to do something different?

The only big roadblock I think I may encounter is where the QNX OS is installed. If the OS is installed on the HD, then this should be simple. However if it is installed on a embedded flash memory chip, it may make this next to impossible.

I’m assuming this nav/infotainment system is actually a run-level above the QNX gui,

That is most likely the case.

that or its a program loaded on startup.

Probably also true.

If I could just get access to the standard QNX gui I think I could accomplish most of what I want to do.

The GUI, Photon is well documented, although a very customized version if often supplied with embedded systems like yours. It makes sense to download the QNX hosted development system (which by default runs Photon) and get a feel for how it works.

Where would I look for this information as to what the QNX OS is doing on boot?

Well to find this, you would have to break into the system somehow, and the manufacturers might not make that easy. You might have to remove the media, hard drive or flash, and read it on a development machine. There’s not good reason for an embedded system to be nice about something like this.

Assuming you find a file system, look for a file /etc/rc.d/rc.sysinit. It is possible that other files in this directory will be helpful, especially rc.local.

I’m not sure, but I suspect there are parameters in the boot file that will cause booting from another script, or even under program control, so it might be hard to figure out how it is done. It is even possible for all load modules to be loaded in the boot file. The boot file constitutes a read only file system itself. And if that is not enough, it is possible to have files in the boot file, which are on a flash, to be executed in place. This all helps the developer to squeeze into as small a memory space (read as cheaper) as is possible.

Is there a config file or some script I can look at and edit to get it to do something different?

Maybe, see above.

The only big roadblock I think I may encounter is where the QNX OS is installed. If the OS is installed on the HD, then this should be simple. However if it is installed on a embedded flash memory chip, it may make this next to impossible.

That’s right. You would have to be able to read the flash. Even with a hard drive, it would be possible for there to be just one load file, and nothing else on the drive, but if they go to the trouble of having a drive, this is probably not the case.

Here’s a simple test that might give you a hint of whether you have flash or hard drive. See how long it takes from car power on, to system working. The shorter the time it takes, the more likely it is flash. Unlike some uhhh OS’s, it is possible to configure QNX to pretty much load and go, no looking around for new hardware and all that. This can take a couple of seconds. But a hard drive has to spin up, which is not so quick.

I just want to repeat myself as a caution, this is quite an ambitious project. The first step would be to get a feel for QNX, which fortunately you can download for free to play with.

BTW, how is it that you know that QNX is the OS? Is there something at startup that tells you?

Thank you for the very detailed reply. The car definitely has a HD, but as far as booting off an HD or booting off a flash, I’m not sure. When I turn my car on, it goes from the infiniti logo to sitting at the screen waiting for user input in about 5 seconds. In that time period I hear the HD spin up.

I’m not 100% sure it uses QNX, but the previous year G35 model of my car used QNX and its very likely they stuck with it as they would already have the dev. kits purchased. QNX is a great RTOS, so I see no reason why they would have switched away from it.

I will definitely post some of the files that I retrieve from the HD once I have the time to take it out of the car. I plan on taking the HD out and then putting it back in my car after I’ve successfully retrieved the image of the HD. That way I can fiddle with the image for a long time and I can give you guys some of the examples if I run into a spot I’m unsure about.

I will boot up QNX in a virtual machine this week and start playing around with it. Btw, I think it is likely the fileysystem on my car’s HD is QNX-4, however, if it is ETFS, will that make reading it much harder?

Thanks again for your help!

If the hard drive you retrieve is fairly standard, I’d highly recommend you get something equivalent to experiment with and not muck with the original, at least until you are sure your modifications will not screw up what currently works.

If the hard drive is used in the usual way, it won’t matter if the device boots off of a ROM.
If there is a hard drive, it is probably involved with booting, and so you should be able to
interject your own program.
Assuming the OS is QNX, it is rather likely that the file system will be QNX-4. I don’t think etfs works on a hard drive anyway.

One thing you will probably be SOL about will be any non-standard hardware the system uses. That’s because the developer is unlikely to respond to questions, when they probably will be quite alarmed that you’ve hacked in at all. There are exceptions to this attitude I know.