Re: Build error with latest git
From: S.ÃaÄlar Onur
Date: Mon Jul 16 2007 - 16:38:29 EST
[Adding needed CC's]
16 Tem 2007 Pts tarihinde, Larry Finger ÅunlarÄ yazmÄÅtÄ:
> Using the latest git pull (commit
> abce891a10559343d8ac9f79b46d78afdba63a40), I get the following linker
> error:
>
> block/built-in.o: In function `bsg_init':
> bsg.c:(.init.text+0x43d): undefined reference to `scsi_register_interface'
>
> This is on an x86_64 system with the following .config:
I've hit that also (current git cannot compiled with CONFIG_BLK_DEV_BSG=y
), if i'm not wrongly interpret the Makefile it seems a ordering issue;
Makefile
...
ifeq ($(KBUILD_EXTMOD),)
core-y  += kernel/ mm/ fs/ ipc/ security/ crypto/ block/
...
vmlinux-init := $(head-y) $(init-y)
vmlinux-main := $(core-y) $(libs-y) $(drivers-y) $(net-y)
...
but block block/bsg.c uses "scsi_register_interface" exported by
drivers/scsi/scsi_sysfs.c which lives in drivers-y. Moving bsg in
drivers/scsi seems solves this issues, see following
Signed-off-by: S.ÃaÄlar Onur <caglar@xxxxxxxxxxxxx>
block/Kconfig | 8 --------
block/Makefile | 1 -
drivers/scsi/Kconfig | 8 ++++++++
drivers/scsi/Makefile | 1 +
{block => drivers/scsi}/bsg.c | 0
5 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/block/Kconfig b/block/Kconfig
index 1d16b08..2859351 100644
--- a/block/Kconfig
+++ b/block/Kconfig
@@ -51,12 +51,4 @@ config LSF
endif # BLOCK
-config BLK_DEV_BSG
- bool "Block layer SG support"
- depends on SCSI && EXPERIMENTAL
- default y
- ---help---
- Saying Y here will enable generic SG (SCSI generic) v4
- support for any block device.
-
source block/Kconfig.iosched
diff --git a/block/Makefile b/block/Makefile
index 959feeb..4b84d0d 100644
--- a/block/Makefile
+++ b/block/Makefile
@@ -4,7 +4,6 @@
obj-$(CONFIG_BLOCK) := elevator.o ll_rw_blk.o ioctl.o genhd.o scsi_ioctl.o
-obj-$(CONFIG_BLK_DEV_BSG) += bsg.o
obj-$(CONFIG_IOSCHED_NOOP) += noop-iosched.o
obj-$(CONFIG_IOSCHED_AS) += as-iosched.o
obj-$(CONFIG_IOSCHED_DEADLINE) += deadline-iosched.o
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index 3727231..fbb06de 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -81,6 +81,14 @@ config BLK_DEV_SD
In this case, do not compile the driver for your SCSI host adapter
(below) as a module either.
+config BLK_DEV_BSG
+ bool "Block layer SG support"
+ depends on SCSI && EXPERIMENTAL
+ default y
+ ---help---
+ Saying Y here will enable generic SG (SCSI generic) v4
+ support for any block device.
+
config CHR_DEV_ST
tristate "SCSI tape support"
depends on SCSI
diff --git a/drivers/scsi/Makefile b/drivers/scsi/Makefile
index 0f86895..15de029 100644
--- a/drivers/scsi/Makefile
+++ b/drivers/scsi/Makefile
@@ -139,6 +139,7 @@ obj-$(CONFIG_CHR_DEV_ST) += st.o
obj-$(CONFIG_CHR_DEV_OSST) += osst.o
obj-$(CONFIG_BLK_DEV_SD) += sd_mod.o
obj-$(CONFIG_BLK_DEV_SR) += sr_mod.o
+obj-$(CONFIG_BLK_DEV_BSG) += bsg.o
obj-$(CONFIG_CHR_DEV_SG) += sg.o
obj-$(CONFIG_CHR_DEV_SCH) += ch.o
diff --git a/block/bsg.c b/drivers/scsi/bsg.c
similarity index 100%
rename from block/bsg.c
rename to drivers/scsi/bsg.c
Cheers
--
S.ÃaÄlar Onur <caglar@xxxxxxxxxxxxx>
http://cekirdek.pardus.org.tr/~caglar/
Linux is like living in a teepee. No Windows, no Gates and an Apache in house!
Attachment:
signature.asc
Description: This is a digitally signed message part.