mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
deb-pkg: Fix cross-building linux-headers package
commitf8ce239dfc
upstream. builddeb generates a control file that says the linux-headers package can only be built for the build system primary architecture. This breaks cross-building configurations. We should use $debarch for this instead. Since $debarch is not yet set when generating the control file, set Architecture: any and use control file variables to fill in the description. Fixes:cd8d60a20a
('kbuild: create linux-headers package in deb-pkg') Reported-and-tested-by: "Niew, Sh." <shniew@gmail.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5f0a3f764b
commit
c502e92f7c
1 changed files with 4 additions and 5 deletions
|
@ -62,7 +62,7 @@ create_package() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create the package
|
# Create the package
|
||||||
dpkg-gencontrol -isp $forcearch -p$pname -P"$pdir"
|
dpkg-gencontrol -isp $forcearch -Vkernel:debarch="${debarch:-$(dpkg --print-architecture)}" -p$pname -P"$pdir"
|
||||||
dpkg --build "$pdir" ..
|
dpkg --build "$pdir" ..
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,15 +252,14 @@ mkdir -p "$destdir"
|
||||||
(cd $objtree; tar -c -f - -T "$objtree/debian/hdrobjfiles") | (cd $destdir; tar -xf -)
|
(cd $objtree; tar -c -f - -T "$objtree/debian/hdrobjfiles") | (cd $destdir; tar -xf -)
|
||||||
ln -sf "/usr/src/linux-headers-$version" "$kernel_headers_dir/lib/modules/$version/build"
|
ln -sf "/usr/src/linux-headers-$version" "$kernel_headers_dir/lib/modules/$version/build"
|
||||||
rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles"
|
rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles"
|
||||||
arch=$(dpkg --print-architecture)
|
|
||||||
|
|
||||||
cat <<EOF >> debian/control
|
cat <<EOF >> debian/control
|
||||||
|
|
||||||
Package: $kernel_headers_packagename
|
Package: $kernel_headers_packagename
|
||||||
Provides: linux-headers, linux-headers-2.6
|
Provides: linux-headers, linux-headers-2.6
|
||||||
Architecture: $arch
|
Architecture: any
|
||||||
Description: Linux kernel headers for $KERNELRELEASE on $arch
|
Description: Linux kernel headers for $KERNELRELEASE on \${kernel:debarch}
|
||||||
This package provides kernel header files for $KERNELRELEASE on $arch
|
This package provides kernel header files for $KERNELRELEASE on \${kernel:debarch}
|
||||||
.
|
.
|
||||||
This is useful for people who need to build external modules
|
This is useful for people who need to build external modules
|
||||||
EOF
|
EOF
|
||||||
|
|
Loading…
Reference in a new issue