Nico Huber has uploaded this change for review. ( https://review.coreboot.org/23042
Change subject: manibuilder: Add DJGPP target ......................................................................
manibuilder: Add DJGPP target
New target is called `djgpp:latest`. It will likely only work on an x86 hosts because of the underlying DJGPP Docker image.
Change-Id: Id3b85685f39fb5fdd6e21fca7ffa3f5d4a4ba51d Signed-off-by: Nico Huber nico.h@gmx.de --- A util/manibuilder/Dockerfile.djgpp M util/manibuilder/Makefile M util/manibuilder/Makefile.targets 3 files changed, 44 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/42/23042/1
diff --git a/util/manibuilder/Dockerfile.djgpp b/util/manibuilder/Dockerfile.djgpp new file mode 100644 index 0000000..c0be794 --- /dev/null +++ b/util/manibuilder/Dockerfile.djgpp @@ -0,0 +1,29 @@ +FROM anibali/djgpp:latest + +USER root +RUN \ + userdel appuser && \ + useradd -p locked -m mani && \ + zypper -q install -y tar make git ccache + +USER mani +RUN cd && \ + mkdir .ccache && chown mani:users .ccache && \ + git clone https://review.coreboot.org/flashrom.git && \ + git clone https://git.kernel.org/pub/scm/utils/pciutils/pciutils.git && \ + cd pciutils && \ + git checkout v3.5.6 && \ + curl https://flashrom.org/images/6/6a/Pciutils-3.5.6.patch.gz | zcat | git apply && \ + make ZLIB=no DNS=no HOST=i386-djgpp-djgpp \ + CROSS_COMPILE=i586-pc-msdosdjgpp- \ + PREFIX=/ DESTDIR=$PWD/../ \ + STRIP="--strip-program=i586-pc-msdosdjgpp-strip -s" \ + install install-lib && \ + cd ../ && \ + curl https://flashrom.org/images/3/3d/Libgetopt.tar.gz | zcat | tar x && \ + cd libgetopt && \ + make && cp libgetopt.a ../lib/ && cp getopt.h ../include/ + +ENV DEVSHELL /bin/bash +COPY mani-wrapper.sh /home/mani/ +ENTRYPOINT ["/bin/sh", "/home/mani/mani-wrapper.sh"] diff --git a/util/manibuilder/Makefile b/util/manibuilder/Makefile index a5cdeef..5ad75ee 100644 --- a/util/manibuilder/Makefile +++ b/util/manibuilder/Makefile @@ -38,12 +38,19 @@ $(foreach tag,$(MULTIARCH_TAGS), \ $(eval $(call build_template,$(tag),multiarch)))
+djgpp:latest-build: %-build: Dockerfile.djgpp mani-wrapper.sh + $(QUIET_SETUP)docker build . -f $< -t mani/$* + $(addsuffix -check-build,$(ALL_TAGS)): %-check-build: $(QUIET_SETUP)\ [ $$(docker image ls -q mani/$*) ] \ || $(MAKE) $*-build $(if $(QUIET_SETUP),>/dev/null 2>/dev/null)
$(filter centos%,$(MULTIARCH_TAGS)) anita:sparc: CC=cc +djgpp:latest: CC=ccache i586-pc-msdosdjgpp-gcc +djgpp:latest: STRIP=i586-pc-msdosdjgpp-strip +djgpp:latest: LIBS_BASE=../ +djgpp:latest: TARGET=strip $(ANITA_TAGS): MAKECMD=gmake $(ALL_TAGS): export QUIET_SETUP=$(QUIET_TEST) $(ALL_TAGS): %: %-check-build @@ -55,7 +62,10 @@ --name mani_$(call ident,$*) mani/$* \ "git fetch origin $${TEST_REVISION:-master} && \ git checkout FETCH_HEAD && \ - $(MAKECMD) clean && $(MAKECMD) -j$${CPUS:-1} CC='$(CC)'" \ + $(MAKECMD) clean && $(MAKECMD) -j$${CPUS:-1} CC='$(CC)' \ + $(if $(STRIP),STRIP='$(STRIP)') \ + $(if $(LIBS_BASE),LIBS_BASE='$(LIBS_BASE)') \ + $(TARGET)" \ $(if $(QUIET_TEST),>/dev/null 2>&1) || echo $*: $$?
$(addsuffix -shell,$(ALL_TAGS)): %-shell: %-check-build diff --git a/util/manibuilder/Makefile.targets b/util/manibuilder/Makefile.targets index a2cedce..1be2176 100644 --- a/util/manibuilder/Makefile.targets +++ b/util/manibuilder/Makefile.targets @@ -17,7 +17,9 @@ $(foreach v,v3.7 v3.6, \ alpine:$(a)-$(v))) \
-ALL_TAGS := $(ANITA_TAGS) $(MULTIARCH_TAGS) +OTHER_TAGS := djgpp:latest + +ALL_TAGS := $(ANITA_TAGS) $(MULTIARCH_TAGS) $(OTHER_TAGS)
arch_filter = $(sort \ $(foreach arch,$(1), \ @@ -39,6 +41,7 @@ DEFAULT_TAGS := \ anita:amd64 \ anita:i386 \ + djgpp:latest \ fedora:25-x86_64 \ fedora:25-ppc64le \ fedora:25-aarch64 \