Openboot is Sun's implementation of Open Firmware. So we should be able to share a lot of code with the PowerPC port. There are some differences however. Executable format ================= PowerPC uses COFF. Sparc uses a.out, which is a lot simpler. According to the spec, some fields should be zeroed out, but they say implementation may chose to allow other values, so a standard a.out file works as well. It used to be possible to generate one with objcopy, but support was removed, so we now use elf2aout (imported from FreeBSD). The file is first loaded at 4000, then relocated to its load address (we use 202000 and executed there) Openfirmware prompt =================== To get the prompt on display, use STOP+A at boot until you get the "ok" prompt. On some machines, if no keyboard is detected, the ROM will assume it is set up in headless mode, and will expect a BREAK+A on the serial port. STOP+N resets all variables to default values (in case you messed up input or output, for example). Useful commands =============== Disable autoboot to get to the openboot prompt and stop there ------------------------------------------------------------- setenv auto-boot? false Configuring for keyboard/framebuffer io --------------------------------------- setenv screen-#columns 160 setenv screen-#rows 49 setenv output-device screen:r1920x1080x60 setenv input-device keyboard Configuring openboot for serial port ------------------------------------ setenv ttya-mode 38400,8,n,1,- setenv output-device ttya setenv input-device ttya reset Boot from network ----------------- static ip: This currently works best, because rarp does not let the called binary know the IP address. We need the IP address if we want to mount the root filesystem using remote_disk server. boot net:192.168.1.2,somefile,192.168.1.89 The first IP is the server from which to download (using TFTP), the second is the client IP to use. Once the bootloader starts, it will detect that it is booted from network and look for a the remote_disk_server on the same machine. rarp: This needs a reverse ARP server (easy to setup on any Linux system). You need to list the MAC address of the SPARC machine in /etc/ethers on the server. The machine will get its IP, and will use TFTP to the server which replied, to get the boot file from there. boot net:,somefile (net is an alias to the network card and also sets the load address: /pci@1f,4000/network@1,1) dhcp: This needs a DHCP/BOOTP server configured to send the info about where to find the file to load and boot. boot net:dhcp Debugging --------- 202000 dis (disassemble starting at 202000 until next return instruction) 4000 1000 dump (dump 1000 bytes from address 4000) .registers (show global registers) .locals (show local/windowed registers) %pc dis (disassemble code being exectuted) ctrace (backtrace)