Dual Boot on MX28

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dual Boot on MX28

1,157 Views
jackyliu
NXP Employee
NXP Employee

how to realize dual boot

Labels (1)
0 Kudos
2 Replies

874 Views
MassimilianoPav
Contributor I

Hi, i would like to use two partition on the same nand device, how can i implement a dual boot, and how can i switch from one boot to the other?

I mean, i would like to start on partition 1, during the work i want to update the root fs on the partition 2, then i want to reboot and start on partition 2. Is it similar to what you are doing now? 

Any help would be appreciated.

Tnx 

Max

0 Kudos

874 Views
jackyliu
NXP Employee
NXP Employee

1, use bootlet to load uboot, not load kernel directly.

2, use my attached mx28_evk.h to enable NAND boot on NAND, put it under uboot\include\configs

3, build and boot up uboot.
4, control nand read command to read different block NAND into DDR, so it can realize dual boot.

5, set uboot environment

setenv bootcmd 'run bootcmd_NAND1 bootcmd_NAND2 bootcmd_NAND3'
setenv bootcmd_NAND1 'run bootargs_base bootargs_android bootargs_NAND'
setenv bootcmd_NAND2 'nand read ${rd_loadaddr} 0x600000 0x100000;nand read ${loadaddr} 0x300000 0x290000'
setenv bootcmd_NAND3 'bootm ${loadaddr} ${rd_loadaddr}'
setenv bootargs_base 'setenv bootargs console=ttyAM0,115200'
setenv bootargs_NAND 'setenv bootargs ${bootargs}'
setenv loadaddr 0x40800000
setenv rd_loadaddr 0x40B00000
saveenv

0 Kudos