From 242c5ab08c8414539ed57bde90e93accd8353825 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Fri, 3 Sep 2010 04:33:28 +0200 Subject: kbuild, deb-pkg: Check if KBUILD_IMAGE exists before copying it Avoid an error when doing cp over the image when it does not contain the full path to the file. Signed-off-by: Guillem Jover Signed-off-by: Michal Marek --- scripts/package/builddeb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 5f1e2fc7f171..49b74e1ee12d 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -66,7 +66,9 @@ else cp System.map "$tmpdir/boot/System.map-$version" cp .config "$tmpdir/boot/config-$version" # Not all arches include the boot path in KBUILD_IMAGE - if ! cp $KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version"; then + if [ -e $KBUILD_IMAGE ]; then + cp $KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version" + else cp arch/$ARCH/boot/$KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version" fi fi -- cgit v1.2.3 From c2d5a7300da667d090c8fe79f05404c9fb205b12 Mon Sep 17 00:00:00 2001 From: Nishanth Aravamudan Date: Wed, 13 Oct 2010 10:39:45 -0700 Subject: scripts/package: don't break if %{_smp_mflags} isn't set Same fix as in 13797b77d419fc1b16eebf2993bf7b5cea65f0bf is needed for the "new" line invoking _smp_mflags for modules_install. Without the fix, `make binrpm-pkg` fails with: + make '%{_smp_mflags}' KBUILD_SRC= modules_install make[2]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule. make[2]: *** No rule to make target `%{_smp_mflags}'. Stop. error: Bad exit status from /var/tmp/rpm-tmp.8S9B9e (%install) Signed-off-by: Nishanth Aravamudan Signed-off-by: Michal Marek --- scripts/package/mkspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/package/mkspec b/scripts/package/mkspec index 16ae0dd746e1..186344266c35 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -70,7 +70,7 @@ echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib/modules' echo 'mkdir -p $RPM_BUILD_ROOT/lib/firmware' echo "%endif" -echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{_smp_mflags} KBUILD_SRC= modules_install' +echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{?_smp_mflags} KBUILD_SRC= modules_install' echo "%ifarch ia64" echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/efi/vmlinuz-$KERNELRELEASE" echo 'ln -s '"efi/vmlinuz-$KERNELRELEASE" '$RPM_BUILD_ROOT'"/boot/" -- cgit v1.2.3