Port-sparc64 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Custom boot loader stub



On Thu, Oct 23, 2025 at 11:09:55 +0100, Sad Clouds wrote:

> The only issue I'm having is reading from stdin always returns -2.

$ grep -e -2 -B1 ./obp/dev/sun4v-devices/console/methods.fth
: read   ( adr len -- #read )
   ukey? 0=  if  2drop -2  exit  then		( adr len )

https://github.com/openbios/openboot/blob/1a08f436/obp/dev/sun4v-devices/console/methods.fth#L116

I.e. there's no data to be read.

From a quick look I'd venture a guess that you might want to use
poll-tty first, before calling read to read the data that you now know
is there.

-uwe


Home | Main Index | Thread Index | Old Index