parent
2fe2ee05d6
commit
49bae9bd79
|
@ -0,0 +1,236 @@
|
|||
# LubanCat2 Linux Lite 配置
|
||||
|
||||
```bash
|
||||
sudo touch usb0.network
|
||||
sudo vim usb0.network
|
||||
```
|
||||
|
||||
```usb0.network
|
||||
[Match]
|
||||
Name=usb0
|
||||
|
||||
[Network]
|
||||
Address=192.168.137.2/24
|
||||
Gateway=192.168.137.1
|
||||
DNS=114.114.114.114
|
||||
```
|
||||
|
||||
```bash
|
||||
sudo systemctl enable systemd-networkd
|
||||
sudo systemctl disable NetworkManager
|
||||
vim ~/.bashrc
|
||||
```
|
||||
|
||||
```bashrc
|
||||
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||
# for examples
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
case $- in
|
||||
*i*) ;;
|
||||
*) return;;
|
||||
esac
|
||||
|
||||
# don't put duplicate lines or lines starting with space in the history.
|
||||
# See bash(1) for more options
|
||||
HISTCONTROL=ignoreboth
|
||||
|
||||
# append to the history file, don't overwrite it
|
||||
shopt -s histappend
|
||||
|
||||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||
HISTSIZE=1000
|
||||
HISTFILESIZE=2000
|
||||
|
||||
# check the window size after each command and, if necessary,
|
||||
# update the values of LINES and COLUMNS.
|
||||
shopt -s checkwinsize
|
||||
|
||||
# If set, the pattern "**" used in a pathname expansion context will
|
||||
# match all files and zero or more directories and subdirectories.
|
||||
#shopt -s globstar
|
||||
|
||||
# make less more friendly for non-text input files, see lesspipe(1)
|
||||
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||
|
||||
# set variable identifying the chroot you work in (used in the prompt below)
|
||||
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
|
||||
debian_chroot=$(cat /etc/debian_chroot)
|
||||
fi
|
||||
|
||||
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||
case "$TERM" in
|
||||
xterm-color|*-256color) color_prompt=yes;;
|
||||
esac
|
||||
|
||||
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||
# off by default to not distract the user: the focus in a terminal window
|
||||
# should be on the output of commands, not on the prompt
|
||||
#force_color_prompt=yes
|
||||
|
||||
if [ -n "$force_color_prompt" ]; then
|
||||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||
# We have color support; assume it's compliant with Ecma-48
|
||||
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||
# a case would tend to support setf rather than setaf.)
|
||||
color_prompt=yes
|
||||
else
|
||||
color_prompt=
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$color_prompt" = yes ]; then
|
||||
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
||||
else
|
||||
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||
fi
|
||||
unset color_prompt force_color_prompt
|
||||
|
||||
# If this is an xterm set the title to user@host:dir
|
||||
case "$TERM" in
|
||||
xterm*|rxvt*)
|
||||
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# enable color support of ls and also add handy aliases
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias ls='ls --color=auto'
|
||||
alias dir='dir --color=auto'
|
||||
alias vdir='vdir --color=auto'
|
||||
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
fi
|
||||
|
||||
# colored GCC warnings and errors
|
||||
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
||||
|
||||
# some more ls aliases
|
||||
alias ll='ls -alF'
|
||||
alias la='ls -A'
|
||||
alias l='ls -CF'
|
||||
|
||||
# Alias definitions.
|
||||
# You may want to put all your additions into a separate file like
|
||||
# ~/.bash_aliases, instead of adding them here directly.
|
||||
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
||||
|
||||
if [ -f ~/.bash_aliases ]; then
|
||||
. ~/.bash_aliases
|
||||
fi
|
||||
|
||||
# enable programmable completion features (you don't need to enable
|
||||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||
# sources /etc/bash.bashrc).
|
||||
if ! shopt -oq posix; then
|
||||
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||
. /usr/share/bash-completion/bash_completion
|
||||
elif [ -f /etc/bash_completion ]; then
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
fi
|
||||
|
||||
# Codespaces bash prompt theme
|
||||
__bash_prompt() {
|
||||
PS1='${debian_chroot:+($debian_chroot)}\[\033[00m\][\[\033[0;32m\]\u\[\033[00m\]:\[\033[1;31m\]\h\[\033[00m\]] \[\033[1;34m\]\W\[\033[00m\]\$ '
|
||||
unset -f __bash_prompt
|
||||
}
|
||||
__bash_prompt
|
||||
export PROMPT_DIRTRIM=4
|
||||
|
||||
export GOPATH=/home/cat/go
|
||||
# export GOPATH=/root/go
|
||||
export GOBIN=$GOPATH/bin
|
||||
export PATH=$GOBIN:/go/bin/:$PATH
|
||||
```
|
||||
|
||||
```bash
|
||||
cd /boot/
|
||||
sudo ln -sf dtb/rk3568-lubancat-2io.dtb rk-kernel.dtb
|
||||
cd /boot/uEnv/
|
||||
sudo ln -sf uEnvLubanCat2IO.txt uEnv.txt
|
||||
|
||||
ssh-keygen
|
||||
touch ~/.ssh/authorized_keys
|
||||
su
|
||||
ssh-keygen
|
||||
touch ~/.ssh/authorized_keys
|
||||
```
|
||||
|
||||
```authorized_keys
|
||||
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBBcDkSuBJ+MYBB/b48FMSSWbsnHMHX4/Al94pINz9g2rR1wA5i+0uFNZRIkRNMkiwaRGeWHnL9GYQD44MHh5gjg= cy187@LAPTOP-I7CCLQLD
|
||||
|
||||
```
|
||||
|
||||
![Logo](./img/LubanCat2_Linux_Lite_配置/logo.bmp)
|
||||
|
||||
```bash
|
||||
# 关闭/恢复图形显示器虚拟终端字符登录界面。
|
||||
sudo systemctl mask getty@tty1.service
|
||||
sudo systemctl unmask getty@tty1.service
|
||||
|
||||
su root
|
||||
tar -xvf go1.22.4.linux-arm64.tar.gz
|
||||
mkdir ~/go
|
||||
mv go /
|
||||
go env -w GO111MODULE=on
|
||||
go env -w GOPROXY=https://goproxy.cn
|
||||
|
||||
go install github.com/ramya-rao-a/go-outline@latest
|
||||
go install github.com/go-delve/delve/cmd/dlv@latest
|
||||
go install github.com/mdempsky/gocode@latest
|
||||
go install github.com/uudashr/gopkgs/v2/cmd/gopkgs@latest
|
||||
go install github.com/rogpeppe/godef@latest
|
||||
go install github.com/sqs/goreturns@latest
|
||||
go install github.com/cweill/gotests/gotests@latest
|
||||
go install github.com/fatih/gomodifytags@latest
|
||||
go install github.com/josharian/impl@latest
|
||||
go install github.com/haya14busa/goplay/cmd/goplay@latest
|
||||
go install honnef.co/go/tools/cmd/staticcheck@latest
|
||||
go install golang.org/x/tools/gopls@latest
|
||||
go install golang.org/x/tools/cmd/godoc@latest
|
||||
go install golang.org/x/tools/cmd/goimports@latest
|
||||
```
|
||||
|
||||
```bash
|
||||
sudo apt install qt5-qmake qtbase5-dev qtbase5-dev-tools qt5dxcb-plugin qtchooser qtltools qtdeclarative5-dev qtdeclarative5-dev-tools qtdeclarative5-doc qtmultimedia5-doc qtconnectivity5-dev qtconnectivity5-doc qtgstreamer-plugins-qt5 qtgstreamer-doc qtlocation5-dev qtlocation5-doc qtquickcontrols2-5-dev qtquickcontrols2-5-doc qtscript5-dev qtscript5-doc qtvirtualkeyboard-plugin libqt5multimedia5-plugins libqt5multimediagsttools5 libqt5gstreamer-1.0-0 libqt5gstreamer-dev libqt5gstreamerquick-1.0-0 libqt5gstreamerui-1.0-0 libqt5gstreamerutils-1.0-0 libqt5multimediawidgets5 libqt5multimediaquick5 libqt5multimedia5 libqt5quick5 libqt5qml5 libqt5printsupport5 libqt5quickcontrols2-5 libqt5quickwidgets5 libqt5serialport5-dev libqt5serialport5 libqt5serialbus5-plugins libqt5serialbus5-bin libqt5serialbus5 libqt5serialbus5-dev qtmultimedia5-dev qml-module-qtmultimedia libqt5xdg-dev libqt5xml5 libqt5xmlpatterns5-dev libqt5core5a libqt5network5 libqt5gui5 libqt5quickparticles5 libqt53dquickextras5 libqt53dquickinput5 libqt5positioningquick5 libqt53dquickrender5 libqt53dquickscene2d5 libqt5virtualkeyboard5 libqt5virtualkeyboard5-dev qml-module-qtquick-virtualkeyboard qml-module-qtquick-window2 qml-module-qtquick-shapes qml-module-qtquick-scene2d qml-module-qtquick-privatewidgets qml-module-qtquick-localstorage qml-module-qtquick-extras qml-module-qtquick-dialogs qml-module-qtquick-controls2 qml-module-qtquick-controls qml-module-qt-labs-calendar qml-module-qt-labs-qmlmodels qml-module-qt-labs-folderlistmodel qml-module-gsettings1.0 qml-module-qmltermwidget qml-module-qt-labs-folderlistmodel qml-module-qt-labs-location qml-module-qt-labs-platform qml-module-qt-labs-qmlmodels qml-module-qt-labs-settings qml-module-qt-labs-sharedimage qml-module-qtcharts qml-module-qtmultimedia qml-module-qtlocation qml-module-qtpositioning qml-module-qtqml-statemachine libssl-dev libprotobuf-c-dev libprotobuf-c1 protobuf-c-compiler protobuf-compiler git cmake libasound2-dev
|
||||
```
|
||||
|
||||
```bash
|
||||
cd /usr/share/fonts
|
||||
mkdir haoan
|
||||
cd haoan
|
||||
|
||||
sudo cp HARMONYOS_SANS_SC_* /usr/share/fonts/haoan
|
||||
sudo chmod 644 *
|
||||
sudo mkfontdir
|
||||
sudo mkfontscale
|
||||
sudo fc-cache
|
||||
```
|
||||
|
||||
```bash
|
||||
sudo apt install ./nats-server-v2.9.21-arm64.deb
|
||||
# 编译 nats.c
|
||||
tar -xvf nats.c-3.6.1.tar.gz
|
||||
cd nats.c-3.6.1
|
||||
cmake .
|
||||
make -j4
|
||||
sudo make install
|
||||
sudo ldconfig
|
||||
|
||||
sudo systemctl start haoan-hostcore
|
||||
sudo systemctl enable haoan-hostcore
|
||||
|
||||
sudo systemctl start haoan-nats
|
||||
sudo systemctl enable haoan-nats
|
||||
sudo ./XiaYu -platform linuxfb:fb=/dev/fb0:mmsize=1024x600 -plugin evdevtouch:/dev/input/event2
|
||||
|
||||
sudo systemctl start haoan-xiayu
|
||||
sudo systemctl enable haoan-xiayu
|
||||
```
|
Binary file not shown.
After Width: | Height: | Size: 1.8 MiB |
|
@ -3,6 +3,8 @@
|
|||
## 1.基本指令
|
||||
|
||||
```bash
|
||||
# Attach 到已运行的进程
|
||||
(gdb) attach <pid>
|
||||
# 设置调试目标文件(解决找不到符号或找不到文件问题)
|
||||
(gdb) file <debug targe file>
|
||||
# 开启/关闭伪图形窗口
|
||||
|
|
|
@ -51,6 +51,25 @@ export QT_DEBUG_PLUGINS=1
|
|||
- evdevtablet
|
||||
- evdevtouch
|
||||
|
||||
## 1.2. EGLFS
|
||||
|
||||
```bash
|
||||
export QT_QPA_EGLFS_KMS_CONFIG=kms_config.json
|
||||
export QT_QPA_PLATFORM=eglfs
|
||||
export QT_QPA_EGLFS_INTEGRATION=eglfs_kms
|
||||
export QT_LOGGING_RULES=qt.qpa.*=true
|
||||
export QT_QPA_EGLFS_DEBUG=1
|
||||
```
|
||||
|
||||
sudo cat /sys/kernel/debug/dri/0/summary
|
||||
|
||||
QT_QPA_EGLFS_INTEGRATION:
|
||||
|
||||
- eglfs_x11
|
||||
- eglfs_kms
|
||||
- eglfs_emu
|
||||
- eglfs_kms_egldevice
|
||||
|
||||
## 2. 自启动
|
||||
|
||||
### 2.1. init 方式启动
|
||||
|
|
Loading…
Reference in New Issue