N947 Dual Boot - knowing which image was booted

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

N947 Dual Boot - knowing which image was booted

ソリューションへジャンプ
373件の閲覧回数
JohnKay
Contributor II

Once I boot from Image 1, is there an attribute that I can programmatically check to indicate that I booted from Image 1 and an update image should be written to Image 0? 

Dual Boot and the Secure Provisioning Tool both work great!

ラベル(1)
0 件の賞賛
1 解決策
362件の閲覧回数
marek-trmac
NXP Employee
NXP Employee

Hi John,

it should be possible to read image version stored in the image.

Regards,
Marek

元の投稿で解決策を見る

0 件の賞賛
3 返答(返信)
347件の閲覧回数
JohnKay
Contributor II

Got it. All I have to do is check the PC.

 

static __inline__ void * get_pc(void) {

void *pc;

asm("mov %0, pc" : "=r"(pc));

return pc;

}

0 件の賞賛
357件の閲覧回数
JohnKay
Contributor II

Thanks for your reply.

The question is, in a dual boot configuration, how can i determine which image i booted from, 0 or 1.

If I booted from Image 0, then I know that I should load the new firmware into Image 1, or vise versa.

I could read and compare the versions in both Images, but if the validation failed on the new Image 0, then I would fallback to Image 1, but comparing the header data, I would think I booted from Image 0.

Not a show stopper, I'll find a workaround.

Thank you.

0 件の賞賛
363件の閲覧回数
marek-trmac
NXP Employee
NXP Employee

Hi John,

it should be possible to read image version stored in the image.

Regards,
Marek
0 件の賞賛