All of lore.kernel.org
 help / color / mirror / Atom feed
From: Minkyu Kang <mk7.kang@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/4] arm: exynos: Remove duplicated "boardname" env setting
Date: Tue, 12 Mar 2019 10:10:22 +0900	[thread overview]
Message-ID: <fc5aa9ad-ba64-a035-5ac5-9b9ab177f7fb@samsung.com> (raw)
In-Reply-To: <20190222183643.5995-4-krzk@kernel.org>

On 23/02/2019 03:36, Krzysztof Kozlowski wrote:
> Various places in the code set "boardname" env property.  It was used
> for booting from ITB images and choosing proper DTB file name.  Instead
> of duplicating it, use existing U-Boot wide - "board_name".
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> 
> ---
> 
> Tested only on Odroid XU3.
> Tests on other boards appreciated.
> ---
>  board/samsung/common/bootscripts/autoboot.cmd | 10 +++++-----
>  board/samsung/common/misc.c                   |  2 +-
>  include/configs/odroid.h                      |  2 +-
>  include/configs/odroid_xu3.h                  |  8 ++++++--
>  4 files changed, 13 insertions(+), 9 deletions(-)
> 
> diff --git a/board/samsung/common/bootscripts/autoboot.cmd b/board/samsung/common/bootscripts/autoboot.cmd
> index 11c724c4e095..d66bcccf5d1c 100644
> --- a/board/samsung/common/bootscripts/autoboot.cmd
> +++ b/board/samsung/common/bootscripts/autoboot.cmd
> @@ -3,7 +3,7 @@
>  # ./tools/mkimage -c none -A arm -T script -d autoboot.cmd boot.scr
>  #
>  # It requires a list of environment variables to be defined before load:
> -# platform dependent: boardname, fdtfile, console
> +# platform dependent: board_name, fdtfile, console
>  # system dependent: mmcbootdev, mmcbootpart, mmcrootdev, mmcrootpart, rootfstype
>  #
>  setenv fdtaddr     "40800000"
> @@ -35,17 +35,17 @@ else
>  	setenv initrd_addr -;
>  fi;"
>  
> -#### Routine: boot_fit - check that env $boardname is set and boot proper config of ITB image
> +#### Routine: boot_fit - check that env $board_name is set and boot proper config of ITB image
>  setenv setboot_fit "
> -if test -e '${boardname}'; then
> +if test -e '${board_name}'; then
>  	setenv fdt_addr ;
>  	setenv initrd_addr ;
>  	setenv kerneladdr  0x42000000;
>  	setenv kernelname  Image.itb;
> -	setenv itbcfg      "\"#${boardname}\"";
> +	setenv itbcfg      "\"#${board_name}\"";
>  	setenv imgbootcmd  bootm;
>  else
> -	echo Warning! Variable: \$boardname is undefined!;
> +	echo Warning! Variable: \$board_name is undefined!;
>  fi"
>  
>  #### Routine: setboot_uimg - prepare env to boot uImage
> diff --git a/board/samsung/common/misc.c b/board/samsung/common/misc.c
> index 05243fc89659..53cd1b290703 100644
> --- a/board/samsung/common/misc.c
> +++ b/board/samsung/common/misc.c
> @@ -101,7 +101,7 @@ void set_board_info(void)
>  		bdtype = "";
>  
>  	sprintf(info, "%s%s", bdname, bdtype);
> -	env_set("boardname", info);
> +	env_set("board_name", info);
>  #endif
>  	snprintf(info, ARRAY_SIZE(info),  "%s%x-%s%s.dtb",
>  		 CONFIG_SYS_SOC, s5p_cpu_id, bdname, bdtype);
> diff --git a/include/configs/odroid.h b/include/configs/odroid.h
> index b8809c8dcc7c..9f2d43e3fa38 100644
> --- a/include/configs/odroid.h
> +++ b/include/configs/odroid.h
> @@ -132,7 +132,7 @@
>  		"setenv kernelname Image.itb;" \
>  		"run loadkernel;" \
>  		"run kernel_args;" \
> -		"bootm ${kernel_addr_r}#${boardname}\0" \
> +		"bootm ${kernel_addr_r}#${board_name}\0" \
>  	"boot_uimg=" \
>  		"setenv kernelname uImage;" \
>  		"run check_dtb;" \
> diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h
> index 5e765a2b2b02..af6004eaf511 100644
> --- a/include/configs/odroid_xu3.h
> +++ b/include/configs/odroid_xu3.h
> @@ -84,10 +84,14 @@
>  #define CONFIG_SET_DFU_ALT_INFO
>  #define CONFIG_SET_DFU_ALT_BUF_LEN	(SZ_1K)
>  
> -/* Set soc_rev, soc_id, board_rev, boardname, fdtfile */
> +/* Set soc_rev, soc_id, board_rev, board_name, fdtfile */
>  #define CONFIG_ODROID_REV_AIN		9
>  #define CONFIG_REVISION_TAG
>  
> +/*
> + * Need to override existing one (smdk5420) with odroid so set_board_info will
> + * use proper prefix when creating full board_name (SYS_BOARD + type)
> + */
>  #undef CONFIG_SYS_BOARD
>  #define CONFIG_SYS_BOARD		"odroid"
>  
> @@ -101,7 +105,7 @@
>  	"rootfstype=ext4\0" \
>  	"console=" CONFIG_DEFAULT_CONSOLE \
>  	"fdtfile=exynos5422-odroidxu3.dtb\0" \
> -	"boardname=odroidxu3\0" \
> +	"board_name=odroidxu3\0" \
>  	"mmcbootdev=0\0" \
>  	"mmcrootdev=0\0" \
>  	"mmcbootpart=1\0" \
> 

applied to u-boot-samsung.

Thanks,
Minkyu Kang.

  parent reply	other threads:[~2019-03-12  1:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20190222183701epcas3p2338ba674d08d139e5941ec02c9e84556@epcas3p2.samsung.com>
2019-02-22 18:36 ` [U-Boot] [PATCH 1/4] arm: exynos: arndale: Replace Chander Kashyap inactive maintainer Krzysztof Kozlowski
2019-02-22 18:36   ` [U-Boot] [PATCH 2/4] configs: odroid_xu3: Use consistent syntax for #include Krzysztof Kozlowski
2019-02-24 21:32     ` Lukasz Majewski
2019-03-12  1:10     ` Minkyu Kang
2019-02-22 18:36   ` [U-Boot] [PATCH 3/4] configs: odroid_xu3: Unify indentation Krzysztof Kozlowski
2019-02-24 21:32     ` Lukasz Majewski
2019-03-12  1:10     ` Minkyu Kang
2019-02-22 18:36   ` [U-Boot] [PATCH 4/4] arm: exynos: Remove duplicated "boardname" env setting Krzysztof Kozlowski
2019-02-24 21:32     ` Lukasz Majewski
2019-03-12  1:10     ` Minkyu Kang [this message]
2019-02-22 21:39   ` [U-Boot] [PATCH 1/4] arm: exynos: arndale: Replace Chander Kashyap inactive maintainer Lukasz Majewski
2019-03-12  1:10   ` Minkyu Kang

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=fc5aa9ad-ba64-a035-5ac5-9b9ab177f7fb@samsung.com \
    --to=mk7.kang@samsung.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.