LinuxCNC from source - RIP Environment problems

More
09 Jan 2014 17:32 - 09 Jan 2014 17:37 #42541 by ArcEye

Bugger my luck, the kernel has installed and booted OK, however the 'make' command in RTAI throws the attached output. Autogen and 'make menuconfig' appear to run fine. Could this be due to me setting the cpu in kernel menuconfig as AMD K8 (default was Pentium Pro) and cpus = 1? That config is correct for my hardware, but I'm wondering if you've got other configs setup for Intel?


You are forcing me to recall stuff I fixed many months back
I searched the net and found my own answer (the one I posted) :laugh:

Its because you have never mentioned you are trying to build for a uni-processor, if you originally downloaded my debs for UP, that will be why they worked so much better than the other kernel you tried.

You will need to start again with the kernel, run make clean then make menuconfig.

By selecting a single cpu, you deselected Enable APIC and APIC IO, you need to select them and rebuild. It doesn't matter to the kernel, but rtai relies upon them.

I think they are on the same page 'Processor type and settings' and you may just see 'Enable APIC' and when you check that the 'APIC IO' becomes visible, check that too.

Then rebuild

When you next build RTAI, you will probably get an error about missing includes in bits/xxx and asm/xxx
Go into /usr/include/i386-linux-gnu and symlink all the 4 folders and the files in it back to /usr/include (or just copy them if symlinking is too difficult)

I think that should get RTAI built, but await your next missive

regards
Last edit: 09 Jan 2014 17:37 by ArcEye.

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

More
11 Jan 2014 01:47 #42584 by birchy
Once again, thanks for your patience. I'm no newbie but am starting to find this whole linuxcnc thing a bit frustrating after a couple of months of farting about. I'm starting to think I'd of been better off just buying a couple more mobos and hope to find one that can run Ubuntu 10.04 or Seb's kernels without latency issues.

I'm going to try building this kernel again over the weekend for both my UP computers. If I fail, will it be a PITA for you to build a UP deb for me? I'll gladly donate beer tokens as I really need to get the software sorted so I can finish my mill conversion and start making some swarfe...

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

More
12 Jan 2014 00:41 - 12 Jan 2014 01:08 #42619 by ArcEye
Hi

If I fail, will it be a PITA for you to build a UP deb for me?


As a backup plan, available for a short time only, is a deb which contains a full binary build of UP build of 3.5.7-rtai, kernel, modules, realtime, headers and linuxcnc
You just need to install it and run the RIP in /usr/src/linuxcnc-dev-rtai as sudo
You can play with building your own RIP to your hearts content later. (or just chown the existing one)

I have just built it on a P4 and reinstalled it to the P4 from the deb and it all works
It is for Debian 7

sudo dpkg -i debian7-3.5.7-rtai-up.deb
sudo update-grub
reboot
select 3.5.7-rtai kernel and you are away

(Now removed)

153539K md5sum f68f460e1e07ef04950ef1281f67239e

Hopefully you will suceed with your current build, but this is your safety net

regards
Last edit: 12 Jan 2014 01:08 by ArcEye.

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

More
12 Jan 2014 00:59 #42620 by birchy
Ironically, I've just managed to get decent latency figures on Seb's 3.4.55 kernel. Turned out that the CDROM was causing the spikes. Now getting a solid looking 12.6K latency. The bonus is that I've ended up with 2 "idiot proof" bash scripts that can install the kernel and linuxcnc without needing to type endless commands.

Just downloaded your 3.5.7 deb so you can take it down if you want. Thanks for taking the time to create the deb. I presume it'll be best installed with gdebi to avoid any dependency issues?

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

More
12 Jan 2014 01:08 #42621 by ArcEye

I presume it'll be best installed with gdebi to avoid any dependency issues?


I didn't create any dependencies, it is just a medium to install the files, because I know you already have the other stuff installed

Glad you found an answer

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

More
14 Jan 2014 08:09 - 14 Jan 2014 08:16 #42733 by birchy
Well, you'll be pleased to know that I'm currently running the linuxcnc latency-test under your 3.5.7 rtai kernel. I did have a FFS moment when building RTAI but it was the error you mentioned previously and sym-linking the 4 folders in /usr/include/i386-linux-gnu solved it. There were a LOT of warnings in the 'make' output but it seems to be working OK.

Currently get latency of around 6.5K on the P4 machine but it has occasional spikes of around 25K and I can't seem to resolve them. Unloading the rt2800usb module for my wifi dongle helps (latency was 40K before) but I'm not sure how to trace the spikes? I have 2 radeon pci-e graphics cards. Currently testing with the "best" one.

The BIOS is optimized to disable unused features but it's an old HP motherboard and doesn't have a lot of options.

It might just be a poor candidate as it also spikes using seb's 3.4.55 kernel. Having said that, the Ubuntu 8.04 version of linuxcnc gets around 12K latency under heavy loading but I wasn't able to get a decent driver for the graphics card. Any suggestions before I go back to the AMD K8?

EDIT:
I've noticed that the P4 logo at startup says "Hyper Threading" can't see any options in BIOS to disable it. Not sure if that comes into play or not?
Last edit: 14 Jan 2014 08:16 by birchy.

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

More
14 Jan 2014 15:30 - 14 Jan 2014 20:20 #42749 by ArcEye
Got there at last

The warnings are largely the same 2 repeated over and over at the end. Since it works I have never looked at them too much.

Regards spikes, run the latency test described in the link below and see when they are occurring
www.linuxcnc.org/index.php/english/forum...me-latency-solutions

Yes you do want to disable hyper-threading, look hard for it

Can be as simple as a USB mouse or keyboard, always try PS2 ones

Regards video cards, I didnt know any P4s had PCIe slots, mine all use AGP and inserting a dirt cheap (6GBP) Raedon 32MB card cured all the spikes I was getting from on-board graphics, which showed on mouse and window moves.

Now you know the deb works, you have an easy install method and can experiment between your boards
regards

PS

You are not restricted to P4 computers, the instruction set is fairly general, the only thing special about the K8 was that it was the start of AMDs 64 bit hammer processors.
The kernel should run on most UP boards of similar vintage
Last edit: 14 Jan 2014 20:20 by ArcEye.

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

More
15 Jan 2014 01:54 - 16 Jan 2014 05:06 #42778 by birchy
I think most of the make warnings were related to C/C++ casting. I remember back in the days when I played with C and C++ (before I discovered Python), that it was a PITA to determine how many bits an integer used on different architectures. I also got myself into trouble on a regular basis with alloc and malloc and out of bounds array indexes. Needless to say, Python is a godsend for the stuff I do. Bit off topic, but my website might (or might not) interest you if you ever use Betfair. I owe you several favours if you ever fancy a dabble with my source codes... www.bespokebots.com.

I know nothing about hyperthreading, is it something I can disable at the kernel or OS level? The BIOS is not upgradeable - it's a proprietary HP one.

Sadly, there's no AGP slot on this machine. It doesn't have onboard graphics either. I do have a standard PCI graphics card, so might be worth a try...

The mobo and cpu cost me 20 quid on ebay so if all else fails, I'll use my AMD one instead. Have been looking at D525MW boards but they fetch silly money and (as far as I can tell), won't improve on the 12.5K latency I get from my AMD.

EDIT:
Forget to mention I haven't tried your deb yet. I installed the kernel from source.
Last edit: 16 Jan 2014 05:06 by birchy. Reason: typo in url

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

More
15 Jan 2014 15:30 #42810 by ArcEye

I think most of the make warnings were related to C/C++ casting. I remember back in the days when I played with C and C++ (before I discovered Python), that it was a PITA to determine how many bits an integer used on different architectures. I also got myself into trouble on a regular basis with alloc and malloc and out of bounds array indexes. Needless to say, Python is a godsend for the stuff I do.


I was thinking of all the FMA_FAST etc warnings at the end I think it is a definition, but as I said as it works I let it be, had enough trouble getting it to work in the first place :laugh:

Bit off topic, but my website might (or might not) interest you if you ever use Betfair. I owe you several favours if you ever fancy a dabble with my source codes... www.bepokebots.com.


I did look at it a while back, afraid when I saw it was to do with online betting I switched off (very risk adverse with my own hard earned)
Do you make a living at it or just enjoy writing stuff to beat systems?

I know nothing about hyperthreading, is it something I can disable at the kernel or OS level? The BIOS is not upgradeable - it's a proprietary HP one.


It is implemented in BIOS , HP probably could not foresee a situation where a user would not want the 'extra performance'

Forget to mention I haven't tried your deb yet. I installed the kernel from source.


Sounds easy when you say it quickly B)

The deb should provide a quick way to determine the likely latency figures for a machine and you can do a bespoke rtai kernel when you find a suitable one

regards

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

More
16 Jan 2014 01:56 #42843 by birchy
As a backup, I bought a HP DC7600 off ebay last night as it is reported to give good results on the latency wiki. My betfair "bots" have paid for it today, so yes, it IS possible to make an extra income from "betting". The thing to bear in mind is that the betfair exchange is more like a stock market than a bookmaker - you actually bet against other people and can both buy and sell positions. There are still enough mug punters around to make a few quid but it's by no means easy finding a long-term winning strategy. I've pocketed £42K over the last 2 years and am by no means one of the "big" boys. If you're good with data analysis and developing mathematical formulas you'll probably find it fairly straight forward. Finding the time to learn and develop is the biggest issue. My email address is on my website if you want to discuss this further.

Regarding hyperthreading, I've read that the P4 was about the worst implementation ever created. No option to disable in BIOS but (apparently?) adding 'noht' to the kernel boot params will work. It has reduced the latency spikes under heavy duress but I'm still seeing 26K and am aiming for <15K so have decided to abandon the P4 and concentrate on the AMD K8. If the DC7600 returns sub 10K as expected, I'll probably opt for that. I'll post my "easy install" scripts once I've tested them on a couple of different PCs so they can be proven on a larger scale.

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

Time to create page: 0.414 seconds
Powered by Kunena Forum