16ev200内核编译过程遇到的问题

1. ubuntu13.04 16ev200 编译内核时报错
liu@ubuntu:~/hisi/16ev200/Hi3516EV200R001C01SPC011/01.software/board/Hi3516EV200_SDK_V1.0.1.1/osdrv/opensource/kernel/linux-4.9.y$ make ARCH=arm CROSS_COMPILE=arm-himix100-linux- menuconfig
  HOSTCC  scripts/kconfig/mconf.o
In file included from scripts/kconfig/mconf.c:23:0:
scripts/kconfig/lxdialog/dialog.h:38:20: fatal error: curses.h: No such file or directory
compilation terminated.
make[1]: *** [scripts/kconfig/mconf.o] Error 1
make: *** [menuconfig] Error 2


2. 百度查需要安装libncurses5-dev 包,安吧,出错了,需要安装依赖包
liu@ubuntu:~/hisi/16ev200/Hi3516EV200R001C01SPC011/01.software/board/Hi3516EV200_SDK_V1.0.1.1/osdrv/opensource/kernel/linux-4.9.y$ sudo apt-get install libncurses5-dev 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libncurses5-dev : Depends: libncurses5 (= 5.9-4) but 5.9-10ubuntu4 is to be installed
                   Depends: libtinfo-dev (= 5.9-4) but it is not going to be installed
                   Depends: ncurses-bin (= 5.9-4) but 5.9-10ubuntu4 is to be installed
E: Unable to correct problems, you have held broken packages.


3. 从最下面的开始安装,安装成功
liu@ubuntu:~/hisi/16ev200/Hi3516EV200R001C01SPC011/01.software/board/Hi3516EV200_SDK_V1.0.1.1/osdrv/opensource/kernel/linux-4.9.y$ sudo apt-get install ncurses-bin=5.9-4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be DOWNGRADED:
  ncurses-bin
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 2 not upgraded.
Need to get 151 kB of archives.
After this operation, 4,096 B disk space will be freed.
Do you want to continue [Y/n]? y
Get:1 http://mirrors.163.com/ubuntu/ precise/main ncurses-bin i386 5.9-4 [151 kB]
Fetched 151 kB in 0s (417 kB/s) 
dpkg: warning: downgrading ncurses-bin from 5.9-10ubuntu4 to 5.9-4
(Reading database ... 158961 files and directories currently installed.)
Preparing to replace ncurses-bin 5.9-10ubuntu4 (using .../ncurses-bin_5.9-4_i386.deb) ...
Unpacking replacement ncurses-bin ...
Processing triggers for man-db ...
Setting up ncurses-bin (5.9-4) ...


4. 安装完的那个试一下 是有作用的
liu@ubuntu:~/hisi/16ev200/Hi3516EV200R001C01SPC011/01.software/board/Hi3516EV200_SDK_V1.0.1.1/osdrv/opensource/kernel/linux-4.9.y$ sudo apt-get install libncurses5-dev 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libncurses5-dev : Depends: libncurses5 (= 5.9-4) but 5.9-10ubuntu4 is to be installed
                   Depends: libtinfo-dev (= 5.9-4) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.


5. 继续安装倒数第二个,发现它还有依赖
liu@ubuntu:~/hisi/16ev200/Hi3516EV200R001C01SPC011/01.software/board/Hi3516EV200_SDK_V1.0.1.1/osdrv/opensource/kernel/linux-4.9.y$ sudo apt-get install libtinfo-dev 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libtinfo-dev : Depends: libtinfo5 (= 5.9-4) but 5.9-10ubuntu4 is to be installed
E: Unable to correct problems, you have held broken packages.

6. 安装它的依赖吧,它竟然还有依赖
liu@ubuntu:~/hisi/16ev200/Hi3516EV200R001C01SPC011/01.software/board/Hi3516EV200_SDK_V1.0.1.1/osdrv/opensource/kernel/linux-4.9.y$ sudo apt-get install libtinfo5=5.9-4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 apache2.2-common : Depends: procps but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

7. 安装这个依赖,发现已经安装了
liu@ubuntu:~/hisi/16ev200/Hi3516EV200R001C01SPC011/01.software/board/Hi3516EV200_SDK_V1.0.1.1/osdrv/opensource/kernel/linux-4.9.y$ sudo apt-get install procps         
Reading package lists... Done
Building dependency tree       
Reading state information... Done
procps is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

8. 再试下有没有作用,发现还是需要安装这个已经安装的依赖包,可恨呐
liu@ubuntu:~/hisi/16ev200/Hi3516EV200R001C01SPC011/01.software/board/Hi3516EV200_SDK_V1.0.1.1/osdrv/opensource/kernel/linux-4.9.y$ sudo apt-get install libtinfo5=5.9-4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 apache2.2-common : Depends: procps but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.


