<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:12px"><pre id="yui_3_16_0_1_1418673676377_2369" style="" class="">Package: <iscsitarget-dkms><br>Version: <1.4.20.3+svn502-2><br><br>I am running debian wheezy on an odroid U3 device.  I have compile a kernel using the 3.8.13 sources from github.com/hardkernel as follows:<br><tt id="yui_3_16_0_1_1418673676377_2609" style="" class=""># git clone --depth 1 </tt><tt id="yui_3_16_0_1_1418673676377_3091" style="" class=""><a id="yui_3_16_0_1_1418673676377_3090" style="" class="" href="https://github.com/hardkernel/linux.git">https://github.com/hardkernel/linux.git</a></tt><tt id="yui_3_16_0_1_1418673676377_2610" style="" class=""> -b odroid-3.8.y linux-3.8.13-odroidu3</tt><br><br>The kernel works.<br><br>I manually downloaded the iscsitarget-dkms and iscsitarget debs from debian unstable<br>iscsitarget_1.4.20.3+svn502-2_armhf.deb<br>iscsitarget-dkms_1.4.20.3+svn502-2_all.deb<br>and installed them using dpkg.<br><br>I have created the build and source symlinks in /lib/modules/3.8.13-odroidu3 to point to /usr/sr/linux-3.8.13-odroidu3/<br><br>However dkms fails to build iscsitarget-dkms using:<br><br># dkms build -m iscsitarget -v 1.4.20.3+svn502<br><br>And the make log shows:<br>cat /var/lib/dkms/iscsitarget/1.4.20.3+svn502/build/make.log <br style="" class="">DKMS make.log for iscsitarget-1.4.20.3+svn502 for kernel 3.8.13-28-odroidu3 (armv7l)<br style="" class="">Sunday 14 December  11:00:39 AEST 2014<br style="" class="">make: Entering directory `/usr/src/linux-headers-3.8.13-28-odroidu3'<br style="" class="">  LD      /var/lib/dkms/iscsitarget/1.4.20.3+svn502/build/built-in.o<br style="" class="">  LD      /var/lib/dkms/iscsitarget/1.4.20.3+svn502/build/kernel/built-in.o<br style="" class="">  CC [M]  /var/lib/dkms/iscsitarget/1.4.20.3+svn502/build/kernel/tio.o<br style="" class="">In file included from include/linux/timex.h:65:0,<br style="" class="">                 from include/linux/sched.h:17,<br style="" class="">                 from include/linux/blkdev.h:4,<br style="" class="">                 from /var/lib/dkms/iscsitarget/1.4.20.3+svn502/build/kernel/iscsi.h:11,<br style="" class="">                 from /var/lib/dkms/iscsitarget/1.4.20.3+svn502/build/kernel/tio.c:7:<br style="" class="">/usr/src/linux-headers-3.8.13-28-odroidu3/arch/arm/include/asm/timex.h:18:24:
 fatal error: mach/timex.h: No such file or directory<br style="" class="">compilation terminated.<br style="" class="">make[2]: *** [/var/lib/dkms/iscsitarget/1.4.20.3+svn502/build/kernel/tio.o] Error 1<br style="" class="">make[1]: *** [/var/lib/dkms/iscsitarget/1.4.20.3+svn502/build/kernel] Error 2<br style="" class="">make: *** [_module_/var/lib/dkms/iscsitarget/1.4.20.3+svn502/build] Error 2<br style="" class="">make: Leaving directory `/usr/src/linux-headers-3.8.13-28-odroidu3'<br></pre><div dir="ltr" style="" class="" id="yui_3_16_0_1_1418673676377_2277">I have worked around this problem and got iscsitarget-dkms to compile by modifying  /usr/src/iscsitarget-1.4.20.3+svn502/dkms.conf</div><div id="yui_3_16_0_1_1418673676377_5788" dir="ltr" style="" class="">to have the patches compat-3.13.patch, compat-3.12.patch, and compat-3.9.patch apply which weren't applying.  I needed to change the PATCH_MATCH regexes and add some patches.  Here is what my dkms.conf file looks like now:</div><div id="yui_3_16_0_1_1418673676377_7606" dir="ltr" style="" class=""><br></div><div id="yui_3_16_0_1_1418673676377_6933" dir="ltr" style="" class="">PACKAGE_NAME="iscsitarget"<br style="" class="">PACKAGE_VERSION="1.4.20.3+svn502"<br style="" class="">MAKE[0]="make -C ${kernel_source_dir} M=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build"<br style="" class="">CLEAN="make -C ${kernel_source_dir} M=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build clean"<br style="" class="">AUTOINSTALL=yes<br style="" class="">BUILT_MODULE_NAME[0]="iscsi_trgt"<br style="" class="">BUILT_MODULE_LOCATION[0]="kernel/"<br style="" class="">DEST_MODULE_LOCATION[0]="/kernel/drivers/iscsi/"<br style="" class=""><br style="" class="">PATCH[0]="compat-3.13.patch"<br style="" class="">PATCH_MATCH[0]="(2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39)|3\.(0|1|2|3|4|5|6|7|8|9)\.*)"<br style="" class="">PATCH[1]="compat-3.12.patch"<br style="" class="">PATCH_MATCH[1]="(2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39)|3\.(0|1|2|3|4|5|6|7|8|9)\.*)"<br style="" class="">PATCH[2]="compat-3.9.patch"<br style="" class="">PATCH_MATCH[2]="(2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39)|3\.(0|1|2|3|4|5|6|7|8|9)\.*)"<br style="" class="">PATCH[3]="compat-3.6.patch"<br style="" class="">PATCH_MATCH[3]="(2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39)|3\.(0|1|2|3|4|5|6)\.0)"<br style="" class="">PATCH[4]="compat-3.5.patch"<br style="" class="">PATCH_MATCH[4]="(2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39)|3\.(0|1|2|3|4|5)\.0)"<br style="" class="">PATCH[5]="compat-3.2-3.4.patch"<br style="" class="">PATCH_MATCH[5]="(2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39)|3\.(0|1|2|3|4)\.0)"<br style="" class="">PATCH[6]="compat-2.6.39-3.2.patch"<br style="" class="">PATCH_MATCH[6]="(2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39)|3\.(0|1|2)\.0)"<br style="" class="">PATCH[7]="compat-2.6.38.patch"<br style="" class="">PATCH_MATCH[7]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38)"<br style="" class="">PATCH[8]="compat-2.6.36-2.6.37.patch"<br style="" class="">PATCH_MATCH[8]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37)"<br style="" class="">PATCH[9]="compat-2.6.33-2.6.35.patch"<br style="" class="">PATCH_MATCH[9]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35)"<br style="" class="">PATCH[10]="compat-2.6.32.patch"<br style="" class="">PATCH_MATCH[10]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32)"<br style="" class="">PATCH[11]="compat-2.6.31.patch"<br style="" class="">PATCH_MATCH[11]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)"<br style="" class="">PATCH[12]="compat-2.6.30.patch"<br style="" class="">PATCH_MATCH[12]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30)"<br style="" class="">PATCH[13]="compat-2.6.29.patch"<br style="" class="">PATCH_MATCH[13]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29)"<br style="" class="">PATCH[14]="compat-2.6.28.patch"<br style="" class="">PATCH_MATCH[14]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28)"<br style="" class="">PATCH[15]="compat-2.6.25-2.6.27.patch"<br style="" class="">PATCH_MATCH[15]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24|25|26|27)"<br style="" class="">PATCH[16]="compat-2.6.24.patch"<br style="" class="">PATCH_MATCH[16]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23|24)"<br style="" class="">PATCH[17]="compat-2.6.23.patch"<br style="" class="">PATCH_MATCH[17]="2\.6\.(9|14|15|16|17|18|19|20|21|22|23)"<br style="" class="">PATCH[18]="compat-2.6.22.patch"<br style="" class="">PATCH_MATCH[18]="2\.6\.(9|14|15|16|17|18|19|20|21|22)"<br style="" class="">PATCH[19]="compat-2.6.19-2.6.21.patch"<br style="" class="">PATCH_MATCH[19]="2\.6\.(9|14|15|16|17|18|19|20|21)"<br style="" class="">PATCH[20]="compat-2.6.14-2.6.18.patch"<br style="" class="">PATCH_MATCH[20]="2\.6\.(9|14|15|16|17|18)"<br style="" class="">PATCH[21]="compat-sles10sp2.patch"<br style="" class="">PATCH_MATCH[21]="2\.6\.16\.60-.*"<br style="" class="">PATCH[22]="compat-rhel4.patch"<br style="" class="">PATCH_MATCH[22]="2\.6\.9-.*\.(el|plus\.c4)"<br style="" class=""></div><div id="yui_3_16_0_1_1418673676377_8267" dir="ltr" style="" class=""><br></div><div id="yui_3_16_0_1_1418673676377_8268" dir="ltr" style="" class="">I also needed to modify the compat-3.13.patch by deleting the diff for Makefile leaving only the diff for kernel/block-io.c.  My /usr/src/iscsitarget-1.4.20.3+svn502/patches/compat-3.13.patch now looks like:</div><div id="yui_3_16_0_1_1418673676377_8938" dir="ltr" style="" class=""><br></div><div id="yui_3_16_0_1_1418673676377_9619" dir="ltr" style="" class="">diff --git b/kernel/block-io.c a/kernel/block-io.c<br style="" class="">index 00365b5..7c9ea21 100644<br style="" class="">--- b/kernel/block-io.c<br style="" class="">+++ a/kernel/block-io.c<br style="" class="">@@ -87,7 +87,7 @@ blockio_make_request(struct iet_volume *volume, struct tio *tio, int rw)<br style="" class="">         }<br style="" class=""> <br style="" class="">         /* bi_sector is ALWAYS in units of 512 bytes */<br style="" class="">-        bio->bi_iter.bi_sector = ppos >> 9;<br style="" class="">+        bio->bi_sector = ppos >> 9;<br style="" class="">         bio->bi_bdev = bio_data->bdev;<br style="" class="">         bio->bi_end_io = blockio_bio_endio;<br style="" class="">         bio->bi_private = tio_work;<br style="" class=""></div><div id="yui_3_16_0_1_1418673676377_10394" dir="ltr" style="" class=""><br></div><div id="yui_3_16_0_1_1418673676377_10395" dir="ltr" style="" class="">With these changes I was able to get iscsitarget-dkms to compile and install and it appears to work correctly.</div><div id="yui_3_16_0_1_1418673676377_10396" dir="ltr" style="" class="">I used these commands to compile and install iscsitarget-dkms:<br></div><div id="yui_3_16_0_1_1418673676377_10397" dir="ltr" style="" class=""># dkms build -m iscsitarget -v 1.4.20.3+svn502<br style="" class=""># dkms install -m iscsitarget -v 1.4.20.3+svn502</div><div id="yui_3_16_0_1_1418673676377_11183" dir="ltr" style="" class=""><br></div><div dir="ltr" style="" class="" id="yui_3_16_0_1_1418673676377_2277"> I am not sure if these problems have been caused by the kernel sources required for my odroid U3 device.  I have only used those supplied and recommened for the device.</div><div id="yui_3_16_0_1_1418673676377_14896" dir="ltr" style="" class="">However, I thought it could be a problem with the dkms.conf file in general affecting other systems and kernels.</div><div id="yui_3_16_0_1_1418673676377_14897" dir="ltr" style="" class=""><br></div><div id="yui_3_16_0_1_1418673676377_14900" dir="ltr" style="" class="">I am using Debian Wheezy on odroidU3.</div><div id="yui_3_16_0_1_1418673676377_15918" dir="ltr" style="" class=""># uname -a<br style="" class="">Linux odroidu3 3.8.13-odroidu3 #3 SMP PREEMPT Mon Dec 15 18:10:46 AEST 2014 armv7l GNU/Linux</div><div id="yui_3_16_0_1_1418673676377_15924" dir="ltr" style="" class=""># dpkg -s libc6 | grep ^Version<br style="" class="">Version: 2.13-38+deb7u6<br></div><div id="yui_3_16_0_1_1418673676377_15918" dir="ltr" style="" class=""><br style="" class=""></div></div></body></html>