aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Cross <xobs@kosagi.com>2014-10-10 16:32:11 +0800
committerSean Cross <xobs@kosagi.com>2014-10-15 21:01:26 +0800
commit0b23b577ac58218aac0035825c8740dee1c26044 (patch)
treec5cae552e51fccc462a0195b907425507003c18e
parent94eadc70f63464a25657048c0396db7755a36de8 (diff)
downloadnovena-linux-0b23b577ac58218aac0035825c8740dee1c26044.tar.gz
novena-linux-0b23b577ac58218aac0035825c8740dee1c26044.tar.bz2
novena-linux-0b23b577ac58218aac0035825c8740dee1c26044.zip
scripts: Add custom destdir parameter
We don't want packages installed to /boot since it's FAT-formatted. Instead, our diversion script as part of U-Boot will take care of that. As a workaround, add the KBUILD_DESTDIR variable so that users can specify the path to place the finished kernel. Signed-off-by: Sean Cross <xobs@kosagi.com>
-rw-r--r--scripts/package/builddeb14
1 files changed, 12 insertions, 2 deletions
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 39e1136b931..135318be2a0 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -104,8 +104,9 @@ parisc|mips|powerpc)
installed_dtb_path="boot/vmlinuz-$version.dtb"
;;
*)
- installed_image_path="boot/vmlinuz-$version"
- installed_dtb_path="boot/vmlinuz-$version.dtb"
+ # XXX: This is a glorious hack which should be fixed
+ installed_image_path="usr/share/linux-novena/vmlinuz-$version"
+ installed_dtb_path="usr/share/linux-novena/vmlinuz-$version.dtb"
esac
BUILD_DEBUG="$(grep -s '^CONFIG_DEBUG_INFO=y' $KCONFIG_CONFIG || true)"
@@ -129,12 +130,21 @@ if [ -n "$BUILD_DEBUG" ] ; then
mkdir -m 755 -p "$dbg_dir/DEBIAN"
fi
+if [ ! -z $KBUILD_DESTDIR ]; then
+ installed_image_path="${KBUILD_DESTDIR}/vmlinuz-$version"
+ installed_dtb_path="${KBUILD_DESTDIR}/vmlinuz-$version.dtb"
+ mkdir -p "${tmpdir}/${KBUILD_DESTDIR}"
+fi
+
# Build and install the kernel
if [ "$ARCH" = "um" ] ; then
$MAKE linux
cp System.map "$tmpdir/usr/lib/uml/modules/$version/System.map"
cp $KCONFIG_CONFIG "$tmpdir/usr/share/doc/$packagename/config"
gzip "$tmpdir/usr/share/doc/$packagename/config"
+elif [ ! -z $KBUILD_DESTDIR ]; then
+ cp System.map "$tmpdir/${KBUILD_DESTDIR}/System.map-$version"
+ cp $KCONFIG_CONFIG "$tmpdir/${KBUILD_DESTDIR}/config-$version"
else
cp System.map "$tmpdir/boot/System.map-$version"
cp $KCONFIG_CONFIG "$tmpdir/boot/config-$version"