9. 百度下,居然找到了一个https://blog.csdn.net/Davidietop/article/details/88934783网站,报了个料,下载依赖检查的功能强大的包管理工具aptitude,好样的,试试,安装成功
liu@ubuntu:~/hisi/16ev200/Hi3516EV200R001C01SPC011/01.software/board/Hi3516EV200_SDK_V1.0.1.1/osdrv/opensource/kernel/linux-4.9.y$ sudo apt-get install aptitude
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libboost-iostreams1.46.1 libcwidget3 libept1.4.12
Suggested packages:
  aptitude-doc-en aptitude-doc tasksel debtags libcwidget-dev
The following NEW packages will be installed:
  aptitude libboost-iostreams1.46.1 libcwidget3 libept1.4.12
0 upgraded, 4 newly installed, 0 to remove and 2 not upgraded.
Need to get 2,915 kB of archives.
After this operation, 8,742 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://mirrors.163.com/ubuntu/ precise/main libboost-iostreams1.46.1 i386 1.46.1-7ubuntu3 [39.9 kB]
Get:2 http://mirrors.163.com/ubuntu/ precise/main libcwidget3 i386 0.5.16-3.1ubuntu1 [392 kB]
Get:3 http://mirrors.163.com/ubuntu/ precise/main libept1.4.12 i386 1.0.6~exp1ubuntu1 [129 kB]
Get:4 http://mirrors.163.com/ubuntu/ precise-updates/main aptitude i386 0.6.6-1ubuntu1.2 [2,355 kB]
Fetched 2,915 kB in 6s (417 kB/s)                                                                                                                                                                                                                                                      
Selecting previously unselected package libboost-iostreams1.46.1.
(Reading database ... 158960 files and directories currently installed.)
Unpacking libboost-iostreams1.46.1 (from .../libboost-iostreams1.46.1_1.46.1-7ubuntu3_i386.deb) ...
Selecting previously unselected package libcwidget3.
Unpacking libcwidget3 (from .../libcwidget3_0.5.16-3.1ubuntu1_i386.deb) ...
Selecting previously unselected package libept1.4.12.
Unpacking libept1.4.12 (from .../libept1.4.12_1.0.6~exp1ubuntu1_i386.deb) ...
Selecting previously unselected package aptitude.
Unpacking aptitude (from .../aptitude_0.6.6-1ubuntu1.2_i386.deb) ...
Processing triggers for man-db ...
Setting up libboost-iostreams1.46.1 (1.46.1-7ubuntu3) ...
Setting up libcwidget3 (0.5.16-3.1ubuntu1) ...
Setting up libept1.4.12 (1.0.6~exp1ubuntu1) ...
Setting up aptitude (0.6.6-1ubuntu1.2) ...
update-alternatives: using /usr/bin/aptitude-curses to provide /usr/bin/aptitude (aptitude) in auto mode
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place


10. 采用这个aptitude工具安装需要安装的包,注意步骤啊,不能keep现有的已安装的包,选择n,然后按照新的提示下载可以用的依赖包,成功了!!
liu@ubuntu:~/hisi/16ev200/Hi3516EV200R001C01SPC011/01.software/board/Hi3516EV200_SDK_V1.0.1.1/osdrv/opensource/kernel/linux-4.9.y$ sudo aptitude install libtinfo5=5.9-4
The following packages will be DOWNGRADED:
  libtinfo5 
0 packages upgraded, 0 newly installed, 1 downgraded, 0 to remove and 2 not upgraded.
Need to get 90.0 kB of archives. After unpacking 2,048 B will be freed.
The following packages have unmet dependencies:
 libncurses5 : Depends: libtinfo5 (= 5.9-10ubuntu4) but 5.9-4 is to be installed.
 libncursesw5 : Depends: libtinfo5 (= 5.9-10ubuntu4) but 5.9-4 is to be installed.
open: 360; closed: 412; defer: 330; conflict: 609                                                                                                                                                                                                                                      .The following actions will resolve these dependencies:

     Keep the following packages at their current version:
1)     libtinfo5 [5.9-10ubuntu4 (now)]                    

Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:

     Downgrade the following packages:                      
1)     libncurses5 [5.9-10ubuntu4 (now) -> 5.9-4 (precise)] 
2)     libncursesw5 [5.9-10ubuntu4 (now) -> 5.9-4 (precise)]

Accept this solution? [Y/n/q/?] y
The following packages will be DOWNGRADED:
  libncurses5 libncursesw5 libtinfo5 
