changeset 23858:3dc4047f4d45

Adjust omnios loader brand following 13332
author Andy Fiddaman <omnios@citrus-it.co.uk>
date Wed, 02 Dec 2020 12:32:18 +0000
parents cd8d5fa54aae
children 444adcdf1e98
files usr/src/boot/sys/boot/forth/Makefile.inc usr/src/boot/sys/boot/forth/brand-omnios.4th usr/src/boot/sys/boot/forth/dragon.png usr/src/boot/sys/boot/forth/dragonf.png usr/src/boot/sys/boot/forth/fenix.png usr/src/boot/sys/boot/forth/logo-omnios.4th usr/src/boot/sys/boot/forth/ooce.png usr/src/boot/sys/boot/forth/support.4th usr/src/pkg/manifests/system-boot-loader.mf
diffstat 9 files changed, 94 insertions(+), 78 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/boot/sys/boot/forth/Makefile.inc	Wed Dec 02 11:56:16 2020 +0000
+++ b/usr/src/boot/sys/boot/forth/Makefile.inc	Wed Dec 02 12:32:18 2020 +0000
@@ -31,5 +31,4 @@
 # OOCE additions
 FILES +=	illumos-small.png
 FILES +=	ooce.png
-FILES +=	dragon.png
-FILES +=	dragonf.png
+FILES +=	fenix.png
--- a/usr/src/boot/sys/boot/forth/brand-omnios.4th	Wed Dec 02 11:56:16 2020 +0000
+++ b/usr/src/boot/sys/boot/forth/brand-omnios.4th	Wed Dec 02 12:32:18 2020 +0000
@@ -1,5 +1,5 @@
 \ Copyright (c) 2006-2015 Devin Teske <dteske@FreeBSD.org>
-\ Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
+\ Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
 \ All rights reserved.
 \
 \ Redistribution and use in source and binary forms, with or without
@@ -23,13 +23,13 @@
 \ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 \ SUCH DAMAGE.
 
