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

Support loongson, loongarch, 龙芯CPU' translates to English as: 'Support loongson, loongarch, Loongson CPU #2689

Closed
winlinvip opened this issue Oct 24, 2021 · 9 comments
Assignees
Labels
Feature It's a new feature. TransByAI Translated by AI/GPT.
Milestone

Comments

@winlinvip
Copy link
Member

winlinvip commented Oct 24, 2021

LOONGARCH

The multimedia open-source project that Loongson has already adapted: Media

  • Audio and video application development framework, audio and video codec projects: FFmpeg, X264, OpenH264, libvpx, libyuv
  • Basic compression and decompression, image codec, and graphics rendering projects: zlib, libpng, libjpeg-turbo, pixman, skia
  • High-performance mathematical libraries for signal processing, linear algebra, etc.: OpenBLAS, FFT

If you want to use Loongson servers for video cloud, you still need a streaming media server.

Build Loongarch SRS in Qemu

Loongson has a QEMU image that can be run on the local machine. Below are the steps to follow.

First, download the QEMU environment. For macOS, execute the following command. For other systems, refer to this link:

brew install qemu

Then, download the Loongson ISO image. It's still on the way, please wait...

LOONGSON 3A5000/3B5000

Loongson 3A5000/3B5000

The Loongson 3A5000/3B5000 is a general-purpose processor designed for personal computers, servers, and other information technology fields. It is based on the Loongson proprietary instruction set architecture (LoongArch®) and the LA464 microarchitecture, which further improves frequency, reduces power consumption, and optimizes performance. While maintaining pin compatibility with the Loongson 3A4000 processor, the frequency has been increased to 2.5GHz, power consumption has been reduced by over 30%, and performance has been improved by over 50%. The Loongson 3B5000, based on the Loongson 3A5000, supports multi-way interconnection.

image

ST for LOONGARCH

First, it is necessary to adapt ST to the Loongson CPU. SRS 5.0 already supports this, please refer to ST #24.

For the adapted code, please refer to the commit: ossrs/state-threads@db42969

Build for LOONGARCH

Additional compilation options for some dependent libraries need to be adapted, mainly for SRTP and Opus. Please refer to the commit: 5b44cc6

TRANS_BY_GPT3

@winlinvip winlinvip self-assigned this Oct 24, 2021
@winlinvip winlinvip added this to the 5.0 milestone Oct 24, 2021
@winlinvip winlinvip added the Feature It's a new feature. label Oct 24, 2021
winlinvip added a commit that referenced this issue Oct 24, 2021
@apt-getyou
Copy link

apt-getyou commented Oct 27, 2021

Is there a planned cycle at the moment?

TRANS_BY_GPT3

@yinshiyou
Copy link

yinshiyou commented Oct 27, 2021

The LoongArch platform adaptation for SRS is now available. Users have several ways to obtain the Loongson platform for testing:

  1. Apply for a free Loongson cloud host, with the recommendation to include the remark "3A5000 + required mapping ports": https://www.loongson.cn/loongsonCloud
  2. Download QEMU or KVM virtual machines: Currently, on GitHub, you can also download virtual machines with the LoongArch architecture (uploaded by Loongson experts to their own repositories). The official version is on its way, so you won't have to wait too long, but for now, you can use option one.

TRANS_BY_GPT3

@Dr-624
Copy link

Dr-624 commented Mar 7, 2022

Does the boss have any plans for future adaptation to Shenwei?

TRANS_BY_GPT3

@Dr-624
Copy link

Dr-624 commented Mar 7, 2022

Currently, when reaching the step of 'make', it will report an error of undefined reference to '_st_md_cxt_save'.
1f4af33e061222f554d47ef31d15173

TRANS_BY_GPT3

@yinshiyou
Copy link

yinshiyou commented Mar 9, 2022

Refer to the implementation of other platforms in trunk/3rdparty/st-srs/md_linux.S and add the implementation for Shenwei.

TRANS_BY_GPT3

@Dr-624
Copy link

Dr-624 commented Mar 9, 2022 via email

@winlinvip
Copy link
Member Author

winlinvip commented Aug 9, 2022

龙芯mips64' translates to 'Loongson MIPS64'.

ST adaptation 1589858
openssl adaptation 14832b6 079ac10
FFmpeg adaptation 1ab584b

TRANS_BY_GPT3

@xiangleiren
Copy link

xiangleiren commented Jun 17, 2023

Currently, when reaching the "make" step, it will report an "undefined reference to '_st_md_cxt_save'" error 1f4af33e061222f554d47ef31d15173

Have you solved it? I am also facing this problem.

TRANS_BY_GPT3

@xiangleiren
Copy link

xiangleiren commented Jun 17, 2023

Hello, there is a problem with compiling on sw_64. Can you please provide some solutions? Thank you.
image

TRANS_BY_GPT3

@winlinvip winlinvip changed the title Support loongson, loongarch, 龙芯CPU Support loongson, loongarch, 龙芯CPU' translates to English as: 'Support loongson, loongarch, Loongson CPU Jul 28, 2023
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature It's a new feature. TransByAI Translated by AI/GPT.
Projects
None yet
Development

No branches or pull requests

5 participants