socsvn commit: r271052 - soc2014/op/tools

op at FreeBSD.org op at FreeBSD.org
Fri Jul 18 07:41:08 UTC 2014


Author: op
Date: Fri Jul 18 07:41:07 2014
New Revision: 271052
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271052

Log:
  added faster build script
  
  Signed-off-by: Oliver Pinter <oliver.pntr at gmail.com>
  
  

Added:
  soc2014/op/tools/build_kernel_64bit_dirty.csh   (contents, props changed)

Added: soc2014/op/tools/build_kernel_64bit_dirty.csh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ soc2014/op/tools/build_kernel_64bit_dirty.csh	Fri Jul 18 07:41:07 2014	(r271052)
@@ -0,0 +1,47 @@
+#!/bin/csh
+
+setenv TARGET amd64
+setenv MAKEOBJDIRPREFIX /tmp/${TARGET}-objdir
+setenv DESTDIR /tmp/${TARGET}-kernel
+setenv __MAKE_CONF /dev/null
+@ __freebsd_mk_jobs = `sysctl -n kern.smp.cpus` + 1
+set current_dir = `pwd`
+set _current_dir = `echo ${current_dir} | sed -e 's|\(.*/\)\(.*\.git\)\(/.*\)*|\2|g'`
+set _current_realdir = `echo ${current_dir} | sed -e 's|\(.*/\)\(.*\.git\)\(/.*\)*|\1/\2|g'`
+set _check_toolchain = "${MAKEOBJDIRPREFIX}/___kernel-toolchain_DONE"
+set _date=`date "+%Y%m%d%H%M%S"`
+set _log="/tmp/${TARGET}-cc-log-${_current_dir}-${_date}"
+
+if ( "`sysctl -n security.bsd.hardlink_check_uid`" == "1" ) then
+	echo "build will fail, due to hard security checks"
+	echo "sysctl security.bsd.hardlink_check_uid=0"
+	exit
+endif
+
+if ( "`sysctl -n security.bsd.hardlink_check_gid`" == "1" ) then
+	echo "build will fail, due to hard security checks"
+	echo "sysctl security.bsd.hardlink_check_gid=0"
+	exit
+endif
+
+if ( (${_current_dir} != "hardenedBSD.git")) then
+	if ((${_current_dir} != "opBSD.git")) then
+		set _current_dir = "hardenedBSD.git"
+	endif
+endif
+
+echo "build source dir: ${_current_dir}"
+sleep 1
+
+if ( ! -d $MAKEOBJDIRPREFIX ) then
+	mkdir $MAKEOBJDIRPREFIX
+endif
+
+if ( ! -f ${_check_toolchain} ) then
+	(cd /usr/data/source/git/opBSD/${_current_dir}; make -j$__freebsd_mk_jobs -DNO_ROOT KERNCONF=GENERIC kernel-toolchain) |& tee ${_log} || exit
+	touch ${_check_toolchain}
+else
+	echo "skip make kernel-toolchain"
+	sleep 1
+endif
+(cd /usr/data/source/git/opBSD/${_current_dir}; make -j$__freebsd_mk_jobs -DNO_ROOT -DNO_CLEAN KERNCONF=GENERIC kernel) |& tee -a ${_log}


More information about the svn-soc-all mailing list