IRC logs for #openrisc Wednesday, 2015-01-07

--- Day changed Wed Jan 07 2015
poke53282with USB, you don't care about stop bits, baud rates, echoes,  and 7- or 8-bit bytes00:00
ysangkokbut USB would be harder to emulate, or?00:02
poke53282by the way, the tty is not limited by the baud-rate. So it should run very fast.00:02
poke53282Yes, Probably, but because of other reasons.00:02
poke53282USB is more complicated, but on a higher hardware abstraction layer.00:03
ysangkokhmm i just realized the kernel doesn't support overlayfs... but it does support modules... but there is no insmod :P what would you recommend? building insmod or building a new kernel?00:03
poke53282overlayfs is in the kernel since 3.19. So very very new.00:04
poke53282And of course I compiled only the stuff I need.00:04
poke53282insmod is there00:05
poke53282just login as root00:05
poke53282exit00:05
poke53282or "su -c /sbin/insmod"00:07
poke53282but building a new kernel make much more sense.00:08
ysangkokhmm ok00:09
poke53282you have to add overlayfs yourself.00:13
poke53282Depend how experienced you are.00:13
poke53282Here is everything you need: http://www.jor1k.com/or1k-toolchain.tar.bz200:15
poke53282try to follow the readme. I am curious if it works.00:17
olofkFor heaven's sake, what have I told you about talking in the channel when I'm not here?00:23
poke53282sorry olofl00:24
poke53282sorry olofk00:24
olofkI was planning to go to bed, and instead I end up reading backlogs about inhumane treatment of browsers00:24
ysangkokhehe :P00:25
olofkysangkok: I saw you talking about Palidus. I've been interested in bootstrapping gentoo for some time. Got any experience with that?00:26
olofk_franck_: I pushed a patch to fusesoc now that should fix the log problem. Please try it and see if it helps00:26
ysangkokolofk: unfortunatly no :(00:26
ysangkoki read yesterday that you can only get stage3 images for gentoo nowadays00:27
_franck_olofk: thanks, I'll try it00:27
olofkRegarding gentoo, I guess the first thing to do is to cross-compile all the required base packages to create a self-sustained stage 3, but I haven't spent any time figuring out the details00:27
olofkysangkok: Yeah, I think they only offered stage 3 for a few years now actually00:28
poke53282olofk: Browsers will be the future operating systems. So we should treat them hard to fix all errors.00:28
olofkpoke53282: Time to do a browser in verilog then :)00:30
ysangkokpoke53282: should i really build the smp branch of linux? this is what the Makefile says00:31
poke53282I use the smp branch, but don't use smp in the config file.00:32
poke53282So, yes00:32
ysangkokok00:32
olofkOh well. Time to sleep now. First full-time work day tomorrow since april. Goodbye parental leave :(00:34
poke53282cruel world00:39
ysangkokpoke53282: there's the issue that the referenced linux repository is only 3.15 and not 3.18, i'll need to find a backport00:59
poke53282but should be 3.1800:59
poke53282maybe you should do a "git checkout smp" in this directory01:01
poke53282arghh, crap. Yes the repository is wrong01:02
poke53282in toolchain.make change the fourth line to01:03
poke53282cd src; git clone git://git.openrisc.net/cgit.cgi/stefan/linux01:04
poke53282cd src; git clone git://git.openrisc.net/stefan/linux01:05
poke53282the last line is correct01:05
poke53282and remove the fifth line01:07
poke53282with "cd src; mv or1k-linux linux"01:08
ysangkokok01:09
poke53282time to sleep01:13
-!- Netsplit over, joins: ysionneau01:21
-!- Netsplit *.net <-> *.split quits: zama, rah, blueCmd, rhythmx, atgreen, pecastro, dalias01:21
-!- Netsplit over, joins: rhythmx01:21
-!- Netsplit over, joins: atgreen01:21
-!- Netsplit over, joins: pecastro, blueCmd, dalias, zama01:23
ysangkokgood night01:37
ysangkokpoke53282: using stekern's repo, the patches that your makefile applies no longer cleanly apply... i'll try the target baselinux instead02:39
ysangkokpoke53282: baselinux didn't work, i applied the patches that worked, and ignored the others04:25
ysangkokpoke53282: the system doesn't book now though, "[xattrwalk]: fid=8 newfid=10 name=security.capability", "Error at http://localhost/jor1k/jor1k-worker-min.js:8353: TypeError: this.fids[newfid] is undefined". that corresponds to js/worker/dev/virtio/9p.js +53504:26
ysangkokpoke53282: here's the kernel i built: https://hushfile.it/54ac99bcaad5b#RNFVONQSDqoaXsFZns9EV_Rv0PwRDfpmaMjezzxH04:28
poke53282ysangkok: Sorry.10:05
poke53282Such things are fixed10:07
poke53282But I didn't update the toolchain file10:07
poke53282download the new one under http://www.jor1k.com/or1k-toolchain.tar.bz210:07
poke53282the problem using github archives is, that I am always outdated. Of course I should use checkout to have the same revision.10:13
tarunhi10:33
tarunor32-linux-gcc -mhard-div -O2 -c -o support.o support.c In file included from support.c:8:0: support.h:45:20: error: macro "putc" requires 2 arguments, but only 1 given support.h:45:6: error: ‘putc’ redeclared as different kind of symbol make[2]: *** [support.o] Error 110:33
taruni am getting this error10:34
taruncan anyone help me...10:34
olofktarun: Any particular reason why you are using the or32 toolchain instead of the or1k toolchain?10:34
taruni am using virtual machine available on opecore wbsite10:35
olofkAh ok. I haven't really used that one, and it's pretty old by now10:36
olofkBut what does your code look like? It seems like you are redeclaring putc10:37
tarunhow to update my toolchain then10:37
taruni am implementing e...mbescom application note 610:38
tarunsorry embescom10:38
tarunhas anyone done that10:38
olofkNot me unfortunately10:40
olofkI would like to point you to some fresh documentation, but I realize once again that the documentation is a mess10:41
_franck__olofk: what about this: https://github.com/fjullien/fusesoc/commit/6cdcebce720442f6397c7f15a57ccbce47ce59ca ?10:44
olofk_franck__: Sorry. Haven't had time to look at that10:44
_franck__sorry too, I didn't see it was still opened10:44
olofkBut it looks fine10:45
_franck__and you can also s/usefull/useful if you decide to apply it ;)10:46
poke53282olofk: We should think about a script to generate such a virtual machine file. If we can update it with one shell command.10:51
olofkpoke53282: Yeah, that would be a great thing to have. Just base it on ubuntu or something and add a few toolchains10:53
poke532821. Bootstrap Debian 2. generate all openrisc  files 3. generate vm image.10:53
maxpalnolofk: I noticed I only half implemented one of the changes to the transactor - let me make a few quick updates before you do anything with my latest code.10:55
olofkmaxpaln: Cool. I'm back at work now, so you can expect quicker responses now :)10:56
tarunokk10:56
tarunhelp me fix putc error10:57
olofkmaxpaln: Regarding your question about the config registers; when we are testing things like memory controllers, we want to send data, receive it and compare to what was sent, but other test benches don't work like that10:59
stekerntarun: at what point are you getting that error?11:00
olofkSo I want the wb_bfm_master to implement functions for writing and reading wishbone registers, and handle all comparing in wb_bfm_transactor instead11:00
maxpalnok, would my suggested solution work: having a write() and read() function that allows reading and writing to single addresses?11:01
maxpalni.e. fixed to classic cycles11:02
olofkI think single register accesses would be the common case, but there is no reason not to support burst operations there too11:03
maxpalnok, burst support would probably require the addition of a new function - I am envisaging changing the current read_burst() to read_burst_compare() and making a new read_burst() that just does a burst read.11:03
maxpalnhow about that?11:03
olofkYeah. That would work. My suggestion was to only implement a read_burst, and move the comparasion to wb_bfm_transactor, but it's probably handy to have a compare function available in in wb_bfm_master11:05
tarunhey can anyone tell me why iam getting this error     support.h:45:20: error: macro "putc" requires 2 arguments, but only 1 given11:06
maxpalntruly separating the read from the compare is doable but a little messy - it would require a 3rd buffer to store the freshly read data, then a separate function could be used to compare that buffer with the current read buffer over. But for a number of reasons I don't really like that solution.11:07
olofkWhy would you need a third buffer? You already know what's written, and what was just read, right?11:08
olofkI should probably take a look at your code before saying these things :)11:10
maxpaln:-) it's ok - what you are saying makese snes11:10
maxpaln[unlike my typing!]11:11
olofk:)11:11
maxpalnyou have the benefit of looking at things without being burried in the code11:11
olofkYeah, that can actually be a good thing sometimes11:12
maxpaln:-) the current implementation comares wb_dat_i with the written data. I never actually store the read data into a buffer11:12
olofkNever tell your managers that though :)11:12
olofkah ok11:12
maxpalnso to complete the burst before comparing would require the read data to be stored somewhere so it could be compared offline11:13
maxpalnbut there are a few subtleties - like knowing where in the original write buffer the read data is from - i.e. the base address.11:13
maxpalnand since wrap bursts can be non-contiguous we'd need some way to distibguish between an address that hadn't been read from one that had been read incorrectly11:14
olofkok, to avoid complicating things too much, I suggest that we implement single register read and write functions, and leave the burst counterparts for now11:14
maxpalnwell, copying the current read_burst and removing the compare bit is easy11:14
maxpalnI'll copy the current read_burst() to read_burst_compare() - none of that should be difficult11:15
olofksounds good11:15
maxpalnI've also fixed the write() and read() functions so these work for classic cycles.11:15
olofkperfect11:15
maxpalnessentially everything in wb_bfm_master() should work now (apart from the init() and next() functions - which I gave up on!)11:16
olofkAnd we got room for a read_burst if someone wants to implement that later on11:16
maxpalnwell, I'll provide a read_burst() function - it'll be the same as the current one but without the additional compare steps.11:16
maxpalnit won't do anything with the read data though (except print it to screen).11:17
olofkFair enough11:17
olofkSend me a link when you got something you that you want some comments on11:17
maxpalnmodifying that to do something more useful is easy enough once the definition of 'something more useful' is decided :-)11:17
olofkUseful things is definitely not my speciality :)11:20
maxpalnhere you go : https://www.dropbox.com/s/07lu14f6r9w77na/wb_bfm_latest_07-01-15.rar?dl=011:25
olofkthanks11:25
maxpaln:-)11:26
maxpalnaaaargh11:27
maxpalndamn errors - I should really have tested that last change11:28
maxpalnone minute - there's a type in the read_burst function!11:28
maxpalnok, that'll teach me for being all gung-ho and not testing changes. I've tested it and it works as expected - https://www.dropbox.com/s/07lu14f6r9w77na/wb_bfm_latest_07-01-15.rar?dl=011:33
maxpaln:-)11:34
Me1234I built the toolchain with build scripts from here https://github.com/bluecmd/or1k-devel linux used 3.18.1 from kernel.org,  gcc from https://github.com/openrisc/or1k-gcc, binutils from https://github.com/openrisc/or1k-src, glibc https://github.com/bluecmd/or1k-glibc/ branch master-2.19-debian13:02
Me1234Now i do not know how to build linux with glibc, or use static?13:03
ysangkokpoke53282: did you see the xattrwalk error i got? i still didn't fix that one. if you use my kernel in the emulator, you should get the same problem...13:10
olofkMe1234: I've only built linux with the or1k-elf toolchain15:51
blueCmdMe1234: you need some kernel patches16:01
blueCmdMe1234: you cannot use the vanilla kernel most likely16:02
poke53282ysangkok: I know this error.16:02
poke53282Don't compile 9p with the xattr enabled.16:02
poke53282Just look in the .config file.16:03
blueCmdMe1234: https://github.com/bluecmd/or1k-devel/blob/master/tests/turnup.sh have a look there, that sets up a debian installation and builds a small linux system16:03
blueCmdit does a bunch of other things as well that you don't need, such as a DHCP server16:03
poke53282ysangkok: the archlinux kernel enable this feature. I tried to emulate it, but failed. Unfortunately I forgot to uncheck this feature.16:04
ysangkokpoke53282: is it the parameter CONFIG_9P_FS_SECURITY?16:06
poke53282Probably.16:41
poke53282look in make menuconfig16:41
poke53282Maybe that's easier16:41
poke53282Or take the .config in my new link a few hours ago.16:42
ysangkokok17:00
ysangkokpoke53282: the function DownloadAllAsync is not used17:00
poke53282Yes, it was used in previous versions.17:03
poke53282Just for fun, you can go back to the initial commit 2 years ago. :)17:04
poke53282the time jor1k was easy.17:04
ysangkok:P17:05
ysangkokpoke53282: i was thinking about adding support for loading only needed parts of files by overloading Uint8Array as used in FS.prototype.LoadFile...17:14
ysangkokpoke53282: i'm considering using LazyUint8Array from Emscripten: >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status);17:14
ysangkokif (xhr.response !== undefined) {17:14
ysangkokoops wrong paste17:14
ysangkokhttps://github.com/kripken/emscripten/blob/master/src/library_fs.js#L155117:14
ysangkokpoke53282: do you have any thoughts on jor1k only loading ranges?17:15
poke53282I was thinking about that too.17:18
poke53282Currently, you need only a ordinary web browser.17:18
poke53282sorry, an ordinary web server.17:18
poke53282so, we can shape a file into pieces of 10kB to 50kB.17:19
poke53282Of compression becomes more or less meaningless at this point.17:19
poke53282Of course compression becomes more or less meaningless at this point.17:20
poke53282and latency might be again a problem.17:20
poke53282With a good heuristic it might be no problem.17:21
poke53282I am still waiting for HTTP/2, which will help a lot I think.17:22
poke53282So m thought is, that file shaping is in principle a good idea, but to implement it fast is difficult.17:22
poke53282compression of binaries can be done via a fixed table.17:23
ysangkokpoke53282: but currently, if there is a 500MB file in the fs, it may be compressed to 400MB , but it would still make the browser block for a long time as soon as the first byte of the file i read17:24
ysangkokpoke53282: we could use byte serving only on big files, say >10MB17:24
ysangkokpoke53282: byte serving is an ordinary web server feature, but we are not using it at the moment... all files are completely loaded, or not at all17:25
ysangkokpoke53282: http/2 will help for loading lots of small files, sure, but i am talking about the case of a few very big files17:26
poke53282The biggest file is collect2 from gcc I think.17:26
poke53282But yes, you are right17:26
ysangkokas far as i know, the heuristics of the solution i'm thinking of are not hard17:27
ysangkokand implementing it is not hard either, i did it for emscripten17:28
poke53282I am not sure, how to use the http feature to load partial files. But it might be possible.17:28
ysangkokif byte serving is not supported by the web server, we can fall back to loading the full file17:28
poke53282Loading is asynchroningly, so the emulator will not hang during that time.17:28
ysangkokpoke53282: it is possible! it's called byte serving: https://en.wikipedia.org/wiki/Byte_serving17:29
poke53282The decompression is not done in a separate worker thread. But that is only a technicallity.17:29
ysangkokpoke53282: is the download not done in a worker thread also? why would a synchronous download hang the emulator if it is done in a worker thread?17:29
poke53282The download is not synchronous. It executes a Javascript function, when it's done.17:30
poke53282The function is called LoadAsync. That should tell you everything.17:31
poke53282the download is done in a extra internal browser thread, but I don't see this thread.17:31
ysangkokyes, i see that. but you mentioned that it would hang the emulator to use a synchronous download. i'm just asking why this is the case, since the web worker thread is already separate and wouldn't hang the browser17:32
poke53282the download function is currently executed in the same thread as the emulator.17:33
ysangkokahhh hmm ok i see17:33
poke53282If we separate the download, of course it woudn't hang it.17:33
poke53282But, to start a worker thread inside a worker thread is not supported :(17:33
poke53282So we have to send messages to the master, which then creates a worker thread.17:34
poke53282Stone age programming. And Javascript is the language of the year 2014 :( Why.17:34
ysangkokhmm this is problematic because the LazyUint8Array implementation i linked uses synchronous XHR's...17:35
poke53282emu worker sends message to master to download a file -> master creates worker thread -> new worker downloads the file and sends the data to master -> master sends the data to the emu thread.17:35
poke53282Can you imagine something more terrible?17:35
poke53282I will take a look in the implementation.17:36
ysangkokpoke53282: the worker→master→worker path is very convoluted but it might be fast because of Transferable Objects: http://www.w3.org/html/wg/drafts/html/master/infrastructure.html#transferable-objects17:39
poke53282yes, I know these objects.17:39
poke53282But I don't want to program it this way.17:40
poke53282I wanted to look at ECMAScript6 to see, if they fixed it.17:40
poke53282Haven't done it yet17:40
poke53282Yes, the LazyArray looks good.17:44
poke53282More or less what we need.17:45
poke53282I am not sure, if it makes sense for the current filesystem. Most of the files are <1MB.17:46
poke53282I don't plan to implement big files.17:46
poke53282except of firefox.17:46
poke53282But it would be a nice feature, which we can use for some of the files.17:47
poke53282for the files > 1MB.17:49
poke53282Most of the big files are binaries. I am not sure, how they behave if we download them partially.17:49
poke53282Normally they jump more or less randomly around in the code. Might be that we don't win anything for binaries.17:50
ysangkokpoke53282: should i try and implement it then?17:54
poke53282That would be great. But note, that in the end it might be only used for some big files, which are <10 in the current jor1k filesystem.17:56
poke53282Everything depends on how well it performs.17:56
poke53282The compression part is the most worrying thing. At the moment, the binaries can be reduced to 30% of their original size.17:58
poke53282if we can't use this feature anymore but rely on small chunks of compressed  data, we might lose in the end more than we win.17:59
ysangkokyes yes, i recognize that it may not work or that my code may be too ugly for merging :)18:00
poke53282Ahh, usually I would even mrege ugly code, but then change it myself.18:02
poke53282I hate brackets by the way.18:02
ysangkokit will be hard to do without any brackets at all :P18:08
poke53282http://pastie.org/981838818:08
poke53282I hate such a style18:08
poke53282In which universe this is a good coding standard?18:08
poke53282I mean, I hate deep brackets.18:11
poke53282nested brackets of fourth or fifth order.18:12
ysangkokah yes that makes sense18:12
ysangkok(to hate :P)18:12
poke53282http://pastie.org/981840418:13
poke53282I like the second style much much better than the first one18:14
poke53282Other people say the opposite.18:14
stekern"Other people" are usually clueless18:51
stekernok, finally started off some gcc tests...20:18
poke53282great20:44
stekernrunning against musl now, but I want to be able to run against glibc as well in the future21:04
stekernpoke53282: did you ever compile that in a non debian way?21:04
olofkHas anyone tried upstream newlib and binutils?21:25
olofkHmm.. I think I compiled binutils21:29
olofkHave to check that tomorrow21:29
olofkjuliusbaxter.net is down21:35
olofkI really hope it is back up when I need to use gdb next time21:36
stekernolofk: you can always grep this in the meantime: http://oompa.chokladfabriken.org/openrisc/openrisc.log21:39
stekernfresh as of today21:39
olofkI told juliusb about it. He was aware already21:59
stekernyes, wasn't he speaking about some downtime of the shell provider and asking for advise for other options a while back22:00
olofkGrepping through the log makes me realize that I might want to change a few things in the way I talk now when I am supposed to raise a child22:00
stekernI agree, you have to start swearing a lot more22:01
olofkFuck no!22:01
stekernI had similar thoughts when my oldest son told me he would "bitch slap" me when he was around 522:02
olofkhahaha22:02
stekern...and in english too22:02
olofkBlame TV. No one will suspect you22:03
stekernin the end it turned out that it didn't come from me, but from friends22:03
olofkhaha22:03
olofkAre sim and gdb the only parts of or1k-src not upstreamed yet?22:04
stekernthink so22:05
olofkAny git magicians who can find out if there are any extra contributors for those parts?22:06
stekernsim should just be a matter of copy the files, post the diff to ml and commit22:06
olofkCool22:07
stekernpgavin and juliusb is the sole authors of that methinks22:07
olofkHmm.. if I only knew someone with commit rights to the or1k parts of binutils22:07
stekernyeah, who could that be...22:08
stekern;)22:08
stekernI actually have the copy part done somewhere22:08
olofkThat doesn't exactly sound like the difficult part :)22:09
olofkcp -r sim /path/to/somewhere ? :)22:11
stekernunfortunately, you're right22:12
olofkShould I use the or1k branch for or1k-gcc?22:21
olofkAnd where are the easiest build instructions? Looking for gcc configure parameters22:40
olofkFound them22:45
poke53282stekern: I run the gcc testsuite against musl and glibc23:33
poke53282what do you mean the non-Debian way?23:33
poke53282what do you mean with the non-Debian way?23:35
olofkIs there any way to find out what binutils (and other automake projects) uses for configure options that are not specified?23:37
poke53282Don't know23:37
poke53282stekern: in principle everything should be in my toolchain. At least I think so. But I guess, you want to run it on real hardware, and not in QEMU23:38
poke53282That's good, because lwa and swa might still not be correctly included.23:38
poke53282So I am curious about the musl results.23:39
olofkSeriously, how am I supposed to know if I have built binutils with libquadmath, libada, lto and which default linker. Not very impressed by autoconf right now23:49
olofkNot that it matters that much, but it would be nice to have control over this so I can avoid compiling stuff I won't use (Yes, I am a gentoo user :))23:52
poke53282you an also explicitly disable stuff when you run configure.23:56
olofkpoke53282: Yes, I know. I could list all the options from configure --help, but it would be nice to just specify the ones I really want to change from the default value23:57
poke53282in a good configure script, the default value is written in brackets.23:58
poke53282I mean in "configure  --help"23:58
olofkI was hoping for that as well, but binutils isn't that nice23:58

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