aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Gaffney <agaffney@gentoo.org>2008-03-13 03:28:56 +0000
committerAndrew Gaffney <agaffney@gentoo.org>2008-03-13 03:28:56 +0000
commit18407fa3ede7ad37f692ea44559f8629364be485 (patch)
treebde2558344e14d03ed0582d6a2ab21d0841dd3bf /gen_arch.sh
parentGet rid of the ENABLE_PEGASOS_HACKS hacks (diff)
downloadgenkernel-18407fa3ede7ad37f692ea44559f8629364be485.tar.gz
genkernel-18407fa3ede7ad37f692ea44559f8629364be485.tar.bz2
genkernel-18407fa3ede7ad37f692ea44559f8629364be485.zip
Add set_kernel_arch(), which maps the genkernel arch to the arch that the kernel expects based on the version of the kernel
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@632 67a159dc-881f-0410-a524-ba9dfbe2cb84
Diffstat (limited to 'gen_arch.sh')
-rwxr-xr-xgen_arch.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/gen_arch.sh b/gen_arch.sh
index fcb45feb..b96409e6 100755
--- a/gen_arch.sh
+++ b/gen_arch.sh
@@ -42,3 +42,39 @@ get_official_arch() {
ARCH_CONFIG="${GK_SHARE}/${ARCH}/config.sh"
[ -f "${ARCH_CONFIG}" ] || gen_die "${ARCH} not yet supported by genkernel. Please add the arch-specific config file, ${ARCH_CONFIG}"
}
+
+set_kernel_arch() {
+ KERNEL_ARCH=${ARCH}
+ case ${ARCH} in
+# XXX: This doesn't seem to actually be necessary, as it still works just fine without it
+# ppc|ppc64)
+# if [ "${VER}" -eq "2" -a "${PAT}" -ge "6" ]
+# then
+# if [ "${PAT}" -eq "6" -a "${SUB}" -ge "17" ] || [ "${PAT}" -gt "6" ]
+# then
+# KERNEL_ARCH=powerpc
+# fi
+# fi
+# ;;
+ x86)
+ if [ "${VER}" -eq "2" -a "${PAT}" -ge "6" ] || [ "${VER}" -gt "2" ]
+ then
+ if [ "${PAT}" -eq "6" -a "${SUB}" -ge "24" ] || [ "${PAT}" -gt "6" ]
+ then
+ KERNEL_ARCH=x86
+ else
+ KERNEL_ARCH=i386
+ fi
+ fi
+ ;;
+ x86_64)
+ if [ "${VER}" -eq "2" -a "${PAT}" -ge "6" ] || [ "${VER}" -gt "2" ]
+ then
+ if [ "${PAT}" -eq "6" -a "${SUB}" -ge "24" ] || [ "${PAT}" -gt "6" ]
+ then
+ KERNEL_ARCH=x86
+ fi
+ fi
+ ;;
+ esac
+}