diff mbox

board/boundarydevices: fix boot partition number in bootscript

Message ID 20161107165400.28802-1-gary.bisson@boundarydevices.com
State Accepted
Headers show

Commit Message

Gary Bisson Nov. 7, 2016, 4:54 p.m. UTC
It was previously hardcoded to use the 1st partition although the
bootpart variable was used to download kernel/dtb from any partition.

Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
---
Hi,

Just realized our bootscript was harcoding the partition number.

It is not suitable for systems which need to boot from any partition. It is
especially useful when using a A/B update scheme which means you either boot
from part 1 or 2 depending on last update (testing swupdate right now,
nice project!).

Regards,
Gary
---
 board/boundarydevices/common/6x_bootscript.txt | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Comments

Thomas Petazzoni Nov. 7, 2016, 9:09 p.m. UTC | #1
Hello,

On Mon,  7 Nov 2016 17:54:00 +0100, Gary Bisson wrote:
> It was previously hardcoded to use the 1st partition although the
> bootpart variable was used to download kernel/dtb from any partition.
> 
> Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
> ---
> Hi,

Applied to master, thanks.

Thomas
diff mbox

Patch

diff --git a/board/boundarydevices/common/6x_bootscript.txt b/board/boundarydevices/common/6x_bootscript.txt
index e8a08aa..2fc687a 100644
--- a/board/boundarydevices/common/6x_bootscript.txt
+++ b/board/boundarydevices/common/6x_bootscript.txt
@@ -92,14 +92,12 @@  fi
 
 setenv bootargs "${bootargs} console=${console},115200 vmalloc=400M consoleblank=0 rootwait fixrtc"
 
-bpart=1
-
 if test "sata" = "${dtype}" ; then
-	setenv bootargs "${bootargs} root=/dev/sda${bpart}" ;
+	setenv bootargs "${bootargs} root=/dev/sda${bootpart}" ;
 elif test "usb" = "${dtype}" ; then
-	setenv bootargs "${bootargs} root=/dev/sda${bpart}" ;
+	setenv bootargs "${bootargs} root=/dev/sda${bootpart}" ;
 else
-	setenv bootargs "${bootargs} root=/dev/mmcblk${disk}p${bpart}"
+	setenv bootargs "${bootargs} root=/dev/mmcblk${disk}p${bootpart}"
 fi
 
 if itest.s "x" != "x${disable_giga}" ; then