[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Embedded NETBSD Driver Devolpment
> I am new to NETBSD. I want to develop Device drivers for ARM
> processor. I have some queries regarding the same. Please help me:
I am assuming, here, that what you want to develop is NetBSD device
drivers for hardware that is targeted for an ARM-based machine.
(NetBSD already supports the ARM, so you don't need drivers for the ARM
processir itself, and, if the drivers aren't for NetBSD, I don't see
why you'd want to use NetBSD.)
> 1. What will be the devolpment environment on my desktop? Do i need
> to install NETBSD for i386, Linux or my windows will work fine?
Having a NetBSD machine to do some of the work on is...well, I hesitate
truly to call it essential, but it is so important it's pretty close to
that. (Actually, if you knew enough and had enough experience to avoid
needing it, you wouldn't be asking these questions, so you will
probably find it essential for you.)
It does not have to be your main desktop machine. It may help in some
respects, but if you want to continue to use Windows on your desktop
(for example, because that's what you're comfortable with) it should
work fine for the NetBSD machine to be a different one, or an emulated
machine (VMware or its ilk running on your desktop Windows).
It will probably help if you have an ARM machine running NetBSD. This
is not essential, probably not even for someone new to NetBSD, but it
is a substantial help. I'm working on some PowerPC hardware now, and
even though I've been playing with NetBSD for over a decade, I made
sure I had a PowerPC machine running NetBSD to work on.) This may or
may not be the same as the NetBSD install I mentioned above.
If your target ARM machine is already supported by NetBSD, I would
strongly recommend that you install NetBSD on it, as that will make
your test-debug cycle substantially more convenient. If your ARM
machine is not yet supported by NetBSD, this means you will have to do
a bringup as well. This is not a task for someone new to NetBSD; if
this is your situation, you will probably find it essential to spend
some time familiarizing yourself with NetBSD first, so that by the time
you start doing the bringup proper, you are no longer new to NetBSD.
If your hardware is for a commodity bus like PCI, you might find it
easier to develop the driver for a more common machine using the same
bus. NetBSD drivers are normally written in a fairly
hardware-independent way, so that (for example) the same driver
supports a given PCI Ethernet card in the same way on any NetBSD port
which supports PCI at all. If you pay proper attention to portability,
such as using the bus-space functions to talk to the hardware, your
driver should just work on your final platform as well. This is
especially mportant if you intend to contribute the resulting driver
back to NetBSD (so that, for example, people who buy the hardware will
find support is already present in NetBSD).
> 2. How to proceed for the same? i mean if NETBSD which release, if
> Windows or linux then how to start?
Again, it depends. If you are trying to develop something for a
particular version of NetBSD (for example, if you're building a set-top
box and have already picked a particular release for it), work with
that release on your NetBSD machine (whether or not it's your desktop).
If you want to run something else on your desktop, well, run whatever
you like. There really is no "how to start"; all of the work will be
editing source code, compiling it, and testing the resulting binaries
(well, plus things like reading documentation to figur eout what code
For editing, I'd recommend you use whatever text editor you're most
Compiling it is one reason I say you really want to have a NetBSD
machine around somewhere. If it's an ARM machine, you can use its
toolchain (compiler, linker, etc); if not, you will need to
cross-build, which is moderately well supported, but still is
substantially easier from NetBSD. If not NetBSD, at least another
POSIX system; cross-building from a non-POSIX system is, I gather,
pretty much "you're on your own"; I would not suggest you try that
unless you have a substantial amount of time you can invest in getting
used to NetBSD and its build tools first.
For testing, you pretty much have to have an instance of your target
platform. Running it in simulation, when possible (ie, when you have a
simulator), can get you most of the way there without risking damaging
hardware by doing something like accidentally configuring a clock
frequency wrong, but it's only as good as the simulation; I would never
consider something like that ready without trying it on the real
> 2. Is there any IDE for the same?
I doubt it, in the sense you probably mean it. Something like a recent
GNU emacs with a little care put into configuration amounts to much the
same thing; while it's not normally thought of as an IDE, I'm having
trouble defining the difference, except that the "IDE" is probably
substantially less flexible.
However, it's possible something of the sort exists and I just haven't
heard about it.
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse%rodents-montreal.org@localhost
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
Main Index |
Thread Index |