* [PATCH] 2.6.2 Documentation fix (Documentation/kbuild/modules.txt)
@ 2004-02-07 22:21 Ryan Boder
2004-02-07 23:00 ` 2.6.2 Compile Failure - Redhat 7.3 Distro Elikster
0 siblings, 1 reply; 4+ messages in thread
From: Ryan Boder @ 2004-02-07 22:21 UTC (permalink / raw)
To: linux-kernel; +Cc: torvalds, akpm
Explains how to compile external modules in
Documentation/kbuild/modules.txt.
--
Ryan Boder
http://www.bitwiser.org/icanoop
--- linux-2.6.2/Documentation/kbuild/modules.txt 2004-02-06 12:31:04.000000000 -0500
+++ linux-2.6.2-icanoop/Documentation/kbuild/modules.txt 2004-02-07 16:46:52.000000000 -0500
@@ -17,12 +17,52 @@
Compiling modules outside the official kernel
---------------------------------------------
-Often modules are developed outside the official kernel.
-To keep up with changes in the build system the most portable way
-to compile a module outside the kernel is to use the following command-line:
+
+Often modules are developed outside the official kernel. To keep up
+with changes in the build system the most portable way to compile a
+module outside the kernel is to use the kernel build system,
+kbuild. Use the following command-line:
make -C path/to/kernel/src SUBDIRS=$PWD modules
This requires that a makefile exits made in accordance to
-Documentation/kbuild/makefiles.txt.
+Documentation/kbuild/makefiles.txt. Read that file for more details on
+the build system.
+
+The following is a short summary of how to write your Makefile to get
+you up and running fast. Assuming your module will be called
+yourmodule.ko, your code should be in yourmodule.c and your Makefile
+should include
+
+obj-m := yourmodule.o
+
+If the code for your module is in multiple files that need to be
+linked, you need to tell the build system which files to compile. In
+the case of multiple files, none of these files can be named
+yourmodule.c because doing so would cause a problem with the linking
+step. Assuming your code exists in file1.c, file2.c, and file3.c and
+you want to build yourmodule.ko from them, your Makefile should
+include
+
+obj-m := yourmodule.o
+yourmodule-objs := file1.o file2.o file3.o
+
+Now for a final example to put it all together. Assuming the
+KERNEL_SOURCE environment variable is set to the directory where you
+compiled the kernel, a simple Makefile that builds yourmodule.ko as
+described above would look like
+
+# Tells the build system to build yourmodule.ko.
+obj-m := yourmodule.o
+
+# Tells the build system to build these object files and link them as
+# yourmodule.o, before building yourmodule.ko. This line can be left
+# out if all the code for your module is in one file, yourmodule.c. If
+# you are using multiple files, none of these files can be named
+# yourmodule.c.
+yourmodule-objs := file1.o file2.o file3.o
+# Invokes the kernel build system to come back to the current
+# directory and build yourmodule.ko.
+default:
+ make -C ${KERNEL_SOURCE} SUBDIRS=`pwd` modules
^ permalink raw reply [flat|nested] 4+ messages in thread
* 2.6.2 Compile Failure - Redhat 7.3 Distro
2004-02-07 22:21 [PATCH] 2.6.2 Documentation fix (Documentation/kbuild/modules.txt) Ryan Boder
@ 2004-02-07 23:00 ` Elikster
2004-02-07 23:31 ` Robert F Merrill
0 siblings, 1 reply; 4+ messages in thread
From: Elikster @ 2004-02-07 23:00 UTC (permalink / raw)
To: linux-kernel
Hello Folks,
It seems that the compile of 2.6.2 is sort of hit and miss depending on the configuration among various Redhat 7.3 distros with gcc 2.96 compiler. The most common miscompile usually shows up when it reaches this point here:
CC fs/proc/task_mmu.o
CC fs/proc/inode.o
CC fs/proc/root.o
CC fs/proc/base.o
CC fs/proc/generic.o
CC fs/proc/array.o
fs/proc/array.c: In function `proc_pid_stat':
fs/proc/array.c:398: Unrecognizable insn:
(insn/i 721 1009 1003 (parallel[
(set (reg:SI 0 eax)
(asm_operands ("") ("=a") 0[
(reg:DI 1 edx)
]
[
(asm_input:DI ("A"))
] ("include/linux/times.h") 38))
(set (reg:SI 1 edx)
(asm_operands ("") ("=d") 1[
(reg:DI 1 edx)
]
[
(asm_input:DI ("A"))
] ("include/linux/times.h") 38))
(clobber (reg:QI 19 dirflag))
(clobber (reg:QI 18 fpsr))
(clobber (reg:QI 17 flags))
] ) -1 (insn_list 715 (nil))
(nil))
fs/proc/array.c:398: confused by earlier errors, bailing out
make[2]: *** [fs/proc/array.o] Error 1
make[1]: *** [fs/proc] Error 2
make: *** [fs] Error 2
root@longmont [/usr/src/linux-2.6.2]#
Any ideas? I have 2 Redhat 7.3 compiled with no problem and some compiles with errors. It seems to be sort of hit and miss since they are all identical as far the distro goes, but with various hardware.
This error is coming up with this hardware specs as shown:
root@longmont [/usr/src/linux-2.6.2]# lspci
00:00.0 Host bridge: Intel Corp. e7500 [Plumas] DRAM Controller (rev 03)
00:00.1 Class ff00: Intel Corp. e7500 [Plumas] DRAM Controller Error Reporting (rev 03)
00:02.0 PCI bridge: Intel Corp. e7500 [Plumas] HI_B Virtual PCI Bridge (F0) (rev 03)
00:1d.0 USB Controller: Intel Corp. 82801CA/CAM USB (Hub (rev 02)
00:1d.1 USB Controller: Intel Corp. 82801CA/CAM USB (Hub (rev 02)
00:1d.2 USB Controller: Intel Corp. 82801CA/CAM USB (Hub (rev 02)
00:1e.0 PCI bridge: Intel Corp. 82801BA/CA/DB PCI Bridge (rev 42)
00:1f.0 ISA bridge: Intel Corp. 82801CA ISA Bridge (LPC) (rev 02)
00:1f.1 IDE interface: Intel Corp. 82801CA IDE U100 (rev 02)
00:1f.3 SMBus: Intel Corp. 82801CA/CAM SMBus (rev 02)
01:1c.0 PIC: Intel Corp. 82870P2 P64H2 I/OxAPIC (rev 03)
01:1d.0 PCI bridge: Intel Corp. 82870P2 P64H2 Hub PCI Bridge (rev 03)
01:1e.0 PIC: Intel Corp. 82870P2 P64H2 I/OxAPIC (rev 03)
01:1f.0 PCI bridge: Intel Corp. 82870P2 P64H2 Hub PCI Bridge (rev 03)
04:04.0 VGA compatible controller: ATI Technologies Inc Rage XL (rev 27)
04:05.0 Ethernet controller: Intel Corp. 82557/8/9 [Ethernet Pro 100] (rev 0d)
Got Dual Xeons 2.4 on it with 3Ware IDE RAID Controller.
--
Best regards,
Elikster mailto:elik@webspires.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 2.6.2 Compile Failure - Redhat 7.3 Distro
2004-02-07 23:00 ` 2.6.2 Compile Failure - Redhat 7.3 Distro Elikster
@ 2004-02-07 23:31 ` Robert F Merrill
2004-02-08 3:31 ` Re[2]: " Elikster
0 siblings, 1 reply; 4+ messages in thread
From: Robert F Merrill @ 2004-02-07 23:31 UTC (permalink / raw)
To: Elikster; +Cc: linux-kernel
Elikster wrote:
>fs/proc/array.c: In function `proc_pid_stat':
>fs/proc/array.c:398: Unrecognizable insn:
>(insn/i 721 1009 1003 (parallel[
> (set (reg:SI 0 eax)
> (asm_operands ("") ("=a") 0[
> (reg:DI 1 edx)
> ]
> [
> (asm_input:DI ("A"))
> ] ("include/linux/times.h") 38))
> (set (reg:SI 1 edx)
> (asm_operands ("") ("=d") 1[
> (reg:DI 1 edx)
> ]
> [
> (asm_input:DI ("A"))
> ] ("include/linux/times.h") 38))
> (clobber (reg:QI 19 dirflag))
> (clobber (reg:QI 18 fpsr))
> (clobber (reg:QI 17 flags))
> ] ) -1 (insn_list 715 (nil))
> (nil))
>fs/proc/array.c:398: confused by earlier errors, bailing out
>make[2]: *** [fs/proc/array.o] Error 1
>make[1]: *** [fs/proc] Error 2
>make: *** [fs] Error 2
>root@longmont [/usr/src/linux-2.6.2]#
>
>
>
ICE ICE baby!
Common Redhat GCC bug.
If gcc -v reports a big number starting with 2.96 (NOT .95),
it's probably broken.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re[2]: 2.6.2 Compile Failure - Redhat 7.3 Distro
2004-02-07 23:31 ` Robert F Merrill
@ 2004-02-08 3:31 ` Elikster
0 siblings, 0 replies; 4+ messages in thread
From: Elikster @ 2004-02-08 3:31 UTC (permalink / raw)
To: Robert F Merrill; +Cc: linux-kernel
Hello Robert,
Sighs...I guess I have to look at making new set of RPM packages for 7.3 Distros to upgrade the glibc, gcc and few other packages to have it updated to be able to compile the kernel.
Thanks.
Saturday, February 7, 2004, 4:31:25 PM, you wrote:
RFM> Elikster wrote:
>>fs/proc/array.c: In function `proc_pid_stat':
>>fs/proc/array.c:398: Unrecognizable insn:
>>(insn/i 721 1009 1003 (parallel[
>> (set (reg:SI 0 eax)
>> (asm_operands ("") ("=a") 0[
>> (reg:DI 1 edx)
>> ]
>> [
>> (asm_input:DI ("A"))
>> ] ("include/linux/times.h") 38))
>> (set (reg:SI 1 edx)
>> (asm_operands ("") ("=d") 1[
>> (reg:DI 1 edx)
>> ]
>> [
>> (asm_input:DI ("A"))
>> ] ("include/linux/times.h") 38))
>> (clobber (reg:QI 19 dirflag))
>> (clobber (reg:QI 18 fpsr))
>> (clobber (reg:QI 17 flags))
>> ] ) -1 (insn_list 715 (nil))
>> (nil))
>>fs/proc/array.c:398: confused by earlier errors, bailing out
>>make[2]: *** [fs/proc/array.o] Error 1
>>make[1]: *** [fs/proc] Error 2
>>make: *** [fs] Error 2
>>root@longmont [/usr/src/linux-2.6.2]#
>>
>>
>>
RFM> ICE ICE baby!
RFM> Common Redhat GCC bug.
RFM> If gcc -v reports a big number starting with 2.96 (NOT .95),
RFM> it's probably broken.
--
Best regards,
Elikster mailto:elik@webspires.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-02-08 3:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-07 22:21 [PATCH] 2.6.2 Documentation fix (Documentation/kbuild/modules.txt) Ryan Boder
2004-02-07 23:00 ` 2.6.2 Compile Failure - Redhat 7.3 Distro Elikster
2004-02-07 23:31 ` Robert F Merrill
2004-02-08 3:31 ` Re[2]: " Elikster
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox