Email or username:

Password:

Forgot your password?
Top-level
Moon
@a1ba what are these stupid bootloaders even doing, what do they need to do past load the linux kernel into memory
12 comments
niconiconi

@Moon@shitposter.club @a1ba@suya.place

> "what are these stupid bootloaders even doing, what do they need to do past load the linux kernel into memory"

GRUB 2 supports:
* A complete I/O library memory management subsystem, to allow people to write extensions, just like kernel modules. An early demo was parting the entire Lua interpreter to GRUB (not part of the repo)
* Hardware-specific devices, such as serial port, PS/2, USB, and video / graphics. Because GRUB needs to work equally on all platforms, it mostly uses its own drivers instead of delegating the task to the boot firmware (on some embedded targets, GRUB itself can even be used as boot firmware).
* Graphics User Interface for boot theming, including decoders for custom images such as PNG, JPEG, and TGA.
* Localization to 20+ languages, with custom Unicode font support.
* Booting from a network, including PXE, HTTP, TFTP, so it has a TCP/IP stack and drivers for network providers such as OpenFireware, UEFI, and U-Boot.
* Parsing and listing partition tables.
* 20+ Filesystem drivers
* A basic sh-like command-shell that support sturctured programming, with ~50 built-in commands, such as ls, grep, cat, lspci, md5sum, hdparm, etc,.

All of these are arguably very useful features to many users. The shell is essential for troubleshooting, network boot is used for many diskless machines, almost all mainstream distros heavily use boot theming and localization, etc.

I think the real problem is that it's doing too much duplicate work. You may as well just use a Linux kernel with kexec() as the bootloader. This is exactly the motivation of recently launched projects like LinuxBoot.

@Moon@shitposter.club @a1ba@suya.place

> "what are these stupid bootloaders even doing, what do they need to do past load the linux kernel into memory"

GRUB 2 supports:
* A complete I/O library memory management subsystem, to allow people to write extensions, just like kernel modules. An early demo was parting the entire Lua interpreter to GRUB (not part of the repo)
* Hardware-specific devices, such as serial port, PS/2, USB, and video / graphics. Because GRUB needs to work equally on all platforms,...
Moon
@niconiconi @a1ba can you compile in only the stuff you want like with the linux kernel?
Moon
@niconiconi @a1ba thanks for the informative reply to my snark haha. I wrote my own bootloader 22 years ago in one sector that could boot a raw payload from disk, and I forgot about things like serial drivers for keyboard where it's on an addon card or something like that.
Pete Zaitcev
@Moon @niconiconi @a1ba Writing bootloaders was fun back in the day. I wrote one for PDP-11 with 8-inch floppy, with the limiting factor it needing to fit into a 128-byte sector. Would not want to do anything in the area today.
https://people.redhat.com/zaitcev/d22_pub/dx_boot.p11
27329ed9-2211-a1ba-9371-e2641bf0dcb6
@niconiconi @Moon >You may as well just use a Linux kernel with kexec() as the bootloader. This is exactly the motivation of recently launched projects like LinuxBoot.

As far as I know, the reason why newer Elbrus machines has a 64 MB of on-board flash memory is to replace their bootloader with just Linux, that will do kexec().
Pete Zaitcev
@a1ba @niconiconi @Moon
> the reason why newer Elbrus machines has a 64 MB of on-board flash memory is to replace their bootloader with just Linux
When I worked in MCST in 1996, I made a proposal to use Linux on Baget-11S. The CEO, A.K. Kim, declined, with the rationale that he was going to be laughed out of the room by all the generals and colonels, if he presented them a computer with OS written by a Finnish student. MCST bought a source license for Solars 2 instead, for $200,000. I was far ahead of my time. Mua ha ha ha ... hah. He was right though. It was too early, I even recognized it at the time.
@a1ba @niconiconi @Moon
> the reason why newer Elbrus machines has a 64 MB of on-board flash memory is to replace their bootloader with just Linux
When I worked in MCST in 1996, I made a proposal to use Linux on Baget-11S. The CEO, A.K. Kim, declined, with the rationale that he was going to be laughed out of the room by all the generals and colonels, if he presented them a computer with OS written...
27329ed9-2211-a1ba-9371-e2641bf0dcb6
@zaitcev @niconiconi @Moon Baget is the earliest computer on R500, right? I think I saw it mentioned somewhere once. I'm not sure if they maintain Solaris port for their SPARC machines nowadays.
Pete Zaitcev
@a1ba @niconiconi @Moon It was even earlier than R500. We made a batch of an earlier chip in France in 1997. I don't remember the design parameters of that. But it went into a box that still had SBus. We made adapters for all the weird Elbrus-2 peripherals to SBus. The R500 came later, I'm pretty sure.

The theme "Baget" included 3 branches: 11P was a clone of Pentium, designed in Ukraine somewhere. Not sure if it was ever made. The 11S was SPARC by MCST. And the final one (11M?) was a MIPS made in Zelenograd. A whole production line and the design were bought abroad.
@a1ba @niconiconi @Moon It was even earlier than R500. We made a batch of an earlier chip in France in 1997. I don't remember the design parameters of that. But it went into a box that still had SBus. We made adapters for all the weird Elbrus-2 peripherals to SBus. The R500 came later, I'm pretty sure.
Pete Zaitcev
@a1ba @Moon @niconiconi Here's a photo that I found. My note says "New spin of Baget-S after original version missed its clock target. 2.8M transistors, 150MHz, 0.35um CMOS process with 4 layers of metal.
1999-2001". I can't believe we could not crack 200 MHz. I thought we did, but that's how I wrote it down.
Pete Zaitcev
@Moon @a1ba @niconiconi And the previous one was

"100 MHz (Actually - only 60)
0.5 um 3-layers CMOS
~2 M transistors
2 W
Late 1997"
27329ed9-2211-a1ba-9371-e2641bf0dcb6
@zaitcev @niconiconi @Moon R500 also used SBus, as they tell. But R1000 and forward uses PCI, and their southbridge. I recently got my hands on their SPARC port of Linux and the bootloader, trying to implement emulation for it in QEMU, it has nothing about SBus anymore.

>And the final one (11M?) was a MIPS made in Zelenograd
I wonder if 11M was a KOMDIV related thing.
@zaitcev @niconiconi @Moon R500 also used SBus, as they tell. But R1000 and forward uses PCI, and their southbridge. I recently got my hands on their SPARC port of Linux and the bootloader, trying to implement emulation for it in QEMU, it has nothing about SBus anymore.
Go Up