From nobody Thu Nov 25 21:10:14 2021 X-Original-To: dev-commits-src-main@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 963B618B638E; Thu, 25 Nov 2021 21:10:14 +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 4J0Vrk1gZ4z4XYk; Thu, 25 Nov 2021 21:10:14 +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 19A4824616; Thu, 25 Nov 2021 21:10:14 +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 1APLAEaL020731; Thu, 25 Nov 2021 21:10:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1APLAEj3020725; Thu, 25 Nov 2021 21:10:14 GMT (envelope-from git) Date: Thu, 25 Nov 2021 21:10:14 GMT Message-Id: <202111252110.1APLAEj3020725@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alfredo Dal'Ava Junior" Subject: git: b6644f529ca4 - main - powerpc64: make autoboot possible on powernv machines List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: b6644f529ca4c13975727c5625415fcc30c60af6 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637874614; 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=mCutRcKvCuq3vQABTYVp4rjLiVFvQLecfnnYuXQSquY=; b=VkLFqStp1pjB0TjIXxerIRrAsijqTqmXYvpNcpYKz5rMxxpx0BLFnnmgoAnHRh494ADL8j qKYBWE54I01bG0FWjG+8vO404f9hVXCiHrgwr2JmYQ3Ufr0nzuBTsp4z7F2J2FF7s9y7vB Fxk6DHz5JyVoaDRqNVVzP+6mjckwTRQHLWs9pwgLeq0jt+azGFWrucc6xxIjOsx8eqGfXC CzyOKqkq96WOShfbXI+JC3AnSzBQsmxh2fF38US0qgDwzCWbLXBTTeKRLTZJxQw6WEW7qD VjgYPVg3SdPS8gOIC6uUiY9qF9/fvmQvie8fXC2HQmQVKvLxtB/kJMuaogWGug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637874614; a=rsa-sha256; cv=none; b=uHKA1faKQ3c8DOQGKdbG6ziewZp7yRZaa3652O/N5lgGnHjj7H4Q9EmLKqQBH1dYv0IDF+ 9fVlU69d5HAjB+tKfy0g8rkpryUlzbEdkblcpQhcV1IwyM70p6peVhWj67IJPwviLNAMCy GztKcwY4eQzXqhn+7yjrkBBeeLghYdGwr4Ez4gHTptkEwIJDrKsgLIjEdljR0QIwun8B8j zGYc+rIj/QR0kb4AeMeemU7pDHYwKTB73elcxnRu6eIiZ9N1/XnT8DXvg4pbneeguSgyBB zV6smKm93KUWI20WxXtAbKz5asawEIb5pGPw/k+E09bA8ougvnCrEcX6YGfqWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by alfredo: URL: https://cgit.FreeBSD.org/src/commit/?id=b6644f529ca4c13975727c5625415fcc30c60af6 commit b6644f529ca4c13975727c5625415fcc30c60af6 Author: Alfredo Dal'Ava Junior AuthorDate: 2021-11-26 00:02:53 +0000 Commit: Alfredo Dal'Ava Junior CommitDate: 2021-11-26 00:02:53 +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 --- 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"