linux4.20: remove host built scripts and tools
linux4.20: add missing includes linux4.20: install missing arch/arm64/kernel/vdso in linux-headers linux4.20: keep arch/x86/ras/Kconfig for all architectures [skip ci]
This commit is contained in:
parent
d9d81e6ce6
commit
6b1b16bb46
1 changed files with 24 additions and 7 deletions
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'linux4.20'
|
||||
pkgname=linux4.20
|
||||
version=4.20.7
|
||||
revision=1
|
||||
revision=2
|
||||
wrksrc="linux-${version}"
|
||||
short_desc="The Linux kernel and modules (${version%.*} series)"
|
||||
maintainer="Helmut Pozimski <helmut@pozimski.eu>"
|
||||
|
@ -153,6 +153,14 @@ do_install() {
|
|||
install -Dm644 Makefile ${hdrdest}/Makefile
|
||||
install -Dm644 kernel/Makefile ${hdrdest}/kernel/Makefile
|
||||
install -Dm644 .config ${hdrdest}/.config
|
||||
for file in $(find . -name Kconfig\*); do
|
||||
mkdir -p ${hdrdest}/$(dirname $file)
|
||||
install -Dm644 $file ${hdrdest}/${file}
|
||||
done
|
||||
for file in $(find arch/${subarch:-$arch} -name module.lds -o -name Kbuild.platforms -o -name Platform); do
|
||||
mkdir -p ${hdrdest}/$(dirname $file)
|
||||
install -Dm644 $file ${hdrdest}/${file}
|
||||
done
|
||||
mkdir -p ${hdrdest}/include
|
||||
# Remove firmware stuff provided by the "linux-firmware" pkg.
|
||||
rm -rf ${DESTDIR}/usr/lib/firmware
|
||||
|
@ -171,6 +179,10 @@ do_install() {
|
|||
# Copy files necessary for later builds, like nvidia and vmware
|
||||
cp Module.symvers ${hdrdest}
|
||||
cp -a scripts ${hdrdest}
|
||||
mkdir -p ${hdrdest}/security/selinux
|
||||
cp -a security/selinux/include ${hdrdest}/security/selinux
|
||||
mkdir -p ${hdrdest}/tools/include
|
||||
cp -a tools/include/tools ${hdrdest}/tools/include
|
||||
|
||||
mkdir -p ${hdrdest}/arch/${arch}/kernel
|
||||
cp arch/${arch}/Makefile ${hdrdest}/arch/${arch}
|
||||
|
@ -181,6 +193,9 @@ do_install() {
|
|||
if [ "$arch" = "x86" ]; then
|
||||
mkdir -p ${hdrdest}/arch/x86/kernel
|
||||
cp arch/x86/kernel/asm-offsets.s ${hdrdest}/arch/x86/kernel
|
||||
elif [ "$arch" = "arm64" ]; then
|
||||
mkdir -p ${hdrdest}/arch/arm64/kernel
|
||||
cp -a arch/arm64/kernel/vdso ${hdrdest}/arch/arm64/kernel/
|
||||
fi
|
||||
|
||||
# add headers for lirc package
|
||||
|
@ -249,12 +264,6 @@ do_install() {
|
|||
;;
|
||||
esac
|
||||
|
||||
# Copy in Kconfig files
|
||||
for i in $(find . -name "Kconfig*"); do
|
||||
mkdir -p ${hdrdest}/$(echo $i | sed 's|/Kconfig.*||')
|
||||
cp $i ${hdrdest}/$i
|
||||
done
|
||||
|
||||
# Remove unneeded architectures
|
||||
case "$arch" in
|
||||
i386|x86_64) _args="arm* p*";;
|
||||
|
@ -265,6 +274,14 @@ do_install() {
|
|||
ia64 m* s* um v850 xtensa ${_args}; do
|
||||
rm -rf ${hdrdest}/arch/${arch}
|
||||
done
|
||||
# Remove helper binaries built for host
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
# ${XBPS_MACHINE//_/-} will transform x86_64 to x84-64 as reported by 'file' command
|
||||
find ${hdrdest}/scripts/ ${hdrdest}/tools/ -type f -executable | xargs file | grep -F ' ELF ' | grep ${XBPS_MACHINE//_/-} | cut -d':' -f1 | xargs rm
|
||||
fi
|
||||
# Keep arch/x86/ras/Kconfig as it is needed by drivers/ras/Kconfig
|
||||
mkdir -p ${hdrdest}/arch/x86/ras
|
||||
cp -a arch/x86/ras/Kconfig ${hdrdest}/arch/x86/ras/Kconfig
|
||||
|
||||
# Extract debugging symbols
|
||||
msg_normal "$pkgver: extracting debug info, please wait...\n"
|
||||
|
|
Loading…
Reference in a new issue