Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove linux/armhf target #25

Merged
merged 2 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/actions/build/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ git config --global --add safe.directory "$PWD"

VERBOSE=y make distclean test
TARGET_ARCH=linux-arm64 VERBOSE=y make
TARGET_ARCH=linux-armhf VERBOSE=y make
TARGET_ARCH=linux-amd64 VERBOSE=y make
VERBOSE=y make dist-archive
17 changes: 3 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
test:
runs-on: ubuntu-20.04
container:
image: ghcr.io/bcdevices/scm-go-usb-arm:v1.20.1-jammy-2
image: ghcr.io/bcdevices/scm-go-usb-arm:v1.21.1-jammy-2
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -21,7 +21,7 @@ jobs:
build-linux-amd64:
runs-on: ubuntu-20.04
container:
image: ghcr.io/bcdevices/scm-go-usb-arm:v1.20.1-jammy-2
image: ghcr.io/bcdevices/scm-go-usb-arm:v1.21.1-jammy-2
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -32,21 +32,10 @@ jobs:
build-linux-arm64:
runs-on: ubuntu-20.04
container:
image: ghcr.io/bcdevices/scm-go-usb-arm:v1.20.1-jammy-2
image: ghcr.io/bcdevices/scm-go-usb-arm:v1.21.1-jammy-2
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build linux-arm64
run: |
TARGET_ARCH="linux-arm64" make all

build-linux-armhf:
runs-on: ubuntu-20.04
container:
image: ghcr.io/bcdevices/scm-go-usb-arm:v1.20.1-jammy-2
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build linux-armhf
run: |
TARGET_ARCH="linux-armhf" make all
15 changes: 4 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ RUN set -eux; \
url='https://dl.google.com/go/go1.21.1.linux-amd64.tar.gz'; \
sha256='b3075ae1ce5dab85f89bc7905d1632de23ca196bd8336afd93fa97434cfa55ae'; \
;; \
'armhf') \
url='https://dl.google.com/go/go1.21.1.linux-armv6l.tar.gz'; \
sha256='f3716a43f59ae69999841d6007b42c9e286e8d8ce470656fb3e70d7be2d7ca85'; \
;; \
'arm64') \
url='https://dl.google.com/go/go1.21.1.linux-arm64.tar.gz'; \
sha256='7da1a3936a928fd0b2602ed4f3ef535b8cd1990f1503b8d3e1acc0fa0759c967'; \
Expand Down Expand Up @@ -64,8 +60,6 @@ ENV PKGS="${PKGS} crossbuild-essential-amd64"
ENV PKGS="${PKGS} libusb-1.0-0-dev:amd64"
ENV PKGS="${PKGS} crossbuild-essential-arm64"
ENV PKGS="${PKGS} libusb-1.0-0-dev:arm64"
ENV PKGS="${PKGS} crossbuild-essential-armhf"
ENV PKGS="${PKGS} libusb-1.0-0-dev:armhf"
ENV PKGS="${PKGS} libusb-1.0-0-dev"
ENV PKGS="${PKGS} zip"

