iansjack wrote:
Try "help read" and "help write" at the grub2 terminal prompt.
Wow, that was quick! :> And indeed, these commands work. Thanks!
Too bad that they aren't documented on their website though
(And I'm so dumb that I didn't think about trying "help"
)
Hmm… The command line seems to work fine on my own pendrive with GRUB2 installed with "grub-install". But when I tried a couple of LiveUSB distros, they only display a "boot:" prompt that doesn't seem to recognize any of these commands (including "help"). Pressing the "C" key also doesn't work. Is there any way to launch the GRUB console from those? Or did they block it somehow?
hgoel wrote:
Funny coincidence that this gets posted now
What's the coincidence about?
hgoel wrote:
updated that bit in the article to say so
Great! One landmine disarmed
OK, so time for some bragging, for some context of why I needed this
I'm experimenting with a couple of different video chips I have on my machines, trying to make them listen and do some display detection, mode switching etc., to gather some intel that will come handy when writing video drivers.
I started with ATI/AMD Radeon Xpress RS690M that I had on one old HP laptop because I won't cry if I break it :q AMD chips are documented quite well, so it will be good for testing as well.
I got the MMIO ranges from
lspci, booted GRUB2 from a pendrive, and started using those commands for reading the values of different registers in order to see if they contain what the specs say. I managed to read some Vendor/Product IDs to confirm that I'm dealing with the right graphics chip, and then flipped some bits on the GPIO that turn on/off the panel backlight, and IT WORKED!
The display turned off, but when I typed in the command from memory (because I couldn't see anything), it turned on again and I could see what I typed
So yeah, first steps in talking directly to a real display hardware has been made
Now I'll need to figure out how to read the display's EDID info through that
GPIO_DDC_DATA_A pin
There's only one pin, so I guess that I'd have to read it bit by bit or something? :q
But that's another story, so I'll probably post a separate topic about that if I won't figure that out myself.