From owner-freebsd-small@FreeBSD.ORG Fri Sep 9 02:44:37 2005 Return-Path: X-Original-To: freebsd-small@freebsd.org Delivered-To: freebsd-small@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 53AD116A41F for ; Fri, 9 Sep 2005 02:44:37 +0000 (GMT) (envelope-from gnn@neville-neil.com) Received: from mrout2-b.corp.dcn.yahoo.com (mrout2-b.corp.dcn.yahoo.com [216.109.112.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD01C43D49 for ; Fri, 9 Sep 2005 02:44:36 +0000 (GMT) (envelope-from gnn@neville-neil.com) Received: from guest-157.lobby.yahoo.com.neville-neil.com (proxy8.corp.yahoo.com [216.145.48.13]) by mrout2-b.corp.dcn.yahoo.com (8.13.4/8.13.4/y.out) with ESMTP id j892iKWj012511; Thu, 8 Sep 2005 19:44:20 -0700 (PDT) Date: Thu, 08 Sep 2005 19:11:02 -0700 Message-ID: From: gnn@neville-neil.com To: Sandro Noel In-Reply-To: References: <20050908165951.GE31354@odin.ac.hmc.edu> User-Agent: Wanderlust/2.12.2 (99 Luftballons) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 Emacs/21.3.50 (powerpc-apple-darwin8.1.0) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: freebsd-small@freebsd.org Subject: Re: System Tree essentials UNDERSTANDING the system X-BeenThere: freebsd-small@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Sep 2005 02:44:37 -0000 At Thu, 8 Sep 2005 18:00:45 -0400, Sandro Noel wrote: > I've just had a look at it quickly, and i was going to propose > building a database to organize the information but this seems > right. It's not original to me, I have seen whole RTOSs shipped with the kernel APIs and docs in the code and then extracted by a similar method. > I was thinking of - let me know if you share this vue - organizing > the base system into features, something like Yes, that's correct approach. BTW You should use global and cscope to look around the kernel for the module declarations to get an idea of the system startup order. This is what I did to write the chapter on system startup in the latest "Design and Implementation" book. To find those tools just start at www.codespelunking.org Using the parts of the tools that allow you to "find all functions calling X" look for: SYSINIT which will get you lines like this: SYSINIT(domain_ ## name, SI_SUB_PROTO_DOMAIN, SI_ORDER_SECOND, net_add_domain, & name ## domain) This lets you know what is being started, the protocol domains, where it should go (SECOND), how it is started (net_add_domain()) etc. Until you understand the startup sequence you have very little chance of understanding the dependencies in the system. It is not perfect but it is a good overall start, at least in my opinion. We ought to generate a map somehow... Hmmm. Have to think about that. > now, i guess this brings a question, is it possible to devide the > system into smaller blocks like that, while still keeping it > functional. as an example. is it possible to boot the system to a > shell without any user files on the system. or any groups for that > matter. It is hard but not impossible. It requires something most of us hate, work ;-) Of course work is easier when shared. Later, George