IRC logs for #openrisc Saturday, 2014-04-12

--- Log opened Sat Apr 12 00:00:01 2014
stekernblueCmd: I'm pretty sure he meant module.h. and it's probably module.h in his example program that he has copy-pasted from, since it's probably this guy asking again:
stekernif it's not two guys working on the same school project, with terrible collaboration ;)04:23
stekernthe problem is that he thinks it's a "program", when it's an example for a kernel module he has found04:24
stekerncould of course be a coincident, I see that the other example "program" did something with ethernet, but in both cases the problem they're trying to solve were equally vague04:26
daliasstekern, hey04:27
daliasstekern, some ppl in #musl were asking if there's any progress/status on openrisc port04:28
stekerndalias: yes, there is04:30
stekernit's basically just the cas implementation left in atomic.h to do, then it's done04:31
daliasi was under the impression that linux on openrisc omits all the "old" syscalls like open (i.e. you have to use openat, etc.)04:32
daliasis that wrong or do you have proposed changes to handle that?04:32
stekern...and as you might remember, I got sidestepped into actually implementing the ll/sc instructions for or1k in binutils, simulators and rtl04:33
stekernno, that's not wrong, but that's another thing I need to look into.04:33
daliaswe're dealing with that issue in aarch64 port, so either way it needs to be handled04:33
stekernok, yeah. I was actually wondering if musl had that sorted out. It caused a bit of churn in uClibc, but at this point they handle it04:34
stekernso, I was kind of hoping musl would too ;)04:35
daliasthere's mixed opinion on whether we should #ifdef SYS_open etc. at each syscall site, define wrapper macros in internal/syscall.h like sys_open() and have them handle it, or do ugly remapping hidden in the __syscall macros like the hideous workaround for timespec on x3204:35
daliasbut we'll end up adopting one of these approaches (or maybe something better) soon04:36
daliaslike i said, we already have another port pending (aarch64) that will need it04:36
stekernok, good, and thanks for the headsup on it04:38
blueCmdstekern: so, I have this crash.c that crashes on native compilation but not cross compilation. I've told you about that before09:04
blueCmdI confirmed that it happens on both qemu and or1ksim09:04
blueCmdI'm trying to figure out the path with least amount of pain to find the issue09:05
stekernhmm, my favourite debugging method is or1ksim traces with l.nop 809:12
stekernit was gcc that segfaults, right?09:12
blueCmdcc1 but yes09:13
blueCmd seems to be semi-related, it was triggered by the same code at least, so something special is done09:13
stekernso, surround the offending code with l.nop 8 and l.nop 909:14
blueCmdstekern: sure, it's between main() and return 0;09:14
blueCmdthat's the issue09:14
blueCmdI have no idea where it can be, and gcc is quite huge09:14
blueCmdbut I guess I'll just have to binary search09:15
stekernah, but surely the segfault gives you some info about the pc where it happens?09:18
blueCmdwell, in qemu it does09:19
blueCmdI guess i could look at the disass and see09:19
blueCmdin some cases it's in the stack though09:19
stekernif linux doesn't give you enough info, you'll have to modify it to do it then ;)09:21
blueCmdhah, I suppose. a core dump should contain that09:21
stekernyou can add some printks in mm/fault.c do_page_fault()09:22
blueCmdalso olofk12:41
Findetonso I'm trying to run linux with or1ksim16:34
FindetonI have built and installed the or1ksim and the toolchain (both the newlib and the uclibc)16:36
FindetonI'm following
Findetonbut when I execute make menuconfig the menuconfig appers and I do not know what I am supposed to do!16:37
Findetonand of course when I execute $ make CROSS_COMPILER=or32-linux             it gives me an error16:40
Findetonmake: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'.  Stop16:41
Findetonbtw I don't know if this is important, but there's no program installed called or32-linux, does it have a new or1k- name now or something like that?16:41
stekernFindeton: you can compile it with the or1k-elf- toolchain17:25
Findetonuhm how? just changing or32-linux- to or1k-elf- ?17:26
stekernyes, *but* you'll also need to change OUTPUT_FORMAT("elf32-or32", "elf32-or32", "elf32-or32") to OUTPUT_FORMAT("elf32-or1k", "elf32-or1k", "elf32-or1k") in arch/openrisc/kernel/
Findetonuhm ok17:28
stekernthat guide is slightly dated too, but most of it is still valid17:29
stekernit should be CROSS_COMPILER=or32-linux- (or or1k-elf-) in your case though17:31
Findetonmaybe I should update it (when I get it to work)17:34
stekernnote the extra -17:34
Findetonyes I noticed :)17:34
Findetonstekern: I have made the changes in arch/openrisc/kernel/ but it's still trying to use or32 for some reason18:03
Findeton/bin/sh: 1: or32-linux-gcc: not found18:04
Findetonmake[1]: *** [kernel/bounds.s] Error 12718:04
Findetonoh no18:06
Findetonit was my mistake18:06
Findetonnah it doesn't work18:07
Findetonthat's what I've done and the output18:10
_franck_it's not CROSS_COMPILER18:24
_franck_it's CROSS_COMPIL*E*18:25
stekernah, right, missed that R ;)18:26
Findetonwell I got it working by using the make menuconfig!18:27
Findetonnow I've started linux with the or32-elf-sim (it's the or1k version)18:27
Findetonbut it has stopped loading while configuring the loopback device18:28
stekernit probably didn't stop loading18:28
stekerntry: telnet localhost 1008418:28
stekernor change your config to use xterm as the input/output device18:29
Findetonbut I should get a console or something ?18:29
Findetonah yeah18:29
stekernchange in the or1ksim .cfg file that is18:30
stekernyou can choose between a couple of different options18:30
Findetonyeah I'll do that18:38
Findetonwell I did it, now I have to connect it to the internet18:48
stekernman this cgen stuff is hard...18:49
Findetonwhat's cgen?19:03
stekernyou describe your machine in a couple of scheme files, and in binutils it will generate the arch specific files for the assembler etc19:18
stekernand you get a simulator generated for you as well19:18
Findetonstekern: it looks interesting19:25
Findetonnow I'm with the tun/tap thing20:01
Findetondo I need to create a bridge before using the script or does that script create the bridge?20:02
Findetonif there is anyone there22:14
FindetonI have the linux sim running22:14
Findetonand I run the brstart scripts to add the bridge and tap022:14
Findetonbut the bridge IP on the host computer is something like
Findetonand the eth0 connection on the openrisc linux sim is
Findetonso something big is kind of failing, how can I solve it?22:16
--- Log closed Sun Apr 13 00:00:03 2014

Generated by 2.15.2 by Marius Gedminas - find it at!