-2 brandX ! 1 brandY ! \ Initialize brand placement defaults
+2 brandX ! 1 brandY ! \ Initialise brand placement defaults
 
 : brand+ ( x y c-addr/u -- x y' )
-	2swap 2dup at-xy 2swap \ position the cursor
-	[char] @ escc! \ replace @ with Esc
-	type \ print to the screen
-	1+ \ increase y for next time we're called
+	2swap 2dup at-xy 2swap	\ position the cursor
+	[char] @ escc!		\ replace @ with Esc
+	type			\ print to the screen
+	1+			\ increase y for next time we're called
 ;
 
 : asciitop ( x y -- x y' )
@@ -43,6 +43,21 @@
     s"              @[30;1medition@[0;33m \____/ |____/@[m "        brand+
 ;
 
+: graphtop ( x y -- x y )
+	pngdebug @
+	s" term-putimage" sfind if
+		>r
+		1 0 30 0	\ top left at (1,0), bottom right at (30,0)
+				\ the 0 preserves aspect ratio.
+	else
+		['] fb-putimage >r
+		30 20 0 0
+	then
+	s" /boot/ooce.png"
+	r> execute
+	invert if asciitop then	\ fall-back to ASCII version
+;
+
 : ooceversion ( -- )
 	s" ooce_version" getenv dup -1 = if
 		drop				\ ooce_version not set
@@ -55,9 +70,8 @@
 ;
 
 : brand ( x y -- )
-	\ Show the ASCII logo if the PNG logo was not shown
-	PNGLogo @ 0= if asciitop then
+	framebuffer? if graphtop else asciitop then
+	ooceversion
 	2drop
-	ooceversion
 ;
 
Binary file usr/src/boot/sys/boot/forth/dragon.png has changed
Binary file usr/src/boot/sys/boot/forth/dragonf.png has changed
Binary file usr/src/boot/sys/boot/forth/fenix.png has changed
--- a/usr/src/boot/sys/boot/forth/logo-omnios.4th	Wed Dec 02 11:56:16 2020 +0000
+++ b/usr/src/boot/sys/boot/forth/logo-omnios.4th	Wed Dec 02 12:32:18 2020 +0000
@@ -2,7 +2,7 @@
 \ Copyright (c) 2003 Aleksander Fafula <alex@fafula.com>
 \ Copyright (c) 2006-2015 Devin Teske <dteske@FreeBSD.org>
 \ Copyright 2017 Dominik Hassler <hadfl@cpan.org>
-\ Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
+\ Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
 \ All rights reserved.
 \
 \ Redistribution and use in source and binary forms, with or without
@@ -26,12 +26,12 @@
 \ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 \ SUCH DAMAGE.
 
-variable PNGLogo
-0 PNGLogo !
-
 51 logoX !
 2 logoY !
 
+variable pngdebug
+0 pngdebug !
+
 : logo+ ( x y c-addr/u -- x y' )
 	2swap 2dup at-xy 2swap	\ position the cursor
 	[char] @ escc!		\ replace @ with Esc
@@ -39,17 +39,14 @@
 	1+			\ increase y for next time we're called
 ;
 
-: menupos ( y -- )	\ Adjust menu position
-	dup 14 +	\ timeout is 14 lines below menu start
-	n2s s" loader_menu_timeout_y" setenv
-	n2s s" loader_menu_y" setenv
+: illumos_logo ( -- )
+	pngdebug @
+	0 0 0 0		\ bottom right, no scaling
+	s" /boot/illumos-small.png"
+	fb-putimage drop
 ;
 
-: ooce        0  30  20   0   0	s" /boot/ooce.png" fb-putimage ;
-: dragon      0 530  30   0   0	s" /boot/dragon.png" fb-putimage ;
-: illumos_png 0   0   0   0   0	s" /boot/illumos-small.png" fb-putimage ;
-
-: asciidragon ( x y -- x y' )
+: asciifenix ( x y -- x y' )
 	s"     @[30;1m.:   ..                 " logo+
 	s"    .o,  .o.                 "        logo+
 	s"    :d.  ld.   .'            "        logo+
@@ -75,26 +72,33 @@
 	s"             :ddddddl..cddo'@[m "     logo+
 ;
 
+: graphfenix ( x y -- x y )
+	s" term-putimage" sfind if
+		>r
+		2dup pngdebug @ -rot	( x y -- x y d x y )
+		0 26			\ end on row 26, keep aspect ratio
+	else
+		['] fb-putimage >r
+		pngdebug @
+		530 30 0 0
+	then
+	s" /boot/fenix.png"
+	r> execute
+	\ Fall-back to the ASCII version
+	invert if asciifenix then
+;
+
 : logo ( x y -- )
 	framebuffer? if
 		s" loader_font" set_font
-		clear
-		at-bl
-		ooce if
-			dragon drop
-			illumos_png drop
-			1 PNGLogo !
-			13 menupos
-			2drop
-			exit
-		then
+		clear at-bl
+		50 1 graphfenix 2drop
+		illumos_logo
+	else
+		asciifenix
 	then
 
-	0 PNGLogo !
-	11 menupos
-	asciidragon
 	at-bl
-
 	2drop
 ;
 
Binary file usr/src/boot/sys/boot/forth/ooce.png has changed
--- a/usr/src/boot/sys/boot/forth/support.4th	Wed Dec 02 11:56:16 2020 +0000
+++ b/usr/src/boot/sys/boot/forth/support.4th	Wed Dec 02 12:32:18 2020 +0000
@@ -1,5 +1,5 @@
 \ Copyright (c) 1999 Daniel C. Sobral <dcs@FreeBSD.org>
-\ Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
+\ Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
 \ All rights reserved.
 \
 \ Redistribution and use in source and binary forms, with or without
@@ -292,41 +292,6 @@
 	caddr free drop
 ;
 
-\ Set the screen resolution based on an environment variable.
-\ If the framebuffer is not active or the variable is not set, do nothing
-: set_resolution ( addr len -- )
-	framebuffer? if
-		getenv dup -1 = if
-			\ variable not set
-			drop
-		else
-			2dup
-			s" off" compare 0= if
-				1 framebuffer
-			else
-				s" set" 2 framebuffer
-			then
-		then
-	else
-		2drop
-	then
-;
-
-\ Set the screen font based on an environment variable.
-\ If the framebuffer is not active or the variable is not set, do nothing
-: set_font ( addr len -- )
-	framebuffer? if
-		getenv dup -1 = if
-			\ variable not set
-			drop
-		else
-			s" screen-font" setenv
-		then
-	else
-		2drop
-	then
-;
-
 \ Test if booted in an EFI environment
 : efi? ( -- flag )
 	s" efi-version" getenv?
@@ -388,6 +353,41 @@
 	s" screen-width" getenv?
 ;
 
+\ Set the screen resolution based on an environment variable.
+\ If the framebuffer is not active or the variable is not set, do nothing
+: set_resolution ( addr len -- )
+	framebuffer? if
+		getenv dup -1 = if
+			\ variable not set
+			drop
+		else
+			2dup
+			s" off" compare 0= if
+				1 framebuffer
+			else
+				s" set" 2 framebuffer
+			then
+		then
+	else
+		2drop
+	then
+;
+
+\ Set the screen font based on an environment variable.
+\ If the framebuffer is not active or the variable is not set, do nothing
+: set_font ( addr len -- )
+	framebuffer? if
+		getenv dup -1 = if
+			\ variable not set
+			drop
+		else
+			s" screen-font" setenv
+		then
+	else
+		2drop
+	then
+;
+
 \ Private definitions
 
 vocabulary support-functions
--- a/usr/src/pkg/manifests/system-boot-loader.mf	Wed Dec 02 11:56:16 2020 +0000
+++ b/usr/src/pkg/manifests/system-boot-loader.mf	Wed Dec 02 12:32:18 2020 +0000
@@ -21,7 +21,7 @@
 
 #
 # Copyright 2016, Toomas Soome <tsoome@me.com>
-# Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
+# Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
 #
 
 #
@@ -46,8 +46,7 @@
 $(i386_ONLY)dir path=usr/share/man/man5
 $(i386_ONLY)file path=boot/cdboot group=sys mode=0444
 $(i386_ONLY)file path=boot/defaults/loader.conf group=sys mode=0444
-$(i386_ONLY)file path=boot/dragon.png group=sys mode=0444
-$(i386_ONLY)file path=boot/dragonf.png group=sys mode=0444
+$(i386_ONLY)file path=boot/fenix.png group=sys mode=0444
 $(i386_ONLY)file path=boot/forth/beadm.4th group=sys mode=0444
 $(i386_ONLY)file path=boot/forth/beastie.4th group=sys mode=0444
 $(i386_ONLY)file path=boot/forth/brand-illumos.4th group=sys mode=0444
@@ -71,9 +70,9 @@
 $(i386_ONLY)file path=boot/forth/support.4th group=sys mode=0444
 $(i386_ONLY)file path=boot/forth/version.4th group=sys mode=0444
 $(i386_ONLY)file path=boot/gptzfsboot group=sys mode=0444
-$(i386_ONLY)file path=boot/illumos-small.png group=sys mode=0444
 $(i386_ONLY)file path=boot/illumos-brand.png group=sys mode=0444
 $(i386_ONLY)file path=boot/illumos-logo.png group=sys mode=0444
+$(i386_ONLY)file path=boot/illumos-small.png group=sys mode=0444
 $(i386_ONLY)file path=boot/isoboot group=sys mode=0444
 $(i386_ONLY)file path=boot/loader group=sys mode=0444
 $(i386_ONLY)file path=boot/loader.help group=sys mode=0444