Hi, all. I want to know how to compile iscsid with iscsi modules already built into the kernel.
I built a kernel with the following options selected in .config so that iscsi_tcp, libiscsi and scsi_transport_iscsi are built into the kernel. CONFIG_ISCSI_TCP=y I compiled iscsid shipped with open-iscsi-2.0-871 and run it. Then, I hit the following error and iscsid won't come up. Mar 23 04:58:03 ubuntu iscsid: Missing or Invalid version from /sys/module/scsi_transport_iscsi/version. Make sure a up to date scsi_transport_iscsi module is loaded and a up todate version of iscsid is running. Exiting... I understand that the error is telling that it can't read version of scsi_transport_iscsi from /sys/module directory. But, since my scsi_transport_iscsi is built into the kernel, there is no /sys/module/scsi_transport_iscsi direcotry. So, I removed the piece of codes in iscsid.c to avoid checking /sys/module/scsi_transport_iscsi/version to run iscsid. if (iscsi_sysfs_check_class_version()) { log_close(log_pid); exit(1); } However, I don't think removing the codes is not a correct way to build iscsid with iscsi modules already built into the kernel. Can anybody tell the correct way to make iscsid when iscsi modules are built into the kernel? Thanks, Kim ############################################################################################# Here is my system information. bash-3.2$ /sbin/iscsid -v iscsid version 2.0-871 bash-3.2$ uname -a Linux ubuntu 2.6.28.11-kgdb #1 SMP Sat Mar 20 13:57:02 PDT 2010 i686 GNU/Linux bash-3.2$ cat open-iscsi-2.0-871/usr/Makefile # This Makefile will work only with GNU make. OSNAME=$(shell uname -s) # allow users to override these # eg to compile for a kernel that you aren't currently running KERNELRELEASE ?= $(shell uname -r) KSRC ?= /lib/modules/$(KERNELRELEASE)/build KSUBLEVEL=$(shell cat $(KSRC)/Makefile | awk -F= '/^SUBLEVEL =/ {print $$2}' | \ sed 's/^[ \t]*//;s/[ \t]*$$//') ifeq ($(OSNAME),Linux) ifeq ($(KSUBLEVEL),11) IPC_CFLAGS=-DNETLINK_ISCSI=12 -D_GNU_SOURCE else ifeq ($(KSUBLEVEL),12) IPC_CFLAGS=-DNETLINK_ISCSI=12 -D_GNU_SOURCE else IPC_CFLAGS=-DNETLINK_ISCSI=8 -D_GNU_SOURCE endif endif IPC_OBJ=netlink.o else ifeq ($(OSNAME),FreeBSD) IPC_CFLAGS= IPC_OBJ=ioctl.o endif endif OPTFLAGS ?= -O2 -g WARNFLAGS ?= -Wall -Wstrict-prototypes CFLAGS += $(OPTFLAGS) $(WARNFLAGS) -I../include -I. -D$(OSNAME) $(IPC_CFLAGS) PROGRAMS = iscsid iscsiadm iscsistart # libc compat files SYSDEPS_SRCS = $(wildcard ../utils/sysdeps/*.o) # sources shared between iscsid, iscsiadm and iscsistart ISCSI_LIB_SRCS = util.o io.o auth.o login.o log.o md5.o sha1.o iface.o idbm.o sysfs.o host.o session_info.o iscsi_sysfs.o $(SYSDEPS_SRCS) # sources shared between iscsid and iscsiadm COMMON_SRCS = $(ISCSI_LIB_SRCS) # core initiator files INITIATOR_SRCS = initiator.o scsi.o actor.o event_poll.o mgmt_ipc.o isns.o \ cxgb3i.o transport.o # fw boot files FW_BOOT_SRCS = $(wildcard ../utils/fwparam_ibft/*.o) all: $(PROGRAMS) iscsid: $(COMMON_SRCS) $(IPC_OBJ) $(INITIATOR_SRCS) iscsid.o $(CC) $(CFLAGS) $^ -o $@ iscsiadm: $(COMMON_SRCS) $(FW_BOOT_SRCS) strings.o discovery.o iscsiadm.o $(CC) $(CFLAGS) $^ -o $@ iscsistart: $(IPC_OBJ) $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(FW_BOOT_SRCS) \ iscsistart.o statics.o $(CC) $(CFLAGS) -static $^ -o $@ clean: rm -f *.o $(PROGRAMS) .depend $(LIBSYS) depend: gcc $(CFLAGS) -M `ls *.c` > .depend -include .depend -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To post to this group, send email to open-is...@googlegroups.com. To unsubscribe from this group, send email to open-iscsi+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/open-iscsi?hl=en.