博客
关于我
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下载端口。

你可能感兴趣的文章
Mac OS 12.0.1 如何安装柯美287打印机驱动,刷卡打印
查看>>
MangoDB4.0版本的安装与配置
查看>>
Manjaro 24.1 “Xahea” 发布!具有 KDE Plasma 6.1.5、GNOME 46 和最新的内核增强功能
查看>>
mapping文件目录生成修改
查看>>
MapReduce程序依赖的jar包
查看>>
mariadb multi-source replication(mariadb多主复制)
查看>>
MariaDB的简单使用
查看>>
MaterialForm对tab页进行隐藏
查看>>
Member var and Static var.
查看>>
memcached高速缓存学习笔记001---memcached介绍和安装以及基本使用
查看>>
memcached高速缓存学习笔记003---利用JAVA程序操作memcached crud操作
查看>>
Memcached:Node.js 高性能缓存解决方案
查看>>
memcache、redis原理对比
查看>>
memset初始化高维数组为-1/0
查看>>
Metasploit CGI网关接口渗透测试实战
查看>>
Metasploit Web服务器渗透测试实战
查看>>
MFC模态对话框和非模态对话框
查看>>
Moment.js常见用法总结
查看>>
MongoDB出现Error parsing command line: unrecognised option ‘--fork‘ 的解决方法
查看>>
mxGraph改变图形大小重置overlay位置
查看>>