On Sunday 01 October 2006 11:58, Alexander Nasonov wrote:
> On 10/1/06, Vladimir A. Pavlov <[EMAIL PROTECTED]> wrote:
> > Try installing bash using, for example, FreeBSD ports collection.
> It's installed to /usr/pkg/bin/bash. I used it throughout the installation.
> 
> > ln -s ../usr/local/bin/bash /bin/bash
> 
> This is actually a last thing I would try. First of all, I don't want
> to pollute my base system. Second, the script worked even though
> /bin/bash doesn't exist. I replaced /bin/bash in the first line of
> scripts/gen_initramfs_list.sh with /usr/pkg/bin/bash but it didn't
> help. I didn't look at source code to say for sure but it seems that
> they run this script like this:
> 
> /bin/sh scripts/gen_initramfs_list.sh
> 
> On Linux systems /bin/sh is a link to /bin/bash.

Well, I looked at the kernel Makefiles and here's what I found:

usr/Makefile contains the following

initramfs := $(CONFIG_SHELL) $(srctree)/scripts/gen_initramfs_list.sh

So, the interpreter the kernel uses in its scripts is stored in the
CONFIG_SHELL Makefile variable.

The variable value can be determined using the patch attached that adds
the show-config-shell target to show the value of CONFIG_SHELL.

Cd to the kernel source directory (linux-2.6.17.13/) and run the
following commands (the output of the commands run on my box is shown
as well)

$ patch Makefile linux-2.6.17.13-show_config_shell.patch
patching file Makefile
$ make show-config-shell
Makefile:444: .config: No such file or directory
echo "CONFIG_SHELL=[/bin/sh]"
CONFIG_SHELL=[/bin/sh]
$ make CONFIG_SHELL=/bin/bash show-config-shell
Makefile:444: .config: No such file or directory
echo "CONFIG_SHELL=[/bin/bash]"
CONFIG_SHELL=[/bin/bash]

So, the default value of CONFIG_SHELL in my environment (having
/bin/bash) is /bin/sh but it can be overrided by passing the value
in the command line while running make (well, gmake in your case).

So try to use this to compile the kernel

make CONFIG_SHELL=/usr/pkg/bin/bash

-- 
Nothing but perfection
pv
--- Makefile.orig	2006-10-01 16:02:13.000000000 +0400
+++ Makefile	2006-10-01 15:58:42.000000000 +0400
@@ -183,6 +183,9 @@
 	  else if [ -x /bin/bash ]; then echo /bin/bash; \
 	  else echo sh; fi ; fi)
 
+show-config-shell:
+	echo "CONFIG_SHELL=[${CONFIG_SHELL}]"
+
 HOSTCC  	= gcc
 HOSTCXX  	= g++
 HOSTCFLAGS	= -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
_______________________________________________
Clfs-dev mailing list
[email protected]
http://lists.cross-lfs.org/cgi-bin/mailman/listinfo/clfs-dev

Reply via email to