We seem to have ported Das U-Boot successfully.
有证据表明这是一个错误的假设.
Just before calling the kernel,the pointer theKernel is 100
We seem to have ported Das U-Boot successfully.
and not 1
We seem to have ported Das U-Boot successfully.
00.
您使用的是哪个版本的U-Boot?
在2012.10和2013.04版本的U-Boot中,变量theKernel仅由AVR32和MIPS等拱门的代码声明和使用.
没有应该使用内核的ARM代码.
u-boot-2012.10$find . -print | xargs grep theKernel
./arch/avr32/lib/bootm.c: void (*theKernel)(int magic,void *tagtable);
./arch/avr32/lib/bootm.c: theKernel = (void *)images->ep;
./arch/avr32/lib/bootm.c: theKernel,params_start);
./arch/avr32/lib/bootm.c: theKernel(ATAG_MAGIC,params_start);
./arch/microblaze/lib/bootm.c: void (*theKernel) (char *,ulong,ulong);
./arch/microblaze/lib/bootm.c: theKernel = (void (*)(char *,ulong))images->ep;
./arch/microblaze/lib/bootm.c: (ulong) theKernel,rd_data_start,(ulong) of_flat_tree);
./arch/microblaze/lib/bootm.c: theKernel (commandline,(ulong) of_flat_tree);
./arch/mips/lib/bootm.c: void (*theKernel) (int,char **,int *);
./arch/mips/lib/bootm.c: theKernel = (void (*)(int,int *))images->ep;
./arch/mips/lib/bootm.c: (ulong) theKernel);
./arch/mips/lib/bootm.c: theKernel(linux_argc,linux_argv,linux_env,0);
./arch/mips/lib/bootm_qemu_mips.c: void (*theKernel) (int,int *);
./arch/mips/lib/bootm_qemu_mips.c: theKernel = (void (*)(int,int *))images->ep;
./arch/mips/lib/bootm_qemu_mips.c: (ulong) theKernel);
./arch/mips/lib/bootm_qemu_mips.c: theKernel(0,NULL,0);
./arch/nds32/lib/bootm.c: void (*theKernel)(int zero,int arch,uint params);
./arch/nds32/lib/bootm.c: theKernel = (void (*)(int,int,uint))images->ep;
./arch/nds32/lib/bootm.c: (ulong)theKernel);
./arch/nds32/lib/bootm.c: theKernel(0,machid,bd->bi_boot_params);
u-boot-2012.10$
请解释如何跟踪不应在ARM处理器上定义或分配的变量.
U-Boot打印“Starting kernel …”后的下一个输出应该是“Uncompressing Linux …”.
对于飞思卡尔拱门,此文本输出取决于通过U-Boot将机器类型编号(aka arch_id)正确传递给内核.
您需要验证是否在U-Boot中正确定义了此机器类型编号.
U-Boot的配置文件是什么样的?
I tried adding some register manipulation code to signal GPIOs in compressed/head.S with no response.
您是否理智检查此代码以确保其按预期工作?
您是否从U-Boot命令行尝试了GPIO操作?
My question is,how can I make sure U-Boot is calling the correct entry point?
对于ARM arch,它是跳转到bootm命令中指定的地址.
由于uImage加载地址和bootm指定相同的0x1
We seem to have ported Das U-Boot successfully.
00地址,因此应该是好的(假设U-Boot已正确配置并为ARM构建).
Just before calling the kernel,the pointer theKernel is 100
We seem to have ported Das U-Boot successfully.
and not 1
We seem to have ported Das U-Boot successfully.
00. Does this mean U-boot is jumping at the wrong location?
是.
如果检查源代码(对于AVR32或MIPS),您会发现从映像头分配了内核,特别是入口点值.然后U-Boot会跳转到这个位置.
但真正的问题是你的ARM Cortex A9不应该使用这个代码或这个变量.
似乎没有为正确的拱门配置U-Boot和/或可能无法正确定义机器类型.
更正:
正如OP指出的那样,旧版本的U-Boot确实使用了变量theKernel,甚至用于ARM拱门.
U-Boot输出行:
Loading Kernel Image ... OK
表示U-Boot已经(成功)将内核映像(没有映像信息头)从0x1
We seem to have ported Das U-Boot successfully.
00的bootm地址(加上报头长度的偏移量0x40)复制到加载地址0x100
We seem to have ported Das U-Boot successfully.
.此内存移动操作由common / cmd_bootm.c中的过程bootm_load_os()执行.
因此,您报告的0x100
We seem to have ported Das U-Boot successfully.
的值对于内核是正确的.
没有迹象表明U-Boot跳到了错误的位置.
如前所述,您应该验证是否正确定义了机器类型.该值将在arch/arm/plat-mxc/include/mach/uncompress.h中的__arch_decomp_setup()中使用,以便在内核引导之前的解压缩期间输出文本.