Booting Bare Hardware
Booting a computer is always more complex than one wants to think. On the PC side, it looks as if BIOS finally is retired and replaced by EFI (I wonder which was the last OS to use BIOS for anything that just loading a secondary bootloader). On Mac, EFI has been around for a while. On embedded Linux systems, however, u-boot has been a big player for a long time.
U-boot, or das U-boot, from DENX provides many useful features: networking, basic scripting, FLASH handling and more—all the tools that your average embedded systems engineer relies on to boot, to update and to troubleshoot.
As with all software, it reaches a point where the support for existing platforms grows so large that it motivates a fresh start. Enter Barebox.
Barebox, formerly known as u-boot-v2, is a bootloader with the same goals and ambitions as u-boot, but with a new, more Linuxish, approach. This means having files, a basic shell, file system support and a driver model borrowed from Linux.
Other improvements are that the bootloader can be built as a userspace application for Linux - making it easier to develop and debug. Overall, Barebox moves u-boot away from legacy holding it back, and towards Linux to enable sharing of code and knowledge.
So, how does a Barebox session look? To an end-user, hopefully, it does not show at all. To a developer, the serial port reveals the truth.
Hit any key to stop autoboot: 2
Hitting that key, gives you a prompt:
uboot:/
And an environment:
uboot:/ ls . .. dev env
As in Linux, the dev directory contains the devices of the system. For instance, the mem device represents the memory of the computer.
Back in u-boot, there was a specific md command to show the contents of the memory. It basically looked in the memory and displayed the information. In Barebox, the same utility is implemented using a more POSIX like approach. The /dev/mem device is opened, the address is passed to lseek and the information is read. This not only improves code structure, it means that the same md command can be applied to other devices, for instance flash memories.
If you want to test this boot loader there are a few ways to go about it. First, you can download and build it for the sandbox platform. This creates a Linux userspace application that you can use for testing.
For the braver readers, it is possible to boot Barebox on a number of boards. For my part, I will try it on a BeagleBoard and an old PC.
Johan Thelin is a consultant working with Qt, embedded and free
software. On-line, he is known as e8johan.
Today’s modular x86 servers are compute-centric, designed as a least common denominator to support a wide range of IT workloads. Those generic, virtualized IT workloads have much different resource optimization requirements than hyperscale and cloud applications. They have resulted in a “one size fits all” enterprise IT architecture that is not optimized for a specific set of IT workloads, and especially not emerging hyperscale workloads, such as web applications, big data, and object storage. In this report, you will learn how shifting the focus from traditional compute-centric IT architectures to an innovative disaggregated fabric-based architecture can optimize and scale your data center.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
| Trying to Tame the Tablet | May 08, 2013 |
| Dart: a New Web Programming Experience | May 07, 2013 |
- RSS Feeds
- New Products
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Home, My Backup Data Center
- New Products
- Trying to Tame the Tablet
- Developer Poll
- Paranoid Penguin - Building a Secure Squid Web Proxy, Part IV
- Looking Good
2 hours 9 min ago - Hey God - You may not be
6 hours 23 min ago - Reply to comment | Linux Journal
8 hours 55 min ago - Drupal is an Awesome CMS and a Crappy development framework
13 hours 34 min ago - IT industry leaders
15 hours 57 min ago - Reply to comment | Linux Journal
1 day 8 hours ago - Reply to comment | Linux Journal
1 day 11 hours ago - Reply to comment | Linux Journal
1 day 12 hours ago - great post
1 day 13 hours ago - Google Docs
1 day 13 hours ago



