cozybit/distro11s — pull request #15 by minshallj (2013-08-19 22:31:47+00:00)
Title: Allows arm-chroot staging to be built, only uses debian-rootfs.sh when building

``` diff
From 76c7cafc07145af8792bf6457e22d1a9261700fb Mon Sep 17 00:00:00 2001
From: Jacob Minshall
Date: Sun, 28 Jul 2013 16:19:25 -0700
Subject: [PATCH] working debootstrap for arm

---
board/arm-chroot/arm-chroot.conf | 3 +++
board/arm-chroot/pkglist | 1 +
scripts/debian-rootfs.sh | 14 +++++++++++++-
3 files changed, 17 insertions(+), 1 deletion(-)
create mode 100644 board/arm-chroot/arm-chroot.conf
create mode 100644 board/arm-chroot/pkglist

diff --git a/board/arm-chroot/arm-chroot.conf b/board/arm-chroot/arm-chroot.conf
new file mode 100644
index 0000000..0c1333e
--- /dev/null
+++ b/board/arm-chroot/arm-chroot.conf
@@ -0,0 +1,3 @@
+
+BOARD11S_PACKAGES=${BOARD11S_COMMON_PACKAGES}" sshfs time iw"
+BOARD11S_BUILDDEP_PACKAGES=${BOARD11S_COMMON_BUILDDEP_PACKAGES}""
diff --git a/board/arm-chroot/pkglist b/board/arm-chroot/pkglist
new file mode 100644
index 0000000..ab81ff3
--- /dev/null
+++ b/board/arm-chroot/pkglist
@@ -0,0 +1 @@
+debian-rootfs;;;;
diff --git a/scripts/debian-rootfs.sh b/scripts/debian-rootfs.sh
index 699b7ca..fac0330 100755
--- a/scripts/debian-rootfs.sh
+++ b/scripts/debian-rootfs.sh
@@ -4,7 +4,19 @@ if [ ! -e ${STAMPS}/debian-rootfs.bootstrapped -o ${FORCE_BUILD} -eq 1 ]; then
root_check "This script runs debootstrap in ${STAGING}"
echo "Populating base rootfs with debian"
sudo rm -rf ${STAGING}/*
-	sudo debootstrap sid ${STAGING} http://ftp.debian.org/debian || exit 1
+	case ${DISTRO11S_BOARD} in
+	zotac | qemu)
+	sudo debootstrap sid ${STAGING} http://ftp.debian.org/debian || exit 1
+	;;
+	arm-chroot)
+	sudo debootstrap --arch=armel --foreign sid ${STAGING} http://http.debian.net/debian || exit 1
+	sudo cp /usr/bin/qemu-arm-static ${STAGING}/usr/bin
+	sudo chroot ${STAGING} /debootstrap/debootstrap --second-stage
+	sudo chmod -R a+w ${STAGING}/
+	sudo echo "deb http://ftp.debian.org/debian sid main" > ${STAGING}/etc/apt/sources.list
+	;;
+	*) echo "Failed for unknown host board ${DISTRO11S_BOARD}"; exit ;;
+	esac
sudo chmod -R a+w ${STAGING}/
sudo chmod -R a+r ${STAGING}/
sudo chmod a+x ${STAGING}/root
--
1.8.1.2

```