From nobody Wed Dec 01 19:41:50 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id ADEE918C99FD; Wed, 1 Dec 2021 19:41:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J48by2zY1z4SYH; Wed, 1 Dec 2021 19:41:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 463E87C95; Wed, 1 Dec 2021 19:41:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1B1Jfo0i024075; Wed, 1 Dec 2021 19:41:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B1Jfo3I024074; Wed, 1 Dec 2021 19:41:50 GMT (envelope-from git) Date: Wed, 1 Dec 2021 19:41:50 GMT Message-Id: <202112011941.1B1Jfo3I024074@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alfredo Dal'Ava Junior" Subject: git: 060c97abb019 - stable/13 - powerpc64: make autoboot possible on powernv machines List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alfredo X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 060c97abb0192568ca6807d39ed822593c3f1459 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638387710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KEhzpZrF5PwE0/1CispvaYzV5zy/rLpsCEI49Y/RJtk=; b=DRDNlhLsUeitDy9B3IKOxIG1SECnrpKc7koaxjo/vomfTaZQetOma7f4gCRXPGMBmtDi/h bdrWEpgUp5qUvXj/N133sx2tnlXv/C5uFiTCYUOOZPMKyoKbPOcrHuHcwd96ERGtJ8buZ9 n5R6z0tBmMooriL1NNpCcHrxe9o/w1O4xQCCO9RKVHPjYGnXGrWtbaPalR/pwQIm2mriu/ p0txfJabpoyQ8uzMTFwVWXptJls2ybx88LnbeL1BWgPN31lgJl9yycwdMuUl7+x2kWgADc +VvM6/+OQoj8ZN9CrpM8LQOrFMf5cIW5bPxNiUGyBxuUE+7yA1n3NYGi0PYUeQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638387710; a=rsa-sha256; cv=none; b=NWJRRh9qrw6l+JeYrbH2rzqTYyljBjddpysvUsaa/REr3DBLdTfE8CSh6VPqKFS2Rm4oT4 Dlg2sDafIV4VFVNvNRiKRRCFLGHgfb6B6zdyxaZxrG7iRxYBfJhBnVfFFBp2qJ1XS85c1q ylwRiZHR5qZtwG9zujDM8Q8EculuA1Pz1RLh3LbLbI7J3kJEy6yv/iKScAnPuG54pHvkVy 1AsxXxKiggTwC4WGT6D03d9KHY7J7R/tFrWy/x69zAqv9vIX1PtVWOS3YWOea96XHmOhce W8tbuNPT/jLQGSpKvqRC3PJvVblyIPFX1m9T+NiykDIm22NYWjcsC6rt88u6PA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by alfredo: URL: https://cgit.FreeBSD.org/src/commit/?id=060c97abb0192568ca6807d39ed822593c3f1459 commit 060c97abb0192568ca6807d39ed822593c3f1459 Author: Alfredo Dal'Ava Junior AuthorDate: 2021-11-26 00:02:53 +0000 Commit: Alfredo Dal'Ava Junior CommitDate: 2021-12-01 22:41:49 +0000 powerpc64: make autoboot possible on powernv machines It's required to specify a default boot option in order to make petitboot's autoboot feature work. Tested on Raptor Blackbird Reviewed by: imp, luporl MFC after: 2 days Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D32838 (cherry picked from commit b6644f529ca4c13975727c5625415fcc30c60af6) --- usr.sbin/bsdinstall/scripts/bootconfig | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/bootconfig b/usr.sbin/bsdinstall/scripts/bootconfig index c0a0ff4f77ee..c5218b10a271 100755 --- a/usr.sbin/bsdinstall/scripts/bootconfig +++ b/usr.sbin/bsdinstall/scripts/bootconfig @@ -27,6 +27,9 @@ # # $FreeBSD$ + +FREEBSD_BOOTLABEL="FreeBSD" + BSDCFG_SHARE="/usr/share/bsdconfig" . $BSDCFG_SHARE/common.subr || exit 1 @@ -41,8 +44,10 @@ if [ `uname -m` == powerpc ]; then platform=`sysctl -n hw.platform` if [ "$platform" == ps3 -o "$platform" == powernv ]; then rootpart=$(awk '{ if($2 == "/") printf("%s:%s\n", $3, $1); }' $PATH_FSTAB) + kboot_conf=$BSDINSTALL_CHROOT/boot/etc/kboot.conf mkdir -p $BSDINSTALL_CHROOT/boot/etc/ - echo FreeBSD=\'/kernel/kernel kernelname=/boot/kernel/kernel vfs.root.mountfrom=${rootpart}\' > $BSDINSTALL_CHROOT/boot/etc/kboot.conf + echo default=$FREEBSD_BOOTLABEL > $kboot_conf + echo $FREEBSD_BOOTLABEL=\'/kernel/kernel kernelname=/boot/kernel/kernel vfs.root.mountfrom=${rootpart}\' >> $kboot_conf fi fi @@ -81,11 +86,9 @@ if [ -n "$(awk '{if ($2=="/boot/efi") printf("%s\n",$1);}' $PATH_FSTAB)" ]; then cp "$BSDINSTALL_CHROOT/boot/loader.efi" "${mntpt}/${BOOTNAME}" fi - bootlabel="FreeBSD" - if [ "$BSDINSTALL_CONFIGCURRENT" ]; then f_dprintf "Creating UEFI boot entry" - efibootmgr --create --activate --label "$bootlabel" --loader "${mntpt}/${FREEBSD_BOOTNAME}" > /dev/null + efibootmgr --create --activate --label "$FREEBSD_BOOTLABEL" --loader "${mntpt}/${FREEBSD_BOOTNAME}" > /dev/null fi f_dprintf "Finished configuring ESP"