Browse Source

add fallback for autoconf

Waldemar Brodkorb 14 years ago
parent
commit
138f0238a8
3 changed files with 53 additions and 0 deletions
  1. 6 0
      scripts/autoconf
  2. 6 0
      scripts/autoreconf
  3. 41 0
      toolchain/kernel-headers/patches/scsi-header.patch

+ 6 - 0
scripts/autoconf

@@ -17,4 +17,10 @@ elif [ ! -z "$ac261" -a -x "$ac261" ];then
 	else
 		AUTOCONF_VERSION=2.61 /usr/local/bin/autoconf "$@"
 	fi
+else
+	if [ -x /usr/bin/autoconf ];then
+		/usr/bin/autoconf "$@"
+	else
+		/usr/local/bin/autoconf "$@"
+	fi
 fi

+ 6 - 0
scripts/autoreconf

@@ -29,4 +29,10 @@ elif [ ! -z "$ac261" -a -x "$ac261" ];then
 		AUTOCONF_VERSION=2.61 \
 			/usr/local/bin/autoreconf "$@"
 	fi
+else
+	if [ -x /usr/bin/autoreconf ];then
+		/usr/bin/autoreconf "$@"
+	else
+		/usr/local/bin/autoreconf "$@"
+	fi
 fi

+ 41 - 0
toolchain/kernel-headers/patches/scsi-header.patch

@@ -0,0 +1,41 @@
+diff -Nur linux-2.6.32.orig/include/scsi/Kbuild linux-2.6.32/include/scsi/Kbuild
+--- linux-2.6.32.orig/include/scsi/Kbuild	2009-12-03 04:51:21.000000000 +0100
++++ linux-2.6.32/include/scsi/Kbuild	2009-12-03 19:46:03.000000000 +0100
+@@ -1,3 +1,5 @@
++header-y += sg.h
++header-y += scsi_ioctl.h
+ header-y += scsi.h
+ header-y += scsi_netlink.h
+ header-y += scsi_netlink_fc.h
+diff -Nur linux-2.6.32.orig/include/scsi/scsi.h linux-2.6.32/include/scsi/scsi.h
+--- linux-2.6.32.orig/include/scsi/scsi.h	2009-12-03 04:51:21.000000000 +0100
++++ linux-2.6.32/include/scsi/scsi.h	2009-12-03 19:47:49.000000000 +0100
+@@ -143,6 +143,8 @@
+ 
+ #define SCSI_MAX_VARLEN_CDB_SIZE 260
+ 
++#ifdef __KERNEL__
++
+ /* defined in T10 SCSI Primary Commands-2 (SPC2) */
+ struct scsi_varlen_cdb_hdr {
+ 	u8 opcode;        /* opcode always == VARIABLE_LENGTH_CMD */
+@@ -169,6 +171,8 @@
+ 		scsi_varlen_cdb_length(cmnd) : COMMAND_SIZE(cmnd[0]);
+ }
+ 
++#endif
++
+ /*
+  *  SCSI Architecture Model (SAM) Status codes. Taken from SAM-3 draft
+  *  T10/1561-D Revision 4 Draft dated 7th November 2002.
+@@ -284,8 +288,10 @@
+ 	SCSI_PROTOCOL_UNSPEC = 0xf, /* No specific protocol */
+ };
+ 
++#ifdef __KERNEL__
+ /* Returns a human-readable name for the device */
+ extern const char * scsi_device_type(unsigned type);
++#endif
+ 
+ /*
+  * standard mode-select header prepended to all mode-select commands