公司即将开始使用新的平台基于cortex-A9架构四核的exynos4412Soc,开发板是友善之臂公司的tiny4412,接下来记录下移植调试内核中的一些问题:
首先,从SD卡读取内核镜像引导后如下:
## Booting kernel from Legacy Image at 40007fc0 ...
Image Name: Linux-3.5.0-FriendlyARM
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4783920 Bytes = 4671 KiB
Load Address: 40008000
Entry Point: 40008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
就卡住了不再往下执行,猜测是机器码的原因,查看下果然是xyd4412中使用的是自己定义的数值,与内核bsp文件中宏machine start指定的TINY4412不同,于是修改XYDboot中的机器码与内核保持一致,再次编译XYDboot,烧写到SD卡,引导内核,发现还是卡在那个地方,网上查到可以修改内核配置来解决,于是更改了内核配置的kernel hacking选项下的菜单:
│ -> Kernel hacking │ -----> Kernel low-level debugging functions (read help!) │
│ -> Device Drivers -------> Character devices------> Serial drivers ----> samsung SoC serial support
重新编译引导,可以启动了,能显示启动信息,把内核中那个菜单选下来后,又是到boot kernel卡住,猜测原因是:并不是没有启动,而是启动的打印信息没有输出。选择的这个菜单负责的是内核打印调试信息。
接下来内核能够引导,但是执行中会挂掉,串口输出如下:
<6>Booting Linux on physical CPU 0
<6>Initializing cgroup subsys cpu
<5>Linux version 3.5.0-FriendlyARM ([email protected]) (gcc version 4.5.1 (ctng-1.8.1-FA) ) #5 SMP PREEMPT Fri Jan 2 21:23:13 CST 2015
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=10c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: TINY4412
<6>cma: CMA: reserved 32 MiB at 6d800000
Memory policy: ECC disabled, Data cache writealloc
CPU EXYNOS4412 (id 0xe4412011)
<7>exynos4_init_clocks: initializing clocks
<6>S3C24XX Clocks, Copyright 2004 Simtec Electronics
<3>s3c_register_clksrc: clock armclk has no registers set
<3>s3c_register_clksrc: clock audiocdclk has no registers set
<3>audiocdclk: no parent clock specified
<7>exynos4_setup_clocks: registering clocks