Table of contents
- Preface
- 1. Development environment
- 2. Install the cross tool chain on the linux server
- 3. Install SDK
- 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.6 Tools that need to be installed for LiteOS compilation include python, pip and kconfiglib
- 5. Summary of compilation process problems and solutions
- 6. Compile osdrv
- Summarize
Preface
- This article is suitable for everyone who needs to install SS626V100_SDK_V2.0.1.0;
- 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
*注:为了工具链能及时生效,强烈建议重启一次服务器。
3. Install SDK
3.1 SS626V100_SDK_V2.0.1.0 installation package location
- Basic package: SS626V100R001***\SS626V100R001C02SPC010\01.software\board\ SS626V100_SDK_V2.0.1.0.tgz
- Enhancement package: SS626V100R001***\SS626V100R001C02SPC010\02.only for reference\software\SS626V100_REF_V2.0.1.0.tgz
- Enhancement package script: SS626V100R001***\SS626V100R001C02SPC010\02.only for reference\software\ref_patch.sh
- Basic patch package: SS626V100R001***\SS626V100R001C02SPC010CP0001\01.software\board\ SS626V100_SDK_V2.0.1.0_CP0001.tgz
- 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 decompress:
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 to overwrite SS626V100_REF_V2.0.1.0 Files in the corresponding directory:
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
*注:执行以上步骤后,SS626V100_SDK_V2.0.1.0 则是打上REF增强补丁后的完整包。
4. Install software packages and build environment
4.1 Install 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
*注:采取一次性的安装方式,可能会存在依赖库遗漏安装的风险,建议还是手动一个个的安装最为稳妥(否则,编译过程可能会提示某些依赖库不存在的警告)。
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 the 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
cd Python-3.6.9/
./configure
make
make install
Method two, 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
*注:pycryptodome 和 pyelftools 下载后需要拷贝到 wheel-0.36.2 目录下。
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
- If the version number is displayed, it means that python is installed successfully, otherwise "
参考步骤4.5.1
" completes 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 on the setuptools source code package download address , you can refer to the following command to install:sudo unzip setuptools-50.3.2.zip cd setuptools sudo python3.6 setup.py install
-
pip installation:
click on the pip source code package download address , you can refer to the following command to install:sudo tar -zxf pip-20.2.4.tar.gz cd pip-20.2.4 sudo python3.6 setup.py install
-
Install kconfiglib:
1. For the server可以联网
, install kconfiglib directly:sudo pip3 install kconfiglib
2. For the server
不能联网
, 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 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
-
Solution:
Just make sure that the riscv32 tool chain has been installed
重启虚拟机
. -
Question 2: The meruconfig.h header file cannot be found
-
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:
-
Solution:
sudo apt-get install libssl-dev
-
Question 4:
-
Solution:
1. First confirm the path location of pkg.m4:find /usr -name "pkg.m4"
The search path is as follows:/usr/share/aclocal/pkg.m4
2. Confirm the location of aclocal again:
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:
-
Solution:
sudo apt-get install po4a
-
Question 6:
-
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/
补充说明:
Since files cannot be uploaded here, please click 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 success prints:
---------finish osdrv work
Summarize
- 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 cannot be compiled;
- 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.
- 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