[ $infact_arch == $smp_type ] && RPMSMPTYPE=bigsmp && break
done
+ for smp_type in $PPC64_ARCHS; do
+ [ $infact_arch == $smp_type ] && RPMSMPTYPE=ppc64 && break
+ done
+
for smp_type in $DEFAULT_ARCHS; do
[ $infact_arch == $smp_type ] && RPMSMPTYPE=default && break
done
echo kernel${lustre}-${rpmsmptype}-${lnxmaj}${lnxmin}/linux-${lnxmaj}
}
-find_linux_devel_paths() {
- local path="$1"
+resolve_arch() {
+ local arch="$1"
- LINUX=$path/usr/src/linux-${lnxmaj}${lnxmin}-${lnxrel}
+ case $arch in
+ ppc64) arch=powerpc
+ ;;
+ i686) arch=i386
+ ;;
+ esac
- local objects=$TARGET_ARCH/$RPMSMPTYPE
- if [ -d $path/usr/src/linux-${lnxmaj}${lnxmin}-${lnxrel}-obj/powerpc ]; then
- objects="powerpc/$TARGET_ARCH"
- elif [ $TARGET_ARCH == 'i686' ]; then
- objects="i386/$RPMSMPTYPE"
- fi
+ echo "$arch"
+
+}
- LINUXOBJ=$path/usr/src/linux-${lnxmaj}${lnxmin}-${lnxrel}-obj/$objects
- LINUXRELEASE=$(find_linux_release "$LINUXOBJ")
+find_linux_devel_paths() {
+ local path="$1"
- if [ -z "$LINUXRELEASE" ]; then
- echo "Failed to find linux release in $LINUXOBJ"
- return 255
- fi
+ LINUX=$path/usr/src/linux-${lnxmaj}${lnxmin}-${lnxrel}
+ LINUXOBJ=$path/usr/src/linux-${lnxmaj}${lnxmin}-${lnxrel}-obj/$(resolve_arch $TARGET_ARCH)/$RPMSMPTYPE
+ # XXX this has been commented out in th rhel5 build file for a while
+ # as it says there, it's probably not needed anymore and can be deleted
+ #LINUXRELEASE=$(find_linux_release "$LINUXOBJ")
+ #if [ -z "$LINUXRELEASE" ]; then
+ # echo "Failed to find linux release in $LINUXOBJ"
+ # return 255
+ #fi
return 0
}
# get the Module.symvers out of the kenrel-flavor RPM
local kernelrpm=${callers_rpm/-source-/-$RPMSMPTYPE-}
- if ! rpm2cpio < "$kernelrpm" | cpio -id ./usr/src/linux-${lnxmaj}${lnxmin}-${lnxrel}-obj/$TARGET_ARCH/$RPMSMPTYPE/Module.symvers ./boot/sym\* > /dev/null 2>&1; then
+ if ! rpm2cpio < "$kernelrpm" | cpio -id ./usr/src/linux-${lnxmaj}${lnxmin}-${lnxrel}-obj/$(resolve_arch $TARGET_ARCH)/$RPMSMPTYPE/Module.symvers ./boot/sym\* > /dev/null 2>&1; then
return 255
fi