<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Compile &#8211; Harry Jackson</title>
	<atom:link href="http://127.0.0.1:8090/tag/compile/feed" rel="self" type="application/rss+xml" />
	<link>http://127.0.0.1:8090</link>
	<description>Parent, Painter, Programmer</description>
	<lastBuildDate>Tue, 30 Nov 2004 02:07:56 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>Compiling a single module for the 2.6 Kernel</title>
		<link>http://127.0.0.1:8090/compiling_a_single_module_for.htm</link>
					<comments>http://127.0.0.1:8090/compiling_a_single_module_for.htm#respond</comments>
		
		<dc:creator><![CDATA[harry]]></dc:creator>
		<pubDate>Tue, 30 Nov 2004 02:07:56 +0000</pubDate>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[Compile]]></category>
		<category><![CDATA[Kernel]]></category>
		<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">http://www.hjackson.org/wp/?p=218</guid>

					<description><![CDATA[This is relatively straight forward. I just recently installed a new network card to play around with and to see if I can make head or tail of the driver details so I need to make sure I have the driver for the card. I installed a NetGear F311, I had a couple of spares. &#8230; <p class="link-more"><a href="http://127.0.0.1:8090/compiling_a_single_module_for.htm" class="more-link">Continue reading<span class="screen-reader-text"> "Compiling a single module for the 2.6 Kernel"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>This is relatively straight forward. I just recently installed a new network card to play around with and to see if I can make head or tail of the driver details so I need to make sure I have the driver for the card.<br />
I installed a NetGear F311, I had a couple of spares. The driver for this card is the natsemi driver. To see if you have the source try the following.<br />
]$ locate natsemi<br />
/usr/src/kernel-source-2.6.5/drivers/net/natsemi.c<br />
/usr/src/kernel-source-2.6.5/include/config/natsemi.h<br />
There is no need to be the root user for any of this until you need to actually install the driver, I will tell you when <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" /><br />
Copy both these files to a directory of your choice. Then, in the same directory create a Makefile with the following text:<br />
1 obj-m   := natsemi.o<br />
2<br />
3 KDIR    := /lib/modules/$(shell uname -r)/build<br />
4 PWD     := $(shell pwd)<br />
5<br />
6 default:<br />
7     $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules<br />
save it and then execute the folloing command:<br />
]$ make<br />
Some text should whizz past detailing what it is doing. In the directory which you ran make in there should now be several new files<br />
natsemi.ko<br />
natsemi.mod.c<br />
natsemi.mod.o<br />
natsemi.o<br />
The one you are interested in is &#8220;natsemi.ko&#8221;. As the root user change to the directory containing the &#8220;natsemi.ko&#8221; file and run<br />
]$ insmod natsemi.ko<br />
If all goes well there should be no messages. To see if it loaded and to satisfy your curiosity try<br />
]$ lsmod<br />
natsemi                18976  0<br />
tulip                  36640  0<br />
crc32                   3840  2 natsemi,tulip<br />
af_packet              12552  4<br />
The above is what I have on mine<br />
To see if the card works (Debian) edit your<br />
/etc/network/interfaces<br />
file and add the following. Note that I already have a card installed using eth0 so I have chosen eth1 for this card<br />
11 iface eth1 inet static<br />
12     address 192.168.1.10<br />
13     netmask 255.255.255.0<br />
Then issue the command<br />
]$ ifup eth1<br />
]$ ping 192.168.1.10<br />
and you should now have the card working.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://127.0.0.1:8090/compiling_a_single_module_for.htm/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
