Re: C code you would compile to run within GRUB2 (is that possible?) ...

2023-12-11 Thread Andrei Borzenkov
On Tue, Dec 12, 2023 at 7:57 AM Albretch Mueller wrote: > The way I am thinking about it is, if you were to sha*sum the file > and this value would be the same as a previous run, you would know > with almost total certainty that: > a) you are booting the same machine(s you had selected, know

Re: C code you would compile to run within GRUB2 (is that possible?) ...

2023-12-11 Thread Albretch Mueller
My exploratory question is based on the fact that I don't know if there is that possibility and on which stage there already is enough of an environment to run C code that was compiled using gcc on a regular Linux-based machine. Or, should assembly be used? I think C should be OK because

Re: C code you would compile to run within GRUB2 (is that possible?) ...

2023-12-11 Thread Randy Goldenberg
You say that your goal is to "run code" rather than add to grub itself, but what would be running at that stage of the boot process other than grub? On Mon, Dec 11, 2023 at 1:08 PM Albretch Mueller wrote: > The way I understand GRUB2, since it must read the BIOS' data, you > should be able to

Which kinds of UEFI + hardware do you use for your tests, would you recommend? ...

2023-12-11 Thread Albretch Mueller
I could imagine it should include SR 485 capabilities, CD and DVD ROMs, ... lbrtchx

C code you would compile to run within GRUB2 (is that possible?) ...

2023-12-11 Thread Albretch Mueller
The way I understand GRUB2, since it must read the BIOS' data, you should be able to run code resembling dmidecode, but what about, say running sha512sum on the binary file dumped by: dmidecode --dump-bin ...?, and parsing and noticing specific differences on the sections relating to different: