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

WIP: feat: loong64 support for reh server #2084

Closed

Conversation

darkyzhou
Copy link
Contributor

This PR introduces loong64 support for REH server. The loong64 is a RISC-style ISA developed by Loongson.

I am still working on porting the client to loong64, and will open another PR soon.

WIP: This PR uses ghcr.io/darkyzhou/vscodium-linux-build-agent:trixie-devtoolset-loong64 for VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME, which will be updated after VSCodium/vscode-linux-build-agent#23 gets merged.

BTW, once this gets merged, can we build reh server on loong64 for older releases? Other VSCode variants like Cursor still uses 1.93.1.

@daiyam
Copy link
Member

daiyam commented Nov 3, 2024

I think I need to take the time to split the ppc64le-and-riscv64-support.patch. We can't have 3 architectures in the same file.

WIP: This PR uses ghcr.io/darkyzhou/vscodium-linux-build-agent:trixie-devtoolset-loong64 for VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME, which will be updated after VSCodium/vscode-linux-build-agent#23 gets merged.

It has been merged

BTW, once this gets merged, can we build reh server on loong64 for older releases? Other VSCode variants like Cursor still uses 1.93.1.

We would need to:

They seem to have a 1-month delay so I think it's better to wait.

@darkyzhou
Copy link
Contributor Author

I do think ppc64le-and-riscv64-support.patch is quite awkward, let me first split the loong64 part out of it. Then, I will update the VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME

@darkyzhou
Copy link
Contributor Author

darkyzhou commented Nov 3, 2024

After splitting, it seems the two patches cannot be applied together, so I think we need two new folders: patches/linux/loong64 and patches/linux/ppc64le-or-riscv64 containing each of the patches. (or three new folders if you manages to split ppc64le-and-riscv64-support.patch apart later)

In prepare_vscode.sh we check the $VSCODE_ARCH to decide which patch to apply, what do you think?

(BTW, it's midnight now in my time zone, I might not respond until morning)

@daiyam
Copy link
Member

daiyam commented Nov 4, 2024

I've split the ppc64le-and-riscv64-support.patch into 3 files (arch-0-support.patch, arch-1-ppc64le.patch and arch-2-riscv64.patch)
Thoses patches depend on the previous ones (arch-2-riscv64.patch depends on arch-0-support.patch and arch-1-ppc64le.patch)
But each patch has is specific role:

  • arch-0-support.patch adds common functionalities to add new arch
  • arch-1-ppc64le.patch adds only ppc64le
  • arch-2-riscv64.patch adds only riscv64

So to add/edit your new arch, you will need to run the command ./patch.sh linux/arch-0-support linux/arch-1-ppc64le linux/arch-2-riscv64 linux/arch-3-loong64, do your edit and complete the command when done.
The ./patch.sh will apply the 3 patches and when you are done, it will create/edit your linux/arch-3-loong64.patch.

--- a/build/npm/postinstall.js
+++ b/build/npm/postinstall.js
@@ -56,3 +56,3 @@ function yarnInstall(dir, opts) {
@@ -53,8 +53,10 @@ function npmInstall(dir, opts) {
log(dir, `Installing dependencies inside container ${process.env['VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME']}...`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the command ./patch.sh linux/yarn-dependencies.patch to edit that file. It will remove the extra lines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants