Commits

Christos Nouskas  committed bf02d63

Update build scripts

  • Participants
  • Parent commits 86fbfd2

Comments (0)

Files changed (3)

File build_all.sh

 if [[ "$USE_EXISTING" = 0 ||  $1 != "USE_EXISTING"  ]]; then
   rm -fr linux-pf nvidia-pf
   aurdownload linux-pf nvidia-pf
+#  aurget -Sd --noconfirm linux-pf
+#  aurget -Sd --noconfirm nvidia-pf
+#  tar zxf linux-pf.tar.gz
+#  tar zxf nvidia-pf.tar.gz
 fi
 
 cd linux-pf || exit 1
   args=$args" --asroot"
 fi
 if [[ $1 = "USE_EXISTING"  ]]; then
-  cp config.GENERIC-$_arch src/linux-$kver/.config
+  cp -f config.GENERIC-$_arch src/linux-$kver/.config
   nice -n 20 makepkg -ef $args
 else
   nice -n 20 makepkg $args
   cp -f /usr/src/linux-$kver-pf/Module.symvers $_builddir/linux-pf/src/linux-$kver/
 fi
 
+# add version.h for nvidia-pf
+ln -sf src/linux-$kver/include/generated/uapi/linux/version.h src/linux-$kver/include/linux/version.h
+
 cd $_builddir/nvidia-pf || exit 1
 
 _nvpkgver=`grep pkgver= PKGBUILD`
   cd $_builddir/nvidia-pf || exit 1
 # Set the cpu variable
   sed -i "s/^_cpu\(.*\)/_cpu=-$_cpu/" PKGBUILD
-  nice -n 20 makepkg -ef $args
+  nice -n 20 makepkg -ef $args || nice -n 20 makepkg -ef $args
 
   now="$(date +%s)"
   elapsed="$(expr $now - $repeat)"

File build_nvidia.sh

 fi
 
 if [[ $1 = "USE_EXISTING"  ]]; then
-  cp config.GENERIC-$_arch src/linux-$kver/.config
+  cp -f config.GENERIC-$_arch src/linux-$kver/.config
   nice -n 20 makepkg -ef $args
 else
   nice -n 20 makepkg $args
   nice -n 20 makepkg -ef $args
   # linux-pf should exit gracefully
 
+# add version.h
+  ln -sf src/linux-$kver/include/generated/uapi/linux/version.h src/linux-$kver/include/linux/version.h
+
   cd $_builddir/nvidia-pf || exit 1
 # Set the cpu variable
   sed -i "s/^_cpu\(.*\)/_cpu=-$_cpu/" PKGBUILD

File build_target_pkgs.sh

 if [[ $1 != "USE_EXISTING"  ]]; then
   rm -fr linux-pf
   aurdownload linux-pf
+#  aurget -Sd --noconfirm linux-pf
+#  tar zxf linux-pf.tar.gz
 fi
 cd linux-pf
 unalias cp mv 2>/dev/null
   args=$args" --asroot"
 fi
 if [[ $1 = "USE_EXISTING"  ]]; then
-  cp config.GENERIC-$_arch src/linux-$kernver/.config
+  cp -f config.GENERIC-$_arch src/linux-$kernver/.config
   nice -n 20 makepkg -ef $args
 else
   nice -n 20 makepkg $args
 
 
 
-  cd $_builddir/linux-pf/src/linux-$kernver
-  rm -f .config
-  make -j4 clean
-  cd $_builddir/linux-pf
-  rm -fr pkg/*
   echo "Building linux-pf-$_cpu"
-  cp config.$cpu-$_arch src/linux-$kernver/.config
+  cp -f config.$cpu-$_arch src/linux-$kernver/.config
   echo "Building $_cpu version: `date`" >> $_basedir/batch_building_linux-pf.log
   repeat="$(date +%s)"
+  cd $_builddir/linux-pf/src/linux-$kernver
+  nice -n 20 make -j4 clean
+  nice -n 20 make bzImage modules
+  cd $_builddir/linux-pf
+  nice -n 20 rm -fr pkg/*
   nice -n 20 makepkg -ef $args
 # calculate report build time
   now="$(date +%s)"