Intel® Makers
Intel® Edison, Intel® Joule™, Intel® Curie™, Intel® Galileo
Announcements
Welcome - This is a Peer-to-Peer Forum only. Intel has discontinued these products but you may find support from other customers on this Forum
9881 Discussions

Intel Edison Realtime kernel upgrade

JAlva15
Beginner
1,231 Views

Hello all,

I am looking to provide my Intel Edison of real time kernel.

I have found the great work from FerryT about it here FerryT but it fails in some recipes as the sites are no longer available.

What kernel would you recommend? Dizzy-rt or is there any other newer RT kernel?

What would be the minimum steps to build just the minimum needed for kernel/modules?

Many thanks

0 Kudos
1 Solution
FerryT
Valued Contributor I
265 Views

Hello Jisus,

My dizzy-rt branch https://github.com/htot/meta-intel-edison/tree/dizzy-rt https://github.com/htot/meta-intel-edison/tree/dizzy-rt builds not only a kernel, but also U-Boot and rootfs.

(dizzy is the Yocto version, with kernel 3.10.17-rt, old wiki instructions here: https://github.com/edison-fw/meta-intel-edison/wiki https://github.com/edison-fw/meta-intel-edison/wiki).

You should be able to just flash that (using flashall). Presuming that it downloads and builds - and I haven't built that in a long while. If you build this you really need Ubuntu 14.04 (not later), else it won't build.

As you mention "the dizzy-rt branch (meta-intel-edison) fails in some recipes as the sites are no longer available" we could try to remove those recipes, if you are not using them. But I am afraid java is going to be a problem.

I understand you would prefer to just build the rt-kernel (from here https://github.com/htot/edison-linux/tree/edison-3.10.17-rt GitHub - htot/edison-linux at edison-3.10.17-rt ) and replace the existing. Normally that won't work, because you have kernel modules on the rootfs built for the other kernel (under /lib/modules/..).

But of course, you can build not only the kernel, but also the modules and install the new modules manually on the rootfs side/-by-side with the old ones. That should work. You need a relatively old gcc to build such old kernel else you'll get many warning and errors and the build won't complete.

Complicating factor: if the kernel doesn't work you can't boot Edison and you need to recover old factory image before you can continue. Probably better idea is to add -rt kernel as extra kernel, and keep the original, until you are sure it boots. And to boot the -rt kernel, interrupt U-Boot, then run the macro start -rt.

My preferred solution, we have newer Sumo version, with recent kernel 4.18.0, new U-Boot, acpi tables for configuring hardware. This actually works very nice, except maybe we dropped a few things (some cloud services don't exist anymore).

The old 3.10.17-rt kernel was not very real time, the last I tried (4.16) worked much better.

In your case, you want to use mraa and upm. Mraa is not yet working with the acpi enabled kernel., so I would suggest non-acpi version of sumo32 (32 bits) and modify to use 4.18.12-rt7 kernel. I can help you with that, it's not that much work.

Basically we need to apply the -rt patch on 4.18.12 and rebase edison kernel patches on top of that and then fix the recipe to use that.

Nice side effect, we have a much newer mraa and upm in sumo, see https://htot.github.io/meta-intel-edison/2.5-Whats-in-the-rootfs-and-the-initramfs.html What's in the rootfs and the initramfs images | Edison

My most up-to-date documentation of sumo32 is here: https://htot.github.io/meta-intel-edison/ https://htot.github.io/meta-intel-edison

 

The bad news: you will be needing java bindings for mraa, and we don't have that currently. I think they are not even supported by mraa at the moment. We have bindings for python, nodejs, C and C++ that I just recently tested with a I2C device and work. So if one of these is an option for you I expect sumo is the way to go.

View solution in original post

1 Reply
FerryT
Valued Contributor I
266 Views

Hello Jisus,

My dizzy-rt branch https://github.com/htot/meta-intel-edison/tree/dizzy-rt https://github.com/htot/meta-intel-edison/tree/dizzy-rt builds not only a kernel, but also U-Boot and rootfs.

(dizzy is the Yocto version, with kernel 3.10.17-rt, old wiki instructions here: https://github.com/edison-fw/meta-intel-edison/wiki https://github.com/edison-fw/meta-intel-edison/wiki).

You should be able to just flash that (using flashall). Presuming that it downloads and builds - and I haven't built that in a long while. If you build this you really need Ubuntu 14.04 (not later), else it won't build.

As you mention "the dizzy-rt branch (meta-intel-edison) fails in some recipes as the sites are no longer available" we could try to remove those recipes, if you are not using them. But I am afraid java is going to be a problem.

I understand you would prefer to just build the rt-kernel (from here https://github.com/htot/edison-linux/tree/edison-3.10.17-rt GitHub - htot/edison-linux at edison-3.10.17-rt ) and replace the existing. Normally that won't work, because you have kernel modules on the rootfs built for the other kernel (under /lib/modules/..).

But of course, you can build not only the kernel, but also the modules and install the new modules manually on the rootfs side/-by-side with the old ones. That should work. You need a relatively old gcc to build such old kernel else you'll get many warning and errors and the build won't complete.

Complicating factor: if the kernel doesn't work you can't boot Edison and you need to recover old factory image before you can continue. Probably better idea is to add -rt kernel as extra kernel, and keep the original, until you are sure it boots. And to boot the -rt kernel, interrupt U-Boot, then run the macro start -rt.

My preferred solution, we have newer Sumo version, with recent kernel 4.18.0, new U-Boot, acpi tables for configuring hardware. This actually works very nice, except maybe we dropped a few things (some cloud services don't exist anymore).

The old 3.10.17-rt kernel was not very real time, the last I tried (4.16) worked much better.

In your case, you want to use mraa and upm. Mraa is not yet working with the acpi enabled kernel., so I would suggest non-acpi version of sumo32 (32 bits) and modify to use 4.18.12-rt7 kernel. I can help you with that, it's not that much work.

Basically we need to apply the -rt patch on 4.18.12 and rebase edison kernel patches on top of that and then fix the recipe to use that.

Nice side effect, we have a much newer mraa and upm in sumo, see https://htot.github.io/meta-intel-edison/2.5-Whats-in-the-rootfs-and-the-initramfs.html What's in the rootfs and the initramfs images | Edison

My most up-to-date documentation of sumo32 is here: https://htot.github.io/meta-intel-edison/ https://htot.github.io/meta-intel-edison

 

The bad news: you will be needing java bindings for mraa, and we don't have that currently. I think they are not even supported by mraa at the moment. We have bindings for python, nodejs, C and C++ that I just recently tested with a I2C device and work. So if one of these is an option for you I expect sumo is the way to go.

Reply