Skip to content

Commit 86e3a9f

Browse files
committed
Fix qemu emulation
1 parent 5995320 commit 86e3a9f

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

.github/workflows/build_debian.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
version: [11, 12]
17-
arch: [ "armhf.arm32v7", "arm64.arm64v8", "amd64.amd64", "mips64le.mips64le", "s390x.s390x", "ppc64le.ppc64le"]
17+
arch: [ "armhf.arm32v7.max", "arm64.arm64v8.cortex-a53", "amd64.amd64.max", "mips64le.mips64le.MIPS64R2-generic", "s390x.s390x.max", "ppc64le.ppc64le.power8"]
1818

1919
steps:
2020
- name: Checkout repository
2121
uses: actions/checkout@v4
2222
- name: build package
2323
run: |
2424
curl -s -L https://github.com/svpcom/wfb-ng/releases/download/wifibroadcast-17.10/qemu-7.2.15-fixed.tar.gz | sudo tar xzv -C /
25-
make deb_docker DOCKER_ARCH=$(echo ${{ matrix.arch}} | cut -f1 -d.) DOCKER_SRC_IMAGE=$(echo ${{ matrix.arch }} | cut -f2 -d.)/debian:${{ matrix.version }}
25+
make deb_docker QEMU_CPU=$(echo ${{ matrix.arch }} | cut -f3 -d.) DOCKER_ARCH=$(echo ${{ matrix.arch }} | cut -f1 -d.) DOCKER_SRC_IMAGE=$(echo ${{ matrix.arch }} | cut -f2 -d.)/debian:${{ matrix.version }}
2626
- name: Archive production artifacts
2727
uses: actions/upload-artifact@v4
2828
id: artifact-upload-step

.github/workflows/build_ubuntu.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
version: [ "20.04", "22.04", "24.04" ]
17-
arch: [ "armhf.arm32v7", "arm64.arm64v8", "amd64.amd64"]
17+
arch: [ "armhf.arm32v7.max", "arm64.arm64v8.cortex-a53", "amd64.amd64.max"]
1818

1919
steps:
2020
- name: Checkout repository
2121
uses: actions/checkout@v4
2222
- name: build package
2323
run: |
2424
curl -s -L https://github.com/svpcom/wfb-ng/releases/download/wifibroadcast-17.10/qemu-7.2.15-fixed.tar.gz | sudo tar xzv -C /
25-
make deb_docker DOCKER_ARCH=$(echo ${{ matrix.arch}} | cut -f1 -d.) DOCKER_SRC_IMAGE=$(echo ${{ matrix.arch }} | cut -f2 -d.)/ubuntu:${{ matrix.version }}
25+
make deb_docker QEMU_CPU=$(echo ${{ matrix.arch }} | cut -f3 -d.) DOCKER_ARCH=$(echo ${{ matrix.arch }} | cut -f1 -d.) DOCKER_SRC_IMAGE=$(echo ${{ matrix.arch }} | cut -f2 -d.)/ubuntu:${{ matrix.version }}
2626
- name: Archive production artifacts
2727
uses: actions/upload-artifact@v4
2828
id: artifact-upload-step

Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ ENV ?= $(PWD)/env
1717
DOCKER_ARCH ?= amd64
1818
DOCKER_SRC_IMAGE ?= "p2ptech/cross-build:2023-02-21-raspios-bullseye-armhf-lite"
1919
STDEB ?= "git+https://github.com/svpcom/stdeb"
20+
QEMU_CPU ?= "max"
2021

2122
export VERSION COMMIT SOURCE_DATE_EPOCH
2223

@@ -92,6 +93,6 @@ deb_docker: /opt/qemu/bin
9293
@if ! [ -d /opt/qemu ]; then echo "Docker cross build requires patched QEMU!\nApply ./scripts/qemu/qemu.patch to qemu-7.2.0 and build it:\n ./configure --prefix=/opt/qemu --static --disable-system && make && sudo make install"; exit 1; fi
9394
if ! ls /proc/sys/fs/binfmt_misc | grep -q qemu ; then sudo ./scripts/qemu/qemu-binfmt-conf.sh --qemu-path /opt/qemu/bin --persistent yes; fi
9495
cp -a Makefile docker/src/
95-
TAG="wfb-ng:build-`date +%s`"; docker build --platform linux/$(DOCKER_ARCH) -t $$TAG docker --build-arg SRC_IMAGE=$(DOCKER_SRC_IMAGE) && \
96+
TAG="wfb-ng:build-`date +%s`"; docker build --platform linux/$(DOCKER_ARCH) -t $$TAG --build-arg SRC_IMAGE=$(DOCKER_SRC_IMAGE) --build-arg QEMU_CPU=$(QEMU_CPU) docker && \
9697
docker run --platform linux/$(DOCKER_ARCH) -i --rm -v $(PWD):/build $$TAG bash -c "trap 'chown -R --reference=. .' EXIT; export VERSION=$(VERSION) COMMIT=$(COMMIT) SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) && cd /build && make clean && make test && make deb"
9798
docker image ls -q "wfb-ng:build-*" | uniq | tail -n+6 | while read i ; do docker rmi -f $$i; done

docker/Dockerfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
ARG SRC_IMAGE
2-
32
FROM $SRC_IMAGE
43

4+
ARG QEMU_CPU
5+
ENV QEMU_CPU=$QEMU_CPU
6+
57
RUN apt-get update && \
68
DEBIAN_FRONTEND=noninteractive \
79
apt-get install -y build-essential git wget \

0 commit comments

Comments
 (0)