返回> 网站首页 

创建M6708核心板编译环境

yoours2021-11-13 13:50:09 阅读 2193

简介一边听听音乐,一边写写文章。

         linux嵌入式arm板为周立功的M6708U-1GLI-T核心板。

一、Ubuntu

下载ubuntu 18.04.6 64位

http://releases.ubuntu.com/18.04.6/ubuntu-18.04.6-desktop-amd64.iso

二、应用编译:

1. 安装编译环境

工具链:poky-glibc-x86_64-meta-toolchain-cortexa9hf-vfp-neon-toolchain-1.7.tar.gz

解压至/opt/路径,解压后路径如:/opt/poky/1.7/

2. 设置环境变量

source /opt/poky/1.7/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi

3. 编译

   a) 如果编译提示:

berryz2007@ubuntu:~/gpio/gpio_test$ make

Fatal Python error: Py_Initialize: Unable to get the locale encoding

ModuleNotFoundError: No module named 'encodings'


Current thread 0x00007f547f226740 (most recent call first):

Aborted (core dumped)


    则:安装make

berryz2007@ubuntu:~/gpio/gpio_test$ sudo apt-get install make

[sudo] password for berryz2007: 

Reading package lists... Done

Building dependency tree       

Reading state information... Done

Suggested packages:

  make-doc

The following NEW packages will be installed:

  make

0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.

Need to get 154 kB of archives.

After this operation, 381 kB of additional disk space will be used.

Get:1 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 make amd64 4.1-9.1ubuntu1 [154 kB]

Fetched 154 kB in 1s (107 kB/s)

Selecting previously unselected package make.

(Reading database ... 127616 files and directories currently installed.)

Preparing to unpack .../make_4.1-9.1ubuntu1_amd64.deb ...

Unpacking make (4.1-9.1ubuntu1) ...

Setting up make (4.1-9.1ubuntu1) ...

Processing triggers for man-db (2.8.3-2ubuntu0.1) ...


三、内核编译

a) sudo apt-get install lzop

        b) 添加阿里云源

            sudo vi /etc/apt/sources.list

            deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse

            deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse


            deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse

            deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse


            deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse

            deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse


            deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

            deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse


            deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

            deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

        更新源

            sudo apt-get update

        安装gcc

             sudo apt-get install gcc

        编译内核

             ./build.sh

四、编译驱动
        查看调整Makefile文件中设置的路径,在内核编译完成后即可正常编译驱动。

微信小程序扫码登陆

文章评论

2193人参与,0条评论