Summary of SS626V100_SDK_V2.0.1.0 installation and compilation osdrv problems

Directory

  • Preface
  • 1. Development environment
  • 2. Install the cross tool chain on the linux server
    • 2.1 Install aarch64-mix410-linux.tgz
    • 2.2 Install cc-riscv32-cfg11-musl-20220523-elf.tar.gz
    • 2.3 Check the tool chain version. Printing the version means the configuration is successful.
  • 3. Install SDK
    • 3.1 SS626V100_SDK_V2.0.1.0 installation package location
    • 3.2 Unzip and expand the SDK package
  • 4. Install software packages and build environment
    • 4.1 Install software packages
    • 4.2 mtd-utils depends on the following libraries, installation methods
    • 4.3 Set the pkg-config tool search path
    • 4.4 e2fsprogs depends on the texlive library
    • 4.5 boot, optee module dependency library
      • 4.5.1 Python-3.6.9 installation
      • 4.5.2 wheel, pycryptodome, pyelftools source code installation
    • 4.6 Tools that need to be installed for LiteOS compilation include python, pip and kconfiglib
      • 4.6.1 Make sure the server has python installed
      • 4.6.2 Make sure the server has pip installed
  • 5. Summary of compilation process problems and solutions
  • 6. Compile osdrv
    • 6.1 Completely clear the entire osdrv directory
    • 6.2 Compile the entire osdrv directory
  • Summarize

Foreword

  1. This article is suitable for everyone who needs to install SS626V100_SDK_V2.0.1.0;
  2. In order to improve the efficiency of SDK installation, it is recommended to perform the installation steps in order.

1. Development environment

windows10 computer + virtual machine 15 Pro + Ubuntu18.0.4

2. Install the cross tool chain on the linux server

2.1 Install aarch64-mix410-linux.tgz

tar -zxf aarch64-mix410-linux.tgz
cd aarch64-mix410-linux/
chmod +x aarch64-mix410-linux.install
sudo ./aarch64-mix410-linux.install
source /etc/profile

2.2 Install cc-riscv32-cfg11-musl-20220523-elf.tar.gz

tar -zxf cc-riscv32-cfg11-musl-20220523-elf.tar.gz
cd cc-riscv32-cfg11-musl-20220523-elf/
sudo ./install.sh
cd cc-riscv32-cfg11-musl-20220523-elf/bin
echo "export PATH=$(pwd):\${<!-- -->PATH}" >> $HOME/.profile
source ~/.profile

2.3 Check the tool chain version, printing the version means the configuration is successful

aarch64-mix410-linux-gcc -v
riscv32-cfg11-musl-20220523-elf-gcc -v

*Note: In order for the tool chain to take effect in a timely manner, it is strongly recommended to restart the server.

3. Install SDK

3.1 SS626V100_SDK_V2.0.1.0 installation package location

  1. Basic package: SS626V100R001***\SS626V100R001C02SPC010\01.software\board\ SS626V100_SDK_V2.0.1.0.tgz
  2. Enhancement package: SS626V100R001***\SS626V100R001C02SPC010\02.only for reference\software\SS626V100_REF_V2.0.1.0.tgz
  3. Enhancement package script: SS626V100R001***\SS626V100R001C02SPC010\02.only for reference\software\ref_patch.sh
  4. Basic patch package: SS626V100R001***\SS626V100R001C02SPC010CP0001\01.software\board\ SS626V100_SDK_V2.0.1.0_CP0001.tgz
  5. Enhanced patch package: SS626V100R001***\SS626V100R001C02SPC010\02.only for reference\software\SS626V100_REF_V2.0.1.0_CP0001.tgz

