public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* RE: (somewhat questionable) use of ipt_ECN.c and ipt_ecn.c in the linux kernel
@ 2004-07-22  9:25 Povolotsky, Alexander
  2004-07-22 11:09 ` Olaf Hering
  2004-07-22 14:47 ` case-sensitive file names during build Hollis Blanchard
  0 siblings, 2 replies; 8+ messages in thread
From: Povolotsky, Alexander @ 2004-07-22  9:25 UTC (permalink / raw)
  To: 'bert hubert', Linux Kernel list, 'Andrew Morton'
  Cc: crossgcc, 'linuxppc-dev@lists.linuxppc.org'

>This is the (somewhat questionable) use of ipt_ECN.c and ipt_ecn.c in the
linux kernel.

I presume that "Cygwin" folks would like to see this to be resolved by the
"linux kernel" folks ?

-----Original Message-----
From: bert hubert [mailto:ahu@ds9a.nl]
Sent: Thursday, July 22, 2004 5:03 AM
To: Povolotsky, Alexander
Cc: crossgcc; 'Hollis Blanchard'; 'bertrand marquis';
'trevor_scroggins@hotmail.com'; 'Dan Kegel'; 'Geert Uytterhoeven';
'linuxppc-dev@lists.linuxppc.org'; Linux Kernel list
Subject: Re: No rule to make target `net/ipv4/netfilter/ipt_ecn.o'


> make[3]: *** No rule to make target
>  `net/ipv4/netfilter/ipt_ecn.o', needed by
`net/ipv4/netfilter/built-in.o'.
> Stop.

This is the (somewhat questionable) use of ipt_ECN.c and ipt_ecn.c in the
linux kernel. Windows filesystems are case insensitive, and see this as one
file.

-- 
http://www.PowerDNS.com      Open source, database driven DNS Software 
http://lartc.org           Linux Advanced Routing & Traffic Control HOWTO

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: (somewhat questionable) use of ipt_ECN.c and ipt_ecn.c in the linux kernel
  2004-07-22  9:25 (somewhat questionable) use of ipt_ECN.c and ipt_ecn.c in the linux kernel Povolotsky, Alexander
@ 2004-07-22 11:09 ` Olaf Hering
  2004-07-22 14:47 ` case-sensitive file names during build Hollis Blanchard
  1 sibling, 0 replies; 8+ messages in thread
From: Olaf Hering @ 2004-07-22 11:09 UTC (permalink / raw)
  To: Povolotsky, Alexander
  Cc: 'bert hubert', Linux Kernel list, 'Andrew Morton',
	crossgcc, 'linuxppc-dev@lists.linuxppc.org'

 On Thu, Jul 22, Povolotsky, Alexander wrote:

> 
> >This is the (somewhat questionable) use of ipt_ECN.c and ipt_ecn.c in the
> linux kernel.
> 
> I presume that "Cygwin" folks would like to see this to be resolved by the
> "linux kernel" folks ?

Install and use Linux and be done with it.

-- 
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: case-sensitive file names during build
  2004-07-22  9:25 (somewhat questionable) use of ipt_ECN.c and ipt_ecn.c in the linux kernel Povolotsky, Alexander
  2004-07-22 11:09 ` Olaf Hering
@ 2004-07-22 14:47 ` Hollis Blanchard
  2004-07-22 14:59   ` Dan Kegel
  1 sibling, 1 reply; 8+ messages in thread
From: Hollis Blanchard @ 2004-07-22 14:47 UTC (permalink / raw)
  To: Povolotsky, Alexander
  Cc: crossgcc, 'linuxppc-dev@lists.linuxppc.org',
	'Andrew Morton', 'bert hubert', Linux Kernel list

On Jul 22, 2004, at 4:25 AM, Povolotsky, Alexander wrote:
>
>> make[3]: *** No rule to make target
>>  `net/ipv4/netfilter/ipt_ecn.o', needed by 
>> `net/ipv4/netfilter/built-in.o'.
>> Stop.
>
> This is the (somewhat questionable) use of ipt_ECN.c and ipt_ecn.c in 
> the
> linux kernel. Windows filesystems are case insensitive, and see this 
> as one
> file.

I had not seen the ECN/ecn problem, but you will also be bitten by .S 
-> .s preprocessing. That's right about the point that I gave up, 
though on OS X I could have created a (case-sensitive) UFS filesystem 
rather than using a (case-insensitive) HFS one.

-- 
Hollis Blanchard
IBM Linux Technology Center


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: case-sensitive file names during build
  2004-07-22 14:47 ` case-sensitive file names during build Hollis Blanchard
@ 2004-07-22 14:59   ` Dan Kegel
  0 siblings, 0 replies; 8+ messages in thread
