1 # --- SDE-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
4 # Filename: package/.../linux26-src/linux26-src.conf
5 # Copyright (C) 2007 The OpenSDE Project
6 # Copyright (C) 1998 - 2003 Clifford Wolf
8 # More information can be found in the files COPYING and README.
10 # This program is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; version 2 of the License. A copy of the
13 # GNU General Public License can be found in the file COPYING.
14 # --- SDE-COPYRIGHT-NOTE-END ---
16 # include the function to patch and configure the kernel
17 . $base/package/*/*/linux-conf.in
20 local vanilla_ver=$( echo $ver | cut -d. -f1-3 )
23 echo "Extracting the Linux Kernel Sources [$vanilla_ver] ... "
25 # hack to extract the files into our usr/src dir ...
26 # this part is continued inside lx_injectextraversion
27 tar $taropt $( match_source_file -p linux linux$treever | head -n 1 )
29 chown -R 0:0 linux-$vanilla_ver; chmod go=u,go-w linux-$vanilla_ver
35 patches_dir="$root/usr/src/linux-$lx_kernelrelease-patches"
37 # remove debug configs
40 if [ "$SDECFG_PKG_LINUX_CONFIG_STYLE" = none ] ; then
41 # create a valid .config (new settings may be available etc.)
42 yes '' | eval $MAKE oldconfig > /dev/null
45 if grep -q "CONFIG_MODULES=y" .config ; then
46 eval $MAKE $makeopt modules_prepare
49 echo "Clean up the *.orig and *~ files ... "
50 find -name '*.orig' -o -name '*~' | xargs rm -f
53 echo "Copying kernel patches ... "
54 rm -rf "$patches_dir"; mkdir -p "$patches_dir"
56 cat <<-EOT > $patches_dir/README
57 This directory contains all the applied patches, used
58 to build the kernel (in addition to the official kernel sources).
61 for x in $patchfiles ; do
62 # if the patch does not exist it was downloaded or so
63 # and we just do not copy it ...
64 [ ! -f "$x" ] || cp -v "$x" "$patches_dir"
67 if [ "$SDECFG_PKG_LINUX_CONFIG_STYLE" != none ] ; then
68 cp -v .config_nomods "$patches_dir/config_nomods.txt"
69 cp -v .config_modules "$patches_dir/config_modules.txt"
71 cp -v .config "$patches_dir/config.txt"
73 echo "Installing kernel sources [$lx_kernelrelease] "
74 rm -rf $root/usr/src/{linux-$lx_kernelrelease,linux}
75 mkdir -vp "$root/usr/src/linux-$lx_kernelrelease"
76 ln -svnf "linux-$lx_kernelrelease" $root/usr/src/linux
78 tar -cf - * | tar -C "$root/usr/src/linux-$lx_kernelrelease" -xf -
79 cp -v .config "$root/usr/src/linux-$lx_kernelrelease/"
85 custmain="main_lx_src"
87 for x in $( match_source_file -p patch-.* linux$treever | grep -v '\.tar\.' ); do
88 var_insert patchfiles " " "$x"
90 for x in $( ls -1d $base/package/$repository/linux$treever/*.patch ); do
91 var_append patchfiles " " "$x"