Re: [9fans] GSOC: Drawterm for the iPhone
On 26-Mar-09, at 8:36 PM, andrey mirtchovski wrote: On Thu, Mar 26, 2009 at 1:27 PM, Eric Van Hensbergen wrote: I have VNC lite on my iphone, which amazingly isn't jailbroken... -eric sure, but that's a client. i thought you were talking about exporting iPhone's screen and interfaces as one would using a vnc server. Legitimate iPhone apps can access the screen, camera, accelerometer, gps and a portion of the filesystem. One could technically write a drawterm that "polled" for instructions from a remote CPU server and act on the local devices. Not sure if Apple would construe this as "executing remote code fetched through a web service" - that's for a lawyer to discuss - but technically speaking, it is *possible* to remotely control and receive input from the iPhone screen, camera, accelerometer, gps etc; all using the official SDK. -- Anant
Re: [9fans] sources down?
On 23-May-09, at 1:54 AM, Francisco J Ballesteros wrote: sources.lsub.org is avaiable just by using 9fs. But it's probably better to wait for the real thing. There are also several other mirrors IIRC that have been posted to this list. % 9fs kix.in /n/sources -- Anant
Re: [9fans] sources down?
On 24-May-09, at 2:17 AM, ron minnich wrote: On Sat, May 23, 2009 at 4:59 PM, J.R. Mauro wrote: There are plenty of mirrors, I'm pretty sure the "sources is down AGAIN" comments could be mitigated by people improving their 9fs scripts. would be interesting to have a server that provided reliability by using whatever mirrors are out there and falling over transparently as things failed. This approach relies on said server being up all the time. Much easier to fix client-side 9fs scripts :) -- Anant
Re: [9fans] state of the mirrors
On Mon, Jun 1, 2009 at 2:14 AM, Jano wrote: > I have had quite some bad experience recently with the 9p sources > mirrors. I have tried kix.in, which i know ised to be more stable than > bell-labs, but my attempts to mount it via 9p have all failed. Also, > the only other mirror i have found to be able to mount was > sources.lsub.org, i modified the sources case of 9fs to say: % 9fs kix.in /n/sources seems to work fine for me. Are you getting a timeout? -- Anant
[9fans] "Blocks" in C
Mac OS 10.6 introduced a new C compiler frontend (clang), which added support for "blocks" in C [1]. Blocks basically add closures and anonymous functions to C (and it's derivatives). Full details with examples are in the linked article. I think the feature is quite elegant and might be useful in cases where you want map/reduce like functionality in C. How much effort would it be to support a feature similar to blocks in 8c (and family)? What are your thoughts on the idea in general? -- Anant [1] http://arstechnica.com/apple/reviews/2009/08/mac-os-x-10-6.ars/10
Re: [9fans] "Blocks" in C
On Sep 3, 2009, at 5:15 PM, Uriel wrote: Exactly, I still fail to understand the point of this "feature", function points have worked fine for ages, but then I never understood any religion, and that is what Apple seems to be all about. Did you even read the article or any of the examples? There are plenty of things that you can "do" with blocks that you can't with just function pointers. That's besides the fact that some of them are more elegantly expressed with blocks that look sort of ugly with function pointers. I understand the argument that blocks don't "feel" C-like, but the argument that you can do everything with just using function pointers is BS. -- Anant
Re: [9fans] "Blocks" in C
On Sep 11, 2009, at 10:36 PM, Roman V Shaposhnik wrote: I still do care very much (and in fact, I've been meaning to provide some of the answers on this mailing list, but apparently one can't upgrade to Snow Leopard over the net so I have to physically drive to the Mac store :-(). Anyway, for a non Mac person, can somebody please clarify whether macosforge.org has the very same bits that go into the Mac OS itself, or do I still have to get the real thing? The source as put on macosforge has been "generalized" (apparently to make it easy to port to other platforms), but AFAIK the code that actually runs in Snow Leopard has a few "performance optimizations" that takes advantage of a similar low-level API that is supported by the new xnu kernel. The xnu kernel itself is also open-source, http://www.opensource.apple.com/source/xnu/xnu-1456.1.26/ is the version with GCD primitives. -- Anant
Re: [9fans] "Blocks" in C
Not meaning to add fuel to the fire, but; On Sep 17, 2009, at 7:38 PM, Jack Norton wrote: I hate iTunes with a passion. It is a huge monolithic godlike creature that tries to do everything for me (usually when I don't want it to). It brings my 12" powerbook to a screeching halt (I get beach balled to death), and it doesn't natively support many audio/ video codecs/containers (and isn't that easily extended, which brings up quicktime ). Somebody wrapped ffmpeg in Quicktime, which lets it play almost any imaginable media format: http://perian.org/ Quicktime X isn't too bad compared to the old QT, atleast they're making progress. You can't say the same of iTunes though, I think it's been going downhill since version 7. However, I do hope that when they decide to rewrite it in 64-bit Cocoa ("iTunes X"), they'll make it half as insane as compared to now. It's bound to happen. Just about the simplest way to play audio on a computer, save for the methods in plan9 :) (I'm _trying_ to get us back on topic...) Good luck trying to get Plan 9 to play video! -- Anant
Re: [9fans] "Blocks" in C
On Sep 17, 2009, at 10:26 PM, erik quanstrom wrote: Good luck trying to get Plan 9 to play video! minooka; lc /sys/src/9/pc/*tv*.c devtv.c vgatvp3020.cvgatvp3026.c Sure, if you have a TV tuner. What I was referring to was Plan 9's ability (or lack thereof) to decode and play digital video codecs. Just one of those things that prevent someone from running only Plan 9 on their computers -- you need one of the big 3 for web browser + video. -- Anant
Re: [9fans] Go
On Wed, Nov 11, 2009 at 7:00 AM, Russ Cox wrote: > On Tue, Nov 10, 2009 at 5:27 PM, andrey mirtchovski > wrote: > > serious question: can i have a link to the 9p implementation, pretty > > please? it doesn't appear in the module list on their website. > > There's no 9p implementation. I thought about writing one > a couple times, and I'd love to do that (I want to write acme > extensions in Go), but it hasn't been a priority. Another thorny > issue is what to name the package, since you can't start a > package name with a digit. > I was wondering about that too and when I found out there was no 9P package for Go yet I created this project page: http://code.google.com/p/go9/. I thought go9 was a reasonable compromise for the package name given we can't start with digits, though we can change that if anyone has a better idea. There's no code in there yet because I just found out about Go a few hours ago and am still wrapping my head around it. I probably won't get something working for atleast a few weeks, so in the interim if someone wants to get started please pitch in and let's not duplicate work :-) Regards, Anant
[9fans] Building a Raspberry Pi image / Keyboard support
It's been fun playing around with Plan 9 on Raspberry Pi - thanks to everyone who made it happen. 1. I'm trying to get a custom built kernel to boot but not having great luck, unfortunately. I got as far as "mk 'CONF=pi'" in /sys/src/9/bcm (those are the latest sources, correct?) which generated a 2M kernel named 's9pi'. I added that to the FAT partition on the standard 9pi SD card image and edited config.txt to point to it. Now, when I boot I see a rainbow pattern screen -- switching back to the 9pi kernel in config.txt makes it boot again. The kernel I built seems to be a bit different than the one included in the SD card image, though they are roughly the same size: $ file s9pi # built kernel s9pi: Plan 9 executable, ARM 7-something $ file 9pi # kernel includes in SD card image 9pi: data What am I doing wrong? 2. A couple of my keyboards don't work with the standard kernel on the SD card (the mouse works fine). Is /sys/src/omap/usbehciomap.c the right place for me to start looking into adding support for them? Thanks again! -Anant
Re: [9fans] Kabini or Raspberry Pi?
I found an old thread with a series of steps that called for building the compilers without runebase first then bringing runebase back into libc after (https://groups.google.com/forum/#!topic/comp.os.plan9/rjFtp4F82U0) - the steps didn't work for me though. What did work was using 5c from /n/9atom ( http://comments.gmane.org/gmane.os.plan9.general/68992)! -Anant On Tue, Jul 1, 2014 at 12:37 PM, wrote: > Thanks all. > I made order the A68N-5000 board yesterday. > I may have many difficulties to run Plan 9, (UEFI etc), > in such case I'll run windows on it.☺ > > By the way, I got attention to arm architecture now. > I tried to compile raspberry pi on my plan9 machine, and > got problem. > > When to compile runebase.c in the port of libc, I got > runebase.c: 1255 illegal rune in string, where > the line is: > 0xfa6c, 0x242ee,/* 𤋮 𤋮 */. > > Of course ther are many similar error lines, where > all the line have 5 digit value such as '0x242ee'. > Is there any limitations arm rune definition? > > Kenji > > >
Re: [9fans] Building a Raspberry Pi image / Keyboard support
That worked great, thank you! I was able to get the keyboard to work as well, but it seems there is a different bug where plugging in both a keyboard and mouse at the same time causes usb/kb to fail. -Anant On Tue, Jul 1, 2014 at 11:32 PM, Bakul Shah wrote: > On Tue, 01 Jul 2014 23:01:53 PDT Anant Narayanan wrote: > > > > 1. I'm trying to get a custom built kernel to boot but not having great > > luck, unfortunately. I got as far as "mk 'CONF=pi'" in /sys/src/9/bcm > > (those are the latest sources, correct?) which generated a 2M kernel > named > > 's9pi'. I added that to the FAT partition on the standard 9pi SD card > image > > and edited config.txt to point to it. Now, when I boot I see a rainbow > > pattern screen -- switching back to the 9pi kernel in config.txt makes it > > boot again. > > mk should've created 9pi and s9pi. Copy 9pi to the fat partition, not > s9pi. > > > What am I doing wrong? > > The RPi boot program doesn't know about plan9 executables. It > will just copy the bits from the kernel file specified in > config.txt at address 0x8000 and jump there. See 9/bcm/words > for some details. > > > 2. A couple of my keyboards don't work with the standard kernel on the SD > > card (the mouse works fine). Is /sys/src/omap/usbehciomap.c the right > place > > for me to start looking into adding support for them? > > This thread may help: > > https://groups.google.com/forum/#!topic/comp.os.plan9/ycok6NTCWCg > > Ideally you shouldn't need more than create a custom kbmap file. > >
Re: [9fans] Building a Raspberry Pi image / Keyboard support
Thanks for the suggestions. The keyboard + mouse work fine with Linux. In fact they work on Plan 9 together, but only for a few seconds before I get: kb: /dev/usb/ep6.1: read: i/o error kb: exiting usbotg: ep5.1 error intr 0082 usb/kb... kb: exiting Sometimes it recovers, but it's not reliable. It may be related to power, I'll try to get my hands on a powered hub and report back! -Anant On Sat, Jul 5, 2014 at 6:13 AM, Ramakrishnan Muthukrishnan wrote: > On Sat, Jul 5, 2014 at 5:15 AM, Anant Narayanan wrote: > > That worked great, thank you! > > > > I was able to get the keyboard to work as well, but it seems there is a > > different bug where plugging in both a keyboard and mouse at the same > time > > causes usb/kb to fail. > > I had a tough time with my kb/mouse [1]. I could "fix" it only by > using a powered hub. > > [1] https://www.mail-archive.com/9fans@9fans.net/msg30165.html > >
Re: [9fans] OSX Drawterm hangs on close
On 06-Apr-08, at 8:46 AM, erik quanstrom wrote: it's a known bug, but i don't think there's a fix for it. what's the bug? drawterm on OS X needs to be rewritten in Cocoa. -- Anant
Re: [9fans] Plan 9 refuses to boot from iMac
Does 9load support EFI? A. OS X EFI emulates a BIOS. That's how Boot Camp works. You need to explicitly enable it, and even then it won't work quite right until you get a nice bootloader that chains (much like how GRUB does): refit is a good tool: http://refit.sourceforge.net/ -- Anant
[9fans] Disassembler?
Hi, Is there a tool available which can convert plan 9 a.out executables to plan 9 assembly code? I'd like to know how the C compiler stores arguments for a system call on the stack for x86. 8c -S does not help, since all it displays is: `call print', instead of what instructions are actually executed when print is called. Regards, Anant
[9fans] MOVBLSX
Hi, I can't go beyond executing a 'Hello World' Plan 9 x86 executable in Linux, because most executables (I tried 8c and echo) use the MOVBLSX instruction. Whenever we hit that instruction, the program segfaults. What does MOVBLSX do? I looked up the opcode in the executable - 0x10 - which corresponds to ADC (Add with Carry) but I doubt it's that. Thanks! -- Anant P.S. Sources are on http://sources.glendix.org/?p=gitroot/glendix/main.git;a=summary (Only 9/51 syscalls have been implemented so far).
[9fans] _tos puzzle
Good day, I got some plan9 binaries to work on Linux (8c, 8l, cat, sed, cal and a few more were tested), but all others are failing at exactly the same instruction: plock+0x31 MOVL 0x30(CX), CX (which is called whenever malloc is used). For some context: acid: asm(plock+0x20) plock+0x20 JEQ plock+0x27(SB) plock+0x22 CALLabort(SB) plock+0x27 MOVLpv+0xc(SP), AX plock+0x2b MOVL_tos(SB), CX plock+0x31 MOVL0x30(CX), CX plock+0x32 DECLCX plock+0x33 XORBCL, 0xc4830448(CX) plock+0x39 ADCBAL,BL The line of interest is plock+0x2b: (_tos(SB), CX); which is supposed to store a value at CX. However, when the binary is run in Linux, CX becomes 0 after that instruction, so plock+0x31 becomes (MOVL 0x30, CX) resulting in a segfault as 0x30 is an invalid address in the process address space (it starts only at 0x1000). acid: asm(_tos) _tosADDBAL, 0x0(AX) I defined a TEXT section for _tos, in the 'Hello Assembly' program discussed earlier, and used _tos after printing Hello on the screen. acid tells me CX becomes 0 after that instruction, which is exactly what happens on Linux too: DATAstring<>+0(SB)/8, $"Plan9\n\z\z" GLOBL string<>+0(SB), $8 TEXT_main+0(SB), 1, $0 MOVL$string<>+0(SB), 4(SP) MOVL$8, AX MOVL_tos(SB), CX MOVL0x30(CX), CX INT $64 TEXT_tos+0(SB), 1, $0 ADDBAL, 0x0(AX) 8.out: 1831: suicide: sys: trap: fault read addr=0x30 pc=0x1033 What is _tos supposed to do, and why does it set CX to different values for some plan9 binaries, but not in a standalone assembled program and on linux (in both cases, CX is set to 0)? Thanks in advance for your help! Regards, Anant
Re: [9fans] _tos puzzle
Hi Russ, Thanks for your response! When a Plan 9 binary first starts running, the system call return register (AX in this case) contains a pointer to the Tos structure. /sys/src/libc/386/main9.s saves that value in the global variable named _tos. It sounds like you are not setting AX correctly when you start the programs, so _tos is not initialized correctly. So I have to allocate 56 bytes (sizeof(Tos) on 386) of space above the top of stack (before copying argc and argv) and set AX to that address, correct? How do you plan to implement rfork(RFMEM|RFPROC), which must share the entire address space between the parent and child except for the stack segment? The clone(2) system call in linux allows for creation of child processes that share address space with its parent, with the exception of the stack segment. I believe that should do? Regards, Anant
Re: [9fans] _tos puzzle
So I have to allocate 56 bytes (sizeof(Tos) on 386) of space above the top of stack (before copying argc and argv) and set AX to that address, correct? Yes. And you need to maintain it. At the very least you need to initialize tos->pid and update it on return from rfork. I set EAX before starting the executable, but still no luck :( On Plan 9, for /bin/mk: acid: symbols("_tos") _tosD 0x00016084 acid: mem(0x00016084, "X") 0xdfffefc8 I'm probing address 0x16084 on linux after every instruction (using ptrace's singlestep), and it consistently returns 0. EIP at the beginning of the program is 0x9fe4, and sure enough: acid: asm(0x9fe4) _main SUBL$0x48, SP _main+0x3 MOVLAX, _tos(SB) ... So (MOVL, _tos(SB)) is definitely executed, but for some reason, the value of AX is not stored in 0x16084. That brings me to the question of how 8a decides what address to put values like that in? Is the address the same everytime, i.e. hardcoded into the binary? (certainly seems to be) I strip the symbol table from plan 9 executables and store only data, text and initialize bss in memory - maybe that has something to do with it. Does the symbol table need to be in memory too for instructions like (MOVL AX, _tos(SB)) to work? Regards, Anant
Re: [9fans] _tos puzzle
Hi Russ, You should print AX after every instruction too, to see if you've actually set it up the way you think you did. I did, and to my surprise, AX is 0, even though I set it properly in the loader. It appears as if Linux is setting AX to 0 sometime after the loader finishes, but before the executable begins. All other registers, however, are preserved (eip being the most important). That brings me to the question of how 8a decides what address to put values like that in? Is the address the same everytime, i.e. hardcoded into the binary? (certainly seems to be) _tos is no different than any other global variable. 8a doesn't use any address at all - it leaves a slot for 8l to fill in. The eventual address of _tos depends on what other data is in the binary. I don't know why you say the address is the same every time: I meant the address being fixed for a particular binary. No, the symbol table is only for debuggers and the like. Plan 9 doesn't load it into memory either. The good news is that you've identified the program behaving incorrectly after executing only *two* instructions. That should narrow things down considerably. Every program linked with libc starts with: 83 ec 48: SUBL 0x48, SP And the following opcode is: 89 05 xx xx xx xx: MOVL AX, _tos(SB). As a hack, as I'm padding the executables anyway, I check for those bytes and change 89 05 to 89 1D during the padding - which makes the instruction MOVL BX, _tos(SB). I set BX to the proper value in the loader (which is preserved by linux), and voila! A lot of executables are working now, with the exception of awk (which tries to open #e, which isn't there) - Thanks! -- Anant
Re: [9fans] plan9port: split into several packages
as some of you already might know, Gentoo has plan9port (in the plan9 overlay), splitted into several packages. But it builds the whole p9p for the each single package (and just copies out the relevant stuff). You are incorrect. -- Anant
Re: [9fans] /n/sources/patch/spamhaus
On 13-May-08, at 4:17 AM, erik quanstrom wrote: what's a better idea. having an extra 6400 spam emails is the problem. how to i solve this without using spamhaus? I use Greylisting [1], and it's been really effective. No false positives (so far), and 0 to 2 spam messages a day. All this for a mild ~15 minute delay on genuine emails (but only for the first time). -- Anant [1] http://en.wikipedia.org/wiki/Greylisting
Re: [9fans] 9vx native OS X gui
Hi, First off, 9vx is incredible! Thanks Russ and Bryan :) When I start 9vx, I get the following messages dumped to terminal repeatedly and the app hangs: cpu10: runproc spurious wakeup idlehands spurious wakeup I got the new 0.11 source to build, but run into a similar error: cpu3: runproc spurious wakeup On 28-Jun-08, at 1:08 PM, Pietro Gagliardi wrote: Running the new native 9vx (which I was almost done doing myself, had it not been for that missing file): The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec(). Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__ () to debug. Running 9vx with the -F flag makes that error go away (tried on 10.5.3) Regards, Anant
Re: [9fans] space glenda - in acrylic
On 28-Jun-08, at 9:46 AM, kix wrote: Great! T-shirts I need a new Plan9 t-shirts. http://www.cafepress.com/9fans -- Anant
Re: [9fans] apropos of the glendix post
On 03-Sep-08, at 3:02 PM, erik quanstrom wrote: On Tue, Sep 2, 2008 at 6:38 PM, Skip Tavakkolian <[EMAIL PROTECTED]> wrote: other than trying every itiration possible (sum over histories of software?), i'm not getting the reason why glendix is a good idea. for me, it's the same thing over and over again. drivers. what drivers are the problem? Any ethernet or video card that Plan 9 doesn't support (there are plenty). -- Anant
Re: [9fans] apropos of the glendix post
On 03-Sep-08, at 7:45 PM, erik quanstrom wrote: for me, it's the same thing over and over again. drivers. what drivers are the problem? Any ethernet or video card that Plan 9 doesn't support (there are plenty). surely you don't own *all* the unsupported cards? No, but I use a Macbook Pro, and I have friends who would like to run Plan 9 but can't because of the hardware they own. Think of Glendix as a stop-gap solution until they get new hardware or until more drivers are written for Plan 9 :-) -- Anant
Re: [9fans] iwp9 hotel info
On 14-Oct-08, at 4:43 PM, Rodolfo kix García wrote: I have the room in the Phillipos too. Is cheaper than the Park Hotel with or without the IWP9 offer. On the other hand, probably the Park Hotel is better. On Tue, Oct 14, 2008 at 4:03 PM, Noah Evans <[EMAIL PROTECTED]> wrote: What kind of deal did you guys get at Park hotel? I settled on a double twin at the Phillipos for 75 euros. I can't remember, but whatever the price for a single room was with the IWP9 thing. The Park hotel offers rooms for 68 Euros/night (includes breakfast and the IWP9 discount). Reservations are accepted either by email or phone. Regards, Anant
Re: [9fans] Do we have a catalog of 9P servers?
On 10-Nov-08, at 6:26 AM, Enrico Weigelt wrote: Right now, there's an discussion about moving things into their own processes (eg. one process per tab) @ [EMAIL PROTECTED], and I just digged out my (old but still unrecognized) point of using 9P as IPC and splitting off the currently monolithic app into a bunch of fileservers. I must say that it is highly unlikely that Mozilla will adopt the path of splitting the "monolithic app into a bunch of fileservers" simply because that would involve a lot work, and potentially a lot code to be written from scratch. There's some history from the old netscape days here; 6.0 bombed because they decided to rewrite everything: http://www.joelonsoftware.com/articles/fog69.html Lesson learned. No matter how "messy" the Mozilla code looks, there is simply no way the developers would agree to a major redesign of the Mozilla architecture. Solutions that easily "fit into" the existing codebase would be more than welcomed, and I am sure somebody will come up with it. -- Anant
Re: [9fans] Do we have a catalog of 9P servers?
On 10-Nov-08, at 10:56 PM, Roman V. Shaposhnik wrote: I wish 9p:// URL worked out of the box in Firefox, but it doesn't. Shameless plug: It does if you install the Angled extension: http://www.kix.in/projects/web9/ Ok, I lied - ninep:// works, 9p:// doesn't :) -- Anant
Re: [9fans] those funny gnu guys
8c! http://gsoc.cat-v.org/hg/kenc (Anant, did you have another port as part of Glendix, or am I getting mixed up?) Yes, 8c & 8l now work on Glendix. Regards, Anant
Re: [9fans] Do we have a catalog of 9P servers?
Nevertheless, the same machinations that allow for transparency in Plan 9 disallow certain functions that can be naturally provided by a NAT implementation, or any of a number of software categories that involve packet filtering/rewriting/inspection. For example, the one I referred to in the posting you have quoted in your response: load balancing. Add to the list: rate control, intrusion detection, QoS earmarking, honeynetting, et cetera ad [put you favorite -um, -am here]. I wouldn't go so far as to say Plan 9 "disallows" certain functions that are implicit in NAT. As someone mentioned in the thread before, it is certainly possible and rather easy to write something similar to trampoline(8) to perform load balancing. Add in packet analysis to the mix and you have rate control, intrusion detection etc. Plan 9, in the end, is infinitely more malleable than most other OSes :-) -- Anant
[9fans] BeagleBoard
Anyone tried to get Plan 9 running on it? http://beagleboard.org/ -- Anant