|
|
@ -3,7 +3,7 @@ |
|
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
|
|
# |
|
|
|
# Filename: package/.../linux-header/linux-header.conf |
|
|
|
# Copyright (C) 2006 The OpenSDE Project |
|
|
|
# Copyright (C) 2006 - 2007 The OpenSDE Project |
|
|
|
# Copyright (C) 2004 - 2006 The T2 SDE Project |
|
|
|
# |
|
|
|
# More information can be found in the files COPYING and README. |
|
|
@ -29,81 +29,22 @@ fi |
|
|
|
|
|
|
|
# patch |
|
|
|
hook_add premake 2 "lx_patch" |
|
|
|
|
|
|
|
# WARNING: HACK ALERT! |
|
|
|
# change the timestamp of the headers to be newer than the currently installed |
|
|
|
# ones to really install them |
|
|
|
hook_add premake 8 "find include -type f -exec touch '{}' \;" |
|
|
|
|
|
|
|
# and disable `make all` at the last-minute |
|
|
|
hook_add premake 9 "export makeopt=" |
|
|
|
|
|
|
|
makeinstopt="$makeopt" |
|
|
|
var_append makeinstopt ' ' "INSTALL_HDR_PATH=$root/$prefix" |
|
|
|
var_append makeinstopt ' ' "headers_install" |
|
|
|
|
|
|
|
|
|
|
|
############################################################################### |
|
|
|
# # |
|
|
|
# Note: The following old custmain related code is left for later research # |
|
|
|
# # |
|
|
|
############################################################################### |
|
|
|
main_lx_header() { |
|
|
|
lx_patch |
|
|
|
|
|
|
|
# we need to create an config since this generates some files |
|
|
|
yes '' | eval $MAKE oldconfig > /dev/null |
|
|
|
# WARNING: preventing the removal of existing header files |
|
|
|
# if we do not set those variables empty _all_ header files in /usr/include |
|
|
|
# are kindly removed! |
|
|
|
var_append makeinstopt ' ' "oldheaders= unwanted=" |
|
|
|
|
|
|
|
# install the header files - and do some post-processing for sparc |
|
|
|
rm -rf $root/$prefix/include/{asm,asm-generic,linux,sound,asm-sparc,asm-sparc64} |
|
|
|
mkdir -p $root/$prefix/include |
|
|
|
case $arch in |
|
|
|
sparc64) |
|
|
|
# we can only generate this files when we have a cross compiler |
|
|
|
# which is stage 1 and above ... |
|
|
|
if ! atstage toolchain && [ $treever != 26 ] ; then |
|
|
|
# build two generated headers first ... |
|
|
|
make ARCH=sparc CROSS_COMPILE=$archprefix KCC=$KCC \ |
|
|
|
arch/sparc/kernel/Makefile check_asm |
|
|
|
make ARCH=sparc64 CROSS_COMPILE=$archprefix KCC=$KCC \ |
|
|
|
arch/sparc64/kernel/Makefile check_asm |
|
|
|
fi |
|
|
|
cp -rv include/asm-sparc{,64} $root/$prefix/include/ |
|
|
|
sh $base/package/*/linux-header/generate-asm $root/$prefix/include \ |
|
|
|
sparc sparc64 __arch64__ |
|
|
|
;; |
|
|
|
x86-64) |
|
|
|
cp -rv include/asm-{i386,x86_64} $root/$prefix/include/ |
|
|
|
sh $base/package/*/linux-header/generate-asm $root/$prefix/include \ |
|
|
|
i386 x86_64 __x86_64__ |
|
|
|
;; |
|
|
|
powerpc64) |
|
|
|
cp -rv include/asm-{ppc,ppc64} $root/$prefix/include/ |
|
|
|
sh $base/package/*/linux-header/generate-asm $root/$prefix/include \ |
|
|
|
ppc ppc64 __PPC64__ |
|
|
|
;; |
|
|
|
sh64) |
|
|
|
cp -rv include/asm-{sh,sh64} $root/$prefix/include/ |
|
|
|
sh $base/package/*/linux-header/generate-asm $root/$prefix/include \ |
|
|
|
sh sh64 __LP64__ |
|
|
|
;; |
|
|
|
*) |
|
|
|
mkdir -p $root/$prefix/include/asm |
|
|
|
cp -rv include/asm/* $root/$prefix/include/asm/ |
|
|
|
;; |
|
|
|
esac |
|
|
|
|
|
|
|
cp -rv include/{asm-generic,linux,sound} $root/$prefix/include/ |
|
|
|
|
|
|
|
# network related kernel headers |
|
|
|
mkdir -p $root/$prefix/include/net |
|
|
|
# needed by ipvsadm2 |
|
|
|
cp -v include/net/ip_vs.h $root/$prefix/include/net/ |
|
|
|
# needed by snort |
|
|
|
cp -v include/net/{dst.h,inetpeer.h,flow.h} $root/$prefix/include/net/ |
|
|
|
} |
|
|
|
|
|
|
|
# autopatch=0 ; createdocs=0 |
|
|
|
|
|
|
|
# patchfiles="$base/package/$repository/linux$treever/*.patch $patchfiles" |
|
|
|
# custmain="main_lx_header" |
|
|
|
var_append makeinstopt ' ' "headers_install" |
|
|
|
|
|
|
|
############################################################################### |
|
|
|
# # |
|
|
|
# End of the old custmain related code # |
|
|
|
# # |
|
|
|
############################################################################### |