Re: Q: How To Compile LIO target on PS3

126 views
Skip to first unread message

Nicholas A. Bellinger

unread,
Aug 22, 2009, 5:12:55 PM8/22/09
to Kay Wrobel, Linux-iSCSI.org Target Dev, LIO Users list
On Fri, 2009-08-21 at 16:10 -0500, Kay Wrobel wrote:
> Hi Nicholas,
>
> Sorry to intrude your email like this, but I was hoping you could help
> me or point me in the right direction. I would love to get LIO Target up
> and running on my PS3 to share the Blu-Ray drive to my Windows PC in my
> other room, and this project seems to be suited for that purpose. Though
> I read through the PS3 iSCSI/HD page at linux-iscsi.org, I find it hard
> to even understand where to start.
>
> Do you know of a concise tutorial on how to compile this for the PS3? Or
> maybe you can help me with step-by-step instructions? I'm running
> PSUbuntu 9.04 and have build-essential, module-assistant and
> kernel-headers for linux-headers-2.6.28-6-powerpc64-smp installed. But
> where to I take it from here? I just simply don't understand the very
> terse instructions on linux-iscsi.org.
>
> Can you help me please?
>

Hi Kay,

You will want to use the TCM/LIO ConfigFS 3.x kernel code from my git
tree for the Playstation3 (which means you need to compile and install
your own kernel+modules), as there is not an 'standalone' source package
for TCM/LIO ConfigFS 3.x kernel pieces available just yet.

That means you will want to follow these rough instructions:

http://linuxonps3.wordpress.com/2008/12/30/building-a-custom-kernel-for-ps3/

but instead of cloning from geoff's ps3 git repo, you want to clone from
my git tree instead:

git clone git://git.kernel.org/pub/scm/linux/kernel/git/nab/lio-core-2.6.git lio-core-2.6.git

which is currently at v2.6.31-rc5 and is running successfully on my own
PS3.

>From there, follow the same instructions from the link to setup the default
kernel config for the PS3/CBA: 'make ps3_defconfig'. Next, run 'make menuconfig'
(you need the libncurses-devel package for this) to enable the TCM, LIO and ConfigFS
modules to be built. Under Device Drivers, you want to build them as modules:

<M> Generic Target Core Engine and ConfigFS Infrastructure
<M> Linux-iSCSI.org iSCSI Target Mode Stack

Then save your changes and exit from the kernel config, and do a 'make' to build
everything. After a successful build, call 'make modules_install ; make install'
to install everything.

Finally, you need to add the new kernel entry for /boot/vmlinux-2.6.31-rc5 into the
bootloader, the link above they are using yaboot and /boot/etc/yaboot.conf, and on
my Fedora 8 installation they are using kboot and /etc/kboot.conf. I am not sure which
one that Ubuntu/PS3 is using, but that should not be hard to find on out. You can make it
(v2.6.31-rc5) the default boot kernel once you have it booting on your setup.

Once you are all set on the kernel side, go ahead and checkout the lio-utils.git source and
build and install, can find the instructions here:

http://linux-iscsi.org/index.php/Lio-utils

Once you have access to tcm_node, lio_node and /etc/init.d/target you should be ready to go,
have a look at:

http://linux-iscsi.org/index.php/Howto

for how to register Linux/SCSI subsystem devices with TCM using tcm_node --pscsi.

Next, use lio_node --addlun to create the Port/LUN (a configfs symlink mapping between
target_core_mod and iscsi_target_mod) your TCM/pSCSI object), which will also create the
iSCSI Target Endpoint w/ 'iscsi-name` for the iSCSI IQN Name (The combination of
IQN + TargetPortalGroupTag is what is referred to in the 3.x lio_node CLI as iSCSI Target
Endpoint)

Then add network portals using lio_node --addnp (IP Addresses for the iSCSI Initiators to
connect) and setup either demo mode operation for the iSCSI Endpoint (no Initiators ACLs,
probably the easiest for just a single TCM/pSCSI Port/LUN) or production module opteration
(explict Initiator ACLs, where you have to provide all of the iSCSI Initiators names who can
connect to which iSCSI Target Endpoint + Port/LUN), and finally calling lio_node --enable
$TARGETNAME $TARGETPORTALGROUPTAG to allow iSCSI Initiators to login.

This should be enough to get you going, also on the Howto wiki page, there is a link to the
reference manual which does not contain an TCM/pSCSI storage object example, but is might
still be useful to you:

http://linux-iscsi.org/builds/docs/LIO-3.0-Users_Reference_Manual.pdf

Good luck, and be sure to let us know your progress,

--nab

Btw, please feel free to join one or more of the lists at:

http://groups.google.com/group/linux-iscsi-target-dev
http://groups.google.com/group/linux-iscsi-target-users?lnk=srg


> Thank you so much,
>
> Kay
> --
> Kay Wrobel
> kwr...@letterboxes.org
>

Nicholas A. Bellinger

unread,
Aug 22, 2009, 5:17:29 PM8/22/09
to Kay Wrobel, Linux-iSCSI.org Target Dev, LIO Users list

Btw, once you have your TCM/LIO 3.x running the way you want it, make
sure to call 'tcm_dump --o' to overwrite the default configurations in
/etc/target/tcm_start.sh and /etc/target/lio_start.sh so that the
changes are saved across /etc/init.d/target restart.

Note that each time 'tcm_dump --o' is run, the current running
configuration will be saved into a timestamped file
in/etc/target/backup/, and then copied to the default configfs listed
above.

You can also call '/etc/init.d/target startbak <TIMESTAMP>' to startup a
non default configuration from /etc/target/backup/ for whatever reason.

--nab

Reply all
Reply to author
Forward
0 new messages