Alternate Bank booting support on NXP Layerscape boards
We are working on integrating NXP Layerscape boards in LAVA. On Layerscape boards, we have a mechanism of having multiple banks. This is done mainly to protect board from getting bricked if wrong images gets flashed on board.
Board is set to boot from a Bank 1 by default (controlled by switches). Now you use this bank also to flash your images, but in case the images are corrupt, board will get bricked and you will need to connect JTAG to recover the board.
So here concept of Alternate Bank boot comes to help. By default board boots from Bank 1, but we will not flash the images on Bank 1, instead we will flash images on Bank 2. After flashing the images, we will boot from Bank 2 with a certain command on u-boot "qixis_reset altbank". With this command, Board boots from the Bank 2 and now we can boot up kernel on board. Since in this case, we have flashed the images on Bank 2 and even if images are corrupt, Bank 2 will get bricked, but since we have set board to boot from Bank 1 by default, Board will still be usable and you can flash the correct images on Bank 2 and get that working.
So this was the concept and why we are using it. Now when we try to replicate the same behavior with LAVA, we are facing some issues. When we issue command "qixis_reset altbank" on u-boot, it just prints "=>", which lava takes as a success and issue next command and then starts waiting for the "Starting Kernel", which will not happen.
Infact what should happen is that, after "qixis_reset altbank" is issued, lava should wait for some time and let board boot from Bank 2 (On Bank 2 board again will boot the u-boot only). and wait for "Hit Any key to stop autoboot" and then interrupt the board.
I am attaching the job.yaml with this ticket for your reference.LX2160_Job_LAVA.txt
Please help me on this, how can i achieve this way of booting the board.
Thanks Sahil Malhotra