8 ms·
Minimal Raspberry Pi VPU firmware
- erikb 10y agoWhat can one do with it? Is it like a bootloader? Sorry really not enough know-how.
- loonattic 10y agoIt's basically like a BIOS on x86? The original is closed source, initializes the VideoCore chip?
- tremon 10y agoKinda, but with x86 the BIOS code is executed on the x86 processor itself and before that, the processor bootstraps itself. Here, the VideoCore processor (the GPU iiuc) is responsible for bootstrapping the CPU.
- revelation 10y agoIt replaces the non-free binary blob on the Raspberry Pi that runs right after reset and initializes the processor. Modern complex processors require a specific and carefully orchestrated series of initialization steps to configure system clocks and ensure external RAM and other peripherals work correctly. Of course no one in their right mind would use this reverse-engineered code here for any serious purpose. Instead, you dump the bastardized RPi platform (it's basically a video graphics card with an ARM bolted on) and use something actually free, like the BeagleBone.
- rogual 10y agoDo you know if there's one of these boards on the market that has: 1. A GPU 2. No binary blobs, no reverse engineering?
- pingswept 10y agoI believe the answer is no. You might be interested in monitoring this list of what gets closest: https://www.fsf.org/resources/hw/single-board-computers https://www.fsf.org/resources/hw/single-board-computers Also, the Novena mainboard has a chance of getting there, if you look at this page: https://www.kosagi.com/w/index.php?title=Novena_Main_Page https://www.kosagi.com/w/index.php?title=Novena_Main_Page and then note that the Vivante GPU is close to having free drivers: https://www.phoronix.com/scan.php?page=news_item&px=Etnaviv-Vivante-XDC2015 https://www.phoronix.com/scan.php?page=news_item&px=Etnaviv-...
- abrodersen 10y agoI think the Jetson TK1 from NVIDIA can run mainline Linux with most of the devices working.
- ansible 10y agoI actually have one of those, but never investigated the bootloader situation for that platform. And to get good use out of the GPU (one of the main selling points for this platform), you'll want to use the Nvidia proprietary driver.
- dezgeg 10y agoThe K1 chip has a blob-free boot (unlike the newer chips AFAIK) except for the USB-based flash programming / recovery mode, so for the initial installation you'd need to manually flash the eMMC somehow if you don't want to run any proprietary code. And yes, CUDA isn't supported by the open drivers. Other than that, I've heard Nouveau works relatively well. Though I'm not still sure if the open source graphics community has figured out a way to get stacks like Xorg or Wayland/Weston running without hacking the source on architectures where rendering and scanout are done by different DRM devices.
- aleden 10y agoNVIDIA has made it possible to run the Jetson TK1 under Nouveau with hardware accelerated graphics (Weston/Wayland or X). https://github.com/NVIDIA/tegra-nouveau-rootfs https://github.com/NVIDIA/tegra-nouveau-rootfs Using a completely open stack on the TK1, from u-boot to kernel (except for the USB firmware), I can run ARM virtual machines with QEMU/KVM.
- TD-Linux 10y ago>and use something actually free, like the BeagleBone. Oh please, while you lose the VC4 firmware, you instead get a proprietary PowerVR GPU with no free drivers. Not to mention that the Beaglebone has a much worse CPU than the "bolted on ARM" of the RPi. If you're going to dump the rpi for this reason, going to something like the imx6 used in the Cubieboard and Novena would make a lot more sense (edit: Cubox, not Cubieboard).
- wolfgke 10y ago> If you're going to dump the rpi for this reason, going to something like the imx6 used in the Cubieboard and Novena would make a lot more sense. The Cubieboard uses an Allwinner SoC, which has a bad reputation among oppen source people since Allwinner violated the GPL multiple times in the past (though I heard the Linux support is decent; mainly because of the work of the Sunxi community: https://linux-sunxi.org/Main_Page https://linux-sunxi.org/Main_Page). Novena (and "Sabre Lite - i.MX6 Quad Core"; cf. https://news.ycombinator.com/item?id=12743798 https://news.ycombinator.com/item?id=12743798) indeed use a Freescale (now bought by NXP) SoC.
- TD-Linux 10y agoOops, I confused Cubieboard and Cubox, which does have an i.MX6.
- monocasa 10y agoUnfortunately NXP is nuking most of the iMX6 support from orbit after they bought Freescale. Even things like most of the SD card images for their SABRE boards were deleted of their site. It's only due to the large open ecosystem around the iMX6 that we were able to debug some issues while bringing up a board recently.
- webscaleizfun 10y agoSame thing happened with Allwinner's SOCs, when the one point of contact that was providing the source of their modified kernel left, Allwinner chipsets stopped getting rapid mainline kernel support. The silver lining though is that the sunxi community has been working to mainline newer chips like the Allwinner H3 & has been doing a bang up job with minimal info, newer kernels can boot up & get most hardware onboard configured & ready to use.
- david-given 10y agoThe Raspberry Pi is really a VideoCore IV processor with an ARM bolted on the side. At power on, a boot ROM loads an embedded OS image into the VC4 processor. That then sets up the hardware, powers up the ARM, and loads the OS image into that. The VC4 then continues running in the background servicing RPCs from the ARM. What this is is a replacement VC4 operating system image which just fires up the ARM with an embedded image, sets it running, and then halts (assuming I'm understanding the docs correctly); so it can't (yet) actually load an OS into the ARM from disk or respond to RPCs etc. In practical terms, this is the biggest, most difficult step forward towards running an almost completely open system on the RPi. (It could also be used as the core of a proper operating system running on the VC4 itself, which could be rather interesting.)
- wyldfire 10y ago> The Raspberry Pi is really a VideoCore IV processor with an ARM bolted on the side. I knew that the bootloader worked that way but didn't think of it being that way until reading your comment. Interesting to think of the hierarchy that way. Naively this makes me think that the ARM ISA could use something like UEFI (or BIOS) to unify the devices' bootstrapping logic around some common metaphor.
- tremon 10y agoLinux (and probably *BSD, not sure if they support it) can use devicetree files to configure itself for the hardware it's running on. No runtime firmware necessary.
- david-given 10y agoWell, the ARM is literally powered down until the VC4 turns it on. (I've heard that the only reason the ARM is there at all is that Broadcom had a royalty-free license and there was some spare silicon, so they thought, hey, why not, it might be useful...) Traditionally ARMs have never used any kind of common boot process because they come out of the embedded world where every system is bespoke --- the focus is always on individual products, rather than building a platform. There have been various efforts to fix this but AFAIAA they've never come to much. I think the current one is DeviceTree, but I don't believe there's much vendor support.
- loonattic 10y agoIf this matured, maybe there would be some interest in porting OpenBSD to RPi with this? Theo didn't like the firmware blob, right?..
- justin66 10y agoAn openbsd port is already underway.
- 2bluesc 10y agoNuttX would be interesting on a raspberry pi. Much lighter weight then Linux but still implements POSIX like interfaces. The POSIX stuff always felt to clunky for a microcontroller, but rPi might be just right. While a port has been discussed, I don't think a port has been completed.
- zokier 10y agoI wonder what sort of practical benefit there is for the "lighter weight" of NuttX? I imagine the main attraction is realtimedness, but I think that is sort of orthogonal to light-weightness. And even then it has rtlinux to compete with.
- rcarmo 10y agoNice. There's an Inferno port to the Raspberry Pi that could be made even smaller by using this (I suppose): http://lynxline.com/projects/labs-portintg-inferno-os-to-raspberry-pi/ http://lynxline.com/projects/labs-portintg-inferno-os-to-ras...
- RossBencina 10y agoI have a vague hope that one day the dual-core VPU on the Pi will be usable for time-critical real-time i/o in much the same way as the PRUs on the BBB are used.
- mrlambchop 10y agoI wrote the BootROM and 2nd stage loader used in VC3 and VC4 - way back in ~2005. And the interrupt controller, VPU sync block and various other things used in this open FW. This is pretty awesome to see how much context the community has reverse engineered from the design - I remember making the first BCM2835 based project (the Roku 2) and spending _A LOT_ of time getting the ARM to startup reliably and boot into Linux as fast as possible. I've spotted 2 concepts in the open FW so far that misunderstood the implementation of the HW but are still working which is fun! One advantage of the having the GPU start first (maybe the only advantage :) is that it can play a video for a splash screen instead of a static image. If you've ever used a Roku 2/3 or newer, this is a feature I hacked together for a demo to hide boot-up latency - now its a standard part of RokuOS (and is quite hard to replicate on traditional ARM/MIPS SoC's).
- gh02t 10y agoI'm guessing you had privileged access to the datasheets for those chips and you're not legally allowed to tell them what they misunderstood? I imagine I would feel super weird seeing something being done wrong but not being allowed to tell someone. I mean I understand why, but it'd be frustrating.
- tmzt 10y agoBeen on the other side of that working on the HTC Linux project and chatting with Android developers at Google. I knew they were laughing to themselves as we tried to figure out what were modem differences and what were SoC differences between MSM7x00A and non-A.
- mrlambchop 10y agoWell, I wrote the RTL as well as implemented the SW so I guess I do have propriety information on the topic... In theory, all the code and sequences for the BootROM, 2nd stage, ARM loader and peripheral control functions is available by disassembling the binaries (and extracting some code from the ROM with a mempcy) - it just requires reverse engineering / re-implementing inside and this is part of the fun / why this project is so great. I might suggest they poke at the linux port and u-boot of the BCM2835 from Roku however :)