arm: add runtime envs describing build configuration
Subsystems (2)
cover arm: add runtime envs describing build configuration
This patchset adds runtime variables for Samsung boards that describe build configuration (arch, soc, board, vendor).
Additionally, more envs describing platform (soc and board revision) are added to Samsung common code.
For boards Trats and Trats2, based on the added envs, 'fdtaddr' env is set and dual kernel boot is enabled:
- with separated DTB if the DTB file is loaded successfully;
- with DTB apppended to uImage if DTB file is not found;
This is neccesssary for backward compatibilty.
Piotr Wilczek (7):
arm:exynos: add cpu revision
arm:s5pc110: add cpu revision
board:samsung:common: set envs with board unified information board:samsung:goni: add env variables describing platform board:samsung:universal: add env variables describing platform board:samsung:trats: enable boot with appended and separated DTB board:samsung:trats2: enable boot with appended and separated DTB
arch/arm/include/asm/arch-exynos/cpu.h | 8 ++++++-- arch/arm/include/asm/arch-s5pc1xx/cpu.h | 7 +++++++ board/samsung/common/misc.c | 29 +++++++++++++++++++++++++++++ board/samsung/goni/goni.c | 5 +++++ include/configs/s5p_goni.h | 4 ++++ include/configs/s5pc210_universal.h | 5 +++++ include/configs/trats.h | 14 +++++++++++--- include/configs/trats2.h | 13 ++++++++++--- 8 files changed, 77 insertions(+), 8 deletions(-)
Signature · 1 line
1.7.9.5
PATCH 1/7 arm:exynos: add cpu revision
This patch enables to read cpu revision on Exynos CPU.
--- arch/arm/include/asm/arch-exynos/cpu.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
arch/arm/include/asm/arch-exynos/cpu.h +6 -2
@@ -185,9 +185,11 @@ static inline int s5p_get_cpu_rev(void)static inline void s5p_set_cpu_id (void ) { -unsigned int pro_id = (readl (EXYNOS4_PRO_ID ) &0x00FFF000 ) >>12 ; +unsigned int pro_id =readl (EXYNOS4_PRO_ID ); +unsigned int cpu_id = (pro_id &0x00FFF000 ) >>12 ; +unsigned int cpu_rev = pro_id &0x000000FF ; -switch (pro_id) { +switch (cpu_id) {case 0x200 :/* Exynos4210 EVT0 */ s5p_cpu_id =0x4210 ;
@@ -196,10 +198,12 @@ static inline void s5p_set_cpu_id(void)case 0x210 :/* Exynos4210 EVT1 */ s5p_cpu_id =0x4210 ; + s5p_cpu_rev = cpu_rev;break ;case 0x412 :/* Exynos4412 */ s5p_cpu_id =0x4412 ; + s5p_cpu_rev = cpu_rev;break ;case 0x520 :/* Exynos5250 */
Signature · 1 line
1.7.9.5
PATCH 2/7 arm:s5pc110: add cpu revision
In reply to Piotr WilczekThis patch adds s5p_cpu_rev.
--- arch/arm/include/asm/arch-s5pc1xx/cpu.h | 7 +++++++ 1 file changed, 7 insertions(+)
arch/arm/include/asm/arch-s5pc1xx/cpu.h +7 -0
@@ -51,10 +51,17 @@#include <asm/io.h> /* CPU detection macros */ extern unsigned int s5p_cpu_id; +extern unsigned int s5p_cpu_rev; + +static inline int s5p_get_cpu_rev (void ) +{ +return s5p_cpu_rev; +}static inline void s5p_set_cpu_id (void ) { s5p_cpu_id =readl (S5PC100_PRO_ID ); + s5p_cpu_rev = s5p_cpu_id &0x000000FF ; s5p_cpu_id =0xC000 | ((s5p_cpu_id &0x00FFF000 ) >>12 ); }
Signature · 1 line
1.7.9.5
PATCH 3/7 board:samsung:common: set envs with board unified information
In reply to Piotr WilczekThis patch enables to set envs that describe board information. The following envs are set (but not saved): soc_id, soc_rev, board_rev.
Based on this information, 'fdtaddr' env is set (not saved) as:
fdtaddr=${soc_family}${soc_id}-${board}.dtb
--- board/samsung/common/misc.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+)
board/samsung/common/misc.c +29 -0
@@ -7,8 +7,37 @@#include <common.h> +extern u32 get_board_rev (void ); + +#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG +void set_board_info (void ) +{ +char info[64 ]; + +snprintf (info,ARRAY_SIZE (info),"%d.%d" , s5p_cpu_rev &0x0f , + (s5p_cpu_rev &0xf0 ) >>0x04 ); +setenv ("soc_rev" , info); + +snprintf (info,ARRAY_SIZE (info),"%x" , s5p_cpu_id); +setenv ("soc_id" , info); + +snprintf (info,ARRAY_SIZE (info),"%x" ,get_board_rev ()); +setenv ("board_rev" , info); + +#ifdef CONFIG_OF_LIBFDT +snprintf (info,ARRAY_SIZE (info),"%s%x-%s.dtb" , +CONFIG_SYS_SOC , s5p_cpu_id,CONFIG_SYS_BOARD ); +setenv ("fdtfile" , info); +#endif +} +#endif +/* Common for Samsung boards */ int misc_init_r (void ) { +#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG +set_board_info (); +#endif +return 0 ; }
Signature · 1 line
1.7.9.5
PATCH 3/7 board:samsung:common: set envs with board unified information
Quoted 3 lines · Piotr Wilczek
This patch enables to set envs that describe board information. The following envs are set (but not saved):
soc_id,soc_rev,board_rev.
I don't see the "not saved" part in the patch. How exactly does a "saveenv" not save those programmatically generated variables? (Altera SoCFPGA suffers from the same issue, we may not want to repeat this in mainline U-Boot)
Quoted 2 lines
Based on this information, 'fdtaddr' env is set (not saved) as:
fdtaddr=${soc_family}${soc_id}-${board}.dtb
An address variable resolves to a DTB filename? That would be unexpected. Or is it a typo in the commit message?
virtually yours
Gerhard Sittig
Signature · 3 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr. 5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
PATCH 3/7 board:samsung:common: set envs with board unified information
Quoted 12 lines
-----Original Message-----
From: Gerhard Sittig [mailto:gsi at denx.de]
Sent: Wednesday, January 15, 2014 5:18 PM
To: Piotr Wilczek
Cc: u-boot at lists.denx.de; Kyungmin Park
Subject: Re: [U-Boot] [PATCH 3/7] board:samsung:common: set envs with board unified informationQuoted 1 line · Piotr Wilczek
Quoted 9 lines
Quoted 2 lines
This patch enables to set envs that describe board information. The following envs are set (but not saved):
soc_id,soc_rev,
board_rev.I don't see the "not saved" part in the patch. How exactly does a "saveenv" not save those programmatically generated variables? (Altera SoCFPGA suffers from the same issue, we may not want to repeat this in mainline U-Boot)
It means only that I don't save the generated variables to persistent storage.
I will modify the commit message to be more specific.
Quoted 5 lines
Quoted 2 lines
Based on this information, 'fdtaddr' env is set (not saved) as:
fdtaddr=${soc_family}${soc_id}-${board}.dtbAn address variable resolves to a DTB filename? That would be unexpected. Or is it a typo in the commit message?
It's a typo, I will fix the commit message.
Quoted 8 lines
virtually yours
Gerhard Sittig
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr. 5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
Best regards,
Piotr Wilczek
PATCH 4/7 board:samsung:goni: add env variables describing platform
In reply to Piotr WilczekThis patch adds variables describing platform (soc, board, vendor) to default environment.
Samsung's common misc imitialisation is enabled to provide additional board information in envs.
--- board/samsung/goni/goni.c | 5 +++++ include/configs/s5p_goni.h | 4 ++++ 2 files changed, 9 insertions(+)
board/samsung/goni/goni.c +5 -0
@@ -17,6 +17,11 @@ DECLARE_GLOBAL_DATA_PTR;static struct s5pc110_gpio *s5pc110_gpio; +u32 get_board_rev (void ) +{ +return 0 ; +} +int board_init (void ) {/* Set Initial global variables */
include/configs/s5p_goni.h +4 -0
@@ -113,8 +113,12 @@#define CONFIG_UBIFS_OPTION "rootflags=bulk_read,no_chk_data_crc" +#define CONFIG_MISC_INIT_R +#define CONFIG_ENV_OVERWRITE #define CONFIG_SYS_CONSOLE_IS_IN_ENV +#define CONFIG_ENV_VARS_UBOOT_CONFIG +#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG #define CONFIG_EXTRA_ENV_SETTINGS \ CONFIG_UPDATEB \ "updatek=" \
Signature · 1 line
1.7.9.5
PATCH 5/7 board:samsung:universal: add env variables describing platform
In reply to Piotr WilczekThis patch adds variables describing platform (soc, board, vendor) to default environment.
Samsung's common misc imitialisation is enabled to provide additional board information in envs.
--- include/configs/s5pc210_universal.h | 5 +++++ 1 file changed, 5 insertions(+)
include/configs/s5pc210_universal.h +5 -0
@@ -124,6 +124,11 @@#define CONFIG_SYS_CONSOLE_INFO_QUIET #define CONFIG_SYS_CONSOLE_IS_IN_ENV +#define CONFIG_ENV_VARS_UBOOT_CONFIG +#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG + +#define CONFIG_MISC_INIT_R +#define CONFIG_EXTRA_ENV_SETTINGS \ "updateb=" \ "onenand erase 0x0 0x100000;" \
Signature · 1 line
1.7.9.5
PATCH 5/7 board:samsung:universal: add env variables describing platform
Hello Piotr,
Quoted 18 lines · Piotr Wilczek
This patch adds variables describing platform (soc, board, vendor) to default environment.
Samsung's common misc imitialisation is enabled to provide additional board information in envs.
Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Cc Przemyslaw Marczak <[email protected]>--- include/configs/s5pc210_universal.h | 5 +++++ 1 file changed, 5 insertions(+)include/configs/s5pc210_universal.h +0
-0
include/configs/s5pc210_universal.h line 131
Quoted 8 lines
include/configs/s5pc210_universal.h +5
-0@@ -124,6 +124,11 @@#define CONFIG_SYS_CONSOLE_INFO_QUIET #define CONFIG_SYS_CONSOLE_IS_IN_ENV +#define CONFIG_ENV_VARS_UBOOT_CONFIG +#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG + +#define CONFIG_MISC_INIT_R +
You depends on my patch set and here we have a conflict in universal, trats and trats2. My patchset defines CONFIG_MISC_INIT_R for these three boards, so you can remove it from configs.
include/configs/s5pc210_universal.h line 134
Quoted 4 lines
include/configs/s5pc210_universal.h +0
-0#define CONFIG_EXTRA_ENV_SETTINGS \ "updateb=" \ "onenand erase 0x0 0x100000;" \
Thank you,
Signature · 4 lines
Przemyslaw Marczak Samsung R&D Institute Poland Samsung Electronics p.marczak at samsung.com
PATCH 5/7 board:samsung:universal: add env variables describing platform
Hi Przemyslaw,
Quoted 33 lines
-----Original Message-----
From: Przemyslaw Marczak [mailto:p.marczak at samsung.com]
Sent: Tuesday, January 14, 2014 9:48 AM
To: u-boot at lists.denx.de
Cc: Piotr Wilczek; Minkyu Kang; Kyungmin Park; Lukasz Majewski
Subject: Re: [PATCH 5/7] board:samsung:universal: add env variables describing platformHello Piotr,
Quoted 22 lines · Piotr Wilczek
This patch adds variables describing platform (soc, board, vendor) to default environment.
Samsung's common misc imitialisation is enabled to provide additional board information in envs.
Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Cc Przemyslaw Marczak <[email protected]>--- include/configs/s5pc210_universal.h | 5 +++++ 1 file changed, 5 insertions(+)include/configs/s5pc210_universal.h +0
-0@@ -124,6 +124,11 @@#define CONFIG_SYS_CONSOLE_INFO_QUIET #define CONFIG_SYS_CONSOLE_IS_IN_ENV
Quoted 10 lines
include/configs/s5pc210_universal.h line 131
Quoted 5 lines
include/configs/s5pc210_universal.h +5
-0+#define CONFIG_ENV_VARS_UBOOT_CONFIG +#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG + +#define CONFIG_MISC_INIT_R +You depends on my patch set and here we have a conflict in universal, trats and trats2. My patchset defines
CONFIG_MISC_INIT_Rfor these three boards, so you can remove it from configs.
Is the samsung/common/misc.c file reserved only for misc_init_r function? I think that CONFIG_MISC_INIT_R is misleading.
Quoted 11 lines
include/configs/s5pc210_universal.h line 134
Quoted 4 lines
include/configs/s5pc210_universal.h +0
-0#define CONFIG_EXTRA_ENV_SETTINGS \ "updateb=" \ "onenand erase 0x0 0x100000;" \Thank you,
--
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com
Best regards,
Piotr Wilczek
PATCH 5/7 board:samsung:universal: add env variables describing platform
Hello Piotr,
Quoted 45 lines · Piotr Wilczek
Hi Przemyslaw,
Quoted 33 lines
-----Original Message-----
From: Przemyslaw Marczak [mailto:p.marczak at samsung.com]
Sent: Tuesday, January 14, 2014 9:48 AM
To: u-boot at lists.denx.de
Cc: Piotr Wilczek; Minkyu Kang; Kyungmin Park; Lukasz Majewski
Subject: Re: [PATCH 5/7] board:samsung:universal: add env variables describing platformHello Piotr,
Quoted 22 lines · Piotr Wilczek
This patch adds variables describing platform (soc, board, vendor) to default environment.
Samsung's common misc imitialisation is enabled to provide additional board information in envs.
Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Cc Przemyslaw Marczak <[email protected]>--- include/configs/s5pc210_universal.h | 5 +++++ 1 file changed, 5 insertions(+)include/configs/s5pc210_universal.h +0
-0@@ -124,6 +124,11 @@#define CONFIG_SYS_CONSOLE_INFO_QUIET #define CONFIG_SYS_CONSOLE_IS_IN_ENV Quoted 10 lines
include/configs/s5pc210_universal.h line 131
Quoted 5 lines
include/configs/s5pc210_universal.h +5
-0+#define CONFIG_ENV_VARS_UBOOT_CONFIG +#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG + +#define CONFIG_MISC_INIT_R +You depends on my patch set and here we have a conflict in universal, trats and trats2. My patchset defines
CONFIG_MISC_INIT_Rfor these three boards, so you can remove it from configs.
Quoted 3 lines
Is the
samsung/common/misc.cfile reserved only formisc_init_rfunction? I think thatCONFIG_MISC_INIT_Ris misleading.
No, it isn't reserved. Misc_init_r function is for various things and is called from board_init_r. In this function we can put any common code for our vendor boards. So why do you think it is bad?
Quoted 12 lines
Quoted 11 lines
include/configs/s5pc210_universal.h line 134
Quoted 4 lines
include/configs/s5pc210_universal.h +0
-0#define CONFIG_EXTRA_ENV_SETTINGS \ "updateb=" \ "onenand erase 0x0 0x100000;" \Thank you,
--
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com
Quoted 6 lines
Best regards,
Piotr Wilczek
Thank you,
Signature · 4 lines
Przemyslaw Marczak Samsung R&D Institute Poland Samsung Electronics p.marczak at samsung.com
PATCH 5/7 board:samsung:universal: add env variables describing platform
Hi Przemyslaw,
Quoted 57 lines
-----Original Message-----
From: Przemyslaw Marczak [mailto:p.marczak at samsung.com]
Sent: Tuesday, January 14, 2014 11:10 AM
To: u-boot at lists.denx.de
Cc: Piotr Wilczek; 'Minkyu Kang'; 'Kyungmin Park'; Lukasz Majewski
Subject: Re: [PATCH 5/7] board:samsung:universal: add env variables describing platformHello Piotr,
Quoted 42 lines · Piotr Wilczek
Hi Przemyslaw,
Quoted 40 lines
-----Original Message-----
From: Przemyslaw Marczak [mailto:p.marczak at samsung.com]
Sent: Tuesday, January 14, 2014 9:48 AM
To: u-boot at lists.denx.de
Cc: Piotr Wilczek; Minkyu Kang; Kyungmin Park; Lukasz Majewski
Subject: Re: [PATCH 5/7] board:samsung:universal: add env variables describing platformHello Piotr,
Quoted 19 lines · Piotr Wilczek
This patch adds variables describing platform (soc, board, vendor) to default environment.
Samsung's common misc imitialisation is enabled to provide additional board information in envs.
Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Cc Przemyslaw Marczak <[email protected]>--- include/configs/s5pc210_universal.h | 5 +++++ 1 file changed, 5 insertions(+)include/configs/s5pc210_universal.h +0
-0include/configs/s5pc210_universal.h line 131
Quoted 8 lines
include/configs/s5pc210_universal.h +5
-0@@ -124,6 +124,11 @@#define CONFIG_SYS_CONSOLE_INFO_QUIET #define CONFIG_SYS_CONSOLE_IS_IN_ENV +#define CONFIG_ENV_VARS_UBOOT_CONFIG #define +CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG + +#define CONFIG_MISC_INIT_R +You depends on my patch set and here we have a conflict in
universal,
Quoted 3 lines
Quoted 3 lines
trats and trats2. My patchset defines
CONFIG_MISC_INIT_Rfor these three boards, so you can remove it from configs.
Quoted 9 lines
Quoted 1 line
Is the
samsung/common/misc.cfile reserved only formisc_init_rfunction?
Quoted 2 lines
I think that
CONFIG_MISC_INIT_Ris misleading.No, it isn't reserved.
Misc_init_rfunction is for various things and is called fromboard_init_r. In this function we can put any common code for our vendor boards. So why do you think it is bad?
So the misc.c file is reserved for misc_init_r only. The file is only for CONFIG_MISC_INIT_R.
I thought that in misc.c we can put some common code not necessarily called form misc_init_r but say from borad_late_init. But ok. To add some common code for board_late_init I need to add another file.
Quoted 1 line
Quoted 1 line
Quoted 1 line
include/configs/s5pc210_universal.h line 132
Quoted 1 line
include/configs/s5pc210_universal.h +0
-0#define CONFIG_EXTRA_ENV_SETTINGS
\
Quoted 24 lines
Quoted 11 lines
Quoted 10 lines
include/configs/s5pc210_universal.h line 134
Quoted 3 lines
include/configs/s5pc210_universal.h +0
-0"updateb=" \"onenand erase 0x0 0x100000;" \Thank you,
--
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.comQuoted 6 lines
Best regards,
Piotr WilczekThank you,
--
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com
PATCH 5/7 board:samsung:universal: add env variables describing platform
Hello Piotr,
Quoted 64 lines · Piotr Wilczek
Hi Przemyslaw,
Quoted 62 lines
-----Original Message-----
From: Przemyslaw Marczak [mailto:p.marczak at samsung.com]
Sent: Tuesday, January 14, 2014 11:10 AM
To: u-boot at lists.denx.de
Cc: Piotr Wilczek; 'Minkyu Kang'; 'Kyungmin Park'; Lukasz Majewski
Subject: Re: [PATCH 5/7] board:samsung:universal: add env variables describing platformHello Piotr,
Quoted 42 lines · Piotr Wilczek
Hi Przemyslaw,
Quoted 40 lines
-----Original Message-----
From: Przemyslaw Marczak [mailto:p.marczak at samsung.com]
Sent: Tuesday, January 14, 2014 9:48 AM
To: u-boot at lists.denx.de
Cc: Piotr Wilczek; Minkyu Kang; Kyungmin Park; Lukasz Majewski
Subject: Re: [PATCH 5/7] board:samsung:universal: add env variables describing platformHello Piotr,
Quoted 19 lines · Piotr Wilczek
This patch adds variables describing platform (soc, board, vendor) to default environment.
Samsung's common misc imitialisation is enabled to provide additional board information in envs.
Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Cc Przemyslaw Marczak <[email protected]>--- include/configs/s5pc210_universal.h | 5 +++++ 1 file changed, 5 insertions(+)include/configs/s5pc210_universal.h +0
-0include/configs/s5pc210_universal.h line 131
Quoted 8 lines
include/configs/s5pc210_universal.h +5
-0@@ -124,6 +124,11 @@#define CONFIG_SYS_CONSOLE_INFO_QUIET #define CONFIG_SYS_CONSOLE_IS_IN_ENV +#define CONFIG_ENV_VARS_UBOOT_CONFIG #define +CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG + +#define CONFIG_MISC_INIT_R +You depends on my patch set and here we have a conflict in
universal,
Quoted 4 lines
Quoted 3 lines
trats and trats2. My patchset defines
CONFIG_MISC_INIT_Rfor these three boards, so you can remove it from configs.Is the
samsung/common/misc.cfile reserved only formisc_init_rfunction?
Quoted 2 lines
I think that
CONFIG_MISC_INIT_Ris misleading.
Quoted 6 lines
Quoted 4 lines
No, it isn't reserved.
Misc_init_rfunction is for various things and is called fromboard_init_r. In this function we can put any common code for our vendor boards. So why do you think it is bad?So the
misc.cfile is reserved formisc_init_ronly. The file is only forCONFIG_MISC_INIT_R.
In this meaning - YES, will compile only for CONFIG_MISC....
Quoted 4 lines
I thought that in
misc.cwe can put some common code not necessarily called formmisc_init_rbut say fromborad_late_init. But ok. To add some common code forboard_late_initI need to add another file.
That was in my first patch set. So maybe I remove the CONFIG_MISC_INIT_R dependency from Makefile.
Quoted 29 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
include/configs/s5pc210_universal.h line 132
Quoted 1 line
include/configs/s5pc210_universal.h +0
-0#define CONFIG_EXTRA_ENV_SETTINGS \
Quoted 24 lines
Quoted 11 lines
Quoted 10 lines
include/configs/s5pc210_universal.h line 134
Quoted 3 lines
include/configs/s5pc210_universal.h +0
-0"updateb=" \"onenand erase 0x0 0x100000;" \Thank you,
--
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.comQuoted 6 lines
Best regards,
Piotr WilczekThank you,
--
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com
Thanks,
Signature · 4 lines
Przemyslaw Marczak Samsung R&D Institute Poland Samsung Electronics p.marczak at samsung.com
PATCH 6/7 board:samsung:trats: enable boot with appended and separated DTB
In reply to Piotr WilczekThis patch adds variables describing platform (soc, board, vendor) to default environment and Samsung's common misc initialisation to provide additional board information in envs.
This patch modifies envs to enable dual kernel boot
- with separated DTB if the DTB file is loaded successfully;
- with DTB apppended to uImage if DTB file is not found;
This is neccesssary for backward compatibilty.
--- include/configs/trats.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
include/configs/trats.h +11 -3
@@ -148,9 +148,16 @@#define CONFIG_SYS_CONSOLE_INFO_QUIET #define CONFIG_SYS_CONSOLE_IS_IN_ENV +#define CONFIG_ENV_VARS_UBOOT_CONFIG +#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG +#define CONFIG_EXTRA_ENV_SETTINGS \ "bootk=" \ - "run loaddtb; run loaduimage; bootm 0x40007FC0 - ${fdtaddr}\0" \ + "run loaduimage;" \ + "if run loaddtb; then " \ + "bootm 0x40007FC0 - ${fdtaddr};" \ + "fi;" \ + "bootm 0x40007FC0;\0" \ "updatemmc=" \ "mmc boot 0 1 1 1; mmc write 0 0x42008000 0 0x200;" \ "mmc boot 0 1 1 0\0" \
@@ -173,7 +180,7 @@"mmcboot=" \"setenv bootargs root=/dev/mmcblk${mmcdev}p${mmcrootpart} " \"${lpj} rootwait ${console} ${meminfo} ${opts} ${lcdinfo}; " \ -"run loaddtb; run loaduimage; bootm 0x40007FC0 - ${fdtaddr}\0" \ +"run loaddtb; run bootk\0" \"bootchart=setenv opts init=/sbin/bootchartd; run bootcmd\0" \"boottrace=setenv opts initcall_debug; run bootcmd\0" \"mmcoops=mmc read 0 0x40000000 0x40 8; md 0x40000000 0x400\0" \
@@ -212,7 +219,6 @@"setenv spl_imgaddr;" \"setenv spl_addr_tmp;\0" \"fdtaddr=40800000\0" \ -"fdtfile=exynos4210-trats.dtb\0" /* Miscellaneous configurable options */
@@ -254,6 +260,8 @@#define CONFIG_DOS_PARTITION #define CONFIG_EFI_PARTITION +#define CONFIG_MISC_INIT_R +/* EXT4 */ #define CONFIG_CMD_EXT4 #define CONFIG_CMD_EXT4_WRITE
Signature · 1 line
1.7.9.5
PATCH 7/7 board:samsung:trats2: enable boot with appended and separated DTB
In reply to Piotr WilczekThis patch adds variables describing platform (soc, board, vendor) to default environment and Samsung's common misc initialisation to provide additional board information in envs.
This patch modifies envs to enable dual kernel boot
- with separated DTB if the DTB file is loaded successfully;
- with DTB apppended to uImage if DTB file is not found; This is neccesssary for backward compatibilty.
--- include/configs/trats2.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
include/configs/trats2.h +10 -3
@@ -150,6 +150,9 @@#define CONFIG_SYS_CONSOLE_INFO_QUIET #define CONFIG_SYS_CONSOLE_IS_IN_ENV +#define CONFIG_ENV_VARS_UBOOT_CONFIG +#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG +/* Tizen - partitions definitions */ #define PARTS_CSA "csa"#define PARTS_BOOT "boot"
@@ -177,7 +180,11 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "bootk=" \ - "run loaddtb; run loaduimage; bootm 0x40007FC0 - ${fdtaddr}\0" \ + "run loaduimage;" \ + "if run loaddtb; then " \ + "bootm 0x40007FC0 - ${fdtaddr};" \ + "fi;" \ + "bootm 0x40007FC0;\0" \ "updatemmc=" \ "mmc boot 0 1 1 1; mmc write 0x42008000 0 0x200;" \ "mmc boot 0 1 1 0\0" \
@@ -191,7 +198,7 @@"mmcboot=" \"setenv bootargs root=/dev/mmcblk${mmcdev}p${mmcrootpart} " \"${lpj} rootwait ${console} ${meminfo} ${opts} ${lcdinfo}; " \ -"run loaddtb; run loaduimage; bootm 0x40007FC0 - ${fdtaddr}\0" \ +"run bootk\0" \"bootchart=set opts init=/sbin/bootchartd; run bootcmd\0" \"boottrace=setenv opts initcall_debug; run bootcmd\0" \"verify=n\0" \
@@ -232,7 +239,6 @@"setenv spl_imgaddr;" \"setenv spl_addr_tmp;\0" \"fdtaddr=40800000\0" \ -"fdtfile=exynos4412-trats2.dtb\0" /* * Miscellaneous configurable options
@@ -272,6 +278,7 @@#define CONFIG_EFI_PARTITION #define CONFIG_PARTITION_UUIDS +#define CONFIG_MISC_INIT_R #define CONFIG_BOARD_EARLY_INIT_F /* I2C */
Signature · 1 line
1.7.9.5
v2 cover arm: add runtime envs describing build
In reply to Piotr WilczekThis patchset adds runtime variables for Samsung boards that describe build configuration (arch, soc, board, vendor).
Additionally, more envs describing platform (soc and board revision) are added to Samsung common code.
For boards Trats and Trats2, based on the added envs, 'fdtfile' env is set and dual kernel boot is enabled:
- with separated DTB if the DTB file is loaded successfully;
- with DTB apppended to uImage if DTB file is not found;
This is neccesssary for backward compatibilty.
THis patchset depends on the patchset:
[PATCH v6 00/11] Introduce Samsung misc file and LCD menu.
http://patchwork.ozlabs.org/patch/313186/
...
http://patchwork.ozlabs.org/patch/313192/
Changes for V2:
- rebased against current u-boot0samsung branch
Piotr Wilczek (8):
arm:exynos: add cpu revision
arm:s5pc110: add cpu revision
board:samsung:common: set envs with board unified information board:samsung:goni: add env variables describing platform board:samsung:universal: add env variables describing platform board:samsung:trats: add env variables describing platform board:samsung:trats2: add env variables describing platform board:samsung:trats/trats2: enable boot with appended and separated
DTB
arch/arm/include/asm/arch-exynos/cpu.h | 8 ++++++-- arch/arm/include/asm/arch-s5pc1xx/cpu.h | 7 +++++++ board/samsung/common/misc.c | 24 ++++++++++++++++++++++++ board/samsung/goni/goni.c | 17 +++++++++++++++++ board/samsung/trats/trats.c | 3 +++ board/samsung/trats2/trats2.c | 3 +++ board/samsung/universal_c210/universal.c | 3 +++ include/configs/s5p_goni.h | 6 ++++++ include/configs/s5pc210_universal.h | 3 +++ include/configs/trats.h | 12 +++++++++--- include/configs/trats2.h | 12 +++++++++--- include/samsung/misc.h | 12 ++++++++---- 12 files changed, 98 insertions(+), 12 deletions(-)
Signature · 1 line
1.7.9.5
PATCH v2 1/8 arm:exynos: add cpu revision
This patch enables to read cpu revision on Exynos CPU.
---
Changes for V2:
- none
arch/arm/include/asm/arch-exynos/cpu.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
arch/arm/include/asm/arch-exynos/cpu.h +6 -2
@@ -185,9 +185,11 @@ static inline int s5p_get_cpu_rev(void)static inline void s5p_set_cpu_id (void ) { -unsigned int pro_id = (readl (EXYNOS4_PRO_ID ) &0x00FFF000 ) >>12 ; +unsigned int pro_id =readl (EXYNOS4_PRO_ID ); +unsigned int cpu_id = (pro_id &0x00FFF000 ) >>12 ; +unsigned int cpu_rev = pro_id &0x000000FF ; -switch (pro_id) { +switch (cpu_id) {case 0x200 :/* Exynos4210 EVT0 */ s5p_cpu_id =0x4210 ;
@@ -196,10 +198,12 @@ static inline void s5p_set_cpu_id(void)case 0x210 :/* Exynos4210 EVT1 */ s5p_cpu_id =0x4210 ; + s5p_cpu_rev = cpu_rev;break ;case 0x412 :/* Exynos4412 */ s5p_cpu_id =0x4412 ; + s5p_cpu_rev = cpu_rev;break ;case 0x520 :/* Exynos5250 */
Signature · 1 line
1.7.9.5
PATCH v2 1/8 arm:exynos: add cpu revision
Dear Piotr Wilczek,
Quoted 1 line · In message <[email protected]> you wrote:
This patch enables to read cpu revision on Exynos CPU.
Sorry, you really need to refactor your patches.
In this commit you add references to "s5p_cpu_id":
arch/arm/include/asm/arch-exynos/cpu.h static inline void s5p_set_cpu_id(void) · line 209
Quoted 13 lines
arch/arm/include/asm/arch-exynos/cpu.h +2
-0@@ -196,10 +198,12 @@ static inline void s5p_set_cpu_id(void)case 0x210 :/* Exynos4210 EVT1 */ s5p_cpu_id =0x4210 ; + s5p_cpu_rev = cpu_rev;break ;case 0x412 :/* Exynos4412 */ s5p_cpu_id =0x4412 ; + s5p_cpu_rev = cpu_rev;break ;case 0x520 :/* Exynos5250 */
But this variable does not exist anywhere. It is only added in the next patch. Adding this patch causes build breakage, i. e. your patch series is not bisectable.
Please fix!
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"If that makes any sense to you, you have a big problem."
-- C. Durance, Computer Science 234PATCH v2 1/8 arm:exynos: add cpu revision
Dear Wolfgang Denk,
Quoted 18 lines · Wolfgang Denk
Dear Piotr Wilczek,
Quoted 1 line · In message <[email protected]> you wrote:
This patch enables to read cpu revision on Exynos CPU.
Sorry, you really need to refactor your patches.
In this commit you add references to "
s5p_cpu_id":Quoted 9 lines
arch/arm/include/asm/arch-exynos/cpu.h +1
-0@@ -196,10 +198,12 @@ static inline void s5p_set_cpu_id(void)case 0x210 :/* Exynos4210 EVT1 */ s5p_cpu_id =0x4210 ; + s5p_cpu_rev = cpu_rev;break ;case 0x412 :/* Exynos4412 */ s5p_cpu_id =0x4412 ;
Quoted 8 lines
arch/arm/include/asm/arch-exynos/cpu.h static inline void s5p_set_cpu_id(void) · line 209
Quoted 4 lines
arch/arm/include/asm/arch-exynos/cpu.h +1
-0+ s5p_cpu_rev = cpu_rev;break ;case 0x520 :/* Exynos5250 */ But this variable does not exist anywhere. It is only added in the next patch. Adding this patch causes build breakage, i. e. your patch series is not bisectable.
s5p_cpu_id and s5p_cpu_rev exist on "arch/arm/cpu/armv7/s5p-common/cpu_info.c". This patch looks fine to me.
Thanks,
Minkyu Kang.
PATCH v2 2/8 arm:s5pc110: add cpu revision
In reply to Piotr WilczekThis patch adds s5p_cpu_rev.
---
Changes for V2:
- none
arch/arm/include/asm/arch-s5pc1xx/cpu.h | 7 +++++++ 1 file changed, 7 insertions(+)
arch/arm/include/asm/arch-s5pc1xx/cpu.h +7 -0
@@ -51,10 +51,17 @@#include <asm/io.h> /* CPU detection macros */ extern unsigned int s5p_cpu_id; +extern unsigned int s5p_cpu_rev; + +static inline int s5p_get_cpu_rev (void ) +{ +return s5p_cpu_rev; +}static inline void s5p_set_cpu_id (void ) { s5p_cpu_id =readl (S5PC100_PRO_ID ); + s5p_cpu_rev = s5p_cpu_id &0x000000FF ; s5p_cpu_id =0xC000 | ((s5p_cpu_id &0x00FFF000 ) >>12 ); }
Signature · 1 line
1.7.9.5
PATCH v2 3/8 board:samsung:common: set envs with board unified information
In reply to Piotr WilczekThis patch sets envs that describe board information. The following envs are set: soc_id, soc_rev, board_rev. Based on this information, if CONFIG_OF_LIBFDT is enabled, the 'fdtfile' env is set as:
fdtfile=${soc_family}${soc_id}-${board}.dtb
The generated envs are intenionally not saved to persistent storage.
---
Changes for V2:
- rebased on patchset [PATCH v6 00/11] Introduce Samsung misc file and LCD menu
board/samsung/common/misc.c | 24 ++++++++++++++++++++++++ include/samsung/misc.h | 12 ++++++++---- 2 files changed, 32 insertions(+), 4 deletions(-)
board/samsung/common/misc.c +24 -0
@@ -21,6 +21,30 @@DECLARE_GLOBAL_DATA_PTR ; +#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG +void set_board_info (void ) +{ +char info[64 ]; + +snprintf (info,ARRAY_SIZE (info),"%d.%d" , s5p_cpu_rev &0x0f , + (s5p_cpu_rev &0xf0 ) >>0x04 ); +setenv ("soc_rev" , info); + +snprintf (info,ARRAY_SIZE (info),"%x" , s5p_cpu_id); +setenv ("soc_id" , info); + +#ifdef CONFIG_REVISION_TAG +snprintf (info,ARRAY_SIZE (info),"%x" ,get_board_rev ()); +setenv ("board_rev" , info); +#endif +#ifdef CONFIG_OF_LIBFDT +snprintf (info,ARRAY_SIZE (info),"%s%x-%s.dtb" , +CONFIG_SYS_SOC , s5p_cpu_id,CONFIG_SYS_BOARD ); +setenv ("fdtfile" , info); +#endif +} +#endif /* CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG */ +#ifdef CONFIG_LCD_MENU static int power_key_pressed (u32 reg) {
include/samsung/misc.h +8 -4
@@ -1,6 +1,14 @@#ifndef __SAMSUNG_MISC_COMMON_H__#define __SAMSUNG_MISC_COMMON_H__ +#ifdef CONFIG_REVISION_TAG +u32 get_board_rev (void ); +#endif + +#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG +void set_board_info (void ); +#endif +#ifdef CONFIG_LCD_MENU enum { BOOT_MODE_INFO,
@@ -10,10 +18,6 @@ enum { BOOT_MODE_EXIT, }; -#ifdef CONFIG_REVISION_TAG -u32 get_board_rev (void ); -#endif -void keys_init (void );void check_boot_mode (void );#endif /* CONFIG_LCD_MENU */
Signature · 1 line
1.7.9.5
PATCH v2 4/8 board:samsung:goni: add env variables describing platform
In reply to Piotr WilczekThis patch adds variables describing platform (soc, board, vendor) to default environment.
---
Changes for V2:
- rebased on patchset [PATCH v6 00/11] Introduce Samsung misc file and LCD menu
board/samsung/goni/goni.c | 17 +++++++++++++++++ include/configs/s5p_goni.h | 6 ++++++ 2 files changed, 23 insertions(+)
board/samsung/goni/goni.c +17 -0
@@ -13,10 +13,17 @@#include <usb/s3c_udc.h> #include <asm/arch/cpu.h> #include <power/max8998_pmic.h> +#include <samsung/misc.h> +DECLARE_GLOBAL_DATA_PTR ;static struct s5pc110_gpio *s5pc110_gpio; +u32 get_board_rev (void ) +{ +return 0 ; +} +int board_init (void ) {/* Set Initial global variables */
@@ -173,3 +180,13 @@ struct s3c_plat_otg_data s5pc110_otg_data = { .usb_phy_ctrl = S5PC110_USB_PHY_CONTROL, };#endif + +#ifdef CONFIG_MISC_INIT_R +int misc_init_r (void ) +{ +#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG +set_board_info (); +#endif +return 0 ; +} +#endif
include/configs/s5p_goni.h +6 -0
@@ -34,6 +34,7 @@#define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_CMDLINE_TAG +#define CONFIG_REVISION_TAG #define CONFIG_INITRD_TAG #define CONFIG_CMDLINE_EDITING
@@ -113,8 +114,13 @@#define CONFIG_UBIFS_OPTION "rootflags=bulk_read,no_chk_data_crc" +#define CONFIG_MISC_COMMON +#define CONFIG_MISC_INIT_R +#define CONFIG_ENV_OVERWRITE #define CONFIG_SYS_CONSOLE_IS_IN_ENV +#define CONFIG_ENV_VARS_UBOOT_CONFIG +#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG #define CONFIG_EXTRA_ENV_SETTINGS \ CONFIG_UPDATEB \ "updatek=" \
Signature · 1 line
1.7.9.5
PATCH v2 5/8 board:samsung:universal: add env variables describing platform
In reply to Piotr WilczekThis patch adds variables describing platform (soc, board, vendor) to default environment.
---
Changes for V2:
- rebased on patchset [PATCH v6 00/11] Introduce Samsung misc file and LCD menu
board/samsung/universal_c210/universal.c | 3 +++ include/configs/s5pc210_universal.h | 3 +++ 2 files changed, 6 insertions(+)
board/samsung/universal_c210/universal.c +3 -0
@@ -516,6 +516,9 @@ int board_init(void)#ifdef CONFIG_MISC_INIT_R int misc_init_r (void ) { +#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG +set_board_info (); +#endif #ifdef CONFIG_LCD_MENU keys_init ();check_boot_mode ();
include/configs/s5pc210_universal.h +3 -0
@@ -124,6 +124,9 @@#define CONFIG_SYS_CONSOLE_INFO_QUIET #define CONFIG_SYS_CONSOLE_IS_IN_ENV +#define CONFIG_ENV_VARS_UBOOT_CONFIG +#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG +#define CONFIG_EXTRA_ENV_SETTINGS \ "updateb=" \ "onenand erase 0x0 0x100000;" \
Signature · 1 line
1.7.9.5
PATCH v2 5/8 board:samsung:universal: add env variables describing platform
Hello Piotr,
Quoted 34 lines · Piotr Wilczek
This patch adds variables describing platform (soc, board, vendor) to default environment.
Signed-off-by Piotr Wilczek <[email protected]>Signed-off-by Kyungmin Park <[email protected]>Cc Przemyslaw Marczak <[email protected]>---
Changes for V2:
- rebased on patchset [PATCH v6 00/11] Introduce Samsung misc file and LCD menuboard/samsung/universal_c210/universal.c | 3 +++ include/configs/s5pc210_universal.h | 3 +++ 2 files changed, 6 insertions(+)board/samsung/universal_c210/universal.c +3
-0@@ -516,6 +516,9 @@ int board_init(void)#ifdef CONFIG_MISC_INIT_R int misc_init_r (void ) { +#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG +set_board_info (); +#endif #ifdef CONFIG_LCD_MENU keys_init ();check_boot_mode ();include/configs/s5pc210_universal.h +0
-0
include/configs/s5pc210_universal.h line 132
Quoted 9 lines
include/configs/s5pc210_universal.h +3
-0@@ -124,6 +124,9 @@#define CONFIG_SYS_CONSOLE_INFO_QUIET #define CONFIG_SYS_CONSOLE_IS_IN_ENV +#define CONFIG_ENV_VARS_UBOOT_CONFIG +#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG +#define CONFIG_EXTRA_ENV_SETTINGS \ "updateb=" \ "onenand erase 0x0 0x100000;" \
Signature · 4 lines
Przemyslaw Marczak Samsung R&D Institute Poland Samsung Electronics p.marczak at samsung.com
PATCH v2 6/8 board:samsung:trats: add env variables describing platform
In reply to Piotr WilczekThis patch adds variables describing platform (soc, board, vendor) to default environment.
---
Changes for V2:
- rebased on patchset [PATCH v6 00/11] Introduce Samsung misc file and LCD menu
board/samsung/trats/trats.c | 3 +++ include/configs/trats.h | 3 +++ 2 files changed, 6 insertions(+)
board/samsung/trats/trats.c +3 -0
@@ -791,6 +791,9 @@ void init_panel_info(vidinfo_t *vid)#ifdef CONFIG_MISC_INIT_R int misc_init_r (void ) { +#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG +set_board_info (); +#endif #ifdef CONFIG_LCD_MENU keys_init ();check_boot_mode ();
include/configs/trats.h +3 -0
@@ -149,6 +149,9 @@#define CONFIG_SYS_CONSOLE_INFO_QUIET #define CONFIG_SYS_CONSOLE_IS_IN_ENV +#define CONFIG_ENV_VARS_UBOOT_CONFIG +#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG +#define CONFIG_EXTRA_ENV_SETTINGS \ "bootk=" \ "run loaddtb; run loaduimage; bootm 0x40007FC0 - ${fdtaddr}\0" \
Signature · 1 line
1.7.9.5
PATCH v2 7/8 board:samsung:trats2: add env variables describing platform
In reply to Piotr WilczekThis patch adds variables describing platform (soc, board, vendor) to default environment.
---
Changes for V2:
- rebased on patchset [PATCH v6 00/11] Introduce Samsung misc file and LCD menu
board/samsung/trats2/trats2.c | 3 +++ include/configs/trats2.h | 3 +++ 2 files changed, 6 insertions(+)
board/samsung/trats2/trats2.c +3 -0
@@ -616,6 +616,9 @@ void init_panel_info(vidinfo_t *vid)#ifdef CONFIG_MISC_INIT_R int misc_init_r (void ) { +#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG +set_board_info (); +#endif #ifdef CONFIG_LCD_MENU keys_init ();check_boot_mode ();
include/configs/trats2.h +3 -0
@@ -150,6 +150,9 @@#define CONFIG_SYS_CONSOLE_INFO_QUIET #define CONFIG_SYS_CONSOLE_IS_IN_ENV +#define CONFIG_ENV_VARS_UBOOT_CONFIG +#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG +/* Tizen - partitions definitions */ #define PARTS_CSA "csa"#define PARTS_BOOT "boot"
Signature · 1 line
1.7.9.5
PATCH v2 8/8 board:samsung:trats/trats2: enable boot with appended and separated DTB
In reply to Piotr WilczekThis patch modifies envs to enable dual kernel boot
- with separated DTB if the DTB file is loaded successfully;
- with DTB apppended to uImage if DTB file is not found;
This is neccesssary for backward compatibilty.
---
Changes for V2:
- squashed separated patches for Trats and Trats2 inito one
include/configs/trats.h | 9 ++++++--- include/configs/trats2.h | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-)
include/configs/trats.h +6 -3
@@ -154,7 +154,11 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "bootk=" \ - "run loaddtb; run loaduimage; bootm 0x40007FC0 - ${fdtaddr}\0" \ + "run loaduimage;" \ + "if run loaddtb; then " \ + "bootm 0x40007FC0 - ${fdtaddr};" \ + "fi;" \ + "bootm 0x40007FC0;\0" \ "updatemmc=" \ "mmc boot 0 1 1 1; mmc write 0 0x42008000 0 0x200;" \ "mmc boot 0 1 1 0\0" \
@@ -177,7 +181,7 @@"mmcboot=" \"setenv bootargs root=/dev/mmcblk${mmcdev}p${mmcrootpart} " \"${lpj} rootwait ${console} ${meminfo} ${opts} ${lcdinfo}; " \ -"run loaddtb; run loaduimage; bootm 0x40007FC0 - ${fdtaddr}\0" \ +"run bootk\0" \"bootchart=setenv opts init=/sbin/bootchartd; run bootcmd\0" \"boottrace=setenv opts initcall_debug; run bootcmd\0" \"mmcoops=mmc read 0 0x40000000 0x40 8; md 0x40000000 0x400\0" \
@@ -216,7 +220,6 @@"setenv spl_imgaddr;" \"setenv spl_addr_tmp;\0" \"fdtaddr=40800000\0" \ -"fdtfile=exynos4210-trats.dtb\0" /* Miscellaneous configurable options */
include/configs/trats2.h +6 -3
@@ -180,7 +180,11 @@#define CONFIG_EXTRA_ENV_SETTINGS \ "bootk=" \ - "run loaddtb; run loaduimage; bootm 0x40007FC0 - ${fdtaddr}\0" \ + "run loaduimage;" \ + "if run loaddtb; then " \ + "bootm 0x40007FC0 - ${fdtaddr};" \ + "fi;" \ + "bootm 0x40007FC0;\0" \ "updatemmc=" \ "mmc boot 0 1 1 1; mmc write 0x42008000 0 0x200;" \ "mmc boot 0 1 1 0\0" \
@@ -194,7 +198,7 @@"mmcboot=" \"setenv bootargs root=/dev/mmcblk${mmcdev}p${mmcrootpart} " \"${lpj} rootwait ${console} ${meminfo} ${opts} ${lcdinfo}; " \ -"run loaddtb; run loaduimage; bootm 0x40007FC0 - ${fdtaddr}\0" \ +"run bootk\0" \"bootchart=set opts init=/sbin/bootchartd; run bootcmd\0" \"boottrace=setenv opts initcall_debug; run bootcmd\0" \"verify=n\0" \
@@ -235,7 +239,6 @@"setenv spl_imgaddr;" \"setenv spl_addr_tmp;\0" \"fdtaddr=40800000\0" \ -"fdtfile=exynos4412-trats2.dtb\0" /* * Miscellaneous configurable options
Signature · 1 line
1.7.9.5
v2 cover arm: add runtime envs describing build
In reply to Piotr WilczekQuoted 32 lines · Piotr Wilczek
This patchset adds runtime variables for Samsung boards that describe build configuration (arch, soc, board, vendor).
Additionally, more envs describing platform (soc and board revision) are added to Samsung common code.
For boards Trats and Trats2, based on the added envs, 'fdtfile' env is set and dual kernel boot is enabled:
- with separated DTB if the DTB file is loaded successfully;
- with DTB apppended to uImage if DTB file is not found;
This is neccesssary for backward compatibilty.THis patchset depends on the patchset:
[PATCH v6 00/11] Introduce Samsung misc file and LCD menu.
http://patchwork.ozlabs.org/patch/313186/
...
http://patchwork.ozlabs.org/patch/313192/Changes for V2:
- rebased against current u-boot0samsung branchPiotr Wilczek (8):
arm:exynos: add cpu revision
arm:s5pc110: add cpu revision
board:samsung:common: set envs with board unified information board:samsung:goni: add env variables describing platform board:samsung:universal: add env variables describing platform board:samsung:trats: add env variables describing platform board:samsung:trats2: add env variables describing platform board:samsung:trats/trats2: enable boot with appended and separated
DTB
Quoted 14 lines
arch/arm/include/asm/arch-exynos/cpu.h | 8 ++++++-- arch/arm/include/asm/arch-s5pc1xx/cpu.h | 7 +++++++ board/samsung/common/misc.c | 24 ++++++++++++++++++++++++ board/samsung/goni/goni.c | 17 +++++++++++++++++ board/samsung/trats/trats.c | 3 +++ board/samsung/trats2/trats2.c | 3 +++ board/samsung/universal_c210/universal.c | 3 +++ include/configs/s5p_goni.h | 6 ++++++ include/configs/s5pc210_universal.h | 3 +++ include/configs/trats.h | 12 +++++++++--- include/configs/trats2.h | 12 +++++++++--- include/samsung/misc.h | 12 ++++++++---- 12 files changed, 98 insertions(+), 12 deletions(-)
applied to u-boot-samsung.
Thanks,
Minkyu Kang.