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
buzzmarshall has joined #linux-amlogic
jacobk has quit [Ping timeout: 260 seconds]
chewitt has joined #linux-amlogic
chewitt has quit [Ping timeout: 246 seconds]
montjoie has quit [Ping timeout: 246 seconds]
montjoie has joined #linux-amlogic
Consolatis has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
jacobk has joined #linux-amlogic
Consolatis has joined #linux-amlogic
jacobk has quit [Ping timeout: 246 seconds]
jacobk has joined #linux-amlogic
chewitt has joined #linux-amlogic
jacobk has quit [Read error: Connection reset by peer]
chewitt has quit [Ping timeout: 260 seconds]
jacobk has joined #linux-amlogic
jacobk has quit [Ping timeout: 264 seconds]
jacobk has joined #linux-amlogic
camus has joined #linux-amlogic
jacobk has quit [Ping timeout: 264 seconds]
luka177 has quit [Ping timeout: 245 seconds]
chewitt has joined #linux-amlogic
chewitt has quit [Ping timeout: 246 seconds]
hexdump0815 has quit [Ping timeout: 246 seconds]
hexdump0815 has joined #linux-amlogic
chewitt has joined #linux-amlogic
chewitt has quit [Ping timeout: 260 seconds]
buzzmarshall has quit [Quit: Konversation terminated!]
JohnnyonFlame has quit [Read error: Connection reset by peer]
luka177 has joined #linux-amlogic
ck_98 has joined #linux-amlogic
chewitt has joined #linux-amlogic
chewitt has quit [Ping timeout: 246 seconds]
f11f12 has joined #linux-amlogic
chewitt has joined #linux-amlogic
luka177 has quit [Ping timeout: 260 seconds]
camus1 has joined #linux-amlogic
camus has quit [Ping timeout: 260 seconds]
camus1 is now known as camus
luka177 has joined #linux-amlogic
chewitt has quit [Quit: Zzz..]
chewitt has joined #linux-amlogic
chewitt has quit [Client Quit]
luka177 has quit [Ping timeout: 246 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 245 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 246 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 250 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 250 seconds]
zkrx has quit [Ping timeout: 245 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 246 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 245 seconds]
luka177 has joined #linux-amlogic
ck_98 has quit [Ping timeout: 240 seconds]
luka177 has quit [Ping timeout: 245 seconds]
ck_98 has joined #linux-amlogic
luka177 has joined #linux-amlogic
zkrx has joined #linux-amlogic
luka177 has quit [Ping timeout: 246 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 245 seconds]
zkrx has quit [Ping timeout: 246 seconds]
luka177 has joined #linux-amlogic
zkrx has joined #linux-amlogic
luka177 has quit [Ping timeout: 246 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 260 seconds]
luka177 has joined #linux-amlogic
ck_98 has quit [Ping timeout: 246 seconds]
luka177 has quit [Ping timeout: 246 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 260 seconds]
luka177 has joined #linux-amlogic
ck_98 has joined #linux-amlogic
luka177 has quit [Ping timeout: 246 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 246 seconds]
luka177 has joined #linux-amlogic
chewitt has joined #linux-amlogic
luka177 has quit [Ping timeout: 246 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 260 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 245 seconds]
alexeymrvz has joined #linux-amlogic
<alexeymrvz> Hi narmstrong! Can you please check this thread https://lore.kernel.org/all/20230706112020.24528-2-avromanov@sberdevices.ru/ and give some comments?
luka177 has joined #linux-amlogic
alexeymrvz has quit [Ping timeout: 246 seconds]
luka177 has quit [Ping timeout: 245 seconds]
chewitt has quit [Quit: Zzz..]
luka177 has joined #linux-amlogic
f_ has joined #linux-amlogic
<f_> hit some interesting stuff while trying to feed lepotato's bl2.bin into Ghidra
<f_> It can't find any function...great start!
<lvrp16> 🤣
alexeymrvz has joined #linux-amlogic
<f_> (except for UndefinedFunction_d9001000 which turns out to be bl2_entrypoint and was originally written in assembly)
<f_> lvrp16: ¯\_(ツ)_/¯
<lvrp16> This is probably why they ended S905.
<f_> If it's because of obfuscation (doubt) then why didn't they do the same for BL1?
chewitt has joined #linux-amlogic
<f_> (someone dumped a BL1 from some ZTE set-top box (which was censoring UART logs) and did find valid code)
<f_> (they used Frédéric's amlogic-usbdl. that was yesterday)
<f_> (that ZTE box was using an S905X, so gxl)
<f_> I also doubt bl2.bin is encrypted
<f_> (ghidra did find code for bl2_entrypoint)
<f_> (and there are some strings found too)
<f_> So ¯\_(ツ)_/¯ no idea what's happening
<f_> I should probably dump lepotato's BL1 as well as my KII Pro's BL1
<f_> I'm way too curious.
<f_> Hmm
<f_> >b LAB_d9001800
<lvrp16> We get blx in binary format. Have you tried on bl2.bin?
<lvrp16> Instead of bl2_new.bin
<f_> That's bl2.bin
luka177 has quit [Ping timeout: 264 seconds]
<f_> but now that I think about it I should really feed bl2_acs.bin instead.
<f_> I made the mistake of decompiling bl2.bin instead of bl2_acs.bin.
<f_> Mostly fine, but bl2.bin has a stub acs inside
<f_> Meanwhile, on gxbb bl2.bin:
<f_> >b bl2_entrypoint ; at 0xD9001008
<f_> ^ that's what gets run at 0xD9001000
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 260 seconds]
<f_> So let's compare bl2_entrypoint in gxl bl2.bin to the same function in gxbb bl2.bin
<f_> I know enough assembly to be able to compare
<f_> and they're completly different :P
<f_> So either Amlogic obfuscated it all or I screwed up something
<f_> I must have screwed up something though. I don't think Amlogic even made an attempt at obfuscating
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 246 seconds]
f11f12 has quit [Quit: Leaving]
naoki has quit [Quit: naoki]
<f_> 00000080: 0000 0014 1f20 03d5 1f20 03d5 1f20 03d5 ..... ... ... ..
<f_> 00000090: 1f20 03d5 1f20 03d5 1f20 03d5 1f20 03d5 . ... ... ... ..
<f_> ^ I see this multiple times
<f_> before actual "meaningful" stuff, at offset 0x600 maybe
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 245 seconds]
<f_> so....what in the world is this :P
<f_> Despite this Ghidra should still be able to find some valid code which it can't :P
luka177 has joined #linux-amlogic
alexeymrvz has quit [Ping timeout: 246 seconds]
luka177 has quit [Ping timeout: 245 seconds]
<f_> ...
<f_> if I set the arch to 32-bit arm it finds code and functions
* f_ facepalms.
* f_ is confused.
<f_> I guess it's invalid code though
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 260 seconds]
<f_> pretty weird if you ask me
luka177 has joined #linux-amlogic
buzzmarshall has joined #linux-amlogic
luka177 has quit [Ping timeout: 240 seconds]
<f_> Wait a second
<f_> the p212 bl2.bin disassembly is different from the lepotato bl2.bin disassembly..?
<f_> They're different somehow?
<lvrp16> It is probably for the m0 core?
<lvrp16> Or they running in aarch32?
<f_> No idea
luka177 has joined #linux-amlogic
<f_> But now with the p212 binary it does find actual code
<f_> but no idea what's wrong with the lepotato/lafrite binaries ¯\_(ツ)_/¯
<f_> maybe they're actually wrong and broken?
<f_> Or someone tampered with them?
<f_> Just to be sure I'll clone the libretech-amlogic-boot repo
<f_> because maybe the binaries in LibreELEC/amlogic-boot-fip are wrong?
ck_98 has quit [Remote host closed the connection]
ck_98 has joined #linux-amlogic
<lvrp16> Those are pretty old.
<f_> The LibreELEC ones?
luka177 has quit [Ping timeout: 244 seconds]
<f_> In libretech-amlogic-boot I see bl2.bin and bl2.v3.bin
<f_> git branch: master, thelinuxmacbook:gxl » cmp *
<f_> bl2.bin bl2.v3.bin differ: byte 5, line 1
<f_> And they differ, of course
<f_> but running objdump:
<f_> 4: d900ab00 .inst 0xd900ab00 ; undefined
<f_> 0: 14000200 b 0x800
<f_> 0000000000000000 <.data>:
<f_> 8: 14000000 b 0x8
<f_> c: d503201f nop
<f_> ^ bl2.v3.bin
<f_> Same for bl2.bin
<f_> but what about p212/bl2.bin
<f_> 0000000000000000 <.data>:
<f_> 0: 14000002 b 0x8
<f_> 4: d900a310 stlur x16, [x24, #10]
<f_> c: aa0103f5 mov x21, x1
<f_> 8: aa0003f4 mov x20, x0
<f_> Completly different
<f_> So no idea what's wrong with these
<f_> I recently set up a MoinMoin instance, which will be where I'll be documenting my discoveries going forward.
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 245 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 260 seconds]
<f_> So I asked that person with the weird ZTE device which mangled UART logs to resend me their BL1 dump, fed it into ghidra, and I see the same thing they saw
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 246 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 246 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 245 seconds]
ck_98 has quit [Ping timeout: 244 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 246 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 244 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 260 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 245 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 246 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 246 seconds]
luka177 has joined #linux-amlogic
f_ has quit [Quit: Disconnecting.]
f_ has joined #linux-amlogic
<f_> I'm looking at that BL1 dump in ghidra
<f_> now that's real reverse-engineering!
<f_> >gcc version 4.8
<f_> lol
<f_> >pepsi.amlogic.c
<f_> Pepsi reference?
<minute> big sadness, a311d can't link (pcie) with wd blue 2TB nvme ssd
<minute> (phy link never came up)
<f_> Sad.
<lvrp16> minute: you probed the physical layer?
luka177 has quit [Ping timeout: 260 seconds]
luka177 has joined #linux-amlogic
<minute> lvrp16: yes, indeed it was just a hw problem... reset not connected
<lvrp16> reset gpio?
<lvrp16> they shoved it on the wrong pin?
<minute> no, i didn't connect it on my adapter :3
<minute> (my fault)
<lvrp16> :D
<minute> finally 2TB in this laptop
<lvrp16> I've been running through all the tests, it's pretty efficient.
<f_> Nice
<lvrp16> Our board is running at 1.27W idle without any tuning.
<lvrp16> With a laptop sized battery, that's pretty much forever lol
<minute> lvrp16: which processor?
<f_> gxl
<lvrp16> A311D
<minute> nice
<f_> You're talking about cottonwood?
<lvrp16> f_: yeah, we have 30 or so samples, 5 of them are running 24/7 benchmarking right now
<f_> Nice
<lvrp16> make sure there's no issues, we had a bunch of problems we had to address
<f_> Excited to see them get released
<lvrp16> mainly inflow current with USB devices
<lvrp16> the board would just shutdown if you plugged in the newer SSD USB flash drives.
<lvrp16> The board itself maxes out at 7W.
<lvrp16> So you throw A311D into a laptop like minute is doing and it'll last pretty much 3-4 days.
<f_> If only I could say the same of my current laptop :^)
<f_> (lasts ~1-2 hours)
<lvrp16> yeah, I'm tempted to build a laptop with S928X
<lvrp16> Single A76 core
<lvrp16> probably power efficient as anything
<lvrp16> but then I'd be short a couple hundred K on upstream haha
<lvrp16> nerds can dream
hexdump0815 has quit [Quit: WeeChat 1.9.1]
hexdump0815 has joined #linux-amlogic
<f_> lol
jacobk has joined #linux-amlogic
f_ has quit [Ping timeout: 246 seconds]
luka177 has quit [Ping timeout: 246 seconds]
luka177 has joined #linux-amlogic