peterm6881 has joined #Speedsaver
<Speedsaver> main @ buildroot-speedsaver-mangopi: xogium pushed 1 commit (https://github.com/Speedsaver/buildroot-speedsaver-mangopi/compare/e4989e1537e7...ef4c8ec3372c):
<Speedsaver> main @ buildroot-speedsaver-mangopi: xogium ef4c8e: board/suniv-f1c100s: disable automatic running of dfu_nand at boot. (https://github.com/Speedsaver/buildroot-speedsaver-mangopi/commit/ef4c8ec3372c8824cc535687a35ecb952640457f)
<Speedsaver> main @ buildroot-speedsaver-mangopi: xogium pushed 1 commit (https://github.com/Speedsaver/buildroot-speedsaver-mangopi/compare/ef4c8ec3372c...ddf0058b1aff):
<Speedsaver> main @ buildroot-speedsaver-mangopi: xogium ddf005: board/suniv-f1c100s: disable systemd-gpt-auto-generator and colored output. (https://github.com/Speedsaver/buildroot-speedsaver-mangopi/commit/ddf0058b1affcc2176bcd9833b2ac0814be9e995)
<Speedsaver> main @ buildroot-speedsaver-mangopi: xogium pushed 1 commit (https://github.com/Speedsaver/buildroot-speedsaver-mangopi/compare/ddf0058b1aff...6bcca21e3695):
<Speedsaver> main @ buildroot-speedsaver-mangopi: xogium 6bcca2: board/mangopi: switched kernel compression to xz. (https://github.com/Speedsaver/buildroot-speedsaver-mangopi/commit/6bcca21e369550ae9ae56aabd381a11b2ccb708c)
<peterm6881> hey Xogium
<Xogium> heya
<peterm6881> which of these steps do I need to repeat to apply the changes?
<peterm6881> for p in /path/to/buildroot-speedsaver-mangopi/buildroot-patches/*.patch; do patch -p1 < $p; done
<peterm6881> make BR2_EXTERNAL=/path/to/buildroot-speedsaver-mangopi speedsaver_defconfig O=output/speedsaver
<peterm6881> cd output/speedsaver
<peterm6881> make
<Xogium> all of them except the first one
<peterm6881> make clean && make i mean
<peterm6881> ok
<Xogium> you need a distclean
<Xogium> I touched the defconfig
<peterm6881> let me check my notes
<peterm6881> ok got it
<Xogium> but your buildroot was already patched so that part is fine
<peterm6881> distclean running now
<peterm6881> make distclean i mean, obvs
<Xogium> yes
<peterm6881> stand by
<peterm6881> by the way i think if you insert spacer lines between the steps in github, the copy button only copies the line you want. Otherwise it copies all the lines to the clipboard
<peterm6881> ok building now
<Xogium> hmm not sure about copying lines. I never used that lol I just select the line with shift+end then copy with ctrl+c
<peterm6881> have you tried this on a board?
<Xogium> yes
<peterm6881> i cant type run dfu_nand at the u-boot command prompt
<Xogium> why not ?
<Xogium> hmm
<peterm6881> i have the prompt , but it wont let me type anything
<Xogium> huh… weird
<Xogium> did you try unplugging and replugging ?
<peterm6881> the whole process is very hit and miss
<Xogium> hmm
<peterm6881> gonna try that now. If I installed u-boot, it should boot to that prompt right?
<peterm6881> it doesnt, putty is blank
<Xogium> you might be in FEL mode ?
<peterm6881> so if im in fel mode. i should be able to just run sudo sunxi-fel -p uboot images/u-boot-sunxi-with-spl.bin right?
<peterm6881> ERROR: Allwinner USB FEL device not found!
<peterm6881> the fucking usual
<Xogium> hrmm
<Xogium> this is so weird
<Xogium> I've never hit this
<Xogium> not sure how you hit that to reproduce
<peterm6881> Booting from FEL...
<peterm6881> ## Error: "bootcmd_dfu" not defined
<peterm6881> =>
<Xogium> right
<Xogium> so you're in u-boot now
<Xogium> so you have to erase the flash then use run_dfu_nand
<Xogium> er
<Xogium> run dfu_nand
<peterm6881> now the fucker is letting me type. Its a tricky little shit
<Xogium> weird
<Xogium> I never had this either
<peterm6881> by the way, whats the difference between our mtd erase spi-nand0 0x0 0x8000000 and mtd erase spi-nand0 in the dfrobot wiki
<Xogium> none
<peterm6881> is there a reason we specify those locations?
<peterm6881> ok nand erased
<peterm6881> downloading now
<Xogium> just to be sure
<peterm6881> shame we could get rid of these, the OPi0 has a similar audio one
<peterm6881> [ 1.086884] debugfs: Directory '1c23c00.codec' with parent 'F1C100s Audio Codec' already present!
<peterm6881> [ 19.983037] cgroup2: Unknown parameter 'memory_recursiveprot'
<Xogium> no
<peterm6881> ok first one done, but its just a bare board
<peterm6881> can you do me a favour
<peterm6881> before i do the next one, with an actual screen
<peterm6881> can you jot down here the steps, given the changed environment, and the fact there is an image already installed
<peterm6881> and ill go through it step by step
<peterm6881> if you dont mind
<peterm6881> because at the minute, its hit and miss
<Xogium> its not hit and miss here
<Xogium> I don't understand how you get the board in that state
<peterm6881> can you write the steps in order, here
<peterm6881> and ill follow them carefully
<peterm6881> and note them down
<peterm6881> because i have 3 more to do, and i want to be crystal clear on this
<peterm6881> ?
<Xogium> you said the readme was clear yesterday
<peterm6881> as i said, given the changed environment, and the fact I get inconsistent results, can we go through it step by step
<peterm6881> ill confirm each one and document it. If necessary we can tweak the readme
<peterm6881> hello?
<Xogium> sorry have an issue with my latest build and not too sure what happens
<peterm6881> latest build of speedsaver?
<Xogium> yeah
<peterm6881> so i should use it?
<peterm6881> SHOULDN'T
<peterm6881> FFS
<Xogium> there's no more text after the starting kernel ... line and I don't understand why that is
<Xogium> hmm
<Xogium> I'll investigate this since its kinda critical and come back to you with news asap
<Xogium> but yeah standby for now
<peterm6881> ok no woories, good luck
<peterm6881> worries...
<peterm6881> sigh..
<peterm6881> by the way it always did that, thats not new. You said some stuff was silent
<peterm6881> the mango build I mean, I dont mean the orange ever did, it didnt
<Xogium> no I mean it doesn't print anything at all
<Xogium> not even the debugfs or cgroups2 or any login prompt
<peterm6881> i get a login prompt with the first board i flashed
<peterm6881> <peterm6881> have you tried this on a board?
<peterm6881> <Xogium> yes
<Xogium> hmm so that should be my very latest change… possibly
<peterm6881> Starting kernel ...
<peterm6881> [ 1.087094] debugfs: Directory '1c23c00.codec' with parent 'F1C100s Audio Codec' already present!
<peterm6881> speedsaver login:
<peterm6881> [ 5.722438] cgroup2: Unknown parameter 'memory_recursiveprot'
<peterm6881> Welcome to Speedsaver
<Speedsaver> peterm6881: Error: "login:" is not a valid command.
<peterm6881> takes about 20s between starting kernel and login prompt, all it prints are those 2 errors
<Xogium> oh so it is better ?
<Xogium> also I found why it didn't print anything on my side and fixed it
<peterm6881> nice
<peterm6881> how much better im not sure, because i need to flash one with a screen
<Xogium> right
<peterm6881> so can we do this step by step
<Xogium> but should be 15 seconds less
<Xogium> at any rate
<Speedsaver> main @ buildroot-speedsaver-mangopi: xogium pushed 1 commit (https://github.com/Speedsaver/buildroot-speedsaver-mangopi/compare/6bcca21e3695...323a1b0271a6):
<Speedsaver> main @ buildroot-speedsaver-mangopi: xogium 323a1b: board/suniv-f1c100s: run mtd list before starting DFU., remove useless env variables (https://github.com/Speedsaver/buildroot-speedsaver-mangopi/commit/323a1b0271a67aa6eea22c6ba17f0ec2b2535bee)
<peterm6881> ah crap i need to rebuild
<Xogium> you could do that later it's not an emergency
<Xogium> it just fixes a tiny problem in u-boot and removes some unused env variables from it
<Xogium> nothing too vital
<peterm6881> ok lets go through flashing
<peterm6881> ive putty running and im in peter@peter-powermatemlxxx:~/buildroot-2022.02-mango/output/speedsaver$
<Xogium> alright so
<Xogium> switch it into FEL mode
<Xogium> then run sunxi-fel… stuff
<peterm6881> wait
<peterm6881> explain putting it into fel mode
<Xogium> pressing the buttons, I mean
<peterm6881> just press both and release both?
<Xogium> yes, but not at the same time for releasing
<peterm6881> what the correct order
<Xogium> reset first, then boot, with a slight delay like half a sec
<Xogium> then once you have done that, run the sunxi-fel thing
<peterm6881> ok wait
<Xogium> once you get to the u-boot prompt in putty, you erase the nand with mtd erase spi-nand0
<Xogium> then you can do the run dfu_nand thing, then each of the 2 dfu-util commands
<peterm6881> ERROR: Allwinner USB FEL device not found!
<peterm6881> its officially shit
<Xogium> but how the hell do you run into this
<peterm6881> getting the stupid fucker successfully into FEL mode is simply too hard
<peterm6881> its not me, im a technician, its simply too fucking hard
<Xogium> so when did you see this
<Xogium> when you ran sunxi-fel ? After in the putty console ?
<peterm6881> right after i did those inital steps to put it into fel mode and run the first command
<Xogium> but you get to a u-boot prompt ?
<Xogium> I mean, if sunxi-fel ran without any complain then you definitely were in FEL mode
<peterm6881> no its prozen at the speedsaver login, it wont even let me type anything in putty
<peterm6881> frozen
<Xogium> this is crazy weird
<Xogium> you sure you have good quality usb cables ?
<peterm6881> no i got the error when i ran sunxi-fel
<peterm6881> its heartbreaking
<Xogium> hmm
<Xogium> what I do here is press both buttons, release the left button first, the noe nearest to the edge of the board, then release the right button
<Xogium> the one
<peterm6881> at least its consistently bad. Bacially i have to fuck with it till it randomly decides to work. We should explain that in the readme
<Xogium> honestly I have put mine into FEL mode at least 80 times by now, and I never had this… so I really don't understand
<peterm6881> thats right, left button would be rst
<Xogium> is there any way I could log in in your NEC via the alarm box and try and see what might be going on ?
<peterm6881> ok it did it that time, i made a slightly longer delay between releasing RST and then BOOT
<Xogium> yes like I said the delay part is very tricky
<peterm6881> the sunxi-fel ran that time
<Xogium> good good !
<peterm6881> so whats next
<Xogium> so then you can erase the nand
<peterm6881> do we really need that longer erase command?
<Xogium> nah you c9ould just type the spi-nand0 and finish it like that
<Xogium> its just that I personally felt like being aware of where it began and where it ended was a good thing
<Xogium> I think my midle finger is too long and typed that 9
<peterm6881> ok nand erased
<peterm6881> next step
<Xogium> woohoo
<Xogium> next step is you run
<Xogium> run dfu_nand
<peterm6881> sorry for slow replaies, im making a mango flash note for myself
<Xogium> then you get to you other terminal and give it the 2 dfu-util commands
<peterm6881> success
<Xogium> yay
<Xogium> and when we can turn off logins for good, it will in theory save us another 9 to 10 seconds
<peterm6881> Assumes existing data on the nand flash and that you are in the buildroot-2022.02-mango/output/speedsaver directory. Connect to device via CH340 on /dev/ttyUSB0 (or as appropriate). Note both USB cables must be connected.
<peterm6881> sudo sunxi-fel -p uboot images/u-boot-sunxi-with-spl.bin
<peterm6881> Place device into FEL mode by pressing BOOT and RST buttons, then release RST first then BOOT (with a half second delay or so). Then in the Terminal run
<peterm6881> In putty you should have a => u-boot command prompt, at this prompt erase the nand by typing
<peterm6881> mtd erase spi-nand0
<peterm6881> When completed, at the u-boot prompt type
<peterm6881> run dfu_nand
<peterm6881> then run the following 2 commands in the Terminal within 15 seconds:
<peterm6881> sudo dfu-util -a u-boot -D images/u-boot-sunxi-with-nand-spl.bin
<peterm6881> sudo dfu-util -R -a rom -D images/rootfs.ubi
<Xogium> sounds good
<Xogium> I might reword this for the readme
<Xogium> so, did it improve at least the boot ?
<peterm6881> the readme isnt bad perse, im just dumber than it assumes, so i have to make it REALLY clear for myself, so its consistent
<peterm6881> let me check lol
<peterm6881> which was kinda the whole point
<peterm6881> hmm... i counted off 43 seconds till stuff appeared on the screen, so i timed it with a stopwatch. I made it 46 seconds
<Xogium> hmm
<peterm6881> remind me why we need the login?
<peterm6881> let me recheck it, and also check against the previous image
<peterm6881> wait
<Xogium> because otherwise you can't run commands like to update with rauc eventually. Once the updates are all handled in the background, independent of us having to log in and run the rauc install command, we can turn login off
<peterm6881> oh yeah
<peterm6881> u said :)
<peterm6881> the last one was actually 46.9s, this time i got 47.01, let me try the previous build now, with the stopwatch
<peterm6881> 1 minute and 1.83 seconds
<Xogium> woah
<Xogium> definitely an improvement then
<peterm6881> so yeah, around 15s faster as predicted, well done
<peterm6881> interestingly, the login prompt appears about 3 seconds after version stamp writes to the screen
<Xogium> yeah logind is really slow
<peterm6881> just if you were comparing timings
<Xogium> ah yes, comparing oled vs login prompt
<peterm6881> so for any timings you do, if you're going by the login prompt, subtract 3 seconds
<Xogium> sounds good
<peterm6881> ok i guess thats as good as it gets for now
<Xogium> the cool thing is that we could even boot a different image via FEL not just u-boot
<Xogium> we could boot a debug image that has more functionality that way, like login support
<peterm6881> itll be good when we can ditch login eventually. Pity Busybox isnt an option
<Xogium> yeah honestly its way too basic and I'm not comfortable with using it properly
<peterm6881> but i understand it fucks everything up we worked on
<Xogium> especially for things like rauc, the idea is that rauc signals to the bootloader that the boot went good once every service run rpoperly. So, only once navit is started, only once gpsd runs
<peterm6881> yeah thats fine. To be honest, on a cold start the GNSS would be lucky to get a fix in that time
<Xogium> you need ordering and dependency handling for this, none of which busybox has
<peterm6881> in ideal conditions, they usually state TTFF is around 29-31 seconds
<Xogium> right
<peterm6881> on a cold start, way less on a warm start
<Xogium> so the 9 seconds we could get if we disable login should be good enough
<peterm6881> oh yeah. It is what it is. Im surprised nand is as slow as it is, i never thought of micro sd as being exactly fast :)
<peterm6881> i guess all that OPi0 quad core and 512 MB RAM goodness helped more than I thought!
<Xogium> yeah spi is slower than sdio
<peterm6881> its all good knowledge
<peterm6881> so any more commits before I do a final pull?
<peterm6881> better stick a version number in there
<Xogium> SPI is a bit simpler to implement, but is significantly slower than SD, as SD supports multi-bit IO (similar to QSPI), and can run at higher clock rates.
<Xogium> spi does only 1-byte io
<Xogium> qspi does, well… 4, you guessed it
<peterm6881> :)
<Xogium> there's also octa-spi but I've seen it just once
<peterm6881> Place device into FEL mode by pressing BOOT and RST buttons, then release RST first then BOOT (with a half second delay or so). Then in the Terminal run
<peterm6881> Assumes existing data on the nand flash and that you are in the buildroot-2022.02-mango/output/speedsaver directory. Connect to device via CH340 on /dev/ttyUSB0 (or as appropriate). Note both USB cables must be connected.
<peterm6881> In putty you should have a => u-boot command prompt, at this prompt erase the nand by typing
<peterm6881> sudo sunxi-fel -p uboot images/u-boot-sunxi-with-spl.bin
<peterm6881> mtd erase spi-nand0
<peterm6881> When completed, at the u-boot prompt type
<peterm6881> run dfu_nand
<peterm6881> then run the following 2 commands in the Terminal, the first within 15 seconds:
<peterm6881> sudo dfu-util -a u-boot -D images/u-boot-sunxi-with-nand-spl.bin
<peterm6881> sudo dfu-util -R -a rom -D images/rootfs.ubi
<peterm6881> Device should reboot automatically. First boot will be slower, subsequent boots will be faster.
<peterm6881> i tweaked it
<Xogium> nice
<Xogium> yeah I'll change the readme a bit, then make a release, if that's fine with you
<peterm6881> its up to you if you wanna edit the readme,
<peterm6881> sure
<peterm6881> do put a blank space line between the commands though, it helps clarity and copying
<peterm6881> i'll watch out for the release and update my devices. Thanks for the help, good work today
peterm6881 has quit [Quit: Leaving]
peterm6881 has joined #Speedsaver
<Speedsaver> main @ buildroot-speedsaver-mangopi: xogium pushed 1 commit (https://github.com/Speedsaver/buildroot-speedsaver-mangopi/compare/323a1b0271a6...858f1af18902):
<Speedsaver> main @ buildroot-speedsaver-mangopi: xogium 858f1a: Readme: make readme clearer and add instructions for sunxi-tools. (https://github.com/Speedsaver/buildroot-speedsaver-mangopi/commit/858f1af18902a6cfeef73c3605c0fdf48df83e95)
<Xogium> can you read the readme and let me know if it is good now ?
<Speedsaver> main @ buildroot-speedsaver-mangopi: xogium pushed 1 commit (https://github.com/Speedsaver/buildroot-speedsaver-mangopi/compare/858f1af18902...7a4ff3b4a098):
<Speedsaver> main @ buildroot-speedsaver-mangopi: xogium 7a4ff3: Readme: fix typo. (https://github.com/Speedsaver/buildroot-speedsaver-mangopi/commit/7a4ff3b4a0983b6fe74091335587d3f8d0f4ebe8)
<Xogium> ah I should remove the line about 15 seconds for dfu happening at every boot
<Xogium> but other than that
<Speedsaver> main @ buildroot-speedsaver-mangopi: xogium pushed 1 commit (https://github.com/Speedsaver/buildroot-speedsaver-mangopi/compare/7a4ff3b4a098...3b7851df9ff4):
<Speedsaver> main @ buildroot-speedsaver-mangopi: xogium 3b7851: Readme: remove mention of 15 seconds timeout for DFU at every boot. (https://github.com/Speedsaver/buildroot-speedsaver-mangopi/commit/3b7851df9ff4d55098339e08da289708f22a5099)
<peterm6881> yeah readme is better
<peterm6881> thanks
<peterm6881> have you made all the commits you're gonna make to the build?
<Xogium> yeah, think so
<peterm6881> nice. have a decent dinner!
<Xogium> will make a release with this, I think
<peterm6881> oh yeah!
<peterm6881> yes please
<Speedsaver> buildroot-speedsaver-mangopi: xogium tagged 2022-03-13 (https://github.com/Speedsaver/buildroot-speedsaver-mangopi/releases/tag/2022-03-13)
<Speedsaver> buildroot-speedsaver-mangopi: xogium tagged * 5d3d3b (Release 2022-03-13) as 2022-03-13 (https://github.com/Speedsaver/buildroot-speedsaver-mangopi/commit/5d3d3b389691)
<Speedsaver> 2022-03-13 @ buildroot-speedsaver-mangopi: xogium 5d3d3b: Release 2022-03-13 (https://github.com/Speedsaver/buildroot-speedsaver-mangopi/commit/5d3d3b389691edd6665faa1fe726db30f126d172)
<Speedsaver> main @ buildroot-speedsaver-mangopi: xogium pushed 1 commit (https://github.com/Speedsaver/buildroot-speedsaver-mangopi/compare/3b7851df9ff4...5d3d3b389691):
<Speedsaver> main @ buildroot-speedsaver-mangopi: xogium 5d3d3b: Release 2022-03-13 (https://github.com/Speedsaver/buildroot-speedsaver-mangopi/commit/5d3d3b389691edd6665faa1fe726db30f126d172)
<peterm6881> love that bot
<Xogium> yeah, ain't he useful
<peterm6881> i thought it was a she....
<Xogium> well, its a bot… so I guess, it is more suitable
<peterm6881> bot, which pronown do you prefer?
<Xogium> I guess we'll never know
<Xogium> :p
<peterm6881> :)
peterm6881 has quit [Read error: Connection reset by peer]