Skip to content

Commit e0fed7f

Browse files
committed
Support usr-merged root filesystems
Signed-off-by: Dominic Ayre <dominicayre@microsoft.com>
1 parent b729453 commit e0fed7f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,14 @@ out/delta-snp.tar.gz: out/delta.tar.gz bin/internal/tools/snp-report boot/startu
6464
out/delta.tar.gz: bin/init bin/vsockexec bin/cmd/gcs bin/cmd/gcstools bin/cmd/hooks/wait-paths Makefile
6565
@mkdir -p out
6666
rm -rf rootfs
67-
mkdir -p rootfs/bin/
67+
rm -rf /tmp/base-rootfs && mkdir -p /tmp/base-rootfs
68+
tar -xf $(BASE) -C /tmp/base-rootfs
69+
if [ "$$(readlink -f /tmp/base-rootfs/bin)" = "/tmp/base-rootfs/usr/bin" ]; then \
70+
mkdir -p rootfs/usr/bin; \
71+
ln -s usr/bin rootfs/bin; \
72+
else \
73+
mkdir -p rootfs/bin; \
74+
fi
6875
mkdir -p rootfs/info/
6976
cp bin/init rootfs/
7077
cp bin/vsockexec rootfs/bin/

0 commit comments

Comments
 (0)