3.2 Unzip and expand the SDK package

  • To use the basic package and enhanced package, the specific steps are as follows:

    Step 1. Place the basic package SS626V100_SDK_V2.0.1.0.tgz and the basic patch package SS626V100_SDK_V2.0.1.0_CP0001.tgz in the same directory and extract them:

    tar -zxf SS626V100_SDK_V2.0.1.0.tgz
    tar -zxf SS626V100_SDK_V2.0.1.0_CP0001.tgz
    

    Step 2. Copy the files in the SS626V100_SDK_V2.0.1.0_CP0001 software package and overwrite the files in the corresponding directory in SS626V100_SDK_V2.0.1.0:

    cp SS626V100_SDK_V2.0.1.0_CP0001/* SS626V100_SDK_V2.0.1.0/ -r
    

    Step 3. Patch the enhancement package, unzip the enhancement package SS626V100_REF_V2.0.1.0.tgz and the enhancement patch package SS626V100_REF_V2.0.1.0_CP0001.tgz, copy the files of SS626V100_REF_V2.0.1.0_CP0001 and overwrite SS626V100_REF_V2.0.1 .0 in the corresponding directory Files for:

    tar -zxf SS626V100_REF_V2.0.1.0.tgz
    tar -zxf SS626V100_REF_V2.0.1.0_CP0001.tgz
    cp SS626V100_REF_V2.0.1.0_CP0001/* SS626V100_REF_V2.0.1.0/ -r
    

    2. Execute internal decompression of SS626V100_SDK_V2.0.1.0 folder:

    cd SS626V100_SDK_V2.0.1.0
    ./sdk.unpack
    

    3. Copy the enhancement package script ref_patch.sh to the same directory as SS626V100_SDK_V2.0.1.0, and perform the patching operation:

    cd ../
    cp /samba/ref_patch.sh ./
    chmod +x ref_patch.sh
    ./ref_patch.sh
    

    *Note: After performing the above steps, SS626V100_SDK_V2.0.1.0 is a complete package with the REF enhancement patch.

4. Installing software packages and setting up the environment

4.1 Installing software packages

sudo apt-get install make libc6-i386 lib32z1 lib32stdc + + 6 zlib1g-dev libncurses5-dev ncurses-term libncursesw5-dev g + + u-boot-tools texinfo texlive gawk libssl-dev openssl bc p7zip-full gperf bison flex diffutils git unzip libtool autopoint gettext po4a

*Note: If you adopt a one-time installation method, there may be a risk of missing the installation of dependent libraries. It is recommended to install them manually one by one. (Otherwise, the compilation process may prompt that some dependent libraries do not exist. warn).

4.2 mtd-utils depends on the following libraries, installation methods

sudo apt-get install zlib1g-dev
sudo apt-get install liblzo2-dev
sudo apt-get install uuid-dev
sudo apt-get install pkg-config
sudo apt-get install automake
sudo apt-get install autoconf
sudo apt-get install m4

4.3 Set pkg-config tool search path

export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/lib/x86_64-linux-gnu/pkgconfig"

4.4 e2fsprogs depends on the texlive library

sudo apt-get install texlive

4.5 boot, optee module dependency library

  • Version installation package download link: python3.6.9, pip3, wheel, pycryptodome, pyelftools

4.5.1 Python-3.6.9 installation

Method 1, offline download and manual installation:

tar -zxf Python-3.6.9.tgz
cdPython-3.6.9/
./configure
make
make install

Method 2, download and install automatically online:

sudo apt-get install update
sudo apt-get install python3.6=3.6.9

4.5.2 wheel, pycryptodome, pyelftools source code installation

tar -zxf wheel-0.36.2.tar.gz
cd wheel-0.36.2
sudo python3.7 setup.py install
sudo pip3 install pycryptodome-3.9.8-cp37-cp37m-manylinux1_x86_64.whl
sudo pip3 install pyelftools-0.27-py2.py3-none-any.whl

*Note: pycryptodome and pyelftools need to be copied to the wheel-0.36.2 directory after downloading.

Tools that need to be installed for 4.6 LiteOS compilation include python, pip and kconfiglib

4.6.1 Make sure the server has python installed

  • If the version number is displayed, it means that python is installed successfully, otherwise “Refer to step 4.5.1” to complete the installation:
    python3.6 -V
    

4.6.2 Make sure the server has pip installed

  • If the pip command does not exist, it needs to be installed. pip depends on setuptools. If setuptools does not exist, it also needs to be installed.

  • setuptools installation:
    Click the setuptools source code package download address, and you can refer to the following command to install it:

    sudo unzip setuptools-50.3.2.zip
    cd setuptools
    sudo python3.6 setup.py install
    
  • pip installation:
    Click the pip source code package download address, and you can refer to the following command to install it:

    sudo tar -zxf pip-20.2.4.tar.gz
    cd pip-20.2.4
    sudo python3.6 setup.py install
    
  • Install kconfiglib:
    1. If the server can be connected to the Internet, install kconfiglib directly:

    sudo pip3 install kconfiglib
    

    2. If the server cannot connect to the Internet, install it offline (download kconfiglib):
    (1) Wheel file installation command:

    sudo pip3 install kconfiglib-14.1.0-py2.py3-none-any.whl
    

    (2) Installation command of kconfiglib source code file:

    sudo tar -zxf kconfiglib-14.1.0.tar.gz
    cd kconfiglib-14.1.0
    sudo python3.6 setup.py install
    

5. Summary of compilation process problems and solutions

  • Some of the following problems were encountered when installing the SS626V100_SDK_V2.0.0.3 version and will be listed repeatedly here.

  • Question 1: The riscv32-cfg11-musl-20220523-elf compiler cannot be found in the environment variables
    riscv

  • Solution:

    After confirming that the riscv32 tool chain has been installed, restart the virtual machine.

  • Problem 2: The meruconfig.h header file cannot be found
    menuconfig

  • Solution:

    【1】First confirm whether python, pip and kconfiglib are installed successfully. If they are installed successfully, re-execute the “setuptools installation” step.
    [2] If you still get the same error after executing [1], it may be that the default python version (such as python 2.7) is used, and the latest version of setuptools does not support python 2.7. Please download setuptools version 45.0.0 To support python 2.7. The installation steps are as follows:
    sudo unzip setuptools-45.0.0.zip
    cd setuptools-45.0.0
    sudo python setup.py install

  • Question 3:
    Question 1

  • Solution:

    sudo apt-get install libssl-dev
    
  • Question 4:
    Question 2

  • Solution:
    1.Confirm the path location of pkg.m4 first:

    find /usr -name "pkg.m4"
    

    The search path is as follows:/usr/share/aclocal/pkg.m4

    2.Confirm the location of aclocal:

    aclocal --print-ac-dir
    

    The search path is as follows:/usr/local/share/aclocal

    3.Copy all /usr/share/aclocal/*.m4 files to the /usr/local/share/aclocal/ directory:

    sudo cp /usr/share/aclocal/*.m4 /usr/local/share/aclocal/
    
  • Question 5:
    Question 3

  • Solution:

    sudo apt-get install po4a
    
  • Question 6:
    Question 4
    Question 4

  • Solution:
    Copy the Makfile and util-linux-2022.patch patch to the open_source/util-linux/ directory:

    cp Makefile SS626V100_SDK_V2.0.1.0/open_source/util-linux/
    cp util-linux-2022.patch SS626V100_SDK_V2.0.1.0/open_source/util-linux/
    

    Supplementary Note: Since files cannot be uploaded here, please click on the patch package address to download.

6. Compile osdrv

6.1 Completely clear the entire osdrv directory

cd SS626V100_SDK_V2.0.1.0/osdrv
make distclean

6.2 Compile the entire osdrv directory

make all

Compilation successful printing:
———finish osdrv work

Summary

  1. It is best to use python3.x or above version to install SS626V100. If you use python2.7 version, there may be a risk that it will not compile;
  2. SS626V100 SDK, many of the programs generate configure.ac and Makefile.in through autoreconf and automake. If your server-related dependency libraries are not installed well, you may encounter various compilation problems.
  3. Regarding autoreconf and automake, I will introduce two links to you. If you are interested, you can take a look:
    3.1 automake
    3.2 AM_PATH_PYTHON