Good morning from France!
I've been tinkering with computers for years, and got some (basic, yet useful) skills. Recently, reading about the BIOS/EFI/UEFI standard, I discovered CoreBoot. I tried and succeeded in compiling and using CoreBoot on a QEmu virtual machine. But now, I want to go deeper again, and install it on a real machine. The computer I selected is an old laptop from 2005, a HP ze4111s (single-core 1.6Ghz 32-bit Intel Celeron, 512 Mb DDR RAM, ATI Radeon GPU, enough to run Raspbian OS Buster). The BIOS is password protected, but I am on my way to unlock it. I read the article "CoreBoot porting guide". I understood it. But I still need some help, and even if I do things right, I have no way to check it. And if I did wrong, I want to know it before making my computer irreversibly crashed. So where can I find help to go through the steps and check if everything is right? To teach me, in fact. Forums and tutorials are sometimes difficult to understand, unclear and/or unusable with other machines than te example one. The computer I talk about is not my only one, I'm not this much crazy.
Friendly,
Patrick Charon
P.-S.: this address is my "professional" address; my personal address patc@galaxyhit.com often goes to spam. But if you answer, please use this personal address!
Hi Patrick,
Welcome to coreboot and I hope you have a lot of fun with it!
Patrick Charon wrote:
But now, I want to go deeper again, and install it on a real machine. The computer I selected is an old laptop from 2005
This isn't a great way to start - I'd suggest to select a computer known to work with coreboot rather than whatever happens to be available, and especially not to select a laptop.
Making coreboot reliably work correctly on a previously unsupported laptop requires significant effort and can take between days and years (no joke) depending on a large number of factors, some of which are out of (y)our control.
If you do want to go ahead with that hardware then please start by constructing a workable development environment, because as you anticipate the first attempt is not likely to be successful.
At a bare minimum you need a way to recover from a non-booting system, ie. an external flash programmer.
P.-S.: this address is my "professional" address; my personal address patc@galaxyhit.com often goes to spam. But if you answer, please use this personal address!
List etiquette differs from list to list, on the coreboot list the rule is to be subscribed with the address you want to use and to not Cc: all thread participants in replies, I've done so anyway because of your request but please arrange for your desired address to be subscribed. Remember that your outbound messages are resent by the mailing list which should mitigate any bad reputation your mailhost might have.
Kind regards
//Peter
Hello Peter
Making coreboot reliably work correctly on a previously unsupported laptop requires significant effort and can take between days and years (no joke) depending on a large number of factors, some of which are out of (y)our control.
Can you elaborate on what factors determine whether setting up coreboot on a previously unsupported laptop takes days or years?
Brian Milliron wrote:
Can you elaborate on what factors determine whether setting up coreboot on a previously unsupported laptop takes days or years?
Mainboards are more or less modified reference designs for a given platform, where platform means the combination of Intel or AMD chips intended to be used together.
coreboot supports several or even many platforms, but not all, and more than likely the support for each platform covers only what is required for the supported mainboards using that platform.
If your platform is unsupported you have thousands of registers to study, most of which are either not at all or merely not correctly described in public documentation.
This case is the "years" end of the spectrum, when no source code and no usable documentation is publically available. I'd guess that this is actually still the common case, even though coreboot has good industry traction. (Many companies do use coreboot but not on all possible platforms.)
If your platform is supported to some degree but your specific mainboard is not then you have to understand the exact details of all differences between your mainboard and the general platform support in coreboot.
Maybe there is no code for things you require or maybe it's there but you must correctly describe how your hardware differs from a reference design or one particular supported mainboard.
Those differences are usually never well-documented, are never purposely published and are quite unlikely to ever leak. Leaked schematics can be helpful, but may not always suffice.
This means another pile of unknowns to first discover and then study in depth.
Once that's done, turn learned knowledge into working coreboot support for your mainboard.
There is tooling (in coreboot) to help with parts of the latter. Tools extract as much information as possible from a running system and try to automatically turn that into coreboot support.
The "days" end of the spectrum is when you are lucky and such tools can completely and accurately capture all required information for your hardware without requiring much learning.
Personal experience and background are further factors, someone with zero knowledge about hardware and zero interest to learn will likely fail no matter how much time they invest.
Zero knowledge with significant interest is a completely different story and can yield a successful world class coreboot developer. :)
There's no x86 firmware development "course", I think you have to just start doing it and teach yourself as you go.
Kind regards
//Peter
On 23.09.2021 17:34, Peter Stuge wrote:
Brian Milliron wrote:
Can you elaborate on what factors determine whether setting up coreboot on a previously unsupported laptop takes days or years?
Mainboards are more or less modified reference designs for a given platform, where platform means the combination of Intel or AMD chips intended to be used together.
coreboot supports several or even many platforms, but not all, and more than likely the support for each platform covers only what is required for the supported mainboards using that platform.
If your platform is unsupported you have thousands of registers to study, most of which are either not at all or merely not correctly described in public documentation.
This case is the "years" end of the spectrum, when no source code and no usable documentation is publically available. I'd guess that this is actually still the common case, even though coreboot has good industry traction. (Many companies do use coreboot but not on all possible platforms.)
If your platform is supported to some degree but your specific mainboard is not then you have to understand the exact details of all differences between your mainboard and the general platform support in coreboot.
Maybe there is no code for things you require or maybe it's there but you must correctly describe how your hardware differs from a reference design or one particular supported mainboard.
Those differences are usually never well-documented, are never purposely published and are quite unlikely to ever leak. Leaked schematics can be helpful, but may not always suffice.
This means another pile of unknowns to first discover and then study in depth.
Once that's done, turn learned knowledge into working coreboot support for your mainboard.
There is tooling (in coreboot) to help with parts of the latter. Tools extract as much information as possible from a running system and try to automatically turn that into coreboot support.
The "days" end of the spectrum is when you are lucky and such tools can completely and accurately capture all required information for your hardware without requiring much learning.
Personal experience and background are further factors, someone with zero knowledge about hardware and zero interest to learn will likely fail no matter how much time they invest.
Zero knowledge with significant interest is a completely different story and can yield a successful world class coreboot developer. :)
There's no x86 firmware development "course", I think you have to just start doing it and teach yourself as you go.
Actually, there is: [1], [2]. What is more, it's 100% free and much more classes are coming soon. We are working on hardware hands-on class currently [3]. We will be using the Dell OptiPlex 7010 here [4], which we added into the coreboot tree some time ago.
[1] https://p.ost2.fyi/ [2] https://p.ost2.fyi/courses/course-v1:OpenSecurityTraining2+Arch4031_x86-64_R... [3] https://p.ost2.fyi/courses/course-v1:OpenSecurityTraining2+Arch4032_coreboot... [4] https://3mdeb.com/shop/open-source-hardware/ost2-arch4032-minimum-configurat...
Kind regards
//Peter
Thanks Peter.
Brian Milliron wrote:
Can you elaborate on what factors determine whether setting up coreboot on a previously unsupported laptop takes days or years?
Mainboards are more or less modified reference designs for a given platform, where platform means the combination of Intel or AMD chips intended to be used together.
coreboot supports several or even many platforms, but not all, and more than likely the support for each platform covers only what is required for the supported mainboards using that platform.
I see an option for an Intel Cometlake reference board in the menuconfig. Does that mean the platform is supported?
If your platform is supported to some degree but your specific mainboard is not then you have to understand the exact details of all differences between your mainboard and the general platform support in coreboot.
Maybe there is no code for things you require or maybe it's there but you must correctly describe how your hardware differs from a reference design or one particular supported mainboard.
Those differences are usually never well-documented, are never purposely published and are quite unlikely to ever leak. Leaked schematics can be helpful, but may not always suffice.
This means another pile of unknowns to first discover and then study in depth.
It has previously been suggested to me to use the inteltool to get information about the GPIOs which I have done. Is this all that is needed or is there more? I ask because I have no access to proprietary board schematics or other documentation, just the tools I can find on github or in coreboot itself. If that isn't going to give me the info I need, I will need to return this laptop and get another.
Brian Milliron wrote:
coreboot supports several or even many platforms, but not all, and more than likely the support for each platform covers only what is required for the supported mainboards using that platform.
I see an option for an Intel Cometlake reference board in the menuconfig. Does that mean the platform is supported?
Yes, to some degree. I don't know the Cometlake code so can't comment on what degree that is. But in general it's a fairly good sign that the reference board is supported because those are not easy to get so whoever added that support might be quite motivated to contribute high quality, complete platform support. But no guarantee.
It has previously been suggested to me to use the inteltool to get information about the GPIOs which I have done. Is this all that is needed or is there more?
I don't know the Cometlake platform but in general you'll need more information, but if the platform is properly supported everything needed may still be in the realm of what is discoverable with a running system using factory firmware.
I ask because I have no access to proprietary board schematics or other documentation, just the tools I can find on github or in coreboot itself. If that isn't going to give me the info I need, I will need to return this laptop and get another.
Nod - I hope others can comment on Cometlake specifically, but the situation will be similar for most "mainstream" laptops - none of the traditional mainstream PC companies provide the information needed for coreboot work, that's always a challenge.
But again, you may be lucky and have a system where you can learn all required information from a running system. ACPI tables can help, maybe the tooling in coreboot can also help capture the details you need.
//Peter