Problem with kernel build
rinehime at bc.edu
Mon Feb 9 12:46:14 PST 2004
> (iii) make vmlinux >logfile 2>&1
> Hopefully that won't take long, all the object files should already be
> there. Does it give you a non-empty System.map ? If it does, retry
> make modules_install. If that succeeds, problem gone, no explanation.
Don't know why I didn't think of logging the output earlier.....
Turns out, the make uses grep to create the System.map file. Here's the
error I found:
nm vmlinux | grep -v '\(compiled\)\|\(\.o$\)\|\( [aUw] \)\|\(\.\.ng$\)\|\(LASH[RL]DI\)' | sort > System.map
/bin/sh: line 1: grep: command not found
So I looked around the system and found out that I must of forgotten to
install grep That can happen when you compile a package, then go to
kitchen for a sandwich while you wait :-)
Grep was available for all the other packages installed in Chap 6
because it was still in the static toolchain which was in the old path.
When I chroot'd into the new environment at the end of Chap. 6, however,
grep was no longer there, so the System.map file wasn't created properly.
I reinstalled grep, recompiled the kernel, and everything worked out fine.
Haven't had a chance to restart, but I suspect my problem's fixed. I'm
going to look at the other stuff after chap 6 to see if there might have
been any other grep instances that I could've missed. Looks like
everything will work out though.
Also (In case you wanted to know):
> > > (from Makefile for Linux-2.4.24)
> > > _modinst_post: _modinst_post_pcmcia
> > > if [ -r System.map ]; then $(DEPMOD) -ae -F System.map
> > > $(depmod_opts)
> > > $(KERNELRELEASE); fiif [ -r System.map ]; then $(DEPMOD) -ae -F
> > ^^^^
> > > System.map $(depmod_opts)
> > >
> > >
> > I wonder: should this really be "fiif", and not "fi ; if"?
> > Albert.
> I assumed it was a typo when it was copied into the mail. Looking at my
> own copy, there is a a 'fi' then the line ends, I think what has
> happened to the mail is that the chunk
> if [ -r System.map ]; then $(DEPMOD) -ae -F
> has been copied in twice.
Yep. That's a typo.
Thanks a lot for the help. I'm glad it wasn't a weird bug or something
and just a missing dependency.
More information about the lfs-support