20231103配置cv180zb的编译环境【填坑篇】

news2024/11/26 14:56:38

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 <module>
    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('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f83cc01cf70>: Failed to establish a new connection: [Errno 101] Network is unreachable')': /packages/cc/8b/11eb402856052429aab4e8d4a3866dd9c84dfeedacd8ae6e78bf8307d095/ruamel.yaml-0.18.4-py3-none-any.whl
  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('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fa428422fd0>: Failed to establish a new connection: [Errno 101] Network is unreachable')': /packages/7a/2a/95ed0501cf5d8709490b1d3a3f9b5cf340da6c433f896bbe9ce08dbe6785/configparser-4.0.2-py2.py3-none-any.whl
  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=<function generate_fip at 0x7fcfcd1eba60>
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 <module>
    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$ 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1169469.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

C++初阶(八)类和对象

&#x1f4d8;北尘_&#xff1a;个人主页 &#x1f30e;个人专栏:《Linux操作系统》《经典算法试题 》《C》 《数据结构与算法》 ☀️走在路上&#xff0c;不忘来时的初心 文章目录 一、Static成员1、Static概念2、Static特性3、试题 二、友元1、友元的类型2、友元函数3、 友元…

CSS中flex和inline-flex的区别

CSS中flex和inline-flex的区别 起因 display:flex\inline-flex是CSS中弹性布局时&#xff0c;用于容器元素的样式选项。 让人有些糊涂&#xff0c;两者的区别时什么。网上看了一些文章都在扯什么宽度之类的&#xff0c;完全就是胡扯。 还有的写什么“将对象作为弹性伸缩盒显示…

【软件STM32cubeIDE下H73xx配置串口uart1+中断接收/DMA收发+HAL库+简单数据解析-基础样例】

#【软件STM32cubeIDE下H73xx配置串口uart1中断接收/DMA收发HAL库简单数据解析-基础样例】 1、前言2、实验器件3-1、普通收发中断接收实验第一步&#xff1a;代码调试-基本配置&#xff08;1&#xff09;基本配置&#xff08;3&#xff09;时钟配置&#xff08;4&#xff09;保存…

TEMU拼多多跨境平台要求提供的UL测试报告如何办理?电子产品UL测试标准要求

平台销售的电子产品&#xff0c;要符合指定的标准&#xff0c;如果不合格很容易发生起火&#xff0c;等危及消费者生命财产的安全&#xff0c;因此很多客户因为缺少UL报告&#xff0c;导致产品被下架&#xff0c;销售权被移除等问题&#xff0c;也少不了同行之间的恶意举报触发…

ActiveMQ、RabbitMQ、RocketMQ、Kafka介绍

一、消息中间件的使用场景 消息中间件的使用场景总结就是六个字&#xff1a;解耦、异步、削峰 1.解耦 如果我方系统A要与三方B系统进行数据对接&#xff0c;推送系统人员信息&#xff0c;通常我们会使用接口开发来进行。但是如果运维期间B系统进行了调整&#xff0c;或者推送过…

如何开始短视频的制作,短视频脚本如何写?

在短视频创作拍摄的过程中&#xff0c;你有没有遇到过类似的情况&#xff1a; 拍摄拍到中途手忙脚乱的&#xff0c;不知道接下来该拍摄什么类容&#xff0c;或者拍了一半发现拍摄场景不行&#xff0c;又重新调整拍摄场景&#xff0c;再者&#xff0c;拍摄过程中发现缺少了拍摄道…

【面试专题】设计模式篇①

1.工厂设计模式 工厂设计模式是一种创建型模式&#xff0c;它提供了一种创建对象的接口&#xff0c;但具体创建的对象类型可以在运行时决定。工厂设计模式主要解决的是创建对象的灵活性问题。 工厂设计模式主要包括简单工厂模式、工厂方法模式和抽象工厂模式三种。 简单工厂…

虹科示波器 | 汽车免拆检修 | 2010款江铃陆风X8车发动机怠速抖动、加速无力

一、故障现象 一辆2010款江铃陆风X8车&#xff0c;搭载4G6GS4N发动机&#xff0c;累计行驶里程约为20万km。该车在其他修理厂进行发动机大修&#xff0c;维修后试车&#xff0c;发动机怠速抖动、加速无力。用故障检测仪检测&#xff0c;发动机控制模块&#xff08;ECM&#xff…

JVM常用命令

jps —查看pid jstat -gcutil 4364 1000 2000 —查看堆内存占用百分比&#xff0c;每秒打印1次&#xff0c;总共打印2000次 S0&#xff1a;幸存1区当前使用比例 S1&#xff1a;幸存2区当前使用比例 E&#xff1a;伊甸园区使用比例 O&#xff1a;老年代使用比例 M&#xff1a;元…

