18befcf7bSNathan Whitehorn#!/bin/sh 28befcf7bSNathan Whitehorn#- 38befcf7bSNathan Whitehorn# Copyright (c) 2017 Nathan Whitehorn 48befcf7bSNathan Whitehorn# All rights reserved. 58befcf7bSNathan Whitehorn# 68befcf7bSNathan Whitehorn# Redistribution and use in source and binary forms, with or without 78befcf7bSNathan Whitehorn# modification, are permitted provided that the following conditions 88befcf7bSNathan Whitehorn# are met: 98befcf7bSNathan Whitehorn# 1. Redistributions of source code must retain the above copyright 108befcf7bSNathan Whitehorn# notice, this list of conditions and the following disclaimer. 118befcf7bSNathan Whitehorn# 2. Redistributions in binary form must reproduce the above copyright 128befcf7bSNathan Whitehorn# notice, this list of conditions and the following disclaimer in the 138befcf7bSNathan Whitehorn# documentation and/or other materials provided with the distribution. 148befcf7bSNathan Whitehorn# 158befcf7bSNathan Whitehorn# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 168befcf7bSNathan Whitehorn# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 178befcf7bSNathan Whitehorn# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 188befcf7bSNathan Whitehorn# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 198befcf7bSNathan Whitehorn# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 208befcf7bSNathan Whitehorn# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 218befcf7bSNathan Whitehorn# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 228befcf7bSNathan Whitehorn# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 238befcf7bSNathan Whitehorn# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 248befcf7bSNathan Whitehorn# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 258befcf7bSNathan Whitehorn# SUCH DAMAGE. 268befcf7bSNathan Whitehorn# 278befcf7bSNathan Whitehorn# $FreeBSD$ 288befcf7bSNathan Whitehorn 298befcf7bSNathan Whitehornif [ `uname -m` == powerpc ]; then 308befcf7bSNathan Whitehorn platform=`sysctl -n hw.platform` 318befcf7bSNathan Whitehorn if [ "$platform" == ps3 -o "$platform" == powernv ]; then 328befcf7bSNathan Whitehorn rootpart=$(awk '{ if($2 == "/") printf("%s:%s\n", $3, $1); }' $PATH_FSTAB) 338befcf7bSNathan Whitehorn mkdir -p $BSDINSTALL_CHROOT/boot/etc/ 34*fdb600afSJustin Hibbits echo FreeBSD=\'/kernel/kernel kernelname=/boot/kernel/kernel vfs.root.mountfrom=${rootpart}\' > $BSDINSTALL_CHROOT/boot/etc/kboot.conf 358befcf7bSNathan Whitehorn fi 368befcf7bSNathan Whitehornfi 378befcf7bSNathan Whitehorn 388befcf7bSNathan Whitehorn# For new-style EFI booting, add code here 398befcf7bSNathan Whitehorn# Add boot0cfg for MBR BIOS booting? 408befcf7bSNathan Whitehorn 41