swejis wrote: > OK, removed iscsi package. > > Compiled new package (added suse-parameters recommended from readme > file) > > make DEBUG_SCSI=1 KSRC=/usr/src/linux-2.6.25-rc9-17 KBUILD_OUTPUT=/usr/ > src/linux-obj/x86_64/default > > > Compilation complete Output file > ----------------------------------- ---------------- > Built iSCSI Open Interface module: kernel/scsi_transport_iscsi.ko > Built iSCSI library module: kernel/libiscsi.ko > Built iSCSI over TCP kernel module: kernel/iscsi_tcp.ko > Built iSCSI daemon: usr/iscsid > Built management application: usr/iscsiadm > > make DEBUG_SCSI=1 install > make -C kernel install_kernel > make[1]: Entering directory `/opt/src/open-iscsi-2.0-869.1.test1/ > kernel' > make[1]: *** No rule to make target `linux_2_6_', needed by > `kernel_check'. Stop. > make[1]: Leaving directory `/opt/src/open-iscsi-2.0-869.1.test1/ > kernel' > make: *** [install_kernel] Error 2 > > Am I doing something wrong? Do I have to prepare the kernel source > tree somehow? I just installed the sources. >
Apply the attached patch. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "open-iscsi" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/open-iscsi -~----------~----~----~----~------~----~------~--~---
--- Begin Message ---These are some Makefile updates to build on system without kernel-sources installed. And cleanups to have it build properly on SUSE systems. Signed-off-by: Hannes Reinecke <[EMAIL PROTECTED]> --- Makefile | 9 ++++++--- kernel/Makefile | 21 +++++++++++++++++---- usr/Makefile | 4 +++- 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 7661daa..e6dc435 100644 --- a/Makefile +++ b/Makefile @@ -32,9 +32,12 @@ all: @echo @echo "Compilation complete Output file" @echo "----------------------------------- ----------------" - @echo "Built iSCSI Open Interface module: kernel/scsi_transport_iscsi.ko" - @echo "Built iSCSI library module: kernel/libiscsi.ko" - @echo "Built iSCSI over TCP kernel module: kernel/iscsi_tcp.ko" + @if [ -f kernel/scsi_transport_iscsi.ko ] ; then \ + echo "Built iSCSI Open Interface module: kernel/scsi_transport_iscsi.ko"; fi + @if [ -f kernel/libiscsi.ko ] ; then \ + echo "Built iSCSI library module: kernel/libiscsi.ko"; fi + @if [ -f kernel/iscsi_tcp.ko ] ; then \ + echo "Built iSCSI over TCP kernel module: kernel/iscsi_tcp.ko"; fi @echo "Built iSCSI daemon: usr/iscsid" @echo "Built management application: usr/iscsiadm" @echo diff --git a/kernel/Makefile b/kernel/Makefile index 7281a60..8209473 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -32,11 +32,16 @@ V ?= 0 # eg to compile for a kernel that you aren't currently running KERNELRELEASE ?= $(shell uname -r) KSRC ?= /lib/modules/$(KERNELRELEASE)/build +KSRC := $(shell test -f $(KSRC)/Makefile || echo "") KBUILD_OUTPUT ?= # this is the basic Kbuild invocation, just append your make target KBUILD_BASE = +$(MAKE) -C $(KSRC) M=`pwd` KBUILD_OUTPUT=$(KBUILD_OUTPUT) $(KARCH) V=$(V) -all: kernel_check +all: kernel_src + +kernel_src: $(shell test -n "$(KSRC)" && echo has_kernel_src) + +has_kernel_src: kernel_check $(KBUILD_BASE) modules # ============ BEGIN code for kernel_check and source patching ================ @@ -59,9 +64,11 @@ cur_patched=cur_patched # check to see if code is unpatched unpatch_code=$(shell test -e $(cur_patched) && echo do_unpatch_code ) -KSUBLEVEL = $(shell cat $(KSRC)/Makefile | awk -F= '/^SUBLEVEL =/ {print $$2}' | \ +KSUBLEVEL = $(shell cat $(KSRC)/Makefile 2> /dev/null | awk -F= '/^SUBLEVEL =/ {print $$2}' | \ sed 's/^[ \t]*//;s/[ \t]*$$//') +KSUBLEVEL?=$(shell echo $(KERNELRELEASE) | sed -n 's/.\..\.\([[:digit:]]*\)\..*/\1/p') + KERNEL_TARGET=linux_2_6_$(KSUBLEVEL) kernel_check: $(KERNEL_TARGET) @@ -126,7 +133,11 @@ has_24_patch: $(24_patch) # ============ END code for kernel_check and source patching ================= -clean: $(unpatch_code) +clean: clean_kernel_src + +clean_kernel_src: $(shell test -n "$(KSRC)" && echo has_clean_kernel_src) + +has_clean_kernel_src: $(unpatch_code) $(KBUILD_BASE) clean rm -f Module.symvers @@ -165,7 +176,9 @@ ko = $(patsubst %.o,%.ko,$(obj-m)) $(ko): all # now the actual command -install_kernel: $(ko) +install_kernel: $(shell test -n "$(KSRC)" && echo install_kernel_obj); + +install_kernel_obj: $(ko) $(KBUILD_BASE) modules_install INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) INSTALL_MOD_PATH=$(INSTALL_MOD_PATH) dpkg_divert: diff --git a/usr/Makefile b/usr/Makefile index 358d62c..42a8788 100644 --- a/usr/Makefile +++ b/usr/Makefile @@ -7,9 +7,11 @@ OSNAME=$(shell uname -s) KERNELRELEASE ?= $(shell uname -r) KSRC ?= /lib/modules/$(KERNELRELEASE)/build -KSUBLEVEL=$(shell cat $(KSRC)/Makefile | awk -F= '/^SUBLEVEL =/ {print $$2}' | \ +KSUBLEVEL=$(shell cat $(KSRC)/Makefile 2> /dev/null | awk -F= '/^SUBLEVEL =/ {print $$2}' | \ sed 's/^[ \t]*//;s/[ \t]*$$//') +KSUBLEVEL?=$(shell echo $OSNAME | sed -n 's/.\..\.\([[:digit:]]*\)\..*/\1/p') + ifeq ($(OSNAME),Linux) ifeq ($(KSUBLEVEL),11) IPC_CFLAGS=-DNETLINK_ISCSI=12 -D_GNU_SOURCE -- 1.5.3.4 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "open-iscsi" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/open-iscsi -~----------~----~----~----~------~----~------~--~---
--- End Message ---
