20- Linux system customization
1. Boot self-starting program
Boot self-starting script
Example:
Give the script permission to run
Add the boot startup command to the kickpi.sh script to realize boot self-startup.
2. Language Configuration
After the command is executed, the restart takes effect
Ubuntu 2004
Set English language
Set Chinese language
3. Time zone configuration
After the command is executed, the restart takes effect
Set time zone Asia/Shanghai
Set time zone United States/New York
4. Configure the screen display orientation
View current screen information
According to the printing information, the current system is a single-screen display, and the display device name is HDMI-1.
Rotate the screen display direction
Set the rotation direction of the specified display device
normal: The normal display of the device will be displayed.
left: Rotate the display device 90 degrees counterclockwise.
inverted: Rotates the display device 90 degrees clockwise.
right: Rotate the display device 180 degrees.
Example:
Configure the HDMI-1 display to rotate 90 degrees counterclockwise.
Touch calibration after rotating the screen
installation tool
Check the device and ID.
According to the printing information, the current touch device is "goodix-ts" and the id is 10.
Configure the calibration matrix of the input device
Example:
Set the calibration matrix of the goodix-ts device
$xinput set-prop 10 --type = float "libinput Calibration Matrix" 1.0 0.0 0.0 0.0 1.0 1.0
Configure input device coordinate transformation matrix
Use the corresponding command according to the rotation situation
Example:
Set the coordinate conversion matrix of the goodix-ts device to left
xinput set-prop 10 'Coordinated Transformation Matrix' 0 -1 1 1 0 0 0 0 1
Calibration touch
Example:
Calibration of goodix-ts equipment
$xinput_calibrator -v --device 10
5. Network configuration
Static Internet Protocol Address Configuration
Example: ens33 network interface card configuring static Internet Protocol Address to 192.168.1.50
Common configuration
**Display all network interface information **
Network interface names may vary depending on the actual situation
**Display specific network interface information **
To display information for a specific network interface (e.g. eth0), type'ifconfig eth0'
**Set IP address **
To set the IP address to 192.168.1.101 and the subnet mask to 255.255.255.0 for the eth0 interface, use the command
ifconfig eth0 192.168.1.101 netmask 255.255.255.0
**Enable network interface **
To enable the'eth0 'interface, you can use the'ifconfig eth0 up' command
**Disable network interface **
To disable the'eth0 'interface, use the'ifconfig eth0 down' command
**Set MAC Address **
Different operating systems may have some differences, and some systems may not allow MAC address setting directly through
ifconfig
, or require additional steps
##6. NFS configuration
environment configuration
**Server side **
Configure shared files
startup service
View the current server shared files to prove the shared results
Client side
View server shared files
Mount the folder
Mount successfully
7. Mirror source settings
Check the software version and look for mirror source replacements based on the version
Replace and update the new image source
Attention: Use the mirror source of the arm
8.Chrome Hardware Acceleration Testing
Test platform: RK3568 Debian11 Chrome
test method:
Copy the 1080P and 4K videos to the board and decode them locally through the Chrome browser.
Check GPU occupancy:
Open the frame decoding log and print:
Test Results:
1080P_30 frames per second: GPU occupancy around 42% -48%
Decoding time test result log segment per frame:
4K_30 frames per second: GPU occupancy is around 60% -68%
Decoding time test result log segment per frame:
9. SSH configuration
user:kickpi
password:kickpi
Root password change:
Root connection is not supported by default, root connection needs to be configured.
Notes:
Make sure the board IP is normal.
Make sure that the IP of the board can be connected normally.
10. Touch screen, image interface file manager can't open file
Open Desktop Home and enter File Manager
The second option in the upper right corner edit > > Perferences...
Perferences interface, Navigation on the third page Select Single click to activate items
11. UBUNTU installs packages from the official website
Installing gcc as an example
wget http://ports.ubuntu.com/pool/main/g/gcc-9/gcc-9_9.3.0-10ubuntu2_arm64.deb
sudo dpkg -i *.deb
The website is https://ubuntu.pkgs.org/20.04/ubuntu-main-arm64/gcc-9_9.3.0-10ubuntu2_arm64.deb.html can directly search for the desired dependent package name
12 Backup SD card system
Note: The rootfs replaced in this way may have a mount-mounted UUID problem. You can blkid to check the correct UUID and then modify/etc/fstab.
Connect the U disk on the board, the size is at least 16GB or more, and the packaged mirror image will be relatively large.
Run our packaging script on the board
The generated package name format is as follows: rootfs.img
/mnt/usb directory mounted for USB flash drive
Just burn rootfs separately for the board that needs to replace this system.
13 Ubuntu Desktop into root user
The default login user of the latest desktop version is: kickpi.
The desktop version of Terminal may have permission issues using some commands such as: ifconfig
You need root privileges. You can add sudo in front of the command or enter the root user.
Switch the root user as follows:
Set the root password
Prompt for the current user password, such as: kickpi Prompt New Password: You can enter the root password you want to set (input will not be displayed)
Retype new password: confirm again
Prompt passwd: password updated successfully indicates success
2 Switch to the root user
Enter the password you just set to let the current Terminal enter the root user
Last updated