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:

#61 Post by vtpup »

Edited...

I added Debiandog to my hd w/frugal install. Then added lapic to the kernel boot line in Grub.

then tried starting LinuxCNC:

Code: Select all

root@debian:~# ulimit -l 20480
root@debian:~# ulimit -l      
20480
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)
/usr/bin/linuxcnc: line 498:  3221 Segmentation fault      $HALCMD stop
RTAPI: ERROR: could not open shared memory (errno=2)
/usr/bin/linuxcnc: line 498:  3222 Segmentation fault      $HALCMD unload all
RTAPI: ERROR: could not open shared memory (errno=2)
:(
[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

#62 Post by saintless »

Can you confirm you also did this:
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

#63 Post by saintless »

Uploaded second version DebianDog-Jwm-3.4-9-rtai-686-pae-2.iso - 234Mb:
Direct download link
md5sum 6b9d5701f10b148a24f8b7f046e51880
Previous iso removed.

Mirror download from here:
http://www.mydrive.ch/
username: guest@saintless
password: download

Edit:29.04.2016 - I have e-mail from mydrive.ch my free account will have 100Mb storage limit in a month. I had to remove all files over 100Mb limit. Uploaded text file ISO-files-Moved-Here.txt with new storage location in dropbox in case someone visits mydrive.ch. This is the new download link:
https://www.dropbox.com/sh/ca58blnh2m6h ... Th0oa?dl=0

Changes:
Added lapic to the boot code line.
Removed libgl1-mesa-glx
Installed libgl1-mesa-swx11 and libosmesa6.
Remaster scripts fixed for linuxcnc /usr/share/doc/linuxcnc configuration files.
Added latest fixes for DebianDog.

Linuxcnc starts without errors on two old P-III machines.

Edit: Important note - if you already have frugal install make sure to rename live folder and any changes.dat file from previous testing before booting this new CD. Read DebianDog porteus-boot post for more detailed information.

Toni
Last edited by saintless on Fri 29 Apr 2016, 09:33, edited 5 times in total.

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

#64 Post by vtpup »

Okay Toni, I will try the new version, but first want to report on the last boot attempt with the old version:

I can confirm that I removed the following packages:

libgl1-mesa-glx

and installed the following packages:

libgl1-mesa-swx11 (8.0.5-4+deb7u2)
libosmesa6 (8.0.5-4+deb7u2)

I also had done:

Code: Select all

root@debian:~# ulimit -l 20480


Here is a new clue from dmesg though:

Code: Select all

[  116.866320] RTAI[hal]: ERROR, LOCAL APIC CONFIGURED BUT NOT AVAILABLE/ENABLED
However, I did include lapic in the boot .Here is my entire boot stanza for debiandog in Grub:

Code: Select all

title DebianDog frugal
rootnoverify (hd0,5)
kernel /debiandog/live/vmlinuz1 from=/mnt/sda6/debiandog edd=off changes=/mnt/sda6 nomagic base_only norootcopy lapic
initrd=/debiandog/live/initrd1.xz
[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:

#65 Post by vtpup »

Note that the system that does run on this computer is LinuxCNC 2.5

And the DebianDog version of LinuxCNC is 2.6

I periodically boot back into the Ubuntu version to make sure everything works. It does. There is no "lapic" cheatcode in the Ubuntu grub stanza.


(I'm downloading the new DebianDog now)
[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:

#66 Post by vtpup »

Results for the new debiandog are the same:


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...
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)
/usr/bin/linuxcnc: line 498: 2994 Segmentation fault $HALCMD stop
RTAPI: ERROR: could not open shared memory (errno=2)
/usr/bin/linuxcnc: line 498: 2995 Segmentation fault $HALCMD unload all
RTAPI: ERROR: could not open shared memory (errno=2)
RTAPI: ERROR: could not open shared memory (errno=2)
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
[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
perdido
Posts: 1528
Joined: Mon 09 Dec 2013, 16:29
Location: ¿Altair IV , Just north of Eeyore Junction.?

#67 Post by perdido »

vtpup wrote:Results for the new debiandog are the same:

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)
/usr/bin/linuxcnc: line 498: 2994 Segmentation fault $HALCMD stop
Similar problem at this link with maybe a fix
http://www.linuxcnc.org/index.php/frenc ... emc2-error

here is where the fix is maybe
http://wiki.linuxcnc.org/cgi-bin/wiki.p ... sing_lapic

edit: looks that saintless may have applied this fix in latest .iso


.

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

#68 Post by vtpup »

Sorry perdido, but that is the same thing as manually adding "lapic" to the end of the kernel line in Grub.

And I've already done that.

##############


Out of curiosity this evening, I decided to try running DebianDog on my later T43 Thnkpad. It ran, and LinuxCNC ran. However, I later ran the Latency script and the T43 had terrible latency times -- despite being a faster and more modern computer with a more recent processor. It is unsuitable for actually running a CNC mill for that reason.

This backs up the point that older Pent 3 machines are well suited to be CNC controllers, and are often better at that than newer machines.

I also tried it on my Acer dual proc machine (the one in my sig).

Again it ran fine, as did LinuxCNC. BUT, this laptop doesn't have a parallel port. So can't be used (not that I'd want to anyway -- I believe a controller should be a dedicated machine -- not my everyday computer.

An old Pent 3 machine with parallel port is a very good bet for CNC using LinuxCNC.

I hope that we can get my (and others') TP600E cutting parts under DebianDog

It does fine under the incredibly slow Ubuntu 8.04 system now - we just need something faster and less bloated.
[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

#69 Post by saintless »

vtpup wrote:...Out of curiosity this evening, I decided to try running DebianDog on my later T43 Thnkpad. It ran, and LinuxCNC ran.
.........
I also tried it on my Acer dual proc machine (the one in my sig).

Again it ran fine, as did LinuxCNC.
This is kind of goog news for me because it seems the iso works but the problem is something special in your hardware or linuxcnc version 2.6 does not run on it.
I hope that we can get my (and others') TP600E cutting parts under DebianDog
One last test for you to make with DebianDog:
1. Use frigal install with fresh (empty) save file or save folder.
2. Run the following commands in terminal:

Code: Select all

apt-get purge linuxcnc
apt-get autoremove
apt-get -f install
The last command will check if there is any error in dpkg database. There should not be errors.
3. Open /etc/apt/sources.list and remove lines:

Code: Select all

deb     http://buildbot.linuxcnc.org/ wheezy 2.6-rt
#deb-src http://buildbot.linuxcnc.org/ wheezy 2.6-rt
Then add new linuxcnc repo lines and save the file:

Code: Select all

deb     http://buildbot.linuxcnc.org/ wheezy v2.5_branch-rt
deb-src http://buildbot.linuxcnc.org/ wheezy v2.5_branch-rt
4. Run the following commands in terminal:

Code: Select all

apt-get update
apt-get install linuxcnc
Now you should have linuxcnc 2.5 installed instead 2.6.
Check if it runs on TP600E.
If it runs - Great.
If it does not don't give up hope :) There are some more options.
Option 1 - I can upload the official debian initrd.img patched to use save file on the boot partition. Maybe it will make cnahge for you instead the porteus initrd.img.
It does fine under the incredibly slow Ubuntu 8.04 system now - we just need something faster and less bloated.
Option 2 - I did some testing with 1.1 Gb debian linuxcnc and without much troubles made squashfs module around 400Mb with linuxcnc included and blackbox window manager. Much more to remove and needs some additions like rox.
The kernel from the ubuntu version does not run with debian initrd.img It has some changes unknown for me yet.
Is there a way to make frugal install and use save file with the ubuntu 8.4 version? I can try to make it much smaller if linuxcnc does not work again for you.
Edit: OK, I have frugall install ubuntu8.4-linuxcnc. The rest should not be much different from debian.
Edit2: I have troubles making persistent changes with casper-rw save file. Vtpup, how did you make changes persistent to upgrade linuxcnc to v 2.5? Are you using full install ubuntu8.4? I read adding persistent to the kernel boot line and making casper-rw save file is enough but it does not work for me.

I will also check dmesg message error about lapic - it might be the real problem linuxcnc does not run for you yet. I will get back on this later.
Last edited by saintless on Tue 16 Sep 2014, 12:08, edited 2 times in total.

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

#70 Post by saintless »

vtpup wrote:Here is a new clue from dmesg though:

Code: Select all

[  116.866320] RTAI[hal]: ERROR, LOCAL APIC CONFIGURED BUT NOT AVAILABLE/ENABLED
However, I did include lapic in the boot .Here is my entire boot stanza for debiandog in Grub:

Code: Select all

title DebianDog frugal
rootnoverify (hd0,5)
kernel /debiandog/live/vmlinuz1 from=/mnt/sda6/debiandog edd=off changes=/mnt/sda6 nomagic base_only norootcopy lapic
initrd=/debiandog/live/initrd1.xz
OK, Vtpup, this seems the main problem linuxcnc is not running for you.
Here is my dmesg output:

Code: Select all

[    0.000000] Local APIC disabled by BIOS -- reenabling.
[    0.000000] Found and enabled local APIC!
Do not test yet my suggestion from previous post. We need to find a way to enable local apic. Maybe the ubuntu cd does that in some special way. I will check out the boot codes in ubuntu iso.

Place live folder outside /debiandog. Use simple code and only one DebianDog frugal install as me while we fix this problem.
The best way I think is to remove or move inside some folder all save files/folders and debiandog files. Then copy again /live folder from the cd on sda6.
This is the boot code I use:

Code: Select all

title DebianDog-Porteus RTAI-kernel-testing
rootnoverify (hd0,5) 
kernel /live/vmlinuz1 noauto from=/ lapic
initrd /live/initrd1.xz
Do not add edd=off. It will take more time but it will boot. Maybe edd=off is the problem for local apic.
Test if booting with this code without saving changes makes linuxcnc work.

Check also your BIOS settings. Maybe there is option to enable local apic from there.

Toni

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

#71 Post by vtpup »

Okay Toni I will try all you've posted.

I just also want to thank you for all the time and effort you've invested in this. It's amazing! Truly appreciated! :D :D :D
[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
perdido
Posts: 1528
Joined: Mon 09 Dec 2013, 16:29
Location: ¿Altair IV , Just north of Eeyore Junction.?

#72 Post by perdido »

Some interesting info about how the IBM Thinkpad 600 BIOS handles PNP ISA in a non-standard way
http://users.wowway.com/~zlinuxman/tp600.htm#ISA


.

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

#73 Post by Revolverve »

Strange ,maybe not or half weird... I'll try to be clear..
All with first iso:
>Sim start fine with libgl1mesa +- bla bla, ok

(Half weird because sim dont need realtime)
>Enabled realtime in startup services ,reboot , sim wont work anymore(cannot load/find module rtai ++...process killed).
(strange)
>Could not disable from startup services ,unchecking the realtime work ,but realtime is still check if you reopen the gui ,tried save /reboot ,realtime option still enabled, look unable to be disable!!!
Confirmed with a fresh change.dat.

Not sure if realtime is needed as enabled service at boot to "physicaly" use a cnc/mill/3dprinter?? ,I think it is needed.
.I did not hook it to any machine yet
If someone with linuxcnc knowledge could confirm.
Of what I remember of live ubuntu emc2 tried years ago there was 2 emc2 choices ;1 for simulator and 1 for realtime .
Last edited by Revolverve on Tue 16 Sep 2014, 21:41, edited 1 time in total.

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

#74 Post by vtpup »

Toni, just to catch you up with where I am in testing:

I created two systems, one with the old system altered per your in structions to version 2.5 of linuxcnc.

And another one (after putting changes and live into another folder to keep them from interfering, and making a new /live folder with the contents from the /live on the ISO. Then I commented out my old boot stanza on grub menu.list, and copied exactly your new stanza, and booted the system. There was no EDD=off.

Both ways had the same behavior as before with the same error messages.

btw I had added EDD=off originally because the system seemed to hang when booted from SR0. I don't know why. But now it boots okay from HD without that cheatcode.
[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

#75 Post by saintless »

Thanks, Revolverve, Vtpup, Perdido.

From what I read maybe linuxcnc works only in demo mode now but not for real work?
And Vtpup is the only one who can make real testing at the moment but it does not work for him even in demo mode? :)

What I can add is the 1.1Gb Debian version works the same way for me. I need to repeat the same steps made with DebianDog to make linuxcnc start.

For the moment I have no more ideas what to test with DebianDog version. Unfortunately I can't test it for real work. Maybe someone will find a fix to make it work later...

Since there are linuxcnc live cd versions for modern hardware we are back to the starting point finding small fast linuxcnc version that works on IBM Thinkpad 600.
The only one working for now is Ubuntu8.4. I will play for a while with this one till we get some more ideas for DebianDog version.

Vtpup - I can't make this version to save changes for me from CD boot or frugal install. How did you upgraded linuxcnc in Ubuntu8.4 version. Is it full install or frugal? And what gives dmesg message about local apic (enabled or disabled) while you use Ubuntu 8.4 linuxcnc?

Toni

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

#76 Post by vtpup »

Thanks again Toni for all your help and work. I will answer your questions later this morning, but I have a few more clues, I think:

When I was running in DebDog w/ lincnc2.5 I chose instead of sim>axis>gantry the entry for latency test. This was simpler because it gave only one error message in terminal: 'inserti rtai_hal not permitted.'

I think that is the crucial problem, not necessarily apic.

So with that single error I checked the error message log and saw another message at that time 'rtai_hal.ko not found.'

Okay so it seems to me that the problem might be as simple as a file not found because of file location.

LinuxCNC keeps its kernel modules in an unusual place, puts a link to it in the usual module location (/lib/modules/kernelversion/kernel/) and also runs a script that automatically loads and unloads modules.

I'm thinking that something in this is broken.

What I'd like to do is see if I can load rtai_hal.ko manually, check that it is indeed loaded, and then run the latency test. If it runs, great.

If it doesn't, check again that rtai_hal is still loaded.

If not then the auto load script has removed it.

I am trying to learn more about loading and unloading modules and the module commands insmod, depmod, modprobe, etc.

This is a very good page for explaining this:

http://www.tldp.org/LDP/lkmpg/2.6/html/x44.html
[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:

#77 Post by vtpup »

After more trials and looking at logs, I now think that rtai_hal does briefly get loaded but aborts when local apic is configured but doesn't work.

As a guess, the much earlier kernel (2.6.24-16-rtai) in the Ubuntu 8.04 liveCD version handles the Thinkpad 600e bios apic bios quirks better than the much later 3. series kernels. These were actually Pentium II / Win 98/2000 era computers and onboard processor APIC was new and just being developed -- formerly handled by support chips. APIC was first utilized (with problems) in WinXP. So my thinking is that early kernels were able to work with older computers differences/quirks for apic.


Toni, to answer your question about how I upgraded from the original 8.04 Ubuntu/LinuxCNC version to 2.54 version of LinuxCNC ----

I just followed the instructions on the LinuxCNC Site. First do this:

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

then do this:

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

It sounds like you are trying to do it on a frugal system, while I made my changes on a full install.

Maybe I can remaster that full install to a liveCD again and get the ISO to you?

I remember doing that once way back in the Ubuntu 7.04 days


Oh, also to answer your other question, I went through DMESG and logs in the Ubuntu linuxcnc installation and there are NO references to either APIC or LAPIC. I did a search on each of those terms.


I also have found a reference to IBM Thinkpad 600X working well with linuxcnc Ubuntu 8.04 here:

http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Latency-Test

This also provides a lot of information about other computers.
[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]

anikin
Posts: 994
Joined: Thu 10 May 2012, 06:16

#78 Post by anikin »

vtpup,

did you try acpi=off and apm=off boot options?
machines of that era did not support acpi at all and didn't work well with apm too. If there are any power config options in BIOS, those should be disabled too.

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

#79 Post by Revolverve »

Look already a complex project...choosing old laptop to run it make it harder.

&more problem could come http://www.linuxcnc.org/index.php/engli ... k?start=20

Anybody happen to know how come there is a realtime option in startup services or do I miss something there..

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

#80 Post by saintless »

Edit: Second testing version uploaded. More information here:
http://www.murga-linux.com/puppy/viewto ... 024#800024

Hi, Vtpup.
Testing iso for you. Please, anyone reading this do not mirror it. It is not ready for public use. I will keep it available for download long ehough.

I can only say Ubuntu is much different from Debian and it is much harder to shape it and modify it than Debian. I will never try the same again with Ubuntu even if it can be made fast and small like Puppy.

Download link for Ubuntu8.4-test-1.iso - 415Mb
md5sum 21c895bc91293d7386d7e0eda24f210a

It is the same ubuntu that works on your machine with some removed programs and upgraded to version 2.5.4 linuxcnc.
If you prefer to burn the cd use the first boot option only (no changes to the system menu). others will not work,
It will boot to command prompt as user ubuntu (the passwword is blank field - no password).
You can type also sudo login and login as root with password root.
startx does not work yet. Type xinit and then in xinit terminal type jwm or blackbox (the choice is yours). Open new terminal from the menu and type linuxcnc

You can make easy frugal install by copying /casper folder from the CD to sda6 and adding this boot code:

Code: Select all

title Ubuntu-testing
rootnoverify (hd0,5)
kernel /casper/vmlinuz boot=casper
initrd /casper/initrd.gz
You can add swapon to the kernel boot line to auto-swap partition or execute swapon /dev/sdX from terminal after boot.
It will boot to command prompt. Login as root with password root. User ubuntu is not active from frugal install.

No way to use save file (initrd.gz needs patching to use casper-rw save file).
You can make very easy full install and continue removing or adding programs with apt-get but we will discuss this option if linuxcnc works and I didn't break anything important for your machine.
There is much more cleaning to be done and we can make it smaller.
As it is now the system is very fast on my 128Mb machine.
If you see it as good option at least as full install I will try to shape and clean it better.

Toni
Last edited by saintless on Sat 20 Sep 2014, 13:37, edited 1 time in total.

Post Reply