aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/package
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/package')
-rwxr-xr-xscripts/package/builddeb6
-rwxr-xr-xscripts/package/mkdebian7
-rwxr-xr-xscripts/package/mkspec11
3 files changed, 14 insertions, 10 deletions
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 90c9a8ac7adb..f43a274f4f1d 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -81,11 +81,11 @@ else
81 cp System.map "$tmpdir/boot/System.map-$version" 81 cp System.map "$tmpdir/boot/System.map-$version"
82 cp $KCONFIG_CONFIG "$tmpdir/boot/config-$version" 82 cp $KCONFIG_CONFIG "$tmpdir/boot/config-$version"
83fi 83fi
84cp "$($MAKE -s image_name)" "$tmpdir/$installed_image_path" 84cp "$($MAKE -s -f $srctree/Makefile image_name)" "$tmpdir/$installed_image_path"
85 85
86if grep -q "^CONFIG_OF=y" $KCONFIG_CONFIG ; then 86if grep -q "^CONFIG_OF_EARLY_FLATTREE=y" $KCONFIG_CONFIG ; then
87 # Only some architectures with OF support have this target 87 # Only some architectures with OF support have this target
88 if grep -q dtbs_install "${srctree}/arch/$SRCARCH/Makefile"; then 88 if [ -d "${srctree}/arch/$SRCARCH/boot/dts" ]; then
89 $MAKE KBUILD_SRC= INSTALL_DTBS_PATH="$tmpdir/usr/lib/$packagename" dtbs_install 89 $MAKE KBUILD_SRC= INSTALL_DTBS_PATH="$tmpdir/usr/lib/$packagename" dtbs_install
90 fi 90 fi
91fi 91fi
diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index 663a7f343b42..edcad61fe3cd 100755
--- a/scripts/package/mkdebian
+++ b/scripts/package/mkdebian
@@ -88,6 +88,7 @@ set_debarch() {
88version=$KERNELRELEASE 88version=$KERNELRELEASE
89if [ -n "$KDEB_PKGVERSION" ]; then 89if [ -n "$KDEB_PKGVERSION" ]; then
90 packageversion=$KDEB_PKGVERSION 90 packageversion=$KDEB_PKGVERSION
91 revision=${packageversion##*-}
91else 92else
92 revision=$(cat .version 2>/dev/null||echo 1) 93 revision=$(cat .version 2>/dev/null||echo 1)
93 packageversion=$version-$revision 94 packageversion=$version-$revision
@@ -205,10 +206,12 @@ cat <<EOF > debian/rules
205#!$(command -v $MAKE) -f 206#!$(command -v $MAKE) -f
206 207
207build: 208build:
208 \$(MAKE) KERNELRELEASE=${version} ARCH=${ARCH} KBUILD_SRC= 209 \$(MAKE) KERNELRELEASE=${version} ARCH=${ARCH} \
210 KBUILD_BUILD_VERSION=${revision} KBUILD_SRC=
209 211
210binary-arch: 212binary-arch:
211 \$(MAKE) KERNELRELEASE=${version} ARCH=${ARCH} KBUILD_SRC= intdeb-pkg 213 \$(MAKE) KERNELRELEASE=${version} ARCH=${ARCH} \
214 KBUILD_BUILD_VERSION=${revision} KBUILD_SRC= intdeb-pkg
212 215
213clean: 216clean:
214 rm -rf debian/*tmp debian/files 217 rm -rf debian/*tmp debian/files
diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index e05646dc24dc..009147d4718e 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -12,6 +12,7 @@
12# how we were called determines which rpms we build and how we build them 12# how we were called determines which rpms we build and how we build them
13if [ "$1" = prebuilt ]; then 13if [ "$1" = prebuilt ]; then
14 S=DEL 14 S=DEL
15 MAKE="$MAKE -f $srctree/Makefile"
15else 16else
16 S= 17 S=
17fi 18fi
@@ -78,19 +79,19 @@ $S %prep
78$S %setup -q 79$S %setup -q
79$S 80$S
80$S %build 81$S %build
81$S make %{?_smp_mflags} KBUILD_BUILD_VERSION=%{release} 82$S $MAKE %{?_smp_mflags} KBUILD_BUILD_VERSION=%{release}
82$S 83$S
83 %install 84 %install
84 mkdir -p %{buildroot}/boot 85 mkdir -p %{buildroot}/boot
85 %ifarch ia64 86 %ifarch ia64
86 mkdir -p %{buildroot}/boot/efi 87 mkdir -p %{buildroot}/boot/efi
87 cp \$(make image_name) %{buildroot}/boot/efi/vmlinuz-$KERNELRELEASE 88 cp \$($MAKE image_name) %{buildroot}/boot/efi/vmlinuz-$KERNELRELEASE
88 ln -s efi/vmlinuz-$KERNELRELEASE %{buildroot}/boot/ 89 ln -s efi/vmlinuz-$KERNELRELEASE %{buildroot}/boot/
89 %else 90 %else
90 cp \$(make image_name) %{buildroot}/boot/vmlinuz-$KERNELRELEASE 91 cp \$($MAKE image_name) %{buildroot}/boot/vmlinuz-$KERNELRELEASE
91 %endif 92 %endif
92$M make %{?_smp_mflags} INSTALL_MOD_PATH=%{buildroot} KBUILD_SRC= modules_install 93$M $MAKE %{?_smp_mflags} INSTALL_MOD_PATH=%{buildroot} modules_install
93 make %{?_smp_mflags} INSTALL_HDR_PATH=%{buildroot}/usr KBUILD_SRC= headers_install 94 $MAKE %{?_smp_mflags} INSTALL_HDR_PATH=%{buildroot}/usr headers_install
94 cp System.map %{buildroot}/boot/System.map-$KERNELRELEASE 95 cp System.map %{buildroot}/boot/System.map-$KERNELRELEASE
95 cp .config %{buildroot}/boot/config-$KERNELRELEASE 96 cp .config %{buildroot}/boot/config-$KERNELRELEASE
96 bzip2 -9 --keep vmlinux 97 bzip2 -9 --keep vmlinux