1830453 Members
2359 Online
110004 Solutions
New Discussion

kmupdate giving error

 
Sandesh Chopdekar
New Member

kmupdate giving error

Hi,
I am working on making an already existing
module as a dlkm. Afetr making code changes.
while trying to register it using config I
got following error
[root@ws1] /usr/sbin/config -M npp -u
Generating module: npp...
Requesting loadable module update...
kmmodreg: Could not obtain the boot kernel path
kmupdate: Module npp registration failed.

Got similar result with "mk_kernel -M npp"
It's a pseudo driver.
I don't know why kmupdate is giving error.
I am running this command from /stand directory

Thanks,
Sandesh
7 REPLIES 7
Bruno Ganino
Honored Contributor

Re: kmupdate giving error

Could be the path not correct.
When is not specified assumes that the kernel is located at /stand/vmunix. If your machine is booted with a test kernel, say /stand/vmunix_test to see listing pass the kernel. Run kmpath to identify the kernel the host is booted with.
Torino (Turin) +2H
Dietmar Konermann
Honored Contributor

Re: kmupdate giving error

Sandesh,

the kmupdate command calls "kmpath -c"... and this should typically return "/stand/dlkm". Please run that command manually and report what happens. Do you see messages like "DLKM is not initialized" in your dmesg output?

Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Sandesh Chopdekar
New Member

Re: kmupdate giving error

Hi,
Thanks for the reply.

kmpath didn't o/p anything on the system
[root@mac1] kmpath
[root@mac1] echo $?
3
[root@mac1]

from errno.h
#define ESRCH 3 /* No such process */

Is there some problem with the OS version I
am running ?
Here's the uname o/p
[root@mac1] uname -a
HP-UX mac1 B.11.11 U 9000/785 2001031186 [root@mac1]

[root@mac1] ls -ltr /stand/vmunix
-rwxr-xr-x 1 root sys 24876440 Dec 3 11:46 /stand/vmunix*
[root@mac1]

Is it searching for vmunix_test ?

Thanks,
Sandesh
Dietmar Konermann
Honored Contributor

Re: kmupdate giving error

Nothing in dmesg? Could you try to run kmpath through tusc? Maybe the modadm(MOD_TY_NONE, MOD_C_KPATH,...) syscall fails for some reason.

Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Sandesh Chopdekar
New Member

Re: kmupdate giving error

Hi Dietmar,
Sorry to miss out dmeg

Here's the demsg output

WARNING: modadm: DLKM is not initialized
WARNING: modadm: DLKM is not initialized
WARNING: modadm: DLKM is not initialized
WARNING: modadm: DLKM is not initialized
WARNING: modadm: DLKM is not initialized
WARNING: modadm: DLKM is not initialized
WARNING: modadm: DLKM is not initialized
WARNING: modadm: DLKM is not initialized

One more thing - The h/w is PA-RISC

Here's the tusc output -> your doubt seems
to be true - modadm did gave an error.

Do I need to set some env variables ?

[root@mac1] /home/dlkm/tusc kmpath -k
execve("/usr/sbin/kmpath", 0x7f7f0418, 0x7f7f0424) ................................................. = 0 [32-bit]
utssys("HP-UX", 0, 0) .............................................................................. = 0
open("/usr/lib/dld.sl", O_RDONLY, 02020) ........................................................... = 3
read(3, "02\v010e0512@ \0\0\0\0\0\0\0\0\0".., 128) ................................................. = 128
lseek(3, 128, SEEK_SET) ............................................................................ = 128
read(3, "10\0\004\0\0\0( \001a194\0\0\0\0".., 48) .................................................. = 48
mmap(0, 106900, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, 0x7000) .............................. = 0xc0010000
mmap(0, 13000, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_SHLIB, 3, 0x22000) .................. = 0x7b050000
close(3) ........................................................................................... = 0
getuid() ........................................................................................... = 0 (0)
getuid() ........................................................................................... = 0 (0)
getgid() ........................................................................................... = 3 (3)
getgid() ........................................................................................... = 3 (3)
mmap(0, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) .................... = 0x7b04e000
sysconf(_SC_CPU_VERSION) ........................................................................... = 0x214
open("/opt/graphics/OpenGL/lib/libogltls.sl", O_RDONLY, 0) ......................................... ERR#2 ENOENT
open("/usr/lib/libc.2", O_RDONLY, 0) ............................................................... = 3
fstat(3, 0x7f7f2d80) ............................................................................... = 0
read(3, "0214010e0512@ \0\0\0\0\0\0\0\0\0".., 128) ................................................. = 128
lseek(3, 128, SEEK_SET) ............................................................................ = 128
read(3, "10\0\004\0\0\0( \013y c4\0\010\0".., 48) .................................................. = 48
read(3, "80\0\0\v\0\0\004\0\0\0\0", 12) ............................................................ = 12
lseek(3, 430080, SEEK_SET) ......................................................................... = 430080
read(3, "058cy 10\0\0\ad \0\0K L \0\0\002".., 112) ................................................. = 112
mmap(0, 1277952, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, 0x69000) ............................ = 0xc0100000
mmap(0, 45056, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS|MAP_SHLIB, -1, 0) ......... = 0x7b043000
mmap(0x7b03b000, 32768, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_SHLIB, 3, 0x1a1000) = 0x7b03b000
mmap(0, 16384, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) ................... = 0x7b037000
close(3) ........................................................................................... = 0
open("/usr/lib/libdld.2", O_RDONLY, 0) ............................................................. = 3
fstat(3, 0x7f7f2e80) ............................................................................... = 0
read(3, "02\v010e0512@ \0\0\0\0\0\0\0\0\0".., 128) ................................................. = 128
lseek(3, 128, SEEK_SET) ............................................................................ = 128
read(3, "10\0\004\0\0\0( \0\0# 4 \0\010\0".., 48) .................................................. = 48
read(3, "80\0\0\v\0\0\004\0\0\0\0", 12) ............................................................ = 12
lseek(3, 8192, SEEK_SET) ........................................................................... = 8192
read(3, "058cy 10\0\0\0\f\0\00198\0\0\001".., 112) ................................................. = 112
mmap(0, 12288, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, 0x2000) ............................... = 0xc0005000
mmap(0, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_SHLIB, 3, 0x5000) .................... = 0x7b036000
close(3) ........................................................................................... = 0
open("/usr/lib/libc.2", O_RDONLY, 0) ............................................................... = 3
fstat(3, 0x7f7f2f80) ............................................................................... = 0
read(3, "0214010e0512@ \0\0\0\0\0\0\0\0\0".., 128) ................................................. = 128
lseek(3, 128, SEEK_SET) ............................................................................ = 128
read(3, "10\0\004\0\0\0( \013y c4\0\010\0".., 48) .................................................. = 48
read(3, "80\0\0\v\0\0\004\0\0\0\0", 12) ............................................................ = 12
lseek(3, 430080, SEEK_SET) ......................................................................... = 430080
read(3, "058cy 10\0\0\ad \0\0K L \0\0\002".., 112) ................................................. = 112
mmap(0, 1277952, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, 0x69000) ............................ ERR#12 ENOMEM
close(3) ........................................................................................... = 0
mmap(0, 40, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) ...................... = 0x7b035000
sigsetreturn(0x7b038f36, 0x6211988, 1392) .......................................................... = 0
sigsetreturn(0x7b038f36, 0x6211988, 1392) .......................................................... = 0
sigvec(SIGSYS, 0x7f7f0de0, 0x7f7f0df0) ............................................................. = 0
Inconsistent arg # for syscall 487 (modadm): 3/0
modadm(0, 98, 2139031936) .......................................................................... ERR#251 ENOSYS
exit(3) ............................................................................................ WIFEXITED(3)
[root@mac1]

Thanks,
Sandesh
Bruno Ganino
Honored Contributor

Re: kmupdate giving error

After suggestions received, see here
http://h21007.www2.hp.com/dspp/files/unprotected/Drivers/Docs/Refs/dlkm_v1.2.pdf
HTH
Bruno
Torino (Turin) +2H
Dietmar Konermann
Honored Contributor

Re: kmupdate giving error

Sandesh,

sorry for the late response... Friday I was on FTO.

Obviously it looks like your DLKM subsystem is not initialized. Initialization happens normally during bootup. You should be able to resolve that problem by re-building the kernel and it's symbol table before rebooting:

# mk_kernel
# kmupdate
# shutdown -r 0

Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)