User Tools

Site Tools


vscode

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
vscode [2025/06/28 07:38] – created zhangykvscode [2025/07/03 07:10] (current) zhangyk
Line 14: Line 14:
 # Patchelf / VS Code # Patchelf / VS Code
 source /home/usr/share/sysroot/sysroot.sh source /home/usr/share/sysroot/sysroot.sh
 +```
 +or
 +```
 +# Patchelf / VS Code
 +source /home/usr/share/sysroot/sysroot.csh
 ``` ```
  
Line 52: Line 57:
 ``` ```
  
 +Maybe you shall remove some experiment variables first, such as `LD_LIBRARY_PATH`, otherwise some unexpected errors.
 ``` ```
 mkdir toolchain-dir mkdir toolchain-dir
Line 79: Line 85:
 ## 3.4. Add a source file ## 3.4. Add a source file
 This is a script for use's convenience. It defines three variables to help VS Code to find the files. I put the script in `sysroot` This is a script for use's convenience. It defines three variables to help VS Code to find the files. I put the script in `sysroot`
 +
 +`sysroot.sh`
 ```sh ```sh
 # Path to the dynamic linker in the sysroot (used for --set-interpreter option with patchelf) # Path to the dynamic linker in the sysroot (used for --set-interpreter option with patchelf)
Line 86: Line 94:
 # Path to the patchelf binary on the remote host # Path to the patchelf binary on the remote host
 export VSCODE_SERVER_PATCHELF_PATH=/home/usr/share/sysroot/usr/bin/patchelf export VSCODE_SERVER_PATCHELF_PATH=/home/usr/share/sysroot/usr/bin/patchelf
 +```
 +`sysroot.csh`
 +```csh
 +# Path to the dynamic linker in the sysroot (used for --set-interpreter option with patchelf)
 +setenv VSCODE_SERVER_CUSTOM_GLIBC_LINKER /home/usr/share/sysroot/lib/ld-linux-x86-64.so.2
 +# Path to the library locations in the sysroot (used as --set-rpath option with patchelf)
 +setenv VSCODE_SERVER_CUSTOM_GLIBC_PATH /home/usr/share/sysroot/usr/lib:/home/usr/share/sysroot/lib
 +# Path to the patchelf binary on the remote host
 +setenv VSCODE_SERVER_PATCHELF_PATH /home/usr/share/sysroot/usr/bin/patchelf
 ``` ```
  
Line 92: Line 109:
 chmod 755 sysroot chmod 755 sysroot
 vi sysroot/sysroot.sh vi sysroot/sysroot.sh
 +vi sysroot/sysroot.csh
 chmod 555 sysroot chmod 555 sysroot
 ``` ```
Line 105: Line 123:
 ``` ```
 source /home/usr/share/sysroot/sysroot.sh source /home/usr/share/sysroot/sysroot.sh
 +source /home/usr/share/sysroot/sysroot.csh
 ``` ```
 </markdown> </markdown>
vscode.1751096286.txt.gz · Last modified: 2025/06/28 07:38 by zhangyk