Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Simulated driver for Network Interface Adapter Post 302464687 by Corona688 on Wednesday 20th of October 2010 05:55:55 PM
Old 10-20-2010
netbeans? Isn't that java?

You're going to need to install gcc and your kernel source. I think you're going to be doing your work in a terminal, not any sort of IDE. Compiling code for the kernel is very different from compiling code for your system.

Following this tutorial I was able to create a do-nothing character driver, but had to modify their instructions slightly:

Code:
# from magazine
make -C /usr/src/kernel-source-2.6.8 M=pwd modules
# what I needed
make -C /usr/src/linux M=${pwd} modules

...what this is doing is telling make to use the makefile that came with your kernel (in my case stored in /usr/src/linux/Makefile) to compile your source, which spares you a lot of headaches. That M variable tells it where to find your own makefile once it's set up.

I think pwd vs ${pwd} was a typo in the magazine itself, but /usr/src/linux is just where my system keeps its kernel sources. Yours may be something else, or probably not even installed right now.

Note that a network driver is not a character driver. But I'd think they get built it the same way.

Last edited by Corona688; 10-20-2010 at 07:06 PM..
This User Gave Thanks to Corona688 For This Post:
 

10 More Discussions You Might Find Interesting

1. AIX

hacmp network adapter re-define

I have an LPAR in a P5 machine which has been setup in an HACMP cluster. The person who set it up allocated the wrong network adapter (en) to the persistent network. For the life of me I cannot find where I can re-assign this adapter. Anyone able to help me as I am tearing my hair out and do not... (1 Reply)
Discussion started by: johnf
1 Replies

2. AIX

change network adapter

hello i've need to change network adapter on machine H80 aix 4.3.3 hacmp ( ent0 ) what i need to do after the new adapter installed on the machine? thanks best regards ariec (1 Reply)
Discussion started by: ariec
1 Replies

3. AIX

How to active this network adapter?

When I configure two VIO Servers, VIOS1 used to ping its gateway, after I configured second VIOS2, VIOS1 cannpt ping its gateway, when I run this command: entstat -all ent#|grep -i priority Priority: 5 Active: False How to make Active to True? (1 Reply)
Discussion started by: rainbow_bean
1 Replies

4. UNIX for Dummies Questions & Answers

External Network Adapter for Solaris 10

Hi All, I am new here - this is my first post. I have installed Solaris 10 5/09 on my Dell M6300. The install went well, but the Dell's onboard network card is the Broadcom BCM5756ME Gigabit Ethernet - and sadly no Solaris driver exists for it. The Solaris 10 install just jumped by the... (1 Reply)
Discussion started by: soulmerchant
1 Replies

5. Programming

Compiling virtual network adapter driver problem (net_device struct)

Hi, I found on linuxgazette.net/93/bhaskaran.html page very useful sample of virtual driver (not connected to real hardware). I try to compile it with no effect. So: I got fresh Ubuntu 9.10 (kernel 2.6.31-14) My source is saved in networkAdapter.c file in /usr/src/myModules directory. I... (21 Replies)
Discussion started by: Chrisdot
21 Replies

6. UNIX and Linux Applications

Access to network interface (Mac-network)

Hi, I'm a italian student. For my thesis I develop a gateway with protocol 6lowpan. For that I must access to network interface to develope my personal stack based on standard 802.15.4. Can you help me? I need an explanation for that. (0 Replies)
Discussion started by: berny88
0 Replies

7. Hardware

Need Sun 10-Gigabit Ethernet Adapter CD or ixge driver

Hi, Does anybody have a "Sun 10-Gigabit Ethernet Adapter installation CD" or driver ixge for Sun 10-Gigabit Ethernet PCI-X adapter? I need it but can't find it anywhere. So if you know where I can download it or purchase it, please let me know. (Already tried Oracle's website, don't have it) ... (5 Replies)
Discussion started by: Lhao
5 Replies

8. Solaris

Attach Solaris 11.1 rwn driver to RaLink RT8200/8260 Wi Fi Adapter

