Re: wiki edits: creating a lwip translator page

2018-10-29 Thread Samuel Thibault
Joshua Branson, le lun. 29 oct. 2018 14:36:34 -0400, a ecrit:
> I created an lwip translator webpage.  It mentions that it is a complete
> replacement for pfinet, and I tried to add in an example of how to use
> it.

Applied, thanks!

Samuel



Re: Wiki edits: combining duplicate information about how to run the hurd in qemu

2018-10-29 Thread Samuel Thibault
Joshua Branson, le lun. 29 oct. 2018 14:24:24 -0400, a ecrit:
> The subject says it all.

Applied, thanks!



Re: wiki edits: gopherfs, xattr fix, and deficiencies page edit

2018-10-29 Thread Samuel Thibault
Joshua Branson, le lun. 29 oct. 2018 15:56:53 -0400, a ecrit:
> Just some usual edits.

Applied, thanks!



Re: wiki edits: gopherfs, xattr fix, and deficiencies page edit

2018-10-29 Thread liberamenso10000
Hi:

Can you update the articles about how to build GNU Mach and GNU MIG? The URL of 
git repositories are obsolete

Thanks 

El Lunes 29 de octubre de 2018, Joshua Branson escribió:
> 
> Just some usual edits.
> 
> Thanks,
> 
> Joshua
> 
>

-- 
Enviado desde mi Jolla

wiki edits: gopherfs, xattr fix, and deficiencies page edit

2018-10-29 Thread Joshua Branson

Just some usual edits.

Thanks,

Joshua

>From c10b738dcf9a1e575f4a7046356ddc599e4dc75d Mon Sep 17 00:00:00 2001
From: Joshua Branson 
Date: Mon, 29 Oct 2018 14:51:03 -0400
Subject: [PATCH] I explained that the gopherfs is defunct and pointed to the
 httpfs page. I mentioned that the xattr work is now finished. I added some
 commentary on the deficiencies page.

---
 hurd/translator/gopherfs.mdwn  |  6 ++
 hurd/translator/httpfs.mdwn|  1 +
 microkernel/mach/deficiencies.mdwn | 30 ++
 open_issues/xattr.mdwn | 10 +++---
 4 files changed, 44 insertions(+), 3 deletions(-)

diff --git a/hurd/translator/gopherfs.mdwn b/hurd/translator/gopherfs.mdwn
index db89a136..7827f08d 100644
--- a/hurd/translator/gopherfs.mdwn
+++ b/hurd/translator/gopherfs.mdwn
@@ -10,6 +10,12 @@ License|/fdl]]."]]"""]]
 
 `gopherfs` is a virtual filesystem allowing you to access Gopher sites.
 
+[[!template id=highlight text="""/!\ Obsolete /!\
+
+---
+The gopher protocol has largely been replaced by the hypertext transfer protocol ([[http|hurd/translator/httpfs]]).
+
+"""]]
 
 # Source
 
diff --git a/hurd/translator/httpfs.mdwn b/hurd/translator/httpfs.mdwn
index dc4a62f7..8b02aa06 100644
--- a/hurd/translator/httpfs.mdwn
+++ b/hurd/translator/httpfs.mdwn
@@ -10,6 +10,7 @@ License|/fdl]]."]]"""]]
 
 `httpfs` is a virtual filesystem allowing you to access web pages and files.
 
+While the httpfs translator works, it is only suitable for very simple use cases: it just provides the actual file contents downloaded from the URL, but no additional status information that are necessary for interactive use. (Progress indication, error codes, HTTP redirects etc.)
 
 # Source
 
diff --git a/microkernel/mach/deficiencies.mdwn b/microkernel/mach/deficiencies.mdwn
index 0c342e20..b7927210 100644
--- a/microkernel/mach/deficiencies.mdwn
+++ b/microkernel/mach/deficiencies.mdwn
@@ -15,6 +15,23 @@ License|/fdl]]."]]"""]]
 
 # Deficiencies
 
