u-boot 的machine id 定义和kernel 中的 machine id 不同

u-boot 的中machine id 可能和kernel 中的 machine id不同

可以从  include/asm-arm/mach-types.h 中看到machine id 的定义,这个文件是自动生成的

通过 arch/arm/tool 下面的awk 脚步以及输入文件生成的。

 

可以从 “Error: unrecognized/unsupported machine ID (r = 0x0000147C)” 从 r 的数字得到 u-boot 传递给kernel 的 machine-id 。

可以根据自己编译kernel 的时候,指定的machine type 来修改 u-boot 传递上来的 machine id

在文件 arch/arm/kernel/head.S 中,搜索  .section ".text.head" ,

在代码

  msr cpsr_c, #PSR_F_BIT | PSR_I_BIT | SVC_MODE @ ensure svc mode                         @ and irqs disabled

 后面加入:

mov r1, #0xc1  @modify the machine id from u-boot 修改 u-boot 上次的machine id

 

重新编译 make uImage 即可

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值