Jani H. Lahtinen | 1 Jun 2006 07:47
Picon

Bugreport on WmRt

I've been looking at the virtual machine and the inferno assembler. It 
appears that in the document "Dis virtual machine specification" on the 
last page the link section is said to contain entries for which there is 
first the entry point and the the index of the type descriptor, but Rt 
at least clearly reports them in reverse order. Which is correct?

Also I noticed that reading with WmRt the dis generated by the following 
code causes Rt to crash (or gets "broken" in the task list):

implement Tst;

Tst: module
{
    y: real;
    func: fn();
};

func()
{
    y = 2.45;
}

If func is not a member of the Tst module declaration it reads fine, but 
rt does not like it being a member.

Jani

Howard Fan | 1 Jun 2006 09:16
Picon

Re: jpg

Thanks. Actually the patch is quite trivial:

diff imageremap.b /appl/lib/imageremap.b
562,564c562
< #HF	im := d.newimage(i.r, Draw->CMAP8, 0, Draw->Black);
< 	im := d.newimage(i.r, d.image.chans, 0, Draw->Black);
<
---
> 	im := d.newimage(i.r, Draw->CMAP8, 0, Draw->Black);
570,582d567
< #HF
< 	if(i.chandesc==RImagefile->CRGB && d.image.depth==24){
< 		sys->print("depth = %d\n", d.image.depth);
< 		pic = array[3*len pic] of byte;
< 		k:=0;
< 		for(j=0; j<len i.chans[0]; j++){
< 			pic[k++] = i.chans[2][j];
< 			pic[k++] = i.chans[1][j];
< 			pic[k++] = i.chans[0][j];
< 		}
< 		im.writepixels(im.r, pic);
< 		return (im, "");
< 	}

On 6/1/06, ems <oat@...> wrote:
> On Wed, 2006-05-31 at 17:32 +0800, Howard Fan wrote:
> > Hi,
> >
> > How can I convert a jpg or png to inferno image?
> > wm/view can only do 8-bit rgbv while I want 24bit rgba.
(Continue reading)

Robert Hibberdine | 6 Jun 2006 13:00

Inferno as network window system

Hi all,

I use an embedded Linux system and provide a webserver / browser  
combination to provide a more user friendly and controlled  interface to 
my system than the usual shell (or telnet etc). To some degree I have 
been successful in this but the process and results are allways, I feel, 
unsatisfactory. What I'd really like is some sort of simple remote 
window system.

I have occasionally played with  inferno on my PC in the past and have 
been thinking that it might provide a basis for experimenting with 
something like this.  Originally I thought of rio on plan9 as that is  
implemented as server, but given that Inferno is available as a hosted 
OS it seems more attractive.
However I'm not sure if the window system in Inferno is implemented as a 
server??

I envisaged a 9p client on the Linux box sending  commands to a server  
on  Inferno. 

Is such an idea feasible, or even sensible? Has it already been done?

Many thanks

Bob

rog | 6 Jun 2006 15:32
Favicon

Re: Inferno as network window system

> However I'm not sure if the window system in Inferno is implemented as a 
> server??

the inferno window system is not itself implemented as a server
(it uses channels for to communicate with child processes) but
there is a module (wmexport) that serves a namespace interface to the
window system. wmimport takes that such a namespace and runs a command
as if it was in the original window system. i realise belatedly that
i never got around to writing a manual page for either...

to use wmexport:

	mount {wmexport} /mnt/wm

