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.

68 lines
2.2 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../grub/grub.conf
  5. # Copyright (C) 2006 - 2007 The OpenSDE Project
  6. # Copyright (C) 2004 - 2006 The T2 SDE Project
  7. # Copyright (C) 1998 - 2003 Clifford Wolf
  8. #
  9. # More information can be found in the files COPYING and README.
  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; version 2 of the License. A copy of the
  14. # GNU General Public License can be found in the file COPYING.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. grub_postmake() {
  17. mkdir -p $root/boot/grub
  18. trg=${arch_target/-linux-*}
  19. trg=i386-${trg/i*-/}
  20. cp -v $root$libdir/grub/$trg/* $root/boot/grub/
  21. cp -v docs/menu.lst $root/boot/grub/menu.lst.example
  22. counter=1
  23. confopt="$confopt --enable-diskless"
  24. { echo
  25. echo "Driver-map for PXE and Etherboot 2nd stage GRUB images:"
  26. echo "======================================================="
  27. echo
  28. } > $root/boot/grub/README.pxe_nb
  29. while read drivers
  30. do
  31. eval "./configure $confopt --enable-${drivers// / --enable-}"
  32. make -C netboot clean; make
  33. { echo "pxegrub.$counter and nbgrub.$counter:"
  34. echo " $drivers"; echo
  35. } >> $root/boot/grub/README.pxe_nb
  36. cp stage2/pxegrub $root/boot/grub/pxegrub.$counter
  37. cp stage2/nbgrub $root/boot/grub/nbgrub.$counter
  38. (( counter++ ))
  39. done < <(
  40. ./configure --help | grep ' driver$' |
  41. cut -f4- -d- | cut -f1 -d' ' | sort -u |
  42. paste -d' ' - - - - - - -
  43. )
  44. }
  45. hook_add preconf 3 "aclocal;automake;autoconf"
  46. hook_add postmake 5 "grub_postmake"
  47. hook_add postmake 6 "cp -fv $confdir/opensde-grub-splash.xpm.gz $root/boot/"
  48. # Every other optimization would cause build errors like
  49. #
  50. # pre_stage2_exec-builtins.o: In function `terminfo_func':
  51. # pre_stage2_exec-builtins.o(.text+0x3b0e): undefined reference to `memcpy'
  52. #
  53. var_append GCC_WRAPPER_APPEND " " "-Os"
  54. if [ $arch = x86-64 ] ; then
  55. libdir=\$root/\$prefix/lib
  56. var_insert GCC_WRAPPER_INSERT " " "-m32"
  57. arch_target="`echo $arch_target | sed -e 's/[-_]*64//' -e 's/x86/i386/'`"
  58. echo_status "Set arch_target to $arch_target"
  59. set_confopt
  60. fi