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

#!/bin/sh
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# 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) 2004 - 2006 The T2 SDE Project
#
# More information can be found in the files COPYING and README.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
# we overwrite lx_cpu here, since the headers are older than the linux26
# packages and do not have the combined powerpc arch for both 32/64bit ...
# lx_cpu=`echo $arch | arch2uname | sed -e s/mips64/mips/`
. $base/package/*/*/linux-conf.in
autopatch=0
createdocs=0
if atstage toolchain; then
root="$sysroot"
fi
# patch
hook_add premake 2 "lx_patch"
# 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
# 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"
###############################################################################
# #
# End of the old custmain related code #
# #
###############################################################################