Hacker News new | past | comments | ask | show | jobs | submit login

The blob for the default VideoCore IV blob in the version from yesterday (commit 369d99df38de4c33b648ac864dd42e185461b477) has a size of 2708.504 kB:

https://github.com/raspberrypi/firmware/blob/369d99df38de4c3...

All the blobs are in https://github.com/raspberrypi/firmware/tree/master/boot and carry the name start.*\.elf .

There are four versions of this firmware blob that can be used:

start.elf: the default version

start_cd.elf: a minimal version of the firmware that must be used if you set the GPU memory below some threshold, and only supports few features.

start_x.elf: an extended version of the firmware blob which included some extra free codecs (source: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=1933...).

start_db.elf: A version of start_x.elf with additional debug assertions (source: https://github.com/raspberrypi/firmware/issues/408).




The VideoCore IV is pretty well understood, and there are some hacky C compilers for it. I have, e.g., a simple boot monitor for it:

http://cowlark.com/cgi-bin/fossil.cgi/piface/doc/stable/doc/...

It's a bootcode.bin which runs a simple shell via a serial terminal which allows you to do things like up and download data, examine memory, etc. No ARM code involved anywhere! It doesn't initialise the SDRAM yet (although I think I know how).

Right now it's built using a hacky port of the Amsterdam Compiler Kit, which generates lousy code. I've tried porting both gcc and LLVM and ran into a brick wall --- they're both vile. I'm hopefully going to have a go with libfirm soon, which looks more tractable. However, Volker Barthelmann's non-open-source vbcc has experimental (and apparently very good) VC4 support: http://www.compilers.de/vbcc.html


Where did you/they get the information on the VC4 instruction set from? According to some sources about reverse-engineering VC4 which I could recover if I wanted to, finding out the instruction set that the blob uses was a serious problem at least in the past.


I realise now I forgot to reference my source; I didn't do any of the reverse engineering myself:

https://github.com/hermanhermitage/videocoreiv

I believe it was figured out from a combination of analysis of the blob, examining the patents (which contain quite a lot of information), trial-and-error, and careful examination of the fragments of VC4 source released by Broadcom (their big source release a year or so back contained quite a lot). I know that at least one person wrote a program which would run arbitrary instructions on the Pi and analyse the state of the registers afterwards, which is a neat trick.

The VC4 is a really nice processor, BTW. Dual core, lots of registers, efficient instruction packing, 64x64x8bit vector unit, integrated single-precision FPU using the integer registers (no double-precision, alas), 1kB on-chip lookup table... but, bizarrely, no adc or sbc instructions, so 64-bit arithmetic is hard. Very weird.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: