The Road to Building a real-time (RT) kernel for my favorite OS, Ubuntu 18.04.4

More
28 Mar 2020 20:32 #161833 by clunc
I understand that Ubuntu is a derivative work of sorts of Debian, but it's precisely because stuff is not where I have come to expect to find it that I want to save on that kind of head-banging later by doing some now. I just want it all to be The Same. %^p

Funny about that Ubuntu branding attitude; Ubuntu broke out because Debian seemed too hard-nosed about requirements for what they wanted to include at the time.

It may be that I, really, would be happier with Mint. If so, I'll make everything around here Mint!

Incidentally, no one, certainly no "customers", cares if I'm up and running. :^D So I'm not feeling any heat like so many production LinuxCNC users are.

[Update: I just passed the
sudo make modules_install
step, run instead as
sudo make INSTALL_MOD_STRIP=1 modules_install
just in case symbols needed to be stripped. (I don't know, probably not.)

I actually even started the last step:
sudo make install
but remembered I was doing this on a machine that WAS NOT the target!

I interrupted it and am copying everything back onto the LinuxCNC controller machine to try the final step there. I don't know if the make modules_install corrupted anything on the build machine, but I rebooted it, and was able to remote log back into it.

If it works, it will have a spanking new RT-Preempt kernel--which will be useless with its parport interface...]

Please Log in or Create an account to join the conversation.

More
28 Mar 2020 20:41 - 28 Mar 2020 20:44 #161835 by BeagleBrainz
You can actually do a make deb-pkg from the start and the kernel and modules will be in one package and the headers in another.
Then installing your newly built kernel only requires installing 2 packages via your preferred command line utility.
Apart from some config files being in a different place under /etc there isn’t much difference from one distro to another.
Last edit: 28 Mar 2020 20:44 by BeagleBrainz.

Please Log in or Create an account to join the conversation.

More
28 Mar 2020 20:45 #161836 by PCW

If it works, it will have a spanking new RT-Preempt kernel--which will be useless with its parport interface...]


Maybe not, I would run a latency test before rejecting the results, Preempt-RT can have very good latency on some systems:

freeby.mesanet.com/h97-g3258-preemt-rt.png

Please Log in or Create an account to join the conversation.

More
28 Mar 2020 22:18 #161850 by BeagleBrainz
The OP has gone for the latest 5 series, I tried a couple of 5 series myself and on the hardware at hand the last of the 4 gave better results. Yeah I know the 5 is really just a continuation of the 4.
But that’s pretty good results there, what distro was that with ?

Please Log in or Create an account to join the conversation.

More
28 Mar 2020 23:36 #161870 by clunc
@PCW
I meant "useless" in the sense that RT-Preempt won't work with parallel ports.

@BeagleBrainz
> You can actually do a make deb-pkg from the start ...
I don't understand this; I've only been following the steps in BigJohnT's program, albeit using the Lubuntu instructions with an Ubuntu 5.0.14 kernel and patchfile.

The result? Success (I think).
% uname -a
Linux erstwhile 5.0.14-rt9 #2 SMP [u]PREEMPT RT[/u][b][/b] Sat Mar 28 13:36:43 CDT 2020 x86_64 x86_64 x86_64 GNU/Linux

I'm stuck now, looking for a LinuxCNC 2.8 (might as well?) "package" to install in my system with a real-time kernel.

Of course, no pkg exists for 64-bit Ubuntu 18.04, but initial attempts to add debian and older linux repositories and sudo apt install linux pkgs have failed.

But now, when grandkids ask "Did you ever build a kernel?", I'll be able to answer, "You know? I can't remember..."

Please Log in or Create an account to join the conversation.

More
29 Mar 2020 00:06 #161881 by BeagleBrainz
See this link for
make help
www.kernel.org/doc/makehelp.txt

Sometimes it is a good idea to do a bit of reading rather than just blindly following instructions, you'll learn more.

Now you will have to build Linuxcnc, but before you do that you will have to install all the dependencies to build it, chase up any libs that maybe missing and configure it. Then after all that you'll have to run a latency test to determine whether the current HW\SW combination is suitable.

And you are doing this basically blind.
Whereas if you used the debian wheezy image you'd be ahead by now and have better knowledge and new skills using Linux. All because you couldn't spend 5 minutes finding out how to install gparted.

Building a kernel is nothing really, all that is required is issuing a couple make commands, a child that can read can do it. Do they understanding what they are doing, probably not, do they need to do it, probably not. What config options did you use ? Are they appropriate for your system ?

Please Log in or Create an account to join the conversation.

More
29 Mar 2020 00:23 #161886 by PCW

The OP has gone for the latest 5 series, I tried a couple of 5 series myself and on the hardware at hand the last of the 4 gave better results. Yeah I know the 5 is really just a continuation of the 4.
But that’s pretty good results there, what distro was that with ?


Pretty sure that was a LinuxCNC Wheezy distribution with a Preempt-RT kernel replacing the RTAI kernel

Please Log in or Create an account to join the conversation.

More
29 Mar 2020 00:25 #161887 by PCW

@PCW
I meant "useless" in the sense that RT-Preempt won't work with parallel ports.


Preempt-RT works fine with parallel ports (assuming it has good enough latency for the required step rates)

Please Log in or Create an account to join the conversation.

More
29 Mar 2020 00:55 #161896 by andypugh
There is a set of debs here that should install perfectly in to a Ubuntu machine if you do need RTAI.
www.linuxcnc.org/temp

Just installt Unbuntu then install the kernel image and headers, reboot into the new kernel to be sure it works, then install the RTAI and LinuxCNC .debs

Easiest way to install debs is with apt. But you need to give it a hint to look for a file not a package on the repo, so it's

sudo apt-get install ./path.to.deb

Please Log in or Create an account to join the conversation.

More
29 Mar 2020 01:03 #161898 by BeagleBrainz
Already mentioned that link Andy.....maybe he didn't read down that far.

Please Log in or Create an account to join the conversation.

Time to create page: 0.119 seconds
Powered by Kunena Forum