From 0067a7a5fc01e9407ec0c9d18477bfa8bc86c8a7 Mon Sep 17 00:00:00 2001 From: freesource Date: Wed, 12 Feb 2003 07:02:34 +0000 Subject: [PATCH] Added a configure script to handle skas-or-tt for now, since editing in place wasn't such a good idea. --- Makefile.pkg | 21 ++++++------------- README | 16 +++++++------- .../replacements/root/setup-debian-X11 | 9 ++------ gbootroot_pkg | 4 +++- pkg/dpkg/gbootroot/rules | 1 + pkg/rpm/gbootroot-mdk.spec | 1 + pkg/rpm/gbootroot.spec | 1 + 7 files changed, 23 insertions(+), 30 deletions(-) diff --git a/Makefile.pkg b/Makefile.pkg index 2073e61..e6d2322 100644 --- a/Makefile.pkg +++ b/Makefile.pkg @@ -25,11 +25,10 @@ KCONFIG=$(BASE_DIR)/user-mode-linux/usr/lib/uml/$(KCONFIG_FILE) # Genext2fs GENEXT2_DIR=$(BASE_DIR)/genext2fs -# skas-or-tt .. MODE is automatically figured out, and added as an +# skas-or-tt .. MODE is figured out bu configure, and added as an # uml-options for CLI. SKAS_OR_TT_DIR=$(BASE_DIR)/skas-or-tt -# Seems some versions of bash don't like the variable changed on the fly -#MODE=tt +MODE=tt # Utilities UTILITIES=uml_utilities_$(UTIL_VER).tar.bz2 @@ -40,14 +39,6 @@ TOOLS = $(UTIL_DIR)/mconsole $(UTIL_DIR)/port-helper $(UTIL_DIR)/moo $(UTIL_DIR) all: world world: sources initrd -skas-or-tt: - @if [ ! -f $(SKAS_OR_TT_DIR)/skas-or-tt ] ; then \ - $(MAKE) -C $(SKAS_OR_TT_DIR); \ - strip -s $(SKAS_OR_TT_DIR)/skas-or-tt; \ - fi; - perl -e 'open(IT,"skas-or-tt/skas-or-tt|") or die "Trouble opening skas-or-tt/skas-or-tt\n"; while () { if (!m,not found$$,) { $$it = "skas"; } else { $$it = "tt"; } } system "perl -pi.bak -e \"s/=MODE/=skas/g\" Makefile" if $$it eq "skas"; system "perl -pi.bak -e \"s/=MODE/=tt/g\" Makefile" if $$it eq "tt"; ' - - sources: @if [ ! -e $(SOURCE_DIR)/$(KERNEL_SOURCE) ] ; then \ while [ ! -f $(SOURCE_DIR)/$(KERNEL_SOURCE) ] ; do \ @@ -104,21 +95,21 @@ kernel: -root_fs_helper: skas-or-tt genext2fs +root_fs_helper: genext2fs @if [ ! -f $(ROOT_FS_DIR)/root_fs_helper ] ; then \ - perl -I . ./gbootroot --home . --template Helper.yard --root-filename root_fs_helper --filesystem-command "genext2fs -z -r0" --genext2fs-dir genext2fs/ --uml-options mode=MODE; \ + perl -I . ./gbootroot --home . --template Helper.yard --root-filename root_fs_helper --filesystem-command "genext2fs -z -r0" --genext2fs-dir genext2fs/ --uml-options mode=$(MODE); \ cp -fa $(TMP)/root_fs_helper $(ROOT_FS_DIR) ; \ fi; @if [ -f $(ROOT_FS_DIR)/root_fs_helper ] ; then \ - perl -I. ./gbootroot --home . --template Helper.yard --root-filename root_fs_helper --filesystem-command mkcramfs --uml-exclusively on --expect-program ./expect_uml --uml-kernel user-mode-linux/usr/bin/linuxbr --root-fs-helper root_filesystem/root_fs_helper --uml-options mode=MODE; \ + perl -I. ./gbootroot --home . --template Helper.yard --root-filename root_fs_helper --filesystem-command mkcramfs --uml-exclusively on --expect-program ./expect_uml --uml-kernel user-mode-linux/usr/bin/linuxbr --root-fs-helper root_filesystem/root_fs_helper --uml-options mode=$(MODE); \ cp -fa $(TMP)/root_fs_helper_cramfs $(ROOT_FS_DIR)/root_fs_helper; \ fi; initrd: modules root_fs_helper @if [ ! -f $(ROOT_FS_DIR)/Initrd.gz ] ; then \ - perl -I. ./gbootroot --home . --template Initrd.yard --root-filename Initrd --uml-exclusively on --expect-program ./expect_uml --uml-kernel user-mode-linux/usr/bin/linuxbr --root-fs-helper root_filesystem/root_fs_helper --filesystem-size 4096 --uml-options mode=MODE; \ + perl -I. ./gbootroot --home . --template Initrd.yard --root-filename Initrd --uml-exclusively on --expect-program ./expect_uml --uml-kernel user-mode-linux/usr/bin/linuxbr --root-fs-helper root_filesystem/root_fs_helper --filesystem-size 4096 --uml-options mode=$(MODE); \ gzip -c9 $(TMP)/Initrd > $(ROOT_FS_DIR)/Initrd.gz; \ fi; diff --git a/README b/README index 186f151..a77054c 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -$Id: README,v 1.20 2003/02/10 17:38:47 freesource Exp $ +$Id: README,v 1.21 2003/02/11 03:51:12 freesource Exp $ Program: gBootRoot pronounced "bOOtrOOt" License: GNU General Public License @@ -17,16 +17,18 @@ You will want wget installed because the Makefile attempts to download the necessary sources and then places them in the sources/ directory. This is what makes the unofficial Debian and RedHat source packages unique, because usually another package would provide the necessary -sources since official distributions aren't always used online. On the -other hand, this is a FEATURE. Anytime you want to update gbootroot -to the current user-mode-linux patch just change the Makefile -PATCH_VERSION, run "make clean", and then "make". +sources since official distributions aren't always used online. On +the other hand, this is a FEATURE. Anytime you want to update +gbootroot to the current user-mode-linux patch just change the +Makefile PATCH_VERSION, run ./configure, run "make clean", and then +"make". If this is your first time making gbootroot from the source +package just run ./configure and "make". The two root_fs created are root_fs_helper and Initrd.gz. Root_fs_helper has lots of different filesystem utilities, but the CRUCIAL ones to get the build to work properly are mke2fs and -mkcramfs. Here's a list of what utilities are included: mke2fs mkcramfs -genromfs mkfs.minix mkminix mkreiserfs mkfs.jffs mkfs.jffs2 +mkcramfs. Here's a list of what utilities are included: mke2fs +mkcramfs genromfs mkfs.minix mkminix mkreiserfs mkfs.jffs mkfs.jffs2 These are the build-depends from the Debian source package that can be used as a guide for other distributions: binutils (>= 2.12.90.0), diff --git a/add-ons/yard/make-debian-X11/replacements/root/setup-debian-X11 b/add-ons/yard/make-debian-X11/replacements/root/setup-debian-X11 index e0cbb6b..b3e6bcd 100755 --- a/add-ons/yard/make-debian-X11/replacements/root/setup-debian-X11 +++ b/add-ons/yard/make-debian-X11/replacements/root/setup-debian-X11 @@ -1,6 +1,6 @@ #!/bin/bash -# $Id: setup-debian-X11,v 1.7 2001/12/06 18:36:05 freesource Exp $ +# $Id: setup-debian-X11,v 1.8 2001/12/16 09:57:02 freesource Exp $ # make_debian-X11 replacement # This is usually enough for a minimalistic system @@ -15,12 +15,7 @@ dpkg-reconfigure make-debian-x11 chown -v -R user:user /home/user chmod 1777 /tmp - -# swim --initdb - -# Generally a good idea since user-mode-linux doesn't run within itself. -#rm /usr/bin/uml_* -#rm /usr/bin/linux +chmod 1777 /var/tmp /etc/cron.daily/find diff --git a/gbootroot_pkg b/gbootroot_pkg index f858395..67006bd 100755 --- a/gbootroot_pkg +++ b/gbootroot_pkg @@ -206,8 +206,9 @@ foreach (@make_lines) { } } -# Stuff not in the Makefile +# Stuff not in the Makefilex system "cp -fa $makefile $packaging_place/Makefile"; +system "cp -fa configure $packaging_place/configure"; # Basically this is stuff we want in the source package, but not the normal # package @@ -455,6 +456,7 @@ if ( $ARGV[0] eq "both" || $ARGV[0] eq "rpm" ) { # For now will just use one definite place for SOURCES my $filelist = "pkg/rpm"; system "cp $gbootroot_cvs/gbootroot.xpm $SOURCES"; + system "cp $gbootroot_cvs/Makefile.pkg $packaging_place/Makefile system "cp $rpm_packaging_place/$package $SPECS"; system "install -d $packaging_place/$filelist"; system "cp $rpm_packaging_place/filelist $packaging_place/$filelist"; diff --git a/pkg/dpkg/gbootroot/rules b/pkg/dpkg/gbootroot/rules index 545a9d8..cb411b5 100755 --- a/pkg/dpkg/gbootroot/rules +++ b/pkg/dpkg/gbootroot/rules @@ -20,6 +20,7 @@ build-stamp: dh_testdir # Add here commands to compile the package. + ./configure $(MAKE) #/usr/bin/docbook-to-man debian/gbootroot.sgml > gbootroot.1 diff --git a/pkg/rpm/gbootroot-mdk.spec b/pkg/rpm/gbootroot-mdk.spec index ddac818..4f7fe3a 100644 --- a/pkg/rpm/gbootroot-mdk.spec +++ b/pkg/rpm/gbootroot-mdk.spec @@ -106,6 +106,7 @@ if [ ! -e $RPM_BUILD_DIR/%{build_dir}/sources/%{utilities} ] ; then fi; %build +./configure make %install diff --git a/pkg/rpm/gbootroot.spec b/pkg/rpm/gbootroot.spec index 7313561..3dd41e6 100644 --- a/pkg/rpm/gbootroot.spec +++ b/pkg/rpm/gbootroot.spec @@ -105,6 +105,7 @@ fi; %build +./configure make %install