LinuxCNC (EMC2) on Puppy

Mathematical tools, physics simulators, CAD, CNC, etc.
Message
Author
User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#41 Post by vtpup »

Code: Select all

root@debian:~# linuxcnc
LINUXCNC - 2.6.3-11-gb38797a
Machine configuration directory is '/usr/share/doc/linuxcnc/examples/sample-configs/sim/axis'
Machine configuration file is 'gantry.ini'
Starting LinuxCNC...
Error: could not insert module /usr/realtime-3.4-9-rtai-686-pae/modules/rtai_hal.ko: Operation not permitted
Realtime system did not load
Shutting down and cleaning up LinuxCNC...
RTAPI: ERROR: could not open shared memory (errno=2)
RTAPI: Locked memory limit is 64KiB, recommended at least 20480KiB.
This can cause the error 'could not open shared memory'.
For more information, see
        http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?LockedMemory
/usr/bin/linuxcnc: line 498:  3168 Segmentation fault      $HALCMD stop
RTAPI: ERROR: could not open shared memory (errno=2)
RTAPI: Locked memory limit is 64KiB, recommended at least 20480KiB.
This can cause the error 'could not open shared memory'.
For more information, see
        http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?LockedMemory
/usr/bin/linuxcnc: line 498:  3169 Segmentation fault      $HALCMD unload all
RTAPI: ERROR: could not open shared memory (errno=2)
RTAPI: Locked memory limit is 64KiB, recommended at least 20480KiB.
This can cause the error 'could not open shared memory'.
For more information, see
        http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?LockedMemory
RTAPI: ERROR: could not open shared memory (errno=2)
RTAPI: Locked memory limit is 64KiB, recommended at least 20480KiB.
This can cause the error 'could not open shared memory'.
For more information, see
        http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?LockedMemory
RTAPI: ERROR: could not open shared memory (errno=2)
RTAPI: Locked memory limit is 64KiB, recommended at least 20480KiB.
This can cause the error 'could not open shared memory'.
For more information, see
        http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?LockedMemory
RTAPI: ERROR: could not open shared memory (errno=2)
RTAPI: Locked memory limit is 64KiB, recommended at least 20480KiB.
This can cause the error 'could not open shared memory'.
For more information, see
        http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?LockedMemory
RTAPI: ERROR: could not open shared memory (errno=2)
RTAPI: Locked memory limit is 64KiB, recommended at least 20480KiB.
This can cause the error 'could not open shared memory'.
For more information, see
        http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?LockedMemory
RTAPI: ERROR: could not open shared memory (errno=2)
RTAPI: Locked memory limit is 64KiB, recommended at least 20480KiB.
This can cause the error 'could not open shared memory'.
For more information, see
        http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?LockedMemory      

(snip)

Error: Module hal_lib is not currently loaded
Error: Module rtapi is not currently loaded
Error: Module rtai_math is not currently loaded
Error: Module rtai_sched is not currently loaded
Error: Module rtai_hal is not currently loaded
LinuxCNC terminated with an error.  You can find more information in the log:
    /root/linuxcnc_debug.txt
and
    /root/linuxcnc_print.txt
as well as in the output of the shell command 'dmesg' and in the terminal
[color=darkblue]Acer Aspire 5349-2635 laptop Tahrpup.[/color]
[color=blue]Acer R11 and C720 Chromebks Bionicpup64[/color]
[color=olive]Acer Iconia A1-830 tablet no pup[/color]
[color=orange]www.sredmond.com[/color]

User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#42 Post by vtpup »

Maybe it's just marginal running in memory. Can I use a pfix = command to have it run off the mounted CD?

Here's the full Top listing:
[color=darkblue]Acer Aspire 5349-2635 laptop Tahrpup.[/color]
[color=blue]Acer R11 and C720 Chromebks Bionicpup64[/color]
[color=olive]Acer Iconia A1-830 tablet no pup[/color]
[color=orange]www.sredmond.com[/color]

User avatar
saintless
Posts: 3862
Joined: Sat 11 Jun 2011, 13:43
Location: Bulgaria

