rellla changed the topic of #linux-sunxi to: Allwinner/sunxi /development discussion - did you try looking at our wiki? https://linux-sunxi.org - Don't ask to ask. Just ask and wait! - https://github.com/linux-sunxi/ - Logs at http://irclog.whitequark.org/linux-sunxi - *only registered users can talk*
Mangy_Dog has quit [Ping timeout: 260 seconds]
random_yanek has quit [Ping timeout: 240 seconds]
random_yanek has joined #linux-sunxi
[BruceLee] has quit [Quit: bad tastes]
ChriChri_ has joined #linux-sunxi
[OPERATOR] has joined #linux-sunxi
ChriChri has quit [Ping timeout: 246 seconds]
ChriChri_ is now known as ChriChri
[OPERATOR] has quit [Quit: hmmmmm]
gaston1980 has quit [Quit: Konversation terminated!]
_whitelogger has joined #linux-sunxi
[LunarMonsterz] has joined #linux-sunxi
[LunarMonsterz] has quit [Quit: hmmmmm]
[LunarMonsterz] has joined #linux-sunxi
mripard has quit [Read error: Connection reset by peer]
mripard has joined #linux-sunxi
marvs has quit [Ping timeout: 264 seconds]
marvs has joined #linux-sunxi
marvs has joined #linux-sunxi
marvs has quit [Changing host]
wingrime has quit [Ping timeout: 265 seconds]
wingrime has joined #linux-sunxi
[7] has quit [Disconnected by services]
TheSeven has joined #linux-sunxi
cnxsoft has joined #linux-sunxi
[LunarMonsterz] has quit [Quit: https://giphy.com/gifs/YQitE4YNQNahy/fullscreen]
JohnDoe_71Rus has joined #linux-sunxi
cmeerw has joined #linux-sunxi
netlynx has joined #linux-sunxi
netlynx has joined #linux-sunxi
jo0nas has quit [Read error: Connection reset by peer]
iamfrankenstein has joined #linux-sunxi
jo0nas has joined #linux-sunxi
jo0nas has quit [Read error: Connection reset by peer]
jo0nas has joined #linux-sunxi
iamfrankenstein has quit [Quit: iamfrankenstein]
ganbold has joined #linux-sunxi
ganbold_ has quit [Ping timeout: 256 seconds]
Mangy_Dog has joined #linux-sunxi
\\Mr_C\\ has quit [Quit: (Read error: Connection reset by beer)]
ganbold has quit [Ping timeout: 265 seconds]
ganbold has joined #linux-sunxi
[VroomAutist] has joined #linux-sunxi
ganbold_ has joined #linux-sunxi
jbrown has quit [Ping timeout: 272 seconds]
jbrown has joined #linux-sunxi
gsz has joined #linux-sunxi
ganbold has quit [Ping timeout: 264 seconds]
CC0422 has joined #linux-sunxi
paynode has joined #linux-sunxi
cnxsoft has quit [Read error: Connection reset by peer]
cnxsoft1 has joined #linux-sunxi
CC0422 has quit [Quit: -a- IRC for Android 2.1.57]
cmeerw has quit [Ping timeout: 240 seconds]
cmeerw has joined #linux-sunxi
gsz has quit [Quit: Konversation terminated!]
ganbold__ has joined #linux-sunxi
ganbold_ has quit [Ping timeout: 240 seconds]
[VroomAutist] is now known as [ZodiacWarrior]
freemangordon has quit [Remote host closed the connection]
gaston1980 has joined #linux-sunxi
lurchi_ has joined #linux-sunxi
ganbold has joined #linux-sunxi
cnxsoft1 has quit [Quit: cnxsoft1]
ganbold__ has quit [Ping timeout: 256 seconds]
[ZodiacWarrior] has quit [Quit: When your reflect starts rolling on to the sphere]
<Ashleee> hmm how do I adb into the Tanix TX6? :)
<Ashleee> I've installed busybox
<Ashleee> now what? :D
<Ashleee> I need bash
<Ashleee> and termux doesn't talk to the busybox :(
<Ashleee> yees got busybox devmem >:D
<Ashleee> no /dev/mem though
<Ashleee> oh no config_devmem
<Ashleee> grr :)
<Ashleee> jernej, no luck here apparently, how do I read this without /dev/mem? :D
<Ashleee> tried torchering it today for 20 minutes and it still wouldn't go past memory init so I need to dump the regs
<jernej> try "busybox devmem"
<jernej> but you'll be able to read only one reg at a time
<Ashleee> even without /dev/mem itself?
<jernej> idk, try it
<Ashleee> "can't open /dev/mem"
<Ashleee> no such file or directory (which I checked and isn't there, duh :) )
<Ashleee> why are you making it so hard, Tanix >:(
<jernej> well, there is another way but a bit more involved
<jernej> using mainline U-Boot with libdram
<jernej> it can be a pain to compile it but you can then read all DRAM registers
<Ashleee> let's see if I can find it all
<Ashleee> libdram replaces ATF?
<Ashleee> or some other part of uboot?
<jernej> actually, only DRAM initialization
<jernej> but be aware that libdram is 32-bit only, so you have to build U-Boot in 32-bit mode
<Ashleee> hmm
<jernej> I would skip ATF in such case, U-Boot still works
anarsoul has quit [Ping timeout: 256 seconds]
<Ashleee> I mean at the worst case I could buy a TV and use it as-is... haha
anarsoul has joined #linux-sunxi
lurchi_ is now known as lurchi__
<juri_> Ashleee: keep me posted.. i've got one of those in my shopping cart. :P
<Ashleee> :D
<Ashleee> I have 3 and each is different
<Ashleee> 2 worked flawlessly
<Ashleee> 1 required eMMC patch to slow it down
<Ashleee> and 1 doesn't go through DRAM PHY init
<Ashleee> I'd say do not go for chinese tx6 that can be a clone of a clone that has all kinds of irregularities :P
<Ashleee> oh for crying out loud, the tutorial for h6 libdram requires the original h6 bsp from pine64 but the links on their wiki give me 404 :(
romanstratiienko has quit [Ping timeout: 260 seconds]
<Ashleee> I need hexdump to send it somewhere or pine to fix their links :)
rsglobal has joined #linux-sunxi
<jernej> I can upload it
lurchi__ is now known as lurchi_
<Ashleee> thanks
<Ashleee> and bl31? :)
<jernej> you don't need it
<Ashleee> even to actually boot something?
<Ashleee> or just to dump the regs?
<jernej> you'll get into U-Boot prompt
<jernej> which is enough for dumping DRAM regs
<jernej> dm.w command iirc
<Ashleee> ok
<Ashleee> thanks :)
RichardG867 has quit [Quit: Keyboard not found, press F1 to continue]
RichardG867 has joined #linux-sunxi
<Ashleee> hmm that libdram is setting 840MHz clock yet it should be only at 667 jernej ... it stops after "DRAM zq value: 3b3bfb"
<jernej> you have to adjust parameters
<Ashleee> within libdram?
<Ashleee> or is it within spl?
<jernej> where libdram code is called, in spl
<Ashleee> oh found the config
<Ashleee> hmm the config optino is only without libdram :) time to go into the code it seems
<smaeul> would running something like https://github.com/NateBrune/fmem work from the stock OS to dump the DRAM registers?
<Ashleee> gah, don't know all the other libdram tpr values, just setting lower clk doesn't help :(
<Ashleee> wasn't there some dump of the values extracted from boot0 for each device?
<Ashleee> ooh debian has tanix tx6 in bullseye
<Ashleee> let's check what they have done with uboot there
<Ashleee> oh unsupported bootstrapping..
<jernej> Ashleee: you can get libdram settings from DT file extracted from Android update/image for your box
<Ashleee> hmm there's timing in dt as well? had no idea
<Ashleee> I pulled the original OS from another box btw as well
<Ashleee> so I don't have to give them my email
[VroomAutist] has joined #linux-sunxi
[VroomAutist] is now known as [VroomAutism]
deesix has quit [Ping timeout: 246 seconds]
dddddd has quit [Ping timeout: 260 seconds]
deesix has joined #linux-sunxi
dddddd has joined #linux-sunxi
Nakaori has joined #linux-sunxi
Nakaori has quit [Remote host closed the connection]
tmlind_ has joined #linux-sunxi
Nakaori has joined #linux-sunxi
<Ashleee> .. right at the bottom, found it, thanks ! :)
<Ashleee> wow really? changed the numbers to the ones from dtb and now it won't even go anywhere past "DRAM VERSION IS V2_7" >:(
warpme_ has joined #linux-sunxi
tmlind_ has quit [Ping timeout: 240 seconds]
tmlind_ has joined #linux-sunxi
freemangordon has joined #linux-sunxi
<jernej> Ashleee: it's possible that libdram is too old
<jernej> can you check output from your box? it should print version
<Ashleee> hmm :) it's V2_7 and stock was 2_78 I think
<Ashleee> let me re-check in a sec
<Ashleee> interesting, after re-inserting the numbers one by one and always retrying it still isn't booting past the DRAM zq .. line but it isn't stuck after version either
<Ashleee> wtf is this
<Ashleee> even after mrproper ;o
<Ashleee> yep 2_78
<Ashleee> "wow it actually started booting!" I thought only to realize I forgot to plug in the card
<jernej> oh, which DDR you have? DDR3?
<Ashleee> DDR3
<Ashleee> in a sec :) got one more value I overlooked (0x09090900 vs 0x00090909)
<jernej> ok, then disregard my previous link
<Ashleee> hmm no luck with copied settings from the dt
<Ashleee> https://imgur.com/a/X1uNyLz I am not blind anywhere am I?
<jernej> can you test these? https://pastebin.com/raw/XMkK7LxN
<Ashleee> I am, tpr13
<Ashleee> yup changing tpr13 0x2001 -> 0x2000 as is in DTB makes it stuck after DRAM VERSION
<Ashleee> let's see about those
<Ashleee> jernej, those look like tpr0-2 is swapped with 3-6? :)
<Ashleee> and tpr0-2 copy mr4-6
<Ashleee> hm bigendian vs little endian?
<Ashleee> jernej, nope, with that settings a bunch of BYTE0 GATE ERRO IS = 1
<jernej> which box is this exactly?
tmlind_ has quit [Ping timeout: 256 seconds]
<Ashleee> Tanix TX6
<Ashleee> the one with mixed Q-die and B-die Samsung memory chips :)
<jernej> hm... I don't know what to suggest now
<jernej> I know that there is newer libdram accessible somewhere on net but I forgot where
<jernej> with values from DT
<Ashleee> same as 2_7
<Ashleee> only VERSION IS V2_5 and dead
<Ashleee> what's the tpr13 changing... the last bit...
<Ashleee> switching the lowest bit goes to the "DRAM zq value" as with v2_7
<Ashleee> if only I could extract the v2_78 :) but it is in binary form, not in elf :(
<Ashleee> so no headers
<jernej> seems that bit 0 in tpr13 disables rank detection
<jernej> and bit 13 in tpr13 disables dram type detection
<jernej> I guess you can set it to 0 and try again
jonasbits_ is now known as jonasbits
<jernej> Ashleee: run Android and check serial output during boot - it should contain proper values for dram_para1 and dram_para2
<jernej> along with correct frequency
<Ashleee> ooh interesting, you're right, para2 in dt is different to para2 in boot log
<Ashleee> and para1 as well
<Ashleee> really odd :)
<Ashleee> to be fair I pulled the OS image from another box from the batch so hoping they're identical
<Ashleee> uh what did I break, getting the GATE ERROR non stop now :)
<Ashleee> ok the bit13 in tpr13 has to be set otherwise I get those gate errors
<Ashleee> hmm still nothing, set the para1 and para2 to values from the stock boot and still stuck after DRAM zq value
<Ashleee> (or nowhere with the lowest bit unset)
<Ashleee> this isn't funny anymore :) time to pull the big ones.
<Ashleee> I mean libdram has to be called with the same args somewhere?
<Ashleee> is it called with the struct directly and not pushed onto the stack one by one?
[VroomAutism] has quit [Quit: True ignorance is to ignore whatever makes you happy and that's all in fact :)]
<Ashleee> yeah.
[VroomAutist] has joined #linux-sunxi
<Ashleee> found it in hexdump the struct possibly
[VroomAutist] is now known as [VroomAutism]
<Ashleee> hmm I wonder if they are *not* identical the two boxes
<Ashleee> as hexdump says para1 0x310b but dt and binary of the one I dumped says 0x30eb
<Ashleee> same for para2 0x0 vs 0x0c000000
<Ashleee> but then again I may havej ust stumped upon the compiled dtb... and wasted 10 minutes of my time :V
<Ashleee> oh yes I was hexdumping the dtb instead of the boot values :)
<Ashleee> and dtb doesn't match the struct contents ..
<Ashleee> at least para1/2
<jernej> well, it's entirely possible that older libdram doesn't work with your setup and that's why also mainline U-Boot doesn't work
<jernej> it would be nice to get hold on newer libdram, ideally same version as in your box
<Ashleee> yeah
<Ashleee> I mean I could just dump it, it was extracted elf anyways :P
<Ashleee> hoping it isn't relocatable
<jernej> well, libdram obtained from SDK contains a lot of useful symbols which ease reverse engineering
<Ashleee> I meant just to try booting it with this hybrid 32bit and 64bit spl :)
<Ashleee> before going full opensource
<Ashleee> update: fixed all values compared to the source and still no luck
<Ashleee> still stuck after DRAM zq value
<Ashleee> so maybe old LIBDRAM indeed
netlynx has quit [Quit: Ex-Chat]
<Ashleee> oh the libdram is relocatable :(
<jernej> of course it is, it's just compressed .o file
<jernej> why would that be a problem?
<Ashleee> cannot dump it from a image of the OS? :)
<Ashleee> to reinsert it somewhere else
<jernej> that's highly optimistic
<Ashleee> I like to be, thanks ^^ :D
<jernej> I'm optimist too but not that much :)
<Ashleee> either way, any idea how those mr/tpr args compare to all the regs in dram phy itself, if they do at all?
<jernej> sure, param1 tells number of rows and columns
<jernej> and something else I forgot already
<Ashleee> wondering if I could extract those params and shove them into uboot itself
<Ashleee> the mainline
<jernej> nope
<Ashleee> thought so
<jernej> many of these values are just flags
<Ashleee> for libdram, not for phy I presume
<jernej> not physical register values
<jernej> exactly
<Ashleee> dangit allwinner!
<Ashleee> didn't they have git? :P
<Ashleee> or where to contact them
<jernej> they have it (you can find references to it in sdk) but it's inaccessible :)
<jernej> unless you're serious customer, you won't get anything from them afaik
[VroomAutism] is now known as [JFKennedy]
<jernej> anyway, can you dump SPL from your device?
<jernej> I can load it in ghydra and take a look
<jernej> dram functions should be easy to find
<Ashleee> I do have OS dump from the other box that came in the shipment, guessing their headers are the same
<jernej> currently I just want to have same libdram version
<Ashleee> :) let me dump the first few bytes
<jernej> para1 and para2 are mostly autodetected
<Ashleee> first 512K
<Ashleee> contacting allwinner I guess had no results eh? :)
<Ashleee> more so when the contact form says "success" with php warning above it :D
lurchi_ is now known as lurchi__
<Ashleee> either way I am off to sleep, thanks for all the help today jernej :) if you want to dig through the code I hope it doesn't get deleted soon :P I'd poke it but I haven't gotten used to ghydra
<Ashleee> I grew up on IDA
JohnDoe_71Rus has quit [Quit: KVIrc KVIrc Aria 5.0.1, revision: 5.0.1+git-7433-0df9f22f2, build type: debug, sources date: 20160102, built on: 2019-12-08 19:19:20 UTC 5.0.1+git-7433-0df9f22f2 http://www.kvirc.net/]
<jernej> me too but ghydra looks nice, I have to check it more thoroughly
paynode has quit [Remote host closed the connection]
ldevulder_ has quit [Quit: Leaving]
<mru> ghidra is quite nice
<mru> and open source
cmeerw has quit [Ping timeout: 244 seconds]
warpme_ has quit [Quit: Connection closed for inactivity]
andy25225 has quit [Ping timeout: 256 seconds]
damex has quit [Ping timeout: 240 seconds]
andy25225 has joined #linux-sunxi
damex has joined #linux-sunxi
jbrown has quit [Ping timeout: 272 seconds]
_whitelogger has joined #linux-sunxi
megi1 has joined #linux-sunxi
hramrach has quit [Ping timeout: 256 seconds]
megi has quit [Ping timeout: 240 seconds]
hramrach has joined #linux-sunxi
dev1990 has quit [Quit: Konversation terminated!]