Re: RE : Building kernel 2.6.21.3 for arm on cygwin

From: Matthieu CASTET
Date: Fri Jun 08 2007 - 12:26:42 EST


Hi,

Sam Ravnborg a écrit :
On Mon, Jun 04, 2007 at 11:45:29AM -0700, Tom wrote:
Hi Sam


enclosed is the 'k_smf.patch' which modifies three files to enable the kernel 2.6.21.3 to be built under cygwin:
host: cygwin 1.5.24, hostcc= gcc 3.4.4
cross: arm-linux-uclibcgnueabi-gcc (GCC) 4.1.2
cmd: make ARCH=arm CROSS_COMPILE=arm-linux- \
HOST_LOADLIBES="-lcurses -lintl" at91rm9200dk_defconfig

I verified that this does not break building on a linux-host on this config:
host: FC5, gcc 4.1.1-1
cross: arm-none-linux-gnueabi-gcc 4.1.1
cmd: make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-


Let me know if I can help any further.
Hi Tom.

Patch looks good. The last bit touching sumversion.c is not
needed in latest kernel - we already include limits.h.

What about something like that for ncurses stuff ?


Matthieu Index: scripts/kconfig/Makefile
===================================================================
RCS file: /soft/cvs/Linux/kernel/linux/scripts/kconfig/Makefile,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- scripts/kconfig/Makefile 5 Mar 2007 13:02:59 -0000 1.1.1.1
+++ scripts/kconfig/Makefile 6 Mar 2007 10:08:36 -0000 1.2
@@ -148,6 +148,13 @@
else echo no ; fi)
ifeq ($(KBUILD_HAVE_NLS),no)
HOSTCFLAGS += -DKBUILD_NO_NLS
+else
+HOST_OS := $(shell uname -o)
+ifeq ($(HOST_OS),Cygwin)
+HOSTLOADLIBES_conf = -lintl
+endif
+
+
endif

# generated files seem to need this to find local include files
Index: scripts/kconfig/lxdialog/check-lxdialog.sh
===================================================================
RCS file: /soft/cvs/Linux/kernel/linux/scripts/kconfig/lxdialog/check-lxdialog.sh,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- scripts/kconfig/lxdialog/check-lxdialog.sh 5 Mar 2007 13:02:59 -0000 1.1.1.1
+++ scripts/kconfig/lxdialog/check-lxdialog.sh 6 Mar 2007 10:08:36 -0000 1.2
@@ -19,6 +19,11 @@
echo '-lcurses'
exit
fi
+ $cc -print-file-name=libncurses.a | grep -q /
+ if [ $? -eq 0 ]; then
+ echo '-lintl -lncurses'
+ exit
+ fi
exit 1
}