marvell
Posts: 10
Joined: Tue Feb 19, 2013 2:30 pm

Raspberry Pi boot

Wed Feb 20, 2013 10:40 am

Hi,
I know that Raspberry Pi has a specific boot process... with a lot of non-free files. So, is it possible to write an open-source bootloader ? I mean, something that would perform bootcode.bin and loader.bin job.
I know that the first stage bootloader is looking for bootcode.bin. Will it boot if I renamed my open-source bootloader "bootcode.bin" ?
Thanks for your replies

PS: I apologize for my English, I'm French.

Cloudcentric
Posts: 982
Joined: Fri Sep 14, 2012 9:13 am

Re: Raspberry Pi boot

Wed Feb 20, 2013 10:46 am

I know everything about nothing"

marvell
Posts: 10
Joined: Tue Feb 19, 2013 2:30 pm

Re: Raspberry Pi boot

Wed Feb 20, 2013 12:11 pm

OK… This is not the answer I expected ! In LICENSE.broadcom,
"Redistribution and use in binary form, without modification […]". But no information on how to write a bootloader for Raspberry Pi.

lavers
Posts: 17
Joined: Mon Jul 09, 2012 3:45 pm
Location: Canada

Re: Raspberry Pi boot

Wed Feb 20, 2013 12:21 pm

The Raspberry Pi boot files are not written in ARM code, but in code specific to the GPU that is actually controlling the boot process. You won't have much luck trying to write your own as the specifications for the GPU are not public.

The first stage of the process you can control is kernel.img. I suppose you could put your bootloader in that file and the GPU would boot it.

User avatar
DavidS
Posts: 4334
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: Raspberry Pi boot

Wed Feb 20, 2013 1:11 pm

While not everything is documented YET, there is some good documentation on the VideoCore Processor at:
https://github.com/hermanhermitage/videocoreiv/wiki

I have played with it a bit, and it is quite a usfull processor. The main trouble at this time is there is no documentation on how to push out video, so you could write a bootloader with no trouble though you would not have Video output (unless you figure out how to push out video [if you do please post])
RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

marvell
Posts: 10
Joined: Tue Feb 19, 2013 2:30 pm

Re: Raspberry Pi boot

Wed Feb 20, 2013 1:56 pm

I have never understood why brands are so stubborn ! Considering datasheets as top-secrets documents is stupid… we can't make great software without them.
Anyway, I don't want to have a fight with Broadcom. No open-source bootloader on my Raspberry Pi.

PS: The Raspberry Pi foundation shouldn't work with Broadcom.

User avatar
tonyhughes
Posts: 951
Joined: Wed Dec 26, 2012 3:46 am

Re: Raspberry Pi boot

Wed Feb 20, 2013 2:00 pm

marvell wrote: PS: The Raspberry Pi foundation shouldn't work with Broadcom.
State why please.

(Sits back)

User avatar
RaTTuS
Posts: 10748
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Raspberry Pi boot

Wed Feb 20, 2013 2:16 pm

marvell wrote: PS: The Raspberry Pi foundation shouldn't work with Broadcom.
then we would not have a RPi
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

marvell
Posts: 10
Joined: Tue Feb 19, 2013 2:30 pm

Re: Raspberry Pi boot

Wed Feb 20, 2013 3:31 pm

I said "Broadcom", because there is a Broadcom chip on Raspberry Pi ! This platform would be greater if we had access to GPU's datasheet. Anyway, it's not something that the community can change.

PS: I'm not angry angainst Broadcom. Qualcomm keeps its Adreno's datasheets secret too. I'm angry against all these brands, that keep these essential files (for programmers) secret.

User avatar
tonyhughes
Posts: 951
Joined: Wed Dec 26, 2012 3:46 am

Re: Raspberry Pi boot

Wed Feb 20, 2013 6:52 pm

marvell wrote:I'm angry against all these brands, that keep these essential files (for programmers) secret.
Can you please provide your bank account number, credit card number, CVV number, PIN number, all your computer/web/service account logins and passwords, address, phone number, SSN, car rego, and date of birth please?

They are essential for me to do what I want, and I am angry that you are keeping them secret from me.

Do you think Broadcom et al should not be allowed to design something for profit, and not have to tell the world how they did it? If you truly think that, then you are definitely not speaking on behalf of free software/hardware enthusiasts.

marvell
Posts: 10
Joined: Tue Feb 19, 2013 2:30 pm

Re: Raspberry Pi boot

Wed Feb 20, 2013 10:39 pm

tonyhughes wrote:Do you think Broadcom et al. should not be allowed to design something for profit, and not have to tell the world how they did it ?
I think there's a misunderstanding, and I'll express my opinion. It's clear you're capitalist, maybe working for a brand with no respect for human being. From American point of view, when you buy a product, you just have the right to lose money… I don't think so !

That is normal to do what you want with your computer. But it's impossible without datasheets. I don't request informations about logic circuits, just about ISA. And recreating a processor from datasheets… it's impossible !

If Broadcom thinks that its dangerous to release GPU datasheet, then, they should do so for CPU…

Consider this post as closed. I don't want to have a fight with people like you.
Thanks everyone for anwsers.

User avatar
tonyhughes
Posts: 951
Joined: Wed Dec 26, 2012 3:46 am

Re: Raspberry Pi boot

Thu Feb 21, 2013 12:10 am

I asked in an over-the-top-comedic way for your data to point out that private data is just that, then I followed with a calm and fair question, totally on-topic for your original post.

You replied by attacking me, calling me a capitalist, and saying I have no respect for humans.

Good luck trying (failing, even) to co-exist with the internet.

Posts are closed when mods close them...

tufty
Posts: 1456
Joined: Sun Sep 11, 2011 2:32 pm

Re: Raspberry Pi boot

Thu Feb 21, 2013 6:32 am

marvell wrote:they should do so for CPU
There is a full datasheet for the CPU.

marvell
Posts: 10
Joined: Tue Feb 19, 2013 2:30 pm

Re: Raspberry Pi boot

Thu Feb 21, 2013 12:12 pm

tonyhughes wrote:You replied by attacking me, calling me a capitalist, and saying I have no respect for humans.
Please, don't try to pose as the victim. You've attacked me when I said it would be better if we had access to GPU's datasheet. And your strong response was… astonishing !

Your point of view is certainly not mine. But as I said, there's no reason to Broadcom's choises. This brand is not accountable. But when someone buy a product, he also buy the right to use it ! Don't forget it.

marvell
Posts: 10
Joined: Tue Feb 19, 2013 2:30 pm

Re: Raspberry Pi boot

Thu Feb 21, 2013 12:15 pm

tufty wrote:There is a full datasheet for the CPU.
Indeed. But they don't release informations about GPU, so they should the same with CPU (it's just about coherence).

User avatar
RaTTuS
Posts: 10748
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Raspberry Pi boot

Thu Feb 21, 2013 12:40 pm

the easy answer is no
the foundation get good prices on the SOC for a variety of reasons -
one of which is that several of them work for broadcom doing their daily jobs
the
Arm part of the chip is well known about
the videocore part [internals]is less known about

why do you think you need access to the internal documentation of a chip that you don't have any public tools for - there are no compilers available for it, what is it that you want to do ?

the longer answer is no but the foundation would like to provide everything as open source - however they are limited by the contracts to broadcom,

you can freely start your boot at the kernel.img stage and do everything you want from then on in ....
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

marvell
Posts: 10
Joined: Tue Feb 19, 2013 2:30 pm

Re: Raspberry Pi boot

Thu Feb 21, 2013 1:05 pm

RaTTuS wrote:You can freely start your boot at the kernel.img stage and do everything you want from then on in ....
Yes, but without datasheets, the Raspberry Pi is no more an educational platform. As I said, I don't request logic circuits informations. I know that Broadcom has to pay its employees. I just want to use my device ! It's that simple.

PS: I'm not using Linux, but my own operating system, a fork of MINIX. Creating an assembler is not a problem… when you have informations to create drivers. And actually, that's not the case.

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4257
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: Raspberry Pi boot

Thu Feb 21, 2013 1:16 pm

What devices do you not have sufficient information on to create drivers? The Linux drivers are available for reference and the GPU mailbox protocol is published. USB is a bit of a dog, but RISCOS has it working, so it's clearly possible.

marvell
Posts: 10
Joined: Tue Feb 19, 2013 2:30 pm

Re: Raspberry Pi boot

Thu Feb 21, 2013 1:40 pm

It's certainly possible to make an operating system running on Raspberry Pi. Just need to create a kernel.img, and use Linux drivers ! But it's too bad not having free hands (as we say in French "avoir les mains libres", I don't know if it's the correct translation).

Anyway, thanks for your answers.

tufty
Posts: 1456
Joined: Sun Sep 11, 2011 2:32 pm

Re: Raspberry Pi boot

Thu Feb 21, 2013 7:09 pm

marvell wrote:
tufty wrote:There is a full datasheet for the CPU.
Indeed. But they don't release informations about GPU, so they should the same with CPU (it's just about coherence).
The ARM1176jzf-s documentation is not issued by Broadcom.

Overall, this is an argument that's been done to death, over and over again. if the GPU firmware was in mask rom rather than being loaded at boot time, there wouldn't be an issue - you'd just treat it as firmware. You will not get a full programming manual from Broadcom for the Videocore 4 processor that hosts the ARM core. You might get some mileage from what Herman's been doing, otherwise simply treat it as the firmware that it is.

UncleVan
Posts: 16
Joined: Fri Dec 28, 2012 7:43 pm

Re: Raspberry Pi boot

Thu Feb 28, 2013 9:22 pm

Hello ,

I stumbled across this post as I was also looking for info about Pi's boot process. Im new to ARM too, but experienced in assembler and Unix/Linux.

First in advance: @tonyhughes & marvell - dont act silly, both of you. Us neither greedy capitalists (disgusting), nor thieves (not respectable either). In fact, no one is gonna steal intellectual properties from Broadcom Corp. or do any other harm to them. So this over-reaction to everything concerning lacks of docs I observed elsewhere in the forums too is worrying me - to say the least.

We just want to know exactly how the board is booting, right ?

@Marvell: If you found/own any usefull info, pls. share & post the links - thank you.

@DavidS: What you mean by "push video out" ? Activating the video chip ? And what kind of info is needed to "decode" the bin firmware files ?

pls dont mind if I bother you too much, I really need to find a good starting point...

========================================
PS (IMHO off-topic but need to be said)
now 'bout the moral of the story: I used to run Thinkpads with NVidia GPUs und was compelled to use their non-open proprietary drivers.. Until last year they just ceased working properly , leaving me without vitrtual console (!) but with running X. So I switched to nouveau (worst was to learn spelling it right) and it was mature enough to offer everything needed for everyday Linux-life and even much more, because it fits sleemlessly in the opengl , randr etc graphical subsystems and interfaces. (No proper 3D-Accel though until kernel 3.8)
Nouveau is a open-source nvidia driver mainly based on reverse-engeneered Nvidia code...got the point ?

On the other side, Intel is one of the major player publishing every single bit of their hw freely online - check it by oneself. therefore Intel cpu/graphic/chipset/audio/wireless etc are the ones best supported by open source; and as far as I lnow its still worldwide leading hitec company, despite of the fact that everyone can see and read their manuals...

and guess what hardware was my latest Thinkpad based upon ...

Your UncleVan.

Return to “Bare metal, Assembly language”