bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Running PCI arbiter on stock Debian image


From: Damien Zammit
Subject: Running PCI arbiter on stock Debian image
Date: Mon, 29 Oct 2018 21:19:57 +1100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

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/0000/...

#################

Cheers,
Damien

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]