20231103配置cv180zb的编译环境【填坑篇】
2023/11/3 11:36
感谢您选择了晶视科技的cv180zb,让我们一起来填坑。
在你根据文档找不到答案的时候,是不是想把他们家那个写文档的家伙打一顿,我顶你。
当你在在网上找一圈,BAIDU/BING/GOOGLE之后还是找不到答案,是不是想把他们的老板也打一顿。
没事的,北京晶视智能科技有限公司的法定代表人: 赵红爱
【如果有任何事/不满,就】冲他来吧!
https://aiqicha.baidu.com/detail/compinfo?pid=11718665230024&rq=ef&pd=ee&from=ps&query=%E5%8C%97%E4%BA%AC%E6%99%B6%E8%A7%86%E6%99%BA%E8%83%BD%E7%A7%91%E6%8A%80%E6%9C%89%E9%99%90%E5%85%AC%E5%8F%B8
男人何苦为难男人,要知道,晶视那帮写文档的男人,我们这帮做技术的是和你们站在一个战壕里的!
我们一起将晶视发扬光大,为什么整这么多大坑呢?
你们提供STEP-BY-STEP的文档,我们可以把时间花在别的地方,让晶视更加发光发热的地方。
大陆这么多公司,怎么这帮苦逼的人就不能帮他们把坑给填上,花了我两天时间搜索BAIDU/BING才把坑给填完!
实际上,这些最基础的编译文档,只要给晶视自己新入职的新手工程师从头验证一下文档中的步骤,就可以查漏补缺了!
SDK:
https://developer.sophgo.com/thread/471.html
HDK:
https://developer.sophgo.com/thread/472.html
# how to build and use dual_fast_ipc
1. build SDK first
1.1 tar -zxvf 2023-10-04_source.tar.gz
1.2 cd 2023-10-04_source
1.3 source build/cvisetup.sh
1.4 defconfig cv180zb_wevb_0008a_spinor
1.5 build_all
2. build dual_fast_ipc
主要操作步骤:
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:/usr/bin$ sudo ln -s python3.8 python
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$ pip install ruamel.yaml
pip install yoctools -i https://pypi.tuna.tsinghua.edu.cn/simple
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source/mars_alios/boards/cv181xc_evb/configs$ sudo cp product /usr/bin/
pip install lz4
0、可选安装的软件:
sudo apt-get install net-tools
sudo apt-get install nethogs
sudo apt-get install openssh-server
sudo apt-get install samba
必须安装的软件:
https://doc.sophgo.com/cvitek-develop-docs/master/docs_latest_release/CV180x_CV181x/zh/01.software/OSDRV/SDK_Compilation_and_Usage_Guide/build/html/2_Build_CVITEK_Software_Compilation_Environment.html#id1
2.2. 建构编译环境?
在编译SDK之前,Ubuntu需要安装以下套件:
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install -y ninja-build
sudo apt-get install -y automake
sudo apt-get install -y autoconf
sudo apt-get install -y libtool
sudo apt-get install -y wget
sudo apt-get install -y curl
sudo apt-get install -y git
sudo apt-get install -y gcc
sudo apt-get install -y libssl-dev
sudo apt-get install -y bc
sudo apt-get install -y slib
sudo apt-get install -y squashfs-tools
sudo apt-get install -y android-sdk-libsparse-utils
sudo apt-get install -y android-sdk-ext4-utils
sudo apt-get install -y jq
sudo apt-get install -y cmake
sudo apt-get install -y python3-distutils
sudo apt-get install -y tclsh
sudo apt-get install -y scons
sudo apt-get install -y parallel
sudo apt-get install -y ssh-client
sudo apt-get install -y tree
sudo apt-get install -y python3-dev
sudo apt-get install -y python3-pip
sudo apt-get install -y device-tree-compiler
sudo apt-get install -y libssl-dev
sudo apt-get install -y ssh
sudo apt-get install -y cpio
sudo apt-get install -y squashfs-tools
sudo apt-get install -y fakeroot
sudo apt-get install -y libncurses5
sudo apt-get install -y flex
sudo apt-get install -y bison
1、第一个坑:
https://doc.sophgo.com/cvitek-develop-docs/master/docs_latest_release/CV180x_CV181x/zh/01.software/OSDRV/SDK_Compilation_and_Usage_Guide/build/html/2_Build_CVITEK_Software_Compilation_Environment.html#linux
2.1. Linux 服务器
开发者可选择使用:
Ubuntu OS计算机
Windows OS计算机 + Virtualbox VM (上面运行Ubuntu)
两种方式,都请安装成Ubuntu 20.04 LTS版本。
Virtualbox VM 下载网址: https://www.virtualbox.org/wiki/Downloads
Ubuntu 20.04 LTS下载网址: https://releases.ubuntu.com/20.04/ubuntu-20.04.2.0-desktop-amd64.iso
【这个链接已经失效了,如果一定要使用这个版本,可以使用迅雷下载备份】
https://releases.ubuntu.com/20.04/
可以到这里直接下载最新版本的就可以了,比如:ubuntu-20.04.6-desktop-amd64.iso【请以实际版本为准!^_】
2、第二个坑:python3的链接问题
(如果您以前编译过Android的SDK,那python会指向python2,改一下就好了!^_)
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$ source build/cvisetup.sh
-------------------------------------------------------------------------------------------------------
Usage:
(1) menuconfig - Use menu to configure your board.
ex: $ menuconfig
(2) defconfig $CHIP_ARCH - List EVB boards($BOARD) by CHIP_ARCH.
** cv183x ** -> ['cv1829', 'cv1832', 'cv1835', 'cv1838', 'cv9520', 'cv7581']
** cv182x ** -> ['cv1820', 'cv1821', 'cv1822', 'cv1823', 'cv1825', 'cv1826', 'cv7327', 'cv7357']
** cv181x ** -> ['cv181x', 'cv1823a', 'cv1821a', 'cv1820a', 'cv1811h', 'cv1811ha', 'cv1811c', 'cv1810c', 'cv1812h', 'cv1813h']
** cv180x ** -> ['cv180x', 'cv1800b', 'cv1800c', 'cv1801b', 'cv1801c', 'cv180zb']
ex: $ defconfig cv183x
(3) defconfig $BOARD - Choose EVB board settings.
ex: $ defconfig cv1835_wevb_0002a
ex: $ defconfig cv1826_wevb_0005a_spinand
ex: $ defconfig cv181x_fpga_c906
-------------------------------------------------------------------------------------------------------
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$ defconfig cv180zb_wevb_0008a_spinor
Run defconfig function
Loaded configuration '/home/rootroot/2023-10-18_source/build/boards/cv180x/cv180zb_wevb_0008a_spinor/cv180zb_wevb_0008a_spinor_defconfig'
Configuration saved to '.config'
Loaded configuration '.config'
Minimal configuration saved to '/home/rootroot/2023-10-18_source/build/.defconfig'
~/2023-10-18_source/build ~/2023-10-18_source
~/2023-10-18_source
====== Environment Variables =======
PROJECT: cv180zb_wevb_0008a_spinor, DDR_CFG=ddr2_1333_x16
CHIP_ARCH: CV180X, DEBUG=0
SDK VERSION: musl_riscv64, RPC=0
ATF options: ATF_KEY_SEL=default, BL32=1
Linux source folder:linux_5.10, Uboot source folder: u-boot-2021.10
CROSS_COMPILE_PREFIX: riscv64-unknown-linux-musl-
ENABLE_BOOTLOGO: 0
Flash layout xml: /home/rootroot/2023-10-18_source/build/boards/cv180x/cv180zb_wevb_0008a_spinor/partition/partition_spinor.xml
Sensor tuning bin: gcore_gc4653
Output path: /home/rootroot/2023-10-18_source/install/soc_cv180zb_wevb_0008a_spinor
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$ builld_all
builld_all: command not found
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$ build_all
Run build_opensbi_kernel() function
~/2023-10-18_source/build ~/2023-10-18_source
mkdir -p /home/rootroot/2023-10-18_source/ramdisk/build/cv180zb_wevb_0008a_spinor/target
mkdir -p /home/rootroot/2023-10-18_source/ramdisk/build/cv180zb_wevb_0008a_spinor/configs
mkdir -p /home/rootroot/2023-10-18_source/ramdisk/build/cv180zb_wevb_0008a_spinor/workspace
[TARGET] kernel-build
echo LOCALVERSION=-tag-
LOCALVERSION=-tag-
make -j16 -C /home/rootroot/2023-10-18_source/linux_5.10 O=/home/rootroot/2023-10-18_source/linux_5.10/build/cv180zb_wevb_0008a_spinor setconfig 'SCRIPT_ARG="SQUASHFS_ZLIB=y"'
make[1]: Entering directory '/home/rootroot/2023-10-18_source/linux_5.10'
make[2]: Entering directory '/home/rootroot/2023-10-18_source/linux_5.10/build/cv180zb_wevb_0008a_spinor'
GEN Makefile
HOSTCC scripts/basic/fixdep
/bin/sh: 1: python: not found
make[3]: *** [/home/rootroot/2023-10-18_source/linux_5.10/scripts/kconfig/Makefile:43: setconfig] Error 127
make[2]: *** [/home/rootroot/2023-10-18_source/linux_5.10/Makefile:602: setconfig] Error 2
make[2]: Leaving directory '/home/rootroot/2023-10-18_source/linux_5.10/build/cv180zb_wevb_0008a_spinor'
make[1]: *** [Makefile:185: __sub-make] Error 2
make[1]: Leaving directory '/home/rootroot/2023-10-18_source/linux_5.10'
make: *** [Makefile:334: kernel-build] Error 2
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$ cd /usr/bin/
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:/usr/bin$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:/usr/bin$ ll py*
-rwxr-xr-x 1 root root 7813 3月 13 2020 py3clean*
-rwxr-xr-x 1 root root 12120 3月 13 2020 py3compile*
lrwxrwxrwx 1 root root 31 7月 25 03:37 py3versions -> ../share/python3/py3versions.py*
lrwxrwxrwx 1 root root 8 7月 25 03:37 pydoc3 -> pydoc3.8*
-rwxr-xr-x 1 root root 79 5月 26 22:05 pydoc3.8*
lrwxrwxrwx 1 root root 12 7月 25 03:37 pygettext3 -> pygettext3.8*
-rwxr-xr-x 1 root root 21535 5月 26 22:05 pygettext3.8*
-rwxr-xr-x 1 root root 392 3月 29 2021 pygmentize*
-rwxr-xr-x 1 root root 372 7月 19 2022 pyjwt3*
lrwxrwxrwx 1 root root 9 7月 25 03:37 python3 -> python3.8*
-rwxr-xr-x 1 root root 5494584 5月 26 22:05 python3.8*
lrwxrwxrwx 1 root root 33 5月 26 22:05 python3.8-config -> x86_64-linux-gnu-python3.8-config*
lrwxrwxrwx 1 root root 16 3月 13 2020 python3-config -> python3.8-config*
-rwxr-xr-x 1 root root 384 3月 28 2020 python3-futurize*
-rwxr-xr-x 1 root root 388 3月 28 2020 python3-pasteurize*
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:/usr/bin$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:/usr/bin$ python
Command 'python' not found, did you mean:
command 'python3' from deb python3
command 'python' from deb python-is-python3
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:/usr/bin$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:/usr/bin$ sudo ln -s python3.8 python
[sudo] password for rootroot:
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:/usr/bin$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:/usr/bin$ ll pyt*
lrwxrwxrwx 1 root root 9 11月 3 14:36 python -> python3.8*
lrwxrwxrwx 1 root root 9 7月 25 03:37 python3 -> python3.8*
-rwxr-xr-x 1 root root 5494584 5月 26 22:05 python3.8*
lrwxrwxrwx 1 root root 33 5月 26 22:05 python3.8-config -> x86_64-linux-gnu-python3.8-config*
lrwxrwxrwx 1 root root 16 3月 13 2020 python3-config -> python3.8-config*
-rwxr-xr-x 1 root root 384 3月 28 2020 python3-futurize*
-rwxr-xr-x 1 root root 388 3月 28 2020 python3-pasteurize*
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:/usr/bin$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:/usr/bin$ python
Python 3.8.10 (default, May 26 2023, 14:05:08)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:/usr/bin$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:/usr/bin$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:/usr/bin$ cd -
/home/rootroot/2023-10-18_source
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$ build_all
3、第三个坑:如果您直接安装,而不使用大陆的【镜像】下载服务器,那么您可能要想我一样出错很多次才会成功的!
make -j16 -C /home/rootroot/2023-10-18_source/opensbi PLATFORM=generic \
FW_PAYLOAD_PATH=/home/rootroot/2023-10-18_source/u-boot-2021.10/build/cv180zb_wevb_0008a_spinor/u-boot-raw.bin \
FW_FDT_PATH=/home/rootroot/2023-10-18_source/u-boot-2021.10/build/cv180zb_wevb_0008a_spinor/arch/riscv/dts/cv180zb_wevb_0008a_spinor.dtb
make[1]: Entering directory '/home/rootroot/2023-10-18_source/opensbi'
AS platform/generic/firmware/fw_dynamic.o
AS platform/generic/firmware/fw_jump.o
AS platform/generic/firmware/fw_payload.o
ELF platform/generic/firmware/fw_dynamic.elf
ELF platform/generic/firmware/fw_jump.elf
ELF platform/generic/firmware/fw_payload.elf
OBJCOPY platform/generic/firmware/fw_dynamic.bin
OBJCOPY platform/generic/firmware/fw_jump.bin
OBJCOPY platform/generic/firmware/fw_payload.bin
make[1]: Leaving directory '/home/rootroot/2023-10-18_source/opensbi'
[TARGET] alios-build
cp -f /home/rootroot/2023-10-18_source/build/output/cv180zb_wevb_0008a_spinor/cvi_board_memmap.h /home/rootroot/2023-10-18_source/mars_alios/components/aos/include/cvi_board_memmap.h
cp -f /home/rootroot/2023-10-18_source/build/output/cv180zb_wevb_0008a_spinor/cvi_board_memmap.ld /home/rootroot/2023-10-18_source/mars_alios/solutions/"helloworld"/cvi_board_memmap.ld
cd /home/rootroot/2023-10-18_source/mars_alios;echo "y" | yoc init;cd -
/bin/sh: 1: yoc: not found
/home/rootroot/2023-10-18_source/build
make -C /home/rootroot/2023-10-18_source/mars_alios/solutions/"helloworld" ALIOS_BOARD=""
make[1]: Entering directory '/home/rootroot/2023-10-18_source/mars_alios/solutions/helloworld'
Build Solution by
Traceback (most recent call last):
File "../../scripts/defconfig/defconfig.py", line 5, in
from ruamel.yaml import YAML
ModuleNotFoundError: No module named 'ruamel'
make[1]: *** [Makefile:21: all] Error 1
make[1]: Leaving directory '/home/rootroot/2023-10-18_source/mars_alios/solutions/helloworld'
make: *** [alios.mk:18: alios-build] Error 2
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$ pip install ruamel.yaml
Collecting ruamel.yaml
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('
Downloading ruamel.yaml-0.18.4-py3-none-any.whl (116 kB)
|█████████████████ | 61 kB 7.7 kB/s eta 0:00:08ERROR: Exception:
Traceback (most recent call last):
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 425, in _error_catcher
yield
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 507, in read
data = self._fp.read(amt) if not fp_closed else b""
File "/usr/share/python-wheels/CacheControl-0.12.6-py2.py3-none-any.whl/cachecontrol/filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "/usr/lib/python3.8/http/client.py", line 459, in read
n = self.readinto(b)
File "/usr/lib/python3.8/http/client.py", line 503, in readinto
n = self.fp.readinto(b)
File "/usr/lib/python3.8/socket.py", line 669, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.8/ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.8/ssl.py", line 1099, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 186, in _main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/_internal/commands/install.py", line 357, in run
resolver.resolve(requirement_set)
File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 177, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 333, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 282, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(req)
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 480, in prepare_linked_requirement
local_path = unpack_url(
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 282, in unpack_url
return unpack_http_url(
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 158, in unpack_http_url
from_path, content_type = _download_http_url(
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 303, in _download_http_url
for chunk in download.chunks:
File "/usr/lib/python3/dist-packages/pip/_internal/utils/ui.py", line 160, in iter
for x in it:
File "/usr/lib/python3/dist-packages/pip/_internal/network/utils.py", line 15, in response_chunks
for chunk in response.raw.stream(
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 564, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 529, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "/usr/lib/python3.8/contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 430, in _error_catcher
raise ReadTimeoutError(self._pool, None, "Read timed out.")
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$ pip install ruamel.yaml
Collecting ruamel.yaml
Downloading ruamel.yaml-0.18.4-py3-none-any.whl (116 kB)
|████████████████████████████████| 116 kB 33 kB/s
ERROR: Could not find a version that satisfies the requirement ruamel.yaml.clib>=0.2.7; platform_python_implementation == "CPython" and python_version < "3.13" (from ruamel.yaml) (from versions: none)
ERROR: No matching distribution found for ruamel.yaml.clib>=0.2.7; platform_python_implementation == "CPython" and python_version < "3.13" (from ruamel.yaml)
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$ pip install ruamel.yaml
Collecting ruamel.yaml
Using cached ruamel.yaml-0.18.4-py3-none-any.whl (116 kB)
Collecting ruamel.yaml.clib>=0.2.7; platform_python_implementation == "CPython" and python_version < "3.13"
Downloading ruamel.yaml.clib-0.2.8-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (596 kB)
|█████ | 92 kB 20 kB/s eta 0:00:26ERROR: Exception:
Traceback (most recent call last):
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 425, in _error_catcher
yield
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 507, in read
data = self._fp.read(amt) if not fp_closed else b""
File "/usr/share/python-wheels/CacheControl-0.12.6-py2.py3-none-any.whl/cachecontrol/filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "/usr/lib/python3.8/http/client.py", line 459, in read
n = self.readinto(b)
File "/usr/lib/python3.8/http/client.py", line 503, in readinto
n = self.fp.readinto(b)
File "/usr/lib/python3.8/socket.py", line 669, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.8/ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.8/ssl.py", line 1099, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 186, in _main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/_internal/commands/install.py", line 357, in run
resolver.resolve(requirement_set)
File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 177, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 333, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 282, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(req)
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 480, in prepare_linked_requirement
local_path = unpack_url(
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 282, in unpack_url
return unpack_http_url(
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 158, in unpack_http_url
from_path, content_type = _download_http_url(
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 303, in _download_http_url
for chunk in download.chunks:
File "/usr/lib/python3/dist-packages/pip/_internal/utils/ui.py", line 160, in iter
for x in it:
File "/usr/lib/python3/dist-packages/pip/_internal/network/utils.py", line 15, in response_chunks
for chunk in response.raw.stream(
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 564, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 529, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "/usr/lib/python3.8/contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 430, in _error_catcher
raise ReadTimeoutError(self._pool, None, "Read timed out.")
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$ pip install ruamel.yaml
Collecting ruamel.yaml
Using cached ruamel.yaml-0.18.4-py3-none-any.whl (116 kB)
Collecting ruamel.yaml.clib>=0.2.7; platform_python_implementation == "CPython" and python_version < "3.13"
Downloading ruamel.yaml.clib-0.2.8-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (596 kB)
|████████████▋ | 235 kB 15 kB/s eta 0:00:24ERROR: Exception:
Traceback (most recent call last):
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 425, in _error_catcher
yield
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 507, in read
data = self._fp.read(amt) if not fp_closed else b""
File "/usr/share/python-wheels/CacheControl-0.12.6-py2.py3-none-any.whl/cachecontrol/filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "/usr/lib/python3.8/http/client.py", line 459, in read
n = self.readinto(b)
File "/usr/lib/python3.8/http/client.py", line 503, in readinto
n = self.fp.readinto(b)
File "/usr/lib/python3.8/socket.py", line 669, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.8/ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.8/ssl.py", line 1099, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 186, in _main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/_internal/commands/install.py", line 357, in run
resolver.resolve(requirement_set)
File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 177, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 333, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 282, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(req)
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 480, in prepare_linked_requirement
local_path = unpack_url(
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 282, in unpack_url
return unpack_http_url(
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 158, in unpack_http_url
from_path, content_type = _download_http_url(
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 303, in _download_http_url
for chunk in download.chunks:
File "/usr/lib/python3/dist-packages/pip/_internal/utils/ui.py", line 160, in iter
for x in it:
File "/usr/lib/python3/dist-packages/pip/_internal/network/utils.py", line 15, in response_chunks
for chunk in response.raw.stream(
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 564, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 529, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "/usr/lib/python3.8/contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 430, in _error_catcher
raise ReadTimeoutError(self._pool, None, "Read timed out.")
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$ pip install ruamel.yaml
Collecting ruamel.yaml
Using cached ruamel.yaml-0.18.4-py3-none-any.whl (116 kB)
Collecting ruamel.yaml.clib>=0.2.7; platform_python_implementation == "CPython" and python_version < "3.13"
Downloading ruamel.yaml.clib-0.2.8-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (596 kB)
|████▍ | 81 kB 18 kB/s eta 0:00:28ERROR: Exception:
Traceback (most recent call last):
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 425, in _error_catcher
yield
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 507, in read
data = self._fp.read(amt) if not fp_closed else b""
File "/usr/share/python-wheels/CacheControl-0.12.6-py2.py3-none-any.whl/cachecontrol/filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "/usr/lib/python3.8/http/client.py", line 459, in read
n = self.readinto(b)
File "/usr/lib/python3.8/http/client.py", line 503, in readinto
n = self.fp.readinto(b)
File "/usr/lib/python3.8/socket.py", line 669, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.8/ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.8/ssl.py", line 1099, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 186, in _main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/_internal/commands/install.py", line 357, in run
resolver.resolve(requirement_set)
File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 177, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 333, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 282, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(req)
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 480, in prepare_linked_requirement
local_path = unpack_url(
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 282, in unpack_url
return unpack_http_url(
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 158, in unpack_http_url
from_path, content_type = _download_http_url(
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 303, in _download_http_url
for chunk in download.chunks:
File "/usr/lib/python3/dist-packages/pip/_internal/utils/ui.py", line 160, in iter
for x in it:
File "/usr/lib/python3/dist-packages/pip/_internal/network/utils.py", line 15, in response_chunks
for chunk in response.raw.stream(
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 564, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 529, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "/usr/lib/python3.8/contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 430, in _error_catcher
raise ReadTimeoutError(self._pool, None, "Read timed out.")
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$ pip install ruamel.yaml
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/ruamel-yaml/
Collecting ruamel.yaml
Using cached ruamel.yaml-0.18.4-py3-none-any.whl (116 kB)
Collecting ruamel.yaml.clib>=0.2.7; platform_python_implementation == "CPython" and python_version < "3.13"
Downloading ruamel.yaml.clib-0.2.8-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (596 kB)
|████████████████████████████████| 596 kB 6.2 kB/s
Installing collected packages: ruamel.yaml.clib, ruamel.yaml
Successfully installed ruamel.yaml-0.18.4 ruamel.yaml.clib-0.2.8
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
参考资料:
BING搜索:ModuleNotFoundError: No module named 'ruamel'
https://blog.csdn.net/hhhhhhhhhhwwwwwwwwww/article/details/118719980
ModuleNotFoundError: No module named ‘ruamel‘
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “run_toy_example.py”, line 210, in
exec_toy_example(runtime_config)
File “run_toy_example.py”, line 171, in exec_toy_example
jobid = exec_task(dsl_path, runtime_config)
File “run_toy_example.py”, line 89, in exec_task
raise ValueError(“failed to exec task, stderr is {}, stdout is {}”.format(stderr, stdout))
ValueError: failed to exec task, stderr is None, stdout is Traceback (most recent call last):
File “/data/projects/fate/examples/toy_example/…/…/python/fate_flow/fate_flow_client.py”, line 29, in
from fate_arch.common import file_utils, conf_utils
File “/data/projects/fate/python/fate_arch/common/file_utils.py”, line 22, in
from ruamel import yaml
ModuleNotFoundError: No module named ‘ruamel’
解决方法
pip install ruamel.yaml
4、第四个坑:出错次数实在太多了,【我扛不住了】没有办法只能使用清华的镜像源/服务器了!
AS platform/generic/firmware/fw_dynamic.o
AS platform/generic/firmware/fw_jump.o
AS platform/generic/firmware/fw_payload.o
ELF platform/generic/firmware/fw_dynamic.elf
ELF platform/generic/firmware/fw_jump.elf
ELF platform/generic/firmware/fw_payload.elf
OBJCOPY platform/generic/firmware/fw_dynamic.bin
OBJCOPY platform/generic/firmware/fw_payload.bin
OBJCOPY platform/generic/firmware/fw_jump.bin
make[1]: Leaving directory '/home/rootroot/2023-10-18_source/opensbi'
[TARGET] alios-build
cp -f /home/rootroot/2023-10-18_source/build/output/cv180zb_wevb_0008a_spinor/cvi_board_memmap.h /home/rootroot/2023-10-18_source/mars_alios/components/aos/include/cvi_board_memmap.h
cp -f /home/rootroot/2023-10-18_source/build/output/cv180zb_wevb_0008a_spinor/cvi_board_memmap.ld /home/rootroot/2023-10-18_source/mars_alios/solutions/"helloworld"/cvi_board_memmap.ld
cd /home/rootroot/2023-10-18_source/mars_alios;echo "y" | yoc init;cd -
/bin/sh: 1: yoc: not found
/home/rootroot/2023-10-18_source/build
make -C /home/rootroot/2023-10-18_source/mars_alios/solutions/"helloworld" ALIOS_BOARD=""
make[1]: Entering directory '/home/rootroot/2023-10-18_source/mars_alios/solutions/helloworld'
Build Solution by
enter include_config functions of ../../scripts/defconfig/defconfig.py
[Defconfig] Craete package.yaml finised.
scons: Reading SConscript files ...
ModuleNotFoundError: No module named 'yoctools':
File "/home/rootroot/2023-10-18_source/mars_alios/solutions/helloworld/SConstruct", line 3:
from yoctools import Make
make[1]: *** [Makefile:22: all] Error 2
make[1]: Leaving directory '/home/rootroot/2023-10-18_source/mars_alios/solutions/helloworld'
make: *** [alios.mk:18: alios-build] Error 2
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$ pip install yoctools
Collecting yoctools
Downloading yoctools-2.0.61.tar.gz (8.5 MB)
|▍ | 112 kB 2.4 kB/s eta 0:57:19ERROR: Exception:
Traceback (most recent call last):
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 425, in _error_catcher
yield
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 507, in read
data = self._fp.read(amt) if not fp_closed else b""
File "/usr/share/python-wheels/CacheControl-0.12.6-py2.py3-none-any.whl/cachecontrol/filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "/usr/lib/python3.8/http/client.py", line 459, in read
n = self.readinto(b)
File "/usr/lib/python3.8/http/client.py", line 503, in readinto
n = self.fp.readinto(b)
File "/usr/lib/python3.8/socket.py", line 669, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.8/ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.8/ssl.py", line 1099, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 186, in _main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/_internal/commands/install.py", line 357, in run
resolver.resolve(requirement_set)
File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 177, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 333, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 282, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(req)
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 480, in prepare_linked_requirement
local_path = unpack_url(
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 282, in unpack_url
return unpack_http_url(
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 158, in unpack_http_url
from_path, content_type = _download_http_url(
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 303, in _download_http_url
for chunk in download.chunks:
File "/usr/lib/python3/dist-packages/pip/_internal/utils/ui.py", line 160, in iter
for x in it:
File "/usr/lib/python3/dist-packages/pip/_internal/network/utils.py", line 15, in response_chunks
for chunk in response.raw.stream(
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 564, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 529, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "/usr/lib/python3.8/contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 430, in _error_catcher
raise ReadTimeoutError(self._pool, None, "Read timed out.")
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$ pip install yoctools
Collecting yoctools
Downloading yoctools-2.0.61.tar.gz (8.5 MB)
|▏ | 40 kB 4.7 kB/s eta 0:29:40ERROR: Exception:
Traceback (most recent call last):
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 425, in _error_catcher
yield
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 507, in read
data = self._fp.read(amt) if not fp_closed else b""
File "/usr/share/python-wheels/CacheControl-0.12.6-py2.py3-none-any.whl/cachecontrol/filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "/usr/lib/python3.8/http/client.py", line 459, in read
n = self.readinto(b)
File "/usr/lib/python3.8/http/client.py", line 503, in readinto
n = self.fp.readinto(b)
File "/usr/lib/python3.8/socket.py", line 669, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.8/ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.8/ssl.py", line 1099, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 186, in _main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/_internal/commands/install.py", line 357, in run
resolver.resolve(requirement_set)
File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 177, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 333, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 282, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(req)
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 480, in prepare_linked_requirement
local_path = unpack_url(
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 282, in unpack_url
return unpack_http_url(
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 158, in unpack_http_url
from_path, content_type = _download_http_url(
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 303, in _download_http_url
for chunk in download.chunks:
File "/usr/lib/python3/dist-packages/pip/_internal/utils/ui.py", line 160, in iter
for x in it:
File "/usr/lib/python3/dist-packages/pip/_internal/network/utils.py", line 15, in response_chunks
for chunk in response.raw.stream(
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 564, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 529, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "/usr/lib/python3.8/contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 430, in _error_catcher
raise ReadTimeoutError(self._pool, None, "Read timed out.")
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$ pip install yoctools
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/yoctools/
Collecting yoctools
Downloading yoctools-2.0.61.tar.gz (8.5 MB)
|▎ | 71 kB 2.6 kB/s eta 0:54:40ERROR: Exception:
Traceback (most recent call last):
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 425, in _error_catcher
yield
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 507, in read
data = self._fp.read(amt) if not fp_closed else b""
File "/usr/share/python-wheels/CacheControl-0.12.6-py2.py3-none-any.whl/cachecontrol/filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "/usr/lib/python3.8/http/client.py", line 459, in read
n = self.readinto(b)
File "/usr/lib/python3.8/http/client.py", line 503, in readinto
n = self.fp.readinto(b)
File "/usr/lib/python3.8/socket.py", line 669, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.8/ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.8/ssl.py", line 1099, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 186, in _main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/_internal/commands/install.py", line 357, in run
resolver.resolve(requirement_set)
File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 177, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 333, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 282, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(req)
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 480, in prepare_linked_requirement
local_path = unpack_url(
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 282, in unpack_url
return unpack_http_url(
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 158, in unpack_http_url
from_path, content_type = _download_http_url(
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 303, in _download_http_url
for chunk in download.chunks:
File "/usr/lib/python3/dist-packages/pip/_internal/utils/ui.py", line 160, in iter
for x in it:
File "/usr/lib/python3/dist-packages/pip/_internal/network/utils.py", line 15, in response_chunks
for chunk in response.raw.stream(
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 564, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 529, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "/usr/lib/python3.8/contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 430, in _error_catcher
raise ReadTimeoutError(self._pool, None, "Read timed out.")
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$ pip install yoctools
Collecting yoctools
Downloading yoctools-2.0.61.tar.gz (8.5 MB)
|████████████████████████████████| 8.5 MB 26 kB/s
ERROR: Could not find a version that satisfies the requirement configparser==4.0.2 (from yoctools) (from versions: none)
ERROR: No matching distribution found for configparser==4.0.2 (from yoctools)
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$ pip install yoctools
Collecting yoctools
Using cached yoctools-2.0.61.tar.gz (8.5 MB)
Collecting configparser==4.0.2
Downloading configparser-4.0.2-py2.py3-none-any.whl (22 kB)
ERROR: Exception:
Traceback (most recent call last):
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 425, in _error_catcher
yield
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 507, in read
data = self._fp.read(amt) if not fp_closed else b""
File "/usr/share/python-wheels/CacheControl-0.12.6-py2.py3-none-any.whl/cachecontrol/filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "/usr/lib/python3.8/http/client.py", line 459, in read
n = self.readinto(b)
File "/usr/lib/python3.8/http/client.py", line 503, in readinto
n = self.fp.readinto(b)
File "/usr/lib/python3.8/socket.py", line 669, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.8/ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.8/ssl.py", line 1099, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 186, in _main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/_internal/commands/install.py", line 357, in run
resolver.resolve(requirement_set)
File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 177, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 333, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 282, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(req)
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 480, in prepare_linked_requirement
local_path = unpack_url(
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 282, in unpack_url
return unpack_http_url(
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 158, in unpack_http_url
from_path, content_type = _download_http_url(
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 303, in _download_http_url
for chunk in download.chunks:
File "/usr/lib/python3/dist-packages/pip/_internal/network/utils.py", line 15, in response_chunks
for chunk in response.raw.stream(
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 564, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 529, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "/usr/lib/python3.8/contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 430, in _error_catcher
raise ReadTimeoutError(self._pool, None, "Read timed out.")
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$ pip install yoctools
Collecting yoctools
Using cached yoctools-2.0.61.tar.gz (8.5 MB)
Collecting configparser==4.0.2
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('
Downloading configparser-4.0.2-py2.py3-none-any.whl (22 kB)
Collecting import-scons>=2.0.0
Downloading import_scons-2.5.0-4-py3-none-any.whl (629 kB)
|█████████▉ | 194 kB 3.1 kB/s eta 0:02:23ERROR: Exception:
Traceback (most recent call last):
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 425, in _error_catcher
yield
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 507, in read
data = self._fp.read(amt) if not fp_closed else b""
File "/usr/share/python-wheels/CacheControl-0.12.6-py2.py3-none-any.whl/cachecontrol/filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "/usr/lib/python3.8/http/client.py", line 459, in read
n = self.readinto(b)
File "/usr/lib/python3.8/http/client.py", line 503, in readinto
n = self.fp.readinto(b)
File "/usr/lib/python3.8/socket.py", line 669, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.8/ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.8/ssl.py", line 1099, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 186, in _main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/_internal/commands/install.py", line 357, in run
resolver.resolve(requirement_set)
File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 177, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 333, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 282, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(req)
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 480, in prepare_linked_requirement
local_path = unpack_url(
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 282, in unpack_url
return unpack_http_url(
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 158, in unpack_http_url
from_path, content_type = _download_http_url(
File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 303, in _download_http_url
for chunk in download.chunks:
File "/usr/lib/python3/dist-packages/pip/_internal/utils/ui.py", line 160, in iter
for x in it:
File "/usr/lib/python3/dist-packages/pip/_internal/network/utils.py", line 15, in response_chunks
for chunk in response.raw.stream(
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 564, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 529, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "/usr/lib/python3.8/contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/response.py", line 430, in _error_catcher
raise ReadTimeoutError(self._pool, None, "Read timed out.")
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$ pip install yoctools -i http://pypi.douban.com/simple/
Looking in indexes: http://pypi.douban.com/simple/
WARNING: The repository located at pypi.douban.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host pypi.douban.com'.
ERROR: Could not find a version that satisfies the requirement yoctools (from versions: none)
ERROR: No matching distribution found for yoctools
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$ pip install yoctools -i https://pypi.tuna.tsinghua.edu.cn/simple
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting yoctools
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/09/5e/a0035818d831e8c5567523216b90ac5ff5e3ac2b998f3fa6c2f7401a4b63/yoctools-2.0.61.tar.gz (8.5 MB)
|████████████████████████████████| 8.5 MB 1.3 MB/s
Collecting configparser==4.0.2
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/7a/2a/95ed0501cf5d8709490b1d3a3f9b5cf340da6c433f896bbe9ce08dbe6785/configparser-4.0.2-py2.py3-none-any.whl (22 kB)
Collecting import-scons>=2.0.0
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/38/2a/d0e39ab5c9e4134c37a0c75d7e3dd7846e4f186fa5ef45bd5dc15acada18/import_scons-2.5.0-4-py3-none-any.whl (629 kB)
|████████████████████████████████| 629 kB 2.1 MB/s
Collecting pyserial
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/07/bc/587a445451b253b285629263eb51c2d8e9bcea4fc97826266d186f96f558/pyserial-3.5-py2.py3-none-any.whl (90 kB)
|████████████████████████████████| 90 kB 873 kB/s
Collecting requests_toolbelt
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/3f/51/d4db610ef29373b879047326cbf6fa98b6c1969d6f6dc423279de2b1be2c/requests_toolbelt-1.0.0-py2.py3-none-any.whl (54 kB)
|████████████████████████████████| 54 kB 2.4 MB/s
Collecting ruamel.yaml==0.16.13
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/ed/c3/4c823dac2949a6baf36a4987d04c50d30184147393ba6f4bfb4c67d15a13/ruamel.yaml-0.16.13-py2.py3-none-any.whl (111 kB)
|████████████████████████████████| 111 kB 2.3 MB/s
Collecting scons<4.0.0,>=3.0.0
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/90/ff/01a273c627f48079285a8be6bf4aadb95d6d6c1793c114c6876fc28aab5c/scons-3.1.2-py2.py3-none-any.whl (837 kB)
|████████████████████████████████| 837 kB 2.4 MB/s
Collecting smmap
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a7/a5/10f97f73544edcdef54409f1d839f6049a0d79df68adbc1ceb24d1aaca42/smmap-5.0.1-py3-none-any.whl (24 kB)
Collecting threadpool
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/6a/92/483af8a4325cd72c131db4e42cc4812505667b784eb180a4fba9348c4a3c/threadpool-1.3.2-py3-none-any.whl (8.5 kB)
Collecting xlsxwriter
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/f7/3e/05ba2194cd5073602422859c949a4f21310a3c49bf8dccde9e03d4522b11/XlsxWriter-3.1.9-py3-none-any.whl (154 kB)
|████████████████████████████████| 154 kB 3.2 MB/s
Requirement already satisfied: future in /usr/lib/python3/dist-packages (from import-scons>=2.0.0->yoctools) (0.18.2)
Requirement already satisfied: requests<3.0.0,>=2.0.1 in /usr/lib/python3/dist-packages (from requests_toolbelt->yoctools) (2.22.0)
Requirement already satisfied: ruamel.yaml.clib>=0.1.2; platform_python_implementation == "CPython" and python_version < "3.10" in /home/rootroot/.local/lib/python3.8/site-packages (from ruamel.yaml==0.16.13->yoctools) (0.2.8)
Building wheels for collected packages: yoctools
Building wheel for yoctools (setup.py) ... done
Created wheel for yoctools: filename=yoctools-2.0.61-py3-none-any.whl size=12195150 sha256=1a66a769d9e36d0748e7da335f2458cda94309aec038c5505fa94e930efd42e6
Stored in directory: /home/rootroot/.cache/pip/wheels/ea/a4/89/eae218f08d7650a3694dddcf4b2c2b484666497972fb642176
Successfully built yoctools
Installing collected packages: configparser, import-scons, pyserial, requests-toolbelt, ruamel.yaml, scons, smmap, threadpool, xlsxwriter, yoctools
WARNING: The scripts pyserial-miniterm and pyserial-ports are installed in '/home/rootroot/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Attempting uninstall: ruamel.yaml
Found existing installation: ruamel.yaml 0.18.4
Uninstalling ruamel.yaml-0.18.4:
Successfully uninstalled ruamel.yaml-0.18.4
WARNING: The scripts cct and yoc are installed in '/home/rootroot/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed configparser-4.0.2 import-scons-2.5.0 pyserial-3.5 requests-toolbelt-1.0.0 ruamel.yaml-0.16.13 scons-3.1.2 smmap-5.0.1 threadpool-1.3.2 xlsxwriter-3.1.9 yoctools-2.0.61
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
参考资料:
/bin/sh: 1: yoc: not found
BAIDU/BING都没有找到
sudo apt-get install yoc也安装不了。后来根据经验才发现是需要安装python的包!
百度BAIDU:ModuleNotFoundError: No module named 'yoctools':
https://club.verimake.com/d/426-bl606pchatbot
chatbot音箱使用教程
开发环境搭建与音箱烧录
这里假设开发环境是 ubuntu22.04 开发环境。
安装 python 依赖的模块
按顺序输入以下指令。
$ pip install intelhex prettytable
$ pip install DecryptLogin selenium disutils scons yoctools
$ pip install intelhex prettytable DecryptLogin selenium disutils
5、第五个坑:
CC out/helloworld/customization/turnkey/cv181xc_evb_qfn_param/custom_vpssparam.o
CC out/helloworld/customization/turnkey/src/custom_event.o
CC out/helloworld/customization/turnkey/src/custom_platform.o
AR yoc_sdk/lib/libhelloworld.a
ranlib yoc_sdk/lib/libhelloworld.a
LINK out/helloworld/yoc.elf
Generating yoc.bin
INSTALL yoc.elf
riscv64-unknown-elf-objdump -d out/helloworld/yoc.elf > yoc.asm
run_postbuild_script(["yoc.bin"], ["out/helloworld/yoc.elf"])
[INFO] Generated output files ...
/home/rootroot/2023-10-18_source/mars_alios/solutions/helloworld
I am in Linux.
/home/rootroot/2023-10-18_source/mars_alios/solutions/helloworld
/home/rootroot/2023-10-18_source/mars_alios/boards/cv181xc_evb
/home/rootroot/2023-10-18_source/mars_alios/components/chip_cv181x
/home/rootroot/2023-10-18_source/mars_alios/solutions/helloworld/generated
/home/rootroot/2023-10-18_source/mars_alios/boards/cv181xc_evb/script/aft_build.sh: 81: product: not found
/home/rootroot/2023-10-18_source/mars_alios/boards/cv181xc_evb/script/aft_build.sh: 82: product: not found
fota image generate...
/home/rootroot/2023-10-18_source/mars_alios/boards/cv181xc_evb/script/aft_build.sh: 86: product: not found
scons: done building targets.
YoC SDK Done
[INFO] Create bin files
[INFO] Create imtb bin file
make[1]: product: Command not found
make[1]: *** [Makefile:27: all] Error 127
make[1]: Leaving directory '/home/rootroot/2023-10-18_source/mars_alios/solutions/helloworld'
make: *** [alios.mk:18: alios-build] Error 2
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$ cd mars_alios/boards/cv181xc_evb/
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source/mars_alios/boards/cv181xc_evb$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source/mars_alios/boards/cv181xc_evb$ find . -name product
./configs/product
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source/mars_alios/boards/cv181xc_evb$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source/mars_alios/boards/cv181xc_evb$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source/mars_alios/boards/cv181xc_evb$ cd configs/
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source/mars_alios/boards/cv181xc_evb/configs$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source/mars_alios/boards/cv181xc_evb/configs$ ll
total 11304
drwxr-xr-x 2 rootroot rootroot 4096 10月 18 07:11 ./
drwxr-xr-x 9 rootroot rootroot 4096 11月 3 15:12 ../
-rw-r--r-- 1 rootroot rootroot 947 10月 18 07:11 config16M.yaml
-rw-r--r-- 1 rootroot rootroot 966 10月 18 07:11 config8M.yaml
-rw-r--r-- 1 rootroot rootroot 1666 10月 18 07:11 config.yaml
-rw-r--r-- 1 rootroot rootroot 371200 10月 18 07:11 mklittlefs.exe
-rwxr-xr-x 1 rootroot rootroot 100536 10月 18 07:11 mklittlefs_linux*
-rwxr-xr-x 1 rootroot rootroot 6220688 10月 18 07:11 product*
-rw-r--r-- 1 rootroot rootroot 4855296 10月 18 07:11 product.exe
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source/mars_alios/boards/cv181xc_evb/configs$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source/mars_alios/boards/cv181xc_evb/configs$ file product
product: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 3.2.0, BuildID[sha1]=4bcb0b89a5a545ef57ff74a9732b7d153ce840ad, stripped
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source/mars_alios/boards/cv181xc_evb/configs$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source/mars_alios/boards/cv181xc_evb/configs$ sudo cp product /usr/bin/
[sudo] password for rootroot:
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source/mars_alios/boards/cv181xc_evb/configs$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source/mars_alios/boards/cv181xc_evb/configs$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source/mars_alios/boards/cv181xc_evb/configs$ cd /usr/bin/
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:/usr/bin$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:/usr/bin$ ll product
-rwxr-xr-x 1 root root 6220688 11月 3 15:16 product*
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:/usr/bin$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:/usr/bin$ cd ~/2023-10-18_source/
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$ build_all
这个坑是我编译cv180zb的时候碰到的最大的坑!
product: not found
想当然:sudo apt-get install product失败!
出错信息长得也不像python缺少包文件报错的样子!
BAIDU/BING/GOOGLE也找不到头绪,分析aft_build.sh这个脚本也没有找到线索!
最后怀疑product是不是cv180zb自带的可执行二进制文件!直接使用file分析所找到的product,确认了!
由于python是安装在/usr/bin里面的,product同样也放到这里了!
6、第六个坑:
OD /home/rootroot/2023-10-18_source/fsbl/build/cv180zb_wevb_0008a_spinor/bl2/bl2.dis
Built /home/rootroot/2023-10-18_source/fsbl/build/cv180zb_wevb_0008a_spinor/bl2.bin successfully
TARGET bl2
TARGET fip-all
[GEN] fip.bin
INFO:root:PROG: fiptool.py
DEBUG:root: BL2='/home/rootroot/2023-10-18_source/fsbl/build/cv180zb_wevb_0008a_spinor/bl2.bin'
DEBUG:root: BL2_FILL=None
DEBUG:root: BL32=None
DEBUG:root: BL32_RUNADDR=None
DEBUG:root: BLCP='test/empty.bin'
DEBUG:root: BLCP_2ND='/home/rootroot/2023-10-18_source/mars_alios/solutions/helloworld/yoc.bin'
DEBUG:root: BLCP_2ND_RUNADDR=2183135232
DEBUG:root: BLCP_IMG_RUNADDR=85983744
DEBUG:root: BLCP_PARAM_LOADADDR=0
DEBUG:root: BLOCK_SIZE=None
DEBUG:root: CHIP_CONF='/home/rootroot/2023-10-18_source/fsbl/build/cv180zb_wevb_0008a_spinor/chip_conf.bin'
DEBUG:root: DDR_PARAM='test/cv181x/ddr_param.bin'
DEBUG:root: LOADER_2ND='/home/rootroot/2023-10-18_source/u-boot-2021.10/build/cv180zb_wevb_0008a_spinor/u-boot-raw.bin'
DEBUG:root: MONITOR='../opensbi/build/platform/generic/firmware/fw_dynamic.bin'
DEBUG:root: MONITOR_RUNADDR=2147483648
DEBUG:root: NAND_INFO=b'\x00\x00\x00\x00'
DEBUG:root: NOR_INFO=b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff'
DEBUG:root: OLD_FIP=None
DEBUG:root: compress='lz4'
DEBUG:root: func=
DEBUG:root: output='/home/rootroot/2023-10-18_source/fsbl/build/cv180zb_wevb_0008a_spinor/fip.bin'
DEBUG:root: subcmd='genfip'
DEBUG:root: verbose=10
DEBUG:root:generate_fip:
DEBUG:root:add_nor_info:
DEBUG:root:add_nand_info:
DEBUG:root:add_chip_conf:
DEBUG:root:add_blcp:
DEBUG:root:add_bl2:
DEBUG:root:ddr_param=0x2000 bytes
DEBUG:root:blcp_2nd=0x1d12b0 bytes
DEBUG:root:monitor=0x19f88 bytes
DEBUG:root:loader_2nd=0x7d71f bytes
DEBUG:root:make_fip1:
INFO:root:add BLCP (0x0)
INFO:root:add BL2 (0x9200)
DEBUG:root:len(body1_bin) is 37376
DEBUG:root:len(fip1_bin) is 41472
DEBUG:root:make_fip2:
DEBUG:root:pack_blcp_2nd:
INFO:root:C906L_PARTITION_EXIST is true, yoc packed independented
DEBUG:root:pack_monitor:
DEBUG:root:pack_loader_2nd:
ERROR:root:lz4 is not installed. Run 'pip install lz4'.
Traceback (most recent call last):
File "./plat/cv180x/fiptool.py", line 848, in
main()
File "./plat/cv180x/fiptool.py", line 809, in main
args.func(args)
File "./plat/cv180x/fiptool.py", line 739, in generate_fip
fip_bin = fip.make(args)
File "./plat/cv180x/fiptool.py", line 704, in make
fip_bin = self.append_fip2(fip_bin, args)
File "./plat/cv180x/fiptool.py", line 687, in append_fip2
fip_bin = self.pack_loader_2nd(fip_bin)
File "./plat/cv180x/fiptool.py", line 641, in pack_loader_2nd
self._compress_ldr_2nd()
File "./plat/cv180x/fiptool.py", line 621, in _compress_ldr_2nd
body = lz4_compress(body)
File "./plat/cv180x/fiptool.py", line 65, in lz4_compress
import lz4.frame
ModuleNotFoundError: No module named 'lz4'
make[1]: *** [make_helpers/fip.mk:96: fip-all] Error 1
make[1]: Leaving directory '/home/rootroot/2023-10-18_source/fsbl'
make: *** [scripts/fip_v2.mk:50: fsbl-build] Error 2
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$ pip install lz
Collecting lz
Downloading lz-3.0.0-py3-none-any.whl (24 kB)
^CERROR: Operation cancelled by user
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$ pip install lz4
Collecting lz4
Downloading lz4-4.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB)
|████████████████████████████████| 1.3 MB 27 kB/s
Installing collected packages: lz4
Successfully installed lz4-4.3.2
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$ build_all
striping /home/rootroot/2023-10-18_source/install/soc_cv180zb_wevb_0008a_spinor/rootfs/bin/alios_cli
striping /home/rootroot/2023-10-18_source/install/soc_cv180zb_wevb_0008a_spinor/rootfs/bin/busybox
mksquashfs /home/rootroot/2023-10-18_source/install/soc_cv180zb_wevb_0008a_spinor/rootfs /home/rootroot/2023-10-18_source/install/soc_cv180zb_wevb_0008a_spinor/rawimages/rootfs.sqsh -root-owned -comp gzip
Parallel mksquashfs: Using 16 processors
Creating 4.0 filesystem on /home/rootroot/2023-10-18_source/install/soc_cv180zb_wevb_0008a_spinor/rawimages/rootfs.sqsh, block size 131072.
[==========================================================================================================================================================================================|] 100/100 100%
Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 131072
compressed data, compressed metadata, compressed fragments,
compressed xattrs, compressed ids
duplicates are removed
Filesystem size 2430.47 Kbytes (2.37 Mbytes)
47.27% of uncompressed filesystem size (5141.87 Kbytes)
Inode table size 2504 bytes (2.45 Kbytes)
16.61% of uncompressed inode table size (15075 bytes)
Directory table size 3795 bytes (3.71 Kbytes)
59.96% of uncompressed directory table size (6329 bytes)
Number of duplicate files found 3
Number of inodes 412
Number of files 68
Number of fragments 4
Number of symbolic links 299
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 45
Number of ids (unique uids + gids) 1
Number of uids 1
root (0)
Number of gids 1
root (0)
mv /home/rootroot/2023-10-18_source/install/soc_cv180zb_wevb_0008a_spinor/rawimages/rootfs.sqsh /home/rootroot/2023-10-18_source/install/soc_cv180zb_wevb_0008a_spinor/rawimages/rootfs.spinor
[TARGET] rootfs
python3 /home/rootroot/2023-10-18_source/build/tools/common/image_tool/raw2cimg.py /home/rootroot/2023-10-18_source/install/soc_cv180zb_wevb_0008a_spinor/rawimages/rootfs.spinor /home/rootroot/2023-10-18_source/install/soc_cv180zb_wevb_0008a_spinor /home/rootroot/2023-10-18_source/build/boards/cv180x/cv180zb_wevb_0008a_spinor/partition/partition_spinor.xml
INFO: size:260000, offset:a60000, part_sz:300000, crc:7b5d9a12
INFO: Packing rootfs.spinor done!
Run pack_data_spinor() function
~/2023-10-18_source/install/soc_cv180zb_wevb_0008a_spinor/data ~/2023-10-18_source
~/2023-10-18_source
[TARGET] data
chmod +x /home/rootroot/2023-10-18_source/build/tools/common/mkfs.jffs2
python3 /home/rootroot/2023-10-18_source/build/tools/common/image_tool/mkjffs2.py /home/rootroot/2023-10-18_source/build/tools/common/mkfs.jffs2 /home/rootroot/2023-10-18_source/install/soc_cv180zb_wevb_0008a_spinor/data 4096 /home/rootroot/2023-10-18_source/install/soc_cv180zb_wevb_0008a_spinor/rawimages/data.spinor /home/rootroot/2023-10-18_source/build/boards/cv180x/cv180zb_wevb_0008a_spinor/partition/partition_spinor.xml
python3 /home/rootroot/2023-10-18_source/build/tools/common/image_tool/raw2cimg.py /home/rootroot/2023-10-18_source/install/soc_cv180zb_wevb_0008a_spinor/rawimages/data.spinor /home/rootroot/2023-10-18_source/install/soc_cv180zb_wevb_0008a_spinor /home/rootroot/2023-10-18_source/build/boards/cv180x/cv180zb_wevb_0008a_spinor/partition/partition_spinor.xml
INFO: size:80000, offset:d60000, part_sz:80000, crc:a9996fac
INFO: Packing data.spinor done!
Run pack_system_spinor() function
mkdir -p /home/rootroot/2023-10-18_source/install/soc_cv180zb_wevb_0008a_spinor/system
[TARGET] system
python3 /home/rootroot/2023-10-18_source/build/tools/common/image_tool/raw2cimg.py /home/rootroot/2023-10-18_source/install/soc_cv180zb_wevb_0008a_spinor/rawimages/system.spinor /home/rootroot/2023-10-18_source/install/soc_cv180zb_wevb_0008a_spinor /home/rootroot/2023-10-18_source/build/boards/cv180x/cv180zb_wevb_0008a_spinor/partition/partition_spinor.xml
INFO: Packing /home/rootroot/2023-10-18_source/install/soc_cv180zb_wevb_0008a_spinor/upgrade.zip done!
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$
rootroot@rootroot-HP-245-14-inch-G10-Notebook-PC:~/2023-10-18_source$