*** tpb has joined #timvideos | 00:00 | |
*** CarlFK has joined #timvideos | 00:33 | |
*** ChanServ sets mode: +v CarlFK | 00:33 | |
*** FelixVi has quit IRC | 01:23 | |
shenki | Linux buildroot 4.15.0-rc3-next-20171212-00012-ga2920d64bd9e #6 Wed Dec 13 14:02:59 Ax | 03:40 |
---|---|---|
shenki | bleeding edge | 03:40 |
shenki | mithro: do we have a way to program the flash on the ARTY? | 04:10 |
shenki | I'd like to put the gateware on there | 04:10 |
*** rohitksingh_work has joined #timvideos | 04:12 | |
mithro | Make flash should work | 04:18 |
shenki | mithro: okay | 04:19 |
shenki | mithro: i forward-ported the 'make litex boot' stuff to linux-next | 04:19 |
shenki | mithro: and seperated out the litex uart assembly changes from the rest | 04:19 |
shenki | mithro: did you find the email where you explained what the other changes are for? | 04:20 |
shenki | Error: Unknown flash device (ID 0x00ffffff) | 04:22 |
shenki | $ openocd --version | 04:38 |
shenki | Open On-Chip Debugger 0.10.0+dev-00219-geb26a884e-dirty (2017-12-11-07:14) | 04:38 |
shenki | mmm -dirty | 04:38 |
*** thaytan has quit IRC | 04:46 | |
shenki | _florent_: have you had any success programing an atrix with openocd? | 04:55 |
*** FelixVi has joined #timvideos | 05:10 | |
*** thaytan has joined #timvideos | 05:12 | |
*** ChanServ sets mode: +v thaytan | 05:13 | |
shenki | i used vivado to program my board. it would be good to get openocd working though | 05:13 |
*** FelixVi has quit IRC | 05:13 | |
*** msantana has quit IRC | 05:15 | |
*** FelixVi has joined #timvideos | 05:16 | |
*** msantana has joined #timvideos | 05:18 | |
*** cr1901_modern has quit IRC | 05:43 | |
*** cr1901_modern has joined #timvideos | 05:45 | |
*** CarlFK has quit IRC | 05:45 | |
mithro | shenki: I'm pretty sure OpenOCD does work but don't have time now to look into it | 05:52 |
mithro | shenki: "early_printk working on actual hardware!" has some explanation on the patches | 05:52 |
mithro | shenki: The major patch needed apart from drivers to make LiteX work is support for EVBAR in head.S this is complicated by the fact we can't touch anything at the time we need to stash it -- currently I use a hack to stash EVBAR into r0 which the ABI says should be set to zero. See https://github.com/mithro/linux-litex/commit/edd416193fe9992cb9a512f325bc1e49f6aa673e | 05:53 |
tpb | Title: Fix the register clobbering. · mithro/linux-litex@edd4161 · GitHub (at github.com) | 05:53 |
mithro | - enabling printing of exceptions with litex-uart | 05:54 |
mithro | - relating to the evbar setup | 05:54 |
mithro | - mmu hacking | 05:54 |
mithro | - some save/restoring of registers, I think this is so we preserve the evbar state? | 05:54 |
shenki | okay. so you take advantage of the fact that the load/store GPR macros use offsets from r0 in order to load/store their values relative to evbar | 05:55 |
mithro | Not sure - it was a long time ago... | 05:55 |
mithro | I think I was just using r0 as a know register which didn't any user data | 05:56 |
mithro | s/know/known/ | 05:56 |
shenki | you wrap the macros EXCEPTION_T_STORE_GPR30 in a _SETUP/_CLEAR macro | 05:56 |
shenki | and those EXCEPTION_T_STORE_GPRX macros do "l.sw 0x78(r0),r30" | 05:57 |
mithro | because if we try to push / pop EVBAR anything off the stack we can hit a second fault | 05:57 |
shenki | that's a load r30 into r0+0x78, yeha? | 05:57 |
mithro | shenki: Can you link me to the code - I can't recall from memory :-P | 06:02 |
shenki | you just linked me to it :) | 06:04 |
shenki | https://github.com/mithro/linux-litex/commit/edd416193fe9992cb9a512f325bc1e49f6aa673e#diff-f70473e1f678782f0f5affdf55592e57R62 | 06:05 |
tpb | Title: Fix the register clobbering. · mithro/linux-litex@edd4161 · GitHub (at github.com) | 06:05 |
shenki | err, that didn't work | 06:05 |
shenki | line 62 | 06:05 |
shenki | your SETUP macro does a load from the EVBAR special register into zero | 06:05 |
mithro | +#define TEMPORARY_SETUPl.mfsprr0,r0,SPR_EVBAR | 06:06 |
shenki | and then on line eg. 96 you can see what the GPR load/store does | 06:06 |
shenki | #define EXCEPTION_STORE_GPR9l.sw 0x10(r0),r9 | 06:06 |
shenki | #define EXCEPTION_LOAD_GPR9l.lwz r9,0x10(r0) | 06:06 |
shenki | #define EXCEPTION_STORE_GPR9 l.sw 0x10(r0),r9 | 06:06 |
shenki | #define EXCEPTION_LOAD_GPR9 l.lwz r9,0x10(r0) | 06:06 |
shenki | that's load r9 into 0x10 + r0, and store r9 into 0x10 + r0? | 06:07 |
mithro | #define EXCEPTION_T_STORE_GPR30l.sw 0x78(r0),r30 | 06:07 |
mithro | yeah | 06:08 |
mithro | I think you are right | 06:08 |
shenki | cool | 06:08 |
shenki | we could change the kernel ABI to use one of the GPRs to always have the value of the EVBAR in it | 06:08 |
shenki | shorne might have other ideas on how to solve the problem | 06:09 |
mithro | Yeah | 06:09 |
mithro | It was a temporary hack until a better solution was found | 06:09 |
shenki | yep | 06:10 |
shenki | it did the trick | 06:10 |
shenki | keen to get it sorted this week, so we can get the patches ready before christmas | 06:10 |
mithro | I feel like there is something about setting EVBAR... | 06:11 |
mithro | I don't know why I do the setup clear after a bunch of loads... | 06:12 |
shenki | you need to make sure r0 contains zero for the rest of the code | 06:13 |
mithro | I think there is some interaction between hitting a page boundary while stack pushing/poping... | 06:13 |
shenki | mithro: the bit on line 900ish is different to the register saving stuff. do you recall what that was about? | 06:21 |
mithro | shenki: I'm pretty sure that by fixing the tovirt/__ava macros those lines are not needed any more | 06:22 |
shenki | okay. you don't use the tovirt macro anywhere :) | 06:23 |
mithro | shenki: Other macros do I believe | 06:23 |
shenki | i grepped the source tree, there's no users | 06:23 |
shenki | you did change tophys, so perhaps that was enough to fix that code? | 06:24 |
mithro | shenki: I seem to recall it's obfuscated in some way... | 06:24 |
shenki | okay. it still builds and boots when they are deleted | 06:25 |
mithro | NFI then... | 06:25 |
shenki | ok | 06:25 |
shenki | in the version of the patches i've been using, the LOAD_SYMBOL_2_GPR(r6,CSR_REGION_START) code is commented out | 06:25 |
shenki | oh. that code is making it so the virtual address space == physical for the first chunk of memory | 06:27 |
shenki | which is where head.S does all of it's storing of stuff | 06:28 |
shenki | i wonder if you were trying to make that cover EVBAR and up instead? | 06:28 |
*** FelixVi has quit IRC | 06:34 | |
shenki | if i revert it back to upstream the kernel boots | 06:35 |
*** CarlFK has joined #timvideos | 07:09 | |
*** ChanServ sets mode: +v CarlFK | 07:09 | |
shenki | here's my kernel source tree if anyone wants to try out networking: https://github.com/shenki/linux/tree/litex/litex-4.15 | 07:34 |
tpb | Title: GitHub - shenki/linux at litex/litex-4.15 (at github.com) | 07:34 |
shenki | i can't get dhcp or ssh to work. but ping and tftp do work | 07:34 |
*** cr1901_modern has quit IRC | 08:50 | |
*** cr1901_modern has joined #timvideos | 10:20 | |
_florent_ | shenki: yes i got openocd working with artix7, i'll try to find that later | 11:15 |
shenki | _florent_: cheers | 11:43 |
*** tsglove has joined #timvideos | 11:48 | |
shorne | mithro: shenki: I am not to sure what you are looking at without reading more of the history | 12:31 |
shorne | setting r0 to non zero is not good, also for litex case I think evbar can be set once are remain the same ? | 12:32 |
*** rohitksingh_work has quit IRC | 12:40 | |
shenki | yeah. mithro's hacks are not to change evbar | 12:47 |
shenki | but to make sure that the laods/saves of GPRs are relative to EVBAR in head.S | 12:47 |
shenki | i've tried to split the patches into different functional changes. it's still a bit rough | 12:48 |
shenki | https://github.com/shenki/linux/commit/dd89c82ec7b59ccf76b8ae30501e24c5056367b9 | 12:48 |
tpb | Title: openrisc: Save GPRs releative to EVBAR · shenki/linux@dd89c82 · GitHub (at github.com) | 12:48 |
*** mikal_ has quit IRC | 13:05 | |
*** mikal has joined #timvideos | 13:07 | |
*** rohitksingh has joined #timvideos | 13:41 | |
*** rohitksingh has quit IRC | 14:27 | |
*** rohitksingh has joined #timvideos | 14:30 | |
cr1901_modern | Okay, so XMODEM firmware upload is about to be merged in. I've confirmed that it works on my end; could someone else with a mimasv2 or opsis check out my branch (xfer-fw), | 14:45 |
cr1901_modern | do a full build, and confirm that upload works by attempting to upload the same firmware file? https://github.com/timvideos/HDMI2USB-litex-firmware/pull/370 | 14:45 |
tpb | Title: Add writable SPI flash and XMODEM xfer support by cr1901 · Pull Request #370 · timvideos/HDMI2USB-litex-firmware · GitHub (at github.com) | 14:45 |
cr1901_modern | I've provided two convenience scripts- getcrc32.py and write_firm.sh to automate the process. This requires you to have the "rz" package installed | 14:47 |
cr1901_modern | To build the XMODEM upload code requires meson b/c the code is provided as a submodule | 14:47 |
cr1901_modern | Of of course travis is gonna fail | 14:52 |
cr1901_modern | It has no concept of meson.py | 14:52 |
cr1901_modern | mithro: I presume you want me to take care of fixing travis :P? | 14:55 |
*** abhas has joined #timvideos | 15:54 | |
cr1901_modern | mithro: The Ubuntu version used for trusty is too old to have a meson package. I'm not sure how to proceed. | 16:24 |
cr1901_modern | Is python provided by default in the CI environment? | 16:24 |
*** danielki has joined #timvideos | 16:31 | |
danielki | hi guys | 16:31 |
danielki | so I finally managed to flash our opsis using prebuilt firmware | 16:32 |
danielki | now how do I switch the thing back to operational mode? | 16:32 |
danielki | "hdmi2usb-mode-switch --mode operational" says it's not implemented | 16:32 |
danielki | power cycling always gets me into jtag mode | 16:35 |
felix_ | shenki: i'm not sure if the arty uses the digilent-hs1 or the digilent hs-2 programmer; if it's the hs1 variant this should work: openocd -f board/kc705.cfg -c init -c "pld load 0 bitstream.bit" -c exit | 16:49 |
danielki | never mind, I found the problem; a rogue ixo-usb-jtag.rules file | 16:49 |
felix_ | if it's the hs2 variant, you have to create a different board cfg file, but that's easy (maybe there is even some board cfg file with the right programmer) | 16:50 |
*** danielki has left #timvideos | 17:18 | |
CarlFK | mithro: docs | 17:28 |
CarlFK | I would love to have a place to mention the rogue ixo-usb-jtag.rules file | 17:28 |
*** rohitksingh has quit IRC | 17:29 | |
*** danielki has joined #timvideos | 18:15 | |
*** danielki has left #timvideos | 18:15 | |
*** [d__d] has quit IRC | 18:21 | |
*** [d__d] has joined #timvideos | 18:23 | |
*** abhas has quit IRC | 18:34 | |
*** tsglove has quit IRC | 18:59 | |
mithro | cr1901_modern: https://github.com/m-labs/migen/pull/95#issuecomment-351495709 | 19:29 |
tpb | Title: Add MyStorm BlackIce I and II platforms by adamgreig · Pull Request #95 · m-labs/migen · GitHub (at github.com) | 19:29 |
mithro | https://docs.google.com/forms/d/e/1FAIpQLSe9-olMI1H0_5FhxSczxw7tAZCN60icgGKb1ujEmMKrblFTyQ/viewform | 19:54 |
tpb | Title: GSoC Sydney Meetup (at docs.google.com) | 19:54 |
mithro | CarlFK: Can we just add a check in mode-switch to remove it? | 19:55 |
cr1901_modern | mithro: Why does navigating to mith.ro throw up a fake Guru Meditation error? | 20:16 |
mithro | Guru mediation error? Screenshot? | 20:17 |
cr1901_modern | mithro: https://imgur.com/82ZrKZd | 20:19 |
tpb | Title: Imgur: The magic of the Internet (at imgur.com) | 20:19 |
cr1901_modern | Looks like a fake Guru Meditation to me | 20:19 |
mithro | Oh - that is just more the page you get on my webserver when a domain is not set up | 20:21 |
cr1901_modern | It's a nice touch... reminds me of an old obscure Amiga error :) | 20:25 |
* cr1901_modern has never own an Amiga | 20:25 | |
CarlFK[m] | mithro (IRC): I think I have seen one of your scripts detect it and suggest removing it. but I wouldn't want anything to just do it. | 20:26 |
mithro | CarlFK[m]: Sorry about not looking at the docs stuff yet, I'm pushing to get stuff released at work so things are hectic at the moment | 20:32 |
CarlFK | mithro: if you will put a link to a wiki page I can edit, I'll fill it in there | 20:33 |
mithro | CarlFK: Do you want to clean up this wiki? -> https://github.com/timvideos/HDMI2USB/wiki | 20:33 |
tpb | Title: Home · timvideos/HDMI2USB Wiki · GitHub (at github.com) | 20:33 |
CarlFK | mithro: only if that URL is on this page https://hdmi2usb.tv/firmware/ | 20:34 |
mithro | I can do that | 20:34 |
mithro | CarlFK: Can you go to the following for your pull request -> https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/ | 20:38 |
tpb | Title: Allowing changes to a pull request branch created from a fork - User Documentation (at help.github.com) | 20:38 |
CarlFK | mithro: "In the the right sidebar of your pull request, select Allow edits from maintainers" I see the sidebar, I don't see anything like that option | 20:42 |
mithro | CarlFK: On this page -> https://github.com/timvideos/hdmi2usb.tv/pull/21 | 20:43 |
tpb | Title: flash-gateware instructions by mithro · Pull Request #21 · timvideos/hdmi2usb.tv · GitHub (at github.com) | 20:43 |
CarlFK | I can lock and now "Unlock conversation on this pull request" | 20:45 |
*** tpb has joined #timvideos | 20:49 | |
cr1901_modern | mithro: Do you have any suggestions to fix travis? | 20:53 |
mithro | CarlFK: https://github.com/timvideos/HDMI2USB/wiki/Flashing-Firmware | 21:04 |
tpb | Title: Flashing Firmware · timvideos/HDMI2USB Wiki · GitHub (at github.com) | 21:05 |
mithro | CarlFK: Keep refreshing https://hdmi2usb.tv/firmware/ for the next 5 minutes and it should update shortly... | 21:06 |
mithro | CarlFK: Should be updated now.... | 21:08 |
CarlFK | mithro: If you are user, look at the ‘Flashing prebuilt firmware’ section. | 21:10 |
CarlFK | that is what i want to edit | 21:10 |
CarlFK | https://hdmi2usb.tv/firmware/#flashing-prebuilt-firmware (thats ... odd.) | 21:11 |
mithro | CarlFK: take a look now | 21:17 |
mithro | CarlFK: Lots of links to the wiki | 21:22 |
CarlFK | If you are user, look at the ‘Flashing prebuilt firmware’ section. | 21:26 |
CarlFK | oh, that goest hte | 21:26 |
CarlFK | never mind | 21:26 |
mithro | CarlFK: all good? | 21:28 |
CarlFK | yes - filling in that page now | 21:28 |
mithro | CarlFK: can you also clean up the rest of that wiki too? | 21:30 |
CarlFK | mithro: I was looking it over, not sure what needs cleaning up | 21:31 |
CarlFK | and really, I want to get a handle up flashing so I can flash those 6? versions I listed somewhere | 21:31 |
CarlFK | mithro: xenial is the most supported/preferred distro, right ? | 21:32 |
mithro | "hdmi2usb-mode-switch --flash-image image-gateware+bios+firmware.bin" | 21:33 |
CarlFK | mithro: where is your script to dl ... um.. something | 21:41 |
mithro | CarlFK: https://github.com/mithro/HDMI2USB-mode-switch/blob/master/download-hdmi2usb-firmware.sh | 21:42 |
tpb | Title: HDMI2USB-mode-switch/download-hdmi2usb-firmware.sh at master · mithro/HDMI2USB-mode-switch · GitHub (at github.com) | 21:42 |
mithro | CarlFK: I would like that to be part of mode-switch and written in Python rather than the horrible shell script... | 21:42 |
mithro | CarlFK: The two Linux distros I use at the moment are -- (a) Ubuntu Trusty Tahr and (b) Debian Testing (rolling release) | 22:43 |
mithro | CarlFK: shorne uses Fedora and jimmo uses Arch | 22:44 |
CarlFK | you use trusty? | 22:44 |
CarlFK | I thought there was some reason we couldn't. hmm. lets see if my trusty installer still wroks | 22:45 |
mithro | Trusty is mostly dead | 22:51 |
*** jea[m] has quit IRC | 22:58 | |
*** jea[m] has joined #timvideos | 23:01 | |
CarlFK[m] | ah now I remember.. my automated installer segfaults trying to do dns lookups | 23:06 |
mithro | I have acquired internet! | 23:07 |
mithro | https://usercontent.irccloud-cdn.com/file/Xyh5NguC/image.png | 23:07 |
mithro | Upload is a bit slow :-( | 23:07 |
shenki | felix_: thanks! How do I discover what the programmer is? | 23:40 |
shenki | felix_: i thought it was just a ftdi chip that spoke jtag to the fpga | 23:41 |
shenki | felix_: and we need the correct FPGA bitstream loaded so it can then talk to the SPI flash | 23:41 |
felix_ | look at the output of lspci and then check the two programmer definition files in openocd | 23:52 |
felix_ | on how to use the proxy bitstream for flashing have a look at the comment at the end of the kc705 board config file | 23:52 |
felix_ | the command i wrote is just for loading the bitstream into the fpga and not for writing the flash | 23:52 |
mithro | shenki https://github.com/timvideos/conda-hdmi2usb-packages/blob/master/openocd/digilent-arty.patch | 23:52 |
tpb | Title: conda-hdmi2usb-packages/digilent-arty.patch at master · timvideos/conda-hdmi2usb-packages · GitHub (at github.com) | 23:52 |
mithro | shenki: https://github.com/timvideos/HDMI2USB-litex-firmware/blob/master/targets/common/openocd.mk | 23:53 |
tpb | Title: HDMI2USB-litex-firmware/openocd.mk at master · timvideos/HDMI2USB-litex-firmware · GitHub (at github.com) | 23:53 |
felix_ | hmm, that's the same id as the digilent hs1 programmer, but the ftdi layout is different. weird | 23:54 |
mithro | Last chance to sign up for FPGA Miniconf before I email everyone about it -> https://linux.conf.au/programme/miniconfs/fpga/ | 23:56 |
tpb | Title: linux.conf.au 2018 - Sydney 22-26 January 2018 (at linux.conf.au) | 23:56 |
felix_ | oh, wait, i looked at the wrong file | 23:56 |
felix_ | the definitions in the arty file are just a copy of the definitions in the digilent hs1 cfg file | 23:56 |
felix_ | i'd include the digilent-hs1.cfg in the arty file instead | 23:57 |
Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!