--- Day changed Tue Jan 06 2015 | ||
maxpaln | hi olofk: I pretty much finished the work I had planned so adding any adjustments will be straight forward as I am in the code right now | 11:10 |
---|---|---|
maxpaln | I don't think I quite follow the bit about config registers | 11:10 |
maxpaln | can you explain what functionality is needed - I should be able to add it easy enough. | 11:10 |
maxpaln | BTW: The new changes are a good improvement I think - particularly the rework of the init and next functions - the new one I wrote makes it a lot easier to see what's going on. | 11:11 |
maxpaln | This has just been brought to my attention - looks interesting: http://papilio.cc/index.php?n=Papilio.ZPUinoIntroduction | 11:13 |
maxpaln | Although I'm struggling to find out much info on the uP - the info looks mostly about the development system!! | 11:19 |
_franck_ | maxpaln: I think you can find some info here: http://opensource.zylin.com/zpu.htm | 11:25 |
_franck_ | oh you're right, it looks like it's mostly SoC info | 11:25 |
maxpaln | _franck_: thanks. It does seem to be mostly SoC info rather than CPU spec though. | 11:31 |
maxpaln | olofk: Looking at the old BFM - there was a separate write() function for performing specific classic writes but it seems the read function to do the same was combined with the burst read function. If I understand your request correctly, what we really need is a working version of the write() function and a new read() function - both can be used to perform a classic transaction on a specific | 12:14 |
maxpaln | address. Does this sound about right? | 12:14 |
maxpaln | it was pretty simple to fix the write() function and implement a read() equivalent so I've added those on the guess that this is what you need. | 12:32 |
maxpaln | I think this is all the changes I had planned now - I've added the weighting system for the cycle types, I've also added some more flexibility into the transaction generators and a bit of sanity checking on the configuration (now that the user has a few options). | 12:53 |
maxpaln | Ive uploaded this to dropbox here: https://www.dropbox.com/s/tuk1ufv49mrqgyo/wb_bfm_latest_06-01-15.rar?dl=0 | 12:58 |
stekern | maxpaln: zpu is interesting, but as far as I know, the objective is to be small (with no concern about speed) | 13:32 |
maxpaln | stekern: ah, interesting background. They claim ~100 MHz but clock speed and performance aren't the same thing! | 15:56 |
stekern | right | 16:09 |
ysangkok | poke53282: are you also getting problems in chrome when setting mem=1024M? hang before launching kernel on my machine... | 16:25 |
poke53282 | never tried so much RAM :) | 16:28 |
poke53282 | If you use the 32 Bit version of Chrome you have anyhow only 2GB available. | 16:29 |
ysangkok | poke53282: i'm running on 64-bit | 16:30 |
ysangkok | poke53282: btw just filed a but on a different issue | 16:31 |
poke53282 | Yes, saw it. Change DebugMessage to Debug | 16:31 |
poke53282 | you seem to be busy with the emulator. :) | 16:31 |
ysangkok | poke53282: yes :D i'm so happy there is finally an open source linux emulator in the browser which is maintained | 16:32 |
poke53282 | I have tried xzgv by the way. But it needs gtk. | 16:32 |
poke53282 | Yes, Fabrice Bellard seems not interested in developing his emulator. | 16:33 |
poke53282 | v86 is still there. | 16:33 |
ysangkok | it's not important... i just figured that since the framebuffer programs are so light, it's easy to support all of them | 16:33 |
ysangkok | xzgv is not framebuffer of course... so there are so many other possibilities | 16:33 |
ysangkok | poke53282: i made a prototype for the URL fetching using the browser XHR (cors-enabled): https://gist.github.com/ysangkok/3bd92a6ccb4dbdf21366 | 16:34 |
poke53282 | zgv is old and doesn't compile anymore. Too many things has changed in gcc. | 16:34 |
ysangkok | i read that zgv only supports sdl and svgalib | 16:35 |
poke53282 | Yes | 16:35 |
ysangkok | svgalib would never work of course, it is full of x86 asm | 16:35 |
poke53282 | zgv uses also some other library, which seems no long used. | 16:35 |
ysangkok | regarding hte browser XHR, i plan on making writing a python proxy to run in the guest, which will split up the requests with HTTP Byte Ranges so that big requests can be streamed | 16:36 |
ysangkok | right now , i am pushing the downloads back into the guest using MergeFile | 16:37 |
ysangkok | i don't know if that is the best way, but it's the only one i could find right now | 16:37 |
ysangkok | poke53282: do you know if files written with MergeFile are written atomically in the guest? because if they aren't, i would need to use inotify in the python proxy to wait for files to be closed before sending them to http proxy clients... | 16:38 |
mor1kx | [mor1kx] bandvig pushed 1 new commit to withfpu: https://github.com/openrisc/mor1kx/commit/ff0e330eefbf54845f37c1f9f5cfa265ede8e179 | 16:40 |
mor1kx | mor1kx/withfpu ff0e330 Andrey Bacherov: Small optimization. Remove extra comparators from pfpu32_cmp and share some comparison results from pfpu32_cmp in pfpu32_addsub. | 16:40 |
poke53282 | Yes, the function Merge works atomically. But it may fail, if the file is already opened exclusively. | 16:42 |
poke53282 | All filesystem operations are atomic, the only thing is open, which is executed later when the file is on the server. | 16:45 |
ysangkok | ok, nice... this means i can make a temporary directory, have the host write files into that and serve them to the client as soon as they are created... i'd use a file for signalling the End of Steam also, then | 16:45 |
poke53282 | The filesystem operations can only be entered by one process, and it leaves the filesystem always in a consistent state. | 16:45 |
ysangkok | the browser has such a weird concurrency model :P | 16:47 |
poke53282 | Not sure, what you want to do in all details. But my filesystem is definitely capable of doing this. . | 16:47 |
poke53282 | Yes, messages and events. | 16:47 |
ysangkok | just curious, did you know about arm-js and it's 9p usage because i sent it to you, or did you already know? | 16:48 |
poke53282 | It works fine as long as you don't have a process, which must run with 100% processing power. . | 16:48 |
poke53282 | I didn't know about that 9p filesystem before you sent it. | 16:49 |
poke53282 | I searched for a solution, but couldn't find anything really usable. | 16:49 |
ysangkok | ah very good :) | 16:50 |
poke53282 | Without the code of arm-js I wouldn't have done it this way. It is also complicated. virtio especially. | 16:51 |
poke53282 | Probably I would have tried to program with fuse, which would have interacted with the outer world. | 16:52 |
ysangkok | ah yes that is a possibilty | 16:52 |
ysangkok | well, there is no reason there can't be two host-back filesystem backends :) | 16:53 |
poke53282 | I didn't know that there was already a fuse in kernel space. | 16:53 |
ysangkok | the buggy filesystem support is one of the most pressing issues right now, i think | 16:53 |
poke53282 | 9p is in principle nothing else as fuse, which communicated over drivers with the outer world. | 16:54 |
ysangkok | did you have a look at the LTP (linux test project)? | 16:54 |
poke53282 | you mean the rm issue? | 16:54 |
ysangkok | yes | 16:54 |
poke53282 | http://www.tuxera.com/community/posix-test-suite/ | 16:55 |
poke53282 | I tried this testsuite. The only real issue was rm and hard-links. | 16:56 |
poke53282 | and some date problems. | 16:56 |
poke53282 | the hard-link problem I know of. If have a very simple implementation, which works for me, but is wrong. | 16:57 |
poke53282 | the rm issue is a mystery for me. I guess, the error is in the kernel. | 16:57 |
poke53282 | in the virtio part. | 16:57 |
poke53282 | I hope, that kernel 3.19 will fix it. | 16:58 |
ysangkok | yes, i saw your comment | 16:58 |
ysangkok | but i only realize now that it really only is specific to rm | 16:58 |
ysangkok | that makes it less critical... but it will of course still break many real world programs | 16:58 |
poke53282 | I had other problems, which shouldn't be a problem according to the specification. But the Linux kernel didn't accept my values and crashed. | 16:58 |
poke53282 | s/crashed/gave protocol errors/ | 16:59 |
poke53282 | They implemented finally endianess too. | 16:59 |
poke53282 | So the best thing is to wait, until 3.19 is available in stekerns smp branch. | 17:00 |
poke53282 | This is the one I am currently using. | 17:00 |
ysangkok | hmmm yes ok... it is exciting :P christmas comes late in the openrisc world :P | 17:00 |
poke53282 | It is interesting, but this rm problem is just meaningless. | 17:02 |
poke53282 | The files are anyhow removed. | 17:02 |
ysangkok | it kills rm though, makes it necessary to repeat rm until the whole tree is gone... | 17:03 |
poke53282 | find . -exec rm {} \; maybe? | 17:05 |
poke53282 | the python error is also annoying. No files that begin with "." or "_" are allowd with gh-pages- | 17:06 |
poke53282 | So I removed those signs with the result that a file "__future__.py" was changed to "_future__.py" :) | 17:07 |
poke53282 | Obviously that's not the right way to handle it :( | 17:07 |
poke53282 | probably I should change it special.__future__.py | 17:08 |
ysangkok | i consider this a problem related to the lack of a package manager | 17:10 |
ysangkok | i am currently toying with multiple ideas | 17:10 |
ysangkok | i built paludis (a source based package manager which claims to be cleaner than Portage) for OpenRISC, but it a lot of memory, and jor1k doesn't support 1G memory yet | 17:11 |
ysangkok | the reason i am trying a source based package manager, is because there are no big prebuilt repositories with packages for OpenRISC | 17:13 |
ysangkok | another possibility, similar to the currently used solution, would be to have all non-essential packages in several overlay squashfs'es which could be loaded using http byte ranges (so one wouldn't need to load all of it to get one file) | 17:14 |
ysangkok | i think squashfs is very useful to us since it is optimized for high-latency media such as CD's | 17:15 |
ysangkok | of course this would also circumvent the need to serve files individually, fixing the python issue | 17:17 |
ysangkok | poke53282: do you think the squashfs/overlayfs solution is realistic? | 17:17 |
poke53282 | From my side 1GB should be no problem if the browser supports it. | 17:21 |
poke53282 | I don't know why it does not work. But the current 31MB should be enough for everyone ;) | 17:22 |
poke53282 | Yes, I tried squashfs and thought about overlayfs. | 17:23 |
poke53282 | But they don't give me the freedom I needed. | 17:24 |
poke53282 | The current way, the filesystem is managed is superior to any other solution I could imagine. | 17:24 |
poke53282 | sqashfs is maybe optimized, but definitely not for a low latency connection like the internet. | 17:27 |
poke53282 | I tried several times a on-demand block device solution. It was devastating. | 17:28 |
poke53282 | long latency because of the metadata and 50% of the data loaded was not being used. | 17:29 |
ysangkok | too much data was loaded because you'd load a block when seeking to it, right? | 17:29 |
poke53282 | You have to load the directory structure, the tree structure for the file blocks. | 17:30 |
ysangkok | if not using squashfs, the filesystem would assume that seeking is cheap | 17:30 |
poke53282 | and then each block. I didn't use the ata-queueing capabilities by the way. | 17:31 |
poke53282 | Currently, the whole metadata of the filesystem is loaded in the beginning and the files are loaded compressed from the server. | 17:32 |
poke53282 | IF I include dependencies between those files (or wait for http/2) I reach the pratical (and theoretical?) maximum for speed of such a server filesystem. | 17:33 |
poke53282 | something NFS or Samba cannot do for example. | 17:34 |
ysangkok | yes, that's true. but no isolation of packages will make it hard to upgrade them, no? | 17:35 |
ysangkok | this is another reason why the container that squashfs provides seems attractive to me | 17:35 |
ysangkok | see slide 10, it has the filesystem layout of SquashFS http://tree.celinuxforum.org/CelfPubWiki/ELCEurope2008Presentations?action=AttachFile&do=get&target=squashfs-elce.pdf | 17:35 |
poke53282 | well, at the moment I produce the filesystem with such a script: https://github.com/s-macke/jor1k/blob/master/utils/buildfs | 17:37 |
poke53282 | and without a problem I can change the xml file loaded to a package format. | 17:38 |
poke53282 | Also you can load .tar.bz2 files at the beginning via the lazyloadimages table. | 17:38 |
ysangkok | is the lazyloadimages method using 9p? | 17:39 |
poke53282 | no, it just loads a .tar.bz2 at the beginning and merges this with the filesystem. | 17:39 |
poke53282 | By the way, I am working on an implementation of lzma or xz. | 17:39 |
maxpaln | olofk: on the off chance you downloaded the file from dropbox already - I noticed I had some errant debug in there, I've updated the archive with the cleaned up code now. | 17:42 |
poke53282 | ysangkok: A package manager seems to be good. But at the moment most of the stuff, which I compile is merged with the current filesystem. | 17:43 |
poke53282 | The problem is, that I delete a lot to keep it small. | 17:44 |
poke53282 | https://github.com/s-macke/jor1k/wiki/Filesystem-management#packages-installed | 17:44 |
poke53282 | All those packages in 80MB. | 17:44 |
ysangkok | another issue is that it is centralized :) | 17:48 |
ysangkok | i believe i mentioned my dream to you before, it is: launching a test suite for a random open source project simply by clicking a link to jor1k with the test suite in the arguments | 17:50 |
poke53282 | I don't see another way. Also the browser limits everything. | 17:50 |
ysangkok | the browser doesn't limit CORS-enabled resources :P | 17:50 |
poke53282 | Yes | 17:50 |
poke53282 | Well, without a problem, we can add an option, that adds an image, which is loaded and executed at the beginning. | 17:51 |
poke53282 | I am doing this already in some way with the user-name. | 17:52 |
ysangkok | but there is no way, currently, from the emulator to eval javascript in the host | 17:53 |
ysangkok | my patch enables this, but i don't know if it is a good idea | 17:53 |
poke53282 | Unfortunately jor1k is now a very complicated project for someone who wants to develop for it. Adding something, especially software, is not easy. | 17:53 |
ysangkok | it was just easier than duplicating the XHR API over a serial link :P | 17:53 |
poke53282 | Well, add a special purpose register or a driver, which sends Javascript to the host. | 17:54 |
poke53282 | no good idea, but you cannot harm anyone. | 17:54 |
ysangkok | the gist i linked executed javascript transmitted on /dev/ttyS1, did you see it? | 17:55 |
poke53282 | adding a driver is also difficult, because you have to compile the kernel. | 17:55 |
ysangkok | this is why i used ttyS1, then I also didn't have to change the dts/dtb | 17:55 |
poke53282 | well, there is a second tty implemented, which currently connected to nothing. | 17:56 |
poke53282 | Use this. No problem. | 17:56 |
ysangkok | i already used it :P | 17:56 |
poke53282 | I wanted to add a switch a long time ago. Haven't done it yet. | 17:56 |
poke53282 | Hehe | 17:56 |
poke53282 | Did you remove the shell, which I start on this one? | 17:57 |
poke53282 | in /etc/inittab? | 17:57 |
ysangkok | no | 17:57 |
ysangkok | i assumed it was a typo and you were referring to the visible shell in the browser which i assumed was on ttyS0 | 17:57 |
poke53282 | can't remember of the gist you linked. | 17:58 |
poke53282 | No typo. | 17:58 |
poke53282 | IT was planned to be used hidden for the compile project. | 17:59 |
ysangkok | poke53282: here's the gist https://gist.github.com/ysangkok/3bd92a6ccb4dbdf21366 | 17:59 |
poke53282 | to send the gcc command and so on. | 17:59 |
poke53282 | ? See it the first time | 17:59 |
poke53282 | At least I guess so | 18:00 |
ysangkok | i first sent it on 15:34 :) | 18:00 |
poke53282 | nbo, this was the pdf | 18:01 |
poke53282 | well, I am not sure, if I should merge this :) | 18:07 |
poke53282 | no problem, to put something like this In the examples folder. | 18:07 |
poke53282 | I wanted to add a command to receive files via such a message. | 18:08 |
ysangkok | no need for merging | 18:08 |
poke53282 | At the moment you can only get a tar file. | 18:08 |
ysangkok | i am glad you are also worrying about this | 18:08 |
poke53282 | Also an event system for the filesystem would be good. | 18:09 |
poke53282 | to start a message, when a file is opened or closed. | 18:09 |
ysangkok | doesn't inotify work? | 18:09 |
ysangkok | or do you mean in the host? | 18:10 |
poke53282 | inotify should work. I mean on the Javascript side. | 18:10 |
ysangkok | ah ok | 18:10 |
poke53282 | For example if you want to directly start a program instead of landing in the shell. | 18:10 |
poke53282 | currently you have to alter /home/user/.profile for this. | 18:11 |
poke53282 | But you can't add a line to this in your html code. | 18:11 |
poke53282 | Therefore you need an event to tell you, that the file has been loaded. Then you need a command to add a line to it. | 18:12 |
ysangkok | yes, i agree | 18:14 |
ysangkok | another _very_ useful primitive would be streaming of files / pipes from the host to the guest | 18:14 |
ysangkok | currently, as you say, the files are transferred in fixed chunks | 18:15 |
poke53282 | streaming would be almost non-atomic :) | 18:15 |
ysangkok | non-atomic on what level? :P | 18:15 |
ysangkok | just a single unix domain socket connected to the browser would be immensly useful... i imagine this can't be done over 9p | 18:16 |
poke53282 | well, the filesize would increase steadily, without kernel interaction. | 18:16 |
ysangkok | it doesn't need to be a regular file... a unix domain socket with SOCK_STREAM of SOCK_DGRAM is what i'm talking about | 18:17 |
poke53282 | no, 9p has a node, but doesn't see anything of the data over such a socket. | 18:17 |
ysangkok | so does this mean a new driver would be necessary? | 18:18 |
poke53282 | use tty2 for it. | 18:18 |
poke53282 | Yes, probably. | 18:18 |
ysangkok | i didn't figure out how to send data from the host to the guest, using the same tty. is this possible? | 18:19 |
poke53282 | should be. | 18:24 |
poke53282 | message.Send("tty1", data) | 18:24 |
poke53282 | you should disable the shell probably in /etc/inittab | 18:25 |
ysangkok | my problem was, that when i send, i also trigger the handler that i'm receiving with | 18:25 |
poke53282 | otherwise the input is executed by the shell. | 18:25 |
poke53282 | is this not the correct behavior? | 18:25 |
poke53282 | or maybe I don't understand | 18:26 |
ysangkok | i don't know much about UART's so i can't say if it's correct | 18:26 |
ysangkok | but i wanted bidirectional communication | 18:26 |
poke53282 | Ahh, I understand. No, send and receive should beseparated. | 18:26 |
ysangkok | if the host triggers it's receiving handler even when it sends something itself, this indicates that it is not bidirectional | 18:26 |
poke53282 | Maybe echo is on or something. | 18:26 |
ysangkok | ahh maybe it's because of the shell | 18:27 |
poke53282 | Yes, I think so. | 18:27 |
poke53282 | Just remove the third line | 18:28 |
ysangkok | ah yes ok, thanks | 18:30 |
poke53282 | I like how easy such a change is. With squashfs you would have to compile your whole image again. | 18:32 |
poke53282 | additional github does not really support big binary files. | 18:32 |
poke53282 | or better git doesn't support it well. | 18:33 |
ysangkok | you're right about that :) this is a good solution for the base system. but i still maintain that it isn't maintainable if we wanted to serve an entire debian build, for example :P | 18:34 |
poke53282 | well, the metadata file would have the size of 10MB probably with hundred of thousands of files. | 18:34 |
poke53282 | it will work that way. | 18:35 |
poke53282 | and I think with small additions, it would be still doable. | 18:35 |
ysangkok | it is definitely doable... i am worried about the effort it will take to maintain it... if builds can be automized, it would be best | 18:36 |
poke53282 | Of course you use scripts for this. What do you think? | 18:36 |
poke53282 | When I used ext2 I had scripts as well. | 18:37 |
poke53282 | and with this filesystem it is not different. | 18:37 |
ysangkok | it is a neat packaging system... but every other packaging system i know has versions and repositories and the like. i am worried that the wheel is getting reinvented. it's not that we cannot do that :) | 18:39 |
poke53282 | My plan is to implement signing of files :) | 18:40 |
ysangkok | interesting... i assume that means you also plan on decentralization? | 18:41 |
poke53282 | Well, at the moment, the packaging system is simple. But you are right, I thought about using one. | 18:41 |
poke53282 | not necessarily. I just think, it would be nice, to make sure, that no one is altering my filesystem while being loaded. (NSA ...) | 18:41 |
poke53282 | you can surf anonymously, use sll and so on :) | 18:42 |
poke53282 | I hope no one is using this feature seriously. | 18:42 |
poke53282 | But the reason is, that I am curious, about the inner working of such a code signing. | 18:43 |
ysangkok | every programmer hopes that his code won't be used for serious stuff... but in the end it often is :P | 18:43 |
poke53282 | I am still waiting for a message, that someone used my software for something illegal. | 18:45 |
poke53282 | You can communicate anonymously with it. Just open two windows and make an ssh connection between them. | 18:45 |
ysangkok | only if you can trust that the emulator wasn't tampered with :P so falls back to https as always | 18:47 |
poke53282 | yes, you are right. | 18:48 |
poke53282 | reminds me of cryptocat | 18:49 |
poke53282 | Unfortunately I can't use a build manager with ready usable scripts for every package (like debian, gentoo or arch) . The first problem is cross-compiling, the second an incomplete toolchain and third the size of the packages. | 18:56 |
poke53282 | jor1k is optimized in that direction. | 18:56 |
poke53282 | and 50% of the tools I try to compile I cannot use. | 18:57 |
poke53282 | you don't want to have kde or gnome. You would wait 10 minutes, because of the packages, whcih have to be loaded from the server. | 18:59 |
poke53282 | And at some point I would get a nice email from github, that I misuse github. | 19:00 |
poke53282 | I am already close to misusing it with the jor1k-sysroot repository. | 19:01 |
poke53282 | I am afraid, when I will be able to start firefox :) 40MB compressed data everytime you start firefox. | 19:02 |
poke53282 | I should start again with Firefox 1.0 | 19:02 |
ysangkok | hmmm yes i understand | 19:04 |
ysangkok | it's too bad there are no really light modern browsers | 19:06 |
poke53282 | yes, there is a gap. lynx ... dillo ... big gap ... webkit | 19:07 |
poke53282 | one with an interpreting JAvascript engine. | 19:07 |
poke53282 | well, I guess that would be something like Firefox 1.0. | 19:08 |
ysangkok | i'm not sure why you want to have firefox in jor1k :P the idea of a server in the browser was always much more interesting to me... and most servers are way lighter than firefox | 19:10 |
poke53282 | because I can | 19:10 |
ysangkok | heh :) that is actually a good reason i guess | 19:10 |
poke53282 | webkit would be the easier way. | 19:14 |
poke53282 | But I know, that webkit and firefox both would be more or less unusable. | 19:14 |
poke53282 | So, skip webkit and jump directly to firefox. | 19:14 |
poke53282 | I am still impressed about dillo. | 19:18 |
poke53282 | about the speed. | 19:18 |
poke53282 | of website scrolling. | 19:18 |
ysangkok | yes dillo is great :D i wonder if it could this fast if it was fully html5/css (but without the JS!) compliant... i guess we will never know, nobody has the time | 19:20 |
poke53282 | no JAvascript means, that there is almost no dynamic content. | 19:20 |
poke53282 | So he can just render the site in memory one time ;) | 19:20 |
poke53282 | one goal is, to start jor1k inside jor1k via firefox. | 19:28 |
ysangkok | ah yes, a classic :D | 19:29 |
poke53282 | Unfortunately, only a adapted version will work. The problem is not the memory. The problem might be endianess. | 19:29 |
poke53282 | The typed arrays in Javascript are endian aware. | 19:30 |
poke53282 | jor1k won't run unaltered on a big endian machine. | 19:30 |
ysangkok | that seems pretty stupid, i always assumed javascript to be independent of that. but i suppose they sacrificed that for the extra performance | 19:33 |
poke53282 | Yes | 19:34 |
poke53282 | Who is using big endian machines by the way? | 19:35 |
poke53282 | the major architectures are always little endian. | 19:37 |
poke53282 | And how many (embedded) big endian systems are there, which want to run a Javascript engine? | 19:38 |
poke53282 | I guess, little endian is quasi-standard forJavascript. | 19:39 |
ysangkok | yes | 19:42 |
ysangkok | hmm now i'm missing socat to read the serial link. i'll try and cross-compile it... | 19:42 |
poke53282 | good luck :) | 19:44 |
poke53282 | I can also compile the Linux kernel. But I haven't done it, but killed the process after an hour. Compiled around 20%. | 19:44 |
poke53282 | it is a nice feeling running "make menuconfig" in jor1k | 19:46 |
ysangkok | yeah that's true | 19:49 |
ysangkok | poke53282: do you know if the serial port is buffered? | 20:27 |
poke53282 | yes, it is. I have added a fifo. | 20:42 |
poke53282 | with infinite size. | 20:42 |
poke53282 | And the whole data in the buffer is send/received around 100 times per second. | 20:42 |
poke53282 | or 50 times per second when idle. | 20:43 |
poke53282 | you can thank Javascript, that it doesn't support signals or interrupts. | 20:44 |
ysangkok | poke53282: how can i know when the message handler is ready? it seems not to be ready onLoad, but i don't wanna modify the core emulator, i want to do it as an example like you mention | 22:01 |
poke53282 | the message handler should be fine after you created the jor1k object | 22:03 |
poke53282 | the tty is of course resetted after during kernel boot. | 22:04 |
poke53282 | so you need a signal, when the kernel is booted? | 22:04 |
poke53282 | in this case I would suggest to send a ready signal after the kernel has booted. | 22:04 |
ysangkok | hmm i just call "message.Register", but the handler isn't called if i Register right the jor1k object has been created... | 22:06 |
ysangkok | i may need the signal, i'll try and find out | 22:06 |
poke53282 | the fifos are cleared during boot. But message.Register is not. | 22:08 |
ysangkok | seems to work now, onLoad handlers were called in another order than what i expected... | 22:11 |
poke53282 | which onload handler? | 22:11 |
poke53282 | of course you can send a message after some time. This I would implement in jor1k in the worker thread. No problem. | 22:12 |
poke53282 | a message.Send when the worker thread is initialized, then one, when we start the simulation. | 22:15 |
ysangkok | onload handler for the html page | 22:15 |
poke53282 | Ahh, Ok | 22:16 |
ysangkok | poke53282: after fixing the inittab, how come i didn't need to change the size in the xml file? | 22:25 |
poke53282 | In principle you should. Not sure, what happens otherwise. | 22:57 |
poke53282 | But that it runs flawless is one option. | 22:57 |
poke53282 | I forgot what happens in the source for this case. Maybe I correct it. | 22:58 |
poke53282 | But the size in the xml file should match. Otherwise I cannot guarantee for anything. | 22:58 |
ysangkok | poke53282: i don't think the image support is working... i get this error: "Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://jor1k.com/sync/tarballs/iWNb3f5Cbh.tar.bz2. This can be fixed by moving the resource to the same domain or enabling CORS." | 23:00 |
poke53282 | Yes, I know. For some reason it works sometimes. I checked my website, but the cross-origin request is enabled. | 23:01 |
poke53282 | Another thing on my TODO list. | 23:02 |
poke53282 | But Ok, the file doesn't exists. The error message is simply wrong. | 23:03 |
ysangkok | i think the error is shown because it doesn't serve the CORS headers when the file actually doesn't exist | 23:03 |
poke53282 | Click on sync, then try again. | 23:03 |
poke53282 | Yes | 23:03 |
ysangkok | i think it's problematic because the worker is killed because of this error, which makes the emulator very slow... i don't even get 1 MIPS | 23:04 |
poke53282 | Access-Control-Allow-Origin: * | 23:04 |
poke53282 | Access-Control-Allow-Headers: origin, x-requested-with, content-type | 23:04 |
poke53282 | Access-Control-Allow-Methods: PUT, GET, POST, DELETE, OPTIONS | 23:04 |
ysangkok | or, i assume that's the reason | 23:04 |
poke53282 | I don't think that's possible, because that is the error you always get, when you start the website with a user id. | 23:05 |
poke53282 | Tried it. It works for me. | 23:07 |
poke53282 | Of course you have to sync the home folder first. Try http://s-macke.github.io/jor1k/?user=lqympTmXva | 23:07 |
poke53282 | there should be a file called abcd in the home folder | 23:07 |
ysangkok | hmm i think the slowdown may occur just because the javascript console is open | 23:08 |
poke53282 | Ahh, yes. a lot of console message slow down Javascript. | 23:09 |
poke53282 | Try to avoid console messages. | 23:09 |
poke53282 | If it is just open, it shoudn't matter. | 23:09 |
poke53282 | the other tabs which are open can also slow down jor1k. | 23:11 |
ysangkok | regarding the host→guest communication over ttyS1, i can't get that to work. i've got it running here, console.log'ing all what's received on the host. but when i execute 'jor1kgui.message.Send("tty1",[153])' it also triggers that handler: http://ysangkok.gotdns.ch/jor1k/ | 23:24 |
ysangkok | and i've disabled the shell on ttyS1, so it can't be the echo | 23:25 |
poke53282 | sorry, I don't understand. | 23:29 |
poke53282 | Ahh, I will take at the link | 23:30 |
poke53282 | sending via the echo command works. So far so good | 23:32 |
poke53282 | you mean, that you still see an echo? | 23:32 |
ysangkok | yes | 23:33 |
ysangkok | in index.html, on line 12 i have a tty1 handler | 23:33 |
ysangkok | and i expected this handler NOT to be called when sending from the host | 23:33 |
ysangkok | but it seems that it is, anyway, even without the line in inittab | 23:33 |
poke53282 | how do you send data over the host? | 23:33 |
poke53282 | from the host I mean | 23:34 |
poke53282 | a button? | 23:34 |
ysangkok | i write jor1kgui.message.Send("tty1",[153]) in the console | 23:35 |
poke53282 | Ok :) | 23:35 |
poke53282 | That's too easy | 23:35 |
poke53282 | Honestly I am not sure. Maybe we have to configure the tty correctly. | 23:41 |
ysangkok | ah but you get the same problem? | 23:41 |
poke53282 | well, tty0 seems to work, but tty1 doesn't get the data I send | 23:42 |
ysangkok | hmm yes | 23:42 |
poke53282 | Or it is echoed, but never given as input to the device when I do a "cat /dev/ttyS1" | 23:42 |
ysangkok | i used dd with bs=1 to prevent buffering... i also tried a c program which called termios functions on the serial port to configure it... no luck so far | 23:43 |
poke53282 | sorry, I forgot the buffering. It works. | 23:44 |
poke53282 | But indeed, an echo is still on. | 23:44 |
poke53282 | but the echo is changed. a [35, 10] returns a [35, 13, 10] | 23:45 |
poke53282 | with a carriage return. | 23:45 |
ysangkok | hmm it must be in the guest somewhere i presume | 23:46 |
poke53282 | try "stty -F /dev/ttyS1 -echo" | 23:47 |
poke53282 | That should do it. | 23:47 |
ysangkok | ah thanks! | 23:49 |
poke53282 | believe me. I don't understand the uart that well. For me it is a unnecessary complicated beast. | 23:56 |
ysangkok | i believe you :P | 23:56 |
poke53282 | A lot of modern transfer technologies hide their complexity in their chips. | 23:58 |
poke53282 | The UART is old and you had to do everything yourself. | 23:58 |
Generated by irclog2html.py 2.15.2 by Marius Gedminas - find it at mg.pov.lt!