@@ -16,7 +16,9 @@ function mount_chroot() {
16
16
local target
17
17
target=" $( realpath " $1 " ) " # normalize, remove last slash if dir
18
18
display_alert " mount_chroot" " $target " " debug"
19
+
19
20
mkdir -p " ${target} /run/user/0"
21
+ mkdir -p " ${target} /armbian/cache"
20
22
21
23
# tmpfs size=50% is the Linux default, but we need more.
22
24
mount -t tmpfs -o " size=99%" tmpfs " ${target} /tmp"
@@ -26,6 +28,8 @@ function mount_chroot() {
26
28
mount -t sysfs chsys " ${target} " /sys
27
29
mount --bind /dev " ${target} " /dev
28
30
mount -t devpts chpts " ${target} " /dev/pts || mount --bind /dev/pts " ${target} " /dev/pts
31
+
32
+ mount --bind /armbian/cache " ${target} /armbian/cache"
29
33
}
30
34
31
35
# umount_chroot <target>
@@ -36,7 +40,7 @@ function umount_chroot() {
36
40
local target
37
41
target=" $( realpath " $1 " ) " # normalize, remove last slash if dir
38
42
display_alert " Unmounting" " $target " " info"
39
- while grep -Eq " ${target} \/(dev|proc|sys|tmp|var\/tmp|run\/user\/0)" /proc/mounts; do
43
+ while grep -Eq " ${target} \/(dev|proc|sys|tmp|var\/tmp|run\/user\/0|armbian\/cache )" /proc/mounts; do
40
44
display_alert " Unmounting..." " target: ${target} " " debug"
41
45
umount " ${target} " /dev/pts || true
42
46
umount --recursive " ${target} " /dev || true
@@ -45,6 +49,7 @@ function umount_chroot() {
45
49
umount " ${target} " /tmp || true
46
50
umount " ${target} " /var/tmp || true
47
51
umount " ${target} " /run/user/0 || true
52
+ umount " ${target} " /armbian/cache || true
48
53
wait_for_disk_sync " after umount chroot"
49
54
run_host_command_logged grep -E " '${target} /(dev|proc|sys|tmp)'" /proc/mounts " ||" true
50
55
done
0 commit comments