Whamcloud - gitweb
b=23185 properly support sles10 ppc64
authorBrian J. Murrell <brian.murrell@oracle.com>
Fri, 25 Jun 2010 13:49:13 +0000 (09:49 -0400)
committerJohann Lombardi <johann@sun.com>
Fri, 25 Jun 2010 14:05:32 +0000 (16:05 +0200)
We never really have properly supported ppc64 on sles10:
- RPMSMPTYPE for ppc64 on SLES10 is ppc64, not smp
- add a function to resolve an arch to their canonical value

Comment out some code to align the sles distro lbuild with rhel5.

build/lbuild
build/lbuild-sles
build/lbuild-sles10
lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-sles10-ppc64-ppc64.config [moved from lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-sles10-ppc64-smp.config with 100% similarity]
lustre/kernel_patches/targets/2.6-sles10.target.in

index 32b4f5d..c99ade4 100755 (executable)
@@ -965,6 +965,10 @@ set_rpm_smp_type() {
         [ $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
index 1f1bb8f..1e3902d 100644 (file)
@@ -84,25 +84,32 @@ rpm_BUILD_kernel_dirname() {
     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
 }
index 3441a01..107af00 100644 (file)
@@ -53,7 +53,7 @@ unpack_linux_devel_rpm-sles10() {
     # 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
 
index 8854905..1990483 100644 (file)
@@ -24,9 +24,10 @@ BASE_ARCHS="i686 ppc x86_64 ia64 ppc64"
 BIGMEM_ARCHS=""
 BOOT_ARCHS=""
 JENSEN_ARCHS=""
-SMP_ARCHS="x86_64 ia64 ppc64"
+SMP_ARCHS="x86_64 ia64"
 BIGSMP_ARCHS="i686"
 PSERIES64_ARCHS="ppc"
+PPC64_ARCHS="ppc64"
 UP_ARCHS=""
 SRC_ARCHS=""
 #RPMSMPTYPE="smp"