Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
When I install the first "core" rpm, I get this message:
Code:
[root@localhost x86_64]# rpm -ivh aswm_core-2.0-312.el4rhat.x86_64.rpm
Preparing... ########################################### [100%]
1:aswm_core ########################################### [100%]
Warning: ASWM drivers doesn't support your running kernel 2.6.23.15-137.fc8
Please get the ASWM driver source code in /usr/aswm/lib/modules/src.
Untar and compile ghadrv,iodrv and laninfo for kernel 2.6.23.15-137.fc8.
Error, Can't find /etc/syslog.conf
Setting log file failed!
Please install the model RPM for running aswm.
[root@localhost x86_64]#
I then go to my /usr/aswm/lib/modules/src file and unpack and untar the indicated file and I see some directories as well as a macro makefile and version file:
Code:
[root@localhost src]# ls
drvsrc drvsrc.tgz
[root@localhost src]# cd drvsrc
[root@localhost drvsrc]# ls
ghadrv ghadrv_base ghaipmi iodrv laninfo macro makefile version
[root@localhost drvsrc]#
I go into the first directory and I see what looks like C code files:
Code:
[root@localhost drvsrc]# cd ghadrv
[root@localhost ghadrv]# ls
gha_common.o ghadrv_kernel.c ghaioctl.h ghipmi_exp.h load Makefile unload
[root@localhost ghadrv]#
What is the correct method to compile these files for the kernel? Would I use the gcc command? My experience with compiling code with Linux is by using the configure make and make install commands.
You most likely just have to type make, although that usually depends on your kernel-source symlink being setup correctly (/lib/modules/`uname -r`/build -> your_kernel_sourcedir).
[root@localhost ghadrv]# pwd
/usr/aswm/lib/modules/src/drvsrc/ghadrv
[root@localhost ghadrv]# ls
gha_common.o ghadrv_kernel.c ghaioctl.h ghipmi_exp.h load Makefile unload
[root@localhost ghadrv]# make
../iodrv/checkCompiler.mk:18: *** commands commence before first target. Stop.
[root@localhost ghadrv]#
That’s odd. Perhaps you should try from the parent directory, and it will descend into each target. Are you sure that none of the files are executable? If it still doesn’t work, I suggest looking at iodrv/checkCompiler.mk (specifically around line 18) to see what the package creator was intending.
That’s odd. Perhaps you should try from the parent directory, and it will descend into each target. Are you sure that none of the files are executable? If it still doesn’t work, I suggest looking at iodrv/checkCompiler.mk (specifically around line 18) to see what the package creator was intending.
When I execute the make command from the parent directory, I get the same message:
Code:
[root@localhost drvsrc]# pwd
/usr/aswm/lib/modules/src/drvsrc
[root@localhost drvsrc]# ls
ghadrv ghadrv_base ghaipmi iodrv laninfo macro makefile version
[root@localhost drvsrc]# make
make -C iodrv
make[1]: Entering directory `/usr/aswm/lib/modules/src/drvsrc/iodrv'
checkCompiler.mk:18: *** commands commence before first target. Stop.
make[1]: Leaving directory `/usr/aswm/lib/modules/src/drvsrc/iodrv'
make: *** [_all_iodrv] Error 2
[root@localhost drvsrc]#
Within each directory, there are two executables: load and unload:
Do you have both gcc and g++ installed? Do you have the which utility installed? Are both gcc and g++ in your PATH? If the answer to all of these questions is yes, you can safely replace checkCompiler.mk by the following two-line file:
Code:
CC := gcc
CPP := g++
I personally don’t understand why it checks for g++ since I don’t see any C++ source files.
First red marked line means that you have [tabs] (before spitting output) in your script. Remove them (see 3rd red line). Now your script will run but will still stop with errors.
Second red line will not work, as the file ghaio.o is not yet generated.
The make command from the drvsrc directory will go to the appropriate directories and run the make command, during this process the *****.mod.o and the *****.o files are generated for your kernel version. After this process you will have a new directory in all the subdirs of drvsrc and will be able to load the files, but there is no need to do this manually.
This is where is goes wrong for me now. I get an error 126: cannot execute file. My rights are all as they should be but....
So far all the info that is usefull to you, if you get further then this please let me know.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.