diff mbox

[U-Boot,3/4] km/scripts: load fdt_bid_kwkey.dtb when working with tftp

Message ID 1447427722-24450-4-git-send-email-valentin.longchamp@keymile.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Valentin Longchamp Nov. 13, 2015, 3:15 p.m. UTC
From: Holger Brunck <holger.brunck@keymile.com>

When loading the dtb file via tftp we should load the one which matches
boardId and hwKey and not a common one for the boardname. We have boards
were different hwKeys are used and then we may load an incorrect dtb
file. If no fdt_bid_kwkey.dtb file is not a fallback to boardname.dtb is used.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Tobias Müller <Tobias.Mueller@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
---

 board/keymile/scripts/develop-common.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Heiko Schocher Nov. 16, 2015, 11:09 a.m. UTC | #1
Hello Valentin,

Am 13.11.2015 um 16:15 schrieb Valentin Longchamp:
> From: Holger Brunck <holger.brunck@keymile.com>
>
> When loading the dtb file via tftp we should load the one which matches
> boardId and hwKey and not a common one for the boardname. We have boards
> were different hwKeys are used and then we may load an incorrect dtb
> file. If no fdt_bid_kwkey.dtb file is not a fallback to boardname.dtb is used.
>
> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
> Signed-off-by: Tobias Müller <Tobias.Mueller@keymile.com>
> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
> ---
>
>   board/keymile/scripts/develop-common.txt | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)


Reviewed-by: Heiko Schocher <hs@denx.de>

bye,
Heiko
>
> diff --git a/board/keymile/scripts/develop-common.txt b/board/keymile/scripts/develop-common.txt
> index a80812a..99a0589 100644
> --- a/board/keymile/scripts/develop-common.txt
> +++ b/board/keymile/scripts/develop-common.txt
> @@ -3,7 +3,7 @@ bootcmd=run ${subbootcmds}
>   configure=run set_uimage; km_setboardid && saveenv && reset
>   subbootcmds=tftpfdt tftpkernel nfsargs add_default boot
>   nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${toolchain}/${arch}
> -tftpfdt=if run set_fdthigh || test ${arch} != arm; then tftpboot ${fdt_addr_r} ${hostname}/${hostname}.dtb; else true; fi
> +tftpfdt=if run set_fdthigh || test ${arch} != arm; then if tftpboot ${fdt_addr_r} ${hostname}/fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb; then; else tftpboot ${fdt_addr_r} ${hostname}/${hostname}.dtb; fi; else true; fi
>   tftpkernel=tftpboot ${load_addr_r} ${hostname}/${uimage}
>   toolchain=/opt/eldk
>   rootfssize=0
>
Tom Rini Nov. 18, 2015, 10:35 p.m. UTC | #2
On Fri, Nov 13, 2015 at 04:15:21PM +0100, Valentin Longchamp wrote:

> From: Holger Brunck <holger.brunck@keymile.com>
> 
> When loading the dtb file via tftp we should load the one which matches
> boardId and hwKey and not a common one for the boardname. We have boards
> were different hwKeys are used and then we may load an incorrect dtb
> file. If no fdt_bid_kwkey.dtb file is not a fallback to boardname.dtb is used.
> 
> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
> Signed-off-by: Tobias Müller <Tobias.Mueller@keymile.com>
> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
> Reviewed-by: Heiko Schocher <hs@denx.de>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/board/keymile/scripts/develop-common.txt b/board/keymile/scripts/develop-common.txt
index a80812a..99a0589 100644
--- a/board/keymile/scripts/develop-common.txt
+++ b/board/keymile/scripts/develop-common.txt
@@ -3,7 +3,7 @@  bootcmd=run ${subbootcmds}
 configure=run set_uimage; km_setboardid && saveenv && reset
 subbootcmds=tftpfdt tftpkernel nfsargs add_default boot
 nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${toolchain}/${arch}
-tftpfdt=if run set_fdthigh || test ${arch} != arm; then tftpboot ${fdt_addr_r} ${hostname}/${hostname}.dtb; else true; fi
+tftpfdt=if run set_fdthigh || test ${arch} != arm; then if tftpboot ${fdt_addr_r} ${hostname}/fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb; then; else tftpboot ${fdt_addr_r} ${hostname}/${hostname}.dtb; fi; else true; fi
 tftpkernel=tftpboot ${load_addr_r} ${hostname}/${uimage}
 toolchain=/opt/eldk
 rootfssize=0