Re: [9fans] NIX experience

2025-01-09 Thread Daniel Maslowski via 9fans
Fantastic!

Ron, to make it easier, you can set the regen branch as the new default
branch in the repo settings on GitHub, so people don't accidentally file
against master.

On Thu, 9 Jan 2025, 23:22 Ron Minnich,  wrote:

> WOW! Paul got it to build.
>
> git/clone g...@github.com:rminnich/nix-os
> git/branch -b origin/regen -n regen
> cd sys/src/nix
> # HEY ANYONE! WANT TO FIX THIS!
> rc -x nix # set the x bits?
> # make it so it does not have to be in $home/nix-os?
>
> cd boot
> mk
> cd ../k10
> mk
> # it may seem like it hangs, it's actually waiting for your nvram key.
> # HEY ANYONE! the prompt for nvram gets buried in output. Want to fix this?
>
> vmx 9k8cpu # HEY ANYONE! vmx thinks the multiboot header in 9k8cpu is
> wrong, but it's not. This is an easy one, Look at the multiboot header
> in l32p.s
> # and see why vmx does not like it.
>
> Or just netboot a cpu server with 9k8cpu
>
> Note we decided to leave a few things for people to take a try at
> fixing. These are great little exercises. Learn to use git, learn a
> workflow, building a kernel, etc. etc.
>
> contributing:
> The github workflow is to fork github.com/rminnich/nix-os, checkout a
> branch based on regen, hack hack, commit -s, push to your branch, that
> will make a pull request.
> Very standard stuff, we don't know how to make it all work with 9front git
> yet.
>
> Questions? Put them here, and thanks in advance.
>
> ron
>
> On Wed, Jan 8, 2025 at 4:19 PM Ron Minnich  wrote:
> >
> > NIX is moving forward, thank you paul!
> >
> > The branch is called regen, we have our first commit in many years.
> > Please take a look. If you submit a PR, please add a signed-off-by:
> > line.
> >
> > thanks
> >
> > On Tue, Jan 7, 2025 at 10:01 PM Ron Minnich  wrote:
> > >
> > > so for work like this, my motto is commit early, commit often, to a
> > > branch we can always drop later. no harm.  It's easier (for me anyway)
> > > than shuffling patches around in email.
> > >
> > > I'm happy to accept a pull request against rminnich/nix-os, , let's
> > > call the branch regen.
> > >
> > > thanks
> > >
> > > On Tue, Jan 7, 2025 at 9:52 PM Paul Lalonde 
> wrote:
> > > >
> > > > As you say, Ron.
> > > >
> > > > First, here's my nix script, such as it is, cribbed from the old nix
> one.  It has holes, guaranteed.  Also, I went and pulled in a "user"
> directory, just for old habits dying hard.  Yes, I still use glenda on this
> old terminal.  Call me names for it.
> > > > #!/bin/rc
> > > >
> > > > unmount /sys/include >[2]/dev/null
> > > >
> > > > unmount /sys/src/libc >[2]/dev/null
> > > >
> > > > bind -b /usr/glenda/nix-os/sys/include /sys/include
> > > >
> > > > bind -c /usr/glenda/nix-os/sys/src/libc /sys/src/libc
> > > >
> > > > cd /usr/glenda/nix-os/sys
> > > >
> > > > for(d in man/*){
> > > >
> > > > unmount /sys/$d >[2]/dev/null
> > > >
> > > > bind -b $d /sys/$d
> > > >
> > > > }
> > > >
> > > > exit ''
> > > >
> > > >
> > > > My terminal is a pi 400, so I had to build out the /amd64 tree,
> objtype=arm64.  I'll assume folks are clever enough to do this, or to use
> an amd64 terminal or cpu to do this work.
> > > >
> > > >
> > > > Then mk your heart out.  The main pain points are ulong parameters
> that are now usize in 9front, and the renaming of Ureg.ip to Ureg.pc.
> These changes appear limited to
> > > >
> > > > M amd64/include/ureg.h
> > > >
> > > > M sys/include/libc.h
> > > >
> > > > M sys/src/boot/pc/lib.h
> > > >
> > > > M sys/src/nix/boot/nopsession.c
> > > >
> > > > M sys/src/nix/k10/acore.c
> > > >
> > > > M sys/src/nix/k10/fpu.c
> > > >
> > > > M sys/src/nix/k10/sipi.h
> > > >
> > > > M sys/src/nix/k10/syscall.c
> > > >
> > > > M sys/src/nix/k10/trap.c
> > > >
> > > > M sys/src/nix/port/lib.h
> > > >
> > > > M sys/src/nix/port/portfns.h
> > > >
> > > > The diffs are attached.  I don't want to commit a branch because as
> I said, I don't think my bind mappings are entirely correct, though I'm
> seeing many fewer crossed wires now.
> > > > Attached is the (trivial) mkfile I built for nix-os/sys/nix/boot
> which *almost* makes a full build happen.  parseipmask has gained a v4
> parameter in 9front, which means the fix there needs actual analysis.
> qsort is somehow also complaining, possibly indicating I'm pulling the
> wrong header for it, indicating a problem in my bind script.
> > > >
> > > > This feels completely surmountable.
> > > >
> > > >
> > > > Paul
> > > >
> > > >
> > > > On Tue, Jan 7, 2025 at 9:29 PM Ron Minnich  wrote:
> > > >>
> > > >> if you can document your steps, then others can stand on your
> > > >> shoulders, possibly, and we can all move forward?
> > > >>
> > > >> On Tue, Jan 7, 2025 at 9:08 PM Paul Lalonde <
> paul.a.lalo...@gmail.com> wrote:
> > > >> >
> > > >> > Ok, not a bad first day poking at it.  I have a growing (but not
> ready) new nix script to pull the right pieces over top of my build
> environment.
> > > >> > I have a near-complete build, but with hazards: 9front has
> evolved in a number of places with ma

Re: [9fans] NIX experience

2025-01-09 Thread Ron Minnich
Thanks, Daniel, done.


On Thu, Jan 9, 2025 at 5:59 PM Daniel Maslowski via 9fans
<9fans@9fans.net> wrote:
>
> Fantastic!
>
> Ron, to make it easier, you can set the regen branch as the new default 
> branch in the repo settings on GitHub, so people don't accidentally file 
> against master.
>
> On Thu, 9 Jan 2025, 23:22 Ron Minnich,  wrote:
>>
>> WOW! Paul got it to build.
>>
>> git/clone g...@github.com:rminnich/nix-os
>> git/branch -b origin/regen -n regen
>> cd sys/src/nix
>> # HEY ANYONE! WANT TO FIX THIS!
>> rc -x nix # set the x bits?
>> # make it so it does not have to be in $home/nix-os?
>>
>> cd boot
>> mk
>> cd ../k10
>> mk
>> # it may seem like it hangs, it's actually waiting for your nvram key.
>> # HEY ANYONE! the prompt for nvram gets buried in output. Want to fix this?
>>
>> vmx 9k8cpu # HEY ANYONE! vmx thinks the multiboot header in 9k8cpu is
>> wrong, but it's not. This is an easy one, Look at the multiboot header
>> in l32p.s
>> # and see why vmx does not like it.
>>
>> Or just netboot a cpu server with 9k8cpu
>>
>> Note we decided to leave a few things for people to take a try at
>> fixing. These are great little exercises. Learn to use git, learn a
>> workflow, building a kernel, etc. etc.
>>
>> contributing:
>> The github workflow is to fork github.com/rminnich/nix-os, checkout a
>> branch based on regen, hack hack, commit -s, push to your branch, that
>> will make a pull request.
>> Very standard stuff, we don't know how to make it all work with 9front git 
>> yet.
>>
>> Questions? Put them here, and thanks in advance.
>>
>> ron
>>
>> On Wed, Jan 8, 2025 at 4:19 PM Ron Minnich  wrote:
>> >
>> > NIX is moving forward, thank you paul!
>> >
>> > The branch is called regen, we have our first commit in many years.
>> > Please take a look. If you submit a PR, please add a signed-off-by:
>> > line.
>> >
>> > thanks
>> >
>> > On Tue, Jan 7, 2025 at 10:01 PM Ron Minnich  wrote:
>> > >
>> > > so for work like this, my motto is commit early, commit often, to a
>> > > branch we can always drop later. no harm.  It's easier (for me anyway)
>> > > than shuffling patches around in email.
>> > >
>> > > I'm happy to accept a pull request against rminnich/nix-os, , let's
>> > > call the branch regen.
>> > >
>> > > thanks
>> > >
>> > > On Tue, Jan 7, 2025 at 9:52 PM Paul Lalonde  
>> > > wrote:
>> > > >
>> > > > As you say, Ron.
>> > > >
>> > > > First, here's my nix script, such as it is, cribbed from the old nix 
>> > > > one.  It has holes, guaranteed.  Also, I went and pulled in a "user" 
>> > > > directory, just for old habits dying hard.  Yes, I still use glenda on 
>> > > > this old terminal.  Call me names for it.
>> > > >
>> > > > #!/bin/rc
>> > > >
>> > > > unmount /sys/include >[2]/dev/null
>> > > >
>> > > > unmount /sys/src/libc >[2]/dev/null
>> > > >
>> > > > bind -b /usr/glenda/nix-os/sys/include /sys/include
>> > > >
>> > > > bind -c /usr/glenda/nix-os/sys/src/libc /sys/src/libc
>> > > >
>> > > > cd /usr/glenda/nix-os/sys
>> > > >
>> > > > for(d in man/*){
>> > > >
>> > > > unmount /sys/$d >[2]/dev/null
>> > > >
>> > > > bind -b $d /sys/$d
>> > > >
>> > > > }
>> > > >
>> > > > exit ''
>> > > >
>> > > >
>> > > > My terminal is a pi 400, so I had to build out the /amd64 tree, 
>> > > > objtype=arm64.  I'll assume folks are clever enough to do this, or to 
>> > > > use an amd64 terminal or cpu to do this work.
>> > > >
>> > > >
>> > > > Then mk your heart out.  The main pain points are ulong parameters 
>> > > > that are now usize in 9front, and the renaming of Ureg.ip to Ureg.pc.  
>> > > > These changes appear limited to
>> > > >
>> > > > M amd64/include/ureg.h
>> > > >
>> > > > M sys/include/libc.h
>> > > >
>> > > > M sys/src/boot/pc/lib.h
>> > > >
>> > > > M sys/src/nix/boot/nopsession.c
>> > > >
>> > > > M sys/src/nix/k10/acore.c
>> > > >
>> > > > M sys/src/nix/k10/fpu.c
>> > > >
>> > > > M sys/src/nix/k10/sipi.h
>> > > >
>> > > > M sys/src/nix/k10/syscall.c
>> > > >
>> > > > M sys/src/nix/k10/trap.c
>> > > >
>> > > > M sys/src/nix/port/lib.h
>> > > >
>> > > > M sys/src/nix/port/portfns.h
>> > > >
>> > > > The diffs are attached.  I don't want to commit a branch because as I 
>> > > > said, I don't think my bind mappings are entirely correct, though I'm 
>> > > > seeing many fewer crossed wires now.
>> > > > Attached is the (trivial) mkfile I built for nix-os/sys/nix/boot which 
>> > > > *almost* makes a full build happen.  parseipmask has gained a v4 
>> > > > parameter in 9front, which means the fix there needs actual analysis.  
>> > > > qsort is somehow also complaining, possibly indicating I'm pulling the 
>> > > > wrong header for it, indicating a problem in my bind script.
>> > > >
>> > > > This feels completely surmountable.
>> > > >
>> > > >
>> > > > Paul
>> > > >
>> > > >
>> > > > On Tue, Jan 7, 2025 at 9:29 PM Ron Minnich  wrote:
>> > > >>
>> > > >> if you can document your steps, then others can stand on your
>> > > >> shoulders, possibly, and we can all move forward?
>> > >

Re: [9fans] NIX experience

2025-01-09 Thread Ron Minnich
WOW! Paul got it to build.

git/clone g...@github.com:rminnich/nix-os
git/branch -b origin/regen -n regen
cd sys/src/nix
# HEY ANYONE! WANT TO FIX THIS!
rc -x nix # set the x bits?
# make it so it does not have to be in $home/nix-os?

cd boot
mk
cd ../k10
mk
# it may seem like it hangs, it's actually waiting for your nvram key.
# HEY ANYONE! the prompt for nvram gets buried in output. Want to fix this?

vmx 9k8cpu # HEY ANYONE! vmx thinks the multiboot header in 9k8cpu is
wrong, but it's not. This is an easy one, Look at the multiboot header
in l32p.s
# and see why vmx does not like it.

Or just netboot a cpu server with 9k8cpu

Note we decided to leave a few things for people to take a try at
fixing. These are great little exercises. Learn to use git, learn a
workflow, building a kernel, etc. etc.

contributing:
The github workflow is to fork github.com/rminnich/nix-os, checkout a
branch based on regen, hack hack, commit -s, push to your branch, that
will make a pull request.
Very standard stuff, we don't know how to make it all work with 9front git yet.

Questions? Put them here, and thanks in advance.

ron

On Wed, Jan 8, 2025 at 4:19 PM Ron Minnich  wrote:
>
> NIX is moving forward, thank you paul!
>
> The branch is called regen, we have our first commit in many years.
> Please take a look. If you submit a PR, please add a signed-off-by:
> line.
>
> thanks
>
> On Tue, Jan 7, 2025 at 10:01 PM Ron Minnich  wrote:
> >
> > so for work like this, my motto is commit early, commit often, to a
> > branch we can always drop later. no harm.  It's easier (for me anyway)
> > than shuffling patches around in email.
> >
> > I'm happy to accept a pull request against rminnich/nix-os, , let's
> > call the branch regen.
> >
> > thanks
> >
> > On Tue, Jan 7, 2025 at 9:52 PM Paul Lalonde  
> > wrote:
> > >
> > > As you say, Ron.
> > >
> > > First, here's my nix script, such as it is, cribbed from the old nix one. 
> > >  It has holes, guaranteed.  Also, I went and pulled in a "user" 
> > > directory, just for old habits dying hard.  Yes, I still use glenda on 
> > > this old terminal.  Call me names for it.
> > >
> > > #!/bin/rc
> > >
> > > unmount /sys/include >[2]/dev/null
> > >
> > > unmount /sys/src/libc >[2]/dev/null
> > >
> > > bind -b /usr/glenda/nix-os/sys/include /sys/include
> > >
> > > bind -c /usr/glenda/nix-os/sys/src/libc /sys/src/libc
> > >
> > > cd /usr/glenda/nix-os/sys
> > >
> > > for(d in man/*){
> > >
> > > unmount /sys/$d >[2]/dev/null
> > >
> > > bind -b $d /sys/$d
> > >
> > > }
> > >
> > > exit ''
> > >
> > >
> > > My terminal is a pi 400, so I had to build out the /amd64 tree, 
> > > objtype=arm64.  I'll assume folks are clever enough to do this, or to use 
> > > an amd64 terminal or cpu to do this work.
> > >
> > >
> > > Then mk your heart out.  The main pain points are ulong parameters that 
> > > are now usize in 9front, and the renaming of Ureg.ip to Ureg.pc.  These 
> > > changes appear limited to
> > >
> > > M amd64/include/ureg.h
> > >
> > > M sys/include/libc.h
> > >
> > > M sys/src/boot/pc/lib.h
> > >
> > > M sys/src/nix/boot/nopsession.c
> > >
> > > M sys/src/nix/k10/acore.c
> > >
> > > M sys/src/nix/k10/fpu.c
> > >
> > > M sys/src/nix/k10/sipi.h
> > >
> > > M sys/src/nix/k10/syscall.c
> > >
> > > M sys/src/nix/k10/trap.c
> > >
> > > M sys/src/nix/port/lib.h
> > >
> > > M sys/src/nix/port/portfns.h
> > >
> > > The diffs are attached.  I don't want to commit a branch because as I 
> > > said, I don't think my bind mappings are entirely correct, though I'm 
> > > seeing many fewer crossed wires now.
> > > Attached is the (trivial) mkfile I built for nix-os/sys/nix/boot which 
> > > *almost* makes a full build happen.  parseipmask has gained a v4 
> > > parameter in 9front, which means the fix there needs actual analysis.  
> > > qsort is somehow also complaining, possibly indicating I'm pulling the 
> > > wrong header for it, indicating a problem in my bind script.
> > >
> > > This feels completely surmountable.
> > >
> > >
> > > Paul
> > >
> > >
> > > On Tue, Jan 7, 2025 at 9:29 PM Ron Minnich  wrote:
> > >>
> > >> if you can document your steps, then others can stand on your
> > >> shoulders, possibly, and we can all move forward?
> > >>
> > >> On Tue, Jan 7, 2025 at 9:08 PM Paul Lalonde  
> > >> wrote:
> > >> >
> > >> > Ok, not a bad first day poking at it.  I have a growing (but not 
> > >> > ready) new nix script to pull the right pieces over top of my build 
> > >> > environment.
> > >> > I have a near-complete build, but with hazards: 9front has evolved in 
> > >> > a number of places with many ulong parameters becoming usize.  I have 
> > >> > a list of those spots, but now they need to be examined for 
> > >> > over/underflow.
> > >> > The last puzzle of the day is nix-os/sys/src/nix/boot.  The repo 
> > >> > includes the libboot.a6 binary, some source files that match the 
> > >> > symbols, and no mkfile.  Attempting to build also shows some 9front 
> > >> > auth changes that nee

[9fans] aan and firewall port forwarding

2025-01-09 Thread Paul Lalonde
Hi,
  I have the 9front drawterm running from my desktop mac successfully,
including using the -p option for aan.  Connecting to my cpu server just
fine.
  I also have 9front drawterm running from my laptop from outside my
network, but cannot make -p work from there.  According to lldb I'm hung in
a connect call, but each session opening a different high-numbered port.
  Anyone know how what I need to do/what ports to open to tunnel aan
through my domestic router?

Paul

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T2660c144ef7a07d8-Mb79318a5e4130cca7a043d7e
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription