Added new nodes
authorMichael Jeanson <mjeanson@efficios.com>
Wed, 9 Mar 2016 16:31:54 +0000 (11:31 -0500)
committerMichael Jeanson <mjeanson@efficios.com>
Wed, 9 Mar 2016 16:31:54 +0000 (11:31 -0500)
automation/ansible/hosts
scripts/lttng-modules/param-build.sh

index 28f3842f8fc37595a4c69a2085a9523eb3a7dd84..721f127e67e57e597ad47f4b6ef7ebbbc6627603 100644 (file)
@@ -25,6 +25,10 @@ ci-slave-powerpc-01
 140.211.168.187
 
 [slave-i386]
+ci-slave-i386-02-01
+ci-slave-i386-02-02
+ci-slave-i386-02-03
+ci-slave-i386-02-04
 ci-slave-i386-04-01
 ci-slave-i386-04-02
 ci-slave-i386-04-03
@@ -35,6 +39,10 @@ ci-slave-i386-05-03
 ci-slave-i386-05-04
 
 [slave-amd64]
+ci-slave-amd64-02-01
+ci-slave-amd64-02-02
+ci-slave-amd64-02-03
+ci-slave-amd64-02-04
 ci-slave-amd64-04-01
 ci-slave-amd64-04-02
 ci-slave-amd64-04-03
index 1a3cce7fe923420a05ccaf61c7471d3d2f626e48..e22b88450d76c1512865f2fb473524b15a2477c4 100644 (file)
@@ -100,26 +100,32 @@ LTTBUILDKHDRDIR="${WORKSPACE}/build/lttng-modules-khdr"
 case "$arch" in
     "x86-32")
         karch="x86"
+        cross_compile=""
         ;;
 
     "x86-64")
         karch="x86"
+        cross_compile=""
         ;;
 
     "armhf")
         karch="arm"
+        cross_compile="arm-linux-gnueabihf-"
         ;;
 
     "arm64")
         karch="arm64"
+        cross_compile="aarch64-linux-gnu-"
         ;;
 
     "powerpc")
         karch="powerpc"
+        cross_compile="powerpc-linux-gnu-"
         ;;
 
-    "ppc64|ppc64el")
+    "ppc64el")
         karch="powerpc"
+        cross_compile="powerpc64le-linux-gnu-"
         ;;
 
     *)
@@ -128,6 +134,12 @@ case "$arch" in
         ;;
 esac
 
+# Setup cross compile env if required
+if [ "${cross_build:-}" = "true" ]; then
+    export ARCH="${karch}"
+    export CROSS_COMPILE="${cross_compile}"
+fi
+
 
 # Create build directories
 mkdir -p "${LNXBUILDDIR}" "${LNXHDRDIR}"
@@ -139,56 +151,70 @@ mkdir -p "${LNXBUILDDIR}" "${LNXHDRDIR}"
 cd "${LNXSRCDIR}"
 
 # Prepare linux sources for headers install
-make defconfig
-
-# Enable CONFIG_KALLSYMS_ALL
-sed -i "s/# CONFIG_KALLSYMS_ALL is not set/CONFIG_KALLSYMS_ALL=y/g" .config
-
+make allyesconfig
+sed -i "s/CONFIG_MODULE_SIG=y/# CONFIG_MODULE_SIG is not set/g" .config
+make silentoldconfig
 make modules_prepare
 
-# first copy everything
-cp --parents `find  -type f -name "Makefile*" -o -name "Kconfig*"` "${LNXHDRDIR}"
+# Version specific tasks
+case "$kversion" in
+  Ubuntu*)
+    # Add Ubuntu ABI number to kernel headers, this is normally done by the packaging code
+    ABINUM=$(echo $kversion | grep -P -o 'Ubuntu-(lts-)?.*-\K\d+(?=\..*)')
+    echo "#define UTS_UBUNTU_RELEASE_ABI $ABINUM" >> include/generated/utsrelease.h
+    ;;
+esac
 
-if [ -s Module.symvers ]; then
-    cp Module.symvers "${LNXHDRDIR}"
+# For RT kernels, copy version file
+if [ -s localversion-rt ]; then
+    cp -a localversion-rt "${LNXHDRDIR}"
 fi
 
-if [ -s System.map ]; then
-    cp System.map "${LNXHDRDIR}"
-fi
+# Copy all Makefile related stuff
+find . -path './include/*' -prune \
+    -o -path './scripts/*' -prune -o -type f \
+       \( -name 'Makefile*' -o -name 'Kconfig*' -o -name 'Kbuild*' -o \
+        -name '*.sh' -o -name '*.pl' -o -name '*.lds' \) \
+    -print | cpio -pd --preserve-modification-time "${LNXHDRDIR}"
 
-if [ -s Module.markers ]; then
-    cp Module.markers "${LNXHDRDIR}"
-fi
+# Copy base scripts and include dirs
+cp -a scripts include "${LNXHDRDIR}"
 
-# then drop all but the needed Makefiles/Kconfig files
-rm -rf "${LNXHDRDIR}/Documentation"
-rm -rf "${LNXHDRDIR}/scripts"
-rm -rf "${LNXHDRDIR}/include"
+# Copy arch includes
+(find arch -name include -type d -print | \
+    xargs -n1 -i: find : -type f) | \
+       cpio -pd --preserve-modification-time "${LNXHDRDIR}"
 
-cp .config "${LNXHDRDIR}"
-cp -a scripts "${LNXHDRDIR}"
-
-if [ -d arch/${karch}/scripts ]; then
-    cp -a arch/${karch}/scripts "${LNXHDRDIR}/arch/${karch}/" || :
-fi
-
-if [ -f arch/${karch}/*lds ]; then
-    cp -a arch/${karch}/*lds "${LNXHDRDIR}/arch/${karch}/" || :
-fi
+# Copy arch scripts
+(find arch -name scripts -type d -print | \
+    xargs -n1 -i: find : -type f) | \
+       cpio -pd --preserve-modification-time "${LNXHDRDIR}"
 
+# Cleanup scripts
 rm -f "${LNXHDRDIR}/scripts/*.o"
 rm -f "${LNXHDRDIR}/scripts/*/*.o"
 
+# On powerpc this object is required to link modules
 if [ "${karch}" = "powerpc" ]; then
+    make arch/powerpc/lib/crtsavres.o
     cp -a --parents arch/powerpc/lib/crtsavres.[So] "${LNXHDRDIR}/"
 fi
 
-if [ -d arch/${karch}/include ]; then
-    cp -a --parents arch/${karch}/include "${LNXHDRDIR}/"
+# Copy modules related stuff, if available
+if [ -s Module.symvers ]; then
+    cp Module.symvers "${LNXHDRDIR}"
+fi
+
+if [ -s System.map ]; then
+    cp System.map "${LNXHDRDIR}"
+fi
+
+if [ -s Module.markers ]; then
+    cp Module.markers "${LNXHDRDIR}"
 fi
 
-cp -a include "${LNXHDRDIR}/include"
+# Copy config file
+cp .config "${LNXHDRDIR}"
 
 # Make sure the Makefile and version.h have a matching timestamp so that
 # external modules can be built
@@ -217,14 +243,16 @@ cd "${LNXSRCDIR}"
 make mrproper
 
 # Prepare linux sources for modules OOT build
-make O="${LNXBUILDDIR}" defconfig
-
-# Enable CONFIG_KALLSYMS_ALL
-sed -i "s/# CONFIG_KALLSYMS_ALL is not set/CONFIG_KALLSYMS_ALL=y/g" "${LNXBUILDDIR}"/.config
-
-# Prepare out of tree dir for modules build
+make O="${LNXBUILDDIR}" allyesconfig
+sed -i "s/CONFIG_MODULE_SIG=y/# CONFIG_MODULE_SIG is not set/g" "${LNXBUILDDIR}"/.config
+make O="${LNXBUILDDIR}" silentoldconfig
 make O="${LNXBUILDDIR}" modules_prepare
 
+# On powerpc this object is required to link modules
+if [ "${karch}" = "powerpc" ]; then
+    make O="${LNXBUILDDIR}" arch/powerpc/lib/crtsavres.o
+fi
+
 # Version specific tasks
 case "$kversion" in
   Ubuntu*)
@@ -244,4 +272,8 @@ build_modules "${LNXBUILDDIR}" "${LTTBUILKSRCDDIR}"
 # Build modules against kernel headers
 build_modules "${LNXHDRDIR}" "${LTTBUILDKHDRDIR}"
 
+# Make sure modules were built
+find "${LNXBUILDDIR}" -name "*.ko"
+find "${LNXHDRDIR}" -name "*.ko"
+
 # EOF
This page took 0.025434 seconds and 4 git commands to generate.