summaryrefslogtreecommitdiff
path: root/hurd
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2018-05-09 22:46:31 +0200
committerThomas Schwinge <thomas@codesourcery.com>2018-05-09 22:46:31 +0200
commitdec7cfc3be51acb52bf6dbba4cd0c2be35786d0a (patch)
treea9e3ee41086dceff53369679ab2d7e23b3ac2843 /hurd
parent3581c9cf04f239b8fc6dc0bfa77a818416f70e7f (diff)
parent96dba7ef358153dd1a608ab45f52226d08d62e3c (diff)
Merge commit '96dba7ef358153dd1a608ab45f52226d08d62e3c'
As part of the merge, fix some typos, adjust copyright headers, and apply a few more minor changes.
Diffstat (limited to 'hurd')
-rw-r--r--hurd/glibc.mdwn21
-rw-r--r--hurd/subhurd.mdwn65
2 files changed, 61 insertions, 25 deletions
diff --git a/hurd/glibc.mdwn b/hurd/glibc.mdwn
index 39bfed6..271c0c6 100644
--- a/hurd/glibc.mdwn
+++ b/hurd/glibc.mdwn
@@ -1,5 +1,5 @@
-[[!meta copyright="Copyright © 2007, 2008, 2009, 2010 Free Software Foundation,
-Inc."]]
+[[!meta copyright="Copyright © 2007, 2008, 2009, 2010, 2018 Free Software
+Foundation, Inc."]]
[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
id="license" text="Permission is granted to copy, distribute and/or modify this
@@ -17,3 +17,20 @@ For information about how the glibc integrates into the system, see sections
[[Hurd-specific_API]].
[[Debugging_glibc|debugging/glibc]].
+
+
+# Cross-building
+
+The long-term goal is to get `build-many-glibcs.py` to be able to cross-compile
+glibc. This should be working as per the following:
+
+ $ mkdir -p /tmp/build/src
+ $ cp -a /usr/src/glibc /tmp/build/src/
+ $ unset CFLAGS
+ $ /tmp/build/src/glibc/scripts/build-many-glibcs.py /tmp/build checkout binutils-2.29 gcc-7.1.0
+ $ /tmp/build/src/glibc/scripts/build-many-glibcs.py /tmp/build host-libraries
+ $ /tmp/build/src/glibc/scripts/build-many-glibcs.py /tmp/build compilers i686-gnu
+ $ /tmp/build/src/glibc/scripts/build-many-glibcs.py /tmp/build glibcs i686-gnu
+
+Ideally the master branch builds that way. As of January 2018 the goal is first
+to get the sthibaul/hurd-builds branch building.
diff --git a/hurd/subhurd.mdwn b/hurd/subhurd.mdwn
index 7b6cad6..df64056 100644
--- a/hurd/subhurd.mdwn
+++ b/hurd/subhurd.mdwn
@@ -1,5 +1,5 @@
-[[!meta copyright="Copyright © 2007, 2008, 2010, 2011, 2013, 2014, 2016 Free
-Software Foundation, Inc."]]
+[[!meta copyright="Copyright © 2007, 2008, 2010, 2011, 2013, 2014, 2016, 2017
+Free Software Foundation, Inc."]]
[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
id="license" text="Permission is granted to copy, distribute and/or modify this
@@ -27,12 +27,47 @@ requires a privileged subhurd.
# Howto
-## Preparing
+## Quick hack: Use an existing image
-To run a subhurd, you need an additional partition with an installed Hurd
-system. In principle, you can also use your main partition in read-only mode;
-but this obviously will create severe limitations. Usually, you will want a
-complete independent system.
+You can download a Debian/Hurd image
+[[here|https://people.debian.org/~sthibault/hurd-i386/]] and directly
+boot it:
+
+ $ wget --no-check-certificate https://people.debian.org/~sthibault/hurd-i386/debian-hurd.img.gz
+ $ gunzip debian-hurd.img.gz
+ $ boot --kernel-command-line="fastboot root=pseudo-root" -T typed part:1:file:debian-hurd.img
+
+The 'fastboot' is necessary to skip the filesystem check which fails
+because the image assumes the root filesystem to be /etc/hd0s1. Once
+booted, you can correct this:
+
+ root@debian:~# settrans -c /dev/pseudo-root /hurd/storeio pseudo-root
+ root@debian:~# echo /dev/pseudo-root / ext2 defaults 0 1 >/etc/fstab
+ root@debian:~# halt
+
+From now on, `boot -T typed part:1:file:debian-hurd.img` should suffice.
+
+## Preparing your own image
+
+To run a subhurd, you need an additional partition (or a file) with an
+installed Hurd system. In principle, you can also use your main
+partition in read-only mode; but this obviously will create severe
+limitations. Usually, you will want a complete independent system.
+
+The following instructions assume that the system is installed on
+`/dev/hd0s1`. You can use any partition instead, or in fact just a
+simple file created e.g. using dd.
+
+### Creating a file used as root filesystem for the Subhurd
+
+To create a file `my.image` of size 2 gigabytes, do
+
+ $ dd if=/dev/zero of=my.image bs=1M count=1 seek=2000
+
+(Note that it is currently problematic to create files larger than 2
+gigabytes this way.)
+
+### Using debootstrap
The system for the subhurd is a normal Hurd installation, which could just as
well run standalone. You can use any of the various possible installation
@@ -45,22 +80,6 @@ debootstrap as root:
debootstrap sid mnt/ http://httpredir.debian.org/debian
settrans -fga mnt
-### IRC, freenode, #hurd, 2013-09-15
-
- <gnu_srs> Never dared to try a subhurd, any link to the howto?
- <teythoon> gnu_srs: I followed
- http://www.gnu.org/software/hurd/hurd/subhurd.html though using crosshurd
- didn't work for me, I just used debootstrap
- <teythoon> gnu_srs: and you need a separate filesystem translator (i.e. not
- /) for that
- <teythoon> the easiest way is to add another virtual disk to you qemu setup
- <braunr> use the qemu image directly
- <braunr> simplest way to set up a subhurd
- <braunr> just change fstab from the host before the first boot to avoid
- making the subhurd use the same hd0 drive as the host
- <teythoon> braunr: nice idea :)
-
-
## Booting
If you are using a recent version of the Hurd (>= 0.9), then you can