1 Reply Latest reply on Oct 10, 2018 7:26 AM by FerryT

    Intel Edison Realtime kernel upgrade

    Jisus

      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 Edison images that actually build (including real time kernel) - solved

       

      My project uses a GPS and two IMUs connected to the I2C bus. Is uses JAVA and UPM, MRAA libraries. Nothing more.

       

      Currently the performance is not great as the IMU readings at 500Hz looses some samples from time to time. This is the reason why I would like to test a real time kernel.

      My intention and will is to just replace the kernel and modules of my current image. I do not need anything else but to upgrade my kernel/modules to a RT one. I would do it on top of a real edison if possible.

       

      My previous experiences with bitbake and yocto build system have been very annoying and I would love to stay away from it if possible. So if kernel and things-around can be compiled /installed the old-make-way, it would be great.

       

      I have tried to build the dizzy-rt branch (meta-intel-edison) from 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

        • 1. Re: Intel Edison Realtime kernel upgrade
          FerryT

          Hello Jisus,

           

          My dizzy-rt branch 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).

          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 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 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

          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.