[PATCH] kbuild: Disable depmod in cross-compile kernel build
When building embedded systems in a cross-compile environment and populating a target's file system image, we don't want to run the depmod on the host as we may be building for a completely different architecture. Since there's no such thing as a cross-depmod, we just disable running depmod in the cross-compile case and we just run depmod on the target at bootup. Signed-off-by: Armin Kuster <[EMAIL PROTECTED]> Signed-off-by: Deepak Saxena <[EMAIL PROTECTED]> diff --git a/Makefile b/Makefile index 529b904..1705a91 100644 --- a/Makefile +++ b/Makefile @@ -1032,7 +1032,11 @@ depmod_opts := -b $(INSTALL_MOD_PATH) -r endif PHONY += _modinst_post _modinst_post: _modinst_ - if [ -r System.map -a -x $(DEPMOD) ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi + @if [ "$(CROSS_COMPILE)" = "" ]; then \ + if [ -r System.map -a -x $(DEPMOD) ]; then \ + $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); \ + fi \ + fi else # CONFIG_MODULES -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net "He who sacrifices freedom for security deserves neither" - Ben Franklin - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] kbuild: Disable depmod in cross-compile kernel build
When building embedded systems in a cross-compile environment and populating a target's file system image, we don't want to run the depmod on the host as we may be building for a completely different architecture. Since there's no such thing as a cross-depmod, we just disable running depmod in the cross-compile case and we just run depmod on the target at bootup. Signed-off-by: Armin Kuster [EMAIL PROTECTED] Signed-off-by: Deepak Saxena [EMAIL PROTECTED] diff --git a/Makefile b/Makefile index 529b904..1705a91 100644 --- a/Makefile +++ b/Makefile @@ -1032,7 +1032,11 @@ depmod_opts := -b $(INSTALL_MOD_PATH) -r endif PHONY += _modinst_post _modinst_post: _modinst_ - if [ -r System.map -a -x $(DEPMOD) ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi + @if [ $(CROSS_COMPILE) = ]; then \ + if [ -r System.map -a -x $(DEPMOD) ]; then \ + $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); \ + fi \ + fi else # CONFIG_MODULES -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net He who sacrifices freedom for security deserves neither - Ben Franklin - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH -rt] Disable lpptest on !Linux hosts
On Jul 24 2007, at 13:51, Deepak Saxena was caught saying: > Even this patch isn't really the right solution b/c you really want > to cross-build the may be cross-building for another architecture from > Linux you want cross-compile, not host compile but there's no really easy Sigh, not enough sleep. This should read: Even this patch isn't really the right solution b/c may be cross-building for another architecture and you want to cross-compile this for that arch. (Note that I "cross-compile" for x86 all the time to use a specific toolchain for a specific userland configuration). ~Deepak -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net "Americans think their danger is terrorists. They don't understand the terrorists cannot take away habeas corpus, the Bill of Rights, the Constitution. ... The terrorists are not anything like the threat that we face to the Bill of Rights and the Constitution from our own government in the name of fighting terrorisim." - Paul Craig Roberts - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -rt] Disable lpptest on !Linux hosts
Sadly people keep wanting to build kernels on non-Linux hosts (cygwin & solaris) and testlpp really doesn't like to build on those. I have a separate patch to testlpp.c that fixes this, but it really makes no sense to build the tool to run on your cygwin host as it's meant to be run on Linux with the testlpp module loaded. Even this patch isn't really the right solution b/c you really want to cross-build the may be cross-building for another architecture from Linux you want cross-compile, not host compile but there's no really easy way to cross-compile a userland binary from the kernel build w/o some makefile uglyiness AFAICT. Is there some sort of -rt userland package this could move to instead of being in the kernel itself...? Signed-off-by: Deepak Saxena <[EMAIL PROTECTED]> Index: linux-2.6/scripts/Makefile === --- linux-2.6.orig/scripts/Makefile +++ linux-2.6/scripts/Makefile @@ -13,9 +13,12 @@ hostprogs-$(CONFIG_LOGO) += pnmt hostprogs-$(CONFIG_VT) += conmakehash hostprogs-$(CONFIG_PROM_CONSOLE) += conmakehash hostprogs-$(CONFIG_IKCONFIG) += bin2c +HOST_OS := $(shell uname) +ifeq ($(HOST_OS),Linux) ifdef CONFIG_LPPTEST hostprogs-y += testlpp endif +endif always := $(hostprogs-y) $(hostprogs-m) -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net "Americans think their danger is terrorists. They don't understand the terrorists cannot take away habeas corpus, the Bill of Rights, the Constitution. ... The terrorists are not anything like the threat that we face to the Bill of Rights and the Constitution from our own government in the name of fighting terrorisim." - Paul Craig Roberts - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -rt] Disable lpptest on !Linux hosts
Sadly people keep wanting to build kernels on non-Linux hosts (cygwin solaris) and testlpp really doesn't like to build on those. I have a separate patch to testlpp.c that fixes this, but it really makes no sense to build the tool to run on your cygwin host as it's meant to be run on Linux with the testlpp module loaded. Even this patch isn't really the right solution b/c you really want to cross-build the may be cross-building for another architecture from Linux you want cross-compile, not host compile but there's no really easy way to cross-compile a userland binary from the kernel build w/o some makefile uglyiness AFAICT. Is there some sort of -rt userland package this could move to instead of being in the kernel itself...? Signed-off-by: Deepak Saxena [EMAIL PROTECTED] Index: linux-2.6/scripts/Makefile === --- linux-2.6.orig/scripts/Makefile +++ linux-2.6/scripts/Makefile @@ -13,9 +13,12 @@ hostprogs-$(CONFIG_LOGO) += pnmt hostprogs-$(CONFIG_VT) += conmakehash hostprogs-$(CONFIG_PROM_CONSOLE) += conmakehash hostprogs-$(CONFIG_IKCONFIG) += bin2c +HOST_OS := $(shell uname) +ifeq ($(HOST_OS),Linux) ifdef CONFIG_LPPTEST hostprogs-y += testlpp endif +endif always := $(hostprogs-y) $(hostprogs-m) -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net Americans think their danger is terrorists. They don't understand the terrorists cannot take away habeas corpus, the Bill of Rights, the Constitution. ... The terrorists are not anything like the threat that we face to the Bill of Rights and the Constitution from our own government in the name of fighting terrorisim. - Paul Craig Roberts - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH -rt] Disable lpptest on !Linux hosts
On Jul 24 2007, at 13:51, Deepak Saxena was caught saying: Even this patch isn't really the right solution b/c you really want to cross-build the may be cross-building for another architecture from Linux you want cross-compile, not host compile but there's no really easy Sigh, not enough sleep. This should read: Even this patch isn't really the right solution b/c may be cross-building for another architecture and you want to cross-compile this for that arch. (Note that I cross-compile for x86 all the time to use a specific toolchain for a specific userland configuration). ~Deepak -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net Americans think their danger is terrorists. They don't understand the terrorists cannot take away habeas corpus, the Bill of Rights, the Constitution. ... The terrorists are not anything like the threat that we face to the Bill of Rights and the Constitution from our own government in the name of fighting terrorisim. - Paul Craig Roberts - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH RT] Fix NR_syscalls in ARM
The -rt patch adds a NR_syscalls symbol to the arm/unistd.h but it is not the correct value as there are 348 syscalls on ARM and the existing change sets the symbol to 322. Signed-off-by: Deepak Saxena <[EMAIL PROTECTED]> --- Russell: Why isn't this in mainline? Other arches all seem to have this symbol already defined. Index: linux-2.6.21/include/asm-arm/unistd.h === --- linux-2.6.21.orig/include/asm-arm/unistd.h +++ linux-2.6.21/include/asm-arm/unistd.h @@ -375,7 +375,7 @@ #define __NR_kexec_load(__NR_SYSCALL_BASE+347) #ifndef __ASSEMBLY__ -#define NR_syscalls(__NR_set_mempolicy + 1 - __NR_SYSCALL_BASE) +#define NR_syscalls(__NR_kexec_load + 1 - __NR_SYSCALL_BASE) #endif /* -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH RT] Fix NR_syscalls in ARM
The -rt patch adds a NR_syscalls symbol to the arm/unistd.h but it is not the correct value as there are 348 syscalls on ARM and the existing change sets the symbol to 322. Signed-off-by: Deepak Saxena [EMAIL PROTECTED] --- Russell: Why isn't this in mainline? Other arches all seem to have this symbol already defined. Index: linux-2.6.21/include/asm-arm/unistd.h === --- linux-2.6.21.orig/include/asm-arm/unistd.h +++ linux-2.6.21/include/asm-arm/unistd.h @@ -375,7 +375,7 @@ #define __NR_kexec_load(__NR_SYSCALL_BASE+347) #ifndef __ASSEMBLY__ -#define NR_syscalls(__NR_set_mempolicy + 1 - __NR_SYSCALL_BASE) +#define NR_syscalls(__NR_kexec_load + 1 - __NR_SYSCALL_BASE) #endif /* -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Add ip6_tunnel.h to headers_install
The Mobile IPv6 package (http://www.mobile-ipv6.org/software/) needs this header file to build the tunnelctl component. The header already looks sanitized so is safe to export. Signed-off-by: Deepak Saxena <[EMAIL PROTECTED]> --- diff --git a/include/linux/Kbuild b/include/linux/Kbuild index bcd01f2..e101315 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild @@ -239,6 +239,7 @@ unifdef-y += ipc.h unifdef-y += ipmi.h unifdef-y += ipv6.h unifdef-y += ipv6_route.h +unifdef-y += ip6_tunnel.h unifdef-y += isdn.h unifdef-y += isdnif.h unifdef-y += isdn_divertif.h -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net In the end, they will not say, "those were dark times," they will ask "why were their poets silent?" - Bertolt Brecht - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Add ip6_tunnel.h to headers_install
The Mobile IPv6 package (http://www.mobile-ipv6.org/software/) needs this header file to build the tunnelctl component. The header already looks sanitized so is safe to export. Signed-off-by: Deepak Saxena [EMAIL PROTECTED] --- diff --git a/include/linux/Kbuild b/include/linux/Kbuild index bcd01f2..e101315 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild @@ -239,6 +239,7 @@ unifdef-y += ipc.h unifdef-y += ipmi.h unifdef-y += ipv6.h unifdef-y += ipv6_route.h +unifdef-y += ip6_tunnel.h unifdef-y += isdn.h unifdef-y += isdnif.h unifdef-y += isdn_divertif.h -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net In the end, they will not say, those were dark times, they will ask why were their poets silent? - Bertolt Brecht - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -rt] Fix build on MIPS
Extra #endif got into atomic.h Signed-off-by: Deepak Saxena <[EMAIL PROTECTED]> Index: linux-2.6.21-rc5/include/asm-mips/atomic.h === --- linux-2.6.21-rc5.orig/include/asm-mips/atomic.h +++ linux-2.6.21-rc5/include/asm-mips/atomic.h @@ -566,7 +566,6 @@ static __inline__ long atomic64_add_retu raw_local_irq_restore(flags); } #endif -#endif smp_mb(); -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net In the end, they will not say, "those were dark times," they will ask "why were their poets silent?" - Bertolt Brecht - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -rt] Fix build on MIPS
Extra #endif got into atomic.h Signed-off-by: Deepak Saxena [EMAIL PROTECTED] Index: linux-2.6.21-rc5/include/asm-mips/atomic.h === --- linux-2.6.21-rc5.orig/include/asm-mips/atomic.h +++ linux-2.6.21-rc5/include/asm-mips/atomic.h @@ -566,7 +566,6 @@ static __inline__ long atomic64_add_retu raw_local_irq_restore(flags); } #endif -#endif smp_mb(); -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net In the end, they will not say, those were dark times, they will ask why were their poets silent? - Bertolt Brecht - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -rt] Remove duplicate CONFIG_CLOCKEVENTS in ARM kconfig
Signed-off-by: Deepak Saxena <[EMAIL PROTECTED]> Index: linux-2.6.21-rc5/arch/arm/Kconfig === --- linux-2.6.21-rc5.orig/arch/arm/Kconfig +++ linux-2.6.21-rc5/arch/arm/Kconfig @@ -33,10 +33,6 @@ config GENERIC_CLOCKEVENTS bool default n -config GENERIC_CLOCKEVENTS - bool - default n - config MMU bool default y -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net In the end, they will not say, "those were dark times," they will ask "why were their poets silent?" - Bertolt Brecht - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH -rt] Remove duplicate CONFIG_CLOCKEVENTS in ARM kconfig
Signed-off-by: Deepak Saxena [EMAIL PROTECTED] Index: linux-2.6.21-rc5/arch/arm/Kconfig === --- linux-2.6.21-rc5.orig/arch/arm/Kconfig +++ linux-2.6.21-rc5/arch/arm/Kconfig @@ -33,10 +33,6 @@ config GENERIC_CLOCKEVENTS bool default n -config GENERIC_CLOCKEVENTS - bool - default n - config MMU bool default y -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net In the end, they will not say, those were dark times, they will ask why were their poets silent? - Bertolt Brecht - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Fix building kernel under Solaris
SIGRETRACT I have -rt merged into my tree so this won't apply cleanly to mainline. ~Deepak On Mar 06 2007, at 10:09, Deepak Saxena was caught saying: > > Fix varous build breakages that occur when building on a Solaris system > (SunOS 4.8 to be exact) > > - No asm/types.h > > - lpptest doesn't make sense on a Solaris host (this should really be > cross-built..) > > - Need to define __s32 and __s16 > > - Need to define Elf32_Section and Elf64_Section > > - Solaris does not provide strsep > > Signed-off-by: Deepak Saxena <[EMAIL PROTECTED]> > > > diff -uNr -X /home/src/dontdiff > /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/include/linux/input.h > linux-2.6.18_pro500/include/linux/input.h > --- /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/include/linux/input.h > 2007-03-05 21:54:45.0 -0800 > +++ linux-2.6.18_pro500/include/linux/input.h 2007-03-05 19:19:01.0 > -0800 > @@ -16,8 +16,10 @@ > #include > #include > #include > +#ifndef __sun__ > #include > #endif > +#endif > > /* > * The event structure itself > diff -uNr -X /home/src/dontdiff > /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/scripts/Makefile > linux-2.6.18_pro500/scripts/Makefile > --- /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/scripts/Makefile > 2007-03-05 21:54:43.0 -0800 > +++ linux-2.6.18_pro500/scripts/Makefile 2007-03-05 19:54:52.0 > -0800 > @@ -12,10 +12,12 @@ > hostprogs-$(CONFIG_VT) += conmakehash > hostprogs-$(CONFIG_PROM_CONSOLE) += conmakehash > hostprogs-$(CONFIG_IKCONFIG) += bin2c > +HOST_OS := $(shell uname) > +ifneq ($(HOST_OS),SunOS) > ifdef CONFIG_LPPTEST > hostprogs-y += testlpp > endif > - > +endif > always := $(hostprogs-y) > > subdir-$(CONFIG_MODVERSIONS) += genksyms > diff -uNr -X /home/src/dontdiff > /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/scripts/mod/file2alias.c > linux-2.6.18_pro500/scripts/mod/file2alias.c > --- /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/scripts/mod/file2alias.c > 2007-03-05 21:54:42.0 -0800 > +++ linux-2.6.18_pro500/scripts/mod/file2alias.c 2007-03-05 > 19:19:26.0 -0800 > @@ -29,6 +29,11 @@ > > #include > > +#if defined(__sun__) > +typedef int32_t __s32; > +typedef int16_t __s16; > +#endif > + > #if defined(__CYGWIN__) > typedef __uint32_t __u32; > #else > diff -uNr -X /home/src/dontdiff > /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/scripts/mod/modpost.h > linux-2.6.18_pro500/scripts/mod/modpost.h > --- /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/scripts/mod/modpost.h > 2007-03-05 21:54:42.0 -0800 > +++ linux-2.6.18_pro500/scripts/mod/modpost.h 2007-03-05 19:13:16.0 > -0800 > @@ -15,6 +15,11 @@ > > #include "elfconfig.h" > > +#if defined(__sun__) > +typedef uint16_t Elf32_Section; > +typedef uint16_t Elf64_Section; > +#endif > + > #if KERNEL_ELFCLASS == ELFCLASS32 > > #define Elf_EhdrElf32_Ehdr > diff -uNr -X /home/src/dontdiff > /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/scripts/mod/sumversion.c > linux-2.6.18_pro500/scripts/mod/sumversion.c > --- /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/scripts/mod/sumversion.c > 2007-03-05 21:54:42.0 -0800 > +++ linux-2.6.18_pro500/scripts/mod/sumversion.c 2007-03-05 > 19:33:55.0 -0800 > @@ -1,6 +1,7 @@ > #if defined(__sun__) > #include > #include > +#include > #elif defined(__CYGWIN__) > #include/* For ntohl/htonl */ > #include > @@ -421,9 +422,16 @@ > *end = '\0'; > > md4_init(); > +/* > + * Solaris does not strsep > + */ > +#ifndef __sun__ > while ((fname = strsep(, " ")) != NULL) { > if (!*fname) > continue; > +#else > + for (fname = strtok(sources, " "); fname; fname = strtok(NULL, " ")) { > +#endif > if (!parse_source_files(fname, )) > goto release; > } > > > -- > Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net > > In the end, they will not say, "those were dark times," they will ask > "why were their poets silent?" - Bertolt Brecht > - > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to [EMAIL PROTECTED] > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net In the end, they will not say, "those were dark times," they will ask "why were their poets silent?" - Bertolt Brecht - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Fix building kernel under Solaris
Fix varous build breakages that occur when building on a Solaris system (SunOS 4.8 to be exact) - No asm/types.h - lpptest doesn't make sense on a Solaris host (this should really be cross-built..) - Need to define __s32 and __s16 - Need to define Elf32_Section and Elf64_Section - Solaris does not provide strsep Signed-off-by: Deepak Saxena <[EMAIL PROTECTED]> diff -uNr -X /home/src/dontdiff /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/include/linux/input.h linux-2.6.18_pro500/include/linux/input.h --- /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/include/linux/input.h 2007-03-05 21:54:45.0 -0800 +++ linux-2.6.18_pro500/include/linux/input.h 2007-03-05 19:19:01.0 -0800 @@ -16,8 +16,10 @@ #include #include #include +#ifndef __sun__ #include #endif +#endif /* * The event structure itself diff -uNr -X /home/src/dontdiff /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/scripts/Makefile linux-2.6.18_pro500/scripts/Makefile --- /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/scripts/Makefile 2007-03-05 21:54:43.0 -0800 +++ linux-2.6.18_pro500/scripts/Makefile2007-03-05 19:54:52.0 -0800 @@ -12,10 +12,12 @@ hostprogs-$(CONFIG_VT) += conmakehash hostprogs-$(CONFIG_PROM_CONSOLE) += conmakehash hostprogs-$(CONFIG_IKCONFIG) += bin2c +HOST_OS := $(shell uname) +ifneq ($(HOST_OS),SunOS) ifdef CONFIG_LPPTEST hostprogs-y += testlpp endif - +endif always := $(hostprogs-y) subdir-$(CONFIG_MODVERSIONS) += genksyms diff -uNr -X /home/src/dontdiff /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/scripts/mod/file2alias.c linux-2.6.18_pro500/scripts/mod/file2alias.c --- /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/scripts/mod/file2alias.c 2007-03-05 21:54:42.0 -0800 +++ linux-2.6.18_pro500/scripts/mod/file2alias.c2007-03-05 19:19:26.0 -0800 @@ -29,6 +29,11 @@ #include +#if defined(__sun__) +typedef int32_t__s32; +typedef int16_t__s16; +#endif + #if defined(__CYGWIN__) typedef __uint32_t __u32; #else diff -uNr -X /home/src/dontdiff /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/scripts/mod/modpost.h linux-2.6.18_pro500/scripts/mod/modpost.h --- /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/scripts/mod/modpost.h 2007-03-05 21:54:42.0 -0800 +++ linux-2.6.18_pro500/scripts/mod/modpost.h 2007-03-05 19:13:16.0 -0800 @@ -15,6 +15,11 @@ #include "elfconfig.h" +#if defined(__sun__) +typedef uint16_t Elf32_Section; +typedef uint16_t Elf64_Section; +#endif + #if KERNEL_ELFCLASS == ELFCLASS32 #define Elf_EhdrElf32_Ehdr diff -uNr -X /home/src/dontdiff /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/scripts/mod/sumversion.c linux-2.6.18_pro500/scripts/mod/sumversion.c --- /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/scripts/mod/sumversion.c 2007-03-05 21:54:42.0 -0800 +++ linux-2.6.18_pro500/scripts/mod/sumversion.c2007-03-05 19:33:55.0 -0800 @@ -1,6 +1,7 @@ #if defined(__sun__) #include #include +#include #elif defined(__CYGWIN__) #include /* For ntohl/htonl */ #include @@ -421,9 +422,16 @@ *end = '\0'; md4_init(); +/* + * Solaris does not strsep + */ +#ifndef __sun__ while ((fname = strsep(, " ")) != NULL) { if (!*fname) continue; +#else + for (fname = strtok(sources, " "); fname; fname = strtok(NULL, " ")) { +#endif if (!parse_source_files(fname, )) goto release; } -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net In the end, they will not say, "those were dark times," they will ask "why were their poets silent?" - Bertolt Brecht - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Fix building kernel under Solaris
Fix varous build breakages that occur when building on a Solaris system (SunOS 4.8 to be exact) - No asm/types.h - lpptest doesn't make sense on a Solaris host (this should really be cross-built..) - Need to define __s32 and __s16 - Need to define Elf32_Section and Elf64_Section - Solaris does not provide strsep Signed-off-by: Deepak Saxena [EMAIL PROTECTED] diff -uNr -X /home/src/dontdiff /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/include/linux/input.h linux-2.6.18_pro500/include/linux/input.h --- /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/include/linux/input.h 2007-03-05 21:54:45.0 -0800 +++ linux-2.6.18_pro500/include/linux/input.h 2007-03-05 19:19:01.0 -0800 @@ -16,8 +16,10 @@ #include sys/time.h #include sys/ioctl.h #include sys/types.h +#ifndef __sun__ #include asm/types.h #endif +#endif /* * The event structure itself diff -uNr -X /home/src/dontdiff /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/scripts/Makefile linux-2.6.18_pro500/scripts/Makefile --- /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/scripts/Makefile 2007-03-05 21:54:43.0 -0800 +++ linux-2.6.18_pro500/scripts/Makefile2007-03-05 19:54:52.0 -0800 @@ -12,10 +12,12 @@ hostprogs-$(CONFIG_VT) += conmakehash hostprogs-$(CONFIG_PROM_CONSOLE) += conmakehash hostprogs-$(CONFIG_IKCONFIG) += bin2c +HOST_OS := $(shell uname) +ifneq ($(HOST_OS),SunOS) ifdef CONFIG_LPPTEST hostprogs-y += testlpp endif - +endif always := $(hostprogs-y) subdir-$(CONFIG_MODVERSIONS) += genksyms diff -uNr -X /home/src/dontdiff /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/scripts/mod/file2alias.c linux-2.6.18_pro500/scripts/mod/file2alias.c --- /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/scripts/mod/file2alias.c 2007-03-05 21:54:42.0 -0800 +++ linux-2.6.18_pro500/scripts/mod/file2alias.c2007-03-05 19:19:26.0 -0800 @@ -29,6 +29,11 @@ #include ctype.h +#if defined(__sun__) +typedef int32_t__s32; +typedef int16_t__s16; +#endif + #if defined(__CYGWIN__) typedef __uint32_t __u32; #else diff -uNr -X /home/src/dontdiff /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/scripts/mod/modpost.h linux-2.6.18_pro500/scripts/mod/modpost.h --- /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/scripts/mod/modpost.h 2007-03-05 21:54:42.0 -0800 +++ linux-2.6.18_pro500/scripts/mod/modpost.h 2007-03-05 19:13:16.0 -0800 @@ -15,6 +15,11 @@ #include elfconfig.h +#if defined(__sun__) +typedef uint16_t Elf32_Section; +typedef uint16_t Elf64_Section; +#endif + #if KERNEL_ELFCLASS == ELFCLASS32 #define Elf_EhdrElf32_Ehdr diff -uNr -X /home/src/dontdiff /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/scripts/mod/sumversion.c linux-2.6.18_pro500/scripts/mod/sumversion.c --- /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/scripts/mod/sumversion.c 2007-03-05 21:54:42.0 -0800 +++ linux-2.6.18_pro500/scripts/mod/sumversion.c2007-03-05 19:33:55.0 -0800 @@ -1,6 +1,7 @@ #if defined(__sun__) #include netinet/in.h #include inttypes.h +#include limits.h #elif defined(__CYGWIN__) #include asm/byteorder.h /* For ntohl/htonl */ #include limits.h @@ -421,9 +422,16 @@ *end = '\0'; md4_init(md); +/* + * Solaris does not strsep + */ +#ifndef __sun__ while ((fname = strsep(sources, )) != NULL) { if (!*fname) continue; +#else + for (fname = strtok(sources, ); fname; fname = strtok(NULL, )) { +#endif if (!parse_source_files(fname, md)) goto release; } -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net In the end, they will not say, those were dark times, they will ask why were their poets silent? - Bertolt Brecht - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Fix building kernel under Solaris
SIGRETRACT I have -rt merged into my tree so this won't apply cleanly to mainline. ~Deepak On Mar 06 2007, at 10:09, Deepak Saxena was caught saying: Fix varous build breakages that occur when building on a Solaris system (SunOS 4.8 to be exact) - No asm/types.h - lpptest doesn't make sense on a Solaris host (this should really be cross-built..) - Need to define __s32 and __s16 - Need to define Elf32_Section and Elf64_Section - Solaris does not provide strsep Signed-off-by: Deepak Saxena [EMAIL PROTECTED] diff -uNr -X /home/src/dontdiff /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/include/linux/input.h linux-2.6.18_pro500/include/linux/input.h --- /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/include/linux/input.h 2007-03-05 21:54:45.0 -0800 +++ linux-2.6.18_pro500/include/linux/input.h 2007-03-05 19:19:01.0 -0800 @@ -16,8 +16,10 @@ #include sys/time.h #include sys/ioctl.h #include sys/types.h +#ifndef __sun__ #include asm/types.h #endif +#endif /* * The event structure itself diff -uNr -X /home/src/dontdiff /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/scripts/Makefile linux-2.6.18_pro500/scripts/Makefile --- /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/scripts/Makefile 2007-03-05 21:54:43.0 -0800 +++ linux-2.6.18_pro500/scripts/Makefile 2007-03-05 19:54:52.0 -0800 @@ -12,10 +12,12 @@ hostprogs-$(CONFIG_VT) += conmakehash hostprogs-$(CONFIG_PROM_CONSOLE) += conmakehash hostprogs-$(CONFIG_IKCONFIG) += bin2c +HOST_OS := $(shell uname) +ifneq ($(HOST_OS),SunOS) ifdef CONFIG_LPPTEST hostprogs-y += testlpp endif - +endif always := $(hostprogs-y) subdir-$(CONFIG_MODVERSIONS) += genksyms diff -uNr -X /home/src/dontdiff /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/scripts/mod/file2alias.c linux-2.6.18_pro500/scripts/mod/file2alias.c --- /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/scripts/mod/file2alias.c 2007-03-05 21:54:42.0 -0800 +++ linux-2.6.18_pro500/scripts/mod/file2alias.c 2007-03-05 19:19:26.0 -0800 @@ -29,6 +29,11 @@ #include ctype.h +#if defined(__sun__) +typedef int32_t __s32; +typedef int16_t __s16; +#endif + #if defined(__CYGWIN__) typedef __uint32_t __u32; #else diff -uNr -X /home/src/dontdiff /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/scripts/mod/modpost.h linux-2.6.18_pro500/scripts/mod/modpost.h --- /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/scripts/mod/modpost.h 2007-03-05 21:54:42.0 -0800 +++ linux-2.6.18_pro500/scripts/mod/modpost.h 2007-03-05 19:13:16.0 -0800 @@ -15,6 +15,11 @@ #include elfconfig.h +#if defined(__sun__) +typedef uint16_t Elf32_Section; +typedef uint16_t Elf64_Section; +#endif + #if KERNEL_ELFCLASS == ELFCLASS32 #define Elf_EhdrElf32_Ehdr diff -uNr -X /home/src/dontdiff /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/scripts/mod/sumversion.c linux-2.6.18_pro500/scripts/mod/sumversion.c --- /home/src/mvista/kernel/PRO5-CLEAN/linux-2.6.18/scripts/mod/sumversion.c 2007-03-05 21:54:42.0 -0800 +++ linux-2.6.18_pro500/scripts/mod/sumversion.c 2007-03-05 19:33:55.0 -0800 @@ -1,6 +1,7 @@ #if defined(__sun__) #include netinet/in.h #include inttypes.h +#include limits.h #elif defined(__CYGWIN__) #include asm/byteorder.h /* For ntohl/htonl */ #include limits.h @@ -421,9 +422,16 @@ *end = '\0'; md4_init(md); +/* + * Solaris does not strsep + */ +#ifndef __sun__ while ((fname = strsep(sources, )) != NULL) { if (!*fname) continue; +#else + for (fname = strtok(sources, ); fname; fname = strtok(NULL, )) { +#endif if (!parse_source_files(fname, md)) goto release; } -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net In the end, they will not say, those were dark times, they will ask why were their poets silent? - Bertolt Brecht - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net In the end, they will not say, those were dark times, they will ask why were their poets silent? - Bertolt Brecht - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Allow kernel to build on Cygwin
On Feb 23 2007, at 20:37, Matthieu CASTET was caught saying: > Hi, > > Deepak Saxena plexity.net> writes: > > > > > > > This patch contains a set of small fixes to allow the kernel to build under > > the Cygwin environment, which is unfortunately used by more people than > > one would think in the embedded world. :( > Yes, I did similar patch, and there are needed for everything (busybox, > glibc, ...) > -D LKC_DIRECT_LINK > > > > +HOST_OS := $(shell uname -o) > > +ifeq ($(HOST_OS),Cygwin) > > +HOSTLOADLIBES_mconf= -lintl > > +HOSTLOADLIBES_conf = -lintl > > +endif > > + > Hum, this test should be done if we detect nls support. See ifeq > ($(KBUILD_HAVE_NLS),no) ... OK, will do. I'm running into the same issue trying to fix building under uclibc and would defintely be nicer to have a single solution. ~Deepak -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net In the end, they will not say, "those were dark times," they will ask "why were their poets silent?" - Bertolt Brecht - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Allow kernel to build on Cygwin
On Feb 23 2007, at 20:37, Matthieu CASTET was caught saying: Hi, Deepak Saxena dsaxena at plexity.net writes: This patch contains a set of small fixes to allow the kernel to build under the Cygwin environment, which is unfortunately used by more people than one would think in the embedded world. :( Yes, I did similar patch, and there are needed for everything (busybox, glibc, ...) -D LKC_DIRECT_LINK +HOST_OS := $(shell uname -o) +ifeq ($(HOST_OS),Cygwin) +HOSTLOADLIBES_mconf= -lintl +HOSTLOADLIBES_conf = -lintl +endif + Hum, this test should be done if we detect nls support. See ifeq ($(KBUILD_HAVE_NLS),no) ... OK, will do. I'm running into the same issue trying to fix building under uclibc and would defintely be nicer to have a single solution. ~Deepak -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net In the end, they will not say, those were dark times, they will ask why were their poets silent? - Bertolt Brecht - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Modprobe as script breaks initramfs kernel?
On Feb 22 2007, at 19:44, Jan Engelhardt was caught saying: > > On Feb 22 2007 14:30, Michael Tokarev wrote: > >Deepak Saxena wrote: > >> We attempted an experiment in cleaning up some modprobe messages during > >> initramfs bootup when the modules directory is missing by moving modprobe > >> to modprobe-bin and replacing modprobe with the following simple shell > >> script: > >> > >> #!/bin/sh > >> # Clean up bootup when modules are not present > >> > >> if [ -e "/lib/modules/'uname -r'/modules.dep" ] ; then > >>/sbin/modprobe-bin $* > > The nitpick guide says: `uname -r` and "$@" instead of $* ;-) Yeah. The quotes were a typo in my email. :) > >This is the same issue I reported much earlier with /sbin/hotplug being a > >script > >in initrfamfs. The problem is because pipefs isn't initialized yet at the > >time > >the script gets called, and causes a NULL-pointer deref. Obviously you're > >using > >pipe above. > > Btw, has this pipefs issue been adressed (by moving pipefs before initramfs > stage), or something? If it hasn't, it's now on my todo list. -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net In the end, they will not say, "those were dark times," they will ask "why were their poets silent?" - Bertolt Brecht - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Allow kernel to build on Cygwin
This patch contains a set of small fixes to allow the kernel to build under the Cygwin environment, which is unfortunately used by more people than one would think in the embedded world. :( Signed-off-by: Deepak Saxena <[EMAIL PROTECTED]> --- lib/gen_crc32table.c |2 ++ scripts/kconfig/Makefile |6 ++ scripts/kconfig/lxdialog/check-lxdialog.sh |4 scripts/mod/file2alias.c |4 scripts/mod/mk_elfconfig.c |4 scripts/mod/modpost.h |4 scripts/mod/sumversion.c |6 +- 7 files changed, 29 insertions(+), 1 deletion(-) diff --git a/lib/gen_crc32table.c b/lib/gen_crc32table.c index bea5d97..ce447ff 100644 --- a/lib/gen_crc32table.c +++ b/lib/gen_crc32table.c @@ -1,6 +1,8 @@ #include #include "crc32defs.h" +#ifndef __CYGWIN__ #include +#endif #define ENTRIES_PER_LINE 4 diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 7e7e147..ca57efe 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -161,6 +161,12 @@ HOSTLOADLIBES_gconf= `pkg-config --libs HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \ -D LKC_DIRECT_LINK +HOST_OS := $(shell uname -o) +ifeq ($(HOST_OS),Cygwin) +HOSTLOADLIBES_mconf= -lintl +HOSTLOADLIBES_conf = -lintl +endif + $(obj)/qconf.o: $(obj)/.tmp_qtcheck ifeq ($(qconf-target),1) diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh index 120d624..c44b559 100644 --- a/scripts/kconfig/lxdialog/check-lxdialog.sh +++ b/scripts/kconfig/lxdialog/check-lxdialog.sh @@ -4,6 +4,10 @@ # Check ncurses compatibility # What library to link ldflags() { + if [ "`uname -o`" == "Cygwin" ]; then + echo '-lintl -lncurses' + exit + fi $cc -print-file-name=libncursesw.so | grep -q / if [ $? -eq 0 ]; then echo '-lncursesw' diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index f61c9cc..479293f 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -29,7 +29,11 @@ #endif #include +#if defined(__CYGWIN__) +typedef __uint32_t __u32; +#else typedef uint32_t __u32; +#endif typedef uint16_t __u16; typedef unsigned char __u8; diff --git a/scripts/mod/mk_elfconfig.c b/scripts/mod/mk_elfconfig.c index 725d61c..4908f7a 100644 --- a/scripts/mod/mk_elfconfig.c +++ b/scripts/mod/mk_elfconfig.c @@ -1,7 +1,11 @@ #include #include #include +#ifdef __CYGWIN__ +#include +#else #include +#endif int main(int argc, char **argv) diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h index d398c61..7cdf2c6 100644 --- a/scripts/mod/modpost.h +++ b/scripts/mod/modpost.h @@ -7,7 +7,11 @@ #include #include #include #include +#ifdef __CYGWIN__ +#include +#else #include +#endif #include "elfconfig.h" diff --git a/scripts/mod/sumversion.c b/scripts/mod/sumversion.c index 8a28756..4404f87 100644 --- a/scripts/mod/sumversion.c +++ b/scripts/mod/sumversion.c @@ -1,7 +1,11 @@ +#if defined(__sun__) #include -#ifdef __sun__ #include +#elif defined(__CYGWIN__) +#include /* For ntohl/htonl */ +#include #else +#include #include #endif #include -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net In the end, they will not say, "those were dark times," they will ask "why were their poets silent?" - Bertolt Brecht - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Allow kernel to build on Cygwin
This patch contains a set of small fixes to allow the kernel to build under the Cygwin environment, which is unfortunately used by more people than one would think in the embedded world. :( Signed-off-by: Deepak Saxena [EMAIL PROTECTED] --- lib/gen_crc32table.c |2 ++ scripts/kconfig/Makefile |6 ++ scripts/kconfig/lxdialog/check-lxdialog.sh |4 scripts/mod/file2alias.c |4 scripts/mod/mk_elfconfig.c |4 scripts/mod/modpost.h |4 scripts/mod/sumversion.c |6 +- 7 files changed, 29 insertions(+), 1 deletion(-) diff --git a/lib/gen_crc32table.c b/lib/gen_crc32table.c index bea5d97..ce447ff 100644 --- a/lib/gen_crc32table.c +++ b/lib/gen_crc32table.c @@ -1,6 +1,8 @@ #include stdio.h #include crc32defs.h +#ifndef __CYGWIN__ #include inttypes.h +#endif #define ENTRIES_PER_LINE 4 diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 7e7e147..ca57efe 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -161,6 +161,12 @@ HOSTLOADLIBES_gconf= `pkg-config --libs HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \ -D LKC_DIRECT_LINK +HOST_OS := $(shell uname -o) +ifeq ($(HOST_OS),Cygwin) +HOSTLOADLIBES_mconf= -lintl +HOSTLOADLIBES_conf = -lintl +endif + $(obj)/qconf.o: $(obj)/.tmp_qtcheck ifeq ($(qconf-target),1) diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh index 120d624..c44b559 100644 --- a/scripts/kconfig/lxdialog/check-lxdialog.sh +++ b/scripts/kconfig/lxdialog/check-lxdialog.sh @@ -4,6 +4,10 @@ # Check ncurses compatibility # What library to link ldflags() { + if [ `uname -o` == Cygwin ]; then + echo '-lintl -lncurses' + exit + fi $cc -print-file-name=libncursesw.so | grep -q / if [ $? -eq 0 ]; then echo '-lncursesw' diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index f61c9cc..479293f 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -29,7 +29,11 @@ #endif #include ctype.h +#if defined(__CYGWIN__) +typedef __uint32_t __u32; +#else typedef uint32_t __u32; +#endif typedef uint16_t __u16; typedef unsigned char __u8; diff --git a/scripts/mod/mk_elfconfig.c b/scripts/mod/mk_elfconfig.c index 725d61c..4908f7a 100644 --- a/scripts/mod/mk_elfconfig.c +++ b/scripts/mod/mk_elfconfig.c @@ -1,7 +1,11 @@ #include stdio.h #include stdlib.h #include string.h +#ifdef __CYGWIN__ +#include libelf.h +#else #include elf.h +#endif int main(int argc, char **argv) diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h index d398c61..7cdf2c6 100644 --- a/scripts/mod/modpost.h +++ b/scripts/mod/modpost.h @@ -7,7 +7,11 @@ #include sys/stat.h #include sys/mman.h #include fcntl.h #include unistd.h +#ifdef __CYGWIN__ +#include libelf.h +#else #include elf.h +#endif #include elfconfig.h diff --git a/scripts/mod/sumversion.c b/scripts/mod/sumversion.c index 8a28756..4404f87 100644 --- a/scripts/mod/sumversion.c +++ b/scripts/mod/sumversion.c @@ -1,7 +1,11 @@ +#if defined(__sun__) #include netinet/in.h -#ifdef __sun__ #include inttypes.h +#elif defined(__CYGWIN__) +#include asm/byteorder.h /* For ntohl/htonl */ +#include limits.h #else +#include netinet/in.h #include stdint.h #endif #include ctype.h -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net In the end, they will not say, those were dark times, they will ask why were their poets silent? - Bertolt Brecht - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Modprobe as script breaks initramfs kernel?
On Feb 22 2007, at 19:44, Jan Engelhardt was caught saying: On Feb 22 2007 14:30, Michael Tokarev wrote: Deepak Saxena wrote: We attempted an experiment in cleaning up some modprobe messages during initramfs bootup when the modules directory is missing by moving modprobe to modprobe-bin and replacing modprobe with the following simple shell script: #!/bin/sh # Clean up bootup when modules are not present if [ -e /lib/modules/'uname -r'/modules.dep ] ; then /sbin/modprobe-bin $* The nitpick guide says: `uname -r` and $@ instead of $* ;-) Yeah. The quotes were a typo in my email. :) This is the same issue I reported much earlier with /sbin/hotplug being a script in initrfamfs. The problem is because pipefs isn't initialized yet at the time the script gets called, and causes a NULL-pointer deref. Obviously you're using pipe above. Btw, has this pipefs issue been adressed (by moving pipefs before initramfs stage), or something? If it hasn't, it's now on my todo list. -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net In the end, they will not say, those were dark times, they will ask why were their poets silent? - Bertolt Brecht - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Modprobe as script breaks initramfs kernel?
We attempted an experiment in cleaning up some modprobe messages during initramfs bootup when the modules directory is missing by moving modprobe to modprobe-bin and replacing modprobe with the following simple shell script: #!/bin/sh # Clean up bootup when modules are not present if [ -e "/lib/modules/'uname -r'/modules.dep" ] ; then /sbin/modprobe-bin $* else exit 0 fi Running this on any architecture causes a non fatal kernel BUG message out of the do_pipe() code path everytime modprobe is called. BUG: unable to handle kernel NULL pointer dereference at virtual address 0014 c016a5e6 *pde = Oops: [#1] CPU:0 EIP:0060:[]Not tainted VLI Using defaults from ksymoops -t elf32-i386 -a i386 EFLAGS: 00010286 (2.6.18_pro500-pc_target-x86_586 #2) eax: ebx: bf8f9ae8 ecx: edx: c16a00f0 esi: c16f0c80 edi: 0011 ebp: c16f0bc0 esp: c16e9f40 ds: 007b es: 007b ss: 0068 preempt: 0001 Stack: dff64dc0 c13ff580 ffe9 dfe84a40 0002 c16e8000 c169f41c 0808d581 c166b900 c010f5bd c166b934 c169f41c 0808d581 0004 c16e9fbc bf8f9ae8 c16e9fa8 0011 c16e8000 c0107737 c16e9fa8 Call Trace: [] [] [] <0>Code: c6 c7 44 24 10 e9 ff ff ff 0f 84 1b 02 00 00 e8 91 2e ff ff 85 c0 89 c5 c7 44 24 10 e9 ff ff ff 0f 84 34 02 00 00 a1 d8 75 53 c0 <8b> 40 14 89 04 24 e8 8f ec 00 00 85 c0 89 c3 0f 84 0a 02 00 00 EIP: [] SS:ESP 0068:c16e9f40 Warning (Oops_read): Code line not seen, dumping what data is available >>EIP; c016a5e6<= >>ebx; bf8f9ae8 >>edx; c16a00f0 >>esi; c16f0c80 >>ebp; c16f0bc0 >>esp; c16e9f40 Trace; c010f5bd Trace; c0107737 Trace; c01030d7 >>EIP; c016a5e6<= I've done a quick skim of the code and don't quite see the issue there. Can the kernel not handle modprobe as a script that then executes another process this early in the boot sequence? Tnx, ~Deepak ps: Yes, I know this is "fix" to error messages is ugly. :) -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net in the end, they will not say, "those were dark times," they will ask "why were their poets silent?" - Bertold Brecht - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Modprobe as script breaks initramfs kernel?
We attempted an experiment in cleaning up some modprobe messages during initramfs bootup when the modules directory is missing by moving modprobe to modprobe-bin and replacing modprobe with the following simple shell script: #!/bin/sh # Clean up bootup when modules are not present if [ -e /lib/modules/'uname -r'/modules.dep ] ; then /sbin/modprobe-bin $* else exit 0 fi Running this on any architecture causes a non fatal kernel BUG message out of the do_pipe() code path everytime modprobe is called. BUG: unable to handle kernel NULL pointer dereference at virtual address 0014 c016a5e6 *pde = Oops: [#1] CPU:0 EIP:0060:[c016a5e6]Not tainted VLI Using defaults from ksymoops -t elf32-i386 -a i386 EFLAGS: 00010286 (2.6.18_pro500-pc_target-x86_586 #2) eax: ebx: bf8f9ae8 ecx: edx: c16a00f0 esi: c16f0c80 edi: 0011 ebp: c16f0bc0 esp: c16e9f40 ds: 007b es: 007b ss: 0068 preempt: 0001 Stack: dff64dc0 c13ff580 ffe9 dfe84a40 0002 c16e8000 c169f41c 0808d581 c166b900 c010f5bd c166b934 c169f41c 0808d581 0004 c16e9fbc bf8f9ae8 c16e9fa8 0011 c16e8000 c0107737 c16e9fa8 Call Trace: [c010f5bd] [c0107737] [c01030d7] 0Code: c6 c7 44 24 10 e9 ff ff ff 0f 84 1b 02 00 00 e8 91 2e ff ff 85 c0 89 c5 c7 44 24 10 e9 ff ff ff 0f 84 34 02 00 00 a1 d8 75 53 c0 8b 40 14 89 04 24 e8 8f ec 00 00 85 c0 89 c3 0f 84 0a 02 00 00 EIP: [c016a5e6] SS:ESP 0068:c16e9f40 Warning (Oops_read): Code line not seen, dumping what data is available EIP; c016a5e6 do_pipe+46/2c0 = ebx; bf8f9ae8 phys_startup_32+bf7f9ae8/c000 edx; c16a00f0 pg0+f220f0/3f880400 esi; c16f0c80 pg0+f72c80/3f880400 ebp; c16f0bc0 pg0+f72bc0/3f880400 esp; c16e9f40 pg0+f6bf40/3f880400 Trace; c010f5bd do_page_fault+15d/75a Trace; c0107737 sys_pipe+17/60 Trace; c01030d7 syscall_call+7/b EIP; c016a5e6 do_pipe+46/2c0 = I've done a quick skim of the code and don't quite see the issue there. Can the kernel not handle modprobe as a script that then executes another process this early in the boot sequence? Tnx, ~Deepak ps: Yes, I know this is fix to error messages is ugly. :) -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net in the end, they will not say, those were dark times, they will ask why were their poets silent? - Bertold Brecht - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Allow for arch-specific IOREMAP_MAX_ORDER
On Aug 28 2005, at 18:39, Russell King was caught saying: > On Wed, Aug 24, 2005 at 03:12:02PM -0700, Deepak Saxena wrote: > > Version 6 of the ARM architecture introduces the concept of 16MB pages > > (supersections) and 36-bit (40-bit actually, but nobody uses this) > > physical addresses. 36-bit addressed memory and I/O and ARMv6 can > > only be mapped using supersections and the requirement on these is > > that both virtual and physical addresses be 16MB aligned. > > Have we sorted out how we handle the issue of IO vs memory outside the > normal 4GB? We can only map one or other depending on how the domains > are setup and get the correct permission behaviour. That's an arch-specific issue that we'll have to handle in the ARM code and really shouldn't impact this patch itself. FYI, all the 36-bit CPUs I know of (from Intel) only have I/O above 4G. ~Deepak -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net Even a stopped clock gives the right time twice a day. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Allow for arch-specific IOREMAP_MAX_ORDER
On Aug 28 2005, at 18:39, Russell King was caught saying: On Wed, Aug 24, 2005 at 03:12:02PM -0700, Deepak Saxena wrote: Version 6 of the ARM architecture introduces the concept of 16MB pages (supersections) and 36-bit (40-bit actually, but nobody uses this) physical addresses. 36-bit addressed memory and I/O and ARMv6 can only be mapped using supersections and the requirement on these is that both virtual and physical addresses be 16MB aligned. Have we sorted out how we handle the issue of IO vs memory outside the normal 4GB? We can only map one or other depending on how the domains are setup and get the correct permission behaviour. That's an arch-specific issue that we'll have to handle in the ARM code and really shouldn't impact this patch itself. FYI, all the 36-bit CPUs I know of (from Intel) only have I/O above 4G. ~Deepak -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net Even a stopped clock gives the right time twice a day. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Linux-2.6.13-rc7
On Aug 25 2005, at 16:04, Erik Mouw was caught saying: > On Tue, Aug 23, 2005 at 10:08:13PM -0700, Linus Torvalds wrote: > > I really wanted to release a 2.6.13, but there's been enough changes > > while we've been waiting for other issues to resolve that I think it's > > best to do a -rc7 first. > > There's something strange going on with either ACPI or cpufreq. When Is there ever anything not strange going on with ACPI. :p /me goes back to beer. ~Deepak -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net Even a stopped clock gives the right time twice a day. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Linux-2.6.13-rc7
On Aug 25 2005, at 16:04, Erik Mouw was caught saying: On Tue, Aug 23, 2005 at 10:08:13PM -0700, Linus Torvalds wrote: I really wanted to release a 2.6.13, but there's been enough changes while we've been waiting for other issues to resolve that I think it's best to do a -rc7 first. There's something strange going on with either ACPI or cpufreq. When Is there ever anything not strange going on with ACPI. :p /me goes back to beer. ~Deepak -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net Even a stopped clock gives the right time twice a day. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.13-rc7] Fix IXP4xx flash resource range
[Resend...forgot to send to lkml] We are currently reserving one byte more than actually needed by the flash device and overlapping into the next I/O expansion bus window. This a) causes us to allocate an extra page of VM due to ARM ioremap() alignment code and b) could cause problems if another driver tries to request the next expansion bus window. Signed-off-by: Deepak Saxena <[EMAIL PROTECTED]> diff --git a/arch/arm/mach-ixp4xx/coyote-setup.c b/arch/arm/mach-ixp4xx/coyote-setup.c --- a/arch/arm/mach-ixp4xx/coyote-setup.c +++ b/arch/arm/mach-ixp4xx/coyote-setup.c @@ -36,7 +36,7 @@ static struct flash_platform_data coyote static struct resource coyote_flash_resource = { .start = COYOTE_FLASH_BASE, - .end= COYOTE_FLASH_BASE + COYOTE_FLASH_SIZE, + .end= COYOTE_FLASH_BASE + COYOTE_FLASH_SIZE - 1, .flags = IORESOURCE_MEM, }; diff --git a/arch/arm/mach-ixp4xx/gtwx5715-setup.c b/arch/arm/mach-ixp4xx/gtwx5715-setup.c --- a/arch/arm/mach-ixp4xx/gtwx5715-setup.c +++ b/arch/arm/mach-ixp4xx/gtwx5715-setup.c @@ -114,7 +114,7 @@ static struct flash_platform_data gtwx57 static struct resource gtwx5715_flash_resource = { .start = GTWX5715_FLASH_BASE, - .end= GTWX5715_FLASH_BASE + GTWX5715_FLASH_SIZE, + .end= GTWX5715_FLASH_BASE + GTWX5715_FLASH_SIZE - 1, .flags = IORESOURCE_MEM, }; diff --git a/arch/arm/mach-ixp4xx/ixdp425-setup.c b/arch/arm/mach-ixp4xx/ixdp425-setup.c --- a/arch/arm/mach-ixp4xx/ixdp425-setup.c +++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c @@ -36,7 +36,7 @@ static struct flash_platform_data ixdp42 static struct resource ixdp425_flash_resource = { .start = IXDP425_FLASH_BASE, - .end= IXDP425_FLASH_BASE + IXDP425_FLASH_SIZE, + .end= IXDP425_FLASH_BASE + IXDP425_FLASH_SIZE - 1, .flags = IORESOURCE_MEM, }; -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net Even a stopped clock gives the right time twice a day. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Allow for arch-specific IOREMAP_MAX_ORDER
Version 6 of the ARM architecture introduces the concept of 16MB pages (supersections) and 36-bit (40-bit actually, but nobody uses this) physical addresses. 36-bit addressed memory and I/O and ARMv6 can only be mapped using supersections and the requirement on these is that both virtual and physical addresses be 16MB aligned. In trying to add support for ioremap() of 36-bit I/O, we run into the issue that get_vm_area() allows for a maximum of 512K alignment via the IOREMAP_MAX_ORDER constant. To work around this, we can: - Allocate a larger VM area than needed (size + (1ul << IOREMAP_MAX_ORDER)) and then align the pointer ourselves, but this ends up with 512K of wasted VM per ioremap(). - Provide a new __get_vm_area_aligned() API and make __get_vm_area() sit on top of this. I did this and it works but I don't like the idea adding another VM API just for this one case. - My preferred solution which is to allow the architecture to override the IOREMAP_MAX_ORDER constant with it's own version. Signed-off-by: Deepak Saxena <[EMAIL PROTECTED]> diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h @@ -10,6 +10,14 @@ #define VM_MAP 0x0004 /* vmap()ed pages */ /* bits [20..32] reserved for arch specific ioremap internals */ +/* + * Maximum alignment for ioremap() regions. + * Can be overriden by arch-specific value. + */ +#ifndef IOREMAP_MAX_ORDER +#define IOREMAP_MAX_ORDER (7 + PAGE_SHIFT)/* 128 pages */ +#endif + struct vm_struct { void*addr; unsigned long size; diff --git a/mm/vmalloc.c b/mm/vmalloc.c --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -158,8 +158,6 @@ int map_vm_area(struct vm_struct *area, return err; } -#define IOREMAP_MAX_ORDER (7 + PAGE_SHIFT)/* 128 pages */ - struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags, unsigned long start, unsigned long end) { -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net Even a stopped clock gives the right time twice a day. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Allow for arch-specific IOREMAP_MAX_ORDER
Version 6 of the ARM architecture introduces the concept of 16MB pages (supersections) and 36-bit (40-bit actually, but nobody uses this) physical addresses. 36-bit addressed memory and I/O and ARMv6 can only be mapped using supersections and the requirement on these is that both virtual and physical addresses be 16MB aligned. In trying to add support for ioremap() of 36-bit I/O, we run into the issue that get_vm_area() allows for a maximum of 512K alignment via the IOREMAP_MAX_ORDER constant. To work around this, we can: - Allocate a larger VM area than needed (size + (1ul IOREMAP_MAX_ORDER)) and then align the pointer ourselves, but this ends up with 512K of wasted VM per ioremap(). - Provide a new __get_vm_area_aligned() API and make __get_vm_area() sit on top of this. I did this and it works but I don't like the idea adding another VM API just for this one case. - My preferred solution which is to allow the architecture to override the IOREMAP_MAX_ORDER constant with it's own version. Signed-off-by: Deepak Saxena [EMAIL PROTECTED] diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h @@ -10,6 +10,14 @@ #define VM_MAP 0x0004 /* vmap()ed pages */ /* bits [20..32] reserved for arch specific ioremap internals */ +/* + * Maximum alignment for ioremap() regions. + * Can be overriden by arch-specific value. + */ +#ifndef IOREMAP_MAX_ORDER +#define IOREMAP_MAX_ORDER (7 + PAGE_SHIFT)/* 128 pages */ +#endif + struct vm_struct { void*addr; unsigned long size; diff --git a/mm/vmalloc.c b/mm/vmalloc.c --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -158,8 +158,6 @@ int map_vm_area(struct vm_struct *area, return err; } -#define IOREMAP_MAX_ORDER (7 + PAGE_SHIFT)/* 128 pages */ - struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags, unsigned long start, unsigned long end) { -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net Even a stopped clock gives the right time twice a day. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.13-rc7] Fix IXP4xx flash resource range
[Resend...forgot to send to lkml] We are currently reserving one byte more than actually needed by the flash device and overlapping into the next I/O expansion bus window. This a) causes us to allocate an extra page of VM due to ARM ioremap() alignment code and b) could cause problems if another driver tries to request the next expansion bus window. Signed-off-by: Deepak Saxena [EMAIL PROTECTED] diff --git a/arch/arm/mach-ixp4xx/coyote-setup.c b/arch/arm/mach-ixp4xx/coyote-setup.c --- a/arch/arm/mach-ixp4xx/coyote-setup.c +++ b/arch/arm/mach-ixp4xx/coyote-setup.c @@ -36,7 +36,7 @@ static struct flash_platform_data coyote static struct resource coyote_flash_resource = { .start = COYOTE_FLASH_BASE, - .end= COYOTE_FLASH_BASE + COYOTE_FLASH_SIZE, + .end= COYOTE_FLASH_BASE + COYOTE_FLASH_SIZE - 1, .flags = IORESOURCE_MEM, }; diff --git a/arch/arm/mach-ixp4xx/gtwx5715-setup.c b/arch/arm/mach-ixp4xx/gtwx5715-setup.c --- a/arch/arm/mach-ixp4xx/gtwx5715-setup.c +++ b/arch/arm/mach-ixp4xx/gtwx5715-setup.c @@ -114,7 +114,7 @@ static struct flash_platform_data gtwx57 static struct resource gtwx5715_flash_resource = { .start = GTWX5715_FLASH_BASE, - .end= GTWX5715_FLASH_BASE + GTWX5715_FLASH_SIZE, + .end= GTWX5715_FLASH_BASE + GTWX5715_FLASH_SIZE - 1, .flags = IORESOURCE_MEM, }; diff --git a/arch/arm/mach-ixp4xx/ixdp425-setup.c b/arch/arm/mach-ixp4xx/ixdp425-setup.c --- a/arch/arm/mach-ixp4xx/ixdp425-setup.c +++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c @@ -36,7 +36,7 @@ static struct flash_platform_data ixdp42 static struct resource ixdp425_flash_resource = { .start = IXDP425_FLASH_BASE, - .end= IXDP425_FLASH_BASE + IXDP425_FLASH_SIZE, + .end= IXDP425_FLASH_BASE + IXDP425_FLASH_SIZE - 1, .flags = IORESOURCE_MEM, }; -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net Even a stopped clock gives the right time twice a day. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.13-git] Fix IXP4xx CLOCK_TICK_RATE
[RMK is out for the week so sending this direct as it should go into 2.6.13] As pointed out in the following thread, the CLOCK_TICK_RATE setting for IXP4xx is incorrect b/c the HW ignores the lowest 2 bits of the LATCH value. http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2005-August/030950.html Tnx to George Anziger and Egil Hjelmeland for finding the issue. Signed-off-by: Deepak Saxena <[EMAIL PROTECTED]> diff --git a/include/asm-arm/arch-ixp4xx/timex.h b/include/asm-arm/arch-ixp4xx/timex.h --- a/include/asm-arm/arch-ixp4xx/timex.h +++ b/include/asm-arm/arch-ixp4xx/timex.h @@ -7,7 +7,9 @@ /* * We use IXP425 General purpose timer for our timer needs, it runs at - * 66.66... MHz + * 66.66... MHz. We do a convulted calculation of CLOCK_TICK_RATE b/c the + * timer register ignores the bottom 2 bits of the LATCH value. */ -#define CLOCK_TICK_RATE () +#define FREQ +#define CLOCK_TICK_RATE (((FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ) -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net Even a stopped clock gives the right time twice a day. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2.6.13-git] Fix IXP4xx CLOCK_TICK_RATE
[RMK is out for the week so sending this direct as it should go into 2.6.13] As pointed out in the following thread, the CLOCK_TICK_RATE setting for IXP4xx is incorrect b/c the HW ignores the lowest 2 bits of the LATCH value. http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2005-August/030950.html Tnx to George Anziger and Egil Hjelmeland for finding the issue. Signed-off-by: Deepak Saxena [EMAIL PROTECTED] diff --git a/include/asm-arm/arch-ixp4xx/timex.h b/include/asm-arm/arch-ixp4xx/timex.h --- a/include/asm-arm/arch-ixp4xx/timex.h +++ b/include/asm-arm/arch-ixp4xx/timex.h @@ -7,7 +7,9 @@ /* * We use IXP425 General purpose timer for our timer needs, it runs at - * 66.66... MHz + * 66.66... MHz. We do a convulted calculation of CLOCK_TICK_RATE b/c the + * timer register ignores the bottom 2 bits of the LATCH value. */ -#define CLOCK_TICK_RATE () +#define FREQ +#define CLOCK_TICK_RATE (((FREQ / HZ ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ) -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net Even a stopped clock gives the right time twice a day. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: RFC: 64-bit resources and changes to pci, ioremap, ...
On Jul 29 2005, at 10:53, Kumar Gala was caught saying: > The main issue that I'm starting to see is that the concept of a > physical address from the processors point of view needs to be > consistent throughout all subsystems of the kernel. Currently the > major usage of struct resource is with the PCI subsystem and PCI > drivers. The following are some questions that I was hoping to get > answers to and discussion around: > > * How many 32-bit systems support larger than 32-bit physical > addresses (I know newer PPCs do)? Intel's new XSC3 ARM core supports up to 36-bit addressing and they have several CPUs based on this that are already out or will be released in the next year. I can currently get around 64-bit resources by playing ugly tricks with the memory map and trapping ioremap() calls to a certain unused 32-bit physical range and fixing it up to 64-bit (like PPC440?? does) but that may not work on future CPUs that don't have holes in the memmap. > * How many 32-bit systems support a 64-bit PCI address space? This is a fairly common thing on some of the Intel XScale I/O and network processors. Some of the Intel CPUs provide a window in 32-bit CPU that translates to 64-bit PCI space. > * Should ioremap and variants start taking 64-bit physical addresses? If we are to use 64 bit resources, then yes. Or pfns... Do a google for my real opinion on this. I think ioremap() should take a device and resource describing the address of the resources in the address space of the device (the bus it is one). The whole resource and I/O subwystem currently assumes that physical and PCI bus address spaces are one and the same, but I have HW that breaks this assumption by allowing up to 2 GB of RAM and 3GB of PCI devices. Whenever this has been brought up though, Linus has shot it down. What we need is a real concept of per-bus address spaces and resources. But that is far more complicated change. > * Do we make this an arch option and wrap start and end in a typedef > similar to pte_t and provide accessor macros to ensure proper use? Probably the best thing to do b/c on really small systems that don't have 64-bit needs, we'll just be wasting memory with the extra data structure size. We need to scale down to PCI systems with just 8MB of RAM. ~Deepak -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net Even a stopped clock gives the right time twice a day. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: RFC: 64-bit resources and changes to pci, ioremap, ...
On Jul 29 2005, at 10:53, Kumar Gala was caught saying: The main issue that I'm starting to see is that the concept of a physical address from the processors point of view needs to be consistent throughout all subsystems of the kernel. Currently the major usage of struct resource is with the PCI subsystem and PCI drivers. The following are some questions that I was hoping to get answers to and discussion around: * How many 32-bit systems support larger than 32-bit physical addresses (I know newer PPCs do)? Intel's new XSC3 ARM core supports up to 36-bit addressing and they have several CPUs based on this that are already out or will be released in the next year. I can currently get around 64-bit resources by playing ugly tricks with the memory map and trapping ioremap() calls to a certain unused 32-bit physical range and fixing it up to 64-bit (like PPC440?? does) but that may not work on future CPUs that don't have holes in the memmap. * How many 32-bit systems support a 64-bit PCI address space? This is a fairly common thing on some of the Intel XScale I/O and network processors. Some of the Intel CPUs provide a window in 32-bit CPU that translates to 64-bit PCI space. * Should ioremap and variants start taking 64-bit physical addresses? If we are to use 64 bit resources, then yes. Or pfns... Do a google for my real opinion on this. I think ioremap() should take a device and resource describing the address of the resources in the address space of the device (the bus it is one). The whole resource and I/O subwystem currently assumes that physical and PCI bus address spaces are one and the same, but I have HW that breaks this assumption by allowing up to 2 GB of RAM and 3GB of PCI devices. Whenever this has been brought up though, Linus has shot it down. What we need is a real concept of per-bus address spaces and resources. But that is far more complicated change. * Do we make this an arch option and wrap start and end in a typedef similar to pte_t and provide accessor macros to ensure proper use? Probably the best thing to do b/c on really small systems that don't have 64-bit needs, we'll just be wasting memory with the extra data structure size. We need to scale down to PCI systems with just 8MB of RAM. ~Deepak -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net Even a stopped clock gives the right time twice a day. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: 64-bit resources?
On Mar 10 2005, at 12:09, Kumar Gala was caught saying: > > On Mar 10, 2005, at 11:35 AM, Greg KH wrote: > > >On Thu, Mar 10, 2005 at 01:46:10AM -0600, Kumar Gala wrote: > > > Greg, > > > > >> I was wondering what the state of the change to 64-bit resources was? > > > >On hold till I get the time to fix all of the kernel tree up due to the > > changes required. > > > >Unless someone else wants to volunteer to do the work :) > > Will, I might be able to, what major things need fixing? Kumar, I'll help you on this b/c I need 64-bit resources ASAP to support some new CPUs. ~Deepak -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net Even a stopped clock gives the right time twice a day. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: 64-bit resources?
On Mar 10 2005, at 12:09, Kumar Gala was caught saying: On Mar 10, 2005, at 11:35 AM, Greg KH wrote: On Thu, Mar 10, 2005 at 01:46:10AM -0600, Kumar Gala wrote: Greg, I was wondering what the state of the change to 64-bit resources was? On hold till I get the time to fix all of the kernel tree up due to the changes required. Unless someone else wants to volunteer to do the work :) Will, I might be able to, what major things need fixing? Kumar, I'll help you on this b/c I need 64-bit resources ASAP to support some new CPUs. ~Deepak -- Deepak Saxena - [EMAIL PROTECTED] - http://www.plexity.net Even a stopped clock gives the right time twice a day. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/