为了在您的 Linux 系统上成功安装 AX.25 支持,您必须配置并安装合适的内核,然后安装 AX.25 实用程序。
![]() | 与其从源代码构建和安装,您可能更喜欢为您的系统安装预构建的二进制软件包。Debian 和 RPM 格式的软件包可以在各种存档站点上找到,包括 http://www.debian.org 和 http://rpmfind.net;查找 “ax25”。顺便说一句,Debian Linux 发行版被许多人认为是更 “业余无线电友好” 的发行版之一,并以 Debian 软件包的形式提供了许多业余无线电应用程序(该项目的创始人之一是一位业余无线电爱好者)。 |
如果您已经熟悉编译 Linux 内核的过程,则可以跳过本节,只需确保在编译内核时选择合适的选项。如果您不熟悉,请继续阅读。您可能还想阅读 Linux 内核 HOWTO。
内核源代码通常解压到的位置是/usr/src目录,位于名为linux的子目录中。为此,您应该以root身份登录,并执行类似于以下的命令序列
# cd /usr/src # mv linux linux.old # tar xzvf linux-2.4.9.tar.gz # cd linux |
解压内核源代码后,您需要运行配置脚本,并选择适合您的硬件配置以及您希望构建到内核中的选项。您可以使用以下命令执行此操作
# make menuconfig |
如果您正在运行 X,您可以使用图形界面,方法是使用
# make xconfig |
您也可以尝试
# make config |
我将描述全屏方法 (menuconfig),因为它更容易导航,但请使用您最习惯的任何一种。
在任何一种情况下,您都将看到一系列选项,您必须回答 “Y” 或 “N”。(请注意,如果您正在使用模块,您也可以回答 “M”。为了简单起见,我将假设您没有使用模块,如果您正在使用模块,请进行适当的修改)。
与 AX.25 配置最相关的选项是
Code maturity level options ---> [*] Prompt for development and/or incomplete code/drivers ... General setup ---> ... [*] Networking support ... Networking options ---> <*> UNIX domain sockets ... [*] TCP/IP networking ... [?] IP: tunneling ... Amateur Radio Support ---> --- Packet Radio protocols [*] Amateur Radio AX.25 Level 2 protocol [?] AX.25 DAMA Slave support [?] Amateur Radio NET/ROM protocol [?] Amateur Radio X.25 PLP (Rose) AX.25 network device drivers ---> <?> Serial port KISS driver <?> Serial port 6PACK driver <?> BPQ Ethernet driver <?> High-speed (DMA) SCC driver for AX.25 <?> Z8530 SCC driver <?> BAYCOM ser12 fullduplex driver for AX.25 <?> BAYCOM ser12 halfduplex driver for AX.25 <?> BAYCOM picpar and par96 driver for AX.25 <?> BAYCOM epp driver for AX.25 <?> Soundcard modem driver [?] soundmodem support for Soundblaster and compatible cards [?] soundmodem support for WSS and Crystal cards [?] soundmodem support for 1200 baud AFSK modulation [?] soundmodem support for 2400 baud AFSK modulation (7.3728MHz crystal) [?] soundmodem support for 2400 baud AFSK modulation (8MHz crystal) [?] soundmodem support for 2666 baud AFSK modulation [?] soundmodem support for 4800 baud HAPN-1 modulation [?] soundmodem support for 4800 baud PSK modulation [?] soundmodem support for 9600 baud FSK G3RUH modulation <?> YAM driver for AX.25 |
我用 `*' 标记的选项是您必须回答 “Y” 的选项。其余选项取决于您拥有的硬件以及您想要包含的其他选项。其中一些选项将在稍后更详细地描述,因此如果您还不知道您想要什么,请继续阅读并在稍后返回此步骤。
完成内核配置后,您应该能够干净地编译您的新内核
# make dep # make clean # make zImage |
确保您移动您的arch/i386/boot/zImage文件到您想要的任何位置,然后编辑您的/etc/lilo.conf文件并重新运行 lilo,以确保您实际从中启动。
如果您只是偶尔使用 AX.25,并且希望能够按需加载和卸载驱动程序以节省系统资源,则将驱动程序编译为模块非常有用。但是,有些人在使用模块化驱动程序时遇到问题,因为它们的配置更复杂。如果您选择将任何驱动程序编译为模块,那么您还需要运行以下命令
# make modules # make modules_install |
以将您的模块安装到适当的位置。
您还需要在您的/etc/modules.conf文件中添加一些条目,以确保 kerneld 程序知道如何定位内核模块。您应该添加/修改以下内容
alias net-pf-3 ax25 alias net-pf-6 netrom alias net-pf-11 rose alias tty-ldisc-1 slip alias tty-ldisc-3 ppp alias tty-ldisc-5 mkiss alias bc0 baycom alias nr0 netrom alias pi0a pi2 alias pt0a pt alias scc0 optoscc (or one of the other scc drivers) alias sm0 soundmodem alias tunl0 newtunnel alias char-major-4 serial alias char-major-5 serial alias char-major-6 lp |
![]() | 在基于 Debian 的 Linux 系统上,这些条目应放入文件/etc/modutils/aliases然后您需要运行/sbin/update-mpodules. |
成功编译并启动新内核后,您需要编译并安装 ax25 库、工具和应用程序。
要编译和安装 libax25,您应该使用类似于以下的命令序列
# cd /usr/src # tar xzvf libax25-0.0.7.tar.gz # cd libax25-0.0.7 # ./configure --exec_prefix=/usr --sysconfdir=/etc --localstatedir=/var # make # make install |
![]() | 以下命令的参数configure命令确保文件将安装在目录/usr下 “标准” 位置的子目录bin, sbin, etc和man中。如果您只是运行不带任何选项的 configure,它将默认将所有文件放在/usr/local下。这可能会导致您在/usr和/usr/local中同时拥有配置文件的情况。如果您想确保这种情况不会发生,您可以使/usr/local/etc/ax25成为/etc/ax25的符号链接,在安装过程的最开始,这样您就不必担心它了。 |
如果这是首次安装,也就是说您以前从未在您的机器上安装过任何 ax25 代码,您还应该使用
# make installconf |
命令将一些示例配置文件安装到/etc/ax25/目录中,以便从中开始工作。
您现在可以以类似的方式构建安装 AX.25 工具
# cd /usr/src # tar xzvf ax25-tools-0.0.6.tar.gz # cd ax25-tools-0.0.6 # ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var # make # make install # make installconf (if you want to install the configuration files) |
最后,您可以安装 AX.25 应用程序
# cd /usr/src # tar xzvf ax25-apps-0.0.4.tar.gz # cd ax25-apps-0.0.4 # ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var # make # make install # make installconf (if you want to install the configuration files) |
如果您收到类似以下的错误消息
gcc -Wall -Wstrict-prototypes -O2 -I../lib -c call.c call.c: In function `statline': call.c:268: warning: implicit declaration of function `attron' call.c:268: `A_REVERSE' undeclared (first use this function) call.c:268: (Each undeclared identifier is reported only once call.c:268: for each function it appears in.) |
那么您应该仔细检查您是否在系统上正确安装了 ncurses 软件包。配置脚本尝试在常用位置找到您的软件包,但某些安装的软件包安装不当,无法找到它们。