SVN
- checkout takes out:
svn co <URL>
- update Update: If there is a local warehouse, execute update to get the latest:
svn update
- View all logs:
svn log
- View last 3 versions
svn log -l 3
- commit submit
svn add 文件名
svn commit -m "版本信息"
- Delete files: directly using
rm
commands can not really delete
svn delete 文件名
svn commit -m "版本信息"
- current file status
svn status
- view current version
svn info
docker
- Start the container
docker run -it ubuntu /bin/bash
- nvidia-docker2 start container
docker run -it --gpus all ubuntu /bin/bash
- exit container
exit
- into the container again
docker exec -it <容器ID> /bin/bash
. If you exit from this container, the container will not stop, - Open multiple terminals:
docker exec -it <容器ID> /bin/bash
. - stop container
docker stop <容器 ID>
- Restart the container
docker start <容器 ID>
- Restart the container
docker restart <容器 ID>
- Copy from host to docker
sudo docker cp 本地文件的路径 container_id:<docker容器内的路径>
- Copy from docker to host
sudo docker cp container_id:<docker容器内的路径> 本地文件的路径
- check version
cat /etc/issue
Linux
- Reference GPU status:
nvidia-smi
- View CPU status:
top
- Check disk space:
df -h
- Kill the GUI program:
xkill
- Write physical address:
devmem 0x4000000 32 0x12345678
up to 64 bits - Read physical address:
devmem 0x4000000 32
up to 64 bits - Unzip the file to the current directory:
tar -zxvf 文件名.tar.gz
- Unzip the specified file folder:
tar -zxvf 文件名.tar.gz -C <路径>
- Compressed file:
tar -zcvf tarname.tar.gz dir/files
- Install the deb installation package:
dpkg -i 文件名.deb
- Find characters in the current folder:
grep <字符> -R
petalinux
- clean, delete the build directory, keep the images directory:
petalinux-build -x distclean
- clean, delete all:
petalinux-build -x mrproper
conda
- Conda turns off the automatic activation of the virtual environment:
conda config --set auto_activate_base false
- Enter the base virtual environment
conda activate base
- Exit the virtual environment
conda deactivate
pdb debugging ( official documentation )
- insert breakpoint
import pdb; pdb.set_trace()
- print the context of the running location
l
- print variable
p [变量名]
- Step over without entering the function
n
- Single-step debugging, enter the function
s
- Step out, step out of the current function
r
- continue, run to the next breakpoint
c
- Output the parameter list of the current function
a
vnc viewer
- start up
vncserver
- Set port and screen ratio
vncserver -geometry 2340x1440 :80
- View pre-existing ports and processes
vncserver -list
- kill ports and processes
vncserver -kill :80
vim
- Function jump
Ctrl + ]
, jump back `Ctrl+o - replace full text string
:%s/str1/str2/g
- file comparison
vim -d file1 file2
- choose
v
- copy
y
- Copy word
yaw
, text object: aw: a word; as: a sentence; ap: a paragraph; ab: a piece (included in parentheses). - copy current line
yy
- paste
p
- revoke
u
- recover
ctrl+r
- find up and down
/
N
n
- Select all
ggvG
,gg
move the cursor to the first line, andG
move the cursor to the last line - copy all
ggyG
- delete all
ggdG
- delete current line
dd
- delete word
daw
- jump to the specified line
17G
- Skip to the beginning of the line and enter edit mode directly
I
, jump to the end of the line and enter edit mode directlyA
- Completion
ctrl+n
- Insert blank lines before and after this line and enter edit mode directly
O/o
- highlight
gd
- show line number
:set nu
mpsoc kernel compilation
Operate in the kernel root directory
- clean up project
make ARCH=arm64 CROSS_COMPILE=aarch64-none-elf- distclean
- Configure the kernel using configuration files
make ARCH=arm64 CROSS_COMPILE=aarch64-none-elf- zynqmp_petalinuxconfig_defconfig
- Open the graphical interface to configure the kernel
make ARCH=arm64 CROSS_COMPILE=aarch64-none-elf- menuconfig
- kernel compilation
- make ARCH=arm64 CROSS_COMPILE=aarch64-none-elf- -j 32
- image package image.ub, put .its in the root directory
mkimage -f fit-image-petalinux-user-image.its image.ub