From owner-freebsd-questions@FreeBSD.ORG Sat Feb 19 15:10:14 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 004F910656D4 for ; Sat, 19 Feb 2011 15:10:13 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3fd3:cd67:fafa:3d78]) by mx1.freebsd.org (Postfix) with ESMTP id 6372F8FC12 for ; Sat, 19 Feb 2011 15:10:13 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [81.187.76.163]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.4/8.14.4) with ESMTP id p1JFA986045631 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Sat, 19 Feb 2011 15:10:09 GMT (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: Sendmail DKIM Filter v2.8.3 smtp.infracaninophile.co.uk p1JFA986045631 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=infracaninophile.co.uk; s=201001-infracaninophile; t=1298128209; bh=BRuACJ07PpoGHZ9Bk1dBNZe0GOUB81j7ior96LaKH3U=; h=Message-ID:Date:From:MIME-Version:To:Subject:References: In-Reply-To:Content-Type:Cc:Content-Type:Date:From:In-Reply-To: Message-ID:Mime-Version:References:To; z=Message-ID:=20<4D5FDD4C.5050503@infracaninophile.co.uk>|Date:=20S at,=2019=20Feb=202011=2015:10:04=20+0000|From:=20Matthew=20Seaman= 20|User-Agent:=20Mozilla/5.0=20(M acintosh=3B=20U=3B=20Intel=20Mac=20OS=20X=2010.6=3B=20en-US=3B=20r v:1.9.2.13)=20Gecko/20101207=20Thunderbird/3.1.7|MIME-Version:=201 .0|To:=20freebsd-questions@freebsd.org|Subject:=20Re:=20Developing =20Embedded=20Network=20Device=20on=20FreeBSD|References:=20<7E0B1 096-3250-4B27-A541-61CA2E5F3F7B@gmail.com>|In-Reply-To:=20<7E0B109 6-3250-4B27-A541-61CA2E5F3F7B@gmail.com>|X-Enigmail-Version:=201.1 .1|OpenPGP:=20id=3D60AE908C|Content-Type:=20multipart/signed=3B=20 micalg=3Dpgp-sha1=3B=0D=0A=20protocol=3D"application/pgp-signature "=3B=0D=0A=20boundary=3D"------------enigC4235F5CD1091397FFBB6106" ; b=nYRALeutMD8Dm3QgLj6QMDJtz7TIOH4jnk7GMCgXcSHTj69JncYTMUGK2hyvrHdqY nVRB8G9pY60xIlAjn76DxuISVeb9rIR8z18CwIiWCacNliBzG8zvpvfhD3+i7sMlBJ arb7mFIye3DilaBrzufiOJuwdzAhdEpW0R6HDk44= Message-ID: <4D5FDD4C.5050503@infracaninophile.co.uk> Date: Sat, 19 Feb 2011 15:10:04 +0000 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <7E0B1096-3250-4B27-A541-61CA2E5F3F7B@gmail.com> In-Reply-To: <7E0B1096-3250-4B27-A541-61CA2E5F3F7B@gmail.com> X-Enigmail-Version: 1.1.1 OpenPGP: id=60AE908C Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigC4235F5CD1091397FFBB6106" X-Virus-Scanned: clamav-milter 0.96.5 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_FAIL autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on lucid-nonsense.infracaninophile.co.uk Subject: Re: Developing Embedded Network Device on FreeBSD X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Feb 2011 15:10:14 -0000 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--