Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
  • 0
Varscott11

Few questions about writing a uefi bios

Question

My ultimate plan is to create a more in depth bios with advanced interface that can be configured by the user and run from eeprom (Config file will be changed to support at least 64kb data)

 

1). Is it possible to have multiple files and folders on an eeprom with files that can talk to each other like libraries. If so how do I do this

2). Is it possible to have graphic interfaces on a bios that a user can interact with in the first place?

3). Do you need a specific function name like init() for the bios to start?

 

Thanks for any replies :)

Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 1
  • Solution

hello Varscott11

 

I recommend you have a look at the default lua bios using "flash -r bios.lua" to dump the contents from an eeprom to a file.

remember you only have 4KiB (4096 bytes) so it is not a lot of room for a program this is why the lua bios finds /init.lua on a hdd or floppy and loads the system from there.

As for your questions:

1) folders on an eeprom is not possible but libraries are although are more a bit of a hack as you have to combine all the files and possibly rework the code a bit e.g. libA.functionA would need to be loaded before where is will be called.

2) yes but you have to find the gpu and monitor first and you don't have access to any OpenOS libraries.

3) no you don't it runs the code like a lua file.

 

Hope this helps you and good luck.

Link to post
Share on other sites
  • 0

eeprom is not a filesystem, it is an eeprom

filesystems can create files via open

eeprom only has 2 data storage areas

> 1. eeprom.get() + eeprom.set() -- this is the code that is run by boot. it's like one large file

> 2. eeprom.getData() + eeprom.setData() -- this is a small data field meant to store persistent data like "which hard drive has the OS"

 

Graphics are done by the gpu component. In eeprom you could get the first gpu using:

local gpu = component.list("gpu")()

When that you can make all the gpu calls, see: http://ocdoc.cil.li/component:gpu

 

You do not need any special function name for the bios to start, the machine simply loads the string returned by component.eeprom.get() [ component.eeprom is an object that exists for convenience, made available by openos ]

if you are running OpenOS, you can edit the eeprom data directly:

-- assuming OpenOS shell
/home # edit /dev/eeprom

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.