Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Jinyu007
Copy link
Contributor

What this PR does / why we need it:

This patch enables cloudpos basic service image to be built on RISC-V platforms.

Does this PR need to be backport to the previous release branch?:

NONE

[root@fedora-riscv ~]# uname -a
Linux fedora-riscv 6.1.15 #4 SMP PREEMPT Mon Jul 15 09:53:57 CST 2024 riscv64 GNU/Linux
[root@fedora-riscv ~]# lscpu
Architecture:           riscv64
  Byte Order:           Little Endian
CPU(s):                 8
  On-line CPU(s) list:  0-7
Vendor ID:              0x710
  Model name:           Spacemit(R) X60
    CPU family:         0x8000000058000001
    Model:              0x1000000049772200
    Thread(s) per core: 1
    Core(s) per socket: 8
    Socket(s):          1
    CPU(s) scaling MHz: 100%
    CPU max MHz:        1600.0000
    CPU min MHz:        614.4000
Caches (sum of all):
  L1d:                  256 KiB (8 instances)
  L1i:                  256 KiB (8 instances)
  L2:                   1 MiB (2 instances)
[root@fedora-riscv ~]# docker image ls
REPOSITORY                                              TAG                IMAGE ID       CREATED        SIZE
scheduler                                               latest             df8b7740db24   10 hours ago   132MB
scheduledtask                                           latest             b6a2e1b0ddc9   10 hours ago   59.4MB
s3gateway                                               latest             5a21bf0c2812   10 hours ago   108MB
monitor                                                 latest             d16e4314d548   10 hours ago   66.3MB
logger                                                  latest             3b73b0757493   10 hours ago   46.8MB
lbagent                                                 latest             0d966ee66726   10 hours ago   1.31GB
keystone                                                latest             306404a17b8c   10 hours ago   52.1MB
host-health                                             latest             e91af2e66867   10 hours ago   62.4MB
debian-base                                             latest             f727204f255a   10 hours ago   723MB
host-image                                              latest             b738e0d35631   10 hours ago   43.4MB
devtool                                                 latest             2fdcf51263cc   10 hours ago   61MB
cloudproxy                                              latest             f0f4be93c55c   10 hours ago   60.6MB
cloudnet                                                latest             a52cbc0a6e51   10 hours ago   47.7MB
cloudmon                                                latest             fdf7942e919f   10 hours ago   114MB
cloudid                                                 latest             397800b23be6   10 hours ago   112MB
cloudevent                                              latest             cc60ee8d4308   10 hours ago   116MB
apimap                                                  latest             b8f4d62ff3cd   10 hours ago   130MB
lbagent-base                                            latest             10fea807086a   2 days ago     1.2GB
kubectl                                                 latest             8c77d296be49   2 days ago     67.6MB
ansibleserver                                           latest             6f737652041a   2 days ago     1.64GB
file-repo                                               yunionio           f40042a21b14   2 days ago     38.3MB
file-repo                                               latest             42637cae9506   2 days ago     30.8MB
telegraf-ci                                             latest             7a6a711f1f42   2 days ago     1.23GB
telegraf                                                5a38b81f           96421769f434   2 days ago     114MB
debian                                                  trixie-backports   73396a1ad814   3 weeks ago    105MB
climc                                                   latest             ae51dfb353d6   5 weeks ago    292MB
climc-base                                              latest             951d87d33ece   5 weeks ago    137MB
region                                                  latest             73b5eceea87d   5 weeks ago    184MB
apigateway                                              latest             edcfd393ccdc   5 weeks ago    75.5MB
esxi-agent                                              latest             1fe6479293c8   5 weeks ago    78.4MB
notify                                                  latest             7bf9e29215af   5 weeks ago    52MB
dhcprelay                                               latest             2c84bfa155b1   5 weeks ago    41.1MB
alpine-build                                            latest             6bd9e3d8c6c8   5 weeks ago    972MB
openvswitch                                             latest             d1fa050ab322   5 weeks ago    303MB
buildroot                                               latest             c37bc0ae8355   6 weeks ago    2.66GB
<none>                                                  <none>             f98be563ef7f   7 weeks ago    137MB
ansibleserver-base                                      latest             b84e966e3c15   7 weeks ago    1.59GB
onecloud-base                                           latest             2cda7ca8cf9a   8 weeks ago    16.7MB
fedora-riscv64                                          42                 039adef527d9   5 months ago   155MB
hello-world                                             latest             0079a746a6c9   8 months ago   5.15kB
registry.cn-beijing.aliyuncs.com/yunionio/buildroot     2021.08.2-0        32ddc870e666   3 years ago    615MB
registry.cn-beijing.aliyuncs.com/yunionio/telegraf-ci   1.16.6             d366fc531715   4 years ago    1.05GB
[root@fedora-riscv ~]#

