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.

69 lines
2.2 KiB

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