From 24c0828a85ce211c4300728afffb3290b399b3ef Mon Sep 17 00:00:00 2001
From: Daniel Francis <francis@sugarlabs.org>
Date: Sat, 19 Jan 2013 20:27:48 -0200
Subject: [PATCH sugar-docs] Document how to build in a Chroot environment
Signed-off-by: Daniel Francis <francis@sugarlabs.org>
---
build.rst | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/build.rst b/build.rst
index 7a96a8c..f6a670c 100644
a
|
b
|
You can generate useful debug information with:: |
42 | 42 | |
43 | 43 | make bug-report |
44 | 44 | |
| 45 | Running in a Chroot environment |
| 46 | ------------------------------- |
| 47 | |
| 48 | If your distribution can't be supported by Sugar-build, you can install one |
| 49 | of the supported distributions in a disk partition and run Sugar without |
| 50 | switching between systems. |
| 51 | |
| 52 | This procedure requires `xchroot <http://www.zagura.ro/download/xchroot>`_. |
| 53 | |
| 54 | Mounting the partition:: |
| 55 | |
| 56 | MAINDEVICE=/dev/sda1 |
| 57 | HOMEDIR=/dev/sda5 |
| 58 | MOUNTPOINT=/mnt/ubuntu |
| 59 | |
| 60 | mount $MAINDEVICE $MOUNTPOINT |
| 61 | # Comment this line if you don't have a partition for the home directory |
| 62 | mount $HOMEDIR $MOUNTPOINT/home |
| 63 | |
| 64 | cd $MOUNTPOINT |
| 65 | mount -t proc proc proc/ |
| 66 | mount -t sysfs sys sys/ |
| 67 | mount -o bind /dev dev/ |
| 68 | mount -t devpts pts dev/pts/ |
| 69 | |
| 70 | Chrooting to the environment:: |
| 71 | |
| 72 | USERNAME=sdf |
| 73 | |
| 74 | cd $MOUNTPOINT |
| 75 | xchroot . su $USERNAME |
| 76 | |
| 77 | Then you can follow the same way as in the supported distributions |
| 78 | to use Sugar-build. |
| 79 | |
45 | 80 | Developing |
46 | 81 | ---------- |
47 | 82 | |