From 6ef83378f321ba66c6e49ffccb7b1a2ac9bb2b35 Mon Sep 17 00:00:00 2001 From: Stefan Fiedler Date: Sun, 23 Nov 2008 12:47:38 +0000 Subject: [PATCH] Stefan Fiedler: linux26: don't run elf2ecoff on mips64 kernels with 64-bit code model [2008101511502820165] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@9134 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- package/base/linux/linux.conf | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/package/base/linux/linux.conf b/package/base/linux/linux.conf index 1b20caa4e..c32163c2a 100644 --- a/package/base/linux/linux.conf +++ b/package/base/linux/linux.conf @@ -430,13 +430,18 @@ main_lx() { ;; mips) eval $MAKE vmlinux - $BUILDCC arch/mips/boot/elf2ecoff.c -o elf2ecoff - ./elf2ecoff vmlinux vmlinux.ecoff + # elf2ecoff only works for kernels with a 32-bit code model + if grep -q "^CONFIG_32BIT=y" .config ; then + $BUILDCC arch/mips/boot/elf2ecoff.c -o elf2ecoff + ./elf2ecoff vmlinux vmlinux.ecoff + fi cp -vf vmlinux $root/boot/vmlinux_${lx_kernelrelease} - cp -vf vmlinux.ecoff $root/boot/vmlinux_${lx_kernelrelease}.ecoff + [ -f vmlinux.ecoff ] && cp -vf vmlinux.ecoff \ + $root/boot/vmlinux_${lx_kernelrelease}.ecoff if [ "$xpkg" = "$ROCKCFG_PKG_LINUX_DEFAULT" ]; then ln -svf vmlinux_${lx_kernelrelease} $root/boot/vmlinux - ln -svf vmlinux_${lx_kernelrelease}.ecoff $root/boot/vmlinux.ecoff + [ -f $root/boot/vmlinux.ecoff ] && ln -svf \ + vmlinux_${lx_kernelrelease}.ecoff $root/boot/vmlinux.ecoff fi ;; ppc)