LinuxCNC/Machinekit on i.MX6 board

More
08 Dec 2017 02:46 #102760 by savoyyang
thank you andypugh ,should I change ubuntu12.04 to Jessie for my i.mx6 board?Do need to install Linuxcnc dependencies will have an impact?

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

More
08 Dec 2017 10:38 - 08 Dec 2017 10:39 #102764 by andypugh
If you like Ubuntu and it is working then you might as well stay with it, at least until you know there is a problem.

If you are running Xenomai then the pre-built packages from the buildbot probably won't work. So I think that building from source makes sense.

You need to get the source. You can download it from the green button here.
github.com/LinuxCNC/linuxcnc
(It might make sense to install git and clone the repository, especially if you think that there is any chance that you might end up submitting changes back to the project, perhaps related to supporting your platform. But downloading the .zip ought to work too).

You need to configure before the build dependencies list can be calculated.
cd linuxcnc-dev/src
./autogen.sh
./configure --with-realtime=xenomai

Then install the dependencies. I tend to just do what it says here, then edit the resulting output into an apt-get command by removing duplicates / options and version numbers:
linuxcnc.org/docs/devel/html/code/buildi...g-Build-Dependencies

Then LinuxCNC ought to compile.
make
sudo make setuid

At this point you should have a working LinuxCNC system installed as a "run-in-place" system, ie in the linuxcnc-dev directory rather than in /usr/bin. To run this you need to run a script
. ./linuxcnc-dev/scripts/rip-environment
Note that it really is dot-space-dot-slash, it is setting up an environment specific to that terminal session.
then the command "linuxcnc" will start LinuxCNC.

We can worry about getting a version that will run from the menus and/or run without the script if and when we get as far as a running LinuxCNC.
Last edit: 08 Dec 2017 10:39 by andypugh.

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

More
09 Dec 2017 11:40 #102815 by savoyyang
hey andy,
Your reply is very useful to me, now I have already completed the compilation, but a bit of a problem. I was based on this tutorial to install Xenomai, confirmed that Xenomai can be normal operation.
xenomai.org/2014/06/building-debian-packages/

result

The build results in the following packages:

xenomai-runtime – Xenomai runtime utilities
libxenomai1 – Shared libraries for Xenomai
libxenomai-dev – Headers and static libraries for Xenomai
xenomai-kernel-source – Sources of the Xenomai 2.x kernel
xenomai-doc – Xenomai documentation


First, I follow your steps ./configure --with-realtime=xenomai , this steps output error "can't find kernel version" and I found the check is "xeno-config: none". So, I try other way.

Second, also this step ./configure --with-realtime=uspace , I installed a lot depend on finally succeeded,and xenomai is check succeeded, found the xeno-config.

Third, use dpkg-checkbuilddeps install all of dependencies then make and sudo make setuid and ../linuxcnc-dev/scripts/rip-environment,run succeedful.

Fourth, run the linuxcnc on shell have problem,

linaro@linaro-ubuntu-desktop:~/linuxcnc-dev/src$ linuxcnc
LINUXCNC - 2.8.0~pre1
Machine configuration directory is '/home/linaro/linuxcnc-dev/configs/sim/axis'
Machine configuration file is 'axis.ini'
Starting LinuxCNC...
/home/linaro/linuxcnc-dev/scripts/linuxcnc: line 752: 22336 Segmentation fault (core dumped) $HALCMD loadusr -Wn iocontrol $EMCIO -ini "$INIFILE"
/home/linaro/linuxcnc-dev/scripts/linuxcnc: line 763: 22339 Segmentation fault (core dumped) $HALCMD loadusr -Wn halui $HALUI -ini "$INIFILE"
Found file(lib): /home/linaro/linuxcnc-dev/lib/hallib/core_sim.hal
Note: Using POSIX non-realtime
/home/linaro/linuxcnc-dev/scripts/linuxcnc: line 823: 22346 Segmentation fault (core dumped) $HALCMD -i "$INIFILE" -f $CFGFILE
Shutting down and cleaning up LinuxCNC...
/home/linaro/linuxcnc-dev/scripts/linuxcnc: line 571: 22373 Segmentation fault (core dumped) $HALCMD unload all
LinuxCNC terminated with an error. You can find more information in the log:/home/linaro/linuxcnc_debug.txt and /home/linaro/linuxcnc_print.txt

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

More
09 Dec 2017 12:00 #102816 by andypugh
What does uname -a say?

Perhaps you haven't selected the Xenomai kernel in Grub?

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

More
09 Dec 2017 12:57 #102818 by savoyyang
Linux linaro-ubuntu-desktop 3.0.43-2666-gbdde708 #25 SMP PREEMPT Wed Dec 6 18:24:43 PST 2017 armv7l armv7l armv7l GNU/Linux

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

More
09 Dec 2017 13:09 #102819 by andypugh
That doesn't sound like the right kernel. Do you see any other options in Grub? Possibly hidden in a sub-menu. It isn't obvious that grub has sub-menus, but it does. I think I found that the realtime kernel was under "previous Linux versions" for some reason.

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

More
09 Dec 2017 13:19 #102820 by savoyyang
One thing I need to tell you is that my original Linux kernel version was 3.0.35, and then the official Xenomai provided ipipe none of 3.0.35, so I chose one for Freescale's iMX chip that ipipe-3.0.43 in Xenomai2.6.4, so after the patching my kernel version becomes 3.0.43 , I do not know if it has anything to do with this.

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

More
09 Dec 2017 15:06 #102825 by andypugh
LinuxCNC shouldn't care if you are compiling in-place

I am just not entirely sure if uspace is the right configure option for xenomai. I am also not sure if you are running on your Xenomai-patched kernel. Did you add "Xenomai" to the name?

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

More
09 Dec 2017 15:17 #102827 by savoyyang
I don't know whats " add "Xenomai" to the name? " , the uname -a say's name?

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

More
09 Dec 2017 16:49 #102829 by andypugh
When you created the Xenomai kernel, did you change the name of the kernel?

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

Time to create page: 0.089 seconds
Powered by Kunena Forum