OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

92 lines
2.8 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../linux26-src/linux26-src.conf
  5. # Copyright (C) 2007 The OpenSDE Project
  6. # Copyright (C) 1998 - 2003 Clifford Wolf
  7. #
  8. # More information can be found in the files COPYING and README.
  9. #
  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 ---
  15. # include the function to patch and configure the kernel
  16. . $base/package/*/*/linux-conf.in
  17. main_lx_src() {
  18. local vanilla_ver=$( echo $ver | cut -d. -f1-3 )
  19. local patches_dir=
  20. echo "Extracting the Linux Kernel Sources [$vanilla_ver] ... "
  21. # hack to extract the files into our usr/src dir ...
  22. # this part is continued inside lx_injectextraversion
  23. tar $taropt $( match_source_file -p linux linux$treever | head -n 1 )
  24. chown -R 0:0 linux-$vanilla_ver; chmod go=u,go-w linux-$vanilla_ver
  25. cd linux-$vanilla_ver
  26. lx_patch
  27. lx_config
  28. patches_dir="$root/usr/src/linux-$lx_kernelrelease-patches"
  29. # remove debug configs
  30. rm -f .config.[1-9]
  31. if [ "$SDECFG_PKG_LINUX_CONFIG_STYLE" = none ] ; then
  32. # create a valid .config (new settings may be available etc.)
  33. yes '' | eval $MAKE oldconfig > /dev/null
  34. fi
  35. if grep -q "CONFIG_MODULES=y" .config ; then
  36. eval $MAKE $makeopt modules_prepare
  37. fi
  38. echo "Clean up the *.orig and *~ files ... "
  39. find -name '*.orig' -o -name '*~' | xargs rm -f
  40. rm -f .config.old
  41. echo "Copying kernel patches ... "
  42. rm -rf "$patches_dir"; mkdir -p "$patches_dir"
  43. cat <<-EOT > $patches_dir/README
  44. This directory contains all the applied patches, used
  45. to build the kernel (in addition to the official kernel sources).
  46. EOT
  47. for x in $patchfiles ; do
  48. # if the patch does not exist it was downloaded or so
  49. # and we just do not copy it ...
  50. [ ! -f "$x" ] || cp -v "$x" "$patches_dir"
  51. done
  52. if [ "$SDECFG_PKG_LINUX_CONFIG_STYLE" != none ] ; then
  53. cp -v .config_nomods "$patches_dir/config_nomods.txt"
  54. cp -v .config_modules "$patches_dir/config_modules.txt"
  55. fi
  56. cp -v .config "$patches_dir/config.txt"
  57. echo "Installing kernel sources [$lx_kernelrelease] "
  58. rm -rf $root/usr/src/{linux-$lx_kernelrelease,linux}
  59. mkdir -vp "$root/usr/src/linux-$lx_kernelrelease"
  60. ln -svnf "linux-$lx_kernelrelease" $root/usr/src/linux
  61. tar -cf - * | tar -C "$root/usr/src/linux-$lx_kernelrelease" -xf -
  62. cp -v .config "$root/usr/src/linux-$lx_kernelrelease/"
  63. }
  64. createdocs=0
  65. srctar=none
  66. custmain="main_lx_src"
  67. for x in $( match_source_file -p patch-.* linux$treever | grep -v '\.tar\.' ); do
  68. var_insert patchfiles " " "$x"
  69. done
  70. for x in $( ls -1d $base/package/$repository/linux$treever/*.patch ); do
  71. var_append patchfiles " " "$x"
  72. done