mirror of the now-defunct rocklinux.org
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.

123 lines
3.8 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/base/linux24/linux24.conf
  9. # ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; either version 2 of the License, or
  14. # (at your option) any later version. A copy of the GNU General Public
  15. # License can be found at Documentation/COPYING.
  16. #
  17. # Many people helped and are helping developing ROCK Linux. Please
  18. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  19. # file for details.
  20. #
  21. # --- ROCK-COPYRIGHT-NOTE-END ---
  22. # include the function to patch and configure the kernel
  23. . $base/package/base/linux24/lx_config.sh
  24. main_lx() {
  25. lx_config
  26. # we need to rerun the oldconfig since the used .config
  27. # might not match the one used in the last oldconfig run
  28. # (e.g. the nomods is run last - and normally the module
  29. # one is used)
  30. yes '' | eval $MAKE oldconfig > /dev/null
  31. if [[ $treever = 24* ]] ; then
  32. echo "Creating dependencies ..."
  33. eval $MAKE -j 1 dep
  34. fi
  35. echo "Cleanup kernel ..."
  36. eval $MAKE -j 1 clean > /dev/null
  37. echo "Building the kernel ..."
  38. [ "$pkg" = "$ROCKCFG_DEFAULT_KERNEL" ] && default=1
  39. case "$lx_cpu" in
  40. i386)
  41. eval $MAKE bzImage
  42. cp -vf arch/i386/boot/bzImage $root/boot/vmlinuz_$ver-rock
  43. [ "$default" ] && \
  44. cp -vf arch/i386/boot/bzImage $root/boot/vmlinuz ;;
  45. x86_64)
  46. eval $MAKE bzImage
  47. cp -vf arch/x86_64/boot/bzImage $root/boot/vmlinuz_$ver-rock
  48. [ "$default" ] && \
  49. cp -vf arch/x86_64/boot/bzImage $root/boot/vmlinuz ;;
  50. alpha)
  51. eval $MAKE vmlinux
  52. gzip < vmlinux > $root/boot/vmlinux_$ver-rock.gz
  53. [ "$default" ] && \
  54. cp -vf $root/boot/vmlinux_$ver-rock.gz root/boot/vmlinux.gz ;;
  55. mips)
  56. eval $MAKE vmlinux
  57. $BUILDCC arch/mips/boot/elf2ecoff.c -o elf2ecoff
  58. ./elf2ecoff vmlinux vmlinux.ecoff
  59. cp -vf vmlinux.ecoff $root/boot/vmlinux_$ver-rock.ecoff
  60. [ "$default" ] && \
  61. cp -vf vmlinux.ecoff $root/boot/ ;;
  62. ppc)
  63. eval $MAKE vmlinux
  64. cp -vf vmlinux $root/boot/vmlinux_$ver-rock
  65. [ "$default" ] && \
  66. cp -vf vmlinux $root/boot/vmlinux
  67. eval $MAKE zImage
  68. # copy some specially pre-processed files with version
  69. for file in `(cd arch/ppc/boot/images/ ; ls zImage.*)` ; do
  70. cp -v arch/ppc/boot/images/$x
  71. $root/boot/${x/zImage/zImage-$ver}
  72. done
  73. ;;
  74. *)
  75. eval $MAKE vmlinux
  76. cp -vf vmlinux $root/boot/vmlinux_$ver-rock
  77. [ "$default" ] && \
  78. cp -vf vmlinux $root/boot/vmlinux ;;
  79. esac
  80. cp -vf .config $root/boot/kconfig_$ver-rock
  81. cp -vf System.map $root/boot/System.map_$ver-rock
  82. [ "$default" ] && cp -vf System.map $root/boot/System.map
  83. echo "Building the modules ..."
  84. eval $MAKE modules
  85. echo "Installing the modules ..."
  86. if [ $stagelevel -le 1 ] ; then
  87. eval $MAKE modules_install \
  88. INSTALL_MOD_PATH=$root DEPMOD=/bin/true
  89. else
  90. eval $MAKE modules_install DEPMOD=/bin/true
  91. echo "Running 'depmod -a -q -F /boot/System.map $ver-rock' .."
  92. depmod -a -q -F /boot/System.map_$ver-rock $ver-rock
  93. for x in /lib/modules/$ver-rock/modules.*
  94. do [ -f $x ] && add_flist $x; done
  95. fi
  96. # fix /lib/modules/${ver}/build symlink
  97. rm -f $root/lib/modules/${ver}-rock/build
  98. ln -sf ../../../usr/src/linux-${ver}-rock \
  99. $root/lib/modules/${ver}-rock/build
  100. if [ "$default" ] ; then
  101. cp $base/package/base/linux24/mkinitrd.sh $root/sbin/mkinitrd
  102. chmod +x $root/sbin/mkinitrd
  103. if [ -z "$root" ]; then
  104. mkinitrd empty ${ver}-rock
  105. rm -f /boot/initrd.img
  106. ln -s initrd-${ver}-rock.img /boot/initrd.img
  107. fi
  108. fi
  109. }
  110. custmain="main_lx"
  111. autopatch=0