Expand All @@ -76,13 +70,12 @@ RUN set -eux; \
deb [arch=amd64] http://security.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse\n\
deb [arch=amd64] http://security.ubuntu.com/ubuntu jammy-security main restricted universe multiverse\n\
deb [arch=amd64] http://archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse\n\
deb [arch=arm64,armhf] http://ports.ubuntu.com/ jammy main restricted universe multiverse\n\
deb [arch=arm64,armhf] http://ports.ubuntu.com/ jammy-updates main restricted universe multiverse\n\
deb [arch=arm64,armhf] http://ports.ubuntu.com/ jammy-security main restricted universe multiverse\n\
deb [arch=arm64,armhf] http://ports.ubuntu.com/ jammy-backports main restricted universe multiverse" > /etc/apt/sources.list; \
deb [arch=arm64] http://ports.ubuntu.com/ jammy main restricted universe multiverse\n\
deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates main restricted universe multiverse\n\
deb [arch=arm64] http://ports.ubuntu.com/ jammy-security main restricted universe multiverse\n\
deb [arch=arm64] http://ports.ubuntu.com/ jammy-backports main restricted universe multiverse" > /etc/apt/sources.list; \
dpkg --add-architecture "amd64"; \
dpkg --add-architecture "arm64"; \
dpkg --add-architecture "armhf"; \
apt-get update; \
apt-get -y install --no-install-recommends ${PKGS}; \
rm -rf /var/lib/apt/lists/*
11 changes: 1 addition & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,16 @@ TARGET_ARCHS :=
TARGET_ARCHS += host
TARGET_ARCHS += linux-amd64
TARGET_ARCHS += linux-arm64
TARGET_ARCHS += linux-armhf
ifneq ($(TARGET_ARCH),)
ifeq ($(filter $(TARGET_ARCH),$(TARGET_ARCHS)),)
$(error "Invalid TARGET_ARCH: $(TARGET_ARCH), not in: $(TARGET_ARCHS)")
endif
endif
GCCTRIPLET_linux-amd64 := x86_64-linux-gnu
GCCTRIPLET_linux-arm64 := aarch64-linux-gnu
GCCTRIPLET_linux-armhf := arm-linux-gnueabihf
GCCTRIPLETS :=
GCCTRIPLETS += $(GCCTRIPLET_linux-amd64)
GCCTRIPLETS += $(GCCTRIPLET_linux-arm64)
GCCTRIPLETS += $(GCCTRIPLET_linux-armhf)
GCCTRIPLET_CROSS ?= $(GCCTRIPLET_$(TARGET_ARCH))
ifneq ($(GCCTRIPLET_CROSS),)
ifeq ($(filter $(GCCTRIPLET_CROSS),$(GCCTRIPLETS)),)
Expand All @@ -55,7 +52,6 @@ GO_BUILD ?= CC=$(CC) CGO_ENABLED=$(CGO_ENABLED) $(GO) build $(GO_BUILD_OPTS)
GO_TEST ?= CC=$(CC) CGO_ENABLED=$(CGO_ENABLED) $(GO) test $(GO_BUILD_OPTS)
GOARCH_linux-amd64 := amd64
GOARCH_linux-arm64 := arm64
GOARCH_linux-armhf := arm
GOARCH_CROSS ?= $(GOARCH_$(TARGET_ARCH))
GOARM_CROSS ?= 7
GOOS_CROSS := linux
Expand All @@ -70,8 +66,6 @@ BINS_amd64 :=
BINS_amd64 += build/linux-amd64/bin/deps
BINS_arm64 :=
BINS_arm64 += build/linux-arm64/bin/deps
BINS_armhf :=
BINS_armhf += build/linux-armhf/bin/deps
BINS_host :=
BINS_host += build/bin/deps
INSTALL_FILES :=
Expand All @@ -83,9 +77,6 @@ endif
ifeq ($(TARGET_ARCH),linux-arm64)
BINS += $(BINS_arm64)
endif
ifeq ($(TARGET_ARCH),linux-armhf)
BINS += $(BINS_armhf)
endif
ifeq ($(TARGET_ARCH),linux-amd64)
BINS += $(BINS_amd64)
endif
Expand Down Expand Up @@ -215,4 +206,4 @@ docker-%: check-docker-host
-t "$(DOCKER_TAG_BASE)-$*" \
/bin/bash -c "TARGET_ARCH=linux-$* VERBOSE=$(VERBOSE) make docker-guest"
.PHONY: docker
docker: docker-amd64 docker-arm64 docker-armhf
docker: docker-amd64 docker-arm64
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Target platforms:
- Host: container image platform (Linux/AArch64, Linux/x86\_64)
- `linux/amd64`: Linux/x86\_64
- `linux/arm64`: Linux/AArch64
- `linux/armhf`: Linux/armv7+

## Including additional packages

Expand All @@ -16,7 +15,7 @@ with a `PKGS` build argument.
```Shell
# Include libzmq3-dev, for all supported targets
docker build \
--build-arg PKGS="libzmq3-dev libzmq3-dev:amd64 libzmq3-dev:arm64 libzmq3-dev:armhf" \
--build-arg PKGS="libzmq3-dev libzmq3-dev:amd64 libzmq3-dev:arm64" \
.
```

Expand Down