Comments
"On the PC side, it looks as
"On the PC side, it looks as if BIOS finally is retired and replaced by EFI (I wonder which was the last OS to use BIOS for anything that just loading a secondary bootloader)."
What on earth is that supposed to mean? BIOS isn't something you can retire, it stands for Basic-Input-Output-System. A BIOS of some kind is needed to supply at least the minimal input/output required to get the computer going. By definition anything that performs at least that function is a BIOS.
While the idea of an interface between the hardware and the OS might be nice, I'd frankly feel better if it was read-only. I don't like the idea that I could accidentally overwrite the bios with something else. I also very much like the idea that the BIOS does it's job and is not messed with by the OS or the user and that it doesn't/shouldn't have any reason to be anything suspicious. Although, it does make me a little concerned that if the bios gets corrupted someday or the ROM breaks, that it will be almost irreplaceable and if there's a bug in at the moment, it's just too bad.
*HP Laptops seems to be able to update the BIOS from the OS, as opposed to booting from a floppy. Is that new, and is it really any different from older ones in that respect?
I do know what BIOS stand
I do know what BIOS stand for, and I completely agree that it is something that always will be there. However, the BIOS that we know since the birth of the IBM PC back in 1983 is being replaced by EFI.
Johan Thelin is a consultant working with Qt, embedded and free
software. On-line, he is known as e8johan.
Dumb User
As a dumb old user I don't really care how it gets done, as long as I have a few options to help with problems. Something that my new Inspiron 15R seems to be lacking.
Booting Bare Hardware
Uh-uh. In 2021, maybe.
Love Coreboot, Hope ZaReason starts using it as planned.
I agree that the boot-up process, especially the BIOS part is much more difficult by design than it should be. Also makes it harder to create USB boot devices specific to Linux, not DOS or Windows, than it should be. Thankfully there are many options today in creating these devices very easily with Linux alone...its a brave new world!
I too love Coreboot and was fortunate enough to meet the creator at SCaLE7x (Southern California Linux Expo number 7) two years ago. To say it boots fast is an understatement as I am not aware of anything faster than Coreboot for a BIOS dependent computing device. Proprietary hardware has been a thorn in the side of Gnu/Linux for years...not any more.
Since ZaReason (@zareason on twitter) only uses hardware that just works out of the box with all distros of Linux it has been my sole source for hardware for years now. And no I do not work for or get paid by the company. Every time I read about any user having a hardware problem it is because of proprietary hardware, proprietary device drivers or a proprietary BIOS that usually caters ONLY to Microsoft Windows operating system. That is so 1980s.
At SCaLE9x the owners for ZaReason said that they were hoping to include the Coreboot BIOS on some of their future computer lines. At that point we will have hardware that is 100% Linux compatible and a BIOS that supports Linux! Woot Woot!
I love that there is yet another boot loader catering to Linux, if Barebox is as fast as Coreboot than it will be worth checking out.
I was unaware of BIOS being retired for EFI by Microsoft, guess I will have to look at it to make sure there are no Embrace, Extend and Extinguish FUD going on with EFI as I have no experience with it specifically. There is such a negative distrustful history that Microsoft has earned over the years, that anything they use is now suspect by default.
Burn me once, shame on you, burn me twice shame on me.... why give them a third opportunity to mess with you.
Thankfully by purchasing my PC, laptop, netbook, multi-media and server hardware from "Linux ONLY" vendors (i.e. ZaReason) I never get burned by the childish games proprietary manufacturers like to play with consumers...helps one to sleep better at night. I can currently run Windows if I wanted to and guarantee that the hardware purchased today will run Linux tomorrow when the proprietary company discontinues the operating system software for that hardware....as they always do eventually. Why fill the dump with viable hardware, why not re-purpose the hardware for something else.
Thanks for the heads up on EFI and the reminder about U-boot, a good article.
Linux Boot on olfd hardware,,,
Yes!
I've been a big fan of doing away with the BIOS for a while now. Your first experiece with LINUXBios or now named COREBoot... will surprise the hell out of you, with just how fast it is.
I'm waiting... anxiously... longing... for the day I can do a simple BIOS update and over write the old BIOS with "coreboot". As it is, I have a number of motherboards that don't have removing the prom and flashing it as an option.
For the motherboards that are support, what a difference it makes!
---- Jerry McBride