public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/4] km: update the boot script to check for a DTB
Date: Mon, 16 Nov 2015 12:09:11 +0100	[thread overview]
Message-ID: <5649B957.6030908@denx.de> (raw)
In-Reply-To: <1447427722-24450-3-git-send-email-valentin.longchamp@keymile.com>

Hello Valentin,

Am 13.11.2015 um 16:15 schrieb Valentin Longchamp:
> If a DTB is found with cramfsls, the bootscript continues as expected.
> If none is found, the cramfsloadfdt and boot subbootcmds are updated to
> not load the DTB from cramfs and not pass it to the kernel. The kernel
> thus must have an appended DTB otherwise the boot will fail.
>
> This is required for the km_kirkwood boards that must support .esw where
> the DTB sometimes is appended (for backwards compatibility) and sometimes
> is passed correctly (as we do now for all newer boards).
>
> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
> ---
>
>   include/configs/km/keymile-common.h | 5 +++--
>   include/configs/km/km-powerpc.h     | 1 +
>   include/configs/km/km_arm.h         | 6 ++++++
>   include/configs/km/kmp204x-common.h | 1 +
>   4 files changed, 11 insertions(+), 2 deletions(-)


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

bye,
Heiko
>
> diff --git a/include/configs/km/keymile-common.h b/include/configs/km/keymile-common.h
> index 2fc1ea8..91b29b3 100644
> --- a/include/configs/km/keymile-common.h
> +++ b/include/configs/km/keymile-common.h
> @@ -141,8 +141,9 @@
>    * - 'release': for a standalone system		kernel/rootfs from flash
>    */
>   #define CONFIG_KM_DEF_ENV_BOOTTARGETS					\
> -	"subbootcmds=ubiattach ubicopy cramfsloadfdt set_fdthigh "	\
> -		"cramfsloadkernel flashargs add_default addpanic boot\0"\
> +	"subbootcmds=ubiattach ubicopy checkfdt cramfsloadfdt "		\
> +		"set_fdthigh cramfsloadkernel flashargs add_default "	\
> +		"addpanic boot\0"					\
>   	"develop="							\
>   		"tftp 200000 scripts/develop-${arch}.txt && "		\
>   		"env import -t 200000 ${filesize} && "			\
> diff --git a/include/configs/km/km-powerpc.h b/include/configs/km/km-powerpc.h
> index eb85a74..20ef036 100644
> --- a/include/configs/km/km-powerpc.h
> +++ b/include/configs/km/km-powerpc.h
> @@ -79,6 +79,7 @@
>   		"  ${filesize} && "					\
>   		"protect on " __stringify(BOOTFLASH_START) "  +${filesize}\0"\
>   	"set_fdthigh=true\0"						\
> +	"checkfdt=true\0"						\
>   	""
>
>   #endif /* __CONFIG_KEYMILE_POWERPC_H */
> diff --git a/include/configs/km/km_arm.h b/include/configs/km/km_arm.h
> index 15fca1a..8c18e16 100644
> --- a/include/configs/km/km_arm.h
> +++ b/include/configs/km/km_arm.h
> @@ -83,6 +83,12 @@
>   	"u-boot="__stringify(CONFIG_HOSTNAME) "/u-boot.kwb\0"		\
>   	CONFIG_KM_UPDATE_UBOOT						\
>   	"set_fdthigh=setenv fdt_high ${kernelmem}\0"			\
> +	"checkfdt="							\
> +		"if cramfsls fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb; "	\
> +		"then true; else setenv cramfsloadfdt true; "		\
> +		"setenv boot bootm ${load_addr_r}; "			\
> +		"echo No FDT found, booting with the kernel "		\
> +		"appended one; fi\0"					\
>   	""
>
>   #define CONFIG_SKIP_LOWLEVEL_INIT	/* disable board lowlevel_init */
> diff --git a/include/configs/km/kmp204x-common.h b/include/configs/km/kmp204x-common.h
> index 7536cbd..540c672 100644
> --- a/include/configs/km/kmp204x-common.h
> +++ b/include/configs/km/kmp204x-common.h
> @@ -458,6 +458,7 @@ int get_scl(void);
>   		"sf probe 0;sf erase 0 +${filesize};"			\
>   		"sf write ${load_addr_r} 0 ${filesize};\0"		\
>   	"set_fdthigh=true\0"						\
> +	"checkfdt=true\0"						\
>   	""
>
>   #define CONFIG_HW_ENV_SETTINGS						\
>

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

  reply	other threads:[~2015-11-16 11:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-13 15:15 [U-Boot] [PATCH 0/4] Keymile common changes Valentin Longchamp
2015-11-13 15:15 ` [U-Boot] [PATCH 1/4] km/common: stop u-boot only if someone press <SPACE> Valentin Longchamp
2015-11-16 11:08   ` Heiko Schocher
2015-11-18 22:35   ` [U-Boot] [U-Boot, " Tom Rini
2015-11-13 15:15 ` [U-Boot] [PATCH 2/4] km: update the boot script to check for a DTB Valentin Longchamp
2015-11-16 11:09   ` Heiko Schocher [this message]
2015-11-18 22:35   ` [U-Boot] [U-Boot, " Tom Rini
2015-11-13 15:15 ` [U-Boot] [PATCH 3/4] km/scripts: load fdt_bid_kwkey.dtb when working with tftp Valentin Longchamp
2015-11-16 11:09   ` Heiko Schocher
2015-11-18 22:35   ` [U-Boot] [U-Boot, " Tom Rini
2015-11-13 15:15 ` [U-Boot] [PATCH 4/4] km/scripts: search for kernel/DTBs at serverip:/PRODUCTNAME via TFTP in develop mode Valentin Longchamp
2015-11-16 11:10   ` Heiko Schocher
2015-11-18 22:36   ` [U-Boot] [U-Boot, " Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5649B957.6030908@denx.de \
    --to=hs@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox