• Advertisement
Join the IT Notebook

CentOS 7.x - Kernel - Adding AppleTalk support without a kernel recompile

Any software title released with a GNU/Linux distribution. Articles are posted in "Linux Distribution - Software Title - Subject" format.

CentOS 7.x - Kernel - Adding AppleTalk support without a kernel recompile

Postby lmmtux » Thu Feb 22, 2018 3:23 pm

In order to get a Linux server to use the AppleTalk protocol, the kernel must have the AppleTalk module installed. This module is necessary for any software (such as the NetAtalk file server or AppleTalk router) to use AppleTalk and allow Macintosh or Apple II clients to connect. Note: AppleTalk is not needed for Macintosh OS X clients, which can use the AFP protocol over TCP/IP which does not need AppleTalk.


DKMS

Most Linux distributions do not have AppleTalk support built in or compiled in to the kernel. For CentOS, the CentOSPlus repository can be used to install the "centosplus" kernel which has the AppleTalk protocol compiled in. See this article for more information on how to install a "centosplus" kernel: http://www.itnotebook.info/topic314.html.

But, in some cases, an AppleTalk kernel is not available. For example: using CentOS on an ARM device, CentOSPlus is not available for the ARM architecture but only for x64_86. With ARM devices such as the Raspberry Pi, Banana Pi, and others becoming more popular, the need for this is increasing.

The DKMS (dynamic kernel module support) feature of the Linux kernel allows us to insert the appletalk module to a running kernel, without having to recompile the entire kernel. It does however involve compiling a single kernel module. Read below for steps on how to do this.


Compiling the AppleTalk module for DKMS

Follow these steps to compile and insert the AppleTalk module to any running kernel.


  1. Switch to the root user:
    Code: Select all
    su -
  2. Make an area for the source code:
    Code: Select all
    mkdir /usr/src/appletalk-1/
  3. Download the source for the kernel you are using. This depends on your distribution, however in this case we are using CentOS for ARM so it is here: http://vault.centos.org/altarch/7.4.1708/experimental/Source/i386/Source/SPackages/
  4. Unpack the source package with the command:
    Code: Select all
    rpm -i kernel*.src.rpm
  5. Navigate to the source code for the AppleTalk module:
    Code: Select all
    cd rpmbuild/BUILD/kernel-*/linux-*/net/appletalk
  6. Copy the AppleTalk source to the folder created earlier:
    Code: Select all
    cp -a * /usr/src/appletalk-1/
  7. Navigate to the source folder again:
    Code: Select all
    cd /usr/src/appletalk-1
  8. Create a new file with the nano command (or another editor of your choice):
    Code: Select all
    nano dkms.conf

    And place these lines in to this file:
    Code: Select all
    PACKAGE_NAME="appletalk"
    PACKAGE_VERSION="1"
    BUILT_MODULE_NAME[0]="appletalk"
    DEST_MODULE_LOCATION[0]="/kernel/net/appletalk/"
    AUTOINSTALL="yes"
  9. Save the file above.
  10. Run these commands to build, compile, and install the AppleTalk module for DKMS:
    Code: Select all
    dkms add -m appletalk -v 1
    dkms build -m appletalk -v 1
    dkms install -m appletalk -v 1
  11. Run the command to load the AppleTalk module in to the currently running kernel:
    Code: Select all
    modprobe appletalk
  12. If no errors are reported above, follow the remaining steps to ensure the AppleTalk module loads every time the system boots.
  13. Create a new file with your favorite text editor. Example using nano:
    Code: Select all
    nano /etc/sysconfig/modules/appletalk.modules

    Place these lines in to the file:
    Code: Select all
    #!/bin/sh
    exec /sbin/modprobe appletalk >/dev/null 2>&1
  14. Save the file above.
  15. This completes the steps. You should now have a running system with AppleTalk support.


More Information

See additional articles on this site on how to use NetAtalk and other software with AppleTalk.
lmmtux
 
Posts: 55
Joined: Mon Jul 30, 2012 9:40 pm
Reputation: 0

Return to Linux

cron