From owner-p4-projects@FreeBSD.ORG Sun Nov 23 11:59:41 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9C4BE16A4D1; Sun, 23 Nov 2003 11:59:41 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6C5E716A4CE for ; Sun, 23 Nov 2003 11:59:41 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4B40E43FA3 for ; Sun, 23 Nov 2003 11:59:40 -0800 (PST) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id hANJxeXJ017646 for ; Sun, 23 Nov 2003 11:59:40 -0800 (PST) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id hANJxdSE017643 for perforce@freebsd.org; Sun, 23 Nov 2003 11:59:39 -0800 (PST) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 23 Nov 2003 11:59:39 -0800 (PST) Message-Id: <200311231959.hANJxdSE017643@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 42968 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2003 19:59:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=42968 Change 42968 by rwatson@rwatson_powerbook on 2003/11/23 11:58:55 Say a bit more about how to add a user to the SEBSD policy file. Wax poetic on the virtues of nvram and Open Firmware. Affected files ... .. //depot/projects/trustedbsd/sedarwin/bootstrap_instructions.txt#16 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin/bootstrap_instructions.txt#16 (text+ko) ==== @@ -195,10 +195,13 @@ (yes, this is just temporary!). When the policy is built, you end up with a policy.h file that will get copied into the XNU tree for the kernel build. - XXX: Add yourself to the user list! + Our sample policy file ships with three users: root, andrew, and rwatson. + Chances are, you'll want to add a line for your own user based on one of + those lines. cd policy make ; make install + cd .. Until we have this fixed, remember that when you change the policy, you need to re-install and remake the XNU kernel. @@ -211,6 +214,36 @@ cd apsl/xnu make + sudo cp BUILD/obj/RELEASE_PPC/mach_kernel /mach_kernel.sedarwin + sudo chown root:wheel /mach_kernel.sedarwin + sudo chmod 644 /mach_kernel.sedarwin + cd ../.. + + Once you have a new kernel in place, you'll need to use the nvram + command to set that kernel as the active kernel by modifying the + bootfile variable: + + % nvram -p | grep boot + boot-script + boot-file + boot-command mac-boot + boot-args + boot-device mac-io/ata-4@1f000/@0:5,\\:tbxi + auto-boot? true + boot-screen + % sudo nvram boot-file=mac-io/ata-4@1f00/@0:5,/mach_kernel.sedarwin + + Note that the boot-file variable consists if {bootdevice},{filename}, + and that the bootdevice is extracted from the more confusing + boot-device OF variable as found above. + + As a quick note here: next time you boot, Open Firmware will boot + /mach_kernel.sedarwin. You can reset it using the nvram command, or + on boot you can press Command-Option-O-F to interactively set OF + variables, or press Command-Option-P-R to clear the PRAM in the event + of serious problems. Finally, you may want to set the boot-args flag + to "-v" to get a text-based boot with console messages, rather than the + pretty but less informative Apple logo, etc. Step 10: Build, Install "Libkvm"