+Mach is a first generational microkernel, and many of mach's implementations are poor.
+The result is a complicated code base with many issues. Problems include resource accounting,
+scheduling, and too many features inside the kernel. Another problem is mach's IPC is
+too flexible and has numerous features.  The more features and complex the message passing is,
+the slower performance becomes. Mach's IPC ought to be simple enough to maximize performance.
+
+Mach also doesn't support any read-ahead techniques, so its I/O performance suffers.
+Read ahead will have to be implemented inside the kernel.
+
+There are many optimizations that can be done:
+
+We could easily get rid of the ihash library making the message provide the address of
+the object associated to a receive right, so the only real indirection is the capability,
+like in other systems, and yes, buffering adds a bit of complexity. Another example is
+merging structures to improve locality or having rights close to their target port,
+when there are only a few.  This would increase cache efficiency.
+
 ## IRC, freenode, #hurd, 2012-06-29
 
  I do not understand what are the deficiencies of Mach, the
@@ -266,6 +283,19 @@ License|/fdl]]."]]"""]]
 
 # X15
 
+X15 is an in-development hurd-like operating system.  It's developer, Richard
+Braun, decided that GNU/Hurd running on the mach microkernel has many short-comings.
+Namely to make the Hurd "better" required deep changes to gnumach. He decided to start
+a new project from scratch.  Instead of running the Hurd on top of gnumach, he started
+building his own microkernel: X15, which is like gnumach.  Originally he had intended
+to port the gnuhurd to run ontop of X15, but X15 has since made some design decisions
+that make porting the Hurd to run on top of X15 very unlikely.  Occasionally some X15
+code can be used on the GNU/Hurd, which is what happened with the buddy allocator.
+
+Currently X15 is a real-time microkernel with low-level performance monitoring system,
+local atomic operations, lockless synchronization, RCU, and it can scale well on any 32-bit,
+64-bit target.  It currently runs on x86 and ARM processors, but it lacks userspace support.
+
 ## IRC, freenode, #hurd, 2012-09-04
 
  it was intended as a mach clone, but now that i have better
diff --git a/open_issues/xattr.mdwn b/open_issues/xattr.mdwn
index c6b9d8f7..0b6fa2c3 100644
--- a/open_issues/xattr.mdwn
+++ b/open_issues/xattr.mdwn
@@ -11,10 +11,14 @@ License|/fdl]]."]]"""]]
 
 [[!meta title="xattr: extended attributes"]]
 
-[[!tag open_issue_glibc open_issue_hurd]]
+[[!meta title="Implement xattr Support"]]
 
-This task is listed as a [[Google Summer of Code project
-idea|community/gsoc/project_ideas/xattr]].
+[[!template id=highlight text="""/!\ Obsolete /!\
+
+This project is finished."""]]
+
+This task was listed as a [[Google Summer of Code project
+idea|community/gsoc/project_ideas/xattr]], but it has been completed.
 
 IRC, freenode, #hurd, 2011-06-01:
 
-- 

Re: [PATCH] PCI Arbiter

2018-10-29 Thread Samuel Thibault
Hello,

I have commited this. While skimming over the changes, I noted some
TODOs which we should work on, but don't prevent from using it.

Samuel



Re: [PATCH] New access method: Hurd via RPCs

2018-10-29 Thread Samuel Thibault
Hello,

Joan Lledó, le mar. 16 janv. 2018 12:54:29 +0100, a ecrit:
> All references to the Hurd in the i386 access method have been removed.

Well, we don't want to remove it entirely, otherwise we'd have a "flag
day" for switching between x86 access and pci arbiter access. The
implementation should rather try to access the arbiter and if that
fails, failback to the x86 implementation.

Samuel



Re: [PATCH] New module for the Hurd

2018-10-29 Thread Samuel Thibault
Hello,

Joan Lledó, le mar. 16 janv. 2018 12:54:30 +0100, a ecrit:
> This new module uses Hurd's RPCs for accessing the PCI configuration space.
> Direct access as in {read_write}_{8,16,32} functions is done by the old x86
> module.

Similarly, we don't want to avoid x86 completely.

