Updating LinuxCNC to a new minor release (ie to a new version in the same stable series, for example from 2.7.0 to 2.7.1) is an automatic process if your PC is connected to the internet. You will see an update prompt after a minor release along with other software updates. If you don’t have an internet connection to your PC see Updating without Network.
1. Upgrade to the new version
This section describes how to upgrade LinuxCNC to version 2.7 from version 2.6. It assumes that you have an existing 2.6 install that you want to update to 2.7.
To upgrade LinuxCNC to version 2.7 from a version older than 2.6, you have to first upgrade to 2.6, then follow these instructions to upgrade to 2.7.
If you do not have an old (pre-2.7) version of LinuxCNC to upgrade, then you’re best off making a fresh install of 2.7 as described in the section Getting LinuxCNC.
To upgrade major versions like 2.6 to 2.7 when you have a network connection at the machine you need to disable the old linuxcnc.org apt sources and add a new linuxcnc.org apt source for 2.7, then upgrade LinuxCNC.
The details will depend on which platform you’re running on. Open a terminal then type lsb_release -ic to find this information out:
lsb_release -ic Distributor ID: Debian Codename: wheezy
You should be running on Debian Wheezy (as above), or Ubuntu Precise, or Ubuntu Lucid.
1.1. Setting apt sources
-
Open the Software Sources window. The process for doing this differs slightly on the three supported platforms:
-
Debian Wheezy:
-
Click on Applications Menu, then System, then Synaptic Package Manager.
-
In Synaptic, click on the Settings menu, then click Repositories to open the Software Sources window.
-
-
Ubuntu Precise:
-
Click on the Dash Home icon in the top left.
-
In the Search field, type "software", then click on the Ubuntu Software Center icon.
-
In the Ubuntu Software Center window, click on the Edit menu, then click on Software Sources... to open the Software Sources window.
-
-
Ubuntu Lucid:
-
Click the System menu, then Administration, then Synaptic Package Manager.
-
In Synaptic, click on the Settings menu, then click Repositories to open the Software Sources window.
-
-
-
In the Software Sources window, select the Other Software tab.
-
Delete or un-check all the old linuxcnc.org entries (leave all non-linuxcnc.org lines as they are).
-
Click the Add button and add a new apt line. The line will be slightly different on the different platforms:
Platform | apt source line |
---|---|
Debian Wheezy |
deb http://linuxcnc.org wheezy base 2.7-rtai |
Ubuntu Precise |
deb http://linuxcnc.org precise base 2.7-rtai |
Ubuntu Lucid |
deb http://linuxcnc.org lucid base 2.7-rtai |
-
Click Add Source, then Close in the Software Sources window. If it pops up a window informing you that the information about available software is out-of-date, click the Reload button.
1.2. Upgrading to the new version
Now your computer knows where to get the new version of the software, next we need to install it.
The process again differs depending on your platform.
1.2.1. Debian Wheezy and Ubuntu Lucid
Debian Wheezy and Ubuntu Lucid both use the Synaptic Package Manager.
-
Open Synaptic using the instructions in Setting apt sources above.
-
Click the Reload button.
-
Use the Search function to search for linuxcnc.
-
Click the check box to mark the new linuxcnc and linuxcnc-doc-* packages for upgrade. The package manager may select a number of additional packages to be installed, to satisfy dependencies that the new linuxcnc package has.
-
Click the Apply button, and let your computer install the new package. The old linuxcnc package will be automatically upgraded to the new one.
1.3. Ubuntu Precise
-
Click on the Dash Home icon in the top left.
-
In the Search field, type "update", then click on the Update Manager icon.
-
Click the Check button to fetch the list of packages available.
-
Click the Install Updates button to install the new versions of all packages.
2. Updating without Network
To update without a network connection you need to download the deb then install it with dpkg. The buildbot builds new debs each time something is updated and stores them at http://buildbot.linuxcnc.org/dists/
You have to drill down from the above link to find the correct deb for your installation. Open a terminal and type in lsb_release -ic to find the name of your OS.
> lsb_release -ic Distributor ID: Debian Codename: wheezy
Pick the OS from the list then pick the major version you want like 2.7-rt for real time or 2.7-sim for the simulator only.
Next pick the type of computer you have i386 for 32 bit and amd64 for 64 bit.
Next pick the version you want from the bottom of the list like linuxcnc_2.7.4.46.g5954dcf_i386.deb. Download the deb and copy it to your home directory. You can rename the file to something a bit shorter with the file manager like linuxcnc_2.7.4.deb then open a terminal and install it with the package manager with this command sudo dpkg -i linuxcnc_2.7.4.deb
sudo dpkg -i linuxcnc_2.7.4.deb
3. Updating Configuration Files
LinuxCNC version 2.7 differs from version 2.6 in some ways that may require changes to your machine configuration.
3.1. Mesa Hardware
3.1.1. Hostmot2 Watchdog
If you have Mesa hardware the Hostmot2 watchdog now gets handled by the hm2 write Hal function. Remove any addf lines that refer to the pet_watchdog function from your main hal file.
3.1.2. Hostmot2 dpll
The Hostmot2 dpll’s default time constant has been changed from 40960 to 2000. The original value could occasionally lead to following errors when software like ntpd and ntpdate adjusted the rate of the linux CLOCK_MONOTONIC time source by up to 1000ppm in a single step. The new value allows the dpll to adjust to the change in the base period frequency without error.
3.2. Parallel Port
If you use the Parallel Port driver there are some changes. Older versions of the LinuxCNC hal_parport driver conflicted with the Linux parport_pc driver. This required two mitigation techniques, prevent parport_pc from loading, and load another LinuxCNC driver called probe_parport before loading hal_parport.
The LinuxCNC hal_parport driver now cooperates well with the Linux parport_pc driver, and these mitigation techniques are no longer needed or useful. In 2.7, the probe_parport driver has been removed from LinuxCNC.
This means configs that use the parallel port may need to be updated in the following ways:
-
Make sure LinuxCNC does not prevent the Linux parport_pc driver from loading. Older versions of LinuxCNC would blacklist parport_pc in /etc/modprobe.d/linuxcnc.conf (or /etc/modprobe.d/emc2.conf for even older versions of LinuxCNC). Comment out any lines in either of those files that looks like this:
install parport_pc /bin/true -
Make sure your Hal configuration does not have loadrt probe_parport in any .hal file.
3.3. Huanyang VFD
A driver for the Huanyang family of VFDs was added to LinuxCNC 2.7. Before 2.7, the Huanyang VFD driver was maintained separately from LinuxCNC.
If you use a Huanyang VFD and are switching to the LinuxCNC version of the driver, you’ll need to make a few changes to your HAL config.
old hy-vfd driver | 2.7 hy-vfd driver |
---|---|
hy_vfd.fwd |
hy_vfd.forward |
hy_vfd.rev |
hy_vfd.reverse |
hy_vfd.modbus-ok |
hy_vfd.hycomm-ok |
hy_vfd.motor-pole-number |
(removed) |
hy_vfd.base-freq |
(removed) |