1. 编译,解压文件 “”
  2. make
  3. 复制生成的文件到 '/etc/sbin/softether'
  4. 添加自启动文件 '/etc/init.d/vpnclient'
  5. 添加网卡配置文件 '/etc/network/interfaces.d/vpn_vpn'
  6. vpncmd 使能远程配置,采用 windows softether client 管理工具远程连接,添加网卡 'VPN', 配置 VPN 连接。

'/etc/init.d/vpnclient'

#!/bin/sh
### BEGIN INIT INFO
# Provides: vpnclient
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Enable Softether vpnclient by daemon.
### END INIT INFO

DAEMON=/usr/sbin/softether/vpnclient
LOCK=/var/lock/subsys/vpnclient

test -x $DAEMON || exit 0
case "$1" in
start)
    $DAEMON start
    touch $LOCK
;;
stop)
    $DAEMON stop
    rm $LOCK
;;
restart)
    $DAEMON stop
    sleep 3
    $DAEMON start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0

'/etc/network/interfaces'

...

source /etc/network/interfaces.d/*

dhcp 配置

allow-hotplug vpn_vpn
iface vpn_vpn inet dhcp

static 配置

allow-hotplug vpn_vpn
iface vpn_vpn inet static
 address 192.168.30.xx
 netmask 255.255.255.0

参考文章
https://wiki.debian.org/Firmware?action=show&redirect=firmware#List_of_firmware_in_Linux_kernel
https://wiki.debian.org/InstallingDebianOn/Intel/NUC7PJYH
https://blog.csdn.net/yizhongliu/article/details/63686230

显卡驱动:
sudo apt install intel-microcode iucode-tool firmware-misc-nonfree

WiFi 驱动

sudo apt-get install firmware-iwlwifi
cd /lib/firmware
sudo cp iwlwifi-7265-9.ucode iwlwifi-3165-9.ucode
sudo cp iwlwifi-7265-17.ucode iwlwifi-3165-17.ucode

sudo apt install xrdp xorgxrdp xserver-xorg-core

``

cinnamon-session

startlxde

startlxqt

startxfce4

echo gnome-session>.xsession


https://help.ubuntu.com/community/xrdp

xrdp

Introduction

xrdp is a Remote Desktop Protocol (RDP) Server, allowing RDP clients to be presented an X windows desktop to the user.

Installation

Simple setup with no user logged into console

This is a simple setup without using TLS and certificates. Also, it requires that no person is logged into the console when attempting to connect.

With Ubuntu 18.04 first install xrdp:

sudo apt-get -y install xrdp

Next, one may adjust the configuration file:

sudo nano /etc/xrdp/xrdp.ini

Set encryption level to high:

encrypt_level=high

Next, allow just RDP through the local firewall:

sudo ufw allow 3389/tcp

Next, create a polkit configuration file:

sudo nano /etc/polkit-1/localauthority.conf.d/02-allow-colord.conf

and input inside it:

polkit.addRule(function(action, subject) {
if ((action.id == “org.freedesktop.color-manager.create-device” || action.id == “org.freedesktop.color-manager.create-profile” || action.id == “org.freedesktop.color-manager.delete-device” || action.id == “org.freedesktop.color-manager.delete-profile” || action.id == “org.freedesktop.color-manager.modify-device” || action.id == “org.freedesktop.color-manager.modify-profile”) && subject.isInGroup(“{group}”))
{
return polkit.Result.YES;
}
});

Finally, restart xrdp and you should be able to connect:

sudo /etc/init.d/xrdp restart

FAQ

From Windows, attempting to connect one gets the error message:

Remote Desktop Connection
The connection cannot proceed because authentication is not enabled and the remote computer requires that authentication be enabled to connect.

This can happen if TLS is setup incorrectly.

From Windows, use Remote Desktop Connect to connect, and after inputting the username and password at the xrdp login screen one gets a password prompt noting:

Authentication Required
Authentication is required to create a color profile

However, the prompt reappears after inputting the correct password. This is due to not adding a polkit rule.
From Windows, use Remote Desktop Connect to connect, at the xrdp login screen using Session Xorg, after inputting the username and password one gets a blank screen. This can happen due to how one is logged into Ubuntu at the console. Unfortunately, by default it does not act like Windows, where the console will become locked, and the console session will be redirected to the RDP connection. One will have to log out first.

From Windows, use Remote Desktop Connect to connect, at the xrdp login screen using Session Xorg, after inputting the username and password one logs in but no docks exists. Log out of the RDP session, at the console login screen login click the gear icon and choose Ubuntu > open the application Tweaks > Extensions > Ubuntu dock > ON 

External Links

xrdp homepage https://github.com/neutrinolabs/xrdp

使用 QEMU 运行 RT-Thread
qemu-system-arm仿真vexpress-a9踩坑记

buildroot 编译:

修改 qemu_arm_vexpress_defconfig, 添加 linux kernel git 地址:

# Architecture
BR2_arm=y
BR2_cortex_a9=y
BR2_ARM_ENABLE_NEON=y
BR2_ARM_ENABLE_VFP=y
BR2_ARM_FPU_VFPV3D16=y

# System
BR2_SYSTEM_DHCP="eth0"
BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"

# Filesystem
BR2_TARGET_ROOTFS_EXT2=y
# BR2_TARGET_ROOTFS_TAR is not set

# Linux headers same as kernel, a 4.19 series
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y

# Kernel
BR2_LINUX_KERNEL=y

#BR2_LINUX_KERNEL_CUSTOM_VERSION=y
#BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.90"
BR2_LINUX_KERNEL_CUSTOM_GIT=y
BR2_LINUX_KERNEL_CUSTOM_REPO_URL="http://172.17.0.1:3000/<path>/linux-4.19.90.git"
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="b27c50698362fa3269acbafea0006053883cf696"

BR2_LINUX_KERNEL_DEFCONFIG="vexpress"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="vexpress-v2p-ca9"

# host-qemu for gitlab testing
BR2_PACKAGE_HOST_QEMU=y
BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y

开始编译:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- qemu_arm_vexpress_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-

输出目录文件:

  • ./output/images
  • rootfs.ext2
  • vexpress-v2p-ca9.dtb
  • zImage

根文件目录:

  • ./output/target

qemu 运行

  • -M: 指定模拟器类型
  • -cpu:指定 CPU 类型
  • -m: 指定内存大小
  • -kernel:指定内核文件
  • -dtb: dtb 文件
  • -append:kernel 内核参数, "root=/dev/mmcblk0 console=ttyAMA0"
  • -serial: 指定串行接口数据
  • -sd: 指定 SD 镜像文件挂载
  • -net nic -net tap,ifname=tap:tap 虚拟网卡
  • -display: 显示模式,例如: "-display sdl"
  • -S: Do not start CPU at startup (you must type ’c’ in the monitor).
@echo off
if exist sd.raw goto run
qemu-img create -f raw sd.raw 32M

:run
qemu-system-arm -M vexpress-a9 -cpu cortex-a9 -m 256 -kernel zImage -s -serial stdio -sd rootfs.ext2 -dtb vexpress-v2p-ca9.dtb -append "root=/dev/mmcblk0 console=ttyAMA0" -net nic -net tap,ifname=tap -display sdl

制作 ext2 格式的 sd 卡
dd if=/dev/zero of=a9rootfs.ext2 bs=1M count=32
mkfs.ext2 a9rootfs.ext2
sudo mkdir tmpfs
sudo mount -t ext2 a9rootfs.ext2 tmpfs/ -o loop
sudo cp zImage.img //将用mkimage制作好的内核文件拷到此处
sudo umount tmpfs