Re: Custom boot loader stub
Valery Ushakov <[email protected]> Fri, 24 Oct 2025 14:30:17 +0300
| Newsgroups | gmane.os.netbsd.ports.sparc64 |
|---|---|
| Message-ID | <[email protected]> |
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