Skip to content

Commit

Permalink
s390x: revise Makefile for building fedora binaries
Browse files Browse the repository at this point in the history
Fixes: confidential-containers#1640

Signed-off-by: Qi Feng Huo <[email protected]>
  • Loading branch information
Qi Feng Huo committed Jan 29, 2024
1 parent cf5d30d commit f59c8bf
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions podvm-mkosi/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
AA_KBC ?= offline_fs_kbc
AA_KBC ?= offline_fs_kbc
ARCH ?= $(subst x86_64,amd64,$(shell uname -m))
BUILDER = fedora-binaries-builder-$(ARCH)

.DEFAULT_GOAL := all
.PHONY: all
Expand All @@ -9,19 +11,30 @@ debug: fedora-binaries-builder binaries image-debug

PHONY: fedora-binaries-builder
fedora-binaries-builder:
@echo "Building fedora-binaries-builder image..."
@echo "Building $(BUILDER) image..."
ifeq ($(ARCH),s390x)
docker buildx build \
-t fedora-binaries-builder \
-t $(BUILDER) \
--build-arg ARCH=s390x \
--build-arg PROTOC_ARCH=s390x_64 \
--build-arg YQ_ARCH=s390x \
--build-arg YQ_CHECKSUM=sha256:4e6324d08630e7df733894a11830412a43703682d65a76f1fc925aac08268a45 \
--load \
-f ../podvm/Dockerfile.podvm_builder.fedora ../.
else
docker buildx build \
-t $(BUILDER) \
--load \
-f ../podvm/Dockerfile.podvm_builder.fedora ../.
endif

PHONY: binaries
binaries:
docker buildx use default
@echo "Building binaries..."
rm -rf ./resources/binaries-tree
docker buildx build \
--build-arg BUILDER_IMG=fedora-binaries-builder \
--build-arg BUILDER_IMG=$(BUILDER) \
--build-arg AA_KBC=$(AA_KBC) \
-o type=local,dest="./resources/binaries-tree" \
-f ../podvm/Dockerfile.podvm_binaries.fedora ../.
Expand Down

0 comments on commit f59c8bf

Please sign in to comment.