What to do with these PCs?

More
10 Dec 2013 16:44 #41462 by ArcEye
Replied by ArcEye on topic What to do with these PCs?

In hindsight, should I have installed linux-headers-3.8.0-rtai-i386-IntelAtom.deb at that stage? Instinct says 'no' but I was in copy/paste heaven at the time...


Definately not, the page says

Instructions for building Linuxcnc are the same as under the 3.8.0-rtai kernels


The deb already includes a prebuilt realtime, kernel modules and kernel headers, it is just Linuxcnc that required and is common to both.

Please also note the bit about gcc 4.4 That is what the kernel etc was built with and using the stock gcc 4.7 will produce modules that cannot be read, even if it compiles
(assuming they have fixed the bug which stopped me using it in the first place)

I should remove everything and start again

dpkg -r and dpkg -p don't seem to be working..


dpkg takes the deb file name as an argument to install, but requires the package name to remove

eg

dpkg -i 3.5.7-rtai-UP-1.deb to install
but
dpkg -r 3.5.7-rtai-up to remove

regards

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

More
11 Dec 2013 03:05 - 11 Dec 2013 07:30 #41478 by birchy
Replied by birchy on topic What to do with these PCs?
Yeah, it's obvious now but I obviously had "duh" moment. Just to confirm before I re-install:

Install Debian & RTAI Kernel
1. Install Debian Wheezy
2. Boot default PAE kernel
3. launch terminal
4. wget www.mgware.co.uk/debian/3.5.7-rtai-UP-1.deb
5. su [enter password]
6. apt-get install cpp-4.4 gcc-4.4 g++-4.4 libstdc++6-4.4-dev
7. rm /usr/bin/cpp && rm /usr/bin/gcc && rm /usr/bin/gcov && rm /usr/bin/g++
8. ln -s /usr/bin/cpp-4.4 /usr/bin/cpp && ln -s /usr/bin/gcc-4.4 /usr/bin/gcc && ln -s /usr/bin/g++-4.4 /usr/bin/g++ && ln -s /usr/bin/gcov-4.4 /usr/bin/gcov
9. dpkg -i 3.5.7-rtai-UP-1.deb
10. update-grub
11. reboot

Install LinuxCNC
1. launch terminal
2. su [enter password]
3. apt-get install build-essential debhelper kernel-package libpth-dev libgtk2.0-dev tcl8.5-dev tk8.5-dev bwidget python-old-doctools python-tk python-dev
4. apt-get install libglu1-mesa-dev libgtk2.0-dev libgnomeprintui2.2-dev libncurses5-dev libxaw7-dev gettext libreadline-gplv2-dev lyx texlive-extra-utils imagemagick texinfo groff libmodbus-dev
5. apt-get install libudev-dev libmodbus-dev libboost-python-dev libboost-serialization-dev libboost-thread-dev libtk-img automake autoconf libtool xutils-dev
6. wget www.mgware.co.uk/debian/linuxcnc-3.8.0-rtai-i386-IntelAtom.deb Is this correct version??
7. dpkg -i linuxcnc-3.8.0-rtai-i386-IntelAtom.deb
8. cd /usr/src
9. mkdir /home/birchy/src
10. cp -R linuxcnc-dev-rtai /home/birchy/src
11. chown -R birchy:birchy /home/birchy/*
12. exit [leave su]
13. cd /home/birchy/src/linuxcnc-dev-rtai/src
14. ./autogen.sh
15. ./configure
16. make
17. sudo make setuid

Launch LinuxCNC
1. cd /home/birchy/src/linuxcnc-dev-rtai
2. . scripts/rip-environment
3. linuxcnc

Does that sound right? I wonder....how hard is it to compile all this to a CD or DVD to create a complete debian linuxcnc installation iso?

EDIT: Does the linuxcnc install actually require ALL of those build tools and libs?
Last edit: 11 Dec 2013 07:30 by birchy.

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

More
11 Dec 2013 17:22 #41505 by ArcEye
Replied by ArcEye on topic What to do with these PCs?
Hi

All sounds fine, if that is what I wrote its right.

6. wget www.mgware.co.uk/debian/linuxcnc-3.8.0-rtai-i386-IntelAtom.deb Is this correct version??


The package is named that ,because that is what I packaged it for, there seemed no point in having 2 packages which contained exactly the same thing with different names

I wonder....how hard is it to compile all this to a CD or DVD to create a complete debian linuxcnc installation iso?


If you want to do so, knock yourself out
That is precisely what the developers are trying to get away from, having to support a complete distro rather than just the software for Linuxcnc
If you have ever tried building or maintaining bootable CD like Knoppix, you will know it is not as simple as it might seem

EDIT: Does the linuxcnc install actually require ALL of those build tools and libs?


All these pakages are required to build a kernel, build realtime and then compile Linuxcnc, I could not be bothered to seperate out those only required by kernel / realtime

If you want to repeatedly run ./configure until it halts with a missing dependency, install that and then repeat ad infinitum, be my guest.
It will seem to take twice as long as just setting up to download the lot and going away for 20 mins and having a coffee or something

regards

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

More
12 Dec 2013 07:18 - 12 Dec 2013 07:27 #41531 by birchy
Replied by birchy on topic What to do with these PCs?
I did a clean install of Debian Wheezy 7.2, installed gcc 4.4 (as per your guide), then rtai kernel. The kernel boots ok with no obvious errors. Then I installed the 3 lines of tools (build-essential, etc), downloaded your linuxcnc-3.8.0-rtai-i386 deb and ran through the installation commands down to ./configure. All seemed to run fine with no errors reported, however 'make' fails, complaing about linking errors.
Compiling realtime rtapi/rtapi_pci.c
rtapi/rtapi_pci.c: In function ‘pci_enable_device’:
rtapi/rtapi_pci.c:670:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
rtapi/rtapi_pci.c:671:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
Linking ../rtlib/rt-preempt/rtapi.so
`__x86.get_pc_thunk.bx' referenced in section `.text' of objects/rt-preempt/rtapi.tmp: defined in discarded section `.text.__x86.get_pc_thunk.bx[__x86.get_pc_thunk.bx]' of objects/rt-preempt/rtapi.tmp
`__x86.get_pc_thunk.bx' referenced in section `.text' of objects/rt-preempt/rtapi.tmp: defined in discarded section `.text.__x86.get_pc_thunk.bx[__x86.get_pc_thunk.bx]' of objects/rt-preempt/rtapi.tmp
`__x86.get_pc_thunk.bx' referenced in section `.text' of objects/rt-preempt/rtapi.tmp: defined in discarded section `.text.__x86.get_pc_thunk.bx[__x86.get_pc_thunk.bx]' of objects/rt-preempt/rtapi.tmp
`__x86.get_pc_thunk.bx' referenced in section `.text' of objects/rt-preempt/rtapi.tmp: defined in discarded section `.text.__x86.get_pc_thunk.bx[__x86.get_pc_thunk.bx]' of objects/rt-preempt/rtapi.tmp

...etc, etc...

`__x86.get_pc_thunk.bx' referenced in section `.text' of objects/rt-preempt/rtapi.tmp: defined in discarded section `.text.__x86.get_pc_thunk.bx[__x86.get_pc_thunk.bx]' of objects/rt-preempt/rtapi.tmp
`__x86.get_pc_thunk.bx' referenced in section `.text' of objects/rt-preempt/rtapi.tmp: defined in discarded section `.text.__x86.get_pc_thunk.bx[__x86.get_pc_thunk.bx]' of objects/rt-preempt/rtapi.tmp
collect2: error: ld returned 1 exit status
make[1]: *** [../rtlib/rt-preempt/rtapi.so] Error 1
make[1]: Leaving directory `/home/birchy/src/linuxcnc-dev-rtai/src'
make: *** [modules] Error 2
make: Leaving directory `/home/birchy/src/linuxcnc-dev-rtai/src'
birchy@linuxcnc:~/src/linuxcnc-dev-rtai/src$ 

The linuxcnc-dev-rtai/README suggests reading docs/INSTALL, however that file doesn't even exist in the source. So it looks like I'm gonna have to do some googling or (reluctantly) install the Ubuntu 8.04 version.

Thanks for your help Arceye. I'll post any further questions in the 'installation' sub forum rather than here.


EDIT: Scratch that, gcc -v is saying it's using version 4.7 and NOT the 4.4. Dunno why (yet) but I copy/pasted from your guide so something must of went tits up but didn't throw an error.
Last edit: 12 Dec 2013 07:27 by birchy.

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

More
12 Dec 2013 16:55 #41537 by ArcEye
Replied by ArcEye on topic What to do with these PCs?

Scratch that, gcc -v is saying it's using version 4.7 and NOT the 4.4.



Yes it is, the error specific to x86 code caused by the bug in gcc 4.7 produces this linking error

__x86.get_pc_thunk.bx' referenced in section `.text' of objects/rt-preempt/rtapi.tmp: defined in discarded section `.text.__x86.get_pc_thunk.bx[__x86.get_pc_thunk.bx]' of objects/rt-preempt/rtapi.tmp


You need to look at /usr/bin and see what the symlinks cpp, gcc, g++ and gcov point to

install mc (midnight commander) and run it from a terminal, you can then highlight a symlink and it will display the link, you can edit it with Ctrl X Ctrl S

A lot of links point by default to /etc/alternatives from where you will be re-routed to 4.7 again. You want them to point specifically to to the 4.4 version of whichever executable it is.

The commandline on the site should have worked, but I suspect you have installed, uninstalled and run it twice in the process, so the links are probably screwed.

regards
The following user(s) said Thank You: birchy

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

More
13 Dec 2013 01:13 - 13 Dec 2013 07:08 #41550 by birchy
Replied by birchy on topic What to do with these PCs?
Thanks for your help. I'll have another go, but this time I'll check the gcc version BEFORE continuing! Last night, I noticed the symbolic link code didn't seem to work until the pc had been rebooted. Seems odd though?

If all else fails, is there a linuxcnc deb I can add to sources.list that will work with your rtai kernel? Or some other idiot-proof way to install linuxcnc on Wheezy?

EDIT: The plot thickens...after running the 3 apt-get installs that install build-essential, etc, gcc had reverted back to version 4.7. So I re-ran rm /usr/bin/cpp /usr/bin/gcc /usr/bin/gcov /usr/bin/g++ and rebuilt the symbolic links with your ln -s /usr/bin/cpp-4.4 [etc] code. Now gcc -v shows version 4.4 again. I then installed linuxcnc from your .deb and all seemed to run OK, however...after starting the rip-environment, linuxcnc launches OK but latency-test fails. It reports errors hal_lib, rtapi, rtai_math, rtai_sched, rtai_hal and shmdrv did not load (unable to locate shmdrv.ko).

Suggestions?
Last edit: 13 Dec 2013 07:08 by birchy.

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

More
13 Dec 2013 15:07 #41574 by ArcEye
Replied by ArcEye on topic What to do with these PCs?

.................linuxcnc launches OK ............


Does this mean you can run Linuxcnc?

If so forget about latency-test, it always produces messages like this from the terminal

# latency-test
msgd:0 stopped
hal_lib not loaded
rtapi not loaded
rtai_math not loaded
rtai_sched not loaded
rtai_hal not loaded
shmdrv not loaded


You can run a latency test from the realtime testsuite from a terminal

/usr/realtime/testsuite/user/latency/run

If all else fails, is there a linuxcnc deb I can add to sources.list that will work with your rtai kernel? Or some other idiot-proof way to install linuxcnc on Wheezy?


If there was I would not have bothered with all those instructions

There is only one version of Linuxcnc that will run on later kernels and that is only available as sources currently, because it is not part of the main project yet

regards

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

More
14 Dec 2013 01:21 #41591 by birchy
Replied by birchy on topic What to do with these PCs?

Does this mean you can run Linuxcnc?

If I run 'linuxcnc' in a terminal, the initial config window loads OK, but I didn't actually try setting up my machine. I simply closed the window and hit latency-test as I couldn't see the point in running stepconf if latency is crap.

Just for my own sanity, I installed the rt-pae kernel in the repos and then linuxcnc as detailed HERE . Latency test runs fine but gives poor results of around 50k.

I'm gonna do another clean install (if the CD hasn't worn out yet!). I'll change the order slightly so that build-essential is installed BEFORE gcc-4.4 so that the symbolic links will persist.

If there was I would not have bothered with all those instructions

I guessed that, but wasn't sure if you were just 'hardcore'. :lol:

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

More
14 Dec 2013 10:24 - 14 Dec 2013 10:27 #41600 by birchy
Replied by birchy on topic What to do with these PCs?
I now have linuxcnc running on Wheezy 7.2 (thanks for your patience), however I'm seeing latency spikes of 42k. The HP motherbard has a limited BIOS (and can't be upgraded), although I've managed to disable audio and other unused hardware. I've also disabled the power manager in the startup apps. The latency test *mostly* runs at <4k but has occasional spikes. Disabling the rt2800usb driver for my wifi dongle helps, but not a lot. Before I give up on this hardware, is there anything else I can do to improve latency?

Dmesg doesn't show anything new when the spikes occur. Will disabling any of the processes in the attached file help?

The next stage is to try Debian on my other (MSI K8 AMD) hardware and if that fails, the last resort is to try Ubuntu 8.04 on both. I'm hoping I won't get as far as the last resort...

File Attachment:

File Name: ps-e.txt
File Size:6 KB
Attachments:
Last edit: 14 Dec 2013 10:27 by birchy. Reason: had to add .txt to file

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

More
14 Dec 2013 20:07 - 14 Dec 2013 20:21 #41605 by ArcEye
Replied by ArcEye on topic What to do with these PCs?
Hi

Glad you have it running
Unfortunately the HP board looks like the worst contender, even based on your earlier trials, so hopefully one of the others will be better.

I had good results with a P4 board 1GB of RAM and a Raedon 32MB AGP card. The video card got rid of all the spikes in the latency, which was due to using the onboard chip with shared resources.

Running the testsuite latency test I highlighted is a good way to track the spikes. It will show if they coincide with say graphics events, disk access, network access etc or if they are regular timed as with SMI.
(Don't know if this board is Intel based, check chipset number and revision against the list on my FAQ if it is)
www.linuxcnc.org/index.php/english/forum...me-latency-solutions

Dmesg doesn't show anything new when the spikes occur. Will disabling any of the processes in the attached file help?


The only thing that leaps out is the acpi daemon

You do not need it, because all ACPI etc is disabled in the kernel so it does not do anything. I don't know if preventing it loading from /etc/init.d will improve latency, it cannot hurt

There are some other ones like firewire, bluetooth etc that are seldom used and I remove routinely.
You have a mousepad driver loaded, assuming this is not a laptop, do you need that?

Other possibles are atd and cron.

You also have a ext4 driver listed ext4-dio-unwrit
Not only can this cause a lot of unexpected disk activity,
see forums.gentoo.org/viewtopic-t-921108-start-0.html
I never use a journalling file system on a cnc machine, because of the constant disk writes.

This becomes even more important if you are running off a CF card, DOM, SSD etc, with a finite lifespan in terms of read/write operations

When you try installing on other machines, I would recommend using ext2

regards
Last edit: 14 Dec 2013 20:21 by ArcEye.
The following user(s) said Thank You: birchy

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

Time to create page: 0.092 seconds
Powered by Kunena Forum