Re: [Linux-decnet-user] DECnet kernel module for CentOS?
Brought to you by:
chrissie_c,
ph3-der-loewe
From: Larry B. <ba...@us...> - 2013-03-01 22:07:17
|
Peter, Well, working our way backwards. As you noticed, you can't run DECnet on Linux without the decnet kernel module, decnet.ko. If you had one, you would want to put it somewhere in /lib/modules/`uname -r` where modprobe (actually, insmod) could find it. That is because the decnet init script runs modprobe decnet before running any of the decnet daemons (dnetd, phoned). The last step: > # Install the CentOS 5.9 decnet kernel module > mkdir -p /lib/modules/`uname -r`/updates > \cp net/decnet/decnet.ko /lib/modules/`uname -r`/updates/ > depmod puts our decnet.ko into a directory under /lib/modules/`uname -r` so it will be found by modprobe. The depmod command updates the Linux database of module dependencies, since there is a new module to consider now. Alas, Red Hat does not provide decnet.ko in any of their binary RPMs. In the old days, you had to recompile the entire Linux kernel to add a module. That is no longer necessary. All a kernel module needs are the kernel development header files and libraries, the configuration header file for the running kernel, and the symbol table for the running kernel. Given that we have the necessary Linux source files and build files, and that we have installed the gcc compiler and kernel development tools, we create our own decnet.ko: > # Build the CentOS 5.9 decnet kernel module > cd /usr/src/redhat/BUILD/kernel-2.6.18/linux-`uname -r`.`uname -i` > make mrproper > \cp /boot/config-`uname -r` .config > make oldconfig > make prepare > make modules_prepare > zcat /boot/symvers-`uname -r`.gz >Module.symvers > make M=net/decnet CONFIG_DECNET=m We are following the instructions for adding any module (could be one we wrote) to an existing CentOS Linux system (http://wiki.centos.org/HowTos/BuildingKernelModules). The > \cp /boot/config-`uname -r` .config and > zcat /boot/symvers-`uname -r`.gz >Module.symvers steps grab the configuration file and symbol table file for the running kernel. The rest of the file we need come from the Linux kernel development environment. That presumes we already have the Linux kernel development environment set up. Red Hat has a source RPM for their Linux kernel, but it is not quite set up; you have to perform some additional steps after installing the kernel source RPM (http://wiki.centos.org/HowTos/I_need_the_Kernel_Source). We perform those steps to create the kernel source tree we need to compile: > # Get the CentOS 5.9 kernel source RPM > cd /usr/src/redhat/SRPMS > RELEASE=`awk '{print $3}' /etc/redhat-release` > wget -N http://vault.centos.org/${RELEASE}/updates/SRPMS/kernel-`uname -r`.src.rpm > > # Install the CentOS 5.9 kernel sources > cd /usr/src/redhat/SRPMS > rpm -ivh kernel-`uname -r`.src.rpm 2>&1 | grep -v mock > > # Prepare the CentOS 5.9 kernel sources > cd /usr/src/redhat/SPECS > yum install unifdef > rpmbuild -bp kernel.spec That's why we did what we did. We didn't do any patching ourselves of an decnet source files; we used the decnet source files prepared for us by the Red Hat Linux kernel source RPM. For Red Hat/CentOS 5.9, no patches are needed. For Red Hat/CentOS 6.x, there will be additional steps to apply the patches I wrote before building the decnet.ko kernel module. You're not there yet. Larry Baker US Geological Survey 650-329-5608 ba...@us... On 1 Mar 2013, at 5:22 AM, Peter Allan wrote: > Larry, > > Thanks for the script that you sent to me. I went through it yesterday (doing line-by-line copy and paste as you suggested) and it all worked wonderfully. > > I clearly don't understand properly what is happening, even though it all works. The reason that I was getting nowhere before I mailed this list was that I was looking for an rpm that contained either decnet.ko or a source file (decnet.c) that could be built into decnet.ko. My system now has a decnet.c file, but it did not come directly out of an rpm. It presume that the patches in the src.rpm file do a lot more than just patch an existing file. > > Can you educate me about what the script is doing please. My understanding of what is going on in this process is sadly lacking and I much prefer to understand what I am doing. > > I will keep an eye out for the 6.3 stuff, but having got 5.9 working, I am perfectly happy for now. > > Thanks for your assistance. Now to try it with my emulated VAX with simh! > > Peter > > On 28 February 2013 17:22, Larry Baker <ba...@us...> wrote: > Peter, > > CentOS 5.9 is the last CentOS release that does not require a patch to the decnet kernel module. For CentOS 6.3 you will need the patch. Without the patch, whenever the DECnet devices are brought down and up (which is what happens when you write the DECnet executor node address to /proc/sys/net/decnet/node_address), all the /proc/sys/net/decnet entries disappear, except the conf entries. DECnet works fine, but you have one chance to get everything configured, and you can't tell what's going on by reading the /proc/sys/net/decnet entries after that. I have patches for Linux that cures this that I also need to add to the Wiki. > > Larry Baker > US Geological Survey > 650-329-5608 > ba...@us... > > > > On 28 Feb 2013, at 9:12 AM, Peter Allan wrote: > >> Larry, >> >> Thanks for the script. I will take a look at it. >> >> I had found that dnprog 2.53 does not build because of the missing test.c file, which is why I am using 2.52. This seems ok for now. >> >> Cheers >> >> Peter >> >> On 28 February 2013 16:38, Larry Baker <ba...@us...> wrote: >> Peter, >> >> Chrissie has granted me permission to modify the Wiki, but I have not had time to get back to it. In the mean time, attached is a shell script with the commands to install the decnet kernel module on CentOS 5.9. I did not run the commands from the script -- I ran each one manually using cut-and-paste to a terminal window. >> >> The other thing that needs to be documented is that the dnprogs 2.53 distribution make fails because the test.c file is missing from libvaxdata, which I wrote. So, I have my own copy which I used. Let me know if you need that as well. >> >> >> Larry Baker >> US Geological Survey >> 650-329-5608 >> ba...@us... >> >> >> >> On 28 Feb 2013, at 3:32 AM, Peter Allan wrote: >> >> > I am trying to get DECnet working from a Linux system to an Alpha running VMS 7.3. I have succeeded in doing this from Fedora Core 14, which includes the kernel module decnet.ko, and downloading and building the dnprogs version 2.52. >> > >> > However, my main Linux system runs CentOS 5.9. (I am in the process of moving to CentOS 6.3). My problem is that I cannot find the decnet kernel module for any CentOS 5 or 6 system. Can anyone point me to (ideally) the build kernel module or the source code for the module so I can build it myself. >> > >> > An e-mail from Larry Baker a couple of weeks ago implies that the module does exist for CentOS 5.9 i386, hence my request to this group. >> > >> > I am using the 64bit versions of CentOS. >> > >> > Regards >> > >> > Peter Allan >> > ------------------------------------------------------------------------------ >> > Everyone hates slow websites. So do we. >> > Make your web apps faster with AppDynamics >> > Download AppDynamics Lite for free today: >> > http://p.sf.net/sfu/appdyn_d2d_feb_______________________________________________ >> > Project Home Page: http://linux-decnet.wiki.sourceforge.net/ >> > >> > Linux-decnet-user mailing list >> > Lin...@li... >> > https://lists.sourceforge.net/lists/listinfo/linux-decnet-user >> > >> >> >> > > |