@zexi
Copy link
Member

zexi commented Oct 29, 2025

@Jinyu007 怎么在 RISC-V 的机器上,制作出 region, scheduler 这些镜像呢,直接使用 ARCH=riscv make image region 能制作出来 RISC-V 架构的镜像吗?
应该需要修改 https://github.com/yunionio/cloudpods/blob/master/scripts/docker_push.sh#L91 这个脚本,支持 riscv 的镜像编译。

@Jinyu007 Jinyu007 force-pushed the riscv-images-support branch from e3f2f28 to 976e3dd Compare October 29, 2025 07:12
@Jinyu007
Copy link
Contributor Author

@Jinyu007 怎么在 RISC-V 的机器上,制作出 region, scheduler 这些镜像呢,直接使用 ARCH=riscv make image region 能制作出来 RISC-V 架构的镜像吗? 应该需要修改 https://github.com/yunionio/cloudpods/blob/master/scripts/docker_push.sh#L91 这个脚本,支持 riscv 的镜像编译。

已按照要求对 docker_push.sh 完成修改,PR 描述中展示的镜像均为 RISC-V 进迭时空 K60 上的构建结果,region 和 scheduler 在通过 onecloud-base 进行 RISC-V 构建并推送到阿里云的镜像站之后均可顺利构建。

@swordqiu
Copy link
Member

@Jinyu007 container-images repo里的镜像也需要适配

@Jinyu007
Copy link
Contributor Author

@Jinyu007 container-images repo里的镜像也需要适配

container-images 内的 calico,centos 上游缺乏 RISC-V 架构支持,workaround 工作量极大,可行性不高,需要等到上游支持后才能继续推进。

PR 描述中出现的镜像已经是目前 RISC-V 上可以推进到的最大镜像支持集合,可否先合入这个PR?

@swordqiu
Copy link
Member

@Jinyu007

请评估一下这几个镜像的适配:

  • host-deployer-base
  • openvswitch
  • host-base

@swordqiu
Copy link
Member

@Jinyu007 如果要合入PR,请修改scripts/docker_push.sh,只有在显式指定ARCH=riscv64时才制作riscv镜像,否则会对现有ci有破坏性影响

@Jinyu007 Jinyu007 force-pushed the riscv-images-support branch from 976e3dd to 95695ed Compare October 30, 2025 03:21
@Jinyu007
Copy link
Contributor Author

@Jinyu007 如果要合入PR,请修改scripts/docker_push.sh,只有在显式指定ARCH=riscv64时才制作riscv镜像,否则会对现有ci有破坏性影响

已修改,请审阅

@Jinyu007
Copy link
Contributor Author

@Jinyu007

请评估一下这几个镜像的适配:

  • host-deployer-base
  • openvswitch
  • host-base

openvswich 与 host-base 可以支持 RISC-V 架构,PR会在整理后提出。

host-deployer-base 需要 yunionos 的支持,编译对应的内核以及PXE,详细情况见结项报告

@Jinyu007 Jinyu007 force-pushed the riscv-images-support branch from 95695ed to bf40774 Compare October 30, 2025 03:35
This patch enables cloudpos basic service image to be built on RISC-V
platforms and support build script to work on RISC-V platforms.

Signed-off-by: Jinyu Zhao <[email protected]>
@Jinyu007 Jinyu007 force-pushed the riscv-images-support branch from bf40774 to 2b0903d Compare October 30, 2025 03:36
@Jinyu007
Copy link
Contributor Author

@swordqiu container-images 中 openvswitch,alpine-build 以及 host-base 的构建支持 PR:yunionio/container-images#31

@swordqiu
Copy link
Member

/lgtm

@swordqiu swordqiu merged commit 07d1cec into yunionio:master Oct 31, 2025
1 check was pending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants