<CyReVolt>
Yup, with huge thanks again to Libre Computer for giving out hardware at Kernel/Embedded Recipes <3
<CyReVolt>
hi lvrp16 :)
<f_>
They'll be giving the same hardware to me too :) + the lepotato and lafrite they already donated
<CyReVolt>
woop woop :)
<lvrp16>
Yeah toys are always fun.
<f_>
Indeed
<lvrp16>
But the community does a lot more than us.
<lvrp16>
And we benefit.
<CyReVolt>
I'm also involved in the oreboot project (coreboot fork without C / written in Rust), and I'd be delighted to have some Amlogic support. So far, we have 3 RISC-V SoCs and I translated lots of DRAM init. :D
<CyReVolt>
I'll be at Open Source Firmware Conference https://osfc.io next week and give a status update. I am not sure if we'll have live streams; otherwise, recordings will be published some weeks later or so.
<f_>
although I tend to always say that 'rust is rusty' lol
<CyReVolt>
Heh, tbh, I'm just glad to have it. I'm used to it, I don't really know how to write C (can read it mostly though unless there is heavy pointer void whatever hackery xD). ^^
<CyReVolt>
So yea, you wrote that you looked at the blob that does DRAM init for the Amlogic GX (I think?) SoCs; I am not yet too familiar with their generations/families etc.. Is there a wiki somewhere, like the linux-sunxi wiki? I looked at Wikipedia, which has quite some overview, but still not too easy to navigate and missing some bits.
<f_>
CyReVolt: https://linux-meson.com/ has a very nice image narmstrong made with the SoC families
<CyReVolt>
And I have to admit that I am not yet too familiar with the whole bl1,2,3 etc stuff in aarch64 boot flows. It seemed to me, just from what I looked at, there is a lot of per vendor / per SoC custom stuff, so it's hard to generalize again, and the initial design was already a bit messy. =)
<CyReVolt>
Ah, right, Meson is the codename - thanks!
<f_>
I can explain if you want
<f_>
'meson' is getting deprecated in favor of 'amlogic' IIRC
<CyReVolt>
excellent - let me reboot here and I'll be back in a few minutes; upgrading laptop firmware
<f_>
Actually I should add that to my moinmoin instance
<f_>
CyReVolt: sure
<CyReVolt>
oh well it'll take a while still for other things to download
<f_>
¯\_(ツ)_/¯
<CyReVolt>
So yea, I also added some notes to my repo. I wonder how many mask ROM protocols there are. Some are reimplemented in software again, like in the vendor U-Boot etc., IIUC? Can you list those, or is that also still a mystery to you? So far I know the GX thingy (S905X, S905D3) and the ADNL thing (from S905X4).
<f_>
Haven't looked much at USB mode. I initially just wanted to be able to load U-Boot into DRAM and have it boot linux.
<f_>
We can do that now on GXBB/S905, just need to repeat for GXL/S905X/S805X :D
JohnnyonFlame has joined #linux-amlogic
CyReVolt has quit [Remote host closed the connection]
<f_>
it's just a C struct inside BL2 that's painfully replaced by a custom board-specific one by running a python script
<f_>
"replaced with..."
<CyReVolt>
ah so at build time
<CyReVolt>
gotcha
<f_>
Indeed
<CyReVolt>
I know the idea of HOBs (hand over blocks) from UEFI designs, so I thought it might be similar; like, one component does a detection and other stuff, then hands over to another that also needs part of the detected information
<CyReVolt>
anyway, could you expand on the SCP acronym on that boot process page? :)
<f_>
Just means System Control Processor
<CyReVolt>
Or do you have a collection of acronyms?
<CyReVolt>
I mean, I know it now, just thought would be good to have it where all the acronyms appear so you don't need to remember them all
<f_>
No, but upstream arm trusted firmware-a docs does
<f_>
It's very much similar to GXBB, but am too lazy to hook up my GXBB set-top box to UART :D
<f_>
Fun fact: that GXBB set-top box is the hardware I used to port U-Boot SPL
<f_>
I don't have anything else that's GXBB
<f_>
so I rely on Kwiboo's ODROID-C2 too :D
<f_>
(he also helped me a whole lot to get SPL to work)
<CyReVolt>
oh cool
<CyReVolt>
I have run an Android aarch64 kernel on my S905X4. Wild. When at some point I saw that they had more than 300 instances of the AMLOGIC Kconfig flag, I just shuddered. xD
<CyReVolt>
A friend of mine also has an ODROID-C2!
<f_>
lol
<CyReVolt>
He's currently struggling with booting from an SD card :D
<CyReVolt>
Okay. So does Amlogic also work with a header without a signature? I am used to sunxi / Allwinner, which is much simpler - just some bytes of a header with a checksum suffice.
<CyReVolt>
Hmm Kwiboo doesn't ring a bell to me, I think. What I want to do is work with the USB loader right away. Do I *have* to have BL1,2,3 etc? I am not too familar with Arm / aarch64 yet. I suspect that switching ELs requires multiple binaries. But technically, I could stay in the initial EL and access everything, correct?
<f_>
BL1 is in ROM
<f_>
AFAIK the BL1 USB mode is only used to load BL2
<f_>
BL2 then goes into its USB mode and waits for all other images
<CyReVolt>
Oh, okay, gotcha!
<f_>
except if that BL2 is actually my U-Boot SPL build
<f_>
in that case it will panic()
<CyReVolt>
So when I tell the mask ROM to loader something to SRAM and run it, that thing I give it is treated as BL2?
<f_>
I think so, yes.
<CyReVolt>
Thank you so much, I already learned a ton!
<CyReVolt>
Does Amlogic start in 64-bit mode? IIRC correctly, sunxi aarch64 SoCs actually start in 32-bit mode ...
<f_>
gxbb and gxl start in 64-bit mode
<f_>
(although newer gxl bl2 are 32-bit)
<CyReVolt>
so this is SM1..
<CyReVolt>
I will try 32-bit
<f_>
SM1 should start in 64-bit mode too
<f_>
Kwiboo tested 64-bit SPL in SM1 and it ran something
<CyReVolt>
yea no blinky with 32bit
<f_>
Looks more like a code problem rather than a header problem
<Kwiboo>
yeah, all socs seem to run at aarch64 mode, newer at EL3 and older one at EL1, newer bl2 for gxl seem to install exception vectors at aarch64 mode then it change to aarch32 mode, guessing to reduce code size
<f_>
Guessing that too
<f_>
Or they trying to workaround something
<f_>
*them
<f_>
GXBB and GXL run at EL1, newer SoCs e.g. G12 and SM1 run BL2 at EL3
<f_>
Doesn't matter much for U-Boot SPL as on those older SoCs we restart execution at EL3 anyway
<Kwiboo>
if I remember commit log corretly the change to aarch32 for gxl bl2 happended when new ddr code was added, could have been to support new ddr/lpddr init in same blob took too much space
<Kwiboo>
CyReVolt: yeah, looks like you code could work, wonter if it runs too fast and you never see any blink because of that?
<CyReVolt>
If it works, I should see the LED at half brightness or something - it's a loop after all
<CyReVolt>
let me remove the turning off though, to verify
<CyReVolt>
nope, no light :/
<f_>
which board?
<f_>
solitude?
<CyReVolt>
ok I messed it up
<CyReVolt>
I GOT LIGHT!
<CyReVolt>
I fiddled too much and wrote the wrong values lol
<f_>
lol
<f_>
CyReVolt: amlimage only exists on my tree and Kwiboo's
<f_>
So perhaps you should reflect that somewhere?
<CyReVolt>
yea this is really just for you folks now to see what I tried
<CyReVolt>
I will add a README etc at some point, just wanted to get a bit of an understanding for now
<f_>
Sure
<CyReVolt>
I'm watching Qubes OS Summit in parallel and tomorrow I'll be flying over to the US for OSFC. Didn't even intend to do more today, but you motivated me. :p
<f_>
lol
<CyReVolt>
Anyway, thank you so much!
<f_>
Np!
<f_>
Are you going to install a bouncer after all?
<f_>
lol
<f_>
(pretty unnecessary for this channel)
<CyReVolt>
Nope, I won't... I had that, it was wonky, and tbh if it wasn't for this here, I would not want to be on IRC.
<CyReVolt>
sorry ^^
<f_>
sorry for what
<f_>
A bouncer would be useless here as there are online logs already
<f_>
and I myself use that.
<f_>
I don't run a bouncer...yet
<CyReVolt>
I meant that as in sorry for dismissing IRC ;)
<CyReVolt>
I really appreciate the logs \o/
<f_>
As a previous Matrix user, IRC is just better in many aspects.
<f_>
e.g. sane clients, simple by design, etc
<f_>
The IRC experience will be infinitely better when Libera.Chat transitions to using sable as their IRC daemon
<CyReVolt>
The only thing I really want is an integrated, persistent log so I can scroll back. Having it in a different place is good enough though.
<f_>
CyReVolt: Sable has that feature ;)
<f_>
backlogs, I mean
<f_>
That's why I'm excited for libera.chat to soon switch to using it
<CyReVolt>
yes Hexchat as well, but either way, IRC requires a bouncer or other external log, since you miss things otherwise, like people replying in your absence
<f_>
CyReVolt: I think you didn't understand what I just said
<f_>
sable will be able to send logs to you, just like matrix
<f_>
backlogs, when you're not connected
<f_>
>Complete network state history allows persistent user presence. Users can remain online when their clients disconnect, and can have multiple client connections, potentially on different servers, to a single user session.
<CyReVolt>
ah perfect
<f_>
Sable is still experimental, but I'm excited.
<CyReVolt>
Does Libera run that already? I would need a corresponding client then...
<f_>
it doesn't....yet
<CyReVolt>
oh wow, then I'm really looking forward to it
<f_>
soju looks like a nice and easy to setup bouncer too
<CyReVolt>
they are literally fixing the one key point that kept me out of IRC :D
<f_>
^ neat isn't it? (note: I don't use a macbook)
<CyReVolt>
yup that does it, LEDs keep glowing
Lyude has quit [Quit: Bouncer restarting]
<CyReVolt>
I just got a drink and such, already had the S905D3 datasheet open and scrolled around the timer section, and then you had already found it :D