genkernel: Add --kconfig to set specific kernel config options
[genkernel.git] / gen_arch.sh
index 7cb9a99a0673a8df1a56dd39e29457ae1dceac98..866a40f2ca575e8b5067ea4d5c1a2c416688326d 100755 (executable)
@@ -1,4 +1,5 @@
 #!/bin/bash
+# $Id$
 
 get_official_arch() {
        if [ "${CMD_ARCHOVERRIDE}" != '' ]
@@ -41,7 +42,7 @@ get_official_arch() {
        then
                UTILS_ARCH='sparc'
        fi
-       
+
        ARCH_CONFIG="${GK_SHARE}/arch/${ARCH}/config.sh"
        [ -f "${ARCH_CONFIG}" ] || gen_die "${ARCH} not yet supported by genkernel. Please add the arch-specific config file, ${ARCH_CONFIG}"
 }
@@ -50,7 +51,10 @@ set_kernel_arch() {
        KERNEL_ARCH=${ARCH}
        case ${ARCH} in
                ppc|ppc64)
-                       if [ "${VER}" -eq "2" -a "${PAT}" -ge "6" ]
+                       if [ "${VER}" -ge "3" ]
+                       then
+                                       KERNEL_ARCH=powerpc
+                       elif [ "${VER}" -eq "2" -a "${PAT}" -ge "6" ]
                        then
                                if [ "${PAT}" -eq "6" -a "${SUB}" -ge "16" ] || [ "${PAT}" -gt "6" ]
                                then
@@ -59,7 +63,10 @@ set_kernel_arch() {
                        fi
                        ;;
                x86)
-                       if [ "${VER}" -eq "2" -a "${PAT}" -ge "6" ] || [ "${VER}" -gt "2" ]
+                       if [ "${VER}" -ge "3" ]
+                       then
+                                       KERNEL_ARCH=x86
+                       elif [ "${VER}" -eq "2" -a "${PAT}" -ge "6" ] || [ "${VER}" -gt "2" ]
                        then
                                if [ "${PAT}" -eq "6" -a "${SUB}" -ge "24" ] || [ "${PAT}" -gt "6" ]
                                then
@@ -70,7 +77,10 @@ set_kernel_arch() {
                        fi
                        ;;
                x86_64)
-                       if [ "${VER}" -eq "2" -a "${PAT}" -ge "6" ] || [ "${VER}" -gt "2" ]
+                       if [ "${VER}" -ge "3" ]
+                       then
+                                       KERNEL_ARCH=x86
+                       elif [ "${VER}" -eq "2" -a "${PAT}" -ge "6" ] || [ "${VER}" -gt "2" ]
                        then
                                if [ "${PAT}" -eq "6" -a "${SUB}" -ge "24" ] || [ "${PAT}" -gt "6" ]
                                then