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
<youmukonpaku133> megi: but then it would boot off microsd, no?
fraolt has joined #linux-sunxi
fraolt_ has quit [Ping timeout: 480 seconds]
Danct12 has quit [Remote host closed the connection]
<youmukonpaku133> anyway another thing is
<youmukonpaku133> megi: there seems to be a free space for a wifi chip
<youmukonpaku133> in a similiar spot an rtl8188 is installed on the 626...
<youmukonpaku133> might be able to throw the rtl8188 and antenna onto it
Danct12 has joined #linux-sunxi
<youmukonpaku133> so apparently its just a usb interface
<youmukonpaku133> so i can just steal 5v and use any generic wifi dongle
<youmukonpaku133> nevermind
<youmukonpaku133> it isn't powered
<youmukonpaku133> sad
Daanct12 has joined #linux-sunxi
vagrantc has quit [Quit: leaving]
Daanct12 has quit [Ping timeout: 480 seconds]
hexdump01 has joined #linux-sunxi
hexdump0815 has quit [Ping timeout: 480 seconds]
youmukonpaku133 has quit [Ping timeout: 480 seconds]
Daanct12 has joined #linux-sunxi
JohnDoe_71Rus has joined #linux-sunxi
DarkNeutrino has quit [Ping timeout: 480 seconds]
DarkNeutrino has joined #linux-sunxi
linkmauve has joined #linux-sunxi
Daanct12 has quit [Ping timeout: 480 seconds]
Daanct12 has joined #linux-sunxi
warpme has quit []
junari has joined #linux-sunxi
junari has quit [Ping timeout: 480 seconds]
Guest578 is now known as aperezdc
megi has quit [Quit: WeeChat 4.0.2]
megi has joined #linux-sunxi
youmukonpaku133 has joined #linux-sunxi
youmukonpaku133 has quit [Ping timeout: 480 seconds]
youmukonpaku133 has joined #linux-sunxi
youmukonpaku133 has quit [Read error: Connection reset by peer]
youmukonpaku133 has joined #linux-sunxi
<youmukonpaku133> megi: wait should i check conductivity between vdd and the sot23s when the board is powered? since capacitors might not have current flow through them
<Jookia> youmukonpaku133: conductivity doesn't require power check. the conductivity on a transistor should be a few megohms. what you want to probably check is voltage maybe? not sure
<youmukonpaku133> im trying to find the switch stopping sd card from being seen by bootrom if it even exists
<youmukonpaku133> because it does exist as a sot23 on pb626 but im not sure if it's exactly an sot23 here because the 4 sot23's on my board don't seem to conduct to vdd on sd
<youmukonpaku133> though i may be checking wrong which is why i am asking
<youmukonpaku133> scroll up on this chat/see log
<gamiee> IRC don't have history.
<gamiee> Only via web history
<karlp> From the topic: This channel is logged at https://oftc.irclog.whitequark.org/linux-sunxi"
<youmukonpaku133> yep thats what i said
apritzel has joined #linux-sunxi
<youmukonpaku133> oh hi apritzel
<youmukonpaku133> anyway i was trying to boot uboot + kernel in fel and i got a -9 usb bulk error...
<youmukonpaku133> thats
<youmukonpaku133> not awesome
<youmukonpaku133> any ideas on how to fix?
<apritzel> youmukonpaku133: I am afraid this might all be a bit more complicated than you think ;-)
<youmukonpaku133> thats how it is always
<apritzel> the first step is a working DRAM setup
<youmukonpaku133> i mean even trying to boot uboot itself
<youmukonpaku133> it throws either a bulk error or timed out
<apritzel> that's what I mean ;-)
<youmukonpaku133> oh
<youmukonpaku133> in uart it just says "trying to boot from FEL...." and practically nothing else
<youmukonpaku133> so like
<youmukonpaku133> what do you mean by "a working dram setup"
<apritzel> so the first thing to happen is to upload the SPL into SRAM, that's typically not a problem, because that's all well known BROM territory
<apritzel> the next step is to setup the basic PLL and bus clocks, that should also be fine, as long as the SoC is supported (which it is in your case)
<apritzel> but then the crucial step is to initialise the DRAM controller and set it up to drive the DRAM chips
<youmukonpaku133> and i suppose in my case that doesnt happen?
<youmukonpaku133> or something goes horribly wrong
<apritzel> well, if you see "trying to bool from FEL", it couldn't be *totally* wrong
<youmukonpaku133> that only happens when i try booting uboot.bin
<youmukonpaku133> if i try to also boot a kernel i get a bulk error and nothing happens in uart
<youmukonpaku133> just uboot.bin shows trying to boot from fel and throws a usb timed out error on host
<apritzel> what is your sunxi-fel command line?
<apritzel> and how do you build your U-Boot binary?
<apritzel> because there is no mainline defconfig for the Pocketbook (none of them) in U-Boot
<youmukonpaku133> the binary is a prebuilt from megi
<youmukonpaku133> doas sunxi-fel -v uboot uboot.bin \
<youmukonpaku133> write 0x42000000 zImage \ write 0x43000000 board.dtb \
<youmukonpaku133> write 0x43100000 boot.scr
<youmukonpaku133> this is the cmdline
<apritzel> u-boot.bin doesn't sound right, as this is normally just U-Boot proper
<youmukonpaku133> *oh*
<apritzel> but I guess this is just a naming issue
<youmukonpaku133> so what would it be then
<apritzel> you would need u-boot-sunxi-with-spl.bin
<apritzel> because you need the SPL and U-Boot proper
<apritzel> but if you see this output, this somehow hints that you have both
<youmukonpaku133> would checking uboot with binwalk help
<megi> my uboot.bin is that
<megi> it's just renamed
<youmukonpaku133> oh cool
<youmukonpaku133> so it is with spl
<youmukonpaku133> then i wonder whats causing the bulk and timing out
<apritzel> so when you boot the SPL via FEL, it's supposed to return to FEL, after initialising the DRAM
<apritzel> sunxi-fel waits for that to happen
<megi> dunno what sunxi-fel uses for loading the kernel, if it needs U-Boot USB support, or not
<apritzel> megi: yeah, I guessed as much, since it wouldn't boot otherwise
<megi> if it does, then my build will not work for you
<youmukonpaku133> oh
<youmukonpaku133> *great*
<megi> I strip down my u-boot builds of useless features like these :)
<youmukonpaku133> so i suppose i need to build uboot with usb support?
<apritzel> no no, this all happens before U-Boot proper runs
<megi> I don't know
<gamiee> as far as I understand, with FEL you load u-boot SPL, which inits DRAM, returns back to FEL, then load u-boot and kernel into DRAM, and then launch u-boot, right?
<youmukonpaku133> huh
<apritzel> gamiee: exactly
<megi> so that's fine then
<gamiee> apritzel: thanks for confirmation. This means that u-boot doesn't need USB support at all.
<apritzel> yes
<youmukonpaku133> so what do i need then
<gamiee> u-boot, u-boot spl and kernel.
<youmukonpaku133> which i do have im pretty sure
<apritzel> if you see "trying to boot from FEL", and the sunxi-fel times out, that means that either the DRAM setup went slightly wrong, and something else goes wrong right at the end of the SPL code
<apritzel> the kernel is a red herring at the moment
<apritzel> youmukonpaku133: does it look different if you just do "uboot u-boot.bin", so without trying to upload the kernel or anything else?
<youmukonpaku133> yes it throws a -7 time out instead of -9 usb bulk error
<apritzel> do you see the "trying to boot from FEL" message rather quickly? And does it detect the DRAM size right?
<megi> but my build is really trimmed down, it may be missing some other thing to boot from FEL, or gpio used to enable SD card on my board is used for something else on yours which breaks things, etc.
<megi> eg. CONFIG_SPL_BOARD_LOAD_IMAGE is not defined
<apritzel> megi: oh really?
<youmukonpaku133> huh
<apritzel> megi: anyway, do you have a pointer to the defconfig?
<megi> ah, that one was not in KConfig yet
<megi> so it's defined
<megi> anyway, just build your own, with logging enabled, u-boot shell, etc.
<youmukonpaku133> should i use your fork for this?
<apritzel> megi: thanks, that's useful, should be enough to create a mainline defconfig out of it
<youmukonpaku133> also apparently uboot might be able to write to emmc on it's own
<megi> can you extract the fex file from the board? it should have all the info about how to enable the SD card
<youmukonpaku133> how can i do that
<apritzel> megi: is there anything special in your fork? Anything not display related, I mean?
<youmukonpaku133> any specific hardware i need to extract it?
<megi> I don't think so for pocketbook
<megi> probaly just mmc optimizations
<youmukonpaku133> so like
<youmukonpaku133> how can i extract the fex file
<youmukonpaku133> oh wow is that the entire thing to add support for it
<youmukonpaku133> i see
<apritzel> youmukonpaku133: it's even smaller, since the dts is already in the tree
<youmukonpaku133> fun
<apritzel> that was what I was hoping for: ideally just a defconfig, which isn't too hard to generate
<apritzel> at least to a stage where you get on a U-Boot prompt
<apritzel> on the serial
<youmukonpaku133> ive messed with defconfigs before! shouldnt be too hard right?
<youmukonpaku133> i built a kernel for my phone to enable sysv ipc, needed some abi patching :D
<megi> yeah, get u-boot running first, then play with the kernel :)
<youmukonpaku133> still id like to look at fex if it has info about sd card
<youmukonpaku133> is there a utility in sunxi tools to extract it?
<apritzel> no, just copy something nearby, like q8_a13_tablet_defconfig, or use megi's, but keep in mind that this is from an older base
<youmukonpaku133> wait im confused
<youmukonpaku133> oh
<youmukonpaku133> nvm
<megi> if you don't have the schematic for the board, get the fex file first before erasing anything
<apritzel> "FEX file" is where my patience with AW typically ends ;-)
<youmukonpaku133> lol
<megi> patience or not, it's the easiest way to get info about an unknown board without the schematic
<apritzel> youmukonpaku133: the FEX file is part of the vendor firmware, so you need to find and extract it somehow
<apritzel> megi: understood, but this all predates my involvement with sunxi, and this is where I draw the line, personally
<youmukonpaku133> would it be stored on nand?
<youmukonpaku133> seems like sunxi tools has a tool to dump nand or similiar
<apritzel> youmukonpaku133: yes, or you can find it in some firmware update file
<megi> that or in the firmware update package, possibly
<youmukonpaku133> oh
<youmukonpaku133> awesome
<youmukonpaku133> the update package has been reverse engineered after all
<megi> for me I just popped out the vendor's sd card and copied it from the boot partition :)_
<megi> I'm just lucky
<youmukonpaku133> yeah
<youmukonpaku133> no need to mess with nand xD
<youmukonpaku133> if i had the schematic of this thing thisd be a lot easier ngl
<youmukonpaku133> since finding the sd card boot switch would be a piece of cake
<apritzel> youmukonpaku133: so give it a try, but if it's too hard: we can figure out the two or three bits of information otherwise as well
<youmukonpaku133> also im thinking
<youmukonpaku133> should i be using my pi 4 for working on this or should i keep using my phone
<youmukonpaku133> no laptop atm and i have a full debian chroot on my phone so
<youmukonpaku133> btw funny thing, my board has a slot for a network card but its missing something else so it isnt getting powered
<youmukonpaku133> might take a look sometime because is just a usb interface
<youmukonpaku133> so could be useful xD
<youmukonpaku133> oh GREAT
<youmukonpaku133> > ./parseUpdate ../pbupdate/SWUPDATE.BIN swupdate_extracted
<youmukonpaku133> Header part:
<youmukonpaku133> 0 0x10 Magic:
<youmukonpaku133> [1] 15725 trace trap ./parseUpdate ../pbupdate/SWUPDATE.BIN swupdate_extracted
<youmukonpaku133> amazing
<youmukonpaku133> THERE WE GO
<youmukonpaku133> dumped
<youmukonpaku133> and now i cant mount it
<youmukonpaku133> wtf
<megi> script.bin looks like this if you want an example of what to search for https://megous.com/dl/tmp/script0.bin
<megi> this is from my pocketbook
<youmukonpaku133> yeah problem is i cant mount the rootfs
<youmukonpaku133> wait wha the
<youmukonpaku133> why is the rootfs 24mb
<youmukonpaku133> hm
<youmukonpaku133> megi can you take a look at these https://wormhole.app/LM4yK#IOSPHXe6uUMmElm3fUl5BA
<youmukonpaku133> i cant mount rootfs but it might be there on in the kernel file
<youmukonpaku133> fuck nevermind
<youmukonpaku133> here
<youmukonpaku133> megi
<youmukonpaku133> oh goddamit it only uploaded one
<youmukonpaku133> here's just the rootfs
<youmukonpaku133> i cant mount it atm
<youmukonpaku133> so do take a loot if you can
<youmukonpaku133> *look
<youmukonpaku133> nvm i can just use zarchiver
<youmukonpaku133> ok so no script.bin in the rootfs unless it can be named differently megi
<youmukonpaku133> it might be in 649e3a0ffeed3fbb1ea8363aabeb8cc7166f4b53c6b8662efda34d0fa5c8bce4.kernel
<youmukonpaku133> but fuck knows what filetype it is
<youmukonpaku133> oh its a kernel
<youmukonpaku133> unexpected
<youmukonpaku133> 98792 0x181E8 ASCII cpio archive (SVR4 with no CRC), file name: "TRAILER!!!", file name length: "0x0000000B", file size: "0x00000000"
<youmukonpaku133> binwalk output
<youmukonpaku133> wait this looks messed up in irc lmao
<youmukonpaku133> megi: can it be contained in kernel?
<youmukonpaku133> oh it *is* contained alongside kernel
<youmukonpaku133> ill just check boot on device
junari has joined #linux-sunxi
Daanct12 has quit [Quit: WeeChat 4.0.4]
youmukonpaku133 has quit [Read error: Connection reset by peer]
youmukonpaku133 has joined #linux-sunxi
junari_ has joined #linux-sunxi
junari has quit [Ping timeout: 480 seconds]
apritzel has quit [Ping timeout: 480 seconds]
indy has quit []
youmukonpaku133 has quit [Ping timeout: 480 seconds]
youmukonpaku133 has joined #linux-sunxi
<youmukonpaku133> AHA
<youmukonpaku133> i found script bin
<youmukonpaku133> and script0 bin
junari_ has quit [Ping timeout: 480 seconds]
indy has joined #linux-sunxi
warpme has joined #linux-sunxi
warpme has quit []
<youmukonpaku133> megi: i have script0 and script, which one is more important?
<youmukonpaku133> or are they the same
<youmukonpaku133> here ill throw you the fex decoded files
JohnDoe_71Rus has quit [Ping timeout: 480 seconds]
<youmukonpaku133> first is script0, second is script
<youmukonpaku133> oh yea theyre the same
<youmukonpaku133> so
<youmukonpaku133> what now
warpme has joined #linux-sunxi
JohnDoe_71Rus has joined #linux-sunxi
warpme has quit []
<youmukonpaku133> megi
<buZz> holy wall of txt :D
apritzel has joined #linux-sunxi
DarkNeutrino has quit [Read error: Connection reset by peer]
DarkNeutrino has joined #linux-sunxi
DarkNeutrino has quit [Ping timeout: 480 seconds]
DarkNeutrino has joined #linux-sunxi
junari_ has joined #linux-sunxi
<youmukonpaku133> buZz: i know, i talk way too much xD
<buZz> :)
<buZz> youmukonpaku133: 'rubber ducky debugging' is what thats called ;)
junari_ has quit [Ping timeout: 480 seconds]
<youmukonpaku133> buZz: LOL yea thats definitely it i should buy a rubber duck
<buZz> :) one for every room and bag and coat ;)
<buZz> actually, now i wonder if thats why pirates had shoulderparrots
<youmukonpaku133> LOL
youmukonpaku133 has quit [Read error: Connection reset by peer]
youmukonpaku133 has joined #linux-sunxi
youmukonpaku133 has quit [Ping timeout: 480 seconds]
youmukonpaku133 has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]
warpme has joined #linux-sunxi
youmukonpaku133 has quit [Ping timeout: 480 seconds]
youmukonpaku133 has joined #linux-sunxi
warpme has quit []
warpme has joined #linux-sunxi
JohnDoe_71Rus has quit []
apritzel has joined #linux-sunxi
warpme has quit []
warpme has joined #linux-sunxi
<youmukonpaku133> hey apritzel what can i do about the FEL bulk errors? i now have the fex file
warpme has quit [Read error: Connection reset by peer]
warpme has joined #linux-sunxi
warpme has quit []
<apritzel> youmukonpaku133: I think the reason is what megi mentioned yesterday: he didn't enable CONFIG_SPL_BOARD_LOAD_IMAGE
<youmukonpaku133> oh okay
<youmukonpaku133> so i suppose i have to build my own uboot
<apritzel> so the SPL doesn't even try to return to FEL
<apritzel> yes
<megi> CONFIG_SPL_BOARD_LOAD_IMAGE is enabled via header file
<youmukonpaku133> *yawn* should i setup that pi i bought a few days ago for this
<megi> the old way
<apritzel> youmukonpaku133: doing this on a phone sounds super painful to me, but whatever you prefer
<apritzel> you need an ARM cross compiler, though
<youmukonpaku133> yes i have that setup on my phone
<youmukonpaku133> had to compile mesa for armhf
<youmukonpaku133> cause yea
<apritzel> good
<megi> eMMC, no NAND
<youmukonpaku133> btw megi the wifi slot is just a usb interface but with 3.3v, you can desolder and throw in a better usb wifi dongle for example though youll have to pull 5v from somewhere
<youmukonpaku133> whats the difference between emmc and nand
<youmukonpaku133> oh
<youmukonpaku133> so it is just emmc
<youmukonpaku133> fun
<megi> one is actually usable
<youmukonpaku133> xE
<apritzel> youmukonpaku133: again, eMMC is much better from a software perspective, you just have to enable it in the DT
<youmukonpaku133> *xD
<youmukonpaku133> alright
<youmukonpaku133> so i just build uboot and change dtb again?
<apritzel> youmukonpaku133: can you just try "sunxi-fel spl u-boot.bin"?
<apritzel> and see whether that succeeds and puts you back in FEL?
<youmukonpaku133> sure one sec
<apritzel> that's basically the first step of what the "uboot" command does
<apritzel> megi: so do you have FEL booting support in your image? Your comment yesterday suggested otherwise?
<apritzel> or was that just a header file vs. Kconfig change?
<youmukonpaku133> 22:18:02.118 Connected to PL2303 device
<youmukonpaku133> 22:18:09.309 DRAM: 256 MiB
<youmukonpaku133> 22:18:09.332 Trying to boot from FEL
<youmukonpaku133> 22:18:09.329 CPU: 1008000000Hz, AXI/AHB/APB: 3/2/2
<youmukonpaku133> nope
<youmukonpaku133> nothing
<youmukonpaku133> and a -7 timed out
<youmukonpaku133> so i suppose i lack spl
<apritzel> youmukonpaku133: what you see is the output of the SPL, and it all looks fine, until it actually doesn't return to FEL
<youmukonpaku133> yea
<apritzel> can you try to run "sunxi-fel ver" just afterwards?
<youmukonpaku133> hangs
<youmukonpaku133> and a -7 timeout
<megi> there's no special enable GPIO on your board for SD card
<youmukonpaku133> huh
<youmukonpaku133> oh also
<youmukonpaku133> AWUSBFEX soc=00001625(A13) 00000001 ver=0001 44 08 scratchpad=00007e00 00000000 00000000
<youmukonpaku133> output of sunxi fel ver before starting uboot
<youmukonpaku133> megi wouldnt that mean that sd card should be bootable...?
<megi> but it needs a LDO in PMIC enabled https://megous.com/dl/tmp/be54d30afdd57cea.png
<megi> instead
<youmukonpaku133> a what in what
<megi> which may not be enabled by default
<youmukonpaku133> sorry i have never worked with stuff like this
<youmukonpaku133> so i suppose i can enable it in dtb?
<youmukonpaku133> or what
<youmukonpaku133> or is it something on the board i can just short
<megi> you can't do anything about this
<youmukonpaku133> oh
<youmukonpaku133> so i suppose sd is unbootable?
<apritzel> youmukonpaku133: it's not a simple GPIO,. but you need to talk to the Power Manangement IC (PMIC)
<youmukonpaku133> oh
<youmukonpaku133> not fun
<apritzel> well, U-Boot has you covered, but it indeed means you won't be able to boot from SD
<youmukonpaku133> oh i see
<megi> but you can just flash the eMMC eventually, once you boot this over USB successfully
<youmukonpaku133> so i will have access to it at least?
<youmukonpaku133> the sd
<apritzel> yes, should be no problem
<youmukonpaku133> would be nice if i could like, mount it as a home partition or something
<youmukonpaku133> nice
<megi> only from Linux or U-Boot when either one enables the LDO
<youmukonpaku133> alright
<megi> but boot ROM will not have access to it
<youmukonpaku133> got it
<apritzel> (LDO = low dropout regulator, so a simple "burn the rest of the voltage" regulator, inside the PMIC)
<megi> you'll have to modify the DTS
<youmukonpaku133> alright so uh how would i go about building uboot with spl board load image enabled
<youmukonpaku133> oh what do i modify in dts
<youmukonpaku133> i already have it decompiled because i enabled usb host mode
<apritzel> that's the second step, first you need the SPL running and returning the FEL
<apritzel> for that you don't need the DT
<megi> compared to my pocketboot touch lux 3 this board has eMMC on mmc2, so bus-width is 8 and not 4
<megi> mmc0 power supply is different
<megi> battery capacity is lower
<apritzel> I'd copy and modify an existing defconfig
<youmukonpaku133> i suppose thats uboot.config provided with megi's kernel?
<megi> and I guess there's one less button, and whatever this is https://megous.com/dl/tmp/9e52385b924e127f.png
<youmukonpaku133> fel button is right on the 4 key pad
<youmukonpaku133> figured that out a while ago
<megi> other than that, the rest looks mostly identical
<youmukonpaku133> so i suppose im pretty lucky? alright so what will i need to change + do to build uboot with proper spl
<apritzel> what's the PMIC? AXP152?
<youmukonpaku133> axp209
<youmukonpaku133> also used in touch lux 3 if im not wrong
<youmukonpaku133> also
<youmukonpaku133> vdd (4th pin on sd) is routed to pin 11 of axp209
<youmukonpaku133> it seems
<youmukonpaku133> can i bypass pmic completely somehow?
<apritzel> that's what megi mentioned, that's probably LDO4 then
<apritzel> bypass? why?
<youmukonpaku133> actuallt i should give up on booting off SD lol
<youmukonpaku133> anyway alright i suppose first things first i gotta build uboot
<megi> youmukonpaku133: you can try shorting that trace to any always on 3.3V power rail
<apritzel> should be a basic defconfig to start off, good enough to build a working SPL
<youmukonpaku133> megi i dont have a small enough iron, id probs screw it up xD
<megi> maybe the one for USB wifi if it's enabled after powerup
<apritzel> youmukonpaku133: I still don't understand what makes you so obsessed with booting from SD?
<youmukonpaku133> its easy
<youmukonpaku133> thats wa
<youmukonpaku133> t
<apritzel> for experiments and development FEL is much easier and simpler
<youmukonpaku133> alright
<apritzel> for proper operation later you just put U-Boot in the eMMC boot partition
<apritzel> so you don't need SD
<youmukonpaku133> got it
<youmukonpaku133> alright so i can just use mainline das uboot?
<megi> yopu still need to write dts for your board, you can't use mine
<megi> even for u-boot
<youmukonpaku133> damnit
<apritzel> it would have been nice for other people to just download an SD card image and boot their board from it, but that's not gonna work, and there don't seem to be many other users of this board outside there anyway
<megi> but you can use it as a base, the changes are minimal
<youmukonpaku133> alright
<apritzel> youmukonpaku133: you don't need a right DT if you just boot the SPL
<youmukonpaku133> oh ok
<youmukonpaku133> ill take a look at dt later then
<youmukonpaku133> alright so i can just use mainline uboot with that config?
<apritzel> yes
<youmukonpaku133> and itll boot zimage?
<youmukonpaku133> when i actusllt need to boot kernel eventually
<apritzel> please! walk before you run
<youmukonpaku133> fair enough
<apritzel> you need a DT for the kernel anyway
<apritzel> this is all not going to be a walk in the walk, though you are lucky since you have a "nearby board" to copy from and you have FEL and serial
<apritzel> and DRAM setup is apparently working already, which is often the biggest showstopper
<youmukonpaku133> oh LORD the uboot readme is long
<youmukonpaku133> nvm found compile instructions
<apritzel> export CROSS_COMPILE=armhf...gcc; make pocketbook_defconfig; make
<apritzel> but that defconfig doesn't compile, just a sec ...
<apritzel> so that compiled for me now: https://pastebin.com/miFDJhPU
<apritzel> and then you do "sunxi-fel spl spl/sunxi-spl.bin"
<youmukonpaku133> awesome
<youmukonpaku133> will test in a sec
<apritzel> the next steps would then to copy the existing pocketbook .dts, and remove almost everything from it (things like regulators, USB, backlight, GPIO keys, etc)
<youmukonpaku133> alright compiling
<youmukonpaku133> oh huh why would i need to do that
<apritzel> then work your way up by adding pieces (back) bit by bit
<youmukonpaku133> will i need to manually rewrite it all :despair:
<youmukonpaku133> oh ok
<youmukonpaku133> i see
<apritzel> because it is unsafe to use a wrong DT
<youmukonpaku133> it can fry stuff...?
<apritzel> yes
<youmukonpaku133> oh fuck
<youmukonpaku133> okay
<apritzel> it's rare, but better safe than sorry
<youmukonpaku133> yeah xd
<youmukonpaku133> alr which parts should i keep
<youmukonpaku133> compiled uboot
<youmukonpaku133> lets see now
<apritzel> keep &cpu0, &i2c0, &uart1, for a start
<apritzel> then start to experiment with mmc0 and mmc2
<youmukonpaku133> apritzel
<youmukonpaku133> i get a pipe error
<apritzel> same output on the serial?
<youmukonpaku133> nothing on serial
<youmukonpaku133> apritzel
<apritzel> does sunxi-fel said it was uploading fine?
<apritzel> and which UART are you on?
<youmukonpaku133> sunxi-fel threw a pipe error
<youmukonpaku133> apritzel: wdym which uart im on
<apritzel> does it say "Executing the SPL"?
<youmukonpaku133> nope
<youmukonpaku133> says nothing
<youmukonpaku133> so it must be on host side..
<youmukonpaku133> should i try with my pi xD
<apritzel> are you in proper FEL mode? does "sunxi-fel ver" report back correctly
<apritzel> and use "-v" if you don't do it already
<youmukonpaku133> yes i use -v
<youmukonpaku133> huh
<youmukonpaku133> now even sunxi fel ver throws a pipe error
<youmukonpaku133> the hell
<youmukonpaku133> oh now it works fine
<youmukonpaku133> THERE WE GO
<youmukonpaku133> it started uboot!!
<youmukonpaku133> U‑Boot SPL 2023.10‑rc3‑00027‑ge508b93002 (Aug 26 2023 ‑ 22:09:53 +0000)
<youmukonpaku133> 23:39:39.729 DRAM: 256 MiB
<youmukonpaku133> 23:39:39.749 CPU: 1008000000Hz, AXI/AHB/APB: 3/2/2
<youmukonpaku133> 23:39:39.752 Trying to boot from FEL
<youmukonpaku133> apritzel: found DT name in SPL header: sun5i-a13-pocketbook-touch-lux-3
<youmukonpaku133> Stack pointers: sp_irq=0x00002000, sp=0x00005DF8
<youmukonpaku133> Enabling the L2 cache
<youmukonpaku133> Disabling I-cache, MMU and branch prediction... done.
<youmukonpaku133> Reading the MMU translation table from 0x00008000
<youmukonpaku133> => Executing the SPL... done.
<youmukonpaku133> Setting write-combine mapping for DRAM.
<youmukonpaku133> Setting cached mapping for BROM.
<youmukonpaku133> Writing back the MMU translation table.
<youmukonpaku133> Enabling I-cache, MMU and branch prediction... done.
<youmukonpaku133> i think my issue was plugging in the tx pin on the usb adapter since it messes with power it seems
<youmukonpaku133> now i start messing with dts?
<apritzel> as I said, copy, then remove most of it
<apritzel> fill the gaps, like changing the name in the defconfig, and add the new name to the Makefile
<apritzel> and yeah, entering FEL mode can be tricky at times, stray power is a common issue that prevents a clean reset
<apritzel> I always run "sunxi-fel ver" before to check whether it's on
<youmukonpaku133> apritzel should i change dt name to basic lux 2 or 616, hmm
<apritzel> why do you ask me?
<youmukonpaku133> 616 is used more frequently but its also known as basic lux 2...
<youmukonpaku133> meh ill just put 616 in there
<apritzel> I am completely confused by the names you used already ;-)
<youmukonpaku133> lol
<youmukonpaku133> also, which makefile do i add the DT name to?
<youmukonpaku133> changed name in defconfig
<youmukonpaku133> nvm just changing name in defconfig compiles fine it seems
<youmukonpaku133> nevermind
<apritzel> you will figure it out, leaving you to the rubber duck for a while ;-)
<apritzel> once you have the minimal DT in place, you can replace "spl" with "uboot", and then should have a U-Boot prompt
apritzel has quit [Ping timeout: 480 seconds]
youmukonpaku133 has quit [Read error: Connection reset by peer]
youmukonpaku133 has joined #linux-sunxi
youmukonpaku133 has quit []
youmukonpaku133 has joined #linux-sunxi
<youmukonpaku133> oh great
<youmukonpaku133> Error: arch/arm/dts/sun5i-a13-pocketbook-616.dts:7.1-9 syntax error
<youmukonpaku133> amazing
<youmukonpaku133> ill get some sleep first i guess