ChanServ changed the topic of #linux-sunxi to: Allwinner/sunxi development - Did you try looking at our wiki? https://linux-sunxi.org - Don't ask to ask. Just ask and wait for an answer! - This channel is logged at https://oftc.irclog.whitequark.org/linux-sunxi
NekoMay has joined #linux-sunxi
vagrantc has joined #linux-sunxi
montjoie_ has joined #linux-sunxi
montjoie has quit [Ping timeout: 480 seconds]
grming has quit [Quit: Konversation terminated!]
apritzel has quit [Ping timeout: 480 seconds]
ftg^ has quit [Read error: Connection reset by peer]
cnxsoft has joined #linux-sunxi
cnxsoft has quit [Ping timeout: 480 seconds]
<smaeul> upnix: with vendor u-boot, you may have to press specifically the 's' key, even though the message says any key
vagrantc has quit [Quit: leaving]
buZz has quit [Remote host closed the connection]
JohnDoe_71Rus has joined #linux-sunxi
apritzel has joined #linux-sunxi
junari has joined #linux-sunxi
<junari> Does anyone have boot0_sdcard.elf from H616 BSP?
junari has quit [Ping timeout: 480 seconds]
apritzel has quit [Ping timeout: 480 seconds]
evgeny_boger has joined #linux-sunxi
Guest361 is now known as ynezz
apritzel has joined #linux-sunxi
junari has joined #linux-sunxi
junari has quit [Remote host closed the connection]
junari has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]
cnxsoft has joined #linux-sunxi
evgeny_boger has quit [Quit: evgeny_boger]
apritzel has joined #linux-sunxi
evgeny_boger has joined #linux-sunxi
buZz has joined #linux-sunxi
paulk-bis has joined #linux-sunxi
paulk has quit [Read error: Connection reset by peer]
paulk-bis has quit []
paulk has joined #linux-sunxi
paulk has quit [Read error: Connection reset by peer]
paulk has joined #linux-sunxi
evgeny_boger has quit [Remote host closed the connection]
JohnDoe_71Rus has quit []
junari_ has joined #linux-sunxi
junari has quit [Ping timeout: 480 seconds]
junari_ has quit []
evgeny_boger has joined #linux-sunxi
Net147 has quit [Ping timeout: 480 seconds]
cnxsoft has quit []
grming has joined #linux-sunxi
JohnDoe_71Rus has joined #linux-sunxi
Net147 has joined #linux-sunxi
jelly has quit [Remote host closed the connection]
<upnix> apritzel: This is amazing information, thank you so much! I'm working on it now and will let you know how it goes.
<LordKalma> I know it's a vague question, but if I extract the uboot bootloader from an image, is there any special address that I load it at in ghidra to get the pointers right?
<LordKalma> the strings look okay, but the pointers are all wrong
<apritzel> LordKalma: the "canonical" U-Boot load address for Allwinner is 0x4a00.0000, at least for U-Boot proper
<LordKalma> thanks :) will try that
<apritzel> LordKalma: mainline links against that, and I think we copied that address from the BSP U-Boot
<LordKalma> I read the datasheet of the LCD panel of hell says the panel needs to be reset once on boot
<LordKalma> and now we're theorizing the u-boot is doing the initialization
<LordKalma> since there is a splash screen, the panel is working on the uboot side
<LordKalma> so the missing magic is probably coming from that
<apritzel> upnix: what are you after, with this box? Running mainline kernels? Then please don't waste any time on the vendor firmware ...
<LordKalma> upnix, I'm since 3 months trying to jailbreak from vendor :D :D :D
<LordKalma> and apritzel is a saint
<LordKalma> and tolerates me
<upnix> I'm trying to turn them into wireless mesh access points. But struggled with the onboard wifi enough that I started trying to compile my own kernel modules. When I wasn't able to succeed in getting my own modules loaded by the Android kernel, I started to gently poke at the boot image to see if I could swap out the 4.9.170 kernel with my own 4.9.170 kernel. When I bricked the T95 is when I cracked open the case to get a serial
<upnix> So now.. I'm in so deep I'm not sure what my real goal is. This was supposed to be a networking project for me, but I'm surprised how interesting I'm finding the hardware.
jelly has joined #linux-sunxi
<jernej> junari: there are no elf files for H616 in BSP for SPL. Only standalone bin files. But you can extract that from vendor image or even device itself.
<jernej> junari: what do you want to achieve?
<apritzel> upnix: the WiFi in those boxes is one of the nasty ones, although I believe some people started with some code
<apritzel> upnix: anyway I wonder if that chip is good anyway (typically there are not only undocumented, but also crap), or if you are not better off with some cheap USB-WiFi
<jernej> which wifi is that?
<apritzel> it's either AW859, some boxes seem to even ship with an XR819 ...
<jernej> you mean UW something
<jernej> I have code for both, but XR819 is actually much better. Only reason why I didn't send any patches is because it prevents sleep via Crust
<jernej> I mean in much better shape.
<apritzel> but the XR819 had quite bad performance, right? And was also unreliable (dropping connection), or was this a driver problem?
<jernej> either FW or driver
<jernej> well, even HW too
<jernej> anyway, I didn't do extensive tests but I didn't notice any connection drops in an hour long connection
<jernej> so that needs to be tested
<upnix> apritzel: I know the wi-fi as the Broadcom bcm43342, the way I was interacting with it at least. You're talking about the Allwinner-assembled wireless package/chip, I think?
vagrantc has joined #linux-sunxi
<apritzel> yeah, those ones, there are pretty s**t, but popular, because cheap ;-)
mehdix has quit []
mehdix has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]
JohnDoe_71Rus has quit []
apritzel has joined #linux-sunxi
<LordKalma> apritzel, you'll be happy to know we made the LCD panel work
<LordKalma> so we're inching closer
<LordKalma> apparently my firmware build with the original uboot flashed over it makes it work
<LordKalma> so there is some secret sauce in the uboot image that's initing the panel
<LordKalma> U boot question: the disassemble at 0x4a000000 seems to be working fine
<LordKalma> but there are a lot of references to memory at 0x000047e3-ish range
<LordKalma> in red because Ghidra doesn't know this memory
<LordKalma> what would be at this low addresses?
<apritzel> the 32-bit parts have the SRAM A1 there, this is where the SPL lives, or boot0, when using a vendor image
<LordKalma> okay, thanks. probably not important for my use, just wanted to know
<LordKalma> also some DAT_01c20064
<LordKalma> what would be at 0x1c20000 range?
<apritzel> the clock controller (CCU)
<LordKalma> thanks! :)
<LordKalma> where are panel and similar drivers in the uboot source?
<apritzel> everywhere
<apritzel> panel drivers are a complete mess
<apritzel> could it be simply a regulator enablement missing? Some GPIO, for instance?
<LordKalma> I found two functions so far relevant
<LordKalma> ds "jlt4013a-spi-clk", ds "jlt4013a-spi-cs", ds "jlt4013a-spi-mosi" are referenced by FUN_4a021be4 and ds "jlt4013a-dcx" is referenced by FUN_4a01cebc
<LordKalma> But funnily, "Error cannot request jlt4013a spi-mosi,%s\n" is referenced by FUN_4a01cebc, not FUN_4a021be4
<LordKalma> this code is heavily optimized, functions were clearly inlined
<apritzel> that doesn't require "heavy" optimisation, it's super common and we actually rely on this for mainline U-Boot, otherwise the SPL would never fit into SRAM
<LordKalma> yes, of course
<apritzel> just keep looking, you will get there ;-)
<LordKalma> I mean this because the same function seems to reference like ALL the error messages
<apritzel> LordKalma: can you break into the vendor U-Boot?
<apritzel> then you could try to dump all GPIOs
<LordKalma> what you mean break in?
<LordKalma> as in stop the boot and get the console?
<apritzel> yes
<LordKalma> maybe if i'm fast enough
<apritzel> or even better: but into Linux, and check /sys/kernel/debug/
<apritzel> s/but/boot/
<LordKalma> that we can 100% do
<LordKalma> we have root terminal access
<LordKalma> it's root/123 :)
<apritzel> cat /sys/kernel/debug/gpio
<apritzel> though I am not sure if that reflect the actual pinctrl hardware state, or rather Linux' view of it
<LordKalma> cat: can't open '/sys/kernel/debug/gpio': No such file or directory
<LordKalma> but nice try
<apritzel> mount -t debugfs debugfs /sys/kernel/debug
<LordKalma> that did it
<apritzel> what is PL6 ("enable")
<LordKalma> where did you saw that, sorry?
<LordKalma> apritzel, sorry, didn't copy the last line. File updated
<apritzel> gpio-358 (32 * 'L;
<apritzel> gpio-358 (32 * 'L' - 'A' + 6)
<LordKalma> sorry, I'm not following
<LordKalma> sorry for my ignorance, you're been nothing but great, but I'm very new to this
<LordKalma> anyway, there aretwo active lows in there
<apritzel> each GPIO bank has up to 32 pins, so PA0 would be 0, PA1=1, PB0=32, PC0=64, ... PL0=352
<LordKalma> ahhh ok ok
<LordKalma> so gpio-357 is PL6
<LordKalma> it's 32 * ('L' - 'A') + 6 !!!!! I get it now
<LordKalma> with the parenthesis I got it, sorry
<karlp> (and those numbers get thrown out again later, and become PLnn is 0..32 on gpiochip1....)
<LordKalma> HEY!
<LordKalma> look at this!
<LordKalma> reset-gpios should probably be PL10 not 11
<LordKalma> and cs-gpios should probably be GPIO_ACTIVE_LOW no?
<apritzel> I am just puzzled that SPI is on PL, is that bit-banging software SPI?
<LordKalma> at this point I dunno what is going on haha
<LordKalma> interesting, I ran the same command on my buildoot
<LordKalma> and the pins have the same configuration
<apritzel> that's what I meant before: it probably just reflects what's in the DT
<LordKalma> yap, seems to be the same
<apritzel> what I typically do is to boot into the pure BSP image, and either dump the debugfs gpio, or dump the raw pinctrl registers
<LordKalma> is there any serial commands that interrupts the uboot countdown?
<apritzel> hit Enter or try 's'
<apritzel> but it might be disabled
<LordKalma> seems to be
<LordKalma> times out imediately
<LordKalma> During the boot, before the kernel loads, it does say "Setting up a 480x854 lcd console (overscan 0x0)
<LordKalma> Video: Drawing the logo ...
<LordKalma> "
<LordKalma> so now my job is to discover what black magic uboot does to the panel... great
<libv> LordKalma: do you have a multimeter at hand?
<LordKalma> I probably have a logic analyzer at work
<libv> a multimeter should do
<LordKalma> I'd have to open the radio, but yeah, I could check the SL and reset pins
jose_can_u_c has joined #linux-sunxi
<LordKalma> jose_can_u_c, oi, I'm here :D :D :D
<LordKalma> jose_can_u_c is another hacker of this god damned thing
<LordKalma> anyway, I want to be up tomorrow by 6 am to drive to a mountain, so ttyl
<LordKalma> apritzel, I managed to boot to the uboot console
<LordKalma> any command you want me to run?
jose_can_u_c has left #linux-sunxi [#linux-sunxi]
vagrantc has quit [Quit: leaving]
evgeny_boger has quit [Ping timeout: 480 seconds]
<apritzel> "gpio status -a", but not sure they enabled it
<libv> with some serious work from mnemoc (well, handholding), we now worked through some docker vs mediawiki vs libv issues
<libv> and we have a 2h old copy of the wiki running at https://minima.linux-sunxi.org
<libv> please try to poke some holes into it, see if it is a worthy replacement
<libv> all data and logins and everything should be preserved
<libv> the new mediawiki version should make some things appear slightly different
<libv> this wiki is just as editable as the current one
<libv> but when in a few days time, which is not defined yet, we will lock the old wiki, and overwrite the changes on minima.
<mnemoc> 🎉
<libv> if no-one finds anything that makes this a no-go
<libv> that is
<libv> but just be aware that your changes will be lost in the next few days
<libv> let me just put that on the front page
<mnemoc> the other question is if people is ok with having the data in the UK instead of somewhere in the EU
<mnemoc> it should be easy to move now that is docker-based
<libv> right
<libv> i am not sure how/when the uk will drift off further tbh
<libv> and we might lose some protections that .eu law grants us
<libv> not that i know of any at this time
<libv> but dmca is a .us thing, and with the .uk out of the .eu, it might drift closer to there
<libv> theoretical at this point, i know
<mnemoc> we can always move it later after there is some evidence of the intention to drift
<libv> right
<libv> and who knows, brexit might get undone ;p
<mnemoc> reapplying probably wouldn't allow some priviledges the UK had before, like keeping its own currency
<mnemoc> as long as they don't weaken the laws I don't mind having to show passport
<mnemoc> I need to move back home. drop me an email if you have problems with the new setup
<libv> ok
<mnemoc> good night
<libv> night
<libv> anyway
<libv> poke at minima.linux-sunxi.org please
<LordKalma> other than lacking https or at least automatic redirect to it
<LordKalma> looks fine
<LordKalma> so you just need auto redirect
<LordKalma> if you're using apache I can tell you what you need to do
<LordKalma> nginx I don't know how to do anything with
<LordKalma> I manage a small website as well and I use a combination of virtualmin and docker and it's amazing <3
<LordKalma> I love docker because mistakes go away with a `docker system prune -a`
<LordKalma> :D
<LordKalma> (DO NOT RUN THAT)
<LordKalma> I should be sleeping anyway, nighty nighy
megi has quit [Quit: WeeChat 3.6]
megi has joined #linux-sunxi