BROM / Boot0 - Limitations
#1
Hi guys, just received my Pines here some days ago (3 Pine64+ 2Gb models) and just started to play with.

I can load a Longsleep linux, and even some hand crafted 64Bits uboot with EFI from mainline, however, I've several questions regarding low-level and hardware related code.

From what I read here and there, at the initialization, the BROM is calling the boot0 binary which seems to be a closed source SPL program.

Could you explain me which limitations do you see about this unsourced boot0 SPL?

I'm thinking about reversing it but it would be something a little bit time consuming so I would love to have examples of really usefull features that could be implemented (on U-Boot/Linux for examples) without these limitations.
#2
(12-30-2016, 08:42 AM)Flint Wrote: Hi guys, just received my Pines here some days ago (3 Pine64+ 2Gb models) and just started to play with.

I can load a Longsleep linux, and even some hand crafted 64Bits uboot with EFI from mainline, however, I've several questions regarding low-level and hardware related code.

From what I read here and there, at the initialization, the BROM is calling the boot0 binary which seems to be a closed source SPL program.

Could you explain me which limitations do you see about this unsourced boot0 SPL?

I'm thinking about reversing it but it would be something a little bit time consuming so I would love to have examples of really usefull features that could be implemented (on U-Boot/Linux for examples) without these limitations.

The open source SPL code may already provided at Sunxi, you can goto Sunxi IRC and ping "apritzel".
#3
Are you talking about the Boot0 SPL or something related with ARM Trusted Plateform ? I didn't see anything related to the SPL's sources on sunxi.
Everything I read and download at sunxi about the Boot0 SPL is either an extracted blob binary or various link to people using it to allow U-Boot loading.

Yep, I've take a look at the apritzel wonderfull works, it is indeed pretty amazing, but he/she work for ARM and so it's relatively easier to do something.

I think that I'll dig a little more on the Boot0 story, as I'm pretty sure that using the A64 Technical Reference Manual allows us to correctly implement a SPL firmware that would initialize everything from the PMU to the MMU passing through the DRAM Controller.
#4
(01-02-2017, 08:27 AM)Flint Wrote: Are you talking about the Boot0 SPL or something related with ARM Trusted Plateform ? I didn't see anything related to the SPL's sources on sunxi.
Everything I read and download at sunxi about the Boot0 SPL is either an extracted blob binary or various link to people using it to allow U-Boot loading.

Yep, I've take a look at the apritzel wonderfull works, it is indeed pretty amazing, but he/she work for ARM and so it's relatively easier to do something.

I think that I'll dig a little more on the Boot0 story, as I'm pretty sure that using the A64 Technical Reference Manual allows us to correctly implement a SPL firmware that would initialize everything from the PMU to the MMU passing through the DRAM Controller.

libDRAM which is Boot0. This considers as first entry point at you refer. Your also can check with Alex Graf who implemented EFI on A64.

Just my curiosity, why you have interest on boot0? You can always PM me.
#5
Ok, I didn't know that Allwinner released an open-source version, I'll have a look at it.
Is there any official repo where I can found the sources?

No problem to publicly talk about my work, after all, I'm asking for opening so I have to be too.

I have interest on Boot0 because I'm working to fully integrate the pine64 board with mainline U-Boot for a personal project.
I'm currently working on a Linux distribution for home/laboratory clusters based on pine64.

I can't use the remarkable work of Longsleep and other contributor as this distribution will be composed as follow:

Bootloader:
* U-Boot mainline 64Bit version.
* AB Boot partitioning.
* HDMI Video output.
* U-Boot splashscreen.

System:
* Linux Kernel 4.x Series.
* Minimal OS (Kernel + shell + required tool).
* Systemd integration.
* Snapcraft software packaging/distribution/isolation.
* Automatic reversible atomic updates.

I perfectly know that huge blockroads are on the way, but hey! Rome didn't built up in a day neither Linux :p and it is a side project which I have plenty time to play around with.
#6
(01-03-2017, 06:53 AM)Flint Wrote: Ok, I didn't know that Allwinner released an open-source version, I'll have a look at it.
Is there any official repo where I can found the sources?

No problem to publicly talk about my work, after all, I'm asking for opening so I have to be too.

I have interest on Boot0 because I'm working to fully integrate the pine64 board with mainline U-Boot for a personal project.
I'm currently working on a Linux distribution for home/laboratory clusters based on pine64.

I can't use the remarkable work of Longsleep and other contributor as this distribution will be composed as follow:

Bootloader:
* U-Boot mainline 64Bit version.
* AB Boot partitioning.
* HDMI Video output.
* U-Boot splashscreen.

System:
* Linux Kernel 4.x Series.
* Minimal OS (Kernel + shell + required tool).
* Systemd integration.
* Snapcraft software packaging/distribution/isolation.
* Automatic reversible atomic updates.

I perfectly know that huge blockroads are on the way, but hey! Rome didn't built up in a day neither Linux :p and it is a side project which I have plenty time to play around with.

Allwinner don't release libdram code as open source due to some security concern that they have. However, Sunxi folks already figure out. If you ready need the libdram code, you can PM me. For mainline, please check on apritzel work: https://github.com/apritzel/u-boot/blob/...DME.pine64

For cluster usage, this may interest you: https://github.com/apritzel/u-boot/blob/...DME.pine64
#7
(01-04-2017, 06:50 PM)tllim Wrote: Allwinner don't release libdram code as open source due to some security concern that they have. However, Sunxi folks already figure out. If you ready need the libdram code, you can PM me. For mainline, please check on apritzel work: https://github.com/apritzel/u-boot/blob/...DME.pine64

For cluster usage, this may interest you: https://github.com/apritzel/u-boot/blob/...DME.pine64

Ok, I understand.

Thanks a lot for your answer, I'll try to start with the Boot0 blob implementation and drop you a PM if I really need the sources.


For now, as far as I read, due to Longsleep, Ayufan, Apritzel and many other contributor, I should be able to achieve what I want to show.


Forum Jump:


Users browsing this thread: 1 Guest(s)