Skip to content

Commit 02cbd8a

Browse files
timonskufoosel
andauthored
feat: option to mount /proc before starting chroot (#8)
* Mount /proc before starting chroot * feat: make proc mounting configurable --------- Co-authored-by: Gina Häußge <[email protected]>
1 parent 3c43a3a commit 02cbd8a

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/config

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@ fi
1212
[ -n "$EDITBASE_WORKSPACE" ] || EDITBASE_WORKSPACE=${DIST_PATH}/workspace
1313
[ -n "$EDITBASE_MOUNT_PATH" ] || EDITBASE_MOUNT_PATH=$EDITBASE_WORKSPACE/mount
1414

15+
# Whether to mount the host's proc into the build chroot, 1 for yes, 0 for no
16+
[ -n "$EDITBASE_MOUNT_PROC" ] || EDITBASE_MOUNT_PROC=0
17+
1518
# The root partiton of the image filesystem, 2 for raspbian
1619
[ -n "$EDITBASE_ROOT_PARTITION" ] || EDITBASE_ROOT_PARTITION=2
1720

18-
# if set will enlarge root parition prior to build by provided size in MB
21+
# if set will enlarge root partition prior to build by provided size in MB
1922
[ -n "$EDITBASE_IMAGE_ENLARGEROOT" ] || EDITBASE_IMAGE_ENLARGEROOT=
2023

2124
# if set will resize root partition on image after build to minimum size +

src/customize

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ function execute_chroot_script() {
7777
cp "$DIR/common.sh" common.sh
7878
chmod 755 common.sh
7979

80+
if [ "$EDITBASE_MOUNT_PROC" == "1" ]; then
81+
echo "Mounting /proc of host..."
82+
mount -t proc /proc proc/
83+
fi
84+
8085
if [ "$(arch)" != "armv7l" ] && [ "$(arch)" != "aarch64" ] && [ "$(arch)" != "arm64" ] ; then
8186
if [ "$EDITBASE_ARCH" == "armv7l" ]; then
8287
echo "Building on non-ARM device a armv7l system, using qemu-arm-static"

0 commit comments

Comments
 (0)