once a namespace has been imported (say it's in /n/remote) you can use it, e.g.

	wmimport -d /n/remote/dev -w /n/remote/mnt/wm wm/sh

in your case, you'd probably want to "cpu" into the remote terminal's
inferno instance, and export the your local inferno window server.

> Is such an idea feasible, or even sensible? Has it already been done?

it seems like an eminently sensible idea to me.

what kinds of things are you wishing to control? if you write a little
styx server (or inferno "device driver") to control things,
then you probably don't even need to use a window system at all - you
could just import the namespace from the embedded linux box and control things
that way (potentially with local GUI programs making things prettier).
(Continue reading)

Robert Hibberdine | 6 Jun 2006 16:39

Re: Inferno as network window system

rog@... wrote:

>the inferno window system is not itself implemented as a server
>(it uses channels for to communicate with child processes) but
>there is a module (wmexport) that serves a namespace interface to the
>window system. wmimport takes that such a namespace and runs a command
>as if it was in the original window system. i realise belatedly that
>i never got around to writing a manual page for either...
>
>to use wmexport:
>
>	mount {wmexport} /mnt/wm
>
>once a namespace has been imported (say it's in /n/remote) you can use it, e.g.
>
>	wmimport -d /n/remote/dev -w /n/remote/mnt/wm wm/sh
>
>in your case, you'd probably want to "cpu" into the remote terminal's
>inferno instance, and export the your local inferno window server.
>  
>
The linux box is small (16 MB of ram, 8 MB of flash disk) and not an 
architecture that you support (CRIS / Axis) so at present there is no 
instance of inferon on the embedded box. Having said that it might be 
possible to put a minimal inferno on the box? I don't know....

>it seems like an eminently sensible idea to me.
>
>what kinds of things are you wishing to control? if you write a little
>styx server (or inferno "device driver") to control things,
(Continue reading)

Skip Tavakkolian | 6 Jun 2006 19:16

Re: Inferno as network window system

> Basically the sytem is set up to do data logging. It gets data from 
> external data loggers on up to 3 RS485 buses, processes the data and 
> sends it etcetcetc.
> What I'd like is some sort of GUI to show data in real time (-ish) with 
> some cotrols to change settings etc. It might sound as if a webserver 
> etc would suffice but as I said the result is not very satisfactory.

if i understand correctly, what you want is a way to export a
namespace that represents the rs458's.

for implementation, other than rolling your own, i would check out
v9fs/npfs stuff.  it's to allow user level procs to provide synthetic
fs that the underlying v9fs serves.  i've not tried it, and it's in
early stages.

rog | 7 Jun 2006 13:31
Favicon

Re: Inferno as network window system

> Originally I thought of some sort of server on the linux box which when 
> connected to from inferno passed commands to the inferno window manger 
> dsiplaying the pretty results..But now that I think about it a styx 
> server on top of the hardware makes more sense in this case. Is this 
> easy to do under Linux with C?? any examples???

if you can use the p9p port under your embedded linux, then you'd be able to
do things in a fairly clean way. what you want to do is quite straightforward,
especially if you provide a polling, rather than a blocking interface.

write the core of the code so it reads 9p messages on its
standard input and writes replies on its standard output.
that way another program can connect it to whatever export
mechanism you decide on (like the shell connects commands in a pipe).

you can use libp9 (see 9p(2)) if you think that makes things easier
(the end of the man page also has a list of a few nice example
servers).

start off by reading intro(5) (intro(9) in p9p). the protocol is really very simple.
the only difficulties come from flush, and if you're not blocking,
then there's not an issue there.

essentially all you have to do is:

	read a message
	do some appropriate action
	reply accordingly

for all incoming messages.
(Continue reading)

Dylan Saunders | 12 Jun 2006 21:55
Picon
Favicon

ipengine flash partitions

Hello all
 
I am working on getting the 20060303 Inferno distribution running on a Brightstar ipEngine and I'm looking for some tips on using flash partitions. My goal is to get Inferno booting stand-alone, with a static IP address, from flash rather than via tftp; is this even feasible with the current state of the ipengine port?
 
So far I have built a native kernel with quite a few commands and modules built into the kernel filesystem, and I can load it into RAM via tftp. On the first boot on the ipengine I see osinit trying to set up flash translation on #F/flash/fs and then it complains about bad format.
 
I can then boot the kernel, assign an IP address, mount / from a hosted copy of inferno to /n/remote, and then bind /n/remote/dis /dis etc. to get more resources available.
 
At this point I can bind #F and #X to /dev and can actually see the ipengine firmware in flash with something like cat /dev/flash/boot. I then try
 
echo 'format /dev/flash/fs' > /dev/ftlctl which appears to work fine.
 
When I reboot osinit now reports: "dossrv: mount /n/local: unknown format" which indicates that flash translation is now working and a file system is needed.
 
The only thing I can see which will install a FAT filesystem for dossrv is "disk/format -d /dev/flash/fs" however when I try that it just seems to mess up the low level flash translation formatting and I'm back to where I started.
 
Does anyone have any hints about working with flash?, I feel like I'm getting close to having something working here. I assume that eventually I should be able to copy iipe to /dev/flash/kernel and then tell the ipengine firmware to "go fe010000" or something like that. I am familiar with installing Linux on the ipengine and I am expecting inferno to work in a similar manner.
 
thanks,
 
 Dylan Saunders
 
C H Forsyth | 13 Jun 2006 06:54
Favicon

Re: ipengine flash partitions

>The only thing I can see which will install a FAT filesystem for dossrv
>is "disk/format -d /dev/flash/fs" however when I try that it just seems
>to mess up the low level flash translation formatting and I'm back to
>where I started.

if you're using ftl(3), it has formatted the flash (partition)
and produced #X/ftldata.  that's the thing you need to format as FAT.
otherwise, indeed you're just replacing the work that ftl(3)
has done by FAT.

Lluís Batlle | 14 Jun 2006 16:47
Picon
Gravatar

where's runcpu?

Hi...

I'm trying to understand how can I run "cpu host ls", given I own the
'host' given. I'd like to know, so, what must be running in 'host' in
order to get the ls.
Maybe you can point me to a document?

I've found in manpages there should be a "runcpu" command, but I
cannot find it. But I may be in the wrong way.

Thanks in advance,
Lluís.


Gmane