]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
Made ./make.sh shell run some more commands and added kernel config option.
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 6 Feb 2009 14:49:39 +0000 (15:49 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 6 Feb 2009 14:49:39 +0000 (15:49 +0100)
Run: ./make.sh config kernel

src/scripts/edit-kernel-config [new file with mode: 0644]
tools/make-include
tools/make-interactive

diff --git a/src/scripts/edit-kernel-config b/src/scripts/edit-kernel-config
new file mode 100644 (file)
index 0000000..9e20f32
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+cd /usr/src/linux*
+
+cp -f /usr/src/config/kernel/kernel.config .config
+
+make menuconfig
+
+if [ "$?" -eq "0" ]; then
+       cp -f .config /usr/src/config/kernel/kernel.config
+fi
index 6d28c8df3ed171326830b55a5f95b2ad9c0e21d0..0122a90a6544f35017ae880b7a873993d4b5206d 100644 (file)
@@ -113,6 +113,8 @@ entershell() {
        if [ ! -e $LFS/usr/src/lfs/ ]; then
                exiterror "No such file or directory: $LFS/usr/src/lfs/"
        fi
+
+       COMMAND=${@-bash} # Run command, given as parameters.
        
        echo -ne "Entering ${BOLD}$MACHINE${NORMAL} LFS chroot, type exit to return to host environment\n"
        
@@ -144,7 +146,7 @@ entershell() {
                STAGE=$STAGE \
                STAGE_ORDER=$STAGE_ORDER \
                LOGFILE=$(echo $LOGFILE | sed "s,$BASEDIR,/usr/src,g") \
-               bash
+               $COMMAND
 
        if [ $? -ne 0 ]; then
                exiterror "chroot error"
index 55470574fbf2db8e605891077ce9189360c12a2e..6e920096c2cb4a7fd57fe2abd2e10475d022ce34 100644 (file)
@@ -37,10 +37,11 @@ build)
        ;;
 
 shell)
+       shift
        # enter a shell inside LFS chroot
        # may be used to change kernel settings
        prepareenv
-       entershell
+       entershell $@
        ;;
 
 batch)
@@ -73,6 +74,19 @@ ccache)
        esac
        ;;
 
+config)
+       # config options
+       case "$2" in
+               kernel)
+                       prepareenv
+                       entershell /usr/local/bin/edit-kernel-config
+                       ;;
+               *)
+                       usage
+                       ;;
+       esac
+       ;;
+
 distcc|distccd)
        # distcc(d) commands
        case "$2" in