> +_pci_hidden int
> +pci_system_hurd_create(void)
> +{

This could start by opening _SERVERS_BUS_PCI and if that fails, call
pci_system_x86_create instead and thus immediately get x86 operations.

Samuel



Running PCI arbiter on stock Debian image

2018-10-29 Thread Damien Zammit
Hi there!

I am interested in getting more driver support into the Hurd.

I started by rebasing/compiling the PCI arbiter patches and documenting
the steps required to make it all work on the stock Debian disk image.
Note you might need to extend the disk image to get more disk space
before attempting this on the actual disk image.
(I had to repartition mine which was a bit fiddly).

Please see below and attached tarball with all rebased patches:
Please note that I reconstructed this document after I completed it.
It's more a set of pseudo instructions - not just bash commands.

I hope this small effort is put to good use to get these patches ready
for merging soon before they need another rebase.

#
# Preparation
sudo apt-get update
sudo apt-get install git vim
sudo apt-get install libc0.3-dev xutils-dev zlib1g-dev

# Get updated headers to prepare for glibc update
cd ~
git clone https://git.savannah.gnu.org/git/hurd/hurd.git
## apply patch for pci: 0001-hurd-PCI-arbiter.patch
cd hurd/hurd
sudo cp pci.defs hurd_types.{h,defs} /usr/include/hurd
sudo chmod o+r /usr/include/hurd/pci.defs

## Add to /usr/include/hurd/paths.h:
#define _SERVERS_BUS_SERVERS "bus"

# Build an updated glibc
cd ~
sudo apt-get build-dep glibc
apt-get source glibc
rm -fr glibc-2.27
git clone https://salsa.debian.org/glibc-team/glibc.git glibc-2.27
## apply my patch
0001-glibc-Add-pci-to-libhurduser-requires-change-to-hurd.patch
tar -xf glibc_2.27.orig.tar.xz
cd glibc-2.27
## Remove debian/sysdeps/hurd-i386.mk ifeq block for xen (dont build xen
port)
DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -us -uc

## install new glibc and locales (*.deb)
## reboot

# Get upstream libpciaccess - patch and install
cd ~
git clone https://gitlab.freedesktop.org/xorg/lib/libpciaccess.git
cd libpciaccess
## apply patch: 0001-libpciaccess-New-module-for-the-Hurd.patch
autoreconf -fi
./configure --prefix=
sudo make install

# Get upstream pciutils - patch and install
cd ~
git clone git://git.kernel.org/pub/scm/utils/pciutils/pciutils.git
## apply 2x patches:
# 0001-pciutils-A-new-module-for-the-Hurd-that-accesses-PCI-bus-usin.patch
# 0002-pciutils-Add-ability-to-detect-GNU-Hurd-when-configuring.patch
./autogen.sh
make
## hack makefile to install to /sbin and headers to /usr/include
sudo apt-get remove pciutils
sudo make install

# Finally, build pci-arbiter and install it
cd ~
mkdir build-hurd
cd build-hurd
../hurd/configure --prefix=
make pci-arbiter
sudo cp pci-arbiter/pci-arbiter /hurd

# Magic
sudo mkdir -p /servers/bus/pci
sudo settrans /servers/bus/pci /hurd/pci-arbiter

sudo /sbin/lspci -A hurd
## nice output

su -
cd /servers/bus/pci//...

#

Cheers,
Damien


upstreaming-pciarbiter.tgz
Description: application/compressed-tar


Re: Running PCI arbiter on stock Debian image

2018-10-29 Thread Samuel Thibault
Hello,

Damien Zammit, le lun. 29 oct. 2018 21:19:57 +1100, a ecrit:
> Please see below and attached tarball with all rebased patches:

Thanks!

That allowed me to take the remaining time to polish & commit it and I'm
uploading it to Debian. I'll then upload a patched glibc and patched
pciutils/libpciaccess on debian-ports for people to easily try them.
(as you mentioned on IRC, netdde seems to be fine with using it)

Samuel



wiki edits: creating a lwip translator page

2018-10-29 Thread Joshua Branson


Hello,

