在6630开发板上,通过CCS加载已经编译好的内核,u-boot
问题1:
Step1)修改了loadlin-evm-uboot.js
原代码:
var pathUboot = PATH_LOADLIN + "/u-boot-keystone-evm.bin";
var pathSKern = PATH_LOADLIN + "/skern-keystone-evm.bin";
修改后:
var pathUboot = PATH_LOADLIN + "/u-boot.bin";
var pathSKern = PATH_LOADLIN + "/skern-k2l.bin";
skern-k2l.bin和u-boot.bin分别为通过编译的K2_BM_15.07和K2_UBOOT_2013_01_15.07_01所生成的可执行bin
Step 2)CCS运行loadlin-evm-uboot.js
此时CCS的Console窗口出现:
arm_A15_0: Unable to terminate memory download: NULL buffer pointer at 0x3aa4
然后点击Resume,串口打印出:
U-Boot 2013.01 (Apr 21 2016 – 00:11:37)
I2C: ready
DRAM: 2 GiB
Reseting entire DDR3 memory to 0 …
DRAM: 2 GiB
NAND: 2048 MiB
Smart Reflex Class 0 temperature compensation enabled
tps544_init i2c write error
Smart Reflex Class 0 temperature compensation disabled
Net: K2L_EMAC0, K2L_EMAC1, K2L_EMAC2, K2L_EMAC3
Hit any key to stop autoboot: 0
K2L EVM #
请问:CCS的Console的警告是否可以忽略?个人理解是虽然有警告报出,但是U-Boot是正常启动的,但由于后续的问题2中的现象,让我对问题1中这个警告表示怀疑
问题2:
修改了loadlin-evm-kern.js
a.原代码:
var pathKernel = PATH_LOADLIN + "/uImage-tci6638-evm";
var pathDtb = PATH_LOADLIN + "/tci6638-evm.dtb";
var pathVmlinux = PATH_LOADLIN + "/vmlinux";
var pathInitrd = PATH_LOADLIN + "/fs.cpio";
b.参考:MCSDK UG Chapter Exploring.Pdf的14页有推荐
var pathKernel = PATH_LOADLIN + "/uImage-keystone-evm.bin";
var pathDtb = PATH_LOADLIN + "/uImage-k2hk-evm.dtb";
var pathVmlinux = PATH_LOADLIN + "/vmlinux";
var pathInitrd = PATH_LOADLIN + "/tisdk-rootfs.cpio.gz";
c.修改为:
var pathKernel = PATH_LOADLIN + "/uImage";//由K2_LINUX_03.10.72_15.08编译
var pathDtb = PATH_LOADLIN + "/k2l-evm.dtb";//由K2_LINUX_03.10.72_15.08编译
var pathVmlinux = PATH_LOADLIN + "/vmlinux";//由K2_LINUX_03.10.72_15.08编译,其中有两个版本1.位于K2_LINUX_03.10.72_15.08根目录下,大小为85.2M;2.位于K2_LINUX_03.10.72_15.08\arch\arm\boot\compressed下,大小为3.95M;这两个版本都分别运行加载过
var pathInitrd = PATH_LOADLIN + "/tisdk-rootfs.cpio.gz";//从mcsdk_linux_3_00_00_11\images中拷贝
Step1)完成了问题1中的u-boot运行
Step2)点击suspend暂停程序
Step3)运行loadlin-evm-kern.js
Step4)点击Resume
Step5)在串口界面输入依次输入>>setenv args_ramfs 'setenv bootargs ${bootargs} earlyprintk rdinit=/sbin/init rw root=/dev/ram0 initrd=0x802000000,33M'
>>saveenv
>>mon_install 0x0c5f0000(MCSDK UG推荐有此步骤,实际操作中一旦键入运行,串口再无反应;如果跳过,还是可以进行下一步操作)
>>bootm 0x88000000 – 0x87000000
具体串口打印如下:
U-Boot 2013.01 (Apr 21 2016 – 00:11:37)
I2C: ready
DRAM: 2 GiB
Reseting entire DDR3 memory to 0 …
DRAM: 2 GiB
NAND: 2048 MiB
Smart Reflex Class 0 temperature compensation enabled
tps544_init i2c write error
Smart Reflex Class 0 temperature compensation disabled
Net: K2L_EMAC0, K2L_EMAC1, K2L_EMAC2, K2L_EMAC3
Hit any key to stop autoboot: 0
K2L EVM # setenv args_ramfs 'setenv bootargs ${bootargs} earlyprintk rdinit=/sbin/init rw root=/dev/ram0 initrd=0x802000000,33M'
K2L EVM # saveenv
Saving Environment to NAND…
Erasing Nand…
Erasing at 0x100000 — 100% complete.
Writing to Nand… done
K2L EVM # bootm 0x88000000 – 0x87000000
## Booting kernel from Legacy Image at 88000000 …
Image Name: Linux-3.10.72
Created: 2016-04-21 14:42:39 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4083040 Bytes = 3.9 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum … OK
## Flattened Device Tree blob at 87000000
Booting using the fdt blob at 0x87000000
Loading Kernel Image … OK
OK
Using Device Tree in place at 87000000, end 8700e50b
Starting kernel …
可以看到进行Starting kernel …到就无法在继续下去了
请问:1.我修改后加载的pathKernel对应的uImage是否不是这个文件,我看到MCSDK UG推荐的是一个bin文件,而初始的代码中是uImage-tci6638-evm无后缀。而我遍历了K2_LINUX_03.10.72_15.08的文件中没有bin文件
2. >>mon_install 0x0c5f0000这个命令是否必须需要输入
3. pathVmlinux需要的是85.2M还是3.95M的版本,虽然我两个版本都利用js加载过,但由于都运行到Starting kernel …无法运行了,想确认该使用那个版本
4.由于使用的是6630的开发板,想照搬mcsdk_linux_3_00_00_11\images中的现成程序,然后运行,该如何修改loadlin-evm-kern.js中的代码?
Andy Yin1:
你使用的mcsdk版本太旧了,下载一个最新的mcsdk,其中有预编译好的image,我之前参考如下mcsdk user guide在mcsdk_linux_3_01_02_05下修改mcsdk_linux_3_01_02_05\host-tools\loadlin\loadlin-evm-uboot.js可以将u-boot 跑起来,然后参考附件将u-boot烧写到flash,再启动kernel。
http://processors.wiki.ti.com/index.php/MCSDK_UG_Chapter_Exploring#Loading_and_Running_U-Boot_on_EVM_through_CCS