changeset 26:3cb887a6b2ca

multi stage build
author kono
date Thu, 07 Jul 2022 17:03:43 +0900
parents bc532f5e044f
children da1d64f7b225
files src/run-debug.sh xv6-arm-build.def xv6-arm.def
diffstat 3 files changed, 24 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/src/run-debug.sh	Thu Jul 07 16:52:48 2022 +0900
+++ b/src/run-debug.sh	Thu Jul 07 17:03:43 2022 +0900
@@ -1,2 +1,2 @@
 #!/bin/sh
-qemu-system-arm -M versatilepb -m 128 -cpu arm1176 -nographic -singlestep -d exec,cpu,guest_errors -D qemu.log -kernel kernel.elf -s -S
+qemu-system-arm -M versatilepb -m 128 -cpu arm1176 -nographic -singlestep -d exec,cpu,guest_errors -D /tmp/qemu.log -kernel kernel.elf -s -S
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/xv6-arm-build.def	Thu Jul 07 17:03:43 2022 +0900
@@ -0,0 +1,20 @@
+BootStrap: docker
+From: debian:10.10
+
+%post
+    apt update
+    apt install -y \
+     git \
+     mercurial \
+     vim \
+     perl \
+     zsh \
+     build-essential \
+     gdb-multiarch \
+     qemu-system-arm \
+     gcc-arm-none-eabi \
+     binutils-aarch64-linux-gnu 
+   cd /
+   hg clone http://www.cr.ie.u-ryukyu.ac.jp/hg/Members/shivanidubey/xv6
+   cd /xv6/src/
+
--- a/xv6-arm.def	Thu Jul 07 16:52:48 2022 +0900
+++ b/xv6-arm.def	Thu Jul 07 17:03:43 2022 +0900
@@ -1,22 +1,8 @@
-BootStrap: docker
-From: debian:10.10
+BootStrap: localimage
+From: /mnt/nvme0/singularity/teachers/kono/xv6/xv6-arm-build.sif
+Stage: make
 
 %post
-    apt update
-    apt install -y \
-     git \
-     mercurial \
-     vim \
-     perl \
-     zsh \
-     build-essential \
-     gdb-multiarch \
-     qemu-system-arm \
-     gcc-arm-none-eabi \
-     clang \
-     binutils-aarch64-linux-gnu 
-   cd /
-   hg clone http://www.cr.ie.u-ryukyu.ac.jp/hg/Members/shivanidubey/xv6
    cd /xv6/src/
    make kernel.elf