From 02524ab022cb7a26c510d97e25cc3bb12998ff6f Mon Sep 17 00:00:00 2001 From: antrik Date: Wed, 3 Aug 2011 23:05:18 +0200 Subject: mig/building: Refer to the correct Git repo listing, not the dummy --- microkernel/mach/mig/gnu_mig/building.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microkernel/mach/mig/gnu_mig/building.mdwn b/microkernel/mach/mig/gnu_mig/building.mdwn index 6d17e7ef..1712e990 100644 --- a/microkernel/mach/mig/gnu_mig/building.mdwn +++ b/microkernel/mach/mig/gnu_mig/building.mdwn @@ -6,7 +6,7 @@ using a pre-built package, follow these instructions. ## Getting the Source Code You can chose between getting the [sources from the developers' -RCS](http://savannah.gnu.org/git/?group=hurd): +RCS](http://git.savannah.gnu.org/cgit/hurd/): $ git clone git://git.savannah.gnu.org:/srv/git/hurd/mig.git -- cgit v1.2.3 From a66b021e27e1608d192a61cd10027e3d0f5ca522 Mon Sep 17 00:00:00 2001 From: Andrew Engelbrecht Date: Wed, 3 Aug 2011 19:00:35 -0400 Subject: Fixed ../configure options issue/bug --- microkernel/mach/gnumach/building.mdwn | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/microkernel/mach/gnumach/building.mdwn b/microkernel/mach/gnumach/building.mdwn index 8284639b..eb3e0819 100644 --- a/microkernel/mach/gnumach/building.mdwn +++ b/microkernel/mach/gnumach/building.mdwn @@ -72,11 +72,11 @@ GNU Mach and its headers should be built in a subdirectory: Find the path to your GNU Mach sources (`..`) and configure it: - $ ../configure --prefix= + $ ../configure -Use the --host flag on 64 bit systems: +Use the --host flag and some options on 64 bit systems: - $ ../configure --prefix= --host=i686-unknown-linux-gnu + $ CPP='gcc -m32 -E -x c -undef -ansi' CC='gcc -m32' LD='ld -melf_i386' ../configure --host=i686-unknown-linux-gnu Install the header files into e.g. `~/gnu/include/`: @@ -88,26 +88,8 @@ After you've already installed the header files (above), as well as the the Mach Interface Generator, you may finish building GNU Mach. (See [[building_MIG|mig/gnu_mig/building]], then come back here.) -GNU Mach should be built in a subdirectory create it if you have not already. - - $ mkdir gnumach-build - $ cd gnumach-build - -If you previously ran ../configure for installing the header files, you may run -into a bug when you configure and run make below. If that is the case, empty -the _build_ directory, and reconfigure. - - $ cd gnumach-build - $ rm -rf * - -Find the path to your GNU Mach sources (`..`) and configure it: - - $ ../configure - -If you are building on a 64 bit system, do the following instead: - - $ CPP='gcc -m32 -E -x c -undef -ansi' CC='gcc -m32' LD='ld -melf_i386' - $ ../configure --host=i686-unknown-linux-gnu +GNU Mach should be built in the subdirectory created above. If you've cleared +your directory since then, you'll need to rerun the configure script. Build the kernel image: -- cgit v1.2.3 From 57b19ed57280f4642320dcc2b36c8ffe3b28f225 Mon Sep 17 00:00:00 2001 From: Andrew Engelbrecht Date: Wed, 3 Aug 2011 19:09:37 -0400 Subject: no need to "find" what's under your nose --- microkernel/mach/gnumach/building.mdwn | 2 +- microkernel/mach/mig/gnu_mig/building.mdwn | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/microkernel/mach/gnumach/building.mdwn b/microkernel/mach/gnumach/building.mdwn index eb3e0819..4c7cee26 100644 --- a/microkernel/mach/gnumach/building.mdwn +++ b/microkernel/mach/gnumach/building.mdwn @@ -70,7 +70,7 @@ GNU Mach and its headers should be built in a subdirectory: $ mkdir gnumach-build $ cd gnumach-build -Find the path to your GNU Mach sources (`..`) and configure it: +Run configure: $ ../configure diff --git a/microkernel/mach/mig/gnu_mig/building.mdwn b/microkernel/mach/mig/gnu_mig/building.mdwn index 1712e990..031a9b3f 100644 --- a/microkernel/mach/mig/gnu_mig/building.mdwn +++ b/microkernel/mach/mig/gnu_mig/building.mdwn @@ -67,8 +67,8 @@ The Mach Interface Generator should be built in a subdirectory: $ cd mig-build Find the root directory where you installed GNU Mach's header files and where -you now intend to install the Mach Interface Generator (_~/gnu_) and the path -to your Mach Interface Generator sources (../mig) and configure it: +you now intend to install the Mach Interface Generator (_~/gnu_), and run +configure: $ GNU=~/gnu $ TARGET_CPPFLAGS=-I"$GNU"/include ../configure -- cgit v1.2.3 From 4c9e4221fdca00de9a0a8918dacc858819d8ca0c Mon Sep 17 00:00:00 2001 From: Andrew Engelbrecht Date: Wed, 3 Aug 2011 19:12:03 -0400 Subject: generalize mig install instructions --- microkernel/mach/mig/gnu_mig/building.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microkernel/mach/mig/gnu_mig/building.mdwn b/microkernel/mach/mig/gnu_mig/building.mdwn index 031a9b3f..673dcacf 100644 --- a/microkernel/mach/mig/gnu_mig/building.mdwn +++ b/microkernel/mach/mig/gnu_mig/building.mdwn @@ -34,7 +34,7 @@ specified by the source mig package: Change into the directory with the downloaded / unpacked MIG sources (_mig-1.3.1.99_): - $ cd mig-1.3.1.99 + $ cd mig-X.X.X.XX Start the build process: -- cgit v1.2.3 From 32bef600e8063282f5077b08a69f63cc0eb9d591 Mon Sep 17 00:00:00 2001 From: Andrew Engelbrecht Date: Wed, 3 Aug 2011 19:14:09 -0400 Subject: missed a spot --- microkernel/mach/mig/gnu_mig/building.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microkernel/mach/mig/gnu_mig/building.mdwn b/microkernel/mach/mig/gnu_mig/building.mdwn index 673dcacf..9a83e367 100644 --- a/microkernel/mach/mig/gnu_mig/building.mdwn +++ b/microkernel/mach/mig/gnu_mig/building.mdwn @@ -32,7 +32,7 @@ specified by the source mig package: ### Building and Installing ... a _.deb_ file -Change into the directory with the downloaded / unpacked MIG sources (_mig-1.3.1.99_): +Change into the directory with the downloaded / unpacked MIG sources (_mig-SomeVersionNumber): $ cd mig-X.X.X.XX -- cgit v1.2.3 From af52b8b7b4f3c096fd8abed7e901b57f07c419a2 Mon Sep 17 00:00:00 2001 From: Andrew Engelbrecht Date: Wed, 3 Aug 2011 19:30:37 -0400 Subject: Actually, we need '--prefix='. --- microkernel/mach/gnumach/building.mdwn | 4 ++-- microkernel/mach/mig/gnu_mig/building.mdwn | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/microkernel/mach/gnumach/building.mdwn b/microkernel/mach/gnumach/building.mdwn index 4c7cee26..f4c59d9f 100644 --- a/microkernel/mach/gnumach/building.mdwn +++ b/microkernel/mach/gnumach/building.mdwn @@ -72,11 +72,11 @@ GNU Mach and its headers should be built in a subdirectory: Run configure: - $ ../configure + $ ../configure --prefix= Use the --host flag and some options on 64 bit systems: - $ CPP='gcc -m32 -E -x c -undef -ansi' CC='gcc -m32' LD='ld -melf_i386' ../configure --host=i686-unknown-linux-gnu + $ CPP='gcc -m32 -E -x c -undef -ansi' CC='gcc -m32' LD='ld -melf_i386' ../configure --prefix= --host=i686-unknown-linux-gnu Install the header files into e.g. `~/gnu/include/`: diff --git a/microkernel/mach/mig/gnu_mig/building.mdwn b/microkernel/mach/mig/gnu_mig/building.mdwn index 9a83e367..d5268221 100644 --- a/microkernel/mach/mig/gnu_mig/building.mdwn +++ b/microkernel/mach/mig/gnu_mig/building.mdwn @@ -71,7 +71,7 @@ you now intend to install the Mach Interface Generator (_~/gnu_), and run configure: $ GNU=~/gnu - $ TARGET_CPPFLAGS=-I"$GNU"/include ../configure + $ TARGET_CPPFLAGS=-I"$GNU"/include ../configure --prefix="$GNU" The --host flag is necessary if you are building on a 64 bit machine: -- cgit v1.2.3 From e0f350c7d6e3af901097e43fe2c1bc0efb237f60 Mon Sep 17 00:00:00 2001 From: Andrew Engelbrecht Date: Wed, 3 Aug 2011 19:45:28 -0400 Subject: rename build directories to 'build' --- microkernel/mach/gnumach/building.mdwn | 4 ++-- microkernel/mach/mig/gnu_mig/building.mdwn | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/microkernel/mach/gnumach/building.mdwn b/microkernel/mach/gnumach/building.mdwn index f4c59d9f..490c5497 100644 --- a/microkernel/mach/gnumach/building.mdwn +++ b/microkernel/mach/gnumach/building.mdwn @@ -67,8 +67,8 @@ First, create the configuartion files: GNU Mach and its headers should be built in a subdirectory: - $ mkdir gnumach-build - $ cd gnumach-build + $ mkdir build + $ cd build Run configure: diff --git a/microkernel/mach/mig/gnu_mig/building.mdwn b/microkernel/mach/mig/gnu_mig/building.mdwn index d5268221..4d4be660 100644 --- a/microkernel/mach/mig/gnu_mig/building.mdwn +++ b/microkernel/mach/mig/gnu_mig/building.mdwn @@ -63,8 +63,8 @@ First, generate the configuration files: The Mach Interface Generator should be built in a subdirectory: - $ mkdir mig-build - $ cd mig-build + $ mkdir build + $ cd build Find the root directory where you installed GNU Mach's header files and where you now intend to install the Mach Interface Generator (_~/gnu_), and run -- cgit v1.2.3 From 9441f7dc189d8489f13b9072b866aa75f9409d0f Mon Sep 17 00:00:00 2001 From: antrik Date: Thu, 4 Aug 2011 02:43:29 +0200 Subject: mach/building: Rearrange bit about installing header files Instead of treating all the build preparations as part of the header install, make them part of the general build instructions; and only separately mention the specific bit about actually installing the headers. This should make the overall build process easier to follow; and also makes it clearer which bit can be left out if installing the headers is not necessary. --- microkernel/mach/gnumach/building.mdwn | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/microkernel/mach/gnumach/building.mdwn b/microkernel/mach/gnumach/building.mdwn index 490c5497..5f53d83d 100644 --- a/microkernel/mach/gnumach/building.mdwn +++ b/microkernel/mach/gnumach/building.mdwn @@ -55,11 +55,6 @@ You can now reboot your computer and enjoy the new kernel. Building GNU Mach requires a C compiler, a _static_ 32 bit standard C library and your favourite flavor of awk (gawk) and GNU make. -### Installing the Header Files First - -In order to build GNU Mach, you must build and install MIG, which requires that -you install the GNU Mach header files: - First, create the configuartion files: $ cd gnumach @@ -78,7 +73,10 @@ Use the --host flag and some options on 64 bit systems: $ CPP='gcc -m32 -E -x c -undef -ansi' CC='gcc -m32' LD='ld -melf_i386' ../configure --prefix= --host=i686-unknown-linux-gnu -Install the header files into e.g. `~/gnu/include/`: +### Installing the Header Files First + +In order to build GNU Mach, you must build and install MIG, which requires that +you install the GNU Mach header files, for example into `~/gnu/include/`: $ make DESTDIR=~/gnu install-data -- cgit v1.2.3 From 358bc1d0e781b7237b2fee394f7fae2bfcd7b078 Mon Sep 17 00:00:00 2001 From: antrik Date: Thu, 4 Aug 2011 07:14:40 +0200 Subject: mach/building: Reword for clarity --- microkernel/mach/gnumach/building.mdwn | 39 ++++++++++++++---------------- microkernel/mach/mig/gnu_mig/building.mdwn | 25 +++++++++---------- 2 files changed, 30 insertions(+), 34 deletions(-) diff --git a/microkernel/mach/gnumach/building.mdwn b/microkernel/mach/gnumach/building.mdwn index 5f53d83d..b513d52f 100644 --- a/microkernel/mach/gnumach/building.mdwn +++ b/microkernel/mach/gnumach/building.mdwn @@ -12,7 +12,7 @@ You can either use the git repository (see Preparing for the Build -Building the Mach Interface Generator requires the _build-essential_ and -_fakeroot_ packages, their dependencies and additional packages that are -specified by the source mig package: +Building MIG requires the *build-essential* and *fakeroot* packages, +and some additional dependencies specified by the mig source package: # apt-get install build-essential fakeroot # apt-get build-dep mig ### Building and Installing ... a _.deb_ file -Change into the directory with the downloaded / unpacked MIG sources (_mig-SomeVersionNumber): +Change into the directory with the downloaded / unpacked MIG sources: $ cd mig-X.X.X.XX @@ -40,15 +39,15 @@ Start the build process: $ dpkg-buildpackage -us -uc -b -rfakeroot -You can then install / distribute the _.deb_ file which will drop out one -directory above the current one. +This will create a _.deb_ package in the parent directory, +which you can then install on your system. ## On non-Debian Systems: ### Preparing for the Build Building the Mach Interface Generator requires a C compiler, a standard 32 bit -C library (with corresponding header files) and your favourite flavor of awk +C library (with corresponding header files), your favourite flavor of awk (gawk), yacc (bison), lex (flex) and make. Additionally, you need to have GNU Mach's header files installed. See @@ -61,24 +60,24 @@ First, generate the configuration files: $ cd mig $ autoreconf --install -The Mach Interface Generator should be built in a subdirectory: +The Mach Interface Generator has to be built in a separate build directory: $ mkdir build $ cd build -Find the root directory where you installed GNU Mach's header files and where -you now intend to install the Mach Interface Generator (_~/gnu_), and run +Find the base directory where you installed GNU Mach's header files and where +you now intend to install the Mach Interface Generator (e.g. _~/gnu_), and run configure: $ GNU=~/gnu $ TARGET_CPPFLAGS=-I"$GNU"/include ../configure --prefix="$GNU" -The --host flag is necessary if you are building on a 64 bit machine: +If you are building on a 64 bit machine, you need to add a --host option: $ GNU=~/gnu $ TARGET_CPPFLAGS=-I"$GNU"/include ../configure --prefix="$GNU" --host=i686-unknown-linux-gnu -Build and install the Mach Interface Generator into _$GNU_, i.e. _~/gnu/_ in our example: +Build and install the Mach Interface Generator into _$GNU_ (i.e. _~/gnu/_ in our example): $ make all install -- cgit v1.2.3 From b9ba15c091304bb033ca26036cf6a96819b0b602 Mon Sep 17 00:00:00 2001 From: antrik Date: Thu, 4 Aug 2011 09:34:13 +0200 Subject: mach/building: Fix Git repo URL here as well --- microkernel/mach/gnumach/building.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microkernel/mach/gnumach/building.mdwn b/microkernel/mach/gnumach/building.mdwn index b513d52f..ebf0e1d7 100644 --- a/microkernel/mach/gnumach/building.mdwn +++ b/microkernel/mach/gnumach/building.mdwn @@ -8,7 +8,7 @@ enabled) is around 50 MiB. ## Getting the Source Code -You can either use the git repository (see ), +You can either use the git repository (see ), $ git clone git.savannah.gnu.org:/srv/git/hurd/gnumach.git -- cgit v1.2.3 From 71b7e48fbe38f9238ee764513f4701b135d14fe8 Mon Sep 17 00:00:00 2001 From: antrik Date: Thu, 4 Aug 2011 09:36:15 +0200 Subject: mach/building: Some more rewording Slipped through in last commit... --- microkernel/mach/gnumach/building.mdwn | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/microkernel/mach/gnumach/building.mdwn b/microkernel/mach/gnumach/building.mdwn index ebf0e1d7..0a9e328c 100644 --- a/microkernel/mach/gnumach/building.mdwn +++ b/microkernel/mach/gnumach/building.mdwn @@ -23,9 +23,8 @@ Please see the Debian [[running/debian/FAQ]] before using `apt-get source`. ### Preparing for the Build -Building GNU Mach requires the *build-essential* and *fakeroot* packages, their -dependencies and additional packages that are specified by the source gnumach -package: +Building GNU Mach requires the *build-essential* and *fakeroot* packages, +and some additional dependencies specified by the gnumach source package: # apt-get install build-essential fakeroot # apt-get build-dep gnumach -- cgit v1.2.3 -- cgit v1.2.3 From ef0baf74357b7db4c094c5103e3d17599f46b6d1 Mon Sep 17 00:00:00 2001 From: Andrew Engelbrecht Date: Thu, 4 Aug 2011 18:30:02 -0400 Subject: It's a good idea to backup prev. gnumach.gz --- microkernel/mach/gnumach/building.mdwn | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/microkernel/mach/gnumach/building.mdwn b/microkernel/mach/gnumach/building.mdwn index 0a9e328c..ecaae7f8 100644 --- a/microkernel/mach/gnumach/building.mdwn +++ b/microkernel/mach/gnumach/building.mdwn @@ -95,6 +95,7 @@ Optionally run the (tiny) test suite: $ make check -The resulting kernel binary can now be moved into place -(just copy `gnumach.gz`, typically to `/boot/gnumach.gz`), -so you can boot your system with the new kernel. +The resulting kernel binary can now be moved into place (just copy +`gnumach.gz`, typically to `/boot/gnumach.gz`), so you can boot your system +with the new kernel. It is a good idea to make a backup of the previously +installed binary, in case you need to recover. -- cgit v1.2.3 From 6ac278617dd6e5801577dc35cd9738579ecce8cb Mon Sep 17 00:00:00 2001 From: Andrew Engelbrecht Date: Thu, 4 Aug 2011 21:56:40 -0400 Subject: gnumach/build: expanded backup and install --- microkernel/mach/gnumach/building.mdwn | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/microkernel/mach/gnumach/building.mdwn b/microkernel/mach/gnumach/building.mdwn index ecaae7f8..24a73608 100644 --- a/microkernel/mach/gnumach/building.mdwn +++ b/microkernel/mach/gnumach/building.mdwn @@ -95,7 +95,14 @@ Optionally run the (tiny) test suite: $ make check -The resulting kernel binary can now be moved into place (just copy -`gnumach.gz`, typically to `/boot/gnumach.gz`), so you can boot your system -with the new kernel. It is a good idea to make a backup of the previously -installed binary, in case you need to recover. +It's a good idea to make a backup of the previously installed kernel, in case +you can't boot using the new one. That way, you can restore it after booting +from a rescue media (or mounting the disk image used by your vm). + + # cp /boot/gnumach.gz /boot/gnumach.gz.bak + +GNU Mach can now be moved into place, typically `/boot/gnumach.gz`, so that you +can boot your system with the new kernel. + + # cp gnumach.gz /boot + -- cgit v1.2.3