diff --git a/base/linux26/arch/shared.in b/base/linux26/arch/shared.in new file mode 100644 index 000000000..e4de675b8 --- /dev/null +++ b/base/linux26/arch/shared.in @@ -0,0 +1,33 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../linux26/arch/shared.in +# Copyright (C) 2008 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. A copy of the +# GNU General Public License can be found in the file COPYING. +# --- SDE-COPYRIGHT-NOTE-END --- + +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../linux26/arch/shared.in +# Copyright (C) 2008 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. A copy of the +# GNU General Public License can be found in the file COPYING. + +case "$arch" in + x86-64) + if [ $lx_ver -ge 2006024 ]; then + lx_cpu=x86 + fi + ;; +esac diff --git a/base/linux26/linux-conf.in b/base/linux26/linux-conf.in index f9deb30d9..1e21015bc 100644 --- a/base/linux26/linux-conf.in +++ b/base/linux26/linux-conf.in @@ -22,9 +22,12 @@ for x in $(echo "$ver" | cut -d. -f1-3 | tr '.' ' '); do lx_ver=$( expr $lx_ver \* 1000 + $x ) done -[ "$lx_cpu" ] || -# powerpc and mips share the same arch for 32/64, maybe more follow -lx_cpu=`echo $arch | arch2uname | sed -e s/ppc.*/powerpc/ -e s/mips64/mips/` +lx_cpu="$arch_machine" +if [ -s "$lx_confdir/arch/$arch.in" ]; then + . "$lx_confdir/arch/$arch.in" +else + . "$lx_confdir/arch/shared.in" +fi lx_extraversion= lx_kernelrelease= @@ -240,6 +243,9 @@ lx_filter_patch () lx_patch () { + # validate ARCH + [ -d "arch/$lx_cpu/" ] || abort "architecture ($lx_cpu) not known by this kernel." + echo "Generic linux patching ..." # grab extraversion from vanilla