From: Dan Kegel @ 2004-07-22 14:59 UTC (permalink / raw)
  To: Hollis Blanchard
  Cc: Povolotsky, Alexander, crossgcc,
	'linuxppc-dev@lists.linuxppc.org',
	'Andrew Morton', 'bert hubert', Linux Kernel list

Hollis Blanchard wrote:
> On Jul 22, 2004, at 4:25 AM, Povolotsky, Alexander wrote:
>>> make[3]: *** No rule to make target
>>>  `net/ipv4/netfilter/ipt_ecn.o', needed by 
>>> `net/ipv4/netfilter/built-in.o'.
>>> Stop.
>>
>> This is the (somewhat questionable) use of ipt_ECN.c and ipt_ecn.c in the
>> linux kernel. Windows filesystems are case insensitive, and see this 
>> as one file.
> 
> I had not seen the ECN/ecn problem, but you will also be bitten by .S -> 
> .s preprocessing. That's right about the point that I gave up  ...

I maintain patches that allow building glibc on Cygwin and MacOSX.
The main patch deals with exactly this issue (S vs. s)
http://kegel.com/crosstool/crosstool-0.28-rc26/patches/glibc-2.3.2/glibc-2.3.2-cygwin.patch
I have to maintain it separately as the glibc maintainer dislikes the
idea of catering to Cygwin users (though maybe if I present it
as a MacOSX support patch he'd reconsider... naaah, probably not :-).

With the advent of linux-2.6, I also have a patch
to get kconfig to not use shared libraries (since I use kconfig
to help install the kernel headers, and shared libraries are tricky
to build on those two platforms).

It wouldn't be a big leap for me or someone else to also maintain
a patch to allow compiling the whole kernel on Cygwin or MacOSX.
If anyone puts it together, I'll carry it in crosstool.
- Dan


-- 
My technical stuff: http://kegel.com
My politics: see http://www.misleader.org for examples of why I'm for regime change

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: case-sensitive file names during build
       [not found] <3D848382FB72E249812901444C6BDB1D036EDF21@exchange.timesys.com>
@ 2004-07-22 19:27 ` Pragnesh Sampat
  2004-07-22 22:11   ` Sam Ravnborg
  0 siblings, 1 reply; 8+ messages in thread
From: Pragnesh Sampat @ 2004-07-22 19:27 UTC (permalink / raw)
  To: dank
  Cc: hollisb, christopher.faylor, Povolotsky, Alexander, crossgcc,
	linuxppc-dev@lists.linuxppc.org, Andrew Morton, bert hubert,
	Linux Kernel list

> > I maintain patches that allow building glibc on Cygwin and MacOSX.
> > The main patch deals with exactly this issue (S vs. s)
> >
> http://kegel.com/crosstool/crosstool-0.28-rc26/patches/glibc-2.3.2/glibc
> -2.3.2-cygwin.patch
> > I have to maintain it separately as the glibc maintainer dislikes the
> > idea of catering to Cygwin users (though maybe if I present it as a
> > MacOSX support patch he'd reconsider... naaah, probably not :-).  
> > 
> > With the advent of linux-2.6, I also have a patch to get kconfig to
> > not use shared libraries (since I use kconfig to help install the
> > kernel headers, and shared libraries are tricky to build on those two
> > platforms).   
> > 
> > It wouldn't be a big leap for me or someone else to also maintain a
> > patch to allow compiling the whole kernel on Cygwin or MacOSX. 
> > If anyone puts it together, I'll carry it in crosstool.

Dan,

We have some patches that we use at TimeSys that allow a linux kernel to
build on cygwin.  They fall under:

1. case insensitive issues
2. kconfig using shared library
3. header file issues under some cygwin versions (typically types.h)
4. arguments handling limited to 32K (large number of modules are issues
in Makefiles)

1 and 2 have already been discussed and Chris Faylor mentioned just a
while ago that with managed mounts under newer cygwin versions, this is
not a big issue for cygwin at least.

Sometime later today, I will send in the patches we are using for 2.6.6
that allow a full build, in case they are useful (at least the arguments
handling patch is a kludge, but I will send it in to start with).

-Pragnesh






^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: case-sensitive file names during build
  2004-07-22 19:27 ` Pragnesh Sampat
@ 2004-07-22 22:11   ` Sam Ravnborg
  2004-07-22 23:26     ` Pragnesh Sampat
  0 siblings, 1 reply; 8+ messages in thread
From: Sam Ravnborg @ 2004-07-22 22:11 UTC (permalink / raw)
  To: Pragnesh Sampat
  Cc: dank, hollisb, christopher.faylor, Povolotsky, Alexander,
	crossgcc, linuxppc-dev@lists.linuxppc.org, Andrew Morton,
	bert hubert, Linux Kernel list

On Thu, Jul 22, 2004 at 03:27:38PM -0400, Pragnesh Sampat wrote:
> 
> Dan,
> 
> We have some patches that we use at TimeSys that allow a linux kernel to
> build on cygwin.  They fall under:

Please copy me on all kbuild patches that enables cygwin builds.

	Sam

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: case-sensitive file names during build
  2004-07-22 22:11   ` Sam Ravnborg
@ 2004-07-22 23:26     ` Pragnesh Sampat
  2004-07-23  4:38       ` Pragnesh Sampat
  0 siblings, 1 reply; 8+ messages in thread
From: Pragnesh Sampat @ 2004-07-22 23:26 UTC (permalink / raw)
  To: dank
  Cc: sam, hollisb, christopher.faylor, Povolotsky, Alexander, crossgcc,
	linuxppc-dev@lists.linuxppc.org, Andrew Morton, bert hubert,
	Linux Kernel list

OK, here they are.  I applied them against 2.6.6 and can regen them if
needed against current -mm.  Also note that If you are using 2.6
versions earlier than 2.6.4, you will probably need 2-3 patches more. 
(These were generated by various people here at TimeSys and modified for
different versions.)

1.  Case insensitivity patch (rename files)

(I can supply a patch to rename all, if needed)

arch/alpha/kernel/vmlinux.lds.S
arch/arm/kernel/vmlinux.lds.S
arch/arm26/kernel/vmlinux.lds.S
arch/cris/arch-v10/vmlinux.lds.S
arch/h8300/kernel/vmlinux.lds.S
arch/i386/kernel/vmlinux.lds.S
arch/ia64/kernel/vmlinux.lds.S
arch/m68k/kernel/vmlinux.lds.S
arch/m68knommu/kernel/vmlinux.lds.S
arch/mips/kernel/vmlinux.lds.S
arch/parisc/kernel/vmlinux.lds.S
arch/ppc/kernel/vmlinux.lds.S
arch/ppc64/kernel/vmlinux.lds.S
arch/s390/kernel/vmlinux.lds.S
arch/sh/kernel/vmlinux.lds.S
arch/sparc/kernel/vmlinux.lds.S
arch/sparc64/kernel/vmlinux.lds.S
arch/um/kernel/vmlinux.lds.S
arch/v850/kernel/vmlinux.lds.S
arch/x86_64/kernel/vmlinux.lds.S

--- cygwin/scripts/Makefile.build-orig
+++ cygwin/scripts/Makefile.build
@@ -200,6 +200,9 @@
 %.s: %.S FORCE
 	$(call if_changed_dep,as_s_S)
 
+%.s: %.S.h FORCE
+	$(call if_changed_dep,as_s_S)
+
 quiet_cmd_as_o_S = AS $(quiet_modtag)  $@
 cmd_as_o_S       = $(CC) $(a_flags) -c -o $@ $<
 
2. Command line length patch

If the list of modules is long enough, modpost on cygwin fails.
scripts/modpost is used to generate <modname>.mod.c files used for
versioning.

The long list seems to be caused by (combination of) if_changed macro
expansion and the actual list of modules being long enough.  The
workaround calls $(cmd_modpost) unconditionally for cygwin and leaves
other hosts unchanged.

There's surely a better fix for this, I didn't understand the details
of if_changed macro enough to come up with one.

--- cygwin/scripts/Makefile.modpost-orig
+++ cygwin/scripts/Makefile.modpost

@@ -46,7 +46,21 @@
 
 _modpost: $(modules)
 
+#
+# XXX cygwin hosts have issues with the length of command line
+# parameters.  The if_changed macro expansion and the actual command
+# ends up exceeding the POSIX (?) limit of 32 K characters
+# so let's try running the command unconditionally
+#
+
+BUILD_HOST := $(shell uname | tr '[A-Z]' '[a-z]')
 
+ifeq "$(findstring cygwin, $(BUILD_HOST))" "cygwin"
+MODPOST_COMMAND = $(cmd_modpost)
+else
+MODPOST_COMMAND = $(call if_changed,modpost)
+endif
+
 # Step 2), invoke modpost
 #  Includes step 3,4
 quiet_cmd_modpost = MODPOST
@@ -56,7 +70,7 @@
 
 .PHONY: __modpost
 __modpost: $(wildcard vmlinux) $(modules:.ko=.o) FORCE
-	$(call cmd,modpost)
+	$(MODPOST_COMMAND)
 
 # Declare generated files as targets for modpost
 $(symverfile):         __modpost ;

3. Some cygwin versions may need <sys/types.h>

Older versions of cygwin lack inttypes.h, so include <sys/types.h> as
needed.

--- cygwin/arch/ppc/boot/utils/mkbugboot.c-orig
+++ cygwin/arch/ppc/boot/utils/mkbugboot.c

@@ -21,6 +21,11 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <fcntl.h>
+#if defined(__CYGWIN__)
+#include <sys/types.h>
+#else
+#include <inttypes.h>
+#endif
 
 #ifdef __i386__
 #define cpu_to_be32(x) le32_to_cpu(x)
@@ -49,11 +54,6 @@
 /* size of read buffer */
 #define SIZE 0x1000
 
-/* typedef long int32_t; */
-typedef unsigned long uint32_t;
-typedef unsigned short uint16_t;
-typedef unsigned char uint8_t;
-
 /* PPCBUG ROM boot header */
 typedef struct bug_boot_header {
   uint8_t	magic_word[4];		/* "BOOT" */

--- cygwin/lib/gen_crc32table.c-orig
+++ cygwin/lib/gen_crc32table.c

@@ -1,6 +1,10 @@
 #include <stdio.h>
 #include "crc32defs.h"
+#if defined(__CYGWIN__)
+#include <sys/types.h>
+#else
 #include <inttypes.h>
+#endif
 
 #define ENTRIES_PER_LINE 4
 
--- cygwin/scripts/sumversion.c-orig
+++ cygwin/scripts/sumversion.c

@@ -1,5 +1,9 @@
+#if defined(__CYGWIN__)
+#include <sys/types.h>
+#else
+#include <stdint.h>
+#endif
 #include <netinet/in.h>
-#include <stdint.h>
 #include <ctype.h>
 #include <errno.h>
 #include <string.h>

Signed-off-by: Pragnesh Sampat <pragnesh.sampat@timesys.com> under
TS0086

-Pragnesh


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: case-sensitive file names during build
  2004-07-22 23:26     ` Pragnesh Sampat
@ 2004-07-23  4:38       ` Pragnesh Sampat
  0 siblings, 0 replies; 8+ messages in thread
From: Pragnesh Sampat @ 2004-07-23  4:38 UTC (permalink / raw)
  To: dank
  Cc: sam, hollisb, christopher.faylor, Povolotsky, Alexander, crossgcc,
	linuxppc-dev@lists.linuxppc.org, Andrew Morton, bert hubert,
	Linux Kernel list, sam.robb

On Thu, 2004-07-22 at 19:26, Pragnesh Sampat wrote:
> OK, here they are.  I applied them against 2.6.6 and can regen them if
> needed against current -mm.  Also note that If you are using 2.6
> versions earlier than 2.6.4, you will probably need 2-3 patches more. 
> (These were generated by various people here at TimeSys and modified for
> different versions.)
> 

OK, I kept thinking there was more to it ... I am not sure if loadkeys
program is always needed or not (depends on CONFIG), but I remember
seeing a binary loadkeys was used, so that may be an issue.  I am not
sure if newer versions of cygwin come with loadkeys or how easy it is to
build one for cygwin.  The other thing I remember was a missing elf.h
file on cygwin.  I think with

- loadkeys (not a kernel patch)
- missing elf.h (IIRC) (not a kernel patch)
- kconfig shared library patch (from Dan's link)
- and the patches sent earlier

some platforms should see a full build (for >= 2.6.4).  Sometimes there
are problems in arch/<xxx>/Makefile that you will see only if you build
for a particular board/platform, so there will always be a few lurking. 
>From what I can tell, these seem to fall under types or simple Makefile
fixes, so might be easy to spot.

I can't easily do any testing for the next few days since I don't have a
setup right now, but might be able to sometime next week.

-Pragnesh


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-07-23  4:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-22  9:25 (somewhat questionable) use of ipt_ECN.c and ipt_ecn.c in the linux kernel Povolotsky, Alexander
2004-07-22 11:09 ` Olaf Hering
2004-07-22 14:47 ` case-sensitive file names during build Hollis Blanchard
2004-07-22 14:59   ` Dan Kegel
     [not found] <3D848382FB72E249812901444C6BDB1D036EDF21@exchange.timesys.com>
2004-07-22 19:27 ` Pragnesh Sampat
2004-07-22 22:11   ` Sam Ravnborg
2004-07-22 23:26     ` Pragnesh Sampat
2004-07-23  4:38       ` Pragnesh Sampat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox