From 60c05517628c456470c3138276f4c681aff58752 Mon Sep 17 00:00:00 2001 From: sin Date: Thu, 13 Feb 2014 14:23:43 +0000 Subject: [PATCH] Add arch-rootfs build script --- pkgs/arch-rootfs | 18 ++++++++++++++++++ stuff/enter-emul | 9 +++++++++ 2 files changed, 27 insertions(+) create mode 100644 pkgs/arch-rootfs create mode 100755 stuff/enter-emul diff --git a/pkgs/arch-rootfs b/pkgs/arch-rootfs new file mode 100644 index 0000000..5e3ad15 --- /dev/null +++ b/pkgs/arch-rootfs @@ -0,0 +1,18 @@ +url=$mirror/arch-rootfs.tar.gz + +fetch() { + wget -c $url -O src/arch-rootfs.tar.gz +} + +unpack() { + pushd src + [ -d root.x86_64 ] || tar xzf arch-rootfs.tar.gz + popd +} + +install() { + pushd src + cp -arP root.x86_64/* $root/emul + popd + cp stuff/enter-emul $root/bin +} diff --git a/stuff/enter-emul b/stuff/enter-emul new file mode 100755 index 0000000..24d73a1 --- /dev/null +++ b/stuff/enter-emul @@ -0,0 +1,9 @@ +#!/bin/sh + +cp /etc/resolv.conf /emul/etc/resolv.conf +mount -B /proc /emul/proc +mount -B /sys /emul/sys +mount -B /dev /emul/dev +mount -B /dev/pts /emul/dev/pts + +chroot /emul /bin/sh -l