-4

1) I learned writing bootloaders and tested it using bochs. Now, I want to add GUI to by bootloader. I have googled but didnt hit on relevant sources for that. I even tried searching github for existing projects. I checked out this question. But is there any way to install some graphics libraries or include x-window-system APIs in my code to give in a GUI env (e.g: Chameleon, GAG) instead of including just a splash image ?

2) Is there any possibility to add python execution environment during bootloader stage, so that when I step in protected mode, i could add some python scripts?

3) How to add standard C/C++ library support?

Thanks in advance.

Community
  • 1
  • 1
Srikanth Sharma
  • 1,509
  • 2
  • 15
  • 27

1 Answers1

-1

It might help if you told what kind of bootloader you're talking about. I work with this daily and most of what you're saying seems like crazy talk. LOL.

Usually bootloaders are very small startup program that takes a decision on what to load next. Some bootloaders contains features for "flashing" the main application. (The main app often cannot flash it self.) The bootloader being the first piece of code the processor meets, makes it very critical. You do not want it to fail nor upgrade it. Hence bootloaders tend to strive for smaller is better.

As for your questions.

3) I've never seen a bootloader not written in c. So it got that one covered. (They exist though) C++ you would have to compile the whole project with c++. (Not a problem.)

1) and 2) I'm not sure what "protected mode" is, but to include eg python or x-windows you would have to include the source into your project. Here's the thing. Usually bootloaders are baremetal code and code like X isn't. You'd have to include a whole lot of other code as well. And you'd end up with a bootloader at 500 mb. Usually you strive for something like 5 kb. The splash image is usually done through low level interaction with the graphic card.

If anyone else is interested in bootloader development, I can recommend to look at uboot. It's a linux (mostly) loader and is rather easy to find your way through. And it already supports a lot.

Illishar
  • 886
  • 1
  • 11
  • 24
  • Thanks for your time and response. I read about python integrated with Grub2. Thats why I asked. And moreover, I saw Chameleon and GAG GUI (as mentioned in question), which was very good. So wanted to know how it is done. – Srikanth Sharma Jun 11 '16 at 12:50