I wrote one a while back for OpenSUSE (link), which you may have already run into during your googling. Since that's for an RPM-based distribution all the steps aren't 100% accurate.
What you want to do is entirely possible on Ubuntu. The first step is to get a local Kernel source-archive locally. That's extensively documented here. The key step is
sudo apt-get build-dep --no-install-recommends linux-image-$(uname -r)
apt-get source linux-image$(uname -r)
Which will get it locally. Read the whole thing for more on the details of compiling stuff for kernels.
From there, you need to pick up the LIO archive from the backports channel (see my link).
git clone git://linux-iscsi.org/lio-core-backports.git lio-core-backports.git
git clone git://git.kernel.org/pub/scm/linux/storage/lio/lio-utils lio-utils.git
Next step: prepare the kernel. Change-directory into the kernel source (most likely /usr/src/linux) and run the following pair of commands:
This will prep the kernel for compiling modules for your current kernel rev.
Next, change into the
lio-core-backports.git directory you created above and run:
Errors here are likely to due to the kernel archive not being prepped correctly. The last step here actually installs the modules. Now to install the utilities that make managing this easier.
Change into the
lio-utils.git directory and repeat the above commands.
You now have (probably) LIO-Target installed. Time to get your config file worked up. Once you've gotten to the point of figuring out how to get the config files tweaked just right, you already have the kernel modules installed and ready to roll.
Disclaimer: I am minimally familiar with how Ubuntu's package manager works, so the above apt-get stuff was pulled directly from documentation. Your actual commands may vary. Batteries not included.