Skip to contentSkip to conversation

Makefile fix for ieee1394

PATCH New Andreas Bombe 3 participants 4 messages Jan 2, 2001 – Jan 5, 2001 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Makefile fix for ieee1394

Now that I've had the time to understand the new kernel makefile structure the patch Kai Germaschewski posted is indeed the correct fix (move include line up). Furthermore it builds an .o object in the static compiled case now. I don't see any reason to choose the .a format and most other drivers also do .o.

Signature · 42 lines
 Andreas E. Bombe <[email protected]>    DSA key 0x04880A44
http://home.pages.de/~andreas.bombe/    http://linux1394.sourceforge.net/


diff -ruN linux-2.4.orig/Makefile linux-2.4/Makefile
--- linux-2.4.orig/Makefile     Tue Jan  2 03:38:50 2001
+++ linux-2.4/Makefile  Tue Jan  2 05:12:36 2001
@@ -145,7 +145,7 @@
 DRIVERS-$(CONFIG_ATM) += drivers/atm/atm.o
 DRIVERS-$(CONFIG_IDE) += drivers/ide/idedriver.o
 DRIVERS-$(CONFIG_SCSI) += drivers/scsi/scsidrv.o
-DRIVERS-$(CONFIG_IEEE1394) += drivers/ieee1394/ieee1394.a
+DRIVERS-$(CONFIG_IEEE1394) += drivers/ieee1394/ieee1394drv.o
 
 ifneq ($(CONFIG_CD_NO_IDESCSI)$(CONFIG_BLK_DEV_IDECD)$(CONFIG_BLK_DEV_SR)$(CONFIG_PARIDE_PCD),)
 DRIVERS-y += drivers/cdrom/driver.o
diff -ruN linux-2.4.orig/drivers/ieee1394/Makefile linux-2.4/drivers/ieee1394/Makefile
--- linux-2.4.orig/drivers/ieee1394/Makefile    Tue Jan  2 03:38:59 2001
+++ linux-2.4/drivers/ieee1394/Makefile Tue Jan  2 05:12:38 2001
@@ -8,7 +8,7 @@
 # Note 2! The CFLAGS definitions are now in the main makefile.
 #
 
-L_TARGET := ieee1394.a
+O_TARGET = ieee1394drv.o
 
 export-objs := ieee1394_syms.o
 
@@ -23,7 +23,7 @@
 obj-$(CONFIG_IEEE1394_VIDEO1394) += video1394.o
 obj-$(CONFIG_IEEE1394_RAWIO) += raw1394.o
 
+include $(TOPDIR)/Rules.make
+
 ieee1394.o: $(ieee1394-objs)
        $(LD) -r -o $@ $(ieee1394-objs)
-
-include $(TOPDIR)/Rules.make
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
#1 lore raw

PATCH 1/1 fixed Makefile fix for ieee1394

Quoted 5 lines · Andreas Bombe

Now that I've had the time to understand the new kernel makefile structure the patch Kai Germaschewski posted is indeed the correct fix (move include line up). Furthermore it builds an .o object in the static compiled case now. I don't see any reason to choose the .a format and most other drivers also do .o.

The first patch had spaces where a tab should be and so failed to apply cleanly. This one with the trivial fix should work better (the O_TARGET is now also defined with ':=' ).

Makefile +1 -1
diff -ruN linux-2.4.orig/Makefile linux-2.4.linus/Makefile
@@ -145,7 +145,7 @@
 DRIVERS-$(CONFIG_ATM) += drivers/atm/atm.o
 DRIVERS-$(CONFIG_IDE) += drivers/ide/idedriver.o
 DRIVERS-$(CONFIG_SCSI) += drivers/scsi/scsidrv.o
-DRIVERS-$(CONFIG_IEEE1394) += drivers/ieee1394/ieee1394.a
+DRIVERS-$(CONFIG_IEEE1394) += drivers/ieee1394/ieee1394drv.o
 
 ifneq ($(CONFIG_CD_NO_IDESCSI)$(CONFIG_BLK_DEV_IDECD)$(CONFIG_BLK_DEV_SR)$(CONFIG_PARIDE_PCD),)
 DRIVERS-y += drivers/cdrom/driver.o
drivers/ieee1394/Makefile +3 -3
diff -ruN linux-2.4.orig/drivers/ieee1394/Makefile linux-2.4.linus/drivers/ieee1394/Makefile
@@ -8,7 +8,7 @@
 # Note 2! The CFLAGS definitions are now in the main makefile.
 #
 
-L_TARGET := ieee1394.a
+O_TARGET := ieee1394drv.o
 
 export-objs := ieee1394_syms.o
 
@@ -23,7 +23,7 @@
 obj-$(CONFIG_IEEE1394_VIDEO1394) += video1394.o
 obj-$(CONFIG_IEEE1394_RAWIO) += raw1394.o
 
+include $(TOPDIR)/Rules.make
+
 ieee1394.o: $(ieee1394-objs)
 	$(LD) -r -o $@ $(ieee1394-objs)
-
-include $(TOPDIR)/Rules.make
Signature · 6 lines
 Andreas E. Bombe <[email protected]>    DSA key 0x04880A44
http://home.pages.de/~andreas.bombe/    http://linux1394.sourceforge.net/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
#2 lore raw

IEEE1394 2.4.0 (final) compile problems

# IEEE 1394 (FireWire) support
#
CONFIG_IEEE1394=y
# CONFIG_IEEE1394_PCILYNX is not set
CONFIG_IEEE1394_OHCI1394=y
CONFIG_IEEE1394_VIDEO1394=y
CONFIG_IEEE1394_RAWIO=y
# CONFIG_IEEE1394_VERBOSEDEBUG is not set

gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe
-mpreferred-stack-boundary=2 -march=i686 -DEXPORT_SYMTAB -c
ieee1394_syms.c
ld -m elf_i386 -r -o ieee1394.o ieee1394_core.o ieee1394_transactions.o hosts.o highlevel.o csr.o guid.o ieee1394_syms.o
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe
-mpreferred-stack-boundary=2 -march=i686 -c -o ohci1394.o ohci1394.c
ohci1394.c:152: warning: `ohci1394_pci_tbl' defined but not used gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-f
rame-pointer -fno-strict-aliasing -pipe -mpreferred-stack-boundary=2 -march=i686

    -c -o video1394.o video1394.c

video1394.c:1229: warning: video1394_fops' defined but not used video1394.c:1239: warning: video1394_init' defined but not used video1394.c:1277: warning: `remove_card' defined but not used gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-f
rame-pointer -fno-strict-aliasing -pipe -mpreferred-stack-boundary=2 -march=i686

    -c -o raw1394.o raw1394.c

rm -f ieee1394drv.o
ld -m elf_i386 -r -o ieee1394drv.o ieee1394.o ohci1394.o video1394.o raw1394.o
video1394.o(.data+0x0): multiple definition of `ohci_csr_rom' ohci1394.o(.data+0x0): first defined here
make[3]: *** [ieee1394drv.o] Error 1
make[3]: Leaving directory `/usr/src/linux/drivers/ieee1394' make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/usr/src/linux/drivers/ieee1394' make[1]: *** [_subdir_ieee1394] Error 2
make[1]: Leaving directory `/usr/src/linux/drivers'
make: *** [_dir_drivers] Error 2
[root@thud linux]#

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#3 lore raw

Re: IEEE1394 2.4.0 (final) compile problems

In reply to Andreas Bombe
Quoted 2 lines · In article <[email protected]> you…

video1394.o(.data+0x0): multiple definition of `ohci_csr_rom' ohci1394.o(.data+0x0): first defined here

Known bug, fix attached below.

Greetings,
Arjan van de Ven

drivers/ieee1394/ohci1394.c renamed from mnt/kernel/clean/linuxprereleaseac5/drivers/ieee1394/ohci1394.c +74 -0
diff -urN /mnt/kernel/clean/linuxprereleaseac5/drivers/ieee1394/ohci1394.c linux/drivers/ieee1394/ohci1394.c
@@ -112,6 +112,80 @@
 #define DBGMSG(card, fmt, args...)
 #endif
 
+/* This structure is not properly initialized ... it is taken from
+   the lynx_csr_rom written by Andreas ... Some fields in the root
+   directory and the module dependent info needs to be modified
+   I do not have the proper doc */
+quadlet_t ohci_csr_rom[] = {
+        /* bus info block */
+        0x04040000, /* info/CRC length, CRC */
+        0x31333934, /* 1394 magic number */
+        0xf07da002, /* cyc_clk_acc = 125us, max_rec = 1024 */
+        0x00000000, /* vendor ID, chip ID high (written from card info) */
+        0x00000000, /* chip ID low (written from card info) */
+        /* root directory - FIXME */
+        0x00090000, /* CRC length, CRC */
+        0x03080028, /* vendor ID (Texas Instr.) */
+        0x81000009, /* offset to textual ID */
+        0x0c000200, /* node capabilities */
+        0x8d00000e, /* offset to unique ID */
+        0xc7000010, /* offset to module independent info */
+        0x04000000, /* module hardware version */
+        0x81000026, /* offset to textual ID */
+        0x09000000, /* node hardware version */
+        0x81000026, /* offset to textual ID */
+        /* module vendor ID textual */
+        0x00080000, /* CRC length, CRC */
+        0x00000000,
+        0x00000000,
+        0x54455841, /* "Texas Instruments" */
+        0x5320494e,
+        0x53545255,
+        0x4d454e54,
+        0x53000000,
+        /* node unique ID leaf */
+        0x00020000, /* CRC length, CRC */
+        0x08002856, /* vendor ID, chip ID high */
+        0x0000083E, /* chip ID low */
+        /* module dependent info - FIXME */
+        0x00060000, /* CRC length, CRC */
+        0xb8000006, /* ??? offset to module textual ID */
+        0x81000004, /* ??? textual descriptor */
+        0x00000000, /* SRAM size */
+        0x00000000, /* AUXRAM size */
+        0x00000000, /* AUX device */
+        /* module textual ID */
+        0x00050000, /* CRC length, CRC */
+        0x00000000,
+        0x00000000,
+        0x54534231, /* "TSB12LV22" */
+        0x324c5632,
+        0x32000000,
+        /* part number */
+        0x00060000, /* CRC length, CRC */
+        0x00000000,
+        0x00000000,
+        0x39383036, /* "9806000-0001" */
+        0x3030342d,
+        0x30303431,
+        0x20000001,
+        /* module hardware version textual */
+        0x00050000, /* CRC length, CRC */
+        0x00000000,
+        0x00000000,
+        0x5453424b, /* "TSBKOHCI403" */
+        0x4f484349,
+        0x34303300,
+        /* node hardware version textual */
+        0x00050000, /* CRC length, CRC */
+        0x00000000,
+        0x00000000,
+        0x54534234, /* "TSB41LV03" */
+        0x314c5630,
+        0x33000000
+};
+
+
 /* print general (card independent) information */
 #define PRINT_G(level, fmt, args...) \
 printk(level "ohci1394: " fmt "\n" , ## args)
drivers/ieee1394/ohci1394.h renamed from mnt/kernel/clean/linuxprereleaseac5/drivers/ieee1394/ohci1394.h +1 -68

75 lines not on this page · raw message

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/