Operating System - HP-UX
1832978 Members
2682 Online
110048 Solutions
New Discussion

Re: can't rebuild kernel 11.11 v1

 
SOLVED
Go to solution
Jon M Zellhoefer
Valued Contributor

can't rebuild kernel 11.11 v1

via command line - SAM also bombs out when trying to build a new kernel. output from the commands is below. any help you could provide would be great.

Thanks,

Jon


# mk_kernel -s /stand/build/system
Generating module: krm...
Compiling conf.c...
Loading the kernel...
Generating kernel symbol table...
# kmupdate /stand/build/vmunix_test
kmupdate: Specified file /stand/build/vmunix_test is not kernel file.
10 REPLIES 10
Jon M Zellhoefer
Valued Contributor

Re: can't rebuild kernel 11.11 v1

I just tried to do the build via config -u. Here is the output that I get when I try to build the kernel that way:

# config -u /stand/build/system
Generating module: krm...
nm: mod_wk.d/krm/mod.o: File format not recognized
nm: mod_wk.d/krm/_mod.o: File format not recognized
Compiling conf.c...
Loading the kernel...
Generating kernel symbol table...
nm: invalid option -- x
Usage: nm [option(s)] [file(s)]
List symbols in [file(s)] (a.out by default).
The options are:
-a, --debug-syms Display debugger-only symbols
-A, --print-file-name Print name of the input file before every symbol
-B Same as --format=bsd
-C, --demangle[=STYLE] Decode low-level symbol names into user-level names
The STYLE, if specified, can be `auto' (the default),
`gnu', `lucid', `arm', `hp', `edg', `gnu-v3', `java'
or `gnat'
--no-demangle Do not demangle low-level symbol names
-D, --dynamic Display dynamic symbols instead of normal symbols
--defined-only Display only defined symbols
-e (ignored)
-f, --format=FORMAT Use the output format FORMAT. FORMAT can be `bsd',
`sysv' or `posix'. The default is `bsd'
-g, --extern-only Display only external symbols
-l, --line-numbers Use debugging information to find a filename and
line number for each symbol
-n, --numeric-sort Sort symbols numerically by address
-o Same as -A
-p, --no-sort Do not sort the symbols
-P, --portability Same as --format=posix
-r, --reverse-sort Reverse the sense of the sort
-S, --print-size Print size of defined symbols
-s, --print-armap Include index for symbols from archive members
--size-sort Sort symbols by size
-t, --radix=RADIX Use RADIX for printing symbol values
--target=BFDNAME Specify the target object format as BFDNAME
-u, --undefined-only Display only undefined symbols
-X 32_64 (ignored)
-h, --help Display this information
-V, --version Display this program's version number

nm: supported targets: som srec symbolsrec tekhex binary ihex hpux-core
Usage: bstab input_data symbol_cnt strtbl_size kernel_file output_file
*** Error exit code 1

Stop.
config: make did an exit(1)
Deepak.R
Frequent Advisor

Re: can't rebuild kernel 11.11 v1

Hi,

Is there a file vmunix_test existing in /stand/build ? delete this file and try again.

Also, can you tell what modification have you made before rebuilding ?

thanks
deepak
Steven E. Protter
Exalted Contributor

Re: can't rebuild kernel 11.11 v1

Seems from the two messages that you don't have a valid kernel file at all.

I'd run the following checklist:

1) See about restoring the /stand filesystem to a known point where the kernel was working or..
2) Consider going to a vaid make_tape_recovery Ignite backup.
3) swverify \* and see if you have problems with kenel patches.

4) mv /stand/build/vmunix_test someplace else, because the file is no good.
5) Unless you are 11.23 make sure /stand has not been converted to vxfs

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Jon M Zellhoefer
Valued Contributor

Re: can't rebuild kernel 11.11 v1

I've tried to remove and rebuild /stand/build/vmunix_test and it builds ok with the exception of using config -u to build the file. (e.g. no error messages from mk_kernel -s /stand/build/system...)

The system boots up just fine on the kernel that is in /stand (vmunix) so I can't see how the existing kernel is bad. All I'm trying to do is change dbc_min_pct and dbc_max_pct from defaults to something reasonable for a workstation.

Also /usr/lbin/sysadm/get_sysfile /stand/vmunix and /stand/build/vmunix_test return no errors and I can see everything (drivers and non-default parameters) just fine ...

Dietmar Konermann
Honored Contributor
Solution

Re: can't rebuild kernel 11.11 v1

Hmm, looks weird.
Please post the results of this:

# what $(whence nm)

Maybe your PATH point to some non-standard binutils?

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

Re: can't rebuild kernel 11.11 v1

/usr/local/bin/nm:
$Revision: 92453-07 linker linker crt0.o B.11.37 031205 $

melvyn burnard
Honored Contributor

Re: can't rebuild kernel 11.11 v1

Hmm, I think that may be a problem, it should point you to /usr/bin/nm

Check your envrionment, e.g. .profile etc.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Mel Burslan
Honored Contributor

Re: can't rebuild kernel 11.11 v1

Your path seems to be in disorder. /usr/local/bin should not preceed /usr/bin or /usr/sbin in my opinion
________________________________
UNIX because I majored in cryptology...
Dietmar Konermann
Honored Contributor

Re: can't rebuild kernel 11.11 v1

Please put /usr/bin in from of /usr/local/bin in your PATH and try again. The used nm command is *not* the right one.

Should be something like:

# what $(whence nm)
/usr/bin/nm:
$Revision: 92453-07 linker linker crt0.o B.11.37 040218 $
HP aC++ B3910B A.03.52 Classic Iostream Library
HP aC++ B3910B A.03.52 Language Support Library
nm.cat: $Revision: 1.0 $
92453-07 linker command s800.sgs nm PA64 B.11.43 REL 050124
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Jon M Zellhoefer
Valued Contributor

Re: can't rebuild kernel 11.11 v1

The path did end up in disarray ... once I got that resolved, the kernel compiled just fine. It looks like it was trying to use gcc / other binutils to gen the kernel rather than the supplied cc. Once I got past the pathing issue, all was well. Thanks for your help guys!