Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Feb 2011 15:10:04 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        freebsd-questions@freebsd.org
Subject:   Re: Developing Embedded Network Device on FreeBSD
Message-ID:  <4D5FDD4C.5050503@infracaninophile.co.uk>
In-Reply-To: <7E0B1096-3250-4B27-A541-61CA2E5F3F7B@gmail.com>
References:  <7E0B1096-3250-4B27-A541-61CA2E5F3F7B@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigC4235F5CD1091397FFBB6106
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 19/02/2011 14:04, David wrote:
> I am new to FreeBSD development (I've done some work on NetBSD, but mos=
tly
> on Linux).
>=20
> I am developing a COTS-based network appliance. After doing my research=
, I've decided to
> use FreeBSD as my development platform. I would like to get my developm=
ent environment
> to the point where I can build a single ISO image that will contain OS =
and application
> ready to install. After reading through the handbook, porter's guide, a=
nd googling, I think I have
> a rough idea of how to do this, but I still have some gaps in how I set=
 this up.

Cool.  There's pretty good support for building custom install media in
FreeBSD -- see release(7) for starters.

> My current understanding is that all of the application specific, user =
land software should=20
> reside in the ports tree. I have two questions with respect to this:

They don't *have* to reside in the ports -- it's just that the
advantages of using ports are such that you'ld need a really compelling
reason not to.

Also, "using the ports" and "using packages" come to pretty much the
same thing in the end.  Ports are just a structure for building packages
-- and packages can be in two states: installed into your filesystem, or
collected together as a pkg tarball.

> 1. If I don't want to publish my software, how do I manage the source (=
do I just generate a tarball
> on my build machine and place it in DISTDIR?).

You can create private ports that you can manage yourself and that
integrate with the regular ports tree pretty easily.  In that case, you
should be able to build pre-compiled packages for your software which
you can include on your custom media.  It's trickier if you need several
custom ports with dependencies between them, but still doable.

For a simple custom port, you can create a directory containing a port
Makefile, pkg-descr, pkg-plist etc. etc. anywhere in your filesystem.
Follow the Porter's Handbook for creating your port
(http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/) --
the structure you need is identical to what you'ld write for a port
intended to be committed to the public ports tree.

> 2. How do I integrate a ports-based application with a "make release" s=
o that I can have my
> application binaries and dependancies included on the ISO ready for ins=
tallation?

This is a standard feature when building install media using 'make
release' -- you should even be able to set up a scripted sysinstall that
will do practically everything automatically, including installing your
custom packages.  Or check out the new bsdinstall stuff going into
current right about now.

> I'd greatly appreciate any pointers. I'm really looking forward to deve=
loping
> under FreeBSD, but just need a few pointers to get me started.

You'll find that FreeBSD documentation is rather more comprehensive than
is typical under Linux.  Just about everything has a man page, and the
Handbook and various other online publications are generally rated as
excellent.  Anything else, the FreeBSD mailing lists or forums can
usually be relied upon to provide answers about.  There are specialised
lists for most interesting topics.

	Cheers,

	Matthew


--=20
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
JID: matthew@infracaninophile.co.uk               Kent, CT11 9PW


--------------enigC4235F5CD1091397FFBB6106
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1f3VEACgkQ8Mjk52CukIyRogCglci4X8zcdLy5la0EGO1bIJmE
vc4An0S5qYQ6WIcWQRl9kbu633DDJA96
=h0WD
-----END PGP SIGNATURE-----

--------------enigC4235F5CD1091397FFBB6106--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D5FDD4C.5050503>