IRC logs for #openrisc Thursday, 2013-10-03

--- Log opened Thu Oct 03 00:00:23 2013
stekernjuliusb: https://github.com/openrisc/or1k-src/commit/91b66cfebad3af4240248ac0f250b8caf4b8eb8a02:58
stekernoh, and just to make sure we still have a known "good" or1k-src, I tagged the commit before the upstream merge: https://github.com/openrisc/or1k-src/tree/or1k-pre-upstream-merge-2013093004:49
olofkMorning05:52
stekernmorning05:52
PowermaniacGood Afternoon xD05:52
stekernah, right, there down under you live in the future!05:53
PowermaniacHaha yeah...05:53
PowermaniacFunny when people talk about the end of the world being on a specific date but don't say what time/timezone05:54
PowermaniacIt's like nope we are still here05:54
stekern_franck_: http://pastie.org/837393406:03
stekern?06:03
stekernolofk: that's a major missing feature, ignore parsing (or at least don't except out on) other boards than the one you are currently building06:04
stekernotoh, you find bugs faster this way ;)06:04
stekerna WARNING might have the same effect though06:05
stekernjuliusb: I get that weird tick timer behaviour now as well...07:03
_franck_stekern: yeah I know, it works with python 3.307:03
_franck_you need to remove leading spaces07:03
stekern*I* need to remove? =)07:04
_franck_:)07:04
_franck_I'll push something today ;)07:05
stekernjuliusb: I mean, the SR has some weird value so the tick timer interrupt isn't being enabled07:05
stekernbut I can write sr to 1 and then restart the program to cure that07:05
stekernso it's no real showstopper I guess, but will take a closer look at that at some point07:06
olofkstekern: Yes, I remember you mentioned that bug earlier. I know what to fix, but haven't had time to do it07:09
olofkIt's an unhandled exception configparser.readfp07:10
olofkso line 30 in orpsocconfigparser should be something like try; self.readfp(f); except <WhateverTheErrorIs>; raise SyntaxError("Malformed statement in " + config_file)07:15
stekernbut wouldn't that make it bail out with a SyntaxError then?07:24
stekernjuliusb: here's a microwaveable linux image for de0_nano orpsocv3 edition07:50
stekernhttp://oompa.chokladfabriken.org/openrisc/vmlinux-de0_nano07:50
stekernit's minimal, but it's got some heartbeat led blinking going on07:54
stekernand you should be able to control the leds through /sys/class/leds/ledX/brightness07:54
stekernand coremark is included07:55
olofkstekern: That is taken care of already. If orpsocconfigparser returns SyntaxError, the core is ignored07:56
stekernah, I see07:56
olofk...I think :)07:57
_franck_pull request ready07:57
juliusbstekern: excellent, thanks so much08:13
juliusbi came across that syntax error last night in ORPSoCv3 too in the de1 board, I tried to have a hack to make it completely ignore any board port it couldn't parse properly but couldn't quite make it work properly08:14
juliusbso, I caught the configparser.pareseerror or whatever it is, raised a Syntax error and it didn't fall over there but there were other bits of the scripts which fell over, still08:16
stekernjuliusb: so, you reckon the debug reset should be included in the mor1kx reset?08:30
juliusbmmm, maybe08:30
juliusbit works for me08:30
juliusbbasically you should reset everything except the debug core with it (although not the PLL, I don't think I'm doing that with it)08:30
stekernI'm still using an old openocd for the de0_nano (I have different config in the new one I have) and that one doesn't support the reset command08:33
stekernI should fix so I can use the new one with both... but right now it didn't feel like the moment08:34
juliusbhehe fair enough08:34
stekernbut it didn't seem to break anything to add that reset (it shouldn't since it doesn't get asserted I presume) in my setup08:34
stekernI agree that it should reset the whole system, because just resetting the cpu might leave the rest in a funny state08:36
stekernespecially if its reset in the middle of a wishbone transaction08:36
stekernwhich is pretty likely to happen08:37
juliusbhmm, downloading the kernel and then htiting resume doesn't run it, I have to hit reset08:37
juliusb... but I can do that :)08:38
stekernthat doesn't sound surprising, loading the kernel with gdb have always been troublesome I think08:38
juliusbhaa08:38
juliusbwell, baremetal stuff works08:38
juliusbwhy not this big guy? anyway, it's going to work for the workshop :)08:38
juliusbgot it booting fine now08:38
juliusbthanks so much stekern 08:39
stekernI'm not sure, but it's probably that the cpu is in some state that it doesn't like08:39
juliusblinux seems a lot more responsive now08:39
_franck_juliusb: another thing with openocd, you can read/write registers with "reg" command08:39
juliusbis it the hw tlb stuff?08:39
juliusb_franck_: cool, I have been doing that to set the npc with "reg npc 0x100" before trying "resume"08:39
_franck_ok08:40
stekernso, this is the sequence I usually do, and it's pretty foolproof: reset board (by push button or reloading the fpga image), set sr to 1, load image, set npc to 0x100, go!08:41
stekernactually, to make it even more foolproof, you should write 0 to 0x100 and 0x104 before resetting the board too08:42
stekernto make sure it not start anything funny until you've connected the debugger08:43
stekernjuliusb: no, the hw-tlb reload isn't enabled08:43
jeremybennettI see we have a sudden flurry of sign-ups for ORCONF - now 30 people attending!08:43
stekernbut what are you comparing to?08:44
juliusbstekern: that usually works well?08:44
juliusbstekern: im comparing to Linuxes of the past08:45
juliusbit could be the mor1kx is just a better processor than or1200 ever was now :)08:45
juliusbjeremybennett: that's great news!08:45
juliusbA new guy at work who's posted some work online on OpenCores is coming along08:45
juliusbjeremybennett: I'm wondering if we need a mail shot to those attending to ask them to do the workshop preparation08:46
stekernjuliusb: yes, it works well, but it's not enabled in the de0 nano config by default.08:46
juliusbah right08:47
juliusbdoes the kernel automatically detect it and use it if it's there?08:47
stekernand yes, of course it's a lot better processor than or1200 ever was ;)08:47
juliusbbecause it'd be a simple case of updating the de0 nano port in my tree (which we'll use for the workshop)08:47
stekernIn my patches to make it work you have to enable a config option to turn it on in the kernel too08:48
jeremybennettjuliusb: Good reminder I'll get Andrew to do that today. Could you make sure he has a copy of the latest details.08:49
juliusbthey're available on the workshop page: http://opencores.org/or1k/ORCONF2013_Workshop_ORPSoC_On_DE0_Nano#Tool_installation08:50
stekernit would be possible to autodetect it, but for now I wanted the possibility to manually control if it's used or not (regardless whether the hw supports it or not)08:50
juliusbok, cool08:51
stekernbut, for anything included in the de0 nano image, you wouldn't notice any difference with it anyways, the memory usage is just too low08:51
juliusbfair enugh08:51
jeremybennettjuliusb: Are you available for a call just to check we have everything ready for the weekend. Sometime this afternoon or early evening.08:52
stekernjuliusb: can you test if the led controlling works? or did you leave the board already?08:52
stekernI have never actually tested that08:52
stekernvia the /sys/class/ interface I mean08:53
juliusbstekern: no, still here, really should go though (been getting to work very late this week!)08:53
juliusbis it easy?08:53
stekernas easy as: echo 255 > /sys/class/leds/led7/brightness08:54
juliusbthat turned 1 on08:54
stekern\o/08:54
juliusbLED708:55
stekernwhat happens if you alter the value?08:55
juliusbnothing...08:55
juliusbno PWM08:55
juliusbI like the heartbeat btw08:55
stekernok, but on/off is good enough still08:56
juliusbyep :)08:56
juliusbok got to run, more hacking to come tonight!08:57
stekerncya09:02
hansfbaierstekern: http://pastebin.com/ejzcdVQY09:03
hansfbaieruses gui.09:03
hansfbaierstekern: what would be the build workflow: orpsoc build -> error, run qsys -> orpsoc build again?09:05
stekerncurrently yes, but I want to make orpsoc run qsys when there is no qsys/ directory under build/.../src/09:11
stekernand then a 'generate' command of some sort to force regenerate it (you could of course do that by simply deleting the qsys/ dir)09:12
stekernso, did you change dash->bash now?09:13
hansfbaierstekern: I fixed it in the one script, but I can try change the system09:16
stekernI would, iirc it just causes more pain than gain to keep dash09:16
stekerns/iirc/imo09:17
stekernI think xilinx scripts barf too when you use dash09:17
stekernfor example09:17
hansfbaierstekern: OK, going to reboot09:17
hansfbaierstekern: i switched default shall to bash with dpkg-reconfigure, and rebooted, still same error. weird:09:35
hansfbaier$ sudo debconf-show dash09:35
hansfbaier* dash/sh: false09:35
hansfbaierNow i removed the build/ dir altogether, try starting from scratch09:36
stekerncheck 'ls -al /bin/sh' too, just to be sure09:37
stekernbut what you did check should be enough09:37
hansfbaierlrwxrwxrwx 1 root root 4 Okt  3 16:17 /bin/sh -> bash09:37
hansfbaiergrrr09:37
hansfbaierlet's wait how the current qsys build turns out09:38
hansfbaiertakes forever09:38
stekernyes, that's why I want it to *only* be done when there's no qsys/ dir09:38
stekernor as a forced regeneration09:39
juliusbstekern: did you look at my attempt to get the adv debug sys's reset signal to reset the entire system?10:01
stekernjuliusb: ah, sorry, I just noticed that you had pushed changes to your repo10:12
stekernjuliusb: that looks right, but I think it'd be nicer to have the "logic" in clkgen10:16
olofkhansfbaier: Are you using the --force swich with orpsoc build?10:17
stekerni.e. a debug_rst input that get connected to wb_rst and a debug_if_rst output to reset the debug_if10:17
stekernhttps://github.com/juliusbaxter/orpsoc-cores/commit/73c16ace37c888c58c0878f93d853a2e4f764a83#diff-7198d4c7fee4af0516d0fc0b35b4c01dR549 <- I like when the coment says one thing and the code another ;)10:19
hansfbaierolofk: No. didn't know10:21
olofkhansfbaier: It's a pretty crappy feature right now, but build/<system_name> isn't cleaned out unless you run with --force10:22
olofkThe idea is that eventually orpsoc will detect if the build directory needs to be cleaned out, but I haven't gotten around to implement that yet10:23
stekernolofk: but that isn't relevant right now, since he has problems before he runs orpsoc build10:23
olofkNot sure if it helps you with your problem, but it might be good to know10:23
hansfbaierolofk: I did rm -rf build before rerunning10:23
olofkThat's basically the same thing10:23
hansfbaierstekern: still same error here10:23
stekernhansfbaier: have you tried google? (since this is a quartus failure, chances are that you are not alone experiencing it)10:31
stekernhttp://macnicatech.com/quartus-make-requirement/10:32
stekernI assume you have 'make' installed, but there is a comment in the end that might be relevant10:33
hansfbaierstekern: would be difficult to build a linux kernel without make, wouldn't it? ;)10:37
stekern=)10:38
hansfbaierstekern: How would you build orpsoc without make?10:38
hansfbaierstekern: But you are right, I am too lazy10:39
stekernas I said, don't pay attention to the make thing, that's unrelated. the comment in the end might not be10:40
hansfbaierstekern: ah,10:41
hansfbaierI sure am still tired.... Should get more sleep 'ts been 1:30 pm tonight X-]10:41
hansfbaierstekern: It was a path issue obviously. Now I ran Qsys from inside quartus, and then it worked11:21
hansfbaierstekern: the unset DISPLAY did not work11:21
stekernah, ok11:22
stekernwait a sec...11:22
stekernI've got this in my PATH: $ALTERA_PATH/quartus/sopc_builder/bin11:23
hansfbaierstekern: I did too, but that wasn't enough11:23
stekernodd... I don't have anything else11:24
hansfbaierstekern: weird11:24
stekerndo you have ALTERA_PATH exported too?11:24
hansfbaierstekern: it's in my openrisk_env.sh11:25
hansfbaierthat means yes11:25
stekernah, well perhaps we'll find out what's the missing link later, you've got the qsys system generated now at least11:26
hansfbaierorpsoc build is fitting now. Looks good.11:26
_franck_stekern: running the testsuit on the sync toolchain, I get a lot of these http://pastie.org/837451911:39
_franck_stekern: do you think it's because I didn't compile/install the toolchain correctly ?11:39
hansfbaierstekern: I looks like it's not going to work on a 32bit-machine :(11:40
hansfbaierOut of memory in module quartus_fit (2136 megabytes used)11:41
hansfbaierI have 8G RAM but looks like address space is the problem11:41
hansfbaierhttp://www.altera.com/support/kdb/solutions/rd11102009_495.html11:42
hansfbaierfirst time in my life I can't do something without 64bit11:43
hansfbaiergrrrrrrr11:43
hansfbaierdon't feel like reinstalling everything :(11:43
LoneTechyou should not need to. quartus installs with a 64bit version iirc, so you only need some libraries and a 64 bit capable kernel11:43
LoneTechunless you are running on a 32-bit PAE machine.. that would require a cpu replacement11:44
hansfbaierLoneTech: My whole system is 32bit11:45
hansfbaierLoneTech: everything11:45
hansfbaierLoneTech: I installed quartus/32bit11:46
LoneTechreally? no quartus/linux64 directory?11:47
hansfbaierLoneTech: Oh there it is, you're right11:47
hansfbaierBut the whole Linux system is 32-bit11:48
hansfbaierso how would I run it?11:48
hansfbaiercompile a 64bit kernel by hand since the distro (ubuntu precise) does not provide one?11:48
LoneTechI'd be surprised if you don't have a 64bit kernel available11:49
LoneTechstart by running uname -a; if it says x86_64 your kernel is already 64bit11:49
hansfbaierLoneTech: No, i68611:49
hansfbaierLoneTech: I did by default. Since the distro is smaller, saves disk and ram11:50
LoneTechok, apt-cache search linux-image could show you available kernels; you can likely install linux-image-amd6411:50
* LoneTech uses debian, not too familiar with ubuntu11:50
LoneTechideally you could use multiarch to add 64bit libraries11:51
LoneTechbut if not, quartus looks for its libraries in the linux64 directory so you could copy them manually there. it's a rather painful process but possible11:52
hansfbaierLoneTech: but i will need a 64 bit kernel11:53
LoneTechyes. was there not one available to install?11:54
hansfbaierLoneTech: No11:54
hansfbaierLoneTech: wait a minute11:55
hansfbaierLoneTech: no11:57
LoneTechperhaps you'd need to enable multiarch first and simply install a 64-bit version of a kernel package11:57
hansfbaierLoneTech: Did not hear about multiarch before. Thanks. Will look11:58
LoneTechmultiarch is debian's infrastructure to allow mixing of precisely this sort. most programs don't gain much from running 64bit11:59
hansfbaierLoneTech: As I understand it multiarch still needs a 64 bit system/kernel. You can't run 64 on 3212:02
hansfbaierhttps://help.ubuntu.com/community/MultiArch12:02
hansfbaierThis is not very helpful12:02
LoneTechyes, you need a 64bit kernel. however, enabling multiarch allows you to install one12:02
hansfbaierLoneTech: How do you do that in debian?12:02
hansfbaierLoneTech: ah got it12:03
stekern_franck_: is that the gdb testsuite?12:03
stekernI think all those are defined in unistd.h12:06
stekernbut all your errors are in generic code, nothing in or1k specific code12:07
stekernor is it just that it can't find our definitions of them?12:07
hansfbaierstekern: what distro do you use? ubuntu precise 64bit?12:08
stekernhow do you run the gdb testsuite?12:08
_franck_ export DEJAGNU=/home/franck/openrisc/or1k-src-new/site.exp12:09
_franck_make check RUNTESTFLAGS="--target_board=or1k-elf-sim"12:09
stekernhansfbaier: http://pastie.org/837460712:09
stekern64-bit, yes12:10
_franck_stekern: I think it can't find our definition of read, write,...12:10
_franck_stekern: your start the testsuite in ..../bld-or1k-src-new/gdb12:11
_franck_you have to compile gdb whith --enable-sim and not --disable-or1ksim12:12
stekern_franck_: care to share that site.exp?12:13
_franck_it's in the repo already12:13
_franck_you'll need this: http://pastie.org/837461612:14
hansfbaierLoneTech: multiarch only works if the system is 64 bit12:16
hansfbaierLoneTech: I can install a 64-Bit VirtualBox VM on the 32 Bit-Sys since my CPU has hardware VIRT12:18
stekernI think you still have to have a 64-bit kernel for that to work?12:18
LoneTechI think you're just seeing bad guides to it. multiarch itself has no such limit12:19
LoneTechdpkg --add-architecture amd6412:20
LoneTechoh, ubuntu is different. still should be possible. https://wiki.debian.org/Multiarch/HOWTO12:21
LoneTecha foreign-architecture line in /etc/dpkg/dpkg.cfg.d/architectures should do it12:21
_franck_stekern: http://pastie.org/837463212:22
stekern_franck_: feel free to commit that obvious fix pastied above12:22
stekern_franck_: what does that test_read.c look like?12:23
_franck_http://pastie.org/837464412:24
stekern_franck_: compiles fine here12:27
stekern...and *links* fine too ;)12:27
_franck_ok, that's what I thought, I'll reinstall the toolchain12:27
hansfbaierLoneTech: # dpkg --add-architecture amd6412:42
hansfbaierdpkg: error: unknown option --add-architecture12:42
LoneTechyes, the howto I linked noted that ubuntu lacks that option but can be configured with a file12:54
jeremybennettjuliusb: You there?13:31
_franck_stekern: compiled and installed again, same thing....13:53
_franck_could you run the gdb testsuite ?13:53
_franck_(some day, no hurry)13:54
stekern_franck_: I get this kind of errors when I don't have --disable-or1ksim14:06
stekernundefined reference to `or1ksim_read_mem'14:06
stekernI assume I nead some or1ksim libs14:06
stekern*need14:06
stekerncan you run 'or1k-elf-gcc -v test.c -o test' on your test program and give me the output?14:08
_franck_http://pastie.org/837489014:13
_franck_do you still have --enable-sim ? I don't have this error...14:13
_franck_ah yes, you need or1ksim in the default location14:14
stekern"default location" is?14:14
_franck_/opt/or1ksim14:15
_franck_you can also specify the path14:15
_franck_--with-or1ksim=PATH14:15
stekernok14:16
_franck_specify the or1ksim installation directory14:16
stekernwhy are you calling or1k-elf-gcc with the full path?14:17
_franck_because I have both installed and my default PTAH is /opt/or1k-toolchain/bin14:18
_franck_I want to be sure to use the good one14:18
stekerndo the new path override the old path still?14:19
_franck_?14:20
stekernI mean, is your PATH=/newtoolchain/bin:/oldtoolchain/bin14:22
_franck_I exported only /opt/or1k-toolchain_new/bin only and run or1k-elf-gcc -v -o test test_read.c14:22
_franck_same thing14:22
stekernok14:23
stekernwhat do you get if you do: or1k-elf-objdump -d  'libc.a' | grep '<close>:'14:25
stekernor '<read>:' for that matter14:26
_franck_no close nor read14:28
stekernodd14:28
_franck_I have fopen, fclose14:28
_franck_I miss a lot of files in libc.a, I'll do a diff14:34
_franck_http://pastie.org/837493614:35
olofkLooks like everything that starts with "sys" is missing14:37
_franck_all syscalls14:45
_franck_in my build dir, or1k-elf/newlib/libc/syscalls/ is empty .....14:46
stekernweird...15:15
stekernI'll try rebuilding here too to make sure...15:16
_franck_http://pastie.org/837508115:28
_franck_can't fix and test, I need to go15:28
poke53282My mailbox is filled with 10 mails regarding two patches in QEMU. Crazy process.17:53
stekern_franck_: bah, that was the missmerge I fixed the last... obviously I screwed that up18:07
stekernhttp://pastie.org/837553918:21
stekernthat should fix it18:21
stekernI'm rebuilding now and testing (and remembering to delete the install dir before starting this time...)18:21
stekernThanks for tracking it down so quickly, should we call it even since you broke my orpsoc this morning? =)18:23
_franck_we're all settled up now :)18:57
stekern_franck_: great! ;)19:50
stekernrebuilt and tested now, at least everything seems fine here(tm)19:51
stekernI'll push that fix then19:51
_franck_where can I find the upstream repo we are synchronizing to ?19:52
_franck_I wanted to take a look at configure.host but couldn't find it in newlib official19:53
stekernhttps://sourceware.org/cgi-bin/cvsweb.cgi/src/?cvsroot=src#dirlist19:54
_franck_is there a gnu/src with all inside ?19:54
_franck_ok thanks19:54
stekernI also pushed the "clean" cvs update branch19:59
stekernhttps://github.com/openrisc/or1k-src/tree/upstream-cvs20:00
stekernso that is the cvs tree at the snapshot moment20:00
stekernI just finished off my slides for the mor1kx cappuccino presentation too!20:02
juliusbstekern: nice. I haven't done anything yet :(22:28
--- Log closed Fri Oct 04 00:00:24 2013

Generated by irclog2html.py 2.15.2 by Marius Gedminas - find it at mg.pov.lt!