Skip to content

Commit ccd7318

Browse files
authored
fix: support risc-v (#23699)
1 parent 6ad082e commit ccd7318

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+389
-391
lines changed

Makefile

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -96,21 +96,6 @@ deb/%: cmd/%
9696
pkg/%: prepare_dir
9797
$(GO_INSTALL) $(REPO_PREFIX)/$@
9898

99-
rpm/fetcherfs: cmd/fetcherfs
100-
docker run --rm \
101-
--name docker-centos-build-fetcherfs \
102-
-v $(CURDIR):/data \
103-
registry.cn-beijing.aliyuncs.com/yunionio/centos-build:1.1-4 \
104-
/bin/bash -c "VERSION=3.6 /data/build/build.sh fetcherfs /opt/yunion/fetchclient/bin"
105-
106-
deb/fetcherfs: rpm/fetcherfs
107-
#VERSION=3.6 $(DEB_BUILD_SCRIPT) fetcherfs /opt/yunion/fetchclient/bin
108-
docker run --rm \
109-
--name docker-debian-build-fetcherfs \
110-
-v $(CURDIR):/data \
111-
registry.cn-beijing.aliyuncs.com/yunionio/debian10-base:1.0 \
112-
/data/build/convert_rpm2deb.sh
113-
11499
build:
115100
$(MAKE) $(cmdTargets)
116101

@@ -287,10 +272,6 @@ mod:
287272
define helpText
288273
Build with docker
289274

290-
make docker-centos-build F='-j4'
291-
make docker-centos-build F='-j4 cmd/region cmd/climc'
292-
make docker-centos-build-stop
293-
294275
make docker-alpine-build F='-j4'
295276
make docker-alpine-build F='-j4 cmd/host cmd/host-deployer'
296277
make docker-alpine-build-stop
@@ -342,7 +323,7 @@ image:
342323
.PHONY: image
343324

344325
image-telegraf-raid-plugin:
345-
VERSION=release-1.6.5 ARCH=all make image telegraf-raid-plugin
326+
VERSION=release-1.6.6 GOOS=linux ARCH=all make image telegraf-raid-plugin
346327

347328
%:
348329
@:

Makefile.common.mk

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ endif
88
ModBaseName:=$(notdir $(ModName))
99

1010
DockerImageRegistry?=registry.cn-beijing.aliyuncs.com
11-
DockerImageAlpineBuild?=$(DockerImageRegistry)/yunionio/alpine-build:3.22.0-go-1.24.6-1
12-
DockerImageCentOSBuild?=$(DockerImageRegistry)/yunionio/centos-build:go-1.21.10-0
11+
DockerImageAlpineBuild?=$(DockerImageRegistry)/yunionio/alpine-build:3.22.2-go-1.24.9-0
1312

1413
EnvIf=$(if $($(1)),$(1)=$($(1)))
1514

@@ -29,27 +28,6 @@ endef
2928

3029
tmpName=$(ModBaseName)-$(shell date +"%Y%m%d.%H%M%S%3N")
3130

32-
docker-centos-build: export dockerCentOSBuildCmd:=$(call dockerCentOSBuildCmd,$(F))
33-
docker-centos-build:
34-
docker rm --force docker-centos-build-$(tmpName) &>/dev/null || true
35-
docker run \
36-
--rm \
37-
--name docker-centos-build-$(tmpName) \
38-
-v $(CURDIR):/root/go/src/yunion.io/x/$(ModBaseName) \
39-
-v $(CURDIR)/_output/centos-build:/root/go/src/yunion.io/x/$(ModBaseName)/_output \
40-
-v $(CURDIR)/_output/centos-build/_cache:/root/.cache \
41-
$(DockerImageCentOSBuild) \
42-
/bin/bash -c "$$dockerCentOSBuildCmd"
43-
ls -lh _output/centos-build/bin
44-
45-
# NOTE we need a way to stop and remove the container started by docker-build.
46-
# No --tty, --stop-signal won't work
47-
docker-centos-build-stop:
48-
docker stop --time 0 docker-centos-build-$(tmpName) || true
49-
50-
.PHONY: docker-centos-build
51-
.PHONY: docker-centos-build-stop
52-
5331

5432
define dockerAlpineBuildCmd
5533
set -o xtrace
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
FROM registry.cn-beijing.aliyuncs.com/yunionio/ansibleserver-base:v1.1.3
1+
FROM registry.cn-beijing.aliyuncs.com/yunionio/ansibleserver-base:3.22.2-0
22

3+
# https://github.com/yunionio/telegraf/blob/yn-release-1.36/Makefile.yn#L28
34
# install playbook and telegraf install pkg
4-
COPY --from=registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.5.4 /opt/yunion/playbook /opt/yunion/playbook
5-
COPY --from=registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.5.4 /opt/yunion/ansible-install-pkg /opt/yunion/ansible-install-pkg
5+
COPY --from=registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.5.2 /opt/yunion/playbook /opt/yunion/playbook
6+
COPY --from=registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.5.2 /opt/yunion/ansible-install-pkg /opt/yunion/ansible-install-pkg
67

78
ADD ./_output/alpine-build/bin/ansibleserver /opt/yunion/bin/ansibleserver

build/docker/Dockerfile.ansibleserver-base

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.15.4-0
1+
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
22

3-
MAINTAINER "Yousong Zhou <zhouyousong@yunionyun.com>"
3+
LABEL maintainer="Yousong Zhou <zhouyousong@yunionyun.com>"
44

5-
ENV TZ UTC
5+
ENV TZ="UTC"
66

77
RUN sed -i 's!https://dl-cdn.alpinelinux.org/!https://mirrors.ustc.edu.cn/!g' /etc/apk/repositories
88

@@ -13,6 +13,7 @@ RUN set -x \
1313
&& apk add openssh-client \
1414
&& apk add sshpass \
1515
&& apk add py3-pip \
16+
&& apk add py3-paramiko \
1617
&& apk add tzdata git ca-certificates
1718

1819
RUN apk add --no-cache openssh openssl curl rsync pv mariadb-client
@@ -23,7 +24,7 @@ RUN apk add --no-cache --virtual .build-dependencies \
2324
# after setuptools and wheel
2425
RUN rm /usr/lib/python3.*/EXTERNALLY-MANAGED
2526
RUN pip3 install -U pip setuptools wheel \
26-
&& pip3 install paramiko mysqlclient pywinrm \
27+
&& pip3 install mysqlclient pywinrm \
2728
&& pip3 install 'ansible<=9.0.0' \
2829
&& apk del --no-network .build-dependencies \
2930
&& rm -rf /root/.cache /root/.cargo /var/cache/apk/*

build/docker/Dockerfile.apigateway

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
1+
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
22

33
ADD ./_output/alpine-build/bin/apigateway /opt/yunion/bin/apigateway

build/docker/Dockerfile.apimap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
1+
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
22

33
ADD ./_output/alpine-build/bin/apimap /opt/yunion/bin/apimap
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
FROM registry.cn-beijing.aliyuncs.com/yunionio/baremetal-base:v0.3.9-20231219.0
22

3-
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
3+
LABEL maintainer="Zexi Li <lizexi@yunionyun.com>"
44

55
RUN mkdir -p /opt/yunion/bin
66

7-
ENV TZ UTC
7+
ENV TZ="UTC"
88
ADD ./_output/alpine-build/bin/baremetal-agent /opt/yunion/bin/baremetal-agent

build/docker/Dockerfile.baremetal-base

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
#FROM --platform=linux/amd64 registry.cn-beijing.aliyuncs.com/yunionio/centos-build:1.1-4 as build
21
#RUN yum install -y https://iso.yunion.cn/vm-images/baremetal-pxerom-1.1.0-21092209.x86_64.rpm
32
#RUN yum install -y http://192.168.23.50:8083/baremetal-pxerom-1.1.0-21092209.x86_64.rpm
4-
FROM registry.cn-beijing.aliyuncs.com/yunionio/yunionos:v3.10.8-20231215.0 as yunionos
3+
FROM registry.cn-beijing.aliyuncs.com/yunionio/yunionos:v4.0.0-20251110.1 as yunionos
54

65
FROM centos:8 as grub-stage
76

@@ -28,9 +27,9 @@ RUN cp /root/grub_arm64.efi /tftp
2827
RUN cp -rf /usr/lib/grub/arm64-efi /tftp/grub
2928

3029

31-
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3-3.13.5
30+
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
3231

33-
MAINTAINER "Zexi Li <zexi.li@icloud.com>"
32+
LABEL maintainer="Zexi Li <zexi.li@icloud.com>"
3433

3534
RUN mkdir -p /opt/yunion/bin
3635

@@ -70,6 +69,8 @@ COPY --from=yunionos /yunionos/x86_64/kernel /opt/cloud/yunion/baremetal
7069
COPY --from=yunionos /yunionos/x86_64/initramfs /opt/cloud/yunion/baremetal
7170
COPY --from=yunionos /yunionos/aarch64/kernel /opt/cloud/yunion/baremetal/kernel_aarch64
7271
COPY --from=yunionos /yunionos/aarch64/initramfs /opt/cloud/yunion/baremetal/initramfs_aarch64
72+
COPY --from=yunionos /yunionos/riscv64/kernel /opt/cloud/yunion/baremetal/kernel_riscv64
73+
COPY --from=yunionos /yunionos/riscv64/initramfs /opt/cloud/yunion/baremetal/initramfs_riscv64
7374

7475
# TODO: syslinux firmwares should removed in future
7576
COPY --from=yunionos /yunionos/x86_64/isolinux.bin /opt/cloud/yunion/baremetal

build/docker/Dockerfile.baremetal-base-riscv

Lines changed: 0 additions & 88 deletions
This file was deleted.

build/docker/Dockerfile.climc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM registry.cn-beijing.aliyuncs.com/yunionio/climc-base:20230731.5
1+
FROM registry.cn-beijing.aliyuncs.com/yunionio/climc-base:3.22.2-2
22

33
ADD ./build/climc/root/opt /opt
44

0 commit comments

Comments
 (0)