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

你可能感兴趣的文章
NIO基于UDP协议的网络编程
查看>>
NIO笔记---上
查看>>
NIO蔚来 面试——IP地址你了解多少?
查看>>
NISP一级,NISP二级报考说明,零基础入门到精通,收藏这篇就够了
查看>>
NISP国家信息安全水平考试,收藏这一篇就够了
查看>>
NIS服务器的配置过程
查看>>
Nitrux 3.8 发布!性能全面提升,带来非凡体验
查看>>
NiuShop开源商城系统 SQL注入漏洞复现
查看>>
NI笔试——大数加法
查看>>
NLog 自定义字段 写入 oracle
查看>>
NLog类库使用探索——详解配置
查看>>
NLP 基于kashgari和BERT实现中文命名实体识别(NER)
查看>>
NLP 模型中的偏差和公平性检测
查看>>
Vue3.0 性能提升主要是通过哪几方面体现的?
查看>>
NLP 项目:维基百科文章爬虫和分类【01】 - 语料库阅读器
查看>>
NLP_什么是统计语言模型_条件概率的链式法则_n元统计语言模型_马尔科夫链_数据稀疏(出现了词库中没有的词)_统计语言模型的平滑策略---人工智能工作笔记0035
查看>>
NLP三大特征抽取器:CNN、RNN与Transformer全面解析
查看>>
NLP学习笔记:使用 Python 进行NLTK
查看>>
NLP度量指标BELU真的完美么?
查看>>
NLP的不同研究领域和最新发展的概述
查看>>