WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Which module supports Linux-IO Target  (Read 5157 times)

Offline qingquan

  • Newbie
  • *
  • Posts: 35
Which module supports Linux-IO Target
« on: January 06, 2023, 08:06:16 AM »
I want to set up an iscsi server
Who knows, please?
Which module supports Linux-IO Target.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11618
Re: Which module supports Linux-IO Target
« Reply #1 on: January 06, 2023, 09:48:11 AM »
Hi qingquan
Quote
The iSCSI target fabric is included since Linux 3.1.

The important kernel modules are target_core_mod and iscsi_target_mod, which should be in the kernel ...
Found here:
https://wiki.archlinux.org/title/ISCSI/LIO

That suggests the following kernel config options need to be enabled:
CONFIG_TARGET_CORE
https://cateee.net/lkddb/web-lkddb/TARGET_CORE.html
CONFIG_ISCSI_TARGET
https://cateee.net/lkddb/web-lkddb/ISCSI_TARGET.html

If you look at the kernel config:
http://tinycorelinux.net/12.x/x86_64/release/src/kernel/config-5.10.3-tinycore64
it shows:
Quote
# CONFIG_TARGET_CORE is not set
and  CONFIG_ISCSI_TARGET  does not exist since it requires  CONFIG_TARGET_CORE.

That means  Linux-IO Target  support is not included in your kernel.

Offline qingquan

  • Newbie
  • *
  • Posts: 35
Re: Which module supports Linux-IO Target
« Reply #2 on: January 06, 2023, 11:57:29 PM »
Hi Rich
Thank you for your reply. I have learned skills from it.

TinyCorePure64-12.0 Not supported Linux-IO Target.
 sorry to hear that,I'm not up to the task of recompiling the kernel.
 Is there any other way? For example, install a tcz.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14812
Re: Which module supports Linux-IO Target
« Reply #3 on: January 07, 2023, 02:55:46 AM »
You will need to re-compile the tinycore kernel - it's not difficult.

Offline qingquan

  • Newbie
  • *
  • Posts: 35
Re: Which module supports Linux-IO Target
« Reply #4 on: January 07, 2023, 03:14:08 AM »
Thanks to Juanito's encouragement, I downloaded the source code:
http://tinycorelinux.net/12.x/x86_64/release/src/kernel/linux-5.10.3-patched.txz
Next, how to get the source code,or how to set it up?

TARGET_CORE, ISCSI_TARGET,TCM_IBLOCK,TCM_FILEIO,TCM_PSCSI,TCM_USER

Thank you very much!

Offline qingquan

  • Newbie
  • *
  • Posts: 35
Re: Which module supports Linux-IO Target
« Reply #5 on: January 07, 2023, 03:48:43 AM »
Thanks to Juanito's encouragement, I downloaded the source code:
http://tinycorelinux.net/12.x/x86_64/release/src/kernel/linux-5.10.3-patched.txz
Next, how to get the source code,or how to set it up?

TARGET_CORE, ISCSI_TARGET,TCM_IBLOCK,TCM_FILEIO,TCM_PSCSI,TCM_USER

Thank you very much!
-------------------------------------------------------------------
https://cateee.net/sources/lkddb/lkddb-5.10-rc3.list
module target_core_file "TCM/FILEIO Subsystem Plugin for Linux/VFS" : CONFIG_TCM_FILEIO : drivers/target/Kconfig
module target_core_iblock "TCM/IBLOCK Subsystem Plugin for Linux/BLOCK" : CONFIG_TCM_IBLOCK : drivers/target/Kconfig
module target_core_mod "Generic Target Core Mod (TCM) and ConfigFS Infrastructure" : CONFIG_TARGET_CORE : drivers/target/Kconfig
module target_core_pscsi "TCM/pSCSI Subsystem Plugin for Linux/SCSI" : CONFIG_TCM_PSCSI : drivers/target/Kconfig
module target_core_user "TCM/USER Subsystem Plugin for Linux" : CONFIG_TCM_USER2 : drivers/target/Kconfig


Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14812
Re: Which module supports Linux-IO Target
« Reply #6 on: January 07, 2023, 03:49:16 AM »
You also need to download http://tinycorelinux.net/12.x/x86_64/release/src/kernel/config-5.10.3-tinycore64

Then:
Code: [Select]
tce-load -i compiletc perl5 ncursesw-dev bc glibc_apps elfutils-dev
cd linux-5.10.3
make mrproper
cp ../config-5.10.3-tinycore64 ./.config
make oldconfig
make menuconfig

..choose your new configuration options (set them as modules "m", then save and exit menuconfig

Then:
Code: [Select]
make
Once completed, you will need to copy the new vmlinuz and the new modules.

The new modules can used to create a new extension and the new vmlinuz will replace the existing tinycore vmlinuz64.

Offline qingquan

  • Newbie
  • *
  • Posts: 35
Re: Which module supports Linux-IO Target
« Reply #7 on: January 08, 2023, 12:42:12 AM »
Hi Juanito

Compiling in a "Linux partition" is a good choice
http://tinycorelinux.net/12.x/x86_64/release/src/kernel/linux-5.10.3-patched.txz
http://tinycorelinux.net/12.x/x86_64/release/src/kernel/config-5.10.3-tinycore64
Code: [Select]
tce-load -iw compiletc.tcz
tce-load -iw perl5.tcz
tce-load -iw ncursesw-dev.tcz
tce-load -iw bc.tcz
tce-load -iw glibc_apps.tcz
tce-load -iw elfutils-dev.tcz
tar -xvf linux-5.10.3-patched.txz
cd linux-5.10.3
make mrproper
cp ../config-5.10.3-tinycore64 ./.config
make oldconfig
make menuconfig
Choose what I need:TARGET CORE
Device Driver-- <M>  Generic Target Core Mod (TCM) and ConfigFS Infrastructure
<M>  TCM/IBLOCK Subsystem Plugin for Linux/BLOCK
<M>  TCM/FILEIO Subsystem Plugin for Linux/VFS
<M>  TCM/pSCSI Subsystem Plugin for Linux/SCSI
<M>  TCM/USER Subsystem  Plugin for Linux
<M>  TCM Virtual SAS target and Linux/SCSI LDD fabric loopback module
<M>  TCM FC fabric Plugin
<M>  Linux-iSCSI.org iSCSI Target Mode Stack
<M>        Chelsio iSCSI target offload driver
<M>  FireWire SBP-2 fabric module
[esc][esc]--[Save]
Code: [Select]
make
......
time: [2:56]  CPU:i5-4210Y SSD:intel S3700 200G RAM: 8G
Generate the following file:
Module.symvers                     1,197 KB
modules.builtin                           15 KB
modules.builtin.modinfo             113 KB
modules.order                            90 KB
System.map                          4,239 KB
vmlinux                               35,200 KB
vmlinux.o                            32,173 KB
vmlinux.symvers                      605 KB
----------------------------------------------
What should I do next? thank you!
« Last Edit: January 08, 2023, 12:50:29 AM by qingquan »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14812
Re: Which module supports Linux-IO Target
« Reply #8 on: January 08, 2023, 03:05:11 AM »
Your vmlinuz seems large - it should be +/- 5,500KB.

You need to search the source tree for the additional modules you created (named *.ko) and make them into an extension.

Offline qingquan

  • Newbie
  • *
  • Posts: 35
Re: Which module supports Linux-IO Target
« Reply #9 on: January 08, 2023, 03:59:48 AM »
I'll try to deal with the module(name*.ko).

My kernel compiled to vmlinux, not vmliunz.
Do you need to compress? "gzip" or "make zImage"

thanks.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14812
Re: Which module supports Linux-IO Target
« Reply #10 on: January 08, 2023, 05:02:36 AM »
How big is the file bzImage?

Offline qingquan

  • Newbie
  • *
  • Posts: 35
Re: Which module supports Linux-IO Target
« Reply #11 on: January 08, 2023, 05:46:56 AM »
Since it takes too long to compile, I didn't use it
"make bzImage" recompiles.
Not sure what file size this will give you.

I compressed vmlinux with winrar and got a file of 5,406 KB
Estimated compression should be at +/-5,400KB

What am I supposed to do now? Recompile it or gzip it?
« Last Edit: January 08, 2023, 05:50:10 AM by qingquan »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14812
Re: Which module supports Linux-IO Target
« Reply #12 on: January 08, 2023, 05:53:17 AM »
I asked because I have a feeling that we are using bzImage renamed to vmlinuz - @curaga can confirm.

Offline qingquan

  • Newbie
  • *
  • Posts: 35
Re: Which module supports Linux-IO Target
« Reply #13 on: January 08, 2023, 06:12:01 AM »
vmliunx -->vmliunz, what should I do? thanks.

vmliunx is a file generated with make and should not be compressed
« Last Edit: January 08, 2023, 06:15:28 AM by qingquan »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14812
Re: Which module supports Linux-IO Target
« Reply #14 on: January 08, 2023, 06:29:32 AM »
You can use bzImage directly or rename it to vmlinuz64 (with a "z") and replace the existing vmlinuz64.