**** BEGIN LOGGING AT Sun Mar 4 11:24:44 2001 11:24:44 --> RobertFitzsimons (bob@194.125.56.12) has joined #jos 11:25:06 --- RobertFitzsimons has changed the topic to: The JOS Project 11:25:09 --- RobertFitzsimons sets mode +t 11:25:14 --- RobertFitzsimons sets mode +n 12:26:18 --> fooz (walker@adsl-63-206-48-26.dsl.sndg02.pacbell.net) has joined #jos 12:26:33 Hello fooz. 12:26:40 Hello 12:28:02 Is there still a lot of activity in the JOS project? 12:28:44 I just found out about it a little while ago, heh 12:29:21 A far amount, we are still trying to reach critical mass of functionality. 12:29:41 cool 12:29:42 Once we have that developer should grow quite quickly. 12:31:44 I was looking for Java stuff and came across jos.org and was like "cooooool" heh 12:32:41 Yes, it should be very cool to have an OS running everything in Java. ;) 12:32:45 I tried to compile JJOS, but I don't run Linux and my native binary format isn't ELF, so it didn't get too far 12:33:44 What are you using? Windows? 12:33:54 no, OpenBSD 12:34:27 What does OpenBSD use as it's native binary format? aout? 12:34:33 a.out I think 12:34:43 nasm only generates ELF output 12:34:59 and I couldn't figure out how to build an i386-elf cross gcc without too much trouble 12:36:00 JJOS isn't realy being maintained any more. 12:36:04 ah 12:36:13 so what's the current kernel? 12:37:05 Hopefully it'll be my kernel, RJK. But it hasn't been release yet. But you can use the Linux Kernel. 12:38:58 I'll have to give RJK a try later then 12:39:02 The JVM teaseme hasn't been fully ported to work with RJK. I'm going to work on it today. 12:40:07 RJK, is ready to be released, but I have to sort out the licensing stuff first. 12:41:07 I'm actually pretty new to java in general, I've been spending my time coding with it and trying to learn it. It's a nice language 12:41:44 Yes, I wish I got to use it more at work. 12:42:48 OpenBSD's java situation isn't very fun, but some people are working on that.. I added an OpenBSD section to the dev tools page in the wiki 12:44:28 Yes, the BSD base OS's do miss out sometimes. 12:46:06 I wish there was more development on Kaffe, since it seems to be portable to everything 12:48:02 --> jewel (jewel@pta-dial-196-31-186-139.mweb.co.za) has joined #jos 12:48:24 Hi jewel. 12:48:40 hey all 12:50:15 who is fooz ? 12:50:23 hi 12:50:27 I am me 12:51:22 * jewel is lagged 12:52:37 So, Robert, it sounds like you have exciting news about RJK? 12:53:51 Yes, it basically ready to go, though I still want to get my company to sign a release on it first. 12:54:11 jewel: I just learned there was a #jos channel on OPN, so I stopped by, since I'm a OPN regular anyway 12:55:21 fooz: have you been interested in JOS for a while? 12:55:34 A short while, I just found out about it 12:55:52 cool, have you tested it with teaseme? 12:56:03 no, what's teaseme? 12:56:13 oops, that was for Robert 12:56:21 teaseme is one of the JOS projects 12:56:36 I working on it now. 12:56:42 it's a JVM modified to support Java processes and run in unusual environments 12:57:43 BTW Robert, I cleared up the problem with the kernel module not installing 12:57:53 I had changed the optimisation flag for that build 12:58:14 which meant the compiler wasn't inlining the strcat, strcpy ... stuff (also inb, outb etc) 12:58:30 RobertFitzsimons: Are you going to steal some of the linux kernel code for the string functions? 12:59:46 I didn't really have any plans to add those functions. 13:00:20 Ok 13:00:43 We can just put them in the vm/sys_rjk_kernel/ dir 13:01:20 Yes, the idea with the kernel interface is to keep it as simple as possible. 13:05:23 is RJK native or an interface for linux? 13:05:46 Robert wrote a kernel interface (kinterface) 13:06:04 RJK is an implementation of a kernel interface, so it could be ported to work with the Linux Kernel. 13:06:06 That we intend to wrap around the linux kernel, his RJK kernel and whatever else needs to be wrapped 13:06:59 ok 13:07:28 I'll make a BSD implementation Heh 13:07:45 Hehe 13:07:52 could be done 13:08:32 Yeah, that's the idea. 13:08:40 what class lib do most JOS people tend towards? Sun, classpath, kaffe? 13:08:43 I was actually quite interested in picobsd at one stage 13:09:03 fooz: we only support classpath with teaseme 13:09:31 classpath in CVS has some strange issues, they didn't seem to commit everything 13:10:01 fooz: what did you notice was missing? 13:10:08 include/config.h.in 13:10:19 actually, everything in include/ 13:10:19 fooz: I'm puzzled about java.awt.Event 13:10:27 hmm 13:10:31 oh, and java.util.zip.* 13:10:59 missing? 13:11:00 but that seems to be missing from the tarball too, while include/* exists in the tarball 13:11:18 AWT and zip support haven't been finished yet. 13:11:20 There is a pure java impl of java.util.zip 13:11:31 we haven't packaged it yet, but it all works 13:11:46 * fooz has started implementing java.util.zip just now, darn, someone beat him to it ;) 13:13:32 there's at least 3 implementations of any given thing in Java, heh 13:13:51 it's pretty crazy 13:15:36 that's open source for you 13:16:17 well actually that's software in general 13:18:06 classpath cvs is missing include/*.in which autoconf needs to make the configure script. for some reason, *.in is in the cvsignore file.. the rest of the files there look like JNI files made by javah 13:20:56 I've been trying to get it to build under Kaffe, but kaffe is jdk 1.1/1.2, and classpath was missing a few parts, like java.util.zip.. which I just started implementing. Looks like JCraft just added a 'JZlib' and the GCJ people have an implementation as well, heh 13:22:19 It's quite amazing 13:22:27 JZlib and jazzlib were written at the same time 13:22:34 both are pure java zlib impls 13:22:53 the GCJ one is native code (just zlib) 13:23:04 I downloaded weirdx a few days ago, but I didn't see jzlib then 13:23:28 well, on the gcj mailing list it says that gcj's is all java, except for 2 classes, deflate and inflate I think 13:23:58 which I can understand, those would be the most difficult to do in java probably 13:24:07 hmm, yes, but the actual compression stuff is native 13:25:11 I'm just trying to find any decent open source java environment, because running blackdown under linux emul causes crashes and it's slow 13:25:12 :/ 13:25:20 kaffe's class libs are too old 13:25:31 emul? 13:25:36 yes 13:25:42 I use OpenBSD 13:25:50 right 13:26:10 I can use blackdown and freebsd jdk under emulation, but neither one's very good 13:26:34 for instance, I can't compile JNI stuff and use it with Blackdown, because linux uses ELF and OpenBSD uses a.out 13:26:39 I'm writing a JVM called kissme (sister of teaseme), but it's not ready for production 13:27:31 well, I think Kaffe makes a pretty good JVM, its class lib is just in the dark ages 13:27:54 does Kaffe have the collections stu?? 13:27:56 stuff 13:28:14 I don't know 13:28:37 Isn't OpenBSD going to switch to ELF? 13:28:46 some day heh 13:28:50 but it's not elf right now 13:28:56 some archs are, but not i386 13:34:05 i need to find something nobody's written yet, every time I start on something, I find out it's already been done 13:34:05 Maybe you need to work on getting the cross compiler working again. RJK also uses elf binaries. 13:35:07 jewel, what is the kspinlock code used for? I.e. when not building with RJK. 13:36:29 I use it in the other builds 13:36:37 I'll do an a.out port heh, it'll be easier 13:36:46 it is used as part of a more complex lock 13:39:28 Ok, I'd rather not include the code like that, any ideas on how we can rewrite it? 13:39:44 http://www.jython.org/ 13:40:02 The RJK build/link process has changed a bit and isn't really the same as before. 13:40:16 You'ld rather not include that code in teaseme? 13:41:01 How is the build breaking / not working? 13:41:08 Yes. It's a portability thing. 13:42:04 Well I need it in the linux kernel build too 13:42:12 We could rename the functions 13:42:18 But I need those lock impls 13:42:48 Let me try and rewrite the code to use the native kernel spinlocks. 13:44:10 Which ones? The ones we looked at last time do nothing on single processor builds 13:46:07 The kernel interface has been changed to use a function pointer structure (like JNI) to call the funtions. So the fucntions aren't declared in kinterface any more. 13:46:53 later 13:46:55 <-- fooz (walker@adsl-63-206-48-26.dsl.sndg02.pacbell.net) has left #jos 13:46:59 You could declare them yourself, but it and maintance issue of keeping the files up-do-date as the RJK version is updated. 13:47:17 .. it is an .. 13:47:33 Ah ok 13:47:59 Let me rather move them into sys_linux_kernel 13:48:10 but I'll use the RJK functions for the RJK build 13:48:15 Move what? 13:48:57 I'll copy your old impl for the sys_linux_kernel locking code 13:49:18 Ok. 13:53:40 Should the teaseme.o file be 600KB? 13:55:58 Also what was the problem with the str* functions, it seems to be working for me? 13:56:44 Mine is 200K 13:57:00 The problem occurs when you do an 'insmod ...' 13:57:08 If the insmod works, you don't have the problem 13:57:24 This is with the RJK build. 13:57:28 The .makemeKernel in CVS is fixed (put it in about 20 minutes ago) 13:58:13 Let me see how big the teaseme.o is with RJK 13:58:56 Oops I've broken it .. 14:00:41 The build is breaking when it enounters prototypes in jni.h with a variable number of arguments 14:01:15 Which build? Linux Kernel? 14:01:47 RJK build, I needed to include 14:02:04 It's aready included by kinterface.h. 14:02:43 kimplementation.h 14:03:02 Where is size_t declared? 14:03:15 Sorry it defined to be part of the kinterface. 14:03:31 size_t isn't declared. 14:03:56 Hmm, where does it come from normally? 14:04:46 probably stdlib.h 14:05:31 I think it's stddef.h. 14:07:04 Where is eprintf defined in teaseme? 14:07:13 I can't find stddef.h 14:07:40 It's probably in vm/teaseme_print.h 14:08:23 It's a compiler specific header, have a look in /usr/lib/gcc-lib/i386-linux//include . 14:10:02 I found it, but I don't understand that code! 14:11:35 size_t isn't used by RJK, but a "typedef kint size_t;" might work. 14:13:48 I got somewhere. 14:13:51 My teaseme.o is 356K 14:13:59 ---------------------------------------- 14:13:59 classfile_tester loaded 14:13:59 debug: JOSPROCESS_init 14:14:38 I now need to add rjk vm support to teaseme. 14:14:41 What happened? 14:14:48 BRB, gone to get food. 14:15:09 cool 14:15:49 I'll help you with that, I think I'll start with the kdebug (or I assume you just did that) 14:16:01 Hmm, let me look at kthread 14:25:47 --> jewel_ (jewel@pta-dial-196-31-186-139.mweb.co.za) has joined #jos 14:28:52 <-- jewel has quit (Ping timeout for jewel[pta-dial-196-31-186-139.mweb.co.za]) 14:29:31 I'm back. 14:29:50 Hello 14:30:02 Did you put the kthread stuff into vm/teasme_print.h? 14:30:05 argh 14:30:11 I mean kdebug 14:30:15 Yes. 14:30:37 should I put in the kthread calls wherever a thread is spawned? 14:30:48 Let me send you a the lastest version of RJK. 14:31:04 that would be great 14:31:18 Have you spoken to your employer about it? 14:33:14 No not yet, I don't know if I should just come up with something for them to sign or just talk to them about it. 14:35:10 What does your contract say about stuff like that? 14:36:03 Nothing, I didn't sign it. ;) 14:37:58 When I first joined the company there was a very simple contract, but I was given a new one a few months ago which I never signed. It had something that would effect the code I wrote. 14:41:11 But you were expected to sign it? 14:41:21 (They might be under the impression you've signed it) 14:41:49 Yes, I do need to get back to them about it. 14:42:08 I think just write them a short note about it, mentioning that you've done it in your spare time and that it isn't related to your work for them 14:46:04 I'll work on it today and talk to them tommorow. 14:46:20 This is so cool: http://www.jcraft.com/jorbis/ 14:48:24 Yes, I waiting for the XMMS version in Debian to get support for ogg files and then I'll convert all my MP3's. 14:51:33 It does already (in woody) 14:51:38 but it's not good code 14:51:46 the beta 4 is much better 14:52:01 I found out why the file is so big, it looks like a lot of the standard libraries are being include in the file. 14:52:10 Is that unstable or testing? 14:56:03 woody is testing, but I think it's in both 14:56:31 in your build, but not in mine? 15:02:25 got the new version 15:02:57 mutt's interface sucks 15:03:29 Yeah, but it uses vi as it's editor. 15:03:52 No I mean the rest of it 15:03:55 Like the attachment menu 15:04:01 (I use emacs with it anyway) 15:08:17 Yeah, I get bitten by the attachment menu all the time. 15:09:44 I'm going to add the string functions or some of them anyway. 15:10:34 Also it looks like malloc is used in vm/garbage.c should that not be sys_malloc? 15:15:59 let me check 15:16:27 yes 15:16:34 I'll change it in CVS 15:31:28 Ok, are there many changes needed to teaseme with the new style interface? 15:33:03 Did you see what I put in util/kspinlock.c ? 15:33:10 No, not so far. 15:33:39 No, the changes are that big. 15:33:52 It's just a copy of the file? 15:34:39 Almost 15:34:53 But I think I'm using that in the user-space build too 15:35:58 But for that to work, those methods : bit_test_and_set etc 15:36:07 must be in kinterface.h 15:38:11 What don't you just use the katomic functions directly? 15:38:30 I could 15:38:35 Not much difference 15:42:34 I'm going to be away for about an hour 15:42:58 I'll try make sure I'm back by 7 (5 GMT) 15:43:15 Ok. 15:43:54 When I come back I'ld like to apply your patches to teaseme 15:44:13 and see if I can boot it with RJK 15:45:09 Will I commit the changes to CVS? 15:46:38 Urm 15:46:49 I've made some changes to CVS in the meantime 15:47:02 But you should be able to commit without conflicts 15:47:19 Yes, please commit them 15:47:23 Ok. 15:48:44 see you a bit later 15:48:50 Bye for now. 17:07:35 --> jdunrue (JDU@cpe-66-1-230-214.co.sprintbbd.net) has joined #jos 17:07:41 greetings, all 17:07:52 Hello jdunrue. 17:08:14 how are things going? 17:08:41 Robert, you might not recognize my e-mail address, but I'm the guy working on JOSDI. 17:08:59 Yeah, I just checked. ;) 17:09:25 Things are going well, jewel is away for awhile. 17:09:49 John sent me a copy of your kernel code. I haven't looked at it except to boot it :-) 17:10:03 He gave me a copy of your boot image, too, obviously. 17:11:00 How far along are you with RJK now? 17:11:01 Yeah, that's fine. I hope to make a public release soon. 17:13:09 The basic functionality it done, interrupts, ioports, threads, linear/virtual memory, timers. It just needs to be cleaned up and documented. 17:14:17 be back in a second 17:14:25 <-- jewel_ has quit (bbiam) 17:15:04 --> jewel (jewel@pta-dial-196-31-186-139.mweb.co.za) has joined #jos 17:15:11 Hi, John :-) 17:15:23 ah, hello guys 17:15:31 How are you jack? 17:15:54 I'm great. I'm trying really hard to get something of a release out, but I'm a little behind schedule. 17:16:20 Minimal functionality, but something to look at anyway. 17:17:21 I would like to have a look 17:17:35 I'm still not sure how all the pieces in jpda fit together 17:18:02 I'm still trying to figure it out myself. 17:19:41 I think we will have to invent a couple of pieces of the wire protocol to fill in holes, but I'm not sure about that yet. 17:20:11 I need to read over the docs again 17:20:58 I'm also wondering how I'm going to allow instruction-by-instruction stepping within the JVM 17:21:13 I suppose I could duplicate the Interpreter loop 17:21:29 The second one could check at every instruction whether it should stop or not 17:21:55 jewel, does teasme not have a jit? 17:22:12 RobertFitzsimons: did you check in the changes to teaseme? 17:22:23 No, not yet. 17:22:34 RobertFitzsimons: yes I have written one for kissme, but I haven't used it with teaseme 17:22:42 How does Japhar or Kaffe handle single-stepping? 17:22:46 RobertFitzsimons: a lot of the native code is there though 17:23:11 jdunrue: I haven't looked, does kaffe support debugging? 17:24:05 jewel, I don't recall seeing specific mention of it from the website. 17:24:10 Just make the interpreter loop always have the stepping check, most of the time the code will use the jit anyway. 17:24:31 Looking at the source, it seems they haven't implemented that yeat 17:24:33 yet 17:24:38 (nor stopping and resuming threads) 17:24:53 RobertFitzsimons: that's a possibility 17:25:34 There's no JVM opcode that represents a breakpoint, huh? 17:25:47 jdunrue: I've never actually used a java debugger, except years ago when I used Symantec Visual Cafe 17:25:54 jdunrue: no 17:26:02 Yes, there is. 17:26:09 is there? 17:27:34 It's a reserved opcode (0xCA). 17:28:03 Ah yes, I see it here 17:28:21 But it is just a reserved code, there are no semantic implications 17:28:33 and similarly the jpda doesn't refer to it at all 17:29:00 I think the jpda leaves a lot open to interpretation. 17:29:06 Hmm, inserting one of those could require quite a few changes to the bytecode for that method 17:29:31 We (or I) will need to do some reverse-engineering. 17:30:24 Jewel, what is different between sprintInt and doing a sprintf("%d 17:30:43 ", value)? 17:30:57 .. difference ... 17:30:59 RobertFitzsimons: they do the same thing 17:31:09 RobertFitzsimons: but I didn't want to implement sprintf 17:31:26 Me too. 17:31:59 :-) 17:32:58 jewel: how much of the JVM spec. does teaseme support now? Is it reasonable yet to start 17:33:12 trying to run various bits of arbitrary code with teaseme? 17:33:33 In terms of the interpreter it's complete 17:33:50 Other stuff like reflection is also mostly complete 17:34:03 Then the rest depends on classpath 17:34:12 Yes you can start running code through 17:34:23 But at the moment you should only use one thread-per-process 17:34:45 OK. 17:34:57 If you've downloaded the classpath CVS module 17:35:10 You'll see in teaseme/system/test_processes 17:35:18 There are some processes which are run on startup 17:35:32 You can add one there, and modify teaseme/system/init.java to start it 17:35:42 OK, thanks. 17:37:00 Where is the JOS wiki on the sfwiki page? 17:38:19 http://sfwiki.sourceforge.net/ 17:38:21 ? 17:38:51 But are there JOS documents in there? 17:39:27 I don't think so. 17:39:40 I get -- Topic "JOS" was not found in web "Main". 17:41:03 Maybe Todd has removed the JOS stuff and made a new wiki 17:42:17 Ah I get it 17:42:18 jos.sourceforge.net points to the JOS wiki 17:45:09 I think that just for testing. 17:45:56 not for use? 17:46:29 It was real then jos.org should point at it. 17:47:03 but when are we going to start using it? 17:47:16 It needs to be tested at some time 17:48:26 Maybe we should ask Todd and/or Iain for a status report? 17:49:22 I'll send a note to the list, unless there are objections. 17:49:25 Yeah, that was the goal of this IRC meeting. 17:52:52 I need to leave IRC in about 10 minutes. Was there anything else about JOSDI that either of you wanted to discuss? 17:52:55 RobertFitzsimons: are you ready to update teaseme? 17:53:12 jdunrue: nothing pressing 17:53:32 jdunrue: I'm going to read through the docs again and continue with JVMDI 17:53:40 jdunrue: by then I should have more questions :-) 17:53:41 jewel, almost. 17:53:44 jewel: OK sounds good! 17:56:04 Jack, I need to check it out myself. ;) 17:56:29 I'm very happy to receive feedback. 17:57:00 When you guys get RJK/teaseme up and running, I'll be happy to give it a try. 17:57:14 I have an extra machine. 17:57:22 jdunrue: looks like it will be pretty soon 17:57:28 That'll be very soon I hope. 17:57:41 jdunrue: when we hookup over a serial link 17:58:07 jdunrue: what is the "lowest-level" piece of software on either side of the connection? 17:59:02 a serial driver? I'm not sure I'm following you... 17:59:25 Or do you mean in relation to a debugger? 18:00:15 In the case of JPDA, there would have to be a transport that supported the serial connection, and the 18:00:19 That's what I mean 18:00:31 On the debuggee side we need a serial driver 18:00:43 Which we'll have to write for RJK 18:00:50 right 18:01:04 The next layer will be something that gives packets to your protocol layer, right? 18:01:09 right 18:01:21 There's a javax package for serial communications, I think. 18:01:25 Then your layer will call something that will interface with JVMDI in the JVM 18:01:32 right 18:01:50 Ah, so the debugging side will use javax to access the serial hardware, no hard work for us there 18:02:17 Is classpath implementing that package? 18:02:32 jdunrue: I don't know, I haven't checked 18:02:43 OK, I'll make a note to take a look. 18:03:05 I gotta go. It has been fun and I look forward to the next meeting, as well as all the e-mail and stuff in between. 18:03:59 thanks jack 18:04:12 <-- jdunrue (JDU@cpe-66-1-230-214.co.sprintbbd.net) has left #jos 18:14:15 I'm busy writing down some ideas for mechanisms an OS can use to provide more powerful data storage to applications 18:33:41 * jewel curses 18:33:51 netscape crashed while I was editing the wiki 18:34:06 but it was some other page that made it crash (not the wiki pages) 18:37:05 I wouldn't recommend running teaseme before implementing strcmp, strchr 18:38:13 of course we also need a way to load classes 18:39:26 I've commited my changes to get RJK to build, it won't link correctly because of the kspinlock code being include in teaseme. Also change the RJK include directory to point at my local directory, is there a way in makeme to pass it in as a varible? 18:40:08 Yeah, going to work on them now. 18:40:43 Why isn't it calling your spinlock code? 18:41:02 To make a variable: 18:41:40 var rjk_include_dir = "/some/dir " 18:41:56 then in the buildrule: 18:42:15 Can you pass it as a command line parameter? 18:42:22 BuildRule b1 = " blah blah -I @rjk_include_dir@ blah blah " 18:42:38 No not at the moment 18:43:50 * jewel scratches his head 18:43:57 I think I did write code for that actually 18:44:02 let me look 18:45:25 No that was a preprocessor that I wrote (you could use -D to define things) 18:48:05 RobertFitzsimons: I don't understand why the spinlock code is being compiled into teaseme, it should be #ifdef'ed out for the RJK_KERNEL case 18:48:52 Ok, I know what the problem is. 18:49:43 kspinlock_* is local to teaseme, but to access the RJK version you need to use kinterface->kspinlock_*. 18:50:09 right 18:51:09 Will it clash if we uncomment the section in util/kspinlock.c ? 18:51:34 No. 18:51:56 That's probably the quickest short-term solution 18:59:08 I get compilation errors for the kmemory_virtual functions in wrappers.c 18:59:56 What's the error? 19:00:11 ./vm/sys_rjk_kernel/wrappers.c: In function `memcpy': 19:00:13 ./vm/sys_rjk_kernel/wrappers.c:99: void value not ignored as it ought to be 19:03:29 Ok, change the code to look like this: 19:03:40 kinterface->kmemory_virtual_copy(str1, (void*)str2, n); 19:03:46 return str1; 19:03:55 } 19:03:55 void* memset(void* str, int c, size_t n) { 19:04:03 kinterface->kmemory_virtual_fill(str, n, c); 19:04:08 return str; 19:04:09 } 19:05:01 ok 19:05:10 now it just needs the test_and_set methosd 19:05:47 Do you need to make the same change to katomic.c as kspinlock.c? 19:06:58 yes, that's it 19:07:05 I've compiled it now 19:10:22 This is what I'm getting now. 19:10:24 ---------------------------------------- 19:10:24 classfile_tester loaded 19:10:24 debug: JOSPROCESS_init 19:10:24 did pstJNIData 19:10:52 there's moer? 19:11:03 What I do need to do to run it? 19:11:29 No it blows up after that. 19:11:46 That's the last line? 19:11:52 Let me look 19:12:23 That's where it creates the garbage heap (the first one) 19:12:51 Uncomment GARBAGE_VERBOSE in the config.h and try again 19:13:47 What do I do with grub to tell it to run teaseme? 19:14:27 If you copy the teaseme.o file to the floppy and rename it to module.elf it should work. 19:14:44 I prefer to boot from the HD 19:15:02 Must it be in the same dir as the kernel? 19:15:48 You need to load the kernel first "kernel (fd0)/kernel.elf". 19:16:02 Then the module "module (fd0)/module.elf". 19:16:35 then boot "boot". (I'm not sure about this one). 19:16:42 so the name only matters for the script you have on your floppy 19:16:51 Yes. 19:17:02 At least for the moment. 19:17:45 Ok, I uncommented GARBAGE_VERBOSE and am recompiling 19:18:10 I'm getting to "Creating NewHeapBlock^ex2097152^" now. 19:18:41 Then it hangs or crashes ? 19:18:52 Crash. 19:19:53 Strange, I'm not even getting an exception. 19:23:43 I get a whole lot of hex data followed by "Page Fault" 19:23:56 It gives cr2, eip, error 0 19:24:07 I can't see what came before that 19:25:09 eip is zero ? 19:25:28 no, I've rebooted now, it was F000 19:26:34 How do you manage to see the kdebug output, mine scrolls so fast I only get to see the last page 19:26:49 It's F000E98B 19:26:49 Ok, I found the problem. The version of the kernel on my bootdisk was out of date. 19:26:54 no, that's cr2 19:27:07 EIP is 0x804C747 19:28:39 I'm using bochs to do my testing, also the kdebug code is written to write it's output to the debug port, so it also goes to the console. 19:28:51 Is there a way to make the machine spin in a loop for a second before every eprintf ? 19:29:32 ah, I must install bochs 19:29:56 Here's what I'm getting now. 19:29:58 ---------------------------------------- 19:29:58 classfile_tester loaded 19:29:58 debug: JOSPROCESS_init 19:29:58 did pstJNIData 19:29:59 Creating NewHeapBlock^ex2097152^GARBAGE: expanding heap by Initializing garbage for heap 0x1003B000, 200000 186A0 19:29:59 garbage has size GARBAGE: lowest handle 101DB57C 19:29:59 GARBAGE: highest handle 1023CFFC 19:29:59 did GARBAGE INIT heap is 0x1003B000 19:29:59 ---------------- PID OUT OF RANGE in JNI_setJNIData (JNI Init 19:29:59 FindOrLoad returned (null) for java.lang.Class 19:29:59 FindOrLoad returned (null) for java.lang.Thread 19:29:59 FindOrLoad returned (null) for java.lang.NullPointerException 19:29:59 Calling constructor for ThreadGroup 19:30:25 Then I get the page fault. 19:30:55 Ok, that's understandable since it didn't load those classes 19:32:43 What does the sys_current_thread() return for RJK? 19:33:08 A kuint. 19:33:36 what value though? 19:33:47 I expect it to be >0 and < 65535 19:34:25 You see there is a table for the JNI data for each thread 19:34:40 It is indexed from 0 to 65535 (I know it's not a good solution) 19:34:44 In the kinterface you aren't supposed to try and under standed the value. 19:34:59 Sure, I agree 19:35:10 but for this implementation it's necessary 19:35:15 Currently it's the pointer to the thread data. 19:35:37 Maybe I should just do an & 0xffff 19:36:01 but that's dangerous too 19:36:09 That won't work do a >> 16. 19:36:40 will that be unique? 19:37:17 Change that in sys_rjk_kernel/wrappers.h 19:37:35 Well I think so. 19:38:26 But, It won't be in the future. 19:39:03 Ok, remind to implement a hash on that value 19:39:24 Add it to the todo list. 19:39:36 I'll do that now 19:42:15 Any ideas on how to load the java classes? 19:42:33 Hmmm 19:42:41 How was it does with JJOS / decaf? 19:42:47 I mean done 19:43:21 When you specify a module to GRUB, is that loaded into memory somewhere? 19:43:29 Yes. 19:43:35 Is it a problem if that file is big? 19:43:46 We don't have to use a floppy do we? 19:43:55 GRUB can load from a FAT or ext2 partition too 19:43:59 They used etherboot. 19:44:03 Yes. 19:44:22 Ok, once we have the module loaded, how easy is it to get to that data? 19:44:37 We don't have to use a floppy now, but I do what JOS to load from a floppy. 19:45:19 Ok, later we can trim down the classes to a minimum, but for now we'll have quite a few class files 19:45:50 It's not that hard, I was going to add a function which would return a pointer to the list of modules. 19:47:01 Ok, from there we need some sort of file system to extract the individual files 19:47:10 It should support subdirectories 19:48:00 I don't think so. Just have a structure like this: 19:48:07 struct file { 19:48:23 kuint name_length; 19:48:39 kuint16 name[name_length]; 19:48:46 kuint data_length; 19:48:58 kuint8 data[data_length; 19:48:59 } 19:49:11 You coulad a next field aswell. 19:49:18 where the name includes the path? 19:49:22 Yes. 19:50:01 Ok, will it be easy to write a script that creates that file, looks pretty easy? 19:51:14 Of course finding the file won't be ultra-fast, but it's no problem 19:52:04 You should only have to find the file once. ;) 19:52:43 yes 19:54:40 Should the numbers be in native or Java format, i.e. big ended or little ended? 19:56:22 no, they will used in C code 19:56:54 So this file should be built as part of the JVM build process? 19:57:15 And be JVM specific. 19:59:00 ujvm has a similar idea, but that classes are currently linked into the executable. 20:01:18 Yes 20:01:43 Ok, shall we write a script or a program to create the file? 20:03:28 A script might be quicker to implement. 20:03:58 * jewel learns some python 20:04:37 You are better picking a language which people will already have. 20:05:13 Like perl :-) 20:06:40 I don't mind which one, but we do what JOS to become self-hosting at some point. So python might be a good idea because of JPython. 20:07:26 I'm skimming through the manuals, but I can't see how it interacts with its environment (command line args) 20:21:36 Ok, I'm trying to write the script, will you write the part that unpacks the file? 20:23:25 What's the file format? 20:25:05 the one which you described 20:26:38 Ok, lets define it a little bit more. First 4 bytes will be a magic number, 2 byte major, 2 byte minor version, then the start of the data. 20:27:57 Sure 20:28:08 The data is: 20:29:35 4 bytes name length, name bytes (UTF8), 4 bytes data length, data bytes. A name length of zero is the end of the file. 20:30:24 Should the data be 4 byte aligned? 20:32:17 Will it help us any? 20:32:37 I suppose for speed and other archs 20:35:16 Yes, other archs is the issue. But it's harder to implement, 20:35:23 The data will need to be: 20:36:20 Lets forget about other archs for the moment. 20:38:39 I'm getting fed up with the python 20:38:44 I think I'll write it in C or Java 20:39:18 Jave would mean that you'll have to Java int's. 20:41:22 I already have methods to swap those around (it's trivial anyway) 20:41:28 But I found something in python now ... 20:43:03 no, it's disgusting 20:43:06 I'll do it in Java 20:43:15 Ok. 21:03:02 Ok, have a look over the code: 21:03:16 public static int makeIntelInt(int n) 21:03:18 { 21:03:20 return (n >> 24) | ((n >> 8) & 0xff00) | ((n << 8) & 0xff0000) | ((n << 24) & 0xff000000); 21:03:22 } 21:03:27 public static void main(String[] argv) throws Exception 21:03:30 { 21:03:31 DataOutputStream dos = new DataOutputStream(new FileOutputStream("teaseme_classes.packed")); 21:03:33 for(int i = 0; i < argv.length;i++) 21:03:35 21:03:37 { 21:03:39 File f = new File(argv[i]); 21:03:41 String name = f.toString(); 21:03:46 name = name.substring(2); 21:03:48 // System.err.println("Name is " + name + " and path is " + f.getPath() + " and canon " + f.getCanonicalPath()); 21:03:50 dos.writeInt( makeIntelInt(name.length())); 21:03:52 dos.writeUTF( name ); 21:03:54 dos.writeInt( makeIntelInt((int)f.length())); 21:03:57 //copy the file into the output stream 21:03:59 DataInputStream is = new DataInputStream(new FileInputStream(f)); 21:04:01 byte[] buffer = new byte[ (int) f.length() ]; 21:04:03 is.read(buffer); 21:04:05 dos.write(buffer); 21:04:07 } 21:04:40 I have to add the magic number and version 21:07:39 It would be better to write the numbers in Java format. Also the writing of the filename is wrong you need to convert the filename to UTF8 before getting the length of it, also writeUTF won't do the right thing. 21:07:42 err, that makeIntelInt doesn't work 21:11:32 Is getClassData the correct function to put the code in? 21:13:49 yes 21:15:59 Should I convert the string to bytes and then write it? 21:16:10 What is wrong with name.length() ? 21:18:37 Just use writeUTF so the format for the name field will be, two byte name_length, name bytes. 21:21:01 Ok 21:22:18 Ok, I've finished it 21:22:38 Shall I put it in the current module or the teaseme_classpath module? 21:23:05 current 21:29:05 In the makefile we'll have to change the directory to /usr/share/teaseme/classpath 21:29:29 How do we change back to the correct directory afterwards? 21:32:31 I just made a shell script and used pushd and popd 21:32:44 Ok, I've done it, I'll commit the new makefile and script 21:37:40 Please do an update and have a look at it 21:41:30 I would remove the makeIntelInt and just use Java int's, also will is.read(buffer) read the full file? 21:45:11 why do you want to use Java ints? The makeIntelInt works fine except for ints greater than 0x8000000 21:45:43 I'll put a check in to make sure it reads the whole buffer 21:46:54 There is no advantage I have to read Java int's anyway because of the writeUTF method. 21:48:30 Ah yes 21:50:30 Ok, I've committed it 22:01:11 I also added the kthread->create methods where needed 22:06:19 I've just sent you an updated version of the RJK source. 22:08:17 thanks 22:13:27 what do you do when you type "#reboot" and the system doesn't reboot 22:14:01 Where? At a linux console? 22:14:40 You can try "reboot -f". 22:15:36 telnetted in 22:15:58 Ouch, did that unmount my file systems? 22:16:36 I don't know. 22:16:52 It didn't 22:16:53 -f Force halt or reboot, don't call shutdown(8). 22:17:00 But I sync'ed before 22:18:00 All the changes are in cvs. 22:18:13 I'm going to go home now. 22:20:01 Sure 22:20:10 Thanks for an excellent session 22:20:15 I hope we get this booting soon 22:20:47 I'll be back online in about 30 minutes for awhile, to upload the logs and see if you have any problems. 22:21:03 Ok, I'll still be here 22:21:53 bye of now. 22:21:56 --- You have left channel #jos **** ENDING LOGGING AT Sun Mar 4 22:21:56 2001