#43 Post by saintless »

You can make frugal install and boot it from the hard drive.The cd runs from the cd. It does not copy to ram. You can add copy2ram parameter if needed. I gave a link above with boot code examples.

Different result here on P-III 600Mhz, 128Mb sdram + 2Gb swap partition:

Code: Select all

root@debian:~#  /etc/init.d/realtime start
root@debian:~#  /etc/init.d/realtime start
Error: could not insert module /usr/realtime-3.4-9-rtai-686-pae/modules/rtai_hal.ko: File exists

Code: Select all

root@debian:~# linuxcnc
LINUXCNC - 2.6.3-11-gb38797a
Machine configuration directory is '/usr/share/doc/linuxcnc/examples/sample-configs/sim/axis'
Machine configuration file is 'gantry.ini'
Starting LinuxCNC...
Error: could not insert module /usr/realtime-3.4-9-rtai-686-pae/modules/rtai_hal.ko: File exists
Realtime system did not load
Shutting down and cleaning up LinuxCNC...
LinuxCNC terminated with an error.  You can find more information in the log:
    /root/linuxcnc_debug.txt
and
    /root/linuxcnc_print.txt
as well as in the output of the shell command 'dmesg' and in the terminal
/root/linuxcnc_print.txt:

Code: Select all

RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/realtime-3.4-9-rtai-686-pae/modules/linuxcnc
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/share/linuxcnc/tcl/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.5
INIFILE=/usr/share/doc/linuxcnc/examples/sample-configs/sim/axis/gantry.ini
PARAMETER_FILE=sim.var
TASK=milltask
HALUI=
DISPLAY=axis
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Killing task linuxcncsvr, PID=3500
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
/root/linuxcnc_debug.txt:

Code: Select all

3500
  PID TTY      STAT   TIME COMMAND
Stopping realtime threads
Unloading hal components
I get the same result on the same machine running 1,1Gb official debian linuxcnc iso (loads slow but manage to do the test).

I don't know if it is memory issue or the kernel is new for such old hardware.

Can you test with plop to boot from usb 1,1Gb debian if linuxcnc iso works for you? If it does not we can't do anything more with this kernel and rtai-modules.

What is the version that works on your machine (download link if possible). maybe I can get the kernel from there. We will need also the repository for linuxcnc that is included in the iso to install the same version.

I can't give any other ideas since /etc/init.d/realtime start works without problem on my hardware.

Toni

User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#44 Post by vtpup »

Okay thanks Toni, I'll work on providing you with the rest of the info/questionanswers above but first want to give you the link to the Ubuntu version that runs on my Thinkpad 600SE (EU mirror):

http://dsplabs.upt.ro/~juve/emc/get.php ... 3-i386.iso

MD5SUM 1bab052ec879f941628927c988863f14


This is the 2.3.0 version of EMC (later renamed to LinuxCNC) on Ubuntu 8.04 (Lucid). I later upgraded it to LinuxCNC version 2.5.4 using these instructions:

http://wiki.linuxcnc.org/cgi-bin/wiki.pl?UpdatingTo2.4
and...
http://wiki.linuxcnc.org/cgi-bin/wiki.pl?UpdatingTo2.5

Kernel:

For the Ubuntu 8.04 OS used here, Kernel is 2.6.32 - 122-rtai

from user perdido:
kernel source 2.6.32-122-rtai
Located at
http://linuxcnc.org/dists/lucid/base/source/

Found that info at
http://sourceforge.net/p/emc/mailman/message/31174742/


edit: Seems all kernel sources here
http://linuxcnc.org/dists/
[color=darkblue]Acer Aspire 5349-2635 laptop Tahrpup.[/color]
[color=blue]Acer R11 and C720 Chromebks Bionicpup64[/color]
[color=olive]Acer Iconia A1-830 tablet no pup[/color]
[color=orange]www.sredmond.com[/color]

User avatar
saintless
Posts: 3862
Joined: Sat 11 Jun 2011, 13:43
Location: Bulgaria

