--- Log opened Sat Nov 12 00:00:39 2016 | ||
shorne | sorry, havving some connection issues | 02:55 |
---|---|---|
shorne | stekern: Do you know why we selected the semctl patch for priority? "Apply transparent_union attribute to union semun " | 02:57 |
shorne | I was doing some testing and it seems with musl as least semctl works | 02:57 |
shorne | musl will actually bas the semun data to linux, not a union (so no abi issues) | 02:57 |
shorne | I was wonding if you know of a specific issue there | 02:59 |
shorne | olofk: for the stdin in newlib, where would stdin come from? Usually with newlib there is no os, and just one process, usually stdin comes from another proc? | 02:59 |
shorne | but I do know there is some linux support for newlib, but I dont think I ever compiled with that. | 02:59 |
stekern | shorne: AFAIU, the problem is completely on the linux side | 03:01 |
stekern | it could be that the underlying problem actually has gone away | 03:02 |
shorne | stekern: right, I think my explaination was a bit bad. The issue is kernel expects to receive the union data in the function argument. | 07:08 |
shorne | But openrisc will pass references in the syscall arguments (if arguments were passed un changed) | 07:09 |
shorne | but... | 07:09 |
shorne | 1. I did some tests with musl userspace programs calling the sem api and I dont see any issues | 07:10 |
shorne | 2. When looking into it I found the itnerface is like (user program)->(musl)->(kernel) | 07:10 |
shorne | musl has some logic to take the union (however its passed and ensure the data is passed to linux. So it seem musl provides a pretty good compatibility layer | 07:11 |
shorne | So my question is, do you know who might have reported this as a problem? | 07:12 |
shorne | maybe it was on uLibc | 07:12 |
shorne | i mean uClibc | 07:12 |
shorne | looks ok to me in uclibc too: | 07:15 |
shorne | https://github.com/gittup/uClibc/blob/gittup/libc/misc/sysvipc/sem.c#L57 | 07:15 |
shorne | notice they take a union but then the pas the arg.__pad | 07:15 |
shorne | so linux abi would not have an issue with that | 07:16 |
shorne | ~~~ | 07:16 |
shorne | I dropped the patch from my set for now | 07:16 |
shorne | I cant reproduce any issue as its explained in the commit | 07:17 |
@olofk | shorne: stdout is hooked up to uart on most boards (for printf etc). The stdin side was however not hooked up correctly. Not sure if that still is the case | 07:23 |
@olofk | shorne: Regarding the patch, could it be glibc perhaps? blueCmd and mafm were involved with getting that running to support Debian | 07:24 |
shorne | olofk: right, it could be glibc too. ill have a look at that code too. | 07:49 |
shorne | regarding stdin what would it be connected to? | 07:49 |
ZipCPU|Laptop | Why not connect stdin to 1) the terminal the emulator is running from, or 2) a uart on the device? | 07:50 |
ZipCPU|Laptop | As an alternative, I suppose you could connect it to a TCP/IP port somewhere else. | 07:51 |
ZipCPU|Laptop | The wbuart32 core allows connecting the terminal emulator (using Verilator) to either a TCP/IP port or stdin. | 07:52 |
ZipCPU|Laptop | Further, it works based upon the UART wires to/from the core that would allow the core to work just as well in hardware with the same code. | 07:52 |
wbx | shorne: where I can get your latest used kernel source? was the problem you had kernel related? | 07:57 |
wbx | shorne: can you list all used versions to build a running musl based system booting in or1ksim? | 08:03 |
shorne | ZipCPU|Laptop: olofk: right I guess for uart you would want to receive uart input via stdin. doh | 08:12 |
shorne | wbx: the issue I had was kernel related. but if you are using the latest from openrisc/linux you should be fine. I am working on widdling down the kernel to minimum patchset needed to run upstream linux (curently running v4.9-rc4) | 08:14 |
shorne | kernel: https://github.com/stffrdhrn/linux/releases/tag/or1k-fixes-4.9 | 08:15 |
shorne | busybox: git://busybox.net/busybox.git | 08:16 |
shorne | musl-cross: https://github.com/openrisc/musl-cross.git (or1k) | 08:18 |
shorne | musl-cross I have updated `config.sh` to point to 5.4.0 | 08:18 |
wbx | shorne: thx. i try | 08:54 |
wbx | shorne: so https://github.com/openrisc/linux.git latest is fine? | 08:56 |
wbx | shorne: hash: acba10ee627d6fd7001d3617dc735ec1caa654f6 | 08:57 |
stekern | shorne: I agree with your description after looking at it too, maybe there was an issue with uclibc at some point | 09:00 |
shorne | wbx: yes, that version of linux should be fine too | 09:04 |
shorne | wbx: I debugged my issue by running on or1ksim and turnning on tracing to see where the system got hung | 09:05 |
shorne | i.e. | 09:05 |
shorne | 1. start program that hangs | 09:05 |
shorne | 2. in sim do `ctrl-c` | 09:05 |
shorne | 3. in sim `t` to trace until you see what is going on | 09:05 |
shorne | there might be better ways to do it | 09:06 |
shorne | I patched the sim a bit to allow `unstall` to resume running and dump trace details | 09:06 |
wbx | shorne: thanks for the hints, will try tracing | 09:07 |
shorne | stekern: yup, also as olofk mentioned the patch might be for glibc which some people were working on to get debian running. | 09:07 |
shorne | it even looks like for glibc each arch can have its own wrapper http://code.metager.de/source/xref/gnu/glibc/sysdeps/unix/sysv/linux/arm/shmctl.c | 09:16 |
shorne | sorry that was shm, but example for sem | 09:19 |
shorne | http://code.metager.de/source/xref/gnu/glibc/sysdeps/unix/sysv/linux/mips/mips64/semctl.c | 09:19 |
stekern | shorne: that was way before glibc work | 09:23 |
shorne | alright, didnt know that | 09:26 |
shorne | but it looks to me like that compatibility could (and is) handled by libc layer | 09:26 |
shorne | so should be ok | 09:27 |
stekern | agreed | 09:40 |
wbx | shorne: thx. with busybox ash i get a shell. so I have problem with my default shell mksh .. | 10:29 |
wbx | shorne: does strace works for you? | 10:44 |
shorne | wbx: yes strace works the issue I was facing was missing patch "a966c95 openrisc: include l.swa in check for write data pagefault" | 16:49 |
shorne | wbx: actually with musl I coult not compile ash so i disabled it. (was failing due to missing glob support in musl, i think) | 16:51 |
shorne | wbx: what is mksh (miros bsd shell)? So you build seperately and run it? | 16:54 |
--- Log closed Sun Nov 13 00:00:40 2016 |
Generated by irclog2html.py 2.15.2 by Marius Gedminas - find it at mg.pov.lt!