常用的Linux远程桌面配置方法

TigerVNC 是 VNC&#xff08;虚拟网络计算&#xff09;的高性能、平台中立的实现&#xff0c;VNC 是一种客户端/服务器应用程序&#xff0c;允许用户在远程计算机上启动图形应用程序并与之交互。 TigerVNC 提供运行 3D 和视频应用程序所需的性能水平&#xff0c;并尝试在其支持…

基于单片机的温室环境数据监测系统的设计

收藏和点赞&#xff0c;您的关注是我创作的动力 文章目录 概要 一、总体方案设计2.1 总体架构设计 二、整体硬件电路设计3.1 主控制器电路 三 系统设计概要4.2 主程序设计原理图程序 四、 结论五、 文章目录 概要 与农业发达国家相比&#xff0c;我国的农业科技方面还处于刚刚…

腾讯云双11云服务器活动:88元一年的云服务器值得买吗?

作为一名程序员&#xff0c;在选择云服务器时&#xff0c;最关注的是网络稳定性、价格以及云服务商的规模。腾讯云在2023年10月23日的​双11活动​中推出了一款性价比极高的云服务器&#xff0c;为我们提供了一个非常有吸引力的选择。 1. 关注网络稳定性、价格和云服务商规模 …

jar包的精细化运营,Java模块化简介 | 京东云技术团队

图&#xff1a;模块化手机概念 一、什么是Java模块化 Java模块化&#xff08;module&#xff09;是Java9及以后版本引入的新特性。 官方对模块的定义为&#xff1a;一个被命名的&#xff0c;代码和数据的自描述集合。&#xff08; the module, which is a named, self-descri…

【C语法学习】15 - fopen()函数

文章目录 1 函数原型2 返回值3 参数3.1 文件名3.2 模式3.2.1 以"r"模式打开3.2.2 以"w"模式打开3.2.3 以"a"模式打开3.2.4 以"r"模式打开3.2.5 以"w"模式打开3.2.6 以"a"模式打开 1 函数原型 fopen()&#xff1a…

AI大模型架构师专家,你会问什么来测试我的水平,如何解答上述问题,学习路径是什么

0. 沈剑老师的大模型产品应用经验&#xff1a; 提示词三步骤&#xff1a; 假如我是xxx专家&#xff0c;你会问什么来测试我的水平&#xff1b;假如你是xxx专家&#xff0c;你会如何解答上述问题&#xff1b;假如你是xxx专家&#xff0c;上述问题的学习路径是什么&#xff1b;…

面试算法54:所有大于或等于节点的值之和

题目 给定一棵二叉搜索树&#xff0c;请将它的每个节点的值替换成树中大于或等于该节点值的所有节点值之和。假设二叉搜索树中节点的值唯一。例如&#xff0c;输入如图8.10&#xff08;a&#xff09;所示的二叉搜索树&#xff0c;由于有两个节点的值大于或等于6&#xff08;即…

GCN火车票识别项目 P3 PaddleOCR识别火车票信息

从这节开始&#xff0c;就正式进入GCN项目的代码环节&#xff0c;我们先使用PaddleOCR&#xff0c;识别出火车票上的文字信息&#xff0c;并提取文字所位置&#xff0c;整理后另存为一个csv文件。 项目的目的是要做信息抽取&#xff0c;所以对训练和测试数据&#xff0c;需要手…

存储器(详解)

概念 存储器&#xff08;Memory&#xff09;是计算机系统中用于存储和检索数据的硬件设备或组件。它在计算机中扮演着重要的角色&#xff0c;允许计算机暂时或永久地存储程序、数据和中间结果。 存储器是许多存储单元的集合&#xff0c;按单元号顺序排列。每个单元由若干二进制…

专为个人打造专注工作的便签APP工具推荐哪个

工作中很多人都比较懒散&#xff0c;工作起来动力不足&#xff0c;常常拖延消极怠工&#xff0c;等到一天结束后进行工作盘点时才发现很多项任务都没有处理完&#xff1b;这和日常工作不能专注于工作有很大的关系。 专注工作&#xff0c;在日常办公时可以选择一些好用的手机便…

【Android】android studio 怎么下载NDK

序言 新版的android studio在【Project Structure】里面的NDK路径是灰色的&#xff0c;无法点击&#xff0c;导致找不到ndk路径&#xff0c;也无法添加ndk。 下载方法 去这里找&#xff0c;一定要点这个按钮才能出现ndk。 下载之后&#xff0c;要在这个文件里面添加ndk路径