narmstrong changed the topic of #linux-amlogic to: Amlogic mainline kernel development discussion - our wiki http://linux-meson.com/ - ml linux-amlogic@lists.infradead.org - official channel moved from Freenode - publicly logged on https://libera.irclog.whitequark.org/linux-amlogic
kenny has joined #linux-amlogic
luka177 has quit [Ping timeout: 260 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 260 seconds]
luka177 has joined #linux-amlogic
naoki has joined #linux-amlogic
jacobk has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
luka177 has quit [Ping timeout: 250 seconds]
luka177 has joined #linux-amlogic
hays has joined #linux-amlogic
buzzmarshall has quit [Quit: Konversation terminated!]
JohnnyonFlame has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
luka177 has quit [Ping timeout: 250 seconds]
luka177 has joined #linux-amlogic
GNUtoo has quit [*.net *.split]
GNUtoo has joined #linux-amlogic
JohnnyonFlame has joined #linux-amlogic
luka177 has quit [Ping timeout: 250 seconds]
Daaanct12 has joined #linux-amlogic
Daanct12 has quit [Ping timeout: 240 seconds]
luka177 has joined #linux-amlogic
jacobk has joined #linux-amlogic
luka177 has quit [Ping timeout: 240 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 260 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 250 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Read error: Connection reset by peer]
luka177 has joined #linux-amlogic
f_ has joined #linux-amlogic
f_[xmpp] has joined #linux-amlogic
naoki has quit [Quit: naoki]
luka177 has quit [Ping timeout: 260 seconds]
luka177 has joined #linux-amlogic
rockosov has quit [Ping timeout: 250 seconds]
rockosov has joined #linux-amlogic
camus has quit [Ping timeout: 240 seconds]
camus has joined #linux-amlogic
JohnnyonFlame has quit [Ping timeout: 250 seconds]
gabes has quit [Quit: The Lounge - https://thelounge.chat]
gabes has joined #linux-amlogic
<minute> narmstrong: hi! is this the currently newest version of the DSI patch series? https://lore.kernel.org/all/20230512-amlogic-v6-4-upstream-dsi-ccf-vim3-v5-0-56eb7a4d5b8e@linaro.org/
<minute> narmstrong: i am putting together the first release system image now for our laptops
<f_> Yay!!!
<f_> minute: That's great!
<narmstrong> minute: yep!!
<minute> yeah :3 also i want to use it in my own laptop :D
<minute> narmstrong: ok cool!
<f_> Nice! Tell us about your experience with an Amlogic SoC inside a laptop!
<minute> we demoed the first one (with preproduction adapter) at teardown in portland last weekend (our US representative brendan did)
<f_> Great!
<minute> i think it's a lot of fun, really snappy. i was able to play return to monkey island on it :D
camus has quit [Remote host closed the connection]
<f_> :D
<minute> (which officially needs GL4.5)
<f_> Which SoC?
<f_> Forgot..
<minute> A311D
<f_> Sure
<f_> IIRC these are definitely not made for gaming, yet you were able to game in it. Good job!
<narmstrong> It’s really cool!
luka177 has quit [Ping timeout: 250 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 260 seconds]
luka177 has joined #linux-amlogic
<f_> Amlogic's code is a huge mess
<f_> lots of declared variables for multiple things at once
<f_> For example, there's one variable used as a pointer, and at some point it's just used as a counter..what?
<f_> Could be Ghidra, too.
JohnnyonFlame has joined #linux-amlogic
<lvrp16> minute: BL is working on upstreaming bits for decoder among many other things, should help your use case too
<minute> lvrp16: video decoder?
<lvrp16> yeah, the hevc multicodec decoder, among other things for A311D and S905D3
<lvrp16> ISP/camera still have to figure out the IP block but hopefully get those in next year as well
<lvrp16> our Cottonwood boards are based on these 2 SoCs
<lvrp16> we have a ton followup on these as well
luka177 has quit [Ping timeout: 250 seconds]
luka177 has joined #linux-amlogic
<minute> lvrp16: ohhh that's great
buzzmarshall has joined #linux-amlogic
luka177 has quit [Read error: Connection reset by peer]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 252 seconds]
f_ has quit [Quit: f_]
f_ has joined #linux-amlogic
<f_> Gah. my IRC client hanged. had to kill it.
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 245 seconds]
luka177 has joined #linux-amlogic
vagrantc has joined #linux-amlogic
JerryXiao has quit [Quit: Bye]
JerryXiao has joined #linux-amlogic
JerryXiao has quit [Quit: Bye]
JerryXiao has joined #linux-amlogic
luka177 has quit [Ping timeout: 260 seconds]
luka177 has joined #linux-amlogic
<minute> so i'm trying to build u-boot for a311d (meson g12b) and mainline with the bpi cm4 defconfig builds fine, but what are the next step to make a complete boot image and where does this go on the sd card (offset?) i guess i am supposed to get the blobby at-f from somewhere as well?
<minute> (before i just used the bootloader from an armbian image)
<f_> minute: You need to bundle bl2+fip containing bl30,bl31, and U-Boot
<minute> f_: thanks, is there a recipe or script for that some... ah
<f_> just run ./build-fip.sh board u-boot.bin [output]
ndufresne has quit [Quit: The Lounge - https://thelounge.chat]
<minute> f_: thank you!
<f_> Np.
<f_> Just to let you know, you can replace the proprietary BL31 with one built from upstream TF-A.
<f_> at least on gxbb and gxl, I think it should work on g12b too.
ndufresne has joined #linux-amlogic
<f_> But for BL2 and BL30, you can't replace them for now..
<minute> ok, good to know
<f_> And while I'm working on porting TF-A BL2 to gxbb and will port for gxl too, I don't think g12b will get TF-A BL2 for now..
<f_> Well..I most likely won't be working on it as I don't have any g12b board
<f_> And I don't know how similar it is to the gxbb/gxl.
<minute> the naming of the _1d and _2d of the ddr4 controller fw is similar to imx8mq, hmm
<f_> Pretty sure Amlogic use Synopsys DDR controllers.
<f_> At least on gxbb and gxl, it may be the case for g12b too.
<minute> yes, it is actually the same or very similar firmware
<minute> i just opened a hex editor on both
<f_> Oh really?
<minute> yes
<minute> on imx8mq:
<minute> 00000050 69 20 40 00 4a 26 00 70 4a 26 00 70 4a 26 00 70 |i @.J&.pJ&.pJ&.p|
<minute> a311d:
<minute> 000000b0 69 20 40 00 4a 26 00 70 4a 26 00 70 4a 26 00 70 |i @.J&.pJ&.pJ&.p|
<f_> Maybe a different version, but woah
<minute> woah indeed :3
<minute> the imx8mq ddrc firmware is the only required firmware blob at the moment
<f_> the iMX8MQ DDR controller firmware is proprietary I guess.
<f_> We actually don't have that on older SoC generations
<f_> I think the firmware is written in a ROM, but can't know for sure.
<minute> yes, proprietary
<minute> for imx8mq, the firmware is split into imem and dmem
<f_> but older SoC generations don't actually have DDR firmware loaded by BL2 (I guess it's loaded by BL2?)
<minute> on a311d they are merged
<minute> on imx8mq the ddr fw is loaded by u-boot
<f_> U-Boot SPL I guess?
<minute> i think so
<minute> yeah
<f_> Sorry, not very familar with the iMX8*
<f_> It does mean g12b uses a Synopsys DDR controller....just like pretty much any other 64-Bit Amlogic SoC.
<minute> yeah
<f_> (not) nice
<f_> nice because there may not be a big difference
<f_> not nice because........no full datasheet on those are available publicly and Amlogic doesn't even know how it works :P
<f_> Off to a great start! :P
<f_> If you look at timing.c, you'll see that there are lots of struct members
<f_> seriously, there's a lot.
<f_> Especially in ddrs
<f_> (also called __ddr_setting)
<f_> Most of them are..guess what? dumps of registers!
* f_ checks decomp notes.
<f_> See that function?
<f_> If you read it you'll note that it mostly just (re)defines more struct members!
<f_> It's an entire mess
<f_> BTW most of these assumptions would be valid only if the WeTek Play2 ACS was used
<f_> ACSBaby actually exists to help me on that, because while acs.bin is GPL'd lots of forks violate the license by not giving sources. https://git.vitali64.duckdns.org/utils/acsbaby.git/about/
<minute> hmm > ./aml_encrypt_g12b bootmk fail[18233]!
<f_> Most likely has some bugs, but it was (and still is) quite useful for reverse-engineering
<f_> minute: hm
<f_> Gotta love how unique Amlogic's error messages are :P
<minute> yeah
<f_> from "Err: sha." to "bootmk fail[18233]!" and "DataBus test fail!!!"
<f_> and "DDR Timing err, reset..."
<f_> But which binaries did you use?
<f_> Which U-Boot binary?
<minute> f_: what i did is > ./build-fip.sh bananapi-cm4io ../u-boot/u-boot.bin a311d.fip
<f_> And the directory a311d.fip exists?
<minute> no :D
<minute> ah, i thought this was supposed to be a file
<minute> f_: that was it, thanks a lot :D
<f_> It's supposed to be a directory where it'll put your final u-boot.bin and u-boot.sd.bin binaries.
<minute> yep, those exist now
<f_> (which are the same)
<f_> minute: Np!
<f_> Happy to help
<minute> neat. also i didn't realize that it can boot directly off usb
<f_> What
<minute> there's u-boot.bin.usb.bl2 and u-boot.bin.usb.tpl
<minute> and if there's no boot medium i also get this output loop over serial that mentions usb
<f_> I think these are to be sent with Amlogic's USB protocol tool or pyamlboot
<minute> ahhh
<minute> ok
<minute> is there an offset for u-boot.bin.sd.bin on the sd card? or 0?
<f_> Yeah Amlogic SoCs don't boot from USB sticks.
<f_> minute: Yes, offset 512.
<f_> But just write it normally
<f_> according to the instructions
<f_> Let me find that real quick
<minute> thanks, but which instructions do you mean?
<minute> i thought i would just do dd if=u-boot.bin.sd.bin of=/dev/sdx bs=512
<minute> and then some offset perhaps
<f_> $ DEV=/dev/boot_device
<f_> $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1
<f_> $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=440
<minute> oh wow ok
<minute> i didn't realize there was a big README
<f_> Which? the one in the repo?
<f_> Or what I just linked?
<lvrp16> minute: i don't think you need the second line after gxbb
<minute> second line after gxbb?
<lvrp16> gxl and onwards do not need the bs=1 count=440
<minute> ah!
<minute> thanks
<f_> Doesn't that leave space for MBR?
<lvrp16> the 440 already leaves space for MBR
<lvrp16> but from GXL onwards, it avoids MBR sector altogether
<f_> Oh wait I think the eMMC offset changed on gxl, right?
<lvrp16> emmc offset should be 512 too
<f_> Nice.
<lvrp16> you can even use boot0 and boot1 partitions
<f_> Were they unused?
<lvrp16> i mean flashing the entire bootloader onto boot0 and boot1
<f_> and not flashing into mmcblk1 itself, right?
<lvrp16> yeah
<f_> From my eMMC dump I saw the bootloader being flashed to both mmcblk1boot0, mmcblk1boot1, and mmcblk1 itself
<f_> either way, good to know!
<f_> In that case I wonder if those partitions were useless on gxbb
luka177 has quit [Ping timeout: 264 seconds]
luka177 has joined #linux-amlogic
<f_> I'm done!
<f_> Wrote PCTL init!
<f_> FINALLY
<f_> that one was long. Anyway, time to compile and test
Terry137322934 has quit [Quit: Bye Bye]
Terry1373229340 has joined #linux-amlogic
f_[xmpp] has quit [Ping timeout: 260 seconds]
<minute> ok nice, i needed to fix a hardware issue on my module but u-boot boots fine.
<minute> indeed only the offset 512 was necessary
luka177 has quit [Ping timeout: 264 seconds]
luka177 has joined #linux-amlogic
f_ has quit [Quit: eww what's this]
lvrp16 has quit [Server closed connection]
lvrp16 has joined #linux-amlogic
luka177 has quit [Ping timeout: 240 seconds]
luka177 has joined #linux-amlogic
<CounterPillow> I have a meson-g12b S922X device I'd like to make my own mainline based images for. I've heard the bootloader stage (u-boot) needs to be signed with some special tool. Is there an overview somewhere? Also how's mainline looking on that SoC anyway?
<CounterPillow> I saw today that MIPI-DSI is apparently in the pipeline, which is great news cause I'll need that :)
<minute> CounterPillow: i just had to deal with this myself today, but with a311d https://github.com/libreelec/amlogic-boot-fip/
<CounterPillow> thanks
<CounterPillow> Even has the odroid go ultra stuff I'm interested in
<CounterPillow> a-hah, don't even need mipi-dsi for that device, since it's using an HDMI to LVDS bridge apparently
<CounterPillow> Or not? Unclear.
luka177 has quit [Ping timeout: 250 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 264 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 258 seconds]
luka177 has joined #linux-amlogic