博客
关于我
itop4412调试记录
阅读量:339 次
发布时间:2019-03-04

本文共 2427 字,大约阅读时间需要 8 分钟。

【记录5】linux3.5内核移植报错,以下链接不存在:

CROSS_COMPILE ?=/home/cym/exynos4412/4.2/android4.2.2_JLB_PC4_CYIT/pre

builts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-

【发生时间】20200212

【解决思路】

因为编译linux-3.5 内核需要使用Android4.2.2 源码自带的交叉编译器,所以需要把Android4.2.2 的源码拷贝到Ubuntu 虚拟机。例如把Android4.2.2 的压缩包“android-4.2.2_r1_xxxxxxxx.tar.gz”(通过网盘下载得到,xxxxxxxx 是版本日期)拷贝到Ubuntu 虚拟机的“/home/topeet/android”目录下,使用命令“tar -xvf android-4.2.2_r1_ xxxxxxxx.tar.gz”解压Android4.2.2 源码,解压完成后得到“android-4.2.2_r1”文件夹。接下来把Android4.2.2 的内核压缩包“iTOP-4412_Kernel-3.5_xxxxxxxx.tar.gz”(通过网盘下载得到,xxxxxxxx 是内核的版本日期)拷贝到Ubuntu 系统中,使用“tar -xvfiTOP-4412_Kernel-3.5_ xxxxxxxx.tar.gz”解压这个压缩包,然后生成Linux 内核源码文件夹“linux-3.5”。然后使用“cd linux-3.5”命令进入Linux 内核源码文件夹,在“linux-3.5”目录下找到“Makefile”文件,使用“vi Makefile”命令打开这个文件,然后找到包含以下内容的行:

“CROSS_COMPILE ?=/home/cym/exynos4412/4.2/android4.2.2_JLB_PC4_CYIT/pre

builts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-”修改成前面Android4.2.2 所存放的目录:“CROSS_COMPILE ?=/home/topeet/android/android-4.2.2_r1/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-”这里是指定下交叉编译器的路径,修改完成后退出并保存Makefile 文件。接下来开始编译Linux 内核,在“linux-3.5”目录执行下面命令开始编译内核:

make

参考链接:Android 开发环境搭建以及编译 - Self_made - 博客园

https://www.cnblogs.com/liming1593/p/5198842.html

 

【记录4】驱动教程——视频9 编写应用程序调用驱动 出现 Segmentation fault

【发生时间】2020.02.04

【解决思路】

驱动程序中.unlocked_ioctl赋值为1是错误的,需要改正为:.unlocked_ioctl =hello_ioctl

static struct file_operations hello_ops = {

.owner = THIS_MODULE,

.open = hello_open,

.release = hello_release,

.unlocked_ioctl =1,

};

改正后,编译结果如下:

 

 

 

【记录3】驱动教程——视频3 make menuconfig

【发生时间】2020.02.04

问题:make menuconfig 提示 Unable to find the ncurses

*** Unable to find the ncurses libraries or the

 *** required header files.
 *** 'make menuconfig' requires the ncurses libraries.
 *** 
 *** Install ncurses (ncurses-devel) and try again.
 ***
make[1]: *** [scripts/kconfig/dochecklxdialog] 错误 1
make: *** [menuconfig] 错误 2

解决方法:

1. 使用make menuconfig时,提示 Unable to find the ncurses

使用命令:sudo apt-get install libncurses5-dev,还是解决不了。

2. 通过观当前用户为普通用户topeet,更换为root后,问题消失。

【记录2】第三章 helloworld,无法挂载usb

现象:使用命令mount /dev/sda1 /mnt/usb,提示

mount: mounting /dev/sdb on /mnt/usb failed: No such file or directory

解决办法:cd /    (mount命令必须在根目录下使用)

 

【记录1】第二章 最小 Linux 系统,system.img烧写通不过!

现象:

烧写步骤失败:fastboot.exe flash system system.img

即使烧写成功,系统也会提升:[   16.603855] init: cannot execve('/system/bin/sh'): No such file or directory

解决办法:更换电脑端USB下载端口。

你可能感兴趣的文章
netty——bytebuf的创建、内存分配与池化、组成、扩容规则、写入读取、内存回收、零拷贝
查看>>
netty——Channl的常用方法、ChannelFuture、CloseFuture
查看>>
netty——EventLoop概念、处理普通任务定时任务、处理io事件、EventLoopGroup
查看>>
netty——Future和Promise的使用 线程间的通信
查看>>
netty——Handler和pipeline
查看>>
Vue输出HTML
查看>>
netty——黏包半包的解决方案、滑动窗口的概念
查看>>
Netty中Http客户端、服务端的编解码器
查看>>
Netty中使用WebSocket实现服务端与客户端的长连接通信发送消息
查看>>
Netty中实现多客户端连接与通信-以实现聊天室群聊功能为例(附代码下载)
查看>>
Netty中的组件是怎么交互的?
查看>>
Netty中集成Protobuf实现Java对象数据传递
查看>>
netty之 定长数据流处理数据粘包问题
查看>>
Netty事件注册机制深入解析
查看>>
netty代理
查看>>
Netty入门使用
查看>>
netty入门,入门代码执行流程,netty主要组件的理解
查看>>
Netty原理分析及实战(一)-同步阻塞模型(BIO)
查看>>
Netty原理分析及实战(三)-高可用服务端搭建
查看>>
Netty原理分析及实战(二)-同步非阻塞模型(NIO)
查看>>