I created an lwip translator webpage.  It mentions that it is a complete
replacement for pfinet, and I tried to add in an example of how to use
it.

But I don't believe my example persists across reboots.

Thanks,

Joshua

>From 17a9ace9753a26c3a4c658a1ecd2baf2e908f94a Mon Sep 17 00:00:00 2001
From: Joshua Branson 
Date: Mon, 29 Oct 2018 14:25:10 -0400
Subject: [PATCH] I created a new lwip translator page.  It is bare minimum,
 and it probably is not completely accurate about how to start the translator.

---
 .../gsoc/project_ideas/tcp_ip_stack.mdwn  |  2 +-
 hurd/translator/lwip.mdwn | 19 +++
 hurd/translator/pfinet.mdwn   |  5 +
 3 files changed, 25 insertions(+), 1 deletion(-)
 create mode 100644 hurd/translator/lwip.mdwn

diff --git a/community/gsoc/project_ideas/tcp_ip_stack.mdwn b/community/gsoc/project_ideas/tcp_ip_stack.mdwn
index b1dbb66d..28c95626 100644
--- a/community/gsoc/project_ideas/tcp_ip_stack.mdwn
+++ b/community/gsoc/project_ideas/tcp_ip_stack.mdwn
@@ -13,7 +13,7 @@ is included in the section entitled
 
 The Hurd presently uses a [[TCP/IP_stack|hurd/translator/pfinet]] based on code from an old Linux version.
 This works, but lacks some rather important features (like PPP/PPPoE), and the
-design is not hurdish at all.  Recently lwip, which is an userspace tcp/ip library,
+design is not hurdish at all.  Recently [[hurd/translator/lwip]], which is an userspace tcp/ip library,
 was ported to the Hurd.  If you are only using an ethernet connection, then it is possible to use
 lwip as a complete replacement for pfinet.  However, lwip uses the netdde device
 drivers for wireless chips, which are old drivers from an old version of linux. To use
diff --git a/hurd/translator/lwip.mdwn b/hurd/translator/lwip.mdwn
new file mode 100644
index ..9d3465b7
--- /dev/null
+++ b/hurd/translator/lwip.mdwn
@@ -0,0 +1,19 @@
+Lwip is a lightweight TCP/IP stack, and a google summer of code made it possible to use lwip to replace pfinet.
+
+The lwip translator provides all of the following:
+
+* Support for IPv4 and IPv6
+* Support for TCP and UDP
+* Support for multiple Ethernet devices
+* Support for fsysopts and command-line parameters configuration
+* Support to create an IP tunnel which may be used by an OpenVPN client
+
+To configure lwip for internet connectivity, use the
+[[`settrans`|settrans]] command, like this:
+
+# settrans -fgap /servers/socket/2 /hurd/lwip ↩
+-i eth0 -a 192.168.0.50 -g 192.168.0.1 -m 255.255.255.0
+
+The argument /server/socket/2 is the node that the translator is to be attached to. This is followed by the translator program to run and any arguments to give it.
+
+There, -i, -a, -g and -m are, quite obviously, the (Mach) device to use, the IP address, the gateway and netmask.
diff --git a/hurd/translator/pfinet.mdwn b/hurd/translator/pfinet.mdwn
index bf535b21..1f4f7e39 100644
--- a/hurd/translator/pfinet.mdwn
+++ b/hurd/translator/pfinet.mdwn
@@ -9,6 +9,11 @@ Sections, no Front-Cover Texts, and no Back-Cover Texts.  A copy of the license
 is included in the section entitled [[GNU Free Documentation
 License|/fdl]]."]]"""]]
 
+Pfinet is a TCP/IP stack from an old linux version.  It works but lacks some important
+features like PPP/PPPoE.  Recently Recently [[hurd/translator/lwip]], which is
+an userspace tcp/ip library, was ported to the Hurd, which can serve as a direct
+replacement for pfinet.
+
 To configure Internet connectivity, the `pfinet` (*Protocol Family Internet*)
 [[translator]] must be configured.  This is done using the
 [[`settrans`|settrans]] command, for example like this:
-- 
2.19.1