GPU Firmware Required for Boot?


17 posts
by PehJota » Mon Jan 23, 2012 10:42 pm
Hi,

I'm familiar with the Raspberry Pi's general boot sequence (GPU boots, firmware on SD card is loaded and run on the GPU, and Linux or another kernel is loaded and run on the CPU), and I understand that the proprietary GPU firmware object/blob will be needed at least for most/all hardware accelerated graphics. But will the SoC be able to boot an operating system without the firmware object?

Sorry if this has been answered before; I searched the forums but could not find an answer to this.
Posts: 3
Joined: Mon Jan 23, 2012 10:11 pm
by alexandru.cucu » Mon Jan 23, 2012 11:21 pm
The firmware is in the GPU.

This looks for FAT32 partitions on the SD card and loads the kernel.img file if it finds one.

The proprietary software used for hardware accelerated graphics, video decoding, etc. might me a Linux module (driver) that helps the software talk with the GPU.

I am not sure if there is a public binary driver for the GPU that enables hardware accelerated graphics. And I'm pretty sure there is no complete FLOSS one either...

Someone please correct me if I'm wrong.
https://launchpad.net/~alexandru.cucu
User avatar
Posts: 75
Joined: Mon Sep 05, 2011 6:07 pm
by PehJota » Mon Jan 23, 2012 11:52 pm
Cracknel said:


The firmware is in the GPU.

This looks for FAT32 partitions on the SD card and loads the kernel.img file if it finds one.


I saw some posts on these forums (e.g. this one) that seem to say that the GPU reads the FAT32 filesystem and from it loads a firmware file before reading and branching to kernel.img.  So my question is this: is there a proprietary firmware file that must be stored on the SD card for the Pi to boot, or can the Pi be booted without any proprietary software on the SD card?
Posts: 3
Joined: Mon Jan 23, 2012 10:11 pm
by stormy1 » Tue Jan 24, 2012 3:25 am
PehJota said:

 is there a proprietary firmware file that must be stored on the SD card for the Pi to boot,

Yes.
Posts: 60
Joined: Fri Jan 06, 2012 3:44 am
by Jessie » Tue Jan 24, 2012 6:46 am
There is firmware on the SOC that you will not be able to touch.  It is pre-programed from the factory.  And yes it is required to boot, and this is why the first partition has to be FAT because this is how the firmware is designed.  You only need a FAT partition big enough to hold a bootloader of some type.

From the way I understand it the GPU dosn't even care if the first thing on that FAT partition is Kernel.img it just loads the first thing it finds.
Click my website link under my avitar for the RetroPie 2.3 guide in progress.
User avatar
Forum Moderator
Forum Moderator
Posts: 1604
Joined: Fri Nov 04, 2011 7:40 pm
Location: C/S CO USA
by PehJota » Tue Jan 24, 2012 6:31 pm
Jessie said:


There is firmware on the SOC that you will not be able to touch.  It is pre-programed from the factory.  And yes it is required to boot, and this is why the first partition has to be FAT because this is how the firmware is designed.  You only need a FAT partition big enough to hold a bootloader of some type.



If the only unmodifiable firmware is that which is flashed onto the SoC, then that's fine.  My question and concern is whether there is any proprietary firmware file that the SoC must find on the SD card's FAT filesystem for the Pi to boot.
Posts: 3
Joined: Mon Jan 23, 2012 10:11 pm
by Chromatix » Tue Jan 24, 2012 6:44 pm
My understanding is - and I have only stuff from this forum etc. to go on - that the boot process is a multi stage affair:

1) The miniature CPU inside the GPU starts running from a small ROM.  The ARM core is still turned off at this point.

2) The SD card is started up and the GPU firmware is loaded from the first FAT partition.  The GPU's internal CPU switches to running this.

3) The GPU continues to read the first partition of the SD card and loads the Linux kernel (or whatever is masquerading as one) into RAM.

4) The ARM CPU is finally switched on and booted straight into the kernel.  This eventually mounts the other partition(s) on the SD card to use as the root filesystem.

So yes, there is a "binary blob" that has to be present on every R-Pi bootable SD card.
The key to knowledge is not to rely on people to teach you it.
User avatar
Posts: 430
Joined: Mon Jan 02, 2012 7:00 pm
Location: Helsinki
by mkopack » Tue Jan 24, 2012 7:03 pm
Easiest way to think of it is GPU is acting as the BIOS. No BIOS, no bootup... You need that little GPU binary BLOB to bootstrap stuff (much like a BIOS does) and get the rest of the system up and running.
User avatar
Posts: 242
Joined: Mon Nov 07, 2011 8:46 pm
by Jessie » Tue Jan 24, 2012 8:02 pm
PehJota said:


Jessie said:


There is firmware on the SOC that you will not be able to touch.  It is pre-programed from the factory.  And yes it is required to boot, and this is why the first partition has to be FAT because this is how the firmware is designed.  You only need a FAT partition big enough to hold a bootloader of some type.


If the only unmodifiable firmware is that which is flashed onto the SoC, then that's fine.  My question and concern is whether there is any proprietary firmware file that the SoC must find on the SD card's FAT filesystem for the Pi to boot.



No, there is no firmware required to be on the SD card that the SOC needs to boot.  You can make this thing boot whatever and however you want.

The confusion (in this thread) may come from the fact that in order to use hardware accelerated features on the GPU you will need to have it's binary blob somewhere on the SD card and the proper Open (GL, Max) libraries to interface with that binary blob.  Making a simple frame buffer will not reqire this binary blob or these libraries as it can be accessed by the CPU within the SOC.
Click my website link under my avitar for the RetroPie 2.3 guide in progress.
User avatar
Forum Moderator
Forum Moderator
Posts: 1604
Joined: Fri Nov 04, 2011 7:40 pm
Location: C/S CO USA
by tufty » Tue Jan 24, 2012 8:15 pm
That"s very much /not/ the understanding that has previously been given, viz:

1 - gpu loads its firmware from sdcard
2 - gpu then fires up the arm
3 - arm loads its kernel from sdcard and starts runing.

Simon.
Posts: 1368
Joined: Sun Sep 11, 2011 2:32 pm
by cgaller » Thu Aug 28, 2014 2:46 am
If someone were to source the BCM2835 SoC and build their own hardware, does the firmware on the GPU come burned into the chip from Broadcom, or is that something that needs to be done to the CPU after it's sourced?
Posts: 11
Joined: Wed Aug 27, 2014 3:58 pm
by ShiftPlusOne » Thu Aug 28, 2014 7:04 am
yes, you need closed firmware to boot. bootcode.bin and start.elf on the fat32 partition.
Forum Moderator
Forum Moderator
Posts: 1944
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy
by cgaller » Thu Aug 28, 2014 1:10 pm
Thanks for the reply! Just to clarify, the code required to fully bootstrap the broadcom chip is entirely contained in the firmware on the FAT32 partition? In other words, if I purchase some broadcom sample SoC's, they will boot properly as long as I include those two pieces of software you indicated? Thanks!
Posts: 11
Joined: Wed Aug 27, 2014 3:58 pm
by ShiftPlusOne » Thu Aug 28, 2014 1:20 pm
cgaller wrote:Thanks for the reply! Just to clarify, the code required to fully bootstrap the broadcom chip is entirely contained in the firmware on the FAT32 partition? In other words, if I purchase some broadcom sample SoC's, they will boot properly as long as I include those two pieces of software you indicated? Thanks!


Yes, but that's a very big if. Also, the firmware the raspberry pi uses is compiled for the raspberry pi. We don't try to support other devices, although it might work anyway. IF you get the chips from broadcom, I think they'll also provide you with the firmware source code and tools to compile it.
Forum Moderator
Forum Moderator
Posts: 1944
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy
by jamesh » Thu Aug 28, 2014 1:44 pm
Yes, I believe that when you buy a load of chips form Broadcom, you would get the firmware you need with them.

When I say a load, I mean at least 100k, probably lots more.

If you want a BCM2835 based device, look at the compute module. That makes the whole process so much easier. Which of course is why it was developed.
Soon to be employed engineer - Hurrah! Volunteer at the Raspberry Pi Foundation, helper at PiAcademy September 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11926
Joined: Sat Jul 30, 2011 7:41 pm
by cgaller » Wed Sep 03, 2014 9:05 pm
jamesh wrote:Yes, I believe that when you buy a load of chips form Broadcom, you would get the firmware you need with them.

When I say a load, I mean at least 100k, probably lots more.

If you want a BCM2835 based device, look at the compute module. That makes the whole process so much easier. Which of course is why it was developed.


I would love to use the compute module, however it seems nobody is able to provide a time frame regarding availability.
Posts: 11
Joined: Wed Aug 27, 2014 3:58 pm
by mahjongg » Wed Sep 03, 2014 11:58 pm
it will still be here a lot earlier than any other way you can devise to use a BCM2835 (short of using a raspberry PI that is).

not willing to publish a release date doesn't mean it cannot happen "any moment now" ™
User avatar
Forum Moderator
Forum Moderator
Posts: 5700
Joined: Sun Mar 11, 2012 12:19 am