From e5bf3a59c70d5ef75342eed489cbc4c4d1fea212 Mon Sep 17 00:00:00 2001 From: Jim Lawton Date: Fri, 19 Aug 2016 10:33:21 +0100 Subject: [PATCH] Docker build of Apollo-11 sources. This is a first attempt at a Docker configuration for a build of the Apollo-11 sources using the VirtualAgc tools. To use it, you'll need Docker (on Linux, Mac or Windows). Then do: $ docker build -t apollo-11 . It first clones and builds the VirtualAgc tools and mission code. Then it compiles the Apollo-11 sources (from the current directory) and compares the generated rope binaries against those in the VirtualAgc build. This is based on an Ubuntu 16.04 base image. Note that the VirtualAgc tools are sensitive to spaces/tabs, so assembly errors may result from using a different formatting standard. --- .gitignore | 1 + Comanche055/Makefile | 2 ++ Dockerfile | 26 ++++++++++++++++++++++++++ Luminary099/Makefile | 2 ++ Makefile | 23 +++++++++++++++++++++++ Makefile.inc | 17 +++++++++++++++++ 6 files changed, 71 insertions(+) create mode 100644 .gitignore create mode 100644 Comanche055/Makefile create mode 100644 Dockerfile create mode 100644 Luminary099/Makefile create mode 100644 Makefile create mode 100644 Makefile.inc diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bf44696 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.agc.lst diff --git a/Comanche055/Makefile b/Comanche055/Makefile new file mode 100644 index 0000000..e36b8dc --- /dev/null +++ b/Comanche055/Makefile @@ -0,0 +1,2 @@ +BASENAME=Comanche055 +include ../Makefile.inc diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..53adafc --- /dev/null +++ b/Dockerfile @@ -0,0 +1,26 @@ +FROM ubuntu:16.04 +MAINTAINER Jim Lawton + +RUN apt-get -y update +RUN apt-get -y upgrade + +RUN apt-get -y install git +RUN apt-get -y install build-essential +RUN apt-get -y install make +RUN apt-get -y install g++ +RUN apt-get -y install python +RUN apt-get -y install libncurses5 +RUN apt-get -y install libncurses5-dev + +RUN git clone https://github.com/rburkey2005/virtualagc + +# Use this to build a copy of the current directory. +RUN mkdir /apollo-11 +COPY . /apollo-11 + +# Build virtulagc tools. +RUN cd virtualagc && make clean +RUN cd virtualagc && make yaLEMAP yaAGC yaAGS yaYUL missions + +# Use virtualagc to build Apollo-11 source. +RUN cd apollo-11 && VIRTUALAGC=/virtualagc make all diff --git a/Luminary099/Makefile b/Luminary099/Makefile new file mode 100644 index 0000000..5f6c57f --- /dev/null +++ b/Luminary099/Makefile @@ -0,0 +1,2 @@ +BASENAME=Luminary099 +include ../Makefile.inc diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f85520f --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +NVER:=\\\"2016-08-14-working\\\" +DATE:=`date +%Y%m%d` + +# List of mission software directories to be built. +SUBDIRS = Luminary099 Comanche055 + +.PHONY: default +default: all + +.PHONY: all +all: $(SUBDIRS) + +.PHONY: ${SUBDIRS} +$(SUBDIRS): + make -C $@ + +clean: + for subdir in $(SUBDIRS) ; do make -C $$subdir clean ; done + +.PHONY: corediffs +corediffs: + for subdir in $(SUBDIRS) ; do make -C $$subdir corediff.txt ; done + diff --git a/Makefile.inc b/Makefile.inc new file mode 100644 index 0000000..fef0b19 --- /dev/null +++ b/Makefile.inc @@ -0,0 +1,17 @@ +SOURCE:=$(wildcard *.agc) +TARGETS=${BASENAME}.bin ${BASENAME}.lst + +default: $(TARGETS) + +${BASENAME}.bin ${BASENAME}.lst: ${SOURCE} + ${VIRTUALAGC}/yaYUL/yaYUL --unpound-page --html MAIN.agc >MAIN.agc.lst + diff -s MAIN.agc.bin ${VIRTUALAGC}/${BASENAME}/${BASENAME}.bin + mv MAIN.agc.bin ${BASENAME}.bin + mv MAIN.agc.lst ${BASENAME}.lst + mv MAIN.agc.symtab ${BASENAME}.symtab + +corediff.txt: ${BASENAME}.bin ${BASENAME}.lst + python ${VIRTUALAGC}/Tools/ropediff.py -p -c -a -o $@ ${VIRTUALAGC}/${BASENAME}/${BASENAME}.bin ${BASENAME}.bin + +clean: + rm -f *.lst *~ *.bin *.symtab oct2bin.bin* *.agc.html