|
NetBSD Developer Documentation:
Adding a new port
|
The following is intended to be a brief list of items that need to be
addressed when adding a new port to the NetBSD tree.
Note the new files should be added with "cvs add", not "cvs import".
Importing is for vendor branches, whereas this code is to intergrated
as part of NetBSD, and it's also one more needless tag on each
file.
Items that need to be addressed when adding new port
Important tasks once port is imported into the tree
Other related documents
Steps for those just starting out
-
- Try to find as much documentation as you can. Then try some more.
Contact the original vendor, and the vendors of major chips used
on the boards. Frequently the source for another vendor's OS
(even linux) can prove a useful resource.
- Copy the sys tree of a similar port.
- Setup a cross compiler on another NetBSD machine (something with
the same CPU would be ideal, but usually an i386 should be fine).
- Work out how to generate a binary understood by the boot loader.
If there is an existing OS on the target, you might be better
taking advantage of it.
- Try to build a standalone binary which can output to the console,
possibly using PROM drivers, or serial console. No need for VM.
- Build a kernel with memorydisk root.
- Add disk and network device support. It may be easier to start with
external cards for which MI drivers already exist in the NetBSD tree.
Items that need to be addressed when adding new port
-
Setting up cvs checkout-update-commit environment.
- Read
NetBSD CVS HOWTO.and setup CVS commitable environment.
- cvs checkout {htdocs,htutils,doc}.
-
Edit and commit information about your new port on www.NetBSD.org.
The .list format is useful for FAQ-style information (see the
htdocs documentation).
- Add details to htdocs/Changes/index.list and regenerate the .html file with make.
Add link from htdocs/index.html .
- Create htdocs/Ports/${MACHINE}/, add link from htdocs/index.html,
htdocs/Ports/history.html and htdocs/Ports/index.html .
You may want to include a copy of
this checklist and mark off items as completed.
- Add to tables in
- htutils/changes/changes2html
- htutils/changes/code-changes2xml
- htutils/changes/cvschanges2html
- Add to htdocs/developers/features/table and regenerate.
- Add your entry to htdocs/People/port-maintainers.html.
-
Add new port to the GNATS database. Update the pr-summary building machinery (if necessary).
-
- Create port-${MACHINE} mailing list. Send a request to admins over it.
- Add new port-${MACHINE} list to htdocs/MailingLists/index.m4. Regenerate with make.
- Create port-${MACHINE}-maintainer alias for the portmaster.
- Add portmaster to the port-masters mailing list.
- Add port-${MACHINE}-maintainer to bug-managers mailing list.
e.g. add port-hpcmips-maintainer to bug-managers.
- If the port uses a shared MACHINE_ARCH, add port-${MACHINE}-maintainer to the port-${MACHINE_ARCH}-maintainer mailing list,
e.g. add port-hpcmips-maintainer to port-mips-maintainer.
-
- Update port machinery in distrib/ to build snapshots and releases.
Have you /usr/src/distrib/${MACHINE}?
- Make snapshot.
See NetBSD Developer
Documentation: Release Engineering
- Make source tarballs. The /usr/src/distrib/sets/makesrctars script will help you.
- Create ftp.NetBSD.org:/pub/NetBSD/arch/${MACHINE}/snapshot/YYYYMMDD/ and put
the snapshot there.
-
- Add entry to doc/CHANGES.
- Add entry to build.sh.
- Add entry to share/tmac/doc-common and
src/distrib/notes/common/main.
- Add entry to src/share/man/man7/hier.7
- Add entry to src/sys/arch/README
- Add entry to src/usr.bin/calendar/calendars/calendar.netbsd
- Create sup set for new port
(current and release collection for src/sys/arch/${MACHINE}/,
and mirror collection for ftp.NetBSD.org:/pub/NetBSD/arch/${MACHINE}/).
Consult other developers.
Make sure doc/README.sup is also updated.
- Update tarball-building scripts to build tarball for new ${MACHINE}.
Consult other developers.
- Send email to <announce@NetBSD.org> and note the announcement on the WWW news page.
Important tasks once port is imported into the tree
-
- Keep adding hardware support
- Get sysinst running
- Produce formal releases
- Write a compat_<original_os>
Other related documents
-
Valeriy has some related papers on how to get started on a new port. Check them
out here.
(Contact us)
$NetBSD: new-port.html,v 1.37 2004/01/01 16:44:23 hubertf Exp $
Copyright © 1994-2003
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.