#45 Post by saintless »

Ok, Vtpup.

I will see what I can do with the kernel from ubuntu version.
I never compiled kernel from source myself and even if someone compiles kernel from source will this also provide proper rtai-modules for this kernel as separate package as it is inside linuxcnc cd? Linuxcnc searches for modules in /usr directory.

There should be deb (ubuntu) packages with all available kernels and rtai modules for linuxcnc. I found in google suggestions for reinstalling rtai-modules because of similar errors:
http://emc.mah.priv.at/irc/%23linuxcnc- ... 07-08.html
Any ideas where we can find the repository that holds the rtai deb packages?

User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#46 Post by vtpup »

Toni -- trying to catch up.....

But just tried this with your present install and I must be doing something wrong ???

root@debian:~# cd /usr/realtime-3.4-9-rtai-686-pae/modules

root@debian:/usr/realtime-3.4-9-rtai-686-pae/modules# modprobe rtai_hal.ko

FATAL: Module rtai_hal.ko not found.

root@debian:/usr/realtime-3.4-9-rtai-686-pae/modules# ls

Module.symvers rtai_calibrate.ko rtai_mq.ko rtai_tasklets.ko
latency_rt.ko rtai_hal.ko rtai_mup.ko rtai_tbx.ko
linuxcnc rtai_ksched.ko rtai_sched.ko rtai_up.ko
preempt_rt.ko rtai_lxrt.ko rtai_smi.ko switches_rt.ko
rtai_bits.ko rtai_math.ko rtai_smp.ko


nevermind ./ :oops:
[color=darkblue]Acer Aspire 5349-2635 laptop Tahrpup.[/color]
[color=blue]Acer R11 and C720 Chromebks Bionicpup64[/color]
[color=olive]Acer Iconia A1-830 tablet no pup[/color]
[color=orange]www.sredmond.com[/color]

User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#47 Post by vtpup »

Thank you Toni --- just to fill in on what I've tried with the DebDog LinCNC,

I made a symlink in etc/modules/extras/ pointing to the linuxcnc /usr modules and then did a depmod -a

Then tried

modprobe rtai-hal

I got no error messages, but lsmod didn't show it.

I get the "Operation not permitted" error message when I

insmod rtai_hal.ko

but I don't get it for

modprobe rtai_hal

I looked at the init.d/realtime script and saw that they don't use insmod or modprobe, but call a custom binary for inserting a module.


Now I am downloading the Debian version of LinuxCNC as you requested, and will find Plop and try them out together.
[color=darkblue]Acer Aspire 5349-2635 laptop Tahrpup.[/color]
[color=blue]Acer R11 and C720 Chromebks Bionicpup64[/color]
[color=olive]Acer Iconia A1-830 tablet no pup[/color]
[color=orange]www.sredmond.com[/color]

User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#48 Post by vtpup »

Toni sorry, big mistake:

the kernel I referenced earlier is for the Lucid version of LinuxCNC not the Hardy version.

The Lucid 10.04 version is here:

http://dsplabs.upt.ro/~juve/emc/get.php ... 3-i386.iso

MD5SUM 76dc2416b917679b71255e464ede84ec.



The version currently running on the Thinkpad 600E is the Hardy 8.04 (link provided earlier)

The kernel for that one is 2.6.24-16-rtai
[color=darkblue]Acer Aspire 5349-2635 laptop Tahrpup.[/color]
[color=blue]Acer R11 and C720 Chromebks Bionicpup64[/color]
[color=olive]Acer Iconia A1-830 tablet no pup[/color]
[color=orange]www.sredmond.com[/color]

Les Kerf
Posts: 317
Joined: Sun 24 Jun 2012, 13:30

#49 Post by Les Kerf »


User avatar
saintless
Posts: 3862
Joined: Sat 11 Jun 2011, 13:43
Location: Bulgaria

#50 Post by saintless »

vtpup wrote:Now I am downloading the Debian version of LinuxCNC as you requested, and will find Plop and try them out together.
Thanks, Vtpup.
This is important test because if the official Debian linuxcnc version works on your machine something is wrong in the testing iso and we will concentrate fixing the problem in DebianDog version.
If it does not work we will try with the kerenel from Ubuntu 8.4 or different.

The problem is I get different output than you from the same commands on old hardware like yours and the official Debian linuxcnc gives the same output on my hardware.

BTW some information about official 1,1 Gb iso - it should boot to desktop after a while as user. If you logout instead rebooting you can login with username user and password live.
If you need to login as root drop back to console with Ctrl+Alt+F1 and setup root password with:

Code: Select all

sudo passwd root
Then login as root:

Code: Select all

sudo login
And type startx

Toni

User avatar
Revolverve
Posts: 255
Joined: Sat 08 Nov 2008, 21:01
Location: 45°17'28.8"N 72°16'08.8"W_avatar/ mira.ca

#51 Post by Revolverve »

Finaly been able to get sim start...run fine here..with Saintless "pure plain" debian rt baby.

Removed the following packages:
libgl1-mesa-glx

Installed the following packages:
libgl1-mesa-swx11 (8.0.5-4+deb7u2)
libosmesa6 (8.0.5-4+deb7u2)

User avatar
saintless
Posts: 3862
Joined: Sat 11 Jun 2011, 13:43
Location: Bulgaria

#52 Post by saintless »

I'm glad you found a way to make it work for you, Revolverve :)
I hope your method will work for Vtpup.
If it does I will rebuild the iso fixing also the small conflict for remaster-scripts and linuxcnc-config-files-location.

Toni

User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#53 Post by vtpup »

Hi saintless, all, frustrating evening -- I did indeed get plop working, only to find I didn't have a free memory stick over 1 gig. I had 5 sticks of the 1G size, but LinuxCNC on Debian is 1.1G and doesn't fit! (Wish they'd trimmed about 150 meg off of it :cry: ).

But plop is nice to have. I can boot the TP600E off of USB now! I'll get a bigger mem stick tomorrow. I'll also Revolverve's change tonight.

btw -- I've always been able to get LinuxCNC to start it's splash screen and interface query with DebianDog but when I select the Axis interface (that's the one with the 3D display) and chose a machine type Gantry, is when the errors show up and crash. So it's pretty close to running.

Okay, on to testing .....
[color=darkblue]Acer Aspire 5349-2635 laptop Tahrpup.[/color]
[color=blue]Acer R11 and C720 Chromebks Bionicpup64[/color]
[color=olive]Acer Iconia A1-830 tablet no pup[/color]
[color=orange]www.sredmond.com[/color]

User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#54 Post by vtpup »

One question, sorry, how/where do I get these?
Installed the following packages:
libgl1-mesa-swx11 (8.0.5-4+deb7u2)
libosmesa6 (8.0.5-4+deb7u2)
[color=darkblue]Acer Aspire 5349-2635 laptop Tahrpup.[/color]
[color=blue]Acer R11 and C720 Chromebks Bionicpup64[/color]
[color=olive]Acer Iconia A1-830 tablet no pup[/color]
[color=orange]www.sredmond.com[/color]

User avatar
Revolverve
Posts: 255
Joined: Sat 08 Nov 2008, 21:01
Location: 45°17'28.8"N 72°16'08.8"W_avatar/ mira.ca

#55 Post by Revolverve »

Synaptic . Short story,running in console for sim to get running, got x error message :BadWindow something, I googled it to find a forum with a solution:install libgl1-mesa-swx11....could be specific video harware related,not so sure...test with your.

User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#56 Post by vtpup »

Revolverve, not listed in my synaptic search -- which repository? Thanks!
[color=darkblue]Acer Aspire 5349-2635 laptop Tahrpup.[/color]
[color=blue]Acer R11 and C720 Chromebks Bionicpup64[/color]
[color=olive]Acer Iconia A1-830 tablet no pup[/color]
[color=orange]www.sredmond.com[/color]

User avatar
Revolverve
Posts: 255
Joined: Sat 08 Nov 2008, 21:01
Location: 45°17'28.8"N 72°16'08.8"W_avatar/ mira.ca

#57 Post by Revolverve »

Need to update the package list first...because its a live boot ?!#! could be...
Attachments
2014-09-14-225558_1280x800_scrot.png
Yep...does simulation....no real machine test yet..go ahead plug that interface,home the beast,mill.:)oups i've put my window in front of the lens,sorry
(142.25 KiB) Downloaded 504 times

User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#58 Post by vtpup »

Sorry, yes, found and installed them.

No joy, though. There was no difference.

My problem hasn't been video -- that works.

But rtai and hal kernel module loading.is the problem. The error messages haven't changed.
[color=darkblue]Acer Aspire 5349-2635 laptop Tahrpup.[/color]
[color=blue]Acer R11 and C720 Chromebks Bionicpup64[/color]
[color=olive]Acer Iconia A1-830 tablet no pup[/color]
[color=orange]www.sredmond.com[/color]

User avatar
saintless
Posts: 3862
Joined: Sat 11 Jun 2011, 13:43
Location: Bulgaria

#59 Post by saintless »

Hi, Vtpup, don't buy new flash drive :)
Actually Revolverve found already the solution - thanks Revolverve ! :)
See the picture on my old machine with Axis -> Gantry settings:

Image

We just need some extra steps for our old machines

1. Boot adding lapic at the end of "append initrd" line. If you boot from CD just press Tab to edit the line.
If you use frugal install with grub4dos like me add lapic to the end of the kernel boot line.

2. Run this commands before starting linuxcnc:

Code: Select all

root@debian:~# ulimit -l      
64
root@debian:~# ulimit -l 20480
root@debian:~# ulimit -l
20480
root@debian:~# linuxcnc
LINUXCNC - 2.6.3-13-g7fdc948
Machine configuration directory is '/usr/share/doc/linuxcnc/examples/sample-configs/sim/axis'
Machine configuration file is 'gantry.ini'
Starting LinuxCNC...
Shutting down and cleaning up LinuxCNC...
root@debian:~# 
Works the same way from user account puppy:

Code: Select all

puppy@debian:~$ ulimit -l
20480
puppy@debian:~$ linuxcnc
LINUXCNC - 2.6.3-13-g7fdc948
Machine configuration directory is '/home/puppy/linuxcnc/configs/sim.axis'
Machine configuration file is 'gantry.ini'
Starting LinuxCNC...
No option 'tto_g11' in section: 'DEFAULT'
No option 'show_program' in section: 'DEFAULT'
No option 'show_rapids' in section: 'DEFAULT'
No option 'program_alpha' in section: 'DEFAULT'
No option 'show_live_plot' in section: 'DEFAULT'
No option 'show_tool' in section: 'DEFAULT'
No option 'show_extents' in section: 'DEFAULT'
No option 'show_offsets' in section: 'DEFAULT'
No option 'grid_size' in section: 'DEFAULT'
No option 'show_machine_limits' in section: 'DEFAULT'
No option 'show_machine_speed' in section: 'DEFAULT'
No option 'show_distance_to_go' in section: 'DEFAULT'
No option 'dro_large_font' in section: 'DEFAULT'
No option 'block_delete' in section: 'DEFAULT'
No option 'optional_stop' in section: 'DEFAULT'
No option 'recentfiles' in section: 'DEFAULT'
Shutting down and cleaning up LinuxCNC...
puppy@debian:~$ 
If it works for you I will rebuild the iso with the fixes and some latest changes for DebianDog today or tomorrow. I will fix also the remaster scripts to work without making troubles for linuxcnc and you will be able to remaster the system much smaller (or bigger) for your needs.

Toni

User avatar
Revolverve
Posts: 255
Joined: Sat 08 Nov 2008, 21:01
Location: 45°17'28.8"N 72°16'08.8"W_avatar/ mira.ca

#60 Post by Revolverve »

Lucky you ...
and now I'll try learning how to make snapshot and post correctly :?
Glad it helped!

Post Reply