|You'll need outdoor grade cable. |
When measuring how much you'll need trace and measure the exact path (or as close as you can get to it) as it will not be a straight shot from A to B. Do not exceed the maximum segment length. In fact, I'd recommend not exceeding 85% of the maximum. I've found over 85% and you start to get attenuation.
I would recommend burying it inside some conduit. There are several varieties of plastic (PVC) products that will work for this.
You will want a SOHO Router at your end and if you want wifi in your loft, one that's wireless capable.
You'll need RJ45 ends (more than just two, chances are if you've never done it before you'll screw at least one up....maybe more) and a crimper. Also, you'll need to know either the A or B wiring standard (easily found on the web) and you'll want to test it too. Oh, and those blinking light testers are useless. I've seen those crappy things blink green on a cable that didn't work. Borrow a real tester if you can (test/certify) or just hire a professional to put the ends on and test it for you.
It matters not how straight the gate,
How charged with punishments the scroll,
I am the master of my fate;
I am the captain of my soul.