新手编译内核请看这里,欢迎大家一起交流【更新点屏说明】
本帖最后由 loading 于 2016-8-6 22:31 编辑作为新手,遇到问题总会有迷茫,不知如何下手,有时候还看人家的白眼。。。但是,,,如果想尽快入门,想得到大家准确并及时的帮助,
请先使用搜索功能(baidu、google、bing),善于使用搜索,能够尽快解决问题及提高自己解决问题的能力,
好了,,,废话多了
1. 根据wiki 配置好环境,同步并更新代码;
http://wiki.t-firefly.com/index. ... ld_android_lollipop
2. 阅读文档
路径:RKDocs/
3. 进入内核目录,然后按照wiki 说明进行编译【重点】
1)make firefly-rk3288_defconfig---这么命令是干什么的,又生成什么呢? 是否可以编译其他的?
a. 这个命令是用来生成“.config”,是内核所有的配置,哪些是编译进内核的,哪些是编译成模块的,哪些是不编译的
可以用make menuconfig 或者make nconfig 来查看;
b. firefly-rk3288_defconfig 在哪里,为什么编译的时候说没有找到这个文件?
这个文件路径:kernel/arch/arm/configs/,这个路径下面有很多defconfig,可以根据需要进行编译,
如果这个路径下存在你需要编译的defconfig 文件,一般不会报错,除非你看都不看就直接make xxx_defconfig,下划线或者短扛都不注意;
2)make -j8 firefly-rk3288.img---这个命令应该是没什么好说的,就是编译内核,但是呢,,,
a. -jn,就是用n 线程来编译,-j8 就是8线程进行编译,
b. 为什么是firefly-rk3288.img,可不可以写成其他的 xxx.img?
这个可以根据自己项目命名的,对应的文件配置路径为:kernel/arch/arm/boot/dts/
这个路径下就两种格式:dts/dtsi,可以类比为".c/.h"文件,具体情况可以在用到时在说
ccc.dts 就是你要编译的项目配置文件,即make -jn ccc.img,如果报错没有找到ccc.dts,,,那可能就是你写错了(⊙﹏⊙)b
好了,编译内核就这么两步,,,但是很多时候就卡在这两步,需要弄明白每个命令干什么,对应的文件路径在哪里
后续慢慢更新每个模块调式的问题。。。
欢迎大家一起交流
---0805
编译完成后就烧录,,,烧录工具在RKTools/ 下面,我一般在Windows 下烧录,用AndroidTool.exe
等等,,,还得先弄好串口线打印log,,,非常重要,不然开不了机了,卡死了,进不了系统了,重启了,神知道是哪里问题,但是log 会告诉你
4. 点屏
点过这些接口:edp/lvds/mipi,遇到mipi 稍微麻烦一些,初始化要发送一堆指令,还要注意延迟问题
这些屏的配置文件路径:kernel/arch/arm/boot/dts/,一般是lcd-xxx.dtsi
驱动文件路径:kernel/drivers/video/rockchip/transmitter/
根据屏规格书修改配置,然后编译,烧录
---0806
本帖最后由 firefly8 于 2016-8-5 23:49 编辑
谢谢!
做为小白,我的学习思路是希望能按照WIKI正常走通一遍,了解内核编译过程,真强信心,接下来在学习内核配置。前人已经配置好的文件firefly-rk3288-reload_defconfig,至少我也先能编译成功,然后再考虑怎么裁剪。 firefly8 发表于 2016-8-5 23:45
谢谢!
做为小白,我的学习思路是希望能按照WIKI正常走通一遍,了解内核编译过程,真强信心,接下来在学习 ...
:handshake一起 交流 学习 针对 make -j8 firefly-rk3288.img我原来总是先make clean 然后再make -j8 firefly-rk3288.img;后来发现完全没有必要make clean;纯属耽误时间。 针对 make -j8 firefly-rk3288.img我原来总是先make clean 然后再make -j8 firefly-rk3288.img;后来发现完全没有必要make clean;纯属耽误时间。 还有注意一点,编译系统时候,千万别 make -j16 ; 否则会出现意想不到的问题,即使make clean 也解决不掉,为此我还重新安装了一遍sdk 天道酬勤 发表于 2017-9-6 22:04
针对 make -j8 firefly-rk3288.img我原来总是先make clean 然后再make -j8 firefly-rk3288.img;后来发现 ...
{:5_247:} 天道酬勤 发表于 2017-9-6 22:07
还有注意一点,编译系统时候,千万别 make -j16 ; 否则会出现意想不到的问题,即使make clean 也解决不掉 ...
-jxx,,,,xx 是CPU的线程数,不是随便写的。。。 我按 wiki编译成功了,但是写入到板子里面启不来,怎么回事啊。log如下:
DDR Version 1.00 20160530
In
Channel a: DDR3 200MHz
Bus Width=32 Col=10 Bank=8 Row=15 CS=1 Die Bus-Width=16 Size=1024MB
Channel b: DDR3 200MHz
Bus Width=32 Col=10 Bank=8 Row=15 CS=1 Die Bus-Width=16 Size=1024MB
Memory OK
Memory OK
OUT
U-Boot 2014.10-RK3288-10 (Oct 13 2016 - 10:04:48)
CPU: rk3288
cpu version = 0
CPU's clock information:
arm pll = 600000000HZ
periph pll = 297000000HZ
ddr pll = 200000000HZ
codec pll = 384000000HZ
Board: Rockchip platform Board
DRAM:Found dram banks: 1
Adding bank:0000000000000000(0000000080000000)
128 MiB
GIC CPU mask = 0x00000001
SdmmcInit = 0 400
SdmmcInit = 2 0
storage init OK!
Using default environment
GetParam
Load FDT from resource image.
power key: bank-0 pin-5
pmic:act8846
can't find dts node for pwm1
DCDC vdd_logic has been used, pwm regulator not init it.
Can't find dts node for fuel guage cw201x
SecureBootEn = 0, SecureBootLock = 0
#Boot ver: 2016-10-13#2.30
empty serial no.
checkKey
vbus = 0
no fuel gauge found
no fuel gauge found
read logo on state from dts
can't find power_ctr node for lcdc0
pll_src = 1, dclk_hz = 148500000, dclk_div = 2
no fuel gauge found
Hit any key to stop autoboot:0
boot or recovery image sha mismatch!
Unable to boot:boot
try to start recovery
'recovery' does not seem to be a partition nor an address
Unable to boot:recovery
try to start backup
ERROR: : bootrk: bad boot or kernel image
Unable to boot:backup
try to start rockusb
DDR Version 1.00 20160530
In
Channel a: DDR3 200MHz
Bus Width=32 Col=10 Bank=8 Row=15 CS=1 Die Bus-Width=16 Size=1024MB
Channel b: DDR3 200MHz
Bus Width=32 Col=10 Bank=8 Row=15 CS=1 Die Bus-Width=16 Size=1024MB
Memory OK
Memory OK
OUT
U-Boot 2014.10-RK3288-10 (Oct 13 2016 - 10:04:48)
CPU: rk3288
cpu version = 0
CPU's clock information:
arm pll = 600000000HZ
periph pll = 297000000HZ
ddr pll = 200000000HZ
codec pll = 384000000HZ
Board: Rockchip platform Board
DRAM:Found dram banks: 1
Adding bank:0000000000000000(0000000080000000)
128 MiB
GIC CPU mask = 0x00000001
SdmmcInit = 0 400
SdmmcInit = 2 0
storage init OK!
Using default environment
GetParam
Load FDT from resource image.
power key: bank-0 pin-5
pmic:act8846
can't find dts node for pwm1
DCDC vdd_logic has been used, pwm regulator not init it.
Can't find dts node for fuel guage cw201x
SecureBootEn = 0, SecureBootLock = 0
#Boot ver: 2016-10-13#2.30
empty serial no.
checkKey
vbus = 0
no fuel gauge found
no fuel gauge found
read logo on state from dts
can't find power_ctr node for lcdc0
pll_src = 1, dclk_hz = 148500000, dclk_div = 2
no fuel gauge found
Hit any key to stop autoboot:0
boot or recovery image sha mismatch!
Unable to boot:boot
try to start recovery
'recovery' does not seem to be a partition nor an address
Unable to boot:recovery
try to start backup
ERROR: : bootrk: bad boot or kernel image
Unable to boot:backup
try to start rockusb
1. 编译对了吗?
2. 烧录对了吗?
3. 看看log:
boot or recovery image sha mismatch!
Unable to boot:boot
try to start recovery
'recovery' does not seem to be a partition nor an address
Unable to boot:recovery
try to start backup
ERROR: : bootrk: bad boot or kernel image
Unable to boot:backup
页:
[1]
2