aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 6 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index b34a496..2573890 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ XILINX_LICENSE := Xilinx.lic
BOOTSTRAP_IMAGE := cryptech-builder:bootstrap
BOOTSTRAP_CONTAINER := cryptech-builder-bootstrap
CRYPTECH_BASE_FILE := cryptech-builder-base-image.xz
-XILINX_PKGDIR := $(basename ${XILINX_TARBALL})
+XILINX_PKGDIR := fs/$(basename ${XILINX_TARBALL})
ifneq (./,$(sort $(dir ${XILINX_TARBALL} ${XILINX_LICENSE})))
$(error XILINX_TARBALL and XILINX_LICENSE must be in this directory for bind mount)
@@ -19,16 +19,18 @@ ${CRYPTECH_BASE_FILE}: ${XILINX_TARBALL} ${XILINX_LICENSE} Builder Ratinox
rm -rf fs
mkdir fs
sudo /usr/sbin/debootstrap --foreign jessie fs
- sudo tar -C fs -xf ${XILINX_TARBALL}
- test -d fs/${XILINX_PKGDIR}
sudo tar -C fs -c . | docker import - ${BOOTSTRAP_IMAGE}
sudo rm -rf fs
+ mkdir fs
+ tar -C fs -xf ${XILINX_TARBALL}
+ test -d ${XILINX_PKGDIR}
docker run -it --name ${BOOTSTRAP_CONTAINER} \
--mount type=bind,source=$(abspath .),target=/cryptech-builder \
- --env 'XILINX_PKGDIR=/${XILINX_PKGDIR}' \
+ --env 'XILINX_PKGDIR=/cryptech-builder/${XILINX_PKGDIR}' \
--env 'XILINX_LICENSE=${XILINX_LICENSE}' \
${BOOTSTRAP_IMAGE} \
/cryptech-builder/Builder
+ rm -rf fs
-mogrify -verbose -format png *.xwd && rm *.xwd
docker export ${BOOTSTRAP_CONTAINER} | xz -v >${CRYPTECH_BASE_FILE}.tmp
docker container rm -f ${BOOTSTRAP_CONTAINER}