From 23c5e6f602aac0256e2eb33b3695e3270eed72e1 Mon Sep 17 00:00:00 2001
From: freesource
Date: Mon, 16 Dec 2002 03:46:53 +0000
Subject: [PATCH] Have the whole uml kernel, modules, tools, and genext2fs
properly compiling now that a new binutils was installed. Now need to make
the helper_root_fs and Initrd with the uml kernel which was just made and
should be just about there. This will all be done as non-root.
Initrd.gz stuff is now set-up. This is nice.
---
Makefile | 1 +
Makefile.pkg | 14 +++++++++-----
doc/html/index.html | 5 ++---
gbootroot_pkg | 35 ++++++++++++++++++++++++++++++++---
4 files changed, 44 insertions(+), 11 deletions(-)
diff --git a/Makefile b/Makefile
index 28d6b83..cb359b7 100644
--- a/Makefile
+++ b/Makefile
@@ -27,6 +27,7 @@ install:
chmod 0444 yard/templates/*.yard
cp -fa yard/templates/Example* /usr/share/gbootroot/yard/templates
cp -fa yard/templates/Helper.yard /usr/share/gbootroot/yard/templates
+ cp -fa yard/templates/Helper.yard /usr/share/gbootroot/yard/templates
install -d /usr/share/gbootroot/genext2fs
cp -fa genext2fs/genext2fs.c /usr/share/gbootroot/genext2fs
cp -fa genext2fs/Makefile /usr/share/gbootroot/genext2fs
diff --git a/Makefile.pkg b/Makefile.pkg
index b85ec20..863dd06 100644
--- a/Makefile.pkg
+++ b/Makefile.pkg
@@ -90,6 +90,8 @@ kernel:
fi;
cp $(KERNEL_DIR)/.config $(KCONFIG)
+
+
modules:
cd linux-$(VERSION) ; \
mkdir ../modules-2.4 ; \
@@ -112,19 +114,20 @@ modules:
rm -rf modules-2.4
cd modules-2.2 ; tar cf ../modules-2.2.tar .
rm -rf modules-2.2
- mv modules*tar $(BASE_DIR)/user-mode-linux/usr/lib/uml
+ mv -f modules*tar $(BASE_DIR)/user-mode-linux/usr/lib/uml
+ cp -fa $(BASE_DIR)/linux-$(VERSION)/drivers/mtd/devices/blkmtd.o $(BASE_DIR)/yard/replacements/usr/src/linux-um/drivers/mtd/devices/blkmtd.o
+ cp -fa $(BASE_DIR)/linux-$(VERSION)/drivers/mtd/devices/mtdram.o $(BASE_DIR)/yard/replacements/usr/src/linux-um/drivers/mtd/devices/mtdram.o
tools:
for d in $(TOOLS) ; do $(MAKE) -C $$d all ; done
for d in $(TOOLS) ; do $(MAKE) -C $$d install DESTDIR=$(BASE_DIR)/user-mode-linux; done
-mkfs:
+genext2fs:
@if [ ! -f $(GENEXT2_DIR)/genext2fs ] ; then \
$(MAKE) -C $(GENEXT2_DIR); \
fi;
-
install:
install -d $(DESTDIR)/usr/bin
cp -fa gbootroot $(DESTDIR)/usr/bin/gbootroot
@@ -148,7 +151,8 @@ install:
cp -fa user-mode-linux/usr/lib/uml/port-helper $(DESTDIR)/usr/lib/uml/port-helper
install -d $(DESTDIR)/usr/share/gbootroot/yard/templates
cp -fa yard/templates/Example* $(DESTDIR)/usr/share/gbootroot/yard/templates
- cp -fa yard/templates/Helper.yard $(DESTDIR)/usr/share/gbootroot/yard/templates
+ cp -fa yard/templates/Helper.yard $(DESTDIR)/usr/share/gbootroot/yard/templates
+ cp -fa yard/templates/Initrd.yard $(DESTDIR)/usr/share/gbootroot/yard/templates
install -d $(DESTDIR)/usr/share/gbootroot/genext2fs
cp -fa genext2fs/genext2fs.c $(DESTDIR)/usr/share/gbootroot/genext2fs
cp -fa genext2fs/Makefile $(DESTDIR)/usr/share/gbootroot/genext2fs
@@ -182,4 +186,4 @@ remove:
rm /usr/X11R6/include/X11/pixmaps/gbootroot.xpm
rm -rf /usr/share/doc/gbootroot
-.PHONY: tools sources
\ No newline at end of file
+.PHONY: tools sources genext2fs
\ No newline at end of file
diff --git a/doc/html/index.html b/doc/html/index.html
index ece0f8d..eda4d6e 100644
--- a/doc/html/index.html
+++ b/doc/html/index.html
@@ -3,7 +3,7 @@
-$Id: index.html,v 1.101 2002/05/04 22:11:32 freesource Exp $
+$Id: index.html,v 1.102 2002/05/04 22:31:37 freesource Exp $
@@ -167,8 +167,7 @@ or on again. At times it may be advantageous to turn off the
verbosity box
since large quantities of output to this box may cause gbootroot to use too
much cpu power; however, output may still be found in the text file "verbose"
-in /tmp/gbootroot_tmp'time-date' or /tmp/gboot_non_root_`id -u` for
-normal users.
+in /tmp/gboot_non_root_`id -u`.
diff --git a/gbootroot_pkg b/gbootroot_pkg
index e21de8e..6aec70a 100755
--- a/gbootroot_pkg
+++ b/gbootroot_pkg
@@ -52,6 +52,7 @@ my $urgency = "low";
#my $group = "utils";
#my $priority = "optional";
my $gbootroot_cvs = "$user_home/gbootroot/gbootroot";
+my $gbootroot_cvs_rep = "$gbootroot_cvs/yard/replacements";
my $packaging_place = "$user_home/gbootroot/PACKAGING";
my $packaging_place_orig = $packaging_place;
my $packaging_defaults = "$gbootroot_cvs/pkg/dpkg";
@@ -59,6 +60,7 @@ my $email = "freesource\@users.sourceforge.net";
my $name = "Jonathan Rosenbaum";
my $makefile = "Makefile.pkg";
+
# RPM stuff - a filelist is used
my $rpm_packaging_place = "$gbootroot_cvs/pkg/rpm";
my $SPECS = "/usr/src/rpm/SPECS";
@@ -89,13 +91,41 @@ close(CVS);
$packaging_place = "$packaging_place/$prog-$version";
+my $packaging_place_rep = "$packaging_place/yard/replacements";
# Do we want a deb, rpm or both
if (!( $ARGV[0] eq "both" || $ARGV[0] eq "deb" || $ARGV[0] eq "rpm" ||
- $ARGV[0] eq "src" ) ) {
+ $ARGV[0] eq "src" || $ARGV[0] eq "cvs" ) ) {
+
+ die "Specify: both, deb, or rpm or src or cvs\n";
+
+}
+
+
+# Here's where we get to copy over all the pristine sources from the build
+if ( -e $packaging_place) {
+
+# sources
+system "cp -a $packaging_place/sources/* $gbootroot_cvs/sources/";
+
+# modules
+system "cp -a $packaging_place_rep/usr/src/linux-um/drivers/mtd/devices/blkmtd.o $gbootroot_cvs_rep/usr/src/linux-um/drivers/mtd/devices/blkmtd.o";
+system "cp -a $packaging_place_rep/usr/src/linux-um/drivers/mtd/devices/mtdram.o $gbootroot_cvs_rep/usr/src/linux-um/drivers/mtd/devices/mtdram.o";
+system "cp -a $packaging_place/user-mode-linux/usr/lib/uml/modules* $gbootroot_cvs/user-mode-linux/usr/lib/uml/";
+
+# tools & kernel
+system "cp -a $packaging_place/user-mode-linux/usr/lib/uml/port-helper $gbootroot_cvs/user-mode-linux/usr/lib/uml/port-helper";
+system "cp -a $packaging_place/user-mode-linux/usr/bin/* $gbootroot_cvs/user-mode-linux/usr/bin/";
+
+# kernel config
+ system "cp -a $packaging_place/user-mode-linux/usr/lib/uml/config $gbootroot_cvs/user-mode-linux/usr/lib/uml/";
+
+# genext2fs
+system "cp -a $packaging_place/genext2fs/genext2fs $gbootroot_cvs/genext2fs/genext2fs";
+
- die "Specify: both, deb, or rpm or src\n";
+exit;
}
@@ -156,7 +186,6 @@ system "cp -fa $makefile $packaging_place/Makefile";
system "cp -fa README $packaging_place/README";
system "cp -fa user-mode-linux/usr/lib/uml/cramfs-vfs-order.patch $packaging_place/user-mode-linux/usr/lib/uml/cramfs-vfs-order.patch";
system "ln -sf $packaging_place/yard/replacements $packaging_place/yard/Replacements";
-mkdir("$packaging_place/linux");
mkdir("$packaging_place/sources");
# Now we get to clean out any CVS directories and make sure that the