I need to run the following instructions:
Run build.sh as follows from a terminal window, where
/path/to/expanded/folder is where build.sh is located, i.e.
/home/user/Desktop/ap-kernelmodule-1.0.14-13:cd /path/to/expanded/folder sudo ./build.sh --kernel-dir /lib/modules/$(uname -r)/build
In my case, “the path to expanded folder” is home/sharon/savfl/ap-kernelmodule-1.0.14-13
Now, as for the kernel directory, I tried searching within almost all directories and managed to find the nearest match whose path is:
/usr/src/linux-headers-3.5.0.21-generic/kernel
So, I issued the following command:
sharon@sharon:~/savfl/ap-kernelmodule-1.0.14-13$ sudo ./build.sh
home/sharon/usr/src/linux-headers-3.5.0.21-generic/kernel
/lib/modules/3.5.0.21-generic/build[sudo] password for sharon:
And I got the following error message:
Unknown Option:
home/sharon/usr/src/linux-headers-3.5.0.21-generic/kernelUsage: build.sh [options]
Options: –kernel-dir [DIRECTORY] :
DIRECTORY is to set kernel headers/makefiles directory to build kernel
modulesThe default is /usr/src/kernels/3.5.0-21-generic-x86_64
–kernel-rel [RELEASE] : RELEASE is to set which kernel release
the kernel modules are builded forThe default is the current kernel release(3.5.0-21-generic)
–debug : Build the kernel modules with debugging
information–clean : Delete all generated files
–version : Display the version number of the build
script–help : Display this help
Can someone help me with this please?
Please note that prior to doing the above I have installed the linux-headers relevant to my current kernel version with the following command:
sudo apt-get install linux-headers-3.5.0.21-generic build-essential
I am new to Linux and Ubuntu; hence detailed how-to instructions would be most welcome.
Thanks in advance.
Instruction source : http://www.symantec.com/business/support/index?page=content&id=TECH95496
Best Answer
I think
--kernel-dir
is not a placeholder to replace with something. It is a parameter to the build.sh to specify kernel dir. The kernel dir is/lib/modules/$(uname -r)/build
. (Theuname -r
defines the installed kernel details.)Try
sudo ./build.sh --kernel-dir /lib/modules/$(uname -r)/build
Don't alter
uname -r
with anything. It will automatically place the kernel version for the command.