summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Gianelloni <wolf31o2@gentoo.org>2006-06-21 22:11:54 +0000
committerChris Gianelloni <wolf31o2@gentoo.org>2006-06-21 22:11:54 +0000
commit23a452c223e2d78bd90670d0365b9cac1f0d764a (patch)
tree0650ae946b31558ad39b6fa526a331637a4eacb2 /src/catalyst
parentfix from upstream for hidden/weak on alpha targets (diff)
downloadgentoo-23a452c223e2d78bd90670d0365b9cac1f0d764a.tar.gz
gentoo-23a452c223e2d78bd90670d0365b9cac1f0d764a.tar.bz2
gentoo-23a452c223e2d78bd90670d0365b9cac1f0d764a.zip
Added two patches from Joshua Kinard <kumba@gentoo.org> to fix stage1 not having /proc mounted during the preclean stage and also to clean up the netboot2 code. This is 2.0_rc48.
Diffstat (limited to 'src/catalyst')
-rw-r--r--src/catalyst/ChangeLog9
-rw-r--r--src/catalyst/catalyst4
-rw-r--r--src/catalyst/modules/netboot2_target.py7
-rw-r--r--src/catalyst/modules/stage1_target.py14
-rw-r--r--src/catalyst/targets/netboot2/netboot2-copyfile.sh10
-rw-r--r--src/catalyst/targets/support/pre-kmerge.sh3
6 files changed, 34 insertions, 13 deletions
diff --git a/src/catalyst/ChangeLog b/src/catalyst/ChangeLog
index 7cc973cea7..429c0c57d2 100644
--- a/src/catalyst/ChangeLog
+++ b/src/catalyst/ChangeLog
@@ -1,5 +1,12 @@
# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/Attic/ChangeLog,v 1.635 2006/06/20 19:32:31 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/Attic/ChangeLog,v 1.636 2006/06/21 22:11:54 wolf31o2 Exp $
+
+ 21 Jun 2006; Chris Gianelloni <wolf31o2@gentoo.org> catalyst,
+ modules/netboot2_target.py, modules/stage1_target.py,
+ targets/netboot2/netboot2-copyfile.sh, targets/support/pre-kmerge.sh:
+ Added two patches from Joshua Kinard <kumba@gentoo.org> to fix stage1 not
+ having /proc mounted during the preclean stage and also to clean up the
+ netboot2 code. This is 2.0_rc48.
20 Jun 2006; Chris Gianelloni <wolf31o2@gentoo.org>
targets/support/unmerge.sh:
diff --git a/src/catalyst/catalyst b/src/catalyst/catalyst
index b2fa0d4304..bf5bfc0b0c 100644
--- a/src/catalyst/catalyst
+++ b/src/catalyst/catalyst
@@ -1,7 +1,7 @@
#!/usr/bin/python -OO
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/Attic/catalyst,v 1.155 2006/06/09 00:31:51 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/Attic/catalyst,v 1.156 2006/06/21 22:11:54 wolf31o2 Exp $
# Maintained in full by:
# Eric Edgar <rocket@gentoo.org>
@@ -11,7 +11,7 @@ import os,sys,imp,string,getopt
import pdb
__maintainer__="Chris Gianelloni <wolf31o2@gentoo.org>"
-__version__="2.0_rc47"
+__version__="2.0_rc48"
conf_values={}
diff --git a/src/catalyst/modules/netboot2_target.py b/src/catalyst/modules/netboot2_target.py
index b6ef15cb33..462d32b2a3 100644
--- a/src/catalyst/modules/netboot2_target.py
+++ b/src/catalyst/modules/netboot2_target.py
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/Attic/netboot2_target.py,v 1.2 2006/01/20 17:19:42 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/Attic/netboot2_target.py,v 1.3 2006/06/21 22:11:54 wolf31o2 Exp $
"""
Builder class for a netboot build, version 2
@@ -15,7 +15,6 @@ class netboot2_target(generic_stage_target):
self.required_values=[
"boot/kernel",
"netboot2/builddate",
- "netboot2/busybox_config",
"netboot2/packages",
"netboot2/use"
]
@@ -44,10 +43,6 @@ class netboot2_target(generic_stage_target):
# /tmp/image
self.settings["merge_path"]=normpath("/tmp/image")
- for envvar in "CFLAGS", "CXXFLAGS":
- if not os.environ.has_key(envvar) and not addlargs.has_key(envvar):
- self.settings[envvar] = "-Os -pipe"
-
def set_dest_path(self):
if self.settings.has_key("merge_path"):
self.settings["destpath"]=normpath(self.settings["chroot_path"]+self.settings["merge_path"])
diff --git a/src/catalyst/modules/stage1_target.py b/src/catalyst/modules/stage1_target.py
index 5a131d38ee..f82c77fd4c 100644
--- a/src/catalyst/modules/stage1_target.py
+++ b/src/catalyst/modules/stage1_target.py
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/Attic/stage1_target.py,v 1.23 2006/01/29 18:58:03 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/Attic/stage1_target.py,v 1.24 2006/06/21 22:11:54 wolf31o2 Exp $
"""
Builder class for a stage1 installation tarball build.
@@ -20,7 +20,7 @@ class stage1_target(generic_stage_target):
print "stage1 stage path is "+self.settings["stage_path"]
def set_root_path(self):
- # ROOT= variable for emerges
+ # sets the root path, relative to 'chroot_path', of the stage1 root
self.settings["root_path"]=normpath("/tmp/stage1root")
print "stage1 root path is "+self.settings["root_path"]
@@ -59,6 +59,16 @@ class stage1_target(generic_stage_target):
print "\tIf you break it, you buy it. Don't complain to us about it."
print "\tDont say we did not warn you\n"
+ def set_mounts(self):
+ # stage_path/proc probably doesn't exist yet, so create it
+ if not os.path.exists(self.settings["stage_path"]+"/proc"):
+ os.makedirs(self.settings["stage_path"]+"/proc")
+
+ # alter the mount mappings to bind mount proc onto it
+ self.mounts.append("/tmp/stage1root/proc")
+ self.mountmap["/tmp/stage1root/proc"]="/proc"
+
+
def register(foo):
foo.update({"stage1":stage1_target})
return foo
diff --git a/src/catalyst/targets/netboot2/netboot2-copyfile.sh b/src/catalyst/targets/netboot2/netboot2-copyfile.sh
index e8bcd882fc..4a4809c5f5 100644
--- a/src/catalyst/targets/netboot2/netboot2-copyfile.sh
+++ b/src/catalyst/targets/netboot2/netboot2-copyfile.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/netboot2/Attic/netboot2-copyfile.sh,v 1.1 2006/01/13 15:09:07 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/netboot2/Attic/netboot2-copyfile.sh,v 1.2 2006/06/21 22:11:54 wolf31o2 Exp $
. /tmp/chroot-functions.sh
@@ -11,6 +11,14 @@ echo ">>> Copying initramfs files to ${clst_merge_path} (in chroot) ..."
[ ! -d "${clst_merge_path}" ] && mkdir -p ${clst_merge_path}
for f in ${clst_files}
do
+ # copy it to the merge path
cp -af --parents ${f} ${clst_merge_path}
+
+ # if the file is an ELF binary, strip unneeded stuff from it
+ if [ -x "${f}" ] && [ ! -L "${f}" ]; then
+ if [ "$(head -c 4 ${f} 2>/dev/null | tail -c 3)" = "ELF" ]; then
+ strip -R .comment -R .note ${clst_merge_path}${f}
+ fi
+ fi
done
echo ""
diff --git a/src/catalyst/targets/support/pre-kmerge.sh b/src/catalyst/targets/support/pre-kmerge.sh
index 1dba443af3..94012f1ed2 100644
--- a/src/catalyst/targets/support/pre-kmerge.sh
+++ b/src/catalyst/targets/support/pre-kmerge.sh
@@ -39,6 +39,7 @@ case ${clst_target} in
cp -af ${clst_root_path}usr/share/genkernel/netboot/misc/* ${clst_merge_path}
echo ">>> Copying busybox config ..."
- cp -f ${clst_netboot2_busybox_config} /usr/share/genkernel/${clst_mainarch}/busy-config
+ cp -f ${clst_root_path}usr/share/genkernel/${clst_mainarch}/nb-busybox.cf \
+ ${clst_root_path}usr/share/genkernel/${clst_mainarch}/busy-config
;;
esac