I installed Solaris 11.1 on a X86 PC. It's working except for one glaring problem : I cannot get a driver attached to the RaLink RT2800 (Wi Fi Adapter). Can someone point me in the direction where " the correct" driver exists, or let me know how I can tell Solaris to attach the device to the... (1 Reply)
Discussion started by: JWH
1 Replies

9. UNIX for Dummies Questions & Answers

Adding a network interface to a bonded interface

I have a RHEL 5 system with a bonded interface configure using only one network port (eth0). So I have config file for ifcfg-bond0 and ifcfg-eth. I'd like to configure eth5 to be the second SLAVE in the bond. My question is, after I modify ifcfg-eth5, can I add eth5 to the bond0 interface without... (1 Reply)
Discussion started by: westmoreland
1 Replies

10. AIX

Misconfiguration detected Adapter interface name en 3 Adapter offset 0

Hi, We had a hardware problem with an IBM System p5 server, with AIX 5.2 We restore from a tape the last backup we had, but the server does not boot up as expected. The server try to mount some directories from a storage, but could not comunicate with them, we check the FC and everything is... (12 Replies)
Discussion started by: trevian3969
12 Replies
APT-SRC(1p)						User Contributed Perl Documentation					       APT-SRC(1p)

NAME
apt-src - manage debian source package trees SYNOPSIS
apt-src [options] command apt-src [options] install|remove pkg1 [pkg2 ...] apt-src location pkg DESCRIPTION
apt-src is a command line interface for downloading, installing, upgrading, and tracking debian source packages. It can be run as a normal user, or as root. Unlike binary packages, source packages are not installed into a canonical location. Instead, they are "installed" by unpacking their source tree into a directory, which can be anywhere you wish. A source package can be installed multiple times, in different locations. This program manages source packages installed in this way, and provides querying facilities to help find where a source package is installed. Unless the -h or --help option is given one of the commands below must be present. update Update the lists of available packages. Identical to apt-get update, really, and must be run as root in the default configuration. install Install the named source package or packages into the current directory. If a package in the current directory is already installed, it will attempt to upgrade it. This command will accept the names of binary packages, or source packages. Just like with apt-get install, you can prefix the name with =version or /release to specify what version to install or what release to take the source from. It will make sure that the build-dependencies of the source package are satisfied. If the --location option is given, the source package will be installed or upgraded into the given location instead of the current directory. If the --build option is given, each newly installed or upgraded package will be compiled. upgrade Upgrade all installed source packages, or, if the --location or --here options are used, update only source packages in the specified directory. If the --patch option is given (the default), apt-src will attempt to generate a patch containing any local changes made to the source package, and will apply this patch to the updated tree. This will allow your local changes to be preserved across package upgrades, but it may not always work, and you might sometimes have to merge in your changes by hand. If the --build option is given, each newly installed or upgraded package will be compiled. remove Remove the named source package or packages. The --location and --here options may be used to only remove packages in a particular directory. build Build the specified source or sources. If the source is not installed yet, it will first be installed. clean Clean the trees of the named source package or packages. The --location and --here options may be used to only clean packages in a par- ticular directory. import Use this option to let apt-src know about an existing, unpacked source tree. Besides the name under which it should be imported, you must specify the location of the source tree (with --location), and you may need to tell the version of the source (with --version). Don't expect the build command to work on this source, unless it has a debian/ directory. list With no other parameters, it will list all installed source packages; their status, and the directory they are installed in. If a pack- age's name is given, it will display only installed instances of that source package. If the --location or --here options are used, they will limit the list to packages in the specified directory. location Takes a single parameter; the name of a source package. If the package is installed, it will return the root of the package's source tree. This command can be used when you need to include files from another source package, or something like that. For example: -I`apt-src location pkg` version Takes a single parameter; the name of a source package. If the package is installed, it will return the version of the package that is installed. name Takes a single parameter; the name of a source package (may be specified with regexps). Returns the name of the source package installed matching that name, if any. OPTIONS
All command line options may be set using the configuration file, the descriptions indicate the configuration option to set. For boolean options you can override the defaults file by using something like -f-,--no-f, -f=no or several other variations. -h, --help Show this help text. -b, --build, --compile Build source packages after installing or upgrading them. Configuration Item: APT::Src::Compile. -i, --installdebs Install packages after building sources. Implies --build. Configuration Item: APT::Src::InstallDebs Note that if multiple packages are generated from a single source package, they will all be installed. -p, --patch Try to patch local changes into new source tree when upgrading. On by default, use --no-p to disable. Configuration Item: APT::Src::Patch. -l, --location Specify a directory; only operate on packages in that directory. Configuration Item: APT::Src::Location. -c, --cwd, --here Only operate on packages in the current directory. Configuration Item: APT::Src::Here. --upstream-version Only of use with the version command; makes it omit the debian version number from the version of the package output. -k, --keep-built Do not delete .debs and other built files after installing them with the --installdebs option. Configuration Item: APT::Src::KeepBuilt -n, --no-delete-source Do not delete source files when removing source package. Configuration Item: APT::Src:NoDeleteSource --version Specify a source tree version. Of use with the import command. -q, --quiet Direct all command output to /dev/null unless a command fails to run as expected. Configuration item: APT::Src::Quiet -t, --trace Output each command as it is run. Configuration item: APT::Src::Trace In addition to the above options, some less-used configuration items may only be specified in the config files, /etc/apt/apt.conf and ~/.apt-src/config. They are: APT::Src::BuildCommand The command to use to build a tree. Run in the tree to build, it defaults to "dpkg-buildpackage -b -us -uc", with "-rfakeroot" appended for non-root users. APT::Src::RootCommand The command to use if a non-root user needs to become root. This is used for, example, to satisfy build-deps. sudo is a good choice and the default. If you want to use su, you'll need to set it to "su -c". APT::Src::BuildDeps Controls whether apt-src makes sure a source package's build dependencies are installed when installing or upgrading it. Defaults to true, if you turn it off, packages may fail to build due to missing build dependencies. NOTE ON NAMES
You can use either binary package names, or source package names when installing a new source package. The rest of the time, when dealing with already installed packages, you currently have to use the source package names (this may later changes). However, you may use regexps as part of the names. ENVIRONMENT
This program sets APT_SRC_BUILD when it is building a package. EXAMPLES
To install the source to pine to /usr/src, build it, and install the resulting debs: apt-src install --location=/usr/src -i pine To track changes to said installed pine source package, and install debs whenever a new version comes out: apt-src install -i pine To install a local copy of package foo, which you are going to apply a local patch to: apt-src install foo cd foo-version patch <~/my-foo-patch apt-src build --installdebs foo To upgrade your local copy of foo, bringing your patch forward, and building and installing new debs: apt-src install -i foo To import the source tree in /usr/src/linux, which you unpacked from a ftp.kernel.org tarball (or from the kernel-source package) into apt-src, so it knows about it: apt-src import kernel --location=/usr/src/linux --version=2.4.18 In a debian/rules of a kernel module package that needs to figure out if it is being built by apt-src, and if so set the KVERS, KSRC. and KDREV variables that make-kpkg normally sets: ifdef APT_SRC_BUILD KDREV=$(shell apt-src version kernel(-source.*)?) KSRC=$(shell apt-src location kernel(-source.*)?) KVERS=$(shell apt-src name kernel(-source.*)? | sed s/kernel-source-//) endif FILES
/etc/apt/sources.list Locations to fetch packages from. ~/.apt-src/status apt-src's status file, lists installed packages. /etc/apt/apt.conf Global config file for apt-src (and apt). ~/.apt-src/config Per-user config file for apt-src. SEE ALSO
apt-get(8), sources.list(5), dpkg-source(1) AUTHOR
Copyright 2002 Joey Hess <joeyh@debian.org> This is free software; see the GNU General Public Licence version 2 or later for copying conditions. There is NO warranty. perl v5.8.8 2004-05-22 APT-SRC(1p)
All times are GMT -4. The time now is 09:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy