1.修改ubuntu的root密码
    sudo passwd root

2.vim安装
    vim apt install vim

3.按照ssh服务
    sudo apt update
    sudo apt install openssh-server
    
    启动ssh
    sudo systemctl start ssh
    开机自启

    sudo systemctl enable ssh

    防火墙设置（可选）
    sudo ufw allow ssh

    开启root登录
    sudo vim /etc/ssh/sshd_config
    PermitRootLogin prohibit-password 找到这个，去掉前面的#，proht...改为yes

    重启ssh
    sudo systemctl restart ssh

4.换源
    sudo vim /etc/apt/sources.list
    将里面内容填入该文件中
    {
        deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
        deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
        deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
        deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
        deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
    }

5.开发环境搭建
    sudo apt install gawk wget git diffstat unzip 
    sudo apt install texinfo gcc-multilib build-essential chrpath socat 
    sudo apt install libsdl1.2-dev xterm ncurses-dev lzop libelf-dev make
    sudo apt-get install git ssh make gcc g++ libssl-dev liblz4-tool
    sudo apt-get install expect patchelf chrpath gawk texinfo diffstat binfmt-support
    sudo apt-get install qemu-user-static live-build bison flex fakeroot cmake
    sudo apt-get install gcc-multilib g++-multilib unzip device-tree-compiler ncurses-dev libncurses5-dev


6.泰山派sdk
    解压出来的.repo包执行下面命令
    .repo/repo/repo sync -l -j88
    如果报错：/usr/bin/env: ‘python’: No such file or director
    apt-get install repo

7.编译内核
    ①到解压根目录下执行
        ./build.sh lunch 然后选择3 tspi-v10.mk  || ./build.sh device/rockship/rk356x/BoardConfig-rk3566-tspi-v10.mk
    ②选择buildroot系统
        export RK_ROOTFS_SYSTEM=buildroot
    ③编译
        两种选择，
            编译全部：包括rootfiles，时间长（几个小时），中间易报错。
            仅编译内核：学习设备树或驱动阶段够用，大概半小时，跳过视频教程的docker过程。
        ./build.sh all || ./build.sh kernel

8.泰山派操作手册网址
    https://lceda001.feishu.cn/wiki/Da5owUV4dipiqUkZycbcxckinvc
    
9.vscode ssh连接主机
    root@192.168.xxx.xxxx

10.瑞芯微烧录工具，分散烧录
    网址：https://lceda001.feishu.cn/wiki/Da5owUV4dipiqUkZycbcxckinvc
    第三章，系统SDK编译，下载，分散镜像
    空白区域右键，导入
    ![alt text](image.png)

11.编译好后
    ./mkfirmware.sh
    ./build.sh updateimg

12.rockdev文件夹中会生成update.img
    ![alt text](image-1.png)

13.adb 连接
    烧录好后，设备会被识别为adb设备。
    这个时候，可以通过adb连接调试
    ![alt text](image-2.png)