scripts: Merge r8007:8277 from trunk

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@8281 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2019-04-30 14:27:19 +00:00
parent 06cdc45897
commit 6971f60c14
8 changed files with 155 additions and 194 deletions
+11 -5
View File
@@ -291,6 +291,7 @@ CONFIG_MAC80211_DRIVER_API_TRACER \
CONFIG_MMIOTRACE \
CONFIG_NET_DROP_MONITOR \
CONFIG_NOP_TRACER \
CONFIG_RETPOLINE \
CONFIG_SCHED_TRACER \
CONFIG_SECURITY_SELINUX \
CONFIG_STACK_TRACER \
@@ -298,9 +299,11 @@ CONFIG_STACK_VALIDATION \
CONFIG_TRACEPOINTS \
CONFIG_TRACER_MAX_TRACE \
CONFIG_TRACING \
CONFIG_UNWINDER_ORC \
CONFIG_X86_32 \
CONFIG_X86_X32 \
"
local enable="CONFIG_UNWINDER_FRAME_POINTER"
echo "Patching and configuring kernel ..."
if [ "$ipv6" = "false" ]; then
@@ -319,6 +322,7 @@ CONFIG_X86_X32 \
fi &&
make -s allmodconfig &>"${outputdir}/make-config-output.txt" &&
for c in $disable; do sed -i.tmp "s/^$c=[ym]\$/$c=n/" .config; done &&
for c in $enable; do sed -i.tmp "s/^\(# \)*$c\(=.*\| is not set\)\$/$c=y/" .config; done &&
make -s oldconfig </dev/null &>/dev/null
)
}
@@ -648,14 +652,10 @@ do
patchdir="patchdir-${kv}"
k="${kv}"
if ! download_kernel "$k"; then
echo "Downloading kernel version $k failed"
continue
fi
generate_kernel_patch "$k" "${generate_kernel_patch_options}" || continue
(
cd "${outputdir}" &&
extract_kernel_tree "$k" &&
download_and_extract_kernel_tree "$k" &&
cd "linux-$k/include/linux" &&
if [ ! -e compiler-gcc6.h ]; then
for f in compiler-gcc5.h compiler-gcc4.h; do
@@ -671,6 +671,12 @@ do
run_checkpatch "$k"
fi
patch_and_configure_kernel "$k"
case "$k" in
2.*|3.*)
# Tell the kernel that we are using gcc 4.6.
KCFLAGS="-U__GNUC__ -U__GNUC_MINOR__ -D__GNUC__=4 -D__GNUC_MINOR__=6"
export KCFLAGS;;
esac
subdirs=(drivers/scst)
if [ "${run_sparse}" = "true" ]; then
run_sparse "$k" "${subdirs[@]}"