diff --git a/packages/armbian/builddeb b/packages/armbian/builddeb index c42baff42d0e..a612669560aa 100755 --- a/packages/armbian/builddeb +++ b/packages/armbian/builddeb @@ -71,15 +71,12 @@ EOT if [ "$3" = "headers" ]; then # Set the time for all files to the current time. - # Clean up the executables that are left over from - # cross-compilation for a different host architecture. # And build them for the current architecture. cat >> $pdir/DEBIAN/postinst << EOT cd /usr/src/linux-headers-$version echo "Compiling headers - please wait ..." NCPU=\$(grep -c 'processor' /proc/cpuinfo) find -type f -exec touch {} + -make -j\$NCPU M=scripts clean >/dev/null yes "" | make oldconfig >/dev/null make -j\$NCPU -s scripts >/dev/null make -j\$NCPU -s M=scripts/mod/ >/dev/null @@ -88,10 +85,10 @@ EOT # After the configuration and compilation processes, new files # appear that the package manager does not know anything about. - # Just clear the entire target directory. + # Just clear all the files in the target directory. cat >> $pdir/DEBIAN/prerm << EOT cd /usr/src/linux-headers-$version -rm -rf ./* +find ./ -type f -exec rm {} + exit 0 EOT @@ -330,20 +327,24 @@ mountpoint -q /boot && check_and_unmount exit 0 EOT +create_package "$packagename" "$tmpdir" + if [ "$ARCH" != "um" ]; then + create_package "$dtb_packagename" "$dtb_dir" "dtb" + deploy_libc_headers $libc_headers_dir create_package $libc_headers_packagename $libc_headers_dir if is_enabled CONFIG_MODULES; then + # Clean up the executables that are left over from + # cross-compilation for a different host architecture. + (cd $srctree; make M=scripts clean;) deploy_kernel_headers $kernel_headers_dir create_package $kernel_headers_packagename $kernel_headers_dir "headers" fi - create_package "$dtb_packagename" "$dtb_dir" "dtb" fi -create_package "$packagename" "$tmpdir" - if [ -n "$BUILD_DEBUG" ] ; then # Build debug package # Different tools want the image in different locations