|
发表于 2016-6-11 22:37:09
22832 浏览 5 回复
来自手机
kernel移植
在kernel.org上下了个3.0.15的内核,折腾了好久也没能在板子上启动起来。
请教一下:
1一般做移植是从官方原版基础上开始吗?还是从cpu厂家给的原版kernel开始?如果是从厂家的kernel开始,那么在哪里下载?
2有没有教程之类的东西? |
|
|
|
|
|
|
|
提示什么呢?
是完全启动不了还是启动一半就挂掉了? |
|
|
|
|
|
|
|
发表于 2016-6-18 09:08:35
可以提供一下从linux内核官方源码 到指定的板子上移植过程吗 |
|
|
|
|
|
|
|
移植的时候出了什么问题?挂载不上还是启动到一半就停止了? |
|
|
|
|
|
|
|
楼主|
发表于 2016-6-24 23:00:31
不好意思,这几天一直折腾移植这个事,忘了上论坛了。
我试了3.2.80,3.14等多个版本。
基本套路:在kernel.org上下载内核,改了Makefile中的arch和cross compile,使用make menuconfig进入裁剪菜单,把涉及到串口的boot options,kernel hacking,drivers-》serial等地方参照你们给的kernel修改了。
在system type里面也选择了SAMSUNG EXYNOS SoCs Support为4412.
3.2.80启动时,输出结果为:
OK
U-Boot 2010.03-dirty (Nov 13 2015 - 02:03:36) for iTOP-4412 Android
APLL = 1000MHz, MPLL = 800MHz
ARM_CLOCK = 1000MHz
PMIC: S5M8767(VER5.0)
Board: iTOP-4412
DRAM: 1 GB
MMC: max_emmc_clock:40 MHZ
Set CLK to 400 KHz
EMMC CLOCK OUTPUT:: 400KHz -[div:50]
response timeout error : 00000104 cmd 8
response timeout error : 00000104 cmd 55
max_emmc_clock:40 MHZ
Input CLK [ 50 MHz] is higher than limit [40 MHZ]
Set CLK to 40000 KHz
EMMC clock output: 40000 KHz
max_emmc_clock:40 MHZ
Input CLK [ 50 MHz] is higher than limit [40 MHZ]
Set CLK to 40000 KHz
EMMC clock output: 40000 KHz
MMC0: 14910 MB
SD sclk_mmc is 400K HZ
raise: Signal # 8 caught
raise: Signal # 8 caught
MMC1: 0 MB
0 MB
*** Warning - using default environment
In: serial
Out: serial
Err: serial
eMMC OPEN Success.!!
!!!Notice!!!
!You must close eMMC boot Partition after all image writing!
!eMMC boot partition has continuity at image writing time.!
!So, Do not close boot partition, Before, all images is written.!
MMC read: dev # 0, block # 48, count 16 ...16 blocks read: OK
eMMC CLOSE Success.!!
Checking Boot Mode ... EMMC4.41
SYSTEM ENTER NORMAL BOOT MODE
Hit any key to stop autoboot: 0
reading kernel.. 1120, 12288
MMC read: dev # 0, block # 1120, count 12288 ...12288 blocks read: OK
completed
reading RFS.. 13408, 2048
MMC read: dev # 0, block # 13408, count 2048 ...2048 blocks read: OK
completed
Boot with zImage
Wrong Ramdisk Image Format
[err] boot_get_ramdisk
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
3.14内核启动时,输出结果为:
(前面省略)
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Error: unrecognized/unsupported machine ID (r1 = 0x00000b16).
Available machine support:
ID (hex) NAME
ffffffff Samsung Exynos4 (Flattened Device Tree)
Please check your kernel config and/or bootloader.
最奇怪的是:
在uboot中输入bdinfo
Checking Boot Mode ... EMMC4.41
SYSTEM ENTER NORMAL BOOT MODE
Hit any key to stop autoboot: 0
iTOP-4412 # bdinfo
arch_number = 0x00000B16
env_t = 0x00000000
boot_params = 0x40000100
...
请注意:arch_number = 0x00000B16,就是2838
这个在mach-type.h里面#define MACH_TYPE_SMDKC210 2838
这个很奇怪。难道是你们的uboot里面写错了吗?但是你们的内核里面定义的是:
#define MACH_TYPE_SMDK4412 3765
竟然可以运行。
感觉好混乱。 |
|
|
|
|
|
|
|
楼主|
发表于 2016-7-7 20:01:31
运行结果都贴上来了,麻烦好歹给点提示,或者给个高人的联系方式,我请高人指点一二即可,不会浪费你们过多时间的。 |
|
|
|
|
|
|
登录或注册
扫一扫关注迅为公众号


|