Hi3520DV400 kernel 编译

目录

注意

1.从linux开源社区下载v3.18.20版本的内核:

2.打补丁

3.编译kernel

4.可能存在的问题

1)make ARCH=arm CROSS_COMPILE=arm-hisiv500-linux- menuconfig     Makefile:546: recipe for target 'menuconfig' failed

2)make ARCH=arm CROSS_COMPILE=arm-hisiv500-linux- uImage      arch/arm/Makefile:334: recipe for target 'uImage' failed

3)安装u-boot-tools报错


注意

1.Hi3521D_V100&Hi3520D_V400共用SDK

2.海思SDK版本中代号C01是uclibc库,C02是glibc库

1.从linux开源社区下载v3.18.20版本的内核:


        1)进入网站:www.kernel.org
        2)选择HTTP协议资源的https://www.kernel.org/pub/选项,进入子页面
        3)选择linux/菜单项,进入子页面
        4)选择kernel/菜单项,进入子页面
        5)选择v3.x/菜单项,进入子页面
        6)下载linux-3.18.20.tar.gz(或者linux-3.18.20.tar.xz)

2.打补丁


    1)将下载的 linux-3.18.20.tar.gz 存放到 hi3521d svn osdrv的opensource/kernel目录中
    2)在linux服务器中进入 hi3521d svn osdrv 的根目录,执行如下命令:    

	cd opensource/kernel
	tar -zxf linux-3.18.20.tar.gz
	mv linux-3.18.20 linux-3.18.y
	cd linux-3.18.y
	patch -p1 < ../hi3521d_for_linux_v3.18.y.patch

3.编译kernel

cp arch/arm/configs/hi3520dv400_full_defconfig  .config
make ARCH=arm CROSS_COMPILE=arm-hisiv500-linux- menuconfig
make ARCH=arm CROSS_COMPILE=arm-hisiv500-linux- uImage

arch/arm/boot/uImage 就是能够在单板上运行的内核镜像

 

4.可能存在的问题

1)make ARCH=arm CROSS_COMPILE=arm-hisiv500-linux- menuconfig     Makefile:546: recipe for target 'menuconfig' failed

HOSTCC  scripts/kconfig/mconf.o
<command-line>:0:12: fatal error: curses.h: 没有那个文件或目录
compilation terminated.
scripts/Makefile.host:124: recipe for target 'scripts/kconfig/mconf.o' failed
make[1]: *** [scripts/kconfig/mconf.o] Error 1
Makefile:546: recipe for target 'menuconfig' failed
make: *** [menuconfig] Error 2

解决方法

sudo apt-get install libncurses5-dev

2)make ARCH=arm CROSS_COMPILE=arm-hisiv500-linux- uImage      arch/arm/Makefile:334: recipe for target 'uImage' failed

"mkimage" command not found - U-Boot images will not be built
arch/arm/boot/Makefile:87: recipe for target 'arch/arm/boot/uImage' failed
make[1]: *** [arch/arm/boot/uImage] Error 1
arch/arm/Makefile:334: recipe for target 'uImage' failed
make: *** [uImage] Error 2

解决方法

sudo apt-get install u-boot-tools

3)安装u-boot-tools报错

正在设置 mysql-server-8.0 (8.0.23-0ubuntu0.20.04.1) ...
Renaming removed key_buffer and myisam-recover options (if present)
/var/lib/mysql/ibdata1:  3506
ERROR: Database files are locked. Daemon already running?
Warning: Unable to start the server.

Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
invoke-rc.d: initscript mysql, action "start" failed.
● mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Fri 2021-04-30 14:10:58 CST; 5ms ago
    Process: 64875 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
    Process: 64883 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
   Main PID: 64883 (code=exited, status=1/FAILURE)
     Status: "Server startup in progress"

4月 30 14:10:58 ubuntu systemd[1]: mysql.service: Failed with result 'exit-code'.
4月 30 14:10:58 ubuntu systemd[1]: Failed to start MySQL Community Server.
dpkg: 处理软件包 mysql-server-8.0 (--configure)时出错:
 已安装 mysql-server-8.0 软件包 post-installation 脚本 子进程返回错误状态 1
正在设置 libfdt1:amd64 (1.5.1-1) ...
正在设置 libubootenv0.1:amd64 (0.2-1) ...
正在设置 device-tree-compiler (1.5.1-1) ...
正在设置 u-boot-tools (2020.10+dfsg-1ubuntu0~20.04.2) ...
dpkg: 依赖关系问题使得 mysql-server 的配置工作不能继续:
 mysql-server 依赖于 mysql-server-8.0;然而:
  软件包 mysql-server-8.0 尚未配置。

dpkg: 处理软件包 mysql-server (--configure)时出错:
 依赖关系问题 - 仍未被配置
正在设置 libubootenv-tool (0.2-1) ...
因为错误消息指示这是由于上一个问题导致的错误,没有写入 apport 报告。
                                                                    正在处理用于 man-db (2.9.1-1) 的触发器 ...
正在处理用于 libc-bin (2.31-0ubuntu9.3) 的触发器 ...
在处理时有错误发生:
 mysql-server-8.0
 mysql-server

出错原因是系统mysql服务配置的有问题,由于前一段时间搭建一个web环境配置mysql出了问题,于是就找了教程卸载安装了几次还是有问题,后来忙就没弄了,今天需要用到于是就又找了下解决办法。

参照下面这个博客解决,感谢作者!

ubuntu 20.04 彻底删除mysql,并重装mysql-8.0.20 https://blog.csdn.net/fanrongwoaini/article/details/107518693

 

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值