0 packages upgraded, 0 newly installed, 3 downgraded, 0 to remove and 2 not upgraded.
Need to get 351 kB of archives. After unpacking 376 kB will be used.
Do you want to continue? [Y/n/?] y
Get: 1 http://mirrors.163.com/ubuntu/ precise/main libncursesw5 i386 5.9-4 [145 kB]
Get: 2 http://mirrors.163.com/ubuntu/ precise/main libtinfo5 i386 5.9-4 [90.0 kB]
Get: 3 http://mirrors.163.com/ubuntu/ precise/main libncurses5 i386 5.9-4 [116 kB]
Fetched 351 kB in 1s (230 kB/s)  
dpkg: warning: downgrading libncursesw5:i386 from 5.9-10ubuntu4 to 5.9-4
(Reading database ... 159092 files and directories currently installed.)
Preparing to replace libncursesw5:i386 5.9-10ubuntu4 (using .../libncursesw5_5.9-4_i386.deb) ...
Unpacking replacement libncursesw5:i386 ...
dpkg: warning: downgrading libtinfo5:i386 from 5.9-10ubuntu4 to 5.9-4
Preparing to replace libtinfo5:i386 5.9-10ubuntu4 (using .../libtinfo5_5.9-4_i386.deb) ...
Unpacking replacement libtinfo5:i386 ...
Setting up libtinfo5:i386 (5.9-4) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
dpkg: warning: downgrading libncurses5:i386 from 5.9-10ubuntu4 to 5.9-4
(Reading database ... 159093 files and directories currently installed.)
Preparing to replace libncurses5:i386 5.9-10ubuntu4 (using .../libncurses5_5.9-4_i386.deb) ...
Unpacking replacement libncurses5:i386 ...
Setting up libncurses5:i386 (5.9-4) ...
Setting up libncursesw5:i386 (5.9-4) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
                                         
                                         
                                         
                                         
11. 安装剩下的依赖包
liu@ubuntu:~/hisi/16ev200/Hi3516EV200R001C01SPC011/01.software/board/Hi3516EV200_SDK_V1.0.1.1/osdrv/opensource/kernel/linux-4.9.y$ sudo aptitude install libtinfo-dev
The following NEW packages will be installed:
  libtinfo-dev 
0 packages upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 93.5 kB of archives. After unpacking 286 kB will be used.
Get: 1 http://mirrors.163.com/ubuntu/ precise/main libtinfo-dev i386 5.9-4 [93.5 kB]
Fetched 93.5 kB in 0s (370 kB/s)  
Selecting previously unselected package libtinfo-dev:i386.
(Reading database ... 159097 files and directories currently installed.)
Unpacking libtinfo-dev:i386 (from .../libtinfo-dev_5.9-4_i386.deb) ...
Setting up libtinfo-dev:i386 (5.9-4) ...
                                         


12. 安装最终的包啊
liu@ubuntu:~/hisi/16ev200/Hi3516EV200R001C01SPC011/01.software/board/Hi3516EV200_SDK_V1.0.1.1/osdrv/opensource/kernel/linux-4.9.y$ sudo aptitude install libncurses5-dev
The following NEW packages will be installed:
  libncurses5-dev 
0 packages upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 218 kB of archives. After unpacking 1,049 kB will be used.
Get: 1 http://mirrors.163.com/ubuntu/ precise/main libncurses5-dev i386 5.9-4 [218 kB]
Fetched 218 kB in 1s (186 kB/s)     
Selecting previously unselected package libncurses5-dev.
(Reading database ... 159108 files and directories currently installed.)
Unpacking libncurses5-dev (from .../libncurses5-dev_5.9-4_i386.deb) ...
Setting up libncurses5-dev (5.9-4) ...                                

13. 这事成了,恭喜你,可以编译内核了
liu@ubuntu:~/hisi/16ev200/Hi3516EV200R001C01SPC011/01.software/board/Hi3516EV200_SDK_V1.0.1.1/osdrv/opensource/kernel/linux-4.9.y$ make ARCH=arm CROSS_COMPILE=arm-himix100-linux- menuconfig
  HOSTCC  scripts/kconfig/mconf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTCC  scripts/kconfig/lxdialog/checklist.o
  HOSTCC  scripts/kconfig/lxdialog/util.o
  HOSTCC  scripts/kconfig/lxdialog/inputbox.o
  HOSTCC  scripts/kconfig/lxdialog/textbox.o
  HOSTCC  scripts/kconfig/lxdialog/yesno.o
  HOSTCC  scripts/kconfig/lxdialog/menubox.o
  HOSTLD  scripts/kconfig/mconf
scripts/kconfig/mconf  Kconfig         

你可能感兴趣的:(C,海思)