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.

109 lines
3.9 KiB

  1. #!/bin/sh
  2. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. #
  5. # Filename: package/.../linux-header/linux-header.conf
  6. # Copyright (C) 2006 The OpenSDE Project
  7. # Copyright (C) 2004 - 2006 The T2 SDE Project
  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. # we overwrite lx_cpu here, since the headers are older than the linux26
  17. # packages and do not have the combined powerpc arch for both 32/64bit ...
  18. # lx_cpu=`echo $arch | arch2uname | sed -e s/mips64/mips/`
  19. . $base/package/*/*/linux-conf.in
  20. autopatch=0
  21. createdocs=0
  22. if atstage toolchain; then
  23. root="$sysroot"
  24. fi
  25. # patch
  26. hook_add premake 2 "lx_patch"
  27. # and disable `make all` at the last-minute
  28. hook_add premake 9 "export makeopt="
  29. makeinstopt="$makeopt"
  30. var_append makeinstopt ' ' "INSTALL_HDR_PATH=$root/$prefix"
  31. var_append makeinstopt ' ' "headers_install"
  32. ###############################################################################
  33. # #
  34. # Note: The following old custmain related code is left for later research #
  35. # #
  36. ###############################################################################
  37. main_lx_header() {
  38. lx_patch
  39. # we need to create an config since this generates some files
  40. yes '' | eval $MAKE oldconfig > /dev/null
  41. # install the header files - and do some post-processing for sparc
  42. rm -rf $root/$prefix/include/{asm,asm-generic,linux,sound,asm-sparc,asm-sparc64}
  43. mkdir -p $root/$prefix/include
  44. case $arch in
  45. sparc64)
  46. # we can only generate this files when we have a cross compiler
  47. # which is stage 1 and above ...
  48. if ! atstage toolchain && [ $treever != 26 ] ; then
  49. # build two generated headers first ...
  50. make ARCH=sparc CROSS_COMPILE=$archprefix KCC=$KCC \
  51. arch/sparc/kernel/Makefile check_asm
  52. make ARCH=sparc64 CROSS_COMPILE=$archprefix KCC=$KCC \
  53. arch/sparc64/kernel/Makefile check_asm
  54. fi
  55. cp -rv include/asm-sparc{,64} $root/$prefix/include/
  56. sh $base/package/*/linux-header/generate-asm $root/$prefix/include \
  57. sparc sparc64 __arch64__
  58. ;;
  59. x86-64)
  60. cp -rv include/asm-{i386,x86_64} $root/$prefix/include/
  61. sh $base/package/*/linux-header/generate-asm $root/$prefix/include \
  62. i386 x86_64 __x86_64__
  63. ;;
  64. powerpc64)
  65. cp -rv include/asm-{ppc,ppc64} $root/$prefix/include/
  66. sh $base/package/*/linux-header/generate-asm $root/$prefix/include \
  67. ppc ppc64 __PPC64__
  68. ;;
  69. sh64)
  70. cp -rv include/asm-{sh,sh64} $root/$prefix/include/
  71. sh $base/package/*/linux-header/generate-asm $root/$prefix/include \
  72. sh sh64 __LP64__
  73. ;;
  74. *)
  75. mkdir -p $root/$prefix/include/asm
  76. cp -rv include/asm/* $root/$prefix/include/asm/
  77. ;;
  78. esac
  79. cp -rv include/{asm-generic,linux,sound} $root/$prefix/include/
  80. # network related kernel headers
  81. mkdir -p $root/$prefix/include/net
  82. # needed by ipvsadm2
  83. cp -v include/net/ip_vs.h $root/$prefix/include/net/
  84. # needed by snort
  85. cp -v include/net/{dst.h,inetpeer.h,flow.h} $root/$prefix/include/net/
  86. }
  87. # autopatch=0 ; createdocs=0
  88. # patchfiles="$base/package/$repository/linux$treever/*.patch $patchfiles"
  89. # custmain="main_lx_header"
  90. ###############################################################################
  91. # #
  92. # End of the old custmain related code #
  93. # #
  94. ###############################################################################