Installing Uspace for Master

More
07 Dec 2016 21:39 #83755 by rodw
Replied by rodw on topic Installing Uspace for Master
Thanks, I posted this issue after rebuilding a preemptive kernel for mint 17.3 here
forum.linuxcnc.org/49-basic-configuratio...works?start=10#83754
I think I know whats going on.
Xenomai is a realtime prerequisite and needs to be installed via another patch to the kernel code so instaling from apt-get breaks the preemptive kernel

So the question I now have is Xenomai required on a preemptive kernel? If not I can just modify the configure script to skip the test for Xenomai.

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

More
07 Dec 2016 22:02 #83757 by Hakan
Replied by Hakan on topic Installing Uspace for Master
Stop stop.
Forget about the ./configure uspace, it only works on debian.
Instead start with ./autogen and those four commands.
They will fail due to missing programs and packages.
You need to manually install all those missing packages
using whatever paackage management is in Mint.
Some packages are easy to guess, some packages are harder
to guess and some googling will probably be required.
Then when linuxcnc is built you might need to install
even more packages to get guis going.

A week ago there was a thread about building linuxcnc
for ubunto 16.04. It is the same situation here.

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

More
08 Dec 2016 00:40 - 08 Dec 2016 01:32 #83761 by cncnoob1979
I just finished setting up my RIP as listed in the documentation here.


It was quite easy. The steps involved are not difficult and surprised me greatly.
> git clone git://git.linuxcnc.org/git/linuxcnc.git linuxcnc-dev
> cd linuxcnc-dev/src
> git checkout 2.7  [what ever branch you want, or skip this step for master]
> ./autogen.sh
> ./configure --with-realtime=/usr/realtime-3.4-9-rtai-686-pae
> make -j2        [the number of cpu cores you have- speeds up compiling-Parallel compilation]
> sudo make setuid
> source ../scripts/rip-environment
> linuxcnc

I am using RTAI as you can see. My system is currently running Linux Mint 17.3, I tested 2.8 pre / 2.7.8. After testing I ran make clean, to reset the source. Until now, I had previously built a deb for linuxcnc 7.4 which is installed, and I did not remove it while testing. I plan on removing my deb and only using the RIP method now.

RIP is so much easier, you can do a "git pull" and update very easily.

Just make sure you check out the branch you are wanting or else you will automatically build master.

When ready to change branches you have to:
> make clean
> git checkout 2.7
> ./autogen.sh
> ./configure --with-realtime=/usr/realtime-3.4-9-rtai-686-pae
> make -j2
> sudo make setuid
> source ../scripts/rip-environment
> linuxcnc

Hopefully that is clear. Ask if you have any questions.
Last edit: 08 Dec 2016 01:32 by cncnoob1979. Reason: typo's

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

More
08 Dec 2016 00:49 #83762 by rodw
Replied by rodw on topic Installing Uspace for Master
Thanks so much, I'll look at this tonight

I need master for preemptive kernel so the only thing I need to understand is what the parameter is here is for premptive.
./configure --with-realtime=/usr/realtime-3.4-9-rtai-686-pae

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

More
08 Dec 2016 00:53 #83763 by cncnoob1979
I don't know the preemptive kernel, but It is probably listed in the /usr directory. I'm sure a quick search should reveal its location for you. I would not believe you are the first to do this! :)

You do not need to configure the debian side of things. Just need to link the source to your real time kernel. I would believe it is in the same /usr area.

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

More
08 Dec 2016 01:00 #83764 by PCW
Replied by PCW on topic Installing Uspace for Master
for Preempt-RT or sim its

./autogen.sh
./configure --with-realtime=uspace
make clean
make
sudo make setuid

to run the software go back to the top level directory, and issue:

. scripts/rip-environment
linuxcnc

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

More
08 Dec 2016 01:08 #83765 by cncnoob1979
Thanks for the Correction PCW,

Its plainly listed in the doc's. I overlooked them!




--with-realtime=uspace

Build for any realtime platform, or for non-realtime. The resulting LinuxCNC executables will run on both a Linux kernel with Preempt-RT patches (providing realtime machine control) and on a vanilla (un-patched) Linux kernel (providing G-code simulation but no realtime machine control). If development files are installed for Xenomai (typically from package libxenomai-dev) or RTAI (typically from a package with a name starting "rtai-modules"), support for these real-time kernels will also be enabled.

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

More
08 Dec 2016 01:20 #83766 by rodw
Replied by rodw on topic Installing Uspace for Master
Awesome guys, for a noob to this all, the info to build Linuxcnc on Mint is a bit patchy and often posts don't make it clear what version is being built.

I've been playing in the ./debian folder when I should have been in the ./src folder.

I will try and document it once I work it out.

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

More
08 Dec 2016 11:00 #83772 by rodw
Replied by rodw on topic Installing Uspace for Master
Well, I have success!





And stepper motors attached to my Mesa 7i76e go round too!

It seems that many of the problems discussed elsewhere about missing dependencies have been fixed in master and many of them have ./configure options to disable them anyway.

I was unable to run dpkg-checkbuilddeps so I just kept running ./configure and fixing the dependencies one by one. Here are modules I installed (there may be a couple of extra ones not needed in this list based on the solutions I found to solve them).
glib-2.0
libgtk2.0-dev
tclx8.6
tk8.6-dev
bwidget
libtk-img
libreadline-gplv2-dev
libboost-all-dev
libsdl1.2-dev
libgl1-mesa-dev
libglu1-mesa-dev
libsdl-image1.2
libsdl-image1.2-dev
libxmu-dev

For some reason, the linuxcnc-dev folders were owned by root so I had to fix the permissions

I'm quite happy with the latency given the base thread won't be used and I'm using Mesa ethernet cards (and the PC is only 4" square)

I still don't understand this and how I can make that happen on start up everytime I boot up
. scripts/rip-environment

Thanks so much to you guys, your support has been awesome

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

More
08 Dec 2016 13:58 #83773 by cncnoob1979

2.10. Reconfiguring LinuxCNC

If you compile for realtime in a directory tree (git checkout), and then later reconfigure for --enable-simulator, you must do
make clean to get rid of the realtime object files. The same applies when switching from simulation to realtime. This is because "make" doesn't know that you've changed modes. It only sees that the object files are newer than the source, and thinks they don't need to be recompiled.

Another potential problem when switching from realtime to simulation is environment variables. The command
. scripts/rip-environment

sets some environment variables in your shell to point to various parts of the run-in-place code. Some of those variables are different for realtime vs. simulation. If you switch modes, you should close the shell you were using, open a new one, and run . scripts/rip-environment before starting LinuxCNC from that shell.

The same issues can arise if you have multiple git checkouts and switch between them using the same shell. If you are switching between versions or checkouts, it is best to use one shell for each one.


Source is on the Wiki.

#!/bin/bash
cd ~/linuxcnc-dev 
. scripts/rip-environment 
linuxcnc /path/to/machine.ini

You can create a blank document on the desktop to launch as executable with these imbedded commands. This is how I launch linuxcnc.

The above quote from the wiki explains why the script is needed for RIP.
The following user(s) said Thank You: rodw

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

Time to create page: 0.148 seconds
Powered by Kunena Forum