*** tpb has joined #timvideos | 00:00 | |
shorne | CarlFK[m]: I reproduced the failure on the qemu build | 00:27 |
---|---|---|
CarlFK | shorne: cool - Ubuntu - beaver if it still helps | 01:18 |
CarlFK | shorne: happy to try things, run scripts, etc. but applying patches and submitting upstream ... seems like a bad idea | 01:19 |
shorne | CarlFK: Can you try out this? https://github.com/stffrdhrn/qemu/tree/litex | 01:32 |
tpb | Title: GitHub - stffrdhrn/qemu at litex (at github.com) | 01:32 |
shorne | I just rebased, it builds | 01:32 |
shorne | had to do a bit of fixups | 01:32 |
CarlFK | woot! Sure thing | 01:32 |
xobs | Morning all | 01:32 |
shorne | looks ike rebase was pretty smooth, but not sure what will happen when we try to boot the bios | 01:32 |
shorne | Need to go out for the day | 01:33 |
xobs | I can say with confidence that Ubuntu 18.04 is full of issues and seems like it was shipped in a beta state. | 01:33 |
xobs | mithro, was there anything you wanted me to do with the etherbone stuff? Making libraries and such? | 01:33 |
mithro | xobs: Well, I think we should have a good library somewhere :-P | 01:34 |
mithro | xobs: And at the moment, it seems like you'll be the most likely to write one :-) | 01:34 |
CarlFK | shorne: should I report errors here or #qemu? | 01:39 |
CarlFK | hm,m they may become mithro thins real soon , so here: util/memfd.c:40:12: error: static declaration of ‘memfd_create’ follows non-static declaration | 01:39 |
mithro | ? | 01:40 |
CarlFK | mithro: getting your qemu fork to build | 01:40 |
CarlFK | shorne: Ubuntu 18.04.1 http://paste.ubuntu.com/p/5GZpdZXntg/ | 01:42 |
tpb | Title: Ubuntu Pastebin (at paste.ubuntu.com) | 01:42 |
xobs | CarlFK: Seems like a glibc-2.27 bug. Here's a build patch that purports to fix it: http://lists.openembedded.org/pipermail/openembedded-core/2018-January/146949.html | 01:47 |
tpb | Title: [OE-core] [PATCH] qemu: fix memfd_create with glibc 2.27 (at lists.openembedded.org) | 01:47 |
xobs | The big change seems to be to modify util/memfd.c to remove "#include <sys/memfd.h>" | 01:48 |
CarlFK | xobs: the hope was that got applied by: (08:26:52 PM) shorne: I just rebased, it builds | 01:49 |
CarlFK | and this means I can go grab some food now: (08:27:43 PM) shorne: Need to go out for the day | 01:50 |
shorne | CarlFK: hmm, thats the same failure as before | 01:52 |
shorne | my for should have it fixed | 01:52 |
CarlFK | yep | 01:52 |
shorne | are you on | 01:53 |
shorne | git log --oneline -n3 | 01:53 |
shorne | b427eaf359 (HEAD -> litex, shorne/litex) litex: or32 -> or1k in litex build script | 01:53 |
shorne | e29e8336cf litex: Ename I2C for openrisc to allow build to link | 01:53 |
shorne | oh... ok thats just your conversation with xobs | 01:54 |
CarlFK | shorne: yep | 02:01 |
CarlFK | er, wait... | 02:01 |
CarlFK | juser@cnt6:~/qemu$ git log --oneline -n3 | 02:02 |
CarlFK | f90ea7ba7c (HEAD -> master, origin/master, origin/HEAD) Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20171012' into staging | 02:02 |
CarlFK | cf5f7937b0 nvic: Fix miscalculation of offsets into ITNS array | 02:02 |
CarlFK | a94bb9cd58 nvic: Add missing 'break' | 02:02 |
CarlFK | ahk litex brancy | 02:03 |
*** Kripton has quit IRC | 02:07 | |
*** Kripton has joined #timvideos | 02:07 | |
CarlFK | shorne: next up: I'll test mithro's process https://github.com/timvideos/litex-buildenv/wiki/HowTo-LCA2018-FPGA-Miniconf#try-running-test-firmware-inside-qemu | 02:10 |
tpb | Title: HowTo LCA2018 FPGA Miniconf · timvideos/litex-buildenv Wiki · GitHub (at github.com) | 02:10 |
*** roger_rabbit has joined #timvideos | 02:15 | |
*** rohitksingh has joined #timvideos | 02:15 | |
*** roger_rabbit has quit IRC | 02:16 | |
CarlFK | shorne: LINK alpha-softmmu/qemu-system-alpha | 02:17 |
CarlFK | ../hw/i2c/bitbang_i2c.o: In function `gpio_i2c_init': | 02:17 |
CarlFK | /home/juser/qemu/hw/i2c/bitbang_i2c.c:234: undefined reference to `i2c_init_bus' | 02:17 |
CarlFK | shorne: http://paste.ubuntu.com/p/Xy4jp8Y8qC/ | 02:17 |
tpb | Title: Ubuntu Pastebin (at paste.ubuntu.com) | 02:17 |
*** rohitksingh has quit IRC | 02:25 | |
*** nitrix19 has joined #timvideos | 02:25 | |
*** monoxane14 has joined #timvideos | 02:26 | |
*** nitrix19 has quit IRC | 02:26 | |
shorne | CarlFK: hmm, why are you building alpha-softmmu | 02:27 |
shorne | for some reason link now required CONFIG_I2C | 02:28 |
CarlFK | shorne: umm, I just did ./configure;make | 02:28 |
shorne | I guess everything now requires CONFIG_I2C ... which is wrong | 02:28 |
shorne | for my build i did configure --target-list=lm32-softmmu,or1k-softmmu | 02:29 |
shorne | which enables or1k and lm32, which both have CONFIG_I2C enabled, which allows for the linking | 02:29 |
shorne | mabye this was broken before, but because we only enable lm32 and or1k its not an issue | 02:30 |
CarlFK | trying that - and I'll dig into the build script I hope to get working | 02:31 |
*** monoxane14 has quit IRC | 02:31 | |
shorne | CarlFK: can you try with the --larget-list option? I updated the build scripts | 02:31 |
shorne | the build script should work too... but it requires the whole litex environment | 02:31 |
shorne | also you cant just build outside the environment, because litex depends on 'generated/csr.h' | 02:31 |
CarlFK | yeah - I've set it up a few times in the last few weeks | 02:31 |
shorne | I mean 'you can just build qemu outside the environment' ... | 02:32 |
shorne | For me I just created a 'generated/csr.h' in my build directory to work around it | 02:33 |
shorne | just contains | 02:33 |
shorne | #ifndef LITEX_CSR | 02:33 |
shorne | #define LITEX_CSR | 02:33 |
shorne | #define CONFIG_CPU_RESET_ADDR 0x100 | 02:33 |
shorne | #endif | 02:33 |
CarlFK | what do I do with --larget-list ? | 02:34 |
shorne | ../configure \ | 02:34 |
shorne | --target-list=lm32-softmmu,or1k-softmmu \ | 02:34 |
shorne | --python=/usr/bin/python2 \ | 02:34 |
shorne | --enable-fdt \ | 02:35 |
shorne | --disable-kvm \ | 02:35 |
shorne | --disable-xen \ | 02:35 |
shorne | --enable-debug \ | 02:35 |
shorne | --enable-debug-info | 02:35 |
shorne | you can run configure like that... I did it in a directory called 'build-litex' | 02:35 |
shorne | target-list not larget-list ? | 02:35 |
shorne | I didnt do the --python option | 02:35 |
CarlFK | lol | 02:35 |
CarlFK | ok, got it | 02:35 |
CarlFK | No such file or directory #include "generated/mem.h" | 02:38 |
CarlFK | CC lm32-softmmu/hw/litex/hw.o /home/juser/qemu/hw/litex/hw.c:20:10 | 02:38 |
CarlFK | er wait.. | 02:39 |
CarlFK | http://paste.ubuntu.com/p/FKrDXvTkys/ | 02:40 |
tpb | Title: Ubuntu Pastebin (at paste.ubuntu.com) | 02:40 |
shorne | yeah, sorry you need to created a 'generated/mem.h' too | 02:40 |
shorne | alongsize the csr.h | 02:40 |
shorne | you can just make it blank | 02:40 |
shorne | but rally, we need to build in the litex environment | 02:40 |
shorne | 'really' | 02:40 |
CarlFK | http://paste.ubuntu.com/p/TPNCWw4mBX/ cc1: all warnings being treated as errors | 02:43 |
tpb | Title: Ubuntu Pastebin (at paste.ubuntu.com) | 02:43 |
shorne | ok, those are lm32 issues... i didnt try building it | 02:48 |
shorne | I know it I fixed on or1k | 02:48 |
shorne | give me a second | 02:48 |
CarlFK | k | 02:48 |
*** futarisIRCcloud has quit IRC | 02:50 | |
shorne | added | 02:53 |
shorne | #define ROM_BASE 0x0 | 02:53 |
shorne | to csr.h (probably should be in mem.h) but just there for quick hack | 02:53 |
CarlFK | http://paste.ubuntu.com/p/qRzkGyVJxD/‘ROM_SIZE’ undeclared | 02:56 |
CarlFK | added #define ROM_SIZE 0x0, now: http://paste.ubuntu.com/p/rJwYyqkWrX/ | 02:58 |
tpb | Title: Ubuntu Pastebin (at paste.ubuntu.com) | 02:58 |
shorne | yeah, I have some more patches | 02:58 |
shorne | now lm32 needs CONFIG_I2C also | 02:58 |
shorne | give me a minutes I will post the patch | 02:59 |
CarlFK | k | 02:59 |
shorne | I see, this bigbang i2c needs a config param | 03:04 |
*** futarisIRCcloud has joined #timvideos | 03:05 | |
shorne | git lo | 03:10 |
shorne | 01486aa52e (HEAD -> litex, shorne/litex) litex: Fix I2C configs to be configurable | 03:10 |
shorne | 888c05f1aa litex: Update lm32 litex as per new API's | 03:10 |
shorne | I pushed a few fixes | 03:10 |
shorne | b427eaf359 litex: or32 -> or1k in litex build script | 03:10 |
shorne | CarlFK: you can try that, I fixed the alpha build issue | 03:11 |
shorne | also, lm32 | 03:11 |
shorne | We need to really clean up these patches | 03:11 |
*** thaytan has quit IRC | 03:11 | |
CarlFK | shorne: woot, completed. ./configure --target-list=lm32-softmmu,or1k-softmmu; make | 03:13 |
CarlFK | trying litex-buildenv$ vim ./scripts/build-qemu.sh now | 03:13 |
shorne | cool | 03:13 |
shorne | I noticed that the CSR/MEM configs uncover a bit of code.. it might cause some issues | 03:14 |
shorne | might now | 03:14 |
shorne | might not* | 03:14 |
*** thaytan has joined #timvideos | 03:16 | |
*** ChanServ sets mode: +v thaytan | 03:16 | |
CarlFK | mithro: yo script don't work :p | 03:17 |
CarlFK | + QEMU_REMOTE=https://github.com/stffrdhrn/qemu.git good | 03:17 |
tpb | Title: GitHub - stffrdhrn/qemu: Official QEMU mirror. Please see http://wiki.qemu.org/Contribute/SubmitAPatch for how to submit changes to QEMU. Pull Requests are ignored. (at github.com) | 03:17 |
CarlFK | + git clone https://github.com/timvideos/qemu-litex.git bad! | 03:17 |
tpb | Title: GitHub - timvideos/qemu-litex (at github.com) | 03:17 |
shorne | haha | 03:18 |
CarlFK | https://github.com/timvideos/litex-buildenv/blob/master/scripts/build-qemu.sh#L36-L44 | 03:19 |
tpb | Title: litex-buildenv/build-qemu.sh at master · timvideos/litex-buildenv · GitHub (at github.com) | 03:19 |
CarlFK | rawr!!!! lol | 03:19 |
*** rohitksingh_work has joined #timvideos | 03:20 | |
shorne | CarlFK: I think you can just fix line 44 | 03:22 |
CarlFK | shorne: you would think... | 03:22 |
CarlFK | ./scripts/build-qemu.sh: line 45: cd: /home/juser/litex-buildenv/third_party/qemu-litex: No such file or directory | 03:23 |
mithro | https://github.com/timvideos/qemu-litex/blob/master/README.md#building-outside-hdmi2usb-litex-firmware | 03:23 |
tpb | Title: qemu-litex/README.md at master · timvideos/qemu-litex · GitHub (at github.com) | 03:23 |
shorne | ah... problem is my fork is not 'qemu-litex' just qemu | 03:23 |
shorne | so the directory doesnt match | 03:23 |
CarlFK | yeah - im sure theres another var I have to set | 03:24 |
CarlFK | mithro: Run the ./build-litex-qemu.sh which will ... error :p | 03:24 |
mithro | What is the error? | 03:25 |
CarlFK | mithro: because i: export QEMU_REMOTE=https://github.com/stffrdhrn/qemu.git | 03:25 |
tpb | Title: GitHub - stffrdhrn/qemu: Official QEMU mirror. Please see http://wiki.qemu.org/Contribute/SubmitAPatch for how to submit changes to QEMU. Pull Requests are ignored. (at github.com) | 03:25 |
shorne | CarlFK: QEMU_SRC_DIR=$TOP_DIR/third_party/qemu | 03:25 |
shorne | QEMU_BRANCH=litex | 03:25 |
CarlFK | shorne: im trying not to break the defaults | 03:26 |
mithro | Different scripts? | 03:26 |
shorne | We might want to define 'QEMU_SRC_DIR=${QEMU_SRC_DIR:-$TOP_DIR/third_party/qemu-litex}' | 03:27 |
CarlFK | mithro: start by looking at the first and last line of https://github.com/timvideos/litex-buildenv/blob/master/scripts/build-qemu.sh#L36-L44 | 03:27 |
tpb | Title: litex-buildenv/build-qemu.sh at master · timvideos/litex-buildenv · GitHub (at github.com) | 03:27 |
shorne | CarlFK: line 44 could actually be correct, but we can remove the 'else' | 03:28 |
shorne | i.e. 1. clone timvideos/litex-qemu as 'origin' | 03:28 |
shorne | 2. (the else part) add stffrdhrn as remote and check it out | 03:29 |
shorne | that way the directory structure qemu-litex is maintained by the timvideos repo | 03:29 |
*** esden has quit IRC | 03:30 | |
shorne | would need remote name QEMU_REMOTE_NAME=stffrdhrn | 03:30 |
shorne | just an idea to workaround me having a different repo name | 03:31 |
*** olasd has quit IRC | 03:32 | |
CarlFK | this might "work" export QEMU_REMOTE="https://github.com/stffrdhrn/qemu.git litex-qemu | 03:34 |
tpb | Title: GitHub - stffrdhrn/qemu: Official QEMU mirror. Please see http://wiki.qemu.org/Contribute/SubmitAPatch for how to submit changes to QEMU. Pull Requests are ignored. (at github.com) | 03:34 |
CarlFK | + git clone https://github.com/stffrdhrn/qemu.git litex-qemu | 03:34 |
CarlFK | Cloning into 'litex-qemu'... | 03:34 |
tpb | Title: GitHub - stffrdhrn/qemu: Official QEMU mirror. Please see http://wiki.qemu.org/Contribute/SubmitAPatch for how to submit changes to QEMU. Pull Requests are ignored. (at github.com) | 03:34 |
CarlFK | ta da! :p | 03:34 |
CarlFK | doh. qemu-litex not litex-qemu | 03:35 |
shorne | sorry, I flipped it a few times too | 03:36 |
shorne | yeah, thats better | 03:36 |
CarlFK | ERROR: Unknown target name 'or32-softmmu' | 03:36 |
CarlFK | configure --target-list=or32-softmmu --python=/usr/bin/python2 --enable-fdt --disable-kvm --disable-xen --enable-debug --enable-debug-info | 03:37 |
shorne | hmm, I thought I removed the or32 stuff | 03:39 |
shorne | can you trace where it came from? | 03:39 |
*** olasd has joined #timvideos | 03:39 | |
shorne | it changed in qemu from or32 to or1k | 03:39 |
CarlFK | k | 03:40 |
shorne | I updated the build script for it too | 03:40 |
shorne | https://github.com/timvideos/litex-buildenv/blob/master/scripts/build-qemu.sh#L77 | 03:41 |
tpb | Title: litex-buildenv/build-qemu.sh at master · timvideos/litex-buildenv · GitHub (at github.com) | 03:41 |
shorne | we can change that line | 03:41 |
CarlFK | yeah - just saw that | 03:41 |
CarlFK | crud - my git qemu-litex hack breaks this case git remote add timvideos-qemu-litex https://github.com/stffrdhrn/qemu.git qemu-litex | 03:42 |
tpb | Title: GitHub - stffrdhrn/qemu: Official QEMU mirror. Please see http://wiki.qemu.org/Contribute/SubmitAPatch for how to submit changes to QEMU. Pull Requests are ignored. (at github.com) | 03:42 |
shorne | right | 03:44 |
shorne | you can hard code qemu-litex | 03:44 |
CarlFK | In file included from /home/juser/litex-buildenv/third_party/qemu-litex/hw/litex/hw.c:19:0: | 03:44 |
CarlFK | ../generated/csr.h:3:10: fatal error: hw/common.h: No such file or directory | 03:44 |
*** esden has joined #timvideos | 03:44 | |
shorne | git clone $QEMU_REMOTE qemu-litex | 03:45 |
shorne | on line 44 | 03:45 |
CarlFK | ah right | 03:45 |
CarlFK | shorne: whos problem is that ^^ http://paste.ubuntu.com/p/pkZtHqfgwd/ | 03:48 |
tpb | Title: Ubuntu Pastebin (at paste.ubuntu.com) | 03:48 |
shorne | CarlFK: looks like litex is expecting a hw/common.h from qemu | 03:49 |
shorne | maybe its gone now | 03:49 |
shorne | let me see | 03:49 |
shorne | hmm, its still there | 03:50 |
shorne | ls -l hw/common.h | 03:51 |
shorne | -rw-rw-r--. 1 shorne shorne 157 Sep 5 09:23 hw/common.h | 03:51 |
shorne | in qemu root, on branch litex | 03:51 |
shorne | did you not get the litex branch checked out? | 03:51 |
shorne | CarlFK: ^ | 03:51 |
shorne | hw/common.h is something added for litex | 03:52 |
CarlFK | I did.. export QEMU_BRANCH=litex ... lets see if the script echo uses it like we expect... | 03:52 |
CarlFK | Branch 'litex' set up to track remote branch 'litex' from 'origin'. | 03:54 |
*** Kripton has quit IRC | 03:56 | |
shorne | CarlFK: I think this part should be outside of the elf | 03:56 |
shorne | else | 03:56 |
shorne | https://github.com/timvideos/litex-buildenv/blob/master/scripts/build-qemu.sh#L62-L66 | 03:56 |
tpb | Title: litex-buildenv/build-qemu.sh at master · timvideos/litex-buildenv · GitHub (at github.com) | 03:56 |
CarlFK | shorne: move it to 69 and add ( cd $QEMU_SRC_DIR .... ) ? | 03:58 |
shorne | I think the ( cd $QEMU_SRC_DIR ) is done inside already | 03:59 |
shorne | not needed | 03:59 |
CarlFK | um... the git checkout $QEMU_BRANCH needs to happen in QEMU_SRC_DIR, | 04:00 |
shorne | but yes, just move it | 04:00 |
shorne | but we can see in got if and else we do cd.. | 04:00 |
shorne | oh... but its in a () | 04:00 |
shorne | so its a different context | 04:00 |
shorne | ok, yes | 04:00 |
shorne | Usually I dont use the ( ) | 04:01 |
*** Kripton has joined #timvideos | 04:02 | |
CarlFK | shorne: still erroring : http://paste.ubuntu.com/p/ZdgSRBvsK5/ | 04:03 |
tpb | Title: Ubuntu Pastebin (at paste.ubuntu.com) | 04:03 |
shorne | CarlFK: ok, I see CC or1k-softmmu/hw/litex/hw.o, so its a litex branch | 04:07 |
shorne | maybe qemu root is not added to the include path any more | 04:07 |
shorne | and it was before | 04:07 |
shorne | give me a minute | 04:07 |
shorne | ok... it seems we will need to change it to '#include "hw/common.h"' | 04:19 |
shorne | not <hw/common.h> | 04:19 |
shorne | but.. it shouldnt really matter | 04:20 |
shorne | but, the hw/common.h file should be in a different place | 04:20 |
shorne | i.e. under include | 04:23 |
shorne | CarlFK: right, we dont need to move it just yet, but we need to change it to '#include "hw/common.h"' for qemu | 04:28 |
shorne | due to patch: | 04:31 |
shorne | https://github.com/stffrdhrn/qemu/commit/9edc19c939914f4475ccf5f728c0617dc8f8076e | 04:31 |
tpb | Title: make: switch from -I to -iquote · stffrdhrn/qemu@9edc19c · GitHub (at github.com) | 04:31 |
CarlFK | http://paste.ubuntu.com/p/JQ65q52Zv5/ hw/litex/hw.c:186:71: error: ‘serial_hds’ undeclared (first use in this function | 04:32 |
tpb | Title: Ubuntu Pastebin (at paste.ubuntu.com) | 04:32 |
shorne | I thought I removed that | 04:32 |
shorne | oh... because CSR_UART_BASE | 04:33 |
shorne | CarlFK: | 04:35 |
shorne | git lo | 04:35 |
shorne | 43cff55845 (HEAD -> litex, shorne/litex) litex: serial_hds[] to serial_hd() | 04:35 |
shorne | I pushed the fix for that | 04:35 |
CarlFK | shorne: I think I see "git fetch" should get it.. but http://paste.ubuntu.com/p/VXqrkjKnW6/ | 04:38 |
tpb | Title: Ubuntu Pastebin (at paste.ubuntu.com) | 04:38 |
CarlFK | I am a little surprised it didn't colide with change it to '#include "hw/common.h"' for qemu | 04:38 |
shorne | CarlFK: this last one is a bit tricky its due to -drive serial=xx command line option being deprecated | 05:01 |
shorne | so we need to proably change the command line options being sent to qemu | 05:02 |
shorne | i.e. we cant do this anymore | 05:03 |
shorne | EXTRA_ARGS+=("-drive if=mtd,format=qcow2,file=$TARGET_BUILD_DIR/qemu.qcow2,serial=$SPIFLASH_MODEL") | 05:03 |
shorne | ^ from build-qemu.sh | 05:05 |
CarlFK | shorne: obvious question: what replaced it? | 05:11 |
shorne | CarlFK: they are saying now we should do something like '-device m25p80,drive=mtd' | 05:28 |
shorne | or something | 05:28 |
shorne | I dont quite under stand the qemu options :( | 05:28 |
shorne | understand | 05:28 |
shorne | for now I just used our default | 05:28 |
shorne | it might be wrong | 05:28 |
shorne | git lo | 05:29 |
shorne | 58e6bd5b3e (HEAD -> litex, shorne/litex) litex: HACK: Disable drive serial option, deprecated | 05:29 |
shorne | 43cff55845 litex: serial_hds[] to serial_hd() | 05:29 |
shorne | I pushed the compile fix | 05:29 |
CarlFK | mithro: you might be interested in this: (11:56:31 PM) shorne: CarlFK: this last one is a bit tricky its due to -drive serial=xx command line option being deprecated | 05:29 |
CarlFK | what's the difference between git pull and git fetch origin ? | 05:35 |
shorne | CarlFK: pull, merges the changes into your current directory | 05:39 |
shorne | fetch just gets the changes to your computer, but your current directory doesnt update | 05:39 |
*** CuriousLearner has quit IRC | 05:39 | |
shorne | you need a 'merge', or 'pull' to update the current working directory copy | 05:40 |
CarlFK | 59 # Get any new data | 05:40 |
CarlFK | 60 git fetch $CURRENT_QEMU_REMOTE_NAME | 05:40 |
CarlFK | thank got we got it :p | 05:40 |
*** rails has quit IRC | 05:40 | |
shorne | ah, thats why you were missing the serial_hd changes | 05:40 |
CarlFK | yup | 05:40 |
CarlFK | woot - made it to the end | 05:42 |
CarlFK | the script errored, but this is expected : qemu-system-or1k: -drive if=mtd,format=qcow2,file=build/arty_net_or1k//qemu.qcow2,serial=n25q128a13: Block format 'qcow2' does not support the option 'serial' | 05:43 |
shorne | yes, I think we can just try to remove | 05:47 |
shorne | If you want to try something like -device=n25q128a13... it might work too | 05:48 |
shorne | but not sure how the device is tied to the drive | 05:48 |
CarlFK | qemu-system-or1k: -device=n25q128a13: invalid option | 05:50 |
shorne | Just try to remove for now | 05:50 |
*** jeggott25 has joined #timvideos | 05:51 | |
CarlFK | qemu-system-or1k: /home/juser/litex-buildenv/third_party/qemu-litex/exec.c:2008: qemu_ram_set_idstr: Assertion `!new_block->idstr[0]' failed. | 05:51 |
CarlFK | build/arty_net_or1k//qemu/or1k-softmmu/qemu-system-or1k -M litex -nographic -nodefaults -monitor telnet::10000,server,nowait -serial stdio -bios build/arty_net_or1k//software/bios/bios.bin -drive if=mtd,format=qcow2,file=build/arty_net_or1k//qemu.qcow2 -net nic -net tap,ifname=tap0,script=no,downscript=no -gdb tcp::10001 | 05:51 |
*** jeggott25 has quit IRC | 05:51 | |
shorne | hmm, seems something missing in litex/hw.c | 06:08 |
shorne | i.e. namking the memory | 06:08 |
shorne | maybe we should not be naming it | 06:08 |
shorne | not, sure about this one I would need to debug | 06:17 |
CarlFK | would ssh into my build box help? | 06:23 |
shorne | hmm, I could run on my machine, but done have much time, I guess it will help | 06:29 |
CarlFK | ssh -p 18822 [email protected] | 06:32 |
CarlFK | i grabbed your public key from github | 06:32 |
shorne | ok, let me try | 06:39 |
shorne | hmm, its asking me for a password | 06:41 |
shorne | even if I provide my own identity file | 06:41 |
shorne | did you get ssh-rsa? | 06:41 |
CarlFK | I got these: http://paste.ubuntu.com/p/3BPmpDP4fR/ | 06:42 |
tpb | Title: Ubuntu Pastebin (at paste.ubuntu.com) | 06:42 |
shorne | im in | 06:42 |
CarlFK | k | 06:42 |
CarlFK | shorne: have you been though the setup? either way, here is what I did to get 'there' https://github.com/timvideos/litex-buildenv/wiki/HowTo-LCA2018-FPGA-Miniconf#resuming-development | 06:45 |
tpb | Title: HowTo LCA2018 FPGA Miniconf · timvideos/litex-buildenv Wiki · GitHub (at github.com) | 06:45 |
shorne | ok, issue with with liteeth_init | 06:46 |
shorne | I have been through setup before | 06:46 |
shorne | I debugged, it is initting qemu_ram_set_idstr (new_block=0x555556334130, name=0x555556333fc0 "liteeth.buffers", dev=0x555556330300) | 06:46 |
shorne | its doing the same 1 2 times | 06:47 |
*** sc00bz1 has joined #timvideos | 06:50 | |
*** sc00bz has quit IRC | 06:52 | |
shorne | CarlFK: ok... the assert should be fixed | 06:53 |
shorne | I pushed a fix | 06:54 |
shorne | you want to try the build again? | 06:54 |
CarlFK | yep | 06:54 |
CarlFK | In file included from /home/juser/litex-buildenv/third_party/qemu-litex/hw/litex/hw.c:19:0: | 06:54 |
CarlFK | ../generated/csr.h:3:10: fatal error: hw/common.h: No such file or directory | 06:54 |
CarlFK | I see it got this: hw/net/liteeth.c | 3 ++- | 06:55 |
CarlFK | http://paste.ubuntu.com/p/JNtMqVrgCq/ | 06:56 |
tpb | Title: Ubuntu Pastebin (at paste.ubuntu.com) | 06:56 |
shorne | hmm, we should see that anymore | 07:00 |
shorne | ah... unless you need to update the include | 07:01 |
shorne | i.e. it should be #include "hw/common.h" in the csr.h | 07:01 |
shorne | CarlFK: it might have been regenerated | 07:01 |
CarlFK | ah, that's part of mithro's script? | 07:02 |
CarlFK | ./build/arty_net_or1k/software/include/generated/csr.h | 07:07 |
shorne | yeah | 07:08 |
CarlFK | I'll track that down | 07:08 |
shorne | somewhere in the python I think how did you fix it before? | 07:08 |
CarlFK | vim ... | 07:08 |
shorne | I see | 07:08 |
CarlFK | r += "#include <hw/common.h>\n" | 07:13 |
CarlFK | hmm, not sure how to force that run... | 07:14 |
CarlFK | oh swell, 30 min ago in #v4l (01:33:20 AM) hverkuil1: linuxtv.org can't be reached anymore, did something happen? | 07:16 |
CarlFK | and now to test the changes I made I cant run ./scripts/download-env.sh fatal: clone of 'https://git.linuxtv.org/edid-decode.git ... | 07:17 |
CarlFK | lets see if make clean cleans it enough... | 07:19 |
CarlFK | swell. Makefile:507: recipe for target 'subdir-capstone' failed | 07:20 |
shorne | :( | 07:24 |
shorne | maybe its time for bed? | 07:25 |
CarlFK | rm third_party/litex-qemu/ -rfrm third_party/litex-qemu/ -rf ... Makefile:941: recipe for target 'qemu-doc.txt' failed | 07:25 |
CarlFK | lol - yeah, 2am. bed time was about an hour ago | 07:25 |
shorne | I think you need to delete the build dir too | 07:25 |
shorne | which has the Makefile | 07:25 |
shorne | build/qemu or something | 07:26 |
CarlFK | build/arty_net_or1k/qemu/ | 07:26 |
CarlFK | Makefile:214: recipe for target 'accel/kvm/trace.c-timestamp' failed | 07:27 |
shorne | something is out of sync | 07:28 |
*** GingerGeek has joined #timvideos | 08:15 | |
*** GingerGeek has quit IRC | 08:18 | |
*** futarisIRCcloud has quit IRC | 09:14 | |
CarlFK | mithro: here's a PR cuz I don't know what repo it is from :p | 09:56 |
CarlFK | http://paste.ubuntu.com/p/9sthmPdrDf/ | 09:57 |
tpb | Title: Ubuntu Pastebin (at paste.ubuntu.com) | 09:57 |
CarlFK | mithro: because (11:23:25 PM) shorne: CarlFK: right, we dont need to move it just yet, but we need to change it to '#include "hw/common.h"' for qemu https://github.com/stffrdhrn/qemu/commit/9edc19c939914f4475ccf5f728c0617dc8f8076e | 09:58 |
tpb | Title: make: switch from -I to -iquote · stffrdhrn/qemu@9edc19c · GitHub (at github.com) | 09:58 |
*** ivodd has quit IRC | 10:05 | |
*** ivodd has joined #timvideos | 10:26 | |
*** ivodd has quit IRC | 10:57 | |
*** ivodd has joined #timvideos | 11:32 | |
*** felix_ has quit IRC | 12:11 | |
*** felix_ has joined #timvideos | 12:18 | |
*** rohitksingh_work has quit IRC | 12:30 | |
*** sc00bz1 is now known as sc00bz | 13:22 | |
*** waldo323 has joined #timvideos | 14:52 | |
CarlFK | mithro: I think I just deleted https://github.com/timvideos/litex-buildenv - but I also just made a fork... | 17:04 |
*** aps__ has joined #timvideos | 17:20 | |
*** aps__ is now known as aps-sids | 17:23 | |
*** aps-sids is now known as aps | 17:24 | |
*** aps has quit IRC | 17:27 | |
tinyfpga | mithro: anyone doing unit tests with migen/litex? | 17:30 |
tinyfpga | mithro: I think I need to rewrite my USB PHY in migen | 17:30 |
tinyfpga | mithro: and I want to unit test each little block | 17:30 |
tinyfpga | mithro: formal would also be slick | 17:31 |
*** Kripton has quit IRC | 17:35 | |
*** Kripton has joined #timvideos | 17:39 | |
cr1901_modern | tinyfpga: formal will happen soon enough... until then look at the migen unit tests and sim examples for ideas | 17:43 |
cr1901_modern | python3 -m unittest will automatically look for a test subdir | 17:43 |
tinyfpga | cr1901_modern: great, thanks!! | 17:43 |
*** aps has joined #timvideos | 17:47 | |
*** rohitksingh has joined #timvideos | 18:23 | |
*** rohitksingh has quit IRC | 18:36 | |
*** rohitksingh has joined #timvideos | 18:37 | |
*** rohitksingh has quit IRC | 18:51 | |
*** rohitksingh has joined #timvideos | 18:56 | |
*** rohitksingh has quit IRC | 19:06 | |
mithro | CarlFK: This is pretty bad... | 20:12 |
mithro | CarlFK: When you delete a repo, it makes you enter the name of the repo... | 20:12 |
mithro | CarlFK: I can get the code back, but things like issues, wiki, forks, etc are going to be problematic... | 20:14 |
mithro | CarlFK: I've contacted support but I'm not hopeful | 20:18 |
CarlFK[m] | Oh crap. Issues. | 20:19 |
mithro | CarlFK[m]: Yes, this is bad :-( | 20:20 |
CarlFK[m] | mithro: it asks for the name of the repo, but not the name of the account, that is where things went South | 20:21 |
mithro | CarlFK[m]: Nope, it asks for the full name - user/repo.... | 20:21 |
_florent_ | mithro: https://stackoverflow.com/questions/9247961/recover-a-deleted-repository-github-issues | 20:26 |
tpb | Title: recovery - Recover a deleted repository github issues - Stack Overflow (at stackoverflow.com) | 20:26 |
_florent_ | support should be able to get it back | 20:27 |
mithro | _florent_: emailed.... | 20:27 |
CarlFK[m] | After about 10 minutes the support replied and the original repository was recovered. | 20:29 |
CarlFK[m] | Me crosses fingers | 20:29 |
CarlFK[m] | I hit the contact us link and sent something too. | 20:30 |
mithro | It's back! | 21:14 |
CarlFK | yay!!! | 21:34 |
CarlFK | Whew. | 21:34 |
CarlFK | ok, back to that PR | 21:36 |
*** aps has quit IRC | 21:40 | |
cr1901_modern | Good thing there seems to be a grace period before true deletion | 21:41 |
mithro | _florent_: What is minerva? Seems to be another RISC-V CPU? | 21:47 |
mithro | Minerva enables highly accurate, ultra-low power DNN accelerators (in the range of tens of milliwatts), making it feasible to deploy DNNs in power-constrained ... ? | 21:48 |
_florent_ | mithro: yes another RISC-V CPU (still experimental), but this one has something particular if you look at the cpu file :) | 21:50 |
mithro | from minerva.core import Minerva as MinervaCPU ? | 21:51 |
cr1901_modern | it's written in litex? | 21:51 |
mithro | _florent_: Can't see where that comes from :-P | 21:52 |
_florent_ | cr1901_modern: migen yes | 21:52 |
mithro | _florent_: I can't seem to find anything about the core? | 21:53 |
_florent_ | the code is not released yet | 21:54 |
cr1901_modern | _florent_: Oh so this is _your_ riscv core :)? | 21:55 |
mithro | cr1901_modern: How goes the ice40? | 22:00 |
cr1901_modern | mithro: I ran into some consistency issues getting the design to route, so instead of doing what a rational person would do and just lower the clock speed, I tested some PLL configs and made a table of results | 22:01 |
cr1901_modern | I should have booting litex-buildenv firmware by tonight | 22:01 |
mithro | _florent_: At some point we should change litex so CPUs can just register themselves with litex so it doesn't need to change with every CPU configuration / variant / type | 22:08 |
CarlFK | mithro: should I try to change the name on this commit from Joe User to me? https://github.com/CarlFK/litex-buildenv/commits/master | 22:19 |
tpb | Title: Commits · CarlFK/litex-buildenv · GitHub (at github.com) | 22:19 |
mithro | Yes | 22:23 |
CarlFK | mithro: can you take care of this one: http://paste.ubuntu.com/p/9sthmPdrDf/ | 22:30 |
tpb | Title: Ubuntu Pastebin (at paste.ubuntu.com) | 22:30 |
cr1901_modern | tinyfpga: Would you expect the warning to come up given this command line invocation of tinyprog? http://ix.io/1m3Y | 22:32 |
tinyfpga | cr1901_modern: the new safety checks ensure that anything you program with -p stays within the user bitstream area, and anything you program with -u stays within the user data area | 22:34 |
tinyfpga | cr1901_modern: it’s needed because images that are too large can wrap around and overwrite the bootloader | 22:34 |
tinyfpga | cr1901_modern: and right now the metadata doesn’t advertise the total size of the SPI flash | 22:35 |
tinyfpga | cr1901_modern: if you are writing into the user data area, use -u along with the address | 22:35 |
cr1901_modern | tinyfpga: Okay fair enough, but there is an issue w/ how litex-buildenv and HDMI2USB interacts with this (cc: mithro) | 22:35 |
cr1901_modern | Normally, a litex-buildenv image consists of 2 or 3 parts: bitstream (BIOS embedded), bios, and payload | 22:36 |
cr1901_modern | they are typically concatenated into one file using a script called "mkimage.py" | 22:36 |
cr1901_modern | tinyfpga is the first FPGA we have that is smart enough to not require this, but I'll have to somehow "notify" the top level makefile that tinyfpga doesn't need this | 22:37 |
cr1901_modern | (specifically the BX series is smart enough :)...) | 22:37 |
*** CarlFK has quit IRC | 22:58 | |
mithro | cr1901_modern: why can't you just give it the image? | 23:00 |
cr1901_modern | mithro: >(6:29:03 PM) tinyfpga: cr1901_modern: the new safety checks ensure that anything you program with -p stays within the user bitstream area | 23:01 |
cr1901_modern | what happens if the bitstream + bios + payload exceeds the user bitstream area? | 23:02 |
mithro | cr1901_modern: But isn't the "user bistream area" everything after the boot bitstream? | 23:02 |
cr1901_modern | No, it's up to address 0x50000 | 23:02 |
cr1901_modern | then the "user data area" follows, which _is_ the rest of the spi flash | 23:03 |
tinyfpga | mithro: there are two user areas, user bitstream and user data | 23:03 |
mithro | tinyfpga: Out of interest, can the ice40 multiboot more than 2 images? | 23:04 |
tinyfpga | mithro: up to 4 images | 23:04 |
mithro | tinyfpga: So there are 3 user images and then user data? | 23:04 |
tinyfpga | mithro: no, the BX is configured for 1 user image and one user data area | 23:05 |
cr1901_modern | mithro: the first bitstream on tinyfpga is the bootloader. You don't want to touch that. | 23:05 |
cr1901_modern | the second bitstream is your application | 23:05 |
mithro | tinyfpga: My first boot image can't boot another boot image? | 23:05 |
tinyfpga | mithro: that would require changes to the bootloader area | 23:06 |
cr1901_modern | after the second bitstream, you can put "whatever data you want", but the tinyfpga bootloader doesn't know how to boot more than two images (itself and ONE user image) | 23:06 |
tinyfpga | mithro: you can do it, but you have to rebuild your own multiboot image including the bootloader | 23:06 |
cr1901_modern | tinyfpga: Oh, the bootloader uses both pins of the SB_WARMBOOT primitive? | 23:07 |
tinyfpga | cr1901_modern: no, the bootloader only knows how to | 23:07 |
tinyfpga | ...boot the user image | 23:07 |
tinyfpga | cr1901_modern: but if you build your own multiboot image and include the bootloader and your own images, then the first user image could then load a second and/or third user image | 23:08 |
tinyfpga | cr1901_modern, mithro: this involves overwriting the bootloader...I don’t recommend it for anyone that is not willing/able to reprogram the SPI flash directly | 23:09 |
cr1901_modern | right... if you don't have the proper header, the FPGA will look for the image at a garbage address and go into the weeds IIRC | 23:10 |
tinyfpga | cr1901_modern, mithro: I don’t believe it is safe to assume you have free space after the user image, some of the multi-image tools for FPGAs may place other things like a golden boot image after the user image | 23:10 |
tinyfpga | cr1901_modern, mithro: the usb bootloader wolves this by advertising where you can put the user image and where you can put all other user data | 23:11 |
cr1901_modern | what is a golden boot image? | 23:11 |
mithro | tinyfpga: We need to know the SPI address of the user data | 23:12 |
tinyfpga | cr1901_modern: it’s a feature ECP5 has. It will load the golden image of the default image fails CRC checks | 23:12 |
cr1901_modern | mithro: You can _get_ the SPI address of the user data | 23:12 |
cr1901_modern | tinyprog will return that info for you in json format | 23:12 |
tinyfpga | mithro: you can use the -m option and tinyprog will output the JSON metadata from the FPGA board | 23:12 |
cr1901_modern | of course, calling out to tinyprog is kinda ugly | 23:13 |
cr1901_modern | But for BX the user data is at 0x50000 | 23:13 |
mithro | tinyfpga: We build images on CI without any FPGA plugged in... | 23:13 |
mithro | tinyfpga: It is likely in the near future we will want to create our own multiboot gateware | 23:13 |
* cr1901_modern leaves you two to battle this out :D | 23:13 | |
tinyfpga | mithro: for any given FPGA board the address should stay the same | 23:13 |
cr1901_modern | I'm actually not all that useful for feedback at this point. My recommendation is to relax the requirement that the gateware + bios + payload need to be concatenated together | 23:14 |
mithro | cr1901_modern: Well, the bios + payload need to be concatenated together? | 23:15 |
*** futarisIRCcloud has joined #timvideos | 23:15 | |
cr1901_modern | mithro: Nothing stops be from assigning a flash_boot_address different from "just after the bios" | 23:16 |
cr1901_modern | we can arbitrarily declare "for tinyfpga, the payload goes at 0x60000" | 23:16 |
cr1901_modern | that gives plenty of room for the BIOS | 23:16 |
cr1901_modern | and we use tinyprog to program "two sections of user data": One at 0x50000 for the BIOS, one at 0x60000 for the payload | 23:17 |
mithro | tinyfpga: FYI - It's a *huge* pain to provide users with two files :-) | 23:17 |
mithro | tinyfpga: Because they update one and then forget to update the second one | 23:17 |
cr1901_modern | mithro: Errr, that problem is going to exist once the XMODEM stuff gets loaded anyway | 23:18 |
cr1901_modern | gets merged* | 23:18 |
mithro | tinyfpga: Maybe we could just have an "image file format" ? | 23:18 |
cr1901_modern | mithro: Could you possibly give tinyfpga a walkthrough of "how are images flashed in litex-buildenv" at present? B/c I forget :P. Normally bios is part of bitstream, so you concat bitstream + payload. mimasv2 is special. | 23:20 |
cr1901_modern | And Idk how the build system knows that mimasv2 is special | 23:20 |
mithro | cr1901_modern: https://github.com/timvideos/litex-buildenv/wiki/Images | 23:21 |
tpb | Title: Images · timvideos/litex-buildenv Wiki · GitHub (at github.com) | 23:21 |
cr1901_modern | >We still leave the space for the BIOS in the image, even though it isn't used. | 23:22 |
cr1901_modern | Oh right, I forgot about this | 23:22 |
mithro | Something I prepared earlier :-P | 23:22 |
cr1901_modern | >FIXME: The firmware image header makes execute in place harder? | 23:23 |
cr1901_modern | Yes, this. I have managed to crash tinyfpga b/c I didn't begin executing on a cache line boundary on the reset vector. I haven't tried yet, but I'm concerned the header will also duplicate this crash. | 23:23 |
tinyfpga | mithro: I can change the safety check, or add a --force option | 23:24 |
mithro | tinyfpga: Maybe just add an "--image" option? | 23:25 |
tinyfpga | mithro: I think it’s better if I just change the check...I can make it allow both the user bitstream and user data areas to be ok to program whether you are using the -p or -u options | 23:26 |
mithro | tinyfpga: Well, I think from a "know WTF the user is doing" have -p, -u and -i options would be better -- "-i" signals the intent that I want to flash both bitstream and userdata together | 23:27 |
mithro | tinyfpga: While the other options signify that "this should be a bitstream only" or "this should be user data only" | 23:27 |
cr1901_modern | I like this compromise | 23:27 |
mithro | tinyfpga: Then you can provide helpful error messages like "this bitstream doesn't look like a bitstream, did you mean -u" or "this user data kind of looks like a bitstream, did you mean -p" | 23:28 |
cr1901_modern | "-i" option disables the checks except for the bootloader region | 23:28 |
cr1901_modern | And also provide a helpful "Do not use this option unless you know what you're doing" blurb :P | 23:29 |
cr1901_modern | b/c we- well, some of us- know what we're doing | 23:29 |
mithro | tinyfpga: The more helpful the error messages, the less you'll get support requests :-P | 23:30 |
tinyfpga | mithro: ok, I like that option | 23:31 |
mithro | tinyfpga: FYI - https://github.com/timvideos/HDMI2USB-mode-switch/blob/master/hdmi2usb/modeswitch/files.py | 23:32 |
tpb | Title: HDMI2USB-mode-switch/files.py at master · timvideos/HDMI2USB-mode-switch · GitHub (at github.com) | 23:32 |
mithro | tinyfpga: I wrote that after | 23:32 |
mithro | (a) flashing a HTML file to my FPGA multiple times and wondering why it didn't work | 23:32 |
mithro | (b) Always flashing / loading the wrong one of the .bit and .bin files | 23:33 |
mithro | Now my tool says "You silly human, your doing the wrong thing again" :-P | 23:33 |
tinyfpga | mithro: nice | 23:36 |
mithro | tinyfpga: I recommend doing something like that for the -b option | 23:41 |
cr1901_modern | ? The -b option just boots the FPGA | 23:41 |
mithro | tinyfpga: As the "I download this image and got redirected to a HTML page which I then flashed to my device" is an *actual thing* I have done as an experienced user :-P | 23:42 |
mithro | cr1901_modern: Opps -p | 23:42 |
cr1901_modern | https://twitter.com/cr1901/status/1037485123028111360 | 23:43 |
tinyfpga | mithro: yeah, I think there’s an easy way to check the iCE40 bitstream | 23:50 |
cr1901_modern | And the best part is, tinyprog is open source, so if you want to disable all the pesky safety checks, you are free to modify and install your own version :) | 23:51 |
Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!