commit:     d8303e6a6da6ab34a2d08b04bc026a211e00d2be
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 28 17:19:19 2017 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Thu Dec 28 17:19:19 2017 +0000
URL:        https://gitweb.gentoo.org/proj/grss.git/commit/?id=d8303e6a

grs/Netboot.py: build busybox inside the system chroot

 grs/Netboot.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/grs/Netboot.py b/grs/Netboot.py
index c4bb9ff..62cc17c 100644
--- a/grs/Netboot.py
+++ b/grs/Netboot.py
@@ -73,6 +73,14 @@ class Netboot(HashIt):
         Execute(cmd, timeout=600, logfile=self.logfile, shell=True)
         os.chdir(cwd)
 
+        # 2.5 Don't trust genkernel's busybox, but copy in our own version
+        # built in the system chroot.  This ensures it will work on the
+        # target system.
+        # TODO: We need to make sure that we've linked busybox staticly.
+        busybox_src = os.path.join(self.portage_configroot, 'bin/busybox')
+        busybox_dst = os.path.join(self.kernelroot, 'initramfs/bin/busybox')
+        shutil.copy(busybox_src, busybox_dst)
+
         # 3. Make the squashfs image in the tmpdir directory.
         squashfs_dir = os.path.join(initramfs_root, 'mnt/cdrom')
         shutil.rmtree(squashfs_dir, ignore_errors=True)

Reply via email to