Android的内核版本(第一次) [英] android kernel build (first time)
问题描述
好了,所以第一关,
林全新的Android开发人员。这是我在任何形式的内核什么的第一次尝试。我有Java和Python的知识有限,但没有C
Ok so first off, Im brand new to android dev. This is my first attempt at any form of kernel anything. I have a limited knowledge of java and python, but no C.
我有一个Galaxy Tab的4 SM-T330NU运行4.4.2。其运行的高通Snapdragon 400 msm8226的cpu。 IM只是试图做一个测试版本在这一点香草内核。 (也是我的编译环境是最新的1.1卡利和IM在教程松散以下https://github.com/offensive-security/kali-nethunter/wiki/Porting-Nethunter )
I have a galaxy tab 4 sm-t330nu running 4.4.2. its running a qualcomm snapdragon 400 msm8226 cpu. im simply trying to do a test build with a vanilla kernel at this point. (also my build environment is the newest kali 1.1 and im loosely following the tutorial at https://github.com/offensive-security/kali-nethunter/wiki/Porting-Nethunter)
所以我拥有所有必需的依赖关系(我希望),以及香港专业教育学院下载三星开源我的源。解压缩后,通过现有的defconfigs去了。发现msm8226-sec_milletwifiue_defconfig后,我决定这是我的平板电脑最有可能的人选。 (做一个自定义恢复时,我记得它是Philz需要触摸milletwifiue东西)
so i have all of the required dependencies (i hope), and ive downloaded my source from samsung opensource. unzipped and went through the available defconfigs. after finding "msm8226-sec_milletwifiue_defconfig" i decided it was the most likely candidate for my tablet. (when doing a custom recovery i remember it being "philz touch milletwifiue something)
香港专业教育学院完成了我的出口(ARCH = =子体系CROSS_COMPILE =)和一切似乎都很好。当我运行构建以下完全按照教程说(使用defconfig在他们的例子作为测试),我收到一条错误消息:必须定义variant_defconfig。所以我做的,而不是做variant_defconfig = msm8974_sec_defconfig,它建立巨大的。
Ive done my exports (arch= subarch= cross_compile=) and all seems well. When i run a build following exactly as the tutorial says (using the defconfig in their example as a test) i receive an error stating "must define variant_defconfig". So i instead do "make variant_defconfig=msm8974_sec_defconfig" and it builds great.
现在的问题:
当我改变msm8974_sec_defconfig以我的实际msm8226我收到一个错误的每个构建我似乎无法变通。 (上剪下来的大小)
Now the issue: When i change "msm8974_sec_defconfig" to my actual msm8226 i receive an error on every build that i cannot seem to workaround. (cut down for size)
CC arch/arm/kernel/armksyms.o
CC arch/arm/kernel/module.o
AS arch/arm/kernel/sleep.o
CC arch/arm/kernel/suspend.o
CC arch/arm/kernel/io.o
arch/arm/kernel/io.c: In function '_memcpy_fromio':
arch/arm/kernel/io.c:14:3: error: implicit declaration of function 'nop' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[1]: *** [arch/arm/kernel/io.o] Error 1
make: *** [arch/arm/kernel] Error 2
我确切的bash行读取
My exact bash line reads
make VARIANT_DEFCONFIG=msm8226-sec_milletwifiue_defconfig
在清除此的任何帮助将是巨大的。
Any assistance on clearing this up would be great
编辑结果
虽然我不是熟悉C,它在我看来,'_memcpy_fromio就是错误的所在。我的谷歌搜索告诉我的错误是一个函数没有被声明使用。但是我不知道,如果是的memcpy函数?或者类的memcpy中的函数(不知道是否c的班,我知道的只是最接近的)我如何调试这code和申报需要声明的内容(更重要的是,如果这是使用现有的内核,多数民众赞成由数千台设备,怎么能可能有未申报的功能?结果
/编辑
edit
although im not familiar with c, it seems to me that '_memcpy_fromio' is where the error lies. and my google searches tell me that the error is that a function is used without being declared. however i dont know if memcpy is a function? or is the function within class memcpy (dont know if c has classes just closest equivalent that i know of) how do i debug this code and declare what needs to be declared (more importantly, if this is a stock kernel thats used by thousands of devices, how can it possibly have an undeclared function?
/edit
推荐答案
找到了答案!需要
#import linux/modules.h
#import linux/kernel.h
这篇关于Android的内核版本(第一次)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!