Skip to contentSkip to conversation

env: Merge Rockchip, Sunxi, Zynq and ZynqMP

PATCH In review Michal Simek 3 participants 10 messages Jul 19, 2018 – Aug 20, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 env: Merge Rockchip, Sunxi, Zynq and ZynqMP

There is no reason to have the same Kconfig options for different SoCs separately. The patch is merging them together.

---

Patch is based on
https://lists.denx.de/pipermail/u-boot/2018-July/335126.html

I have ENV_SECT_SIZE just for zynq/zynqmp because rockchip and sunxi have this in their configs. When they decide to move then can enable that option for them too.
I expect when more platforms extend this we will have less constrain Kconfig setup.

---
 env/Kconfig | 66 ++++++++++++++++---------------------------------------------
 1 file changed, 17 insertions(+), 49 deletions(-)
env/Kconfig +17 -49
index b37dcd78eb75..0ded003d7d41 100644
@@ -431,23 +431,37 @@ config ENV_EXT4_FILE
 	  It's a string of the EXT4 file name. This file use to store the
 	  environment (explicit path to the file)
 
-if ARCH_SUNXI
+if ARCH_ROCKCHIP || ARCH_SUNXI || ARCH_ZYNQ || ARCH_ZYNQMP
 
 config ENV_OFFSET
 	hex "Environment Offset"
 	depends on !ENV_IS_IN_UBI
 	depends on !ENV_IS_NOWHERE
+	default 0x3f8000 if ARCH_ROCKCHIP
 	default 0x88000 if ARCH_SUNXI
+	default 0xE0000 if ARCH_ZYNQ
+	default 0x1E00000 if ARCH_ZYNQMP
 	help
 	  Offset from the start of the device (or partition)
 
 config ENV_SIZE
 	hex "Environment Size"
-	depends on !ENV_IS_NOWHERE
-	default 0x20000 if ARCH_SUNXI
+	default 0x8000 if ARCH_ROCKCHIP && !ENV_IS_NOWHERE
+	default 0x20000 if ARCH_SUNXI && !ENV_IS_NOWHERE
+	default 0x20000 if ARCH_ZYNQ
+	default 0x40000 if ENV_IS_IN_SPI_FLASH && ARCH_ZYNQMP
+	default 0x8000 if ARCH_ZYNQMP
 	help
 	  Size of the environment storage area
 
+config ENV_SECT_SIZE
+	hex "Environment Sector-Size"
+	depends on !ENV_IS_NOWHERE && (ARCH_ZYNQ || ARCH_ZYNQMP)
+	default 0x40000 if ARCH_ZYNQMP
+	default 0x20000 if ARCH_ZYNQ
+	help
+	  Size of the sector containing the environment.
+
 config ENV_UBI_PART
 	string "UBI partition name"
 	depends on ENV_IS_IN_UBI
@@ -462,52 +476,6 @@ config ENV_UBI_VOLUME
 
 endif
 
-if ARCH_ROCKCHIP
-
-config ENV_OFFSET
-	hex
-	depends on !ENV_IS_IN_UBI
-	depends on !ENV_IS_NOWHERE
-	default 0x3f8000
-	help
-	  Offset from the start of the device (or partition)
-
-config ENV_SIZE
-	hex
-	default 0x8000
-	help
-	  Size of the environment storage area
-
-endif
-
-if ARCH_ZYNQMP || ARCH_ZYNQ
-
-config ENV_OFFSET
-	hex "Environment Offset"
-	depends on !ENV_IS_NOWHERE
-	default 0x1E00000 if ARCH_ZYNQMP
-	default 0xE0000 if ARCH_ZYNQ
-	help
-	  Offset from the start of the device (or partition)
-
-config ENV_SIZE
-	hex "Environment Size"
-	default 0x40000 if ENV_IS_IN_SPI_FLASH && ARCH_ZYNQMP
-	default 0x8000 if ARCH_ZYNQMP
-	default 0x20000 if ARCH_ZYNQ
-	help
-	  Size of the environment storage area.
-
-config ENV_SECT_SIZE
-	hex "Environment Sector-Size"
-	depends on !ENV_IS_NOWHERE
-	default 0x40000 if ARCH_ZYNQMP
-	default 0x20000 if ARCH_ZYNQ
-	help
-	  Size of the sector containing the environment.
-
-endif
-
 config USE_DEFAULT_ENV_FILE
 	bool "Create default environment from file"
 	help
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 env: Merge Rockchip, Sunxi, Zynq and ZynqMP

Hi,

Quoted 24 lines · Michal Simek

There is no reason to have the same Kconfig options for different SoCs separately. The patch is merging them together.

---

Patch is based on
https://lists.denx.de/pipermail/u-boot/2018-July/335126.html

I have ENV_SECT_SIZE just for zynq/zynqmp because rockchip and sunxi have this in their configs. When they decide to move then can enable that option for them too.
I expect when more platforms extend this we will have less constrain Kconfig setup.

---
 env/Kconfig | 66 ++++++++++++++++---------------------------------------------
 1 file changed, 17 insertions(+), 49 deletions(-)
env/Kconfig +0 -0
index b37dcd78eb75..0ded003d7d41 100644

env/Kconfig config ENV_EXT4_FILE · line 434

Quoted 5 lines
env/Kconfig +1 -1
@@ -431,23 +431,37 @@ config ENV_EXT4_FILE
 	  It's a string of the EXT4 file name. This file use to store the
 	  environment (explicit path to the file)
 
-if ARCH_SUNXI
+if ARCH_ROCKCHIP || ARCH_SUNXI || ARCH_ZYNQ || ARCH_ZYNQMP

Can we have a depends on instead? That would be more flexible.

Quoted 7 lines
env/Kconfig +2 -0
 config ENV_OFFSET
 	hex "Environment Offset"
 	depends on !ENV_IS_IN_UBI
 	depends on !ENV_IS_NOWHERE
+	default 0x3f8000 if ARCH_ROCKCHIP
 	default 0x88000 if ARCH_SUNXI
+	default 0xE0000 if ARCH_ZYNQ

env/Kconfig config ENV_EXT4_FILE · line 450

Quoted 10 lines
env/Kconfig +3 -2
+	default 0x1E00000 if ARCH_ZYNQMP
 	help
 	  Offset from the start of the device (or partition)
 
 config ENV_SIZE
 	hex "Environment Size"
-	depends on !ENV_IS_NOWHERE
-	default 0x20000 if ARCH_SUNXI
+	default 0x8000 if ARCH_ROCKCHIP && !ENV_IS_NOWHERE
+	default 0x20000 if ARCH_SUNXI && !ENV_IS_NOWHERE

I'm not sure why you removed the depends on !ENV_IS_NOWHERE. Do you have a case where the environment is not store anywhere but still need a size?

Thanks!
Maxime

Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180719/d416eb39/attachment.sig>
#2 lore raw

PATCH 1/1 env: Merge Rockchip, Sunxi, Zynq and ZynqMP

Quoted 30 lines · Maxime Ripard

Hi,

Quoted 27 lines · Michal Simek

There is no reason to have the same Kconfig options for different SoCs separately. The patch is merging them together.

---

Patch is based on
https://lists.denx.de/pipermail/u-boot/2018-July/335126.html

I have ENV_SECT_SIZE just for zynq/zynqmp because rockchip and sunxi have this in their configs. When they decide to move then can enable that option for them too.
I expect when more platforms extend this we will have less constrain Kconfig setup.

---
 env/Kconfig | 66 ++++++++++++++++---------------------------------------------
 1 file changed, 17 insertions(+), 49 deletions(-)
env/Kconfig +0 -0
index b37dcd78eb75..0ded003d7d41 100644
@@ -431,23 +431,37 @@ config ENV_EXT4_FILE
 	  It's a string of the EXT4 file name. This file use to store the
 	  environment (explicit path to the file)
 
Quoted 4 lines

env/Kconfig config ENV_EXT4_FILE · line 434

Quoted 2 lines
env/Kconfig +1 -1
-if ARCH_SUNXI
+if ARCH_ROCKCHIP || ARCH_SUNXI || ARCH_ZYNQ || ARCH_ZYNQMP

Can we have a depends on instead? That would be more flexible.

In what sense? If depends is used below then the same 4 platforms will be listed on all options below. (I want to also add ZYNQMP_R5 there too) And changing this in one place seems to me better then on four.

Quoted 11 lines
Quoted 11 lines
env/Kconfig +3 -0
 config ENV_OFFSET
 	hex "Environment Offset"
 	depends on !ENV_IS_IN_UBI
 	depends on !ENV_IS_NOWHERE
+	default 0x3f8000 if ARCH_ROCKCHIP
 	default 0x88000 if ARCH_SUNXI
+	default 0xE0000 if ARCH_ZYNQ
+	default 0x1E00000 if ARCH_ZYNQMP
 	help
 	  Offset from the start of the device (or partition)
 
Quoted 10 lines

env/Kconfig config ENV_EXT4_FILE · line 450

Quoted 6 lines
env/Kconfig +2 -2
 config ENV_SIZE
 	hex "Environment Size"
-	depends on !ENV_IS_NOWHERE
-	default 0x20000 if ARCH_SUNXI
+	default 0x8000 if ARCH_ROCKCHIP && !ENV_IS_NOWHERE
+	default 0x20000 if ARCH_SUNXI && !ENV_IS_NOWHERE

I'm not sure why you removed the depends on !ENV_IS_NOWHERE. Do you have a case where the environment is not store anywhere but still need a size?

yes, I had a compilation warning for that case.

in include/environment.h at line 145 it is written this #define ENV_SIZE (CONFIG_ENV_SIZE - ENV_HEADER_SIZE)

ENV_SIZE is also used in typedef struct environment_s some lines below. And this structure is used a lot.

How did you find out that this can't be used for ENV_IS_NOWHERE?

Thanks,
Michal

#3 lore raw

PATCH 1/1 env: Merge Rockchip, Sunxi, Zynq and ZynqMP

Quoted 31 lines · Michal Simek
Quoted 30 lines · Maxime Ripard

Hi,

Quoted 27 lines · Michal Simek

There is no reason to have the same Kconfig options for different SoCs separately. The patch is merging them together.

---

Patch is based on
https://lists.denx.de/pipermail/u-boot/2018-July/335126.html

I have ENV_SECT_SIZE just for zynq/zynqmp because rockchip and sunxi have this in their configs. When they decide to move then can enable that option for them too.
I expect when more platforms extend this we will have less constrain Kconfig setup.

---
 env/Kconfig | 66 ++++++++++++++++---------------------------------------------
 1 file changed, 17 insertions(+), 49 deletions(-)
env/Kconfig +0 -0
index b37dcd78eb75..0ded003d7d41 100644
@@ -431,23 +431,37 @@ config ENV_EXT4_FILE
 	  It's a string of the EXT4 file name. This file use to store the
 	  environment (explicit path to the file)
 
Quoted 8 lines
Quoted 4 lines

env/Kconfig config ENV_EXT4_FILE · line 434

Quoted 2 lines
env/Kconfig +1 -1
-if ARCH_SUNXI
+if ARCH_ROCKCHIP || ARCH_SUNXI || ARCH_ZYNQ || ARCH_ZYNQMP

Can we have a depends on instead? That would be more flexible.

In what sense? If depends is used below then the same 4 platforms will be listed on all options below. (I want to also add ZYNQMP_R5 there too) And changing this in one place seems to me better then on four.

For now I like the "if" method for now as we can't (or couldn't a while ago) globally migrate everyone over. I think trying to move everyone over again is something I should give another try.

Quoted 24 lines
Quoted 11 lines
Quoted 11 lines
env/Kconfig +3 -0
 config ENV_OFFSET
 	hex "Environment Offset"
 	depends on !ENV_IS_IN_UBI
 	depends on !ENV_IS_NOWHERE
+	default 0x3f8000 if ARCH_ROCKCHIP
 	default 0x88000 if ARCH_SUNXI
+	default 0xE0000 if ARCH_ZYNQ
+	default 0x1E00000 if ARCH_ZYNQMP
 	help
 	  Offset from the start of the device (or partition)
 
Quoted 10 lines

env/Kconfig config ENV_EXT4_FILE · line 450

Quoted 6 lines
env/Kconfig +2 -2
 config ENV_SIZE
 	hex "Environment Size"
-	depends on !ENV_IS_NOWHERE
-	default 0x20000 if ARCH_SUNXI
+	default 0x8000 if ARCH_ROCKCHIP && !ENV_IS_NOWHERE
+	default 0x20000 if ARCH_SUNXI && !ENV_IS_NOWHERE

I'm not sure why you removed the depends on !ENV_IS_NOWHERE. Do you have a case where the environment is not store anywhere but still need a size?

yes, I had a compilation warning for that case.

Quoted 7 lines

in include/environment.h at line 145 it is written this #define ENV_SIZE (CONFIG_ENV_SIZE - ENV_HEADER_SIZE)

ENV_SIZE is also used in typedef struct environment_s some lines below. And this structure is used a lot.

How did you find out that this can't be used for ENV_IS_NOWHERE?

I would have sworn that ENV_SIZE is used for ENV_IS_NOWHERE as that's how much space we have for environment when it's in memory as well.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180719/28a1d927/attachment.sig>
#4 lore raw

PATCH 1/1 env: Merge Rockchip, Sunxi, Zynq and ZynqMP

Quoted 37 lines · Tom Rini
Quoted 36 lines · Michal Simek
Quoted 34 lines · Maxime Ripard

Hi,

Quoted 24 lines · Michal Simek

There is no reason to have the same Kconfig options for different SoCs separately. The patch is merging them together.

---

Patch is based on
https://lists.denx.de/pipermail/u-boot/2018-July/335126.html

I have ENV_SECT_SIZE just for zynq/zynqmp because rockchip and sunxi have this in their configs. When they decide to move then can enable that option for them too.
I expect when more platforms extend this we will have less constrain Kconfig setup.

---
 env/Kconfig | 66 ++++++++++++++++---------------------------------------------
 1 file changed, 17 insertions(+), 49 deletions(-)
env/Kconfig +0 -0
index b37dcd78eb75..0ded003d7d41 100644

env/Kconfig config ENV_EXT4_FILE · line 434

Quoted 5 lines
env/Kconfig +1 -1
@@ -431,23 +431,37 @@ config ENV_EXT4_FILE
 	  It's a string of the EXT4 file name. This file use to store the
 	  environment (explicit path to the file)
 
-if ARCH_SUNXI
+if ARCH_ROCKCHIP || ARCH_SUNXI || ARCH_ZYNQ || ARCH_ZYNQMP

Can we have a depends on instead? That would be more flexible.

Quoted 7 lines
Quoted 3 lines

In what sense? If depends is used below then the same 4 platforms will be listed on all options below. (I want to also add ZYNQMP_R5 there too) And changing this in one place seems to me better then on four.

For now I like the "if" method for now as we can't (or couldn't a while ago) globally migrate everyone over. I think trying to move everyone over again is something I should give another try.

Ack.

Quoted 27 lines
Quoted 27 lines
Quoted 11 lines
Quoted 11 lines
env/Kconfig +3 -0
 config ENV_OFFSET
 	hex "Environment Offset"
 	depends on !ENV_IS_IN_UBI
 	depends on !ENV_IS_NOWHERE
+	default 0x3f8000 if ARCH_ROCKCHIP
 	default 0x88000 if ARCH_SUNXI
+	default 0xE0000 if ARCH_ZYNQ
+	default 0x1E00000 if ARCH_ZYNQMP
 	help
 	  Offset from the start of the device (or partition)
 
Quoted 10 lines

env/Kconfig config ENV_EXT4_FILE · line 450

Quoted 6 lines
env/Kconfig +2 -2
 config ENV_SIZE
 	hex "Environment Size"
-	depends on !ENV_IS_NOWHERE
-	default 0x20000 if ARCH_SUNXI
+	default 0x8000 if ARCH_ROCKCHIP && !ENV_IS_NOWHERE
+	default 0x20000 if ARCH_SUNXI && !ENV_IS_NOWHERE

I'm not sure why you removed the depends on !ENV_IS_NOWHERE. Do you have a case where the environment is not store anywhere but still need a size?

yes, I had a compilation warning for that case.

in include/environment.h at line 145 it is written this #define ENV_SIZE (CONFIG_ENV_SIZE - ENV_HEADER_SIZE)

Quoted 7 lines
Quoted 4 lines

ENV_SIZE is also used in typedef struct environment_s some lines below. And this structure is used a lot.

How did you find out that this can't be used for ENV_IS_NOWHERE?

I would have sworn that ENV_SIZE is used for ENV_IS_NOWHERE as that's how much space we have for environment when it's in memory as well.

Argh, sorry for that I was abused by sunxi-common still having that:
https://git.denx.de/?p=u-boot.git;a=blob;f=include/configs/sunxi-common.h#l161

While i was convinced that we were relying solely on Kconfig. I'll send a subsequent patch, that one works for me.

Sorry,
Maxime

Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180719/5127dc2c/attachment.sig>
#5 lore raw

PATCH 1/1 env: Merge Rockchip, Sunxi, Zynq and ZynqMP

Quoted 80 lines · Maxime Ripard
Quoted 37 lines · Tom Rini
Quoted 36 lines · Michal Simek
Quoted 34 lines · Maxime Ripard

Hi,

Quoted 24 lines · Michal Simek

There is no reason to have the same Kconfig options for different SoCs separately. The patch is merging them together.

---

Patch is based on
https://lists.denx.de/pipermail/u-boot/2018-July/335126.html

I have ENV_SECT_SIZE just for zynq/zynqmp because rockchip and sunxi have this in their configs. When they decide to move then can enable that option for them too.
I expect when more platforms extend this we will have less constrain Kconfig setup.

---
 env/Kconfig | 66 ++++++++++++++++---------------------------------------------
 1 file changed, 17 insertions(+), 49 deletions(-)
env/Kconfig +0 -0
index b37dcd78eb75..0ded003d7d41 100644

env/Kconfig config ENV_EXT4_FILE · line 434

Quoted 5 lines
env/Kconfig +1 -1
@@ -431,23 +431,37 @@ config ENV_EXT4_FILE
 	  It's a string of the EXT4 file name. This file use to store the
 	  environment (explicit path to the file)
 
-if ARCH_SUNXI
+if ARCH_ROCKCHIP || ARCH_SUNXI || ARCH_ZYNQ || ARCH_ZYNQMP

Can we have a depends on instead? That would be more flexible.

Quoted 7 lines
Quoted 3 lines

In what sense? If depends is used below then the same 4 platforms will be listed on all options below. (I want to also add ZYNQMP_R5 there too) And changing this in one place seems to me better then on four.

For now I like the "if" method for now as we can't (or couldn't a while ago) globally migrate everyone over. I think trying to move everyone over again is something I should give another try.

Ack.

Quoted 32 lines
Quoted 31 lines
Quoted 11 lines
Quoted 11 lines
env/Kconfig +3 -0
 config ENV_OFFSET
 	hex "Environment Offset"
 	depends on !ENV_IS_IN_UBI
 	depends on !ENV_IS_NOWHERE
+	default 0x3f8000 if ARCH_ROCKCHIP
 	default 0x88000 if ARCH_SUNXI
+	default 0xE0000 if ARCH_ZYNQ
+	default 0x1E00000 if ARCH_ZYNQMP
 	help
 	  Offset from the start of the device (or partition)
 
Quoted 10 lines

env/Kconfig config ENV_EXT4_FILE · line 450

Quoted 6 lines
env/Kconfig +2 -2
 config ENV_SIZE
 	hex "Environment Size"
-	depends on !ENV_IS_NOWHERE
-	default 0x20000 if ARCH_SUNXI
+	default 0x8000 if ARCH_ROCKCHIP && !ENV_IS_NOWHERE
+	default 0x20000 if ARCH_SUNXI && !ENV_IS_NOWHERE

I'm not sure why you removed the depends on !ENV_IS_NOWHERE. Do you have a case where the environment is not store anywhere but still need a size?

yes, I had a compilation warning for that case.

in include/environment.h at line 145 it is written this #define ENV_SIZE (CONFIG_ENV_SIZE - ENV_HEADER_SIZE)

ENV_SIZE is also used in typedef struct environment_s some lines below. And this structure is used a lot.

How did you find out that this can't be used for ENV_IS_NOWHERE?

Quoted 8 lines
Quoted 2 lines

I would have sworn that ENV_SIZE is used for ENV_IS_NOWHERE as that's how much space we have for environment when it's in memory as well.

Argh, sorry for that I was abused by sunxi-common still having that:
https://git.denx.de/?p=u-boot.git;a=blob;f=include/configs/sunxi-common.h#l161

While i was convinced that we were relying solely on Kconfig. I'll send a subsequent patch, that one works for me.

Ok. Can you please convert this to any official tag which I can include?

Thanks,
Michal

#6 lore raw

PATCH 1/1 env: Merge Rockchip, Sunxi, Zynq and ZynqMP

Quoted 84 lines · Michal Simek
Quoted 83 lines · Maxime Ripard
Quoted 37 lines · Tom Rini
Quoted 36 lines · Michal Simek
Quoted 34 lines · Maxime Ripard

Hi,

Quoted 24 lines · Michal Simek

There is no reason to have the same Kconfig options for different SoCs separately. The patch is merging them together.

---

Patch is based on
https://lists.denx.de/pipermail/u-boot/2018-July/335126.html

I have ENV_SECT_SIZE just for zynq/zynqmp because rockchip and sunxi have this in their configs. When they decide to move then can enable that option for them too.
I expect when more platforms extend this we will have less constrain Kconfig setup.

---
 env/Kconfig | 66 ++++++++++++++++---------------------------------------------
 1 file changed, 17 insertions(+), 49 deletions(-)
env/Kconfig +0 -0
index b37dcd78eb75..0ded003d7d41 100644

env/Kconfig config ENV_EXT4_FILE · line 434

Quoted 5 lines
env/Kconfig +1 -1
@@ -431,23 +431,37 @@ config ENV_EXT4_FILE
 	  It's a string of the EXT4 file name. This file use to store the
 	  environment (explicit path to the file)
 
-if ARCH_SUNXI
+if ARCH_ROCKCHIP || ARCH_SUNXI || ARCH_ZYNQ || ARCH_ZYNQMP

Can we have a depends on instead? That would be more flexible.

Quoted 7 lines
Quoted 3 lines

In what sense? If depends is used below then the same 4 platforms will be listed on all options below. (I want to also add ZYNQMP_R5 there too) And changing this in one place seems to me better then on four.

For now I like the "if" method for now as we can't (or couldn't a while ago) globally migrate everyone over. I think trying to move everyone over again is something I should give another try.

Ack.

Quoted 34 lines
Quoted 24 lines
Quoted 11 lines
Quoted 11 lines
env/Kconfig +3 -0
 config ENV_OFFSET
 	hex "Environment Offset"
 	depends on !ENV_IS_IN_UBI
 	depends on !ENV_IS_NOWHERE
+	default 0x3f8000 if ARCH_ROCKCHIP
 	default 0x88000 if ARCH_SUNXI
+	default 0xE0000 if ARCH_ZYNQ
+	default 0x1E00000 if ARCH_ZYNQMP
 	help
 	  Offset from the start of the device (or partition)
 
Quoted 10 lines

env/Kconfig config ENV_EXT4_FILE · line 450

Quoted 6 lines
env/Kconfig +2 -2
 config ENV_SIZE
 	hex "Environment Size"
-	depends on !ENV_IS_NOWHERE
-	default 0x20000 if ARCH_SUNXI
+	default 0x8000 if ARCH_ROCKCHIP && !ENV_IS_NOWHERE
+	default 0x20000 if ARCH_SUNXI && !ENV_IS_NOWHERE

I'm not sure why you removed the depends on !ENV_IS_NOWHERE. Do you have a case where the environment is not store anywhere but still need a size?

yes, I had a compilation warning for that case.

Quoted 7 lines

in include/environment.h at line 145 it is written this #define ENV_SIZE (CONFIG_ENV_SIZE - ENV_HEADER_SIZE)

ENV_SIZE is also used in typedef struct environment_s some lines below. And this structure is used a lot.

How did you find out that this can't be used for ENV_IS_NOWHERE?

I would have sworn that ENV_SIZE is used for ENV_IS_NOWHERE as that's how much space we have for environment when it's in memory as well.

Quoted 7 lines
Quoted 5 lines

Argh, sorry for that I was abused by sunxi-common still having that:
https://git.denx.de/?p=u-boot.git;a=blob;f=include/configs/sunxi-common.h#l161

While i was convinced that we were relying solely on Kconfig. I'll send a subsequent patch, that one works for me.

Ok. Can you please convert this to any official tag which I can include?

Maxime

Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180720/4f8127ef/attachment.sig>
#7 lore raw
In reply to Michal Simek
Quoted 5 lines · Michal Simek

There is no reason to have the same Kconfig options for different SoCs separately. The patch is merging them together.

After doing a little work around the ENV_IS_NOWHERE parts and size-testing, applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180819/975ff2a2/attachment-0001.sig>
#8 lore raw
Quoted 10 lines · Tom Rini
Quoted 5 lines · Michal Simek

There is no reason to have the same Kconfig options for different SoCs separately. The patch is merging them together.

After doing a little work around the ENV_IS_NOWHERE parts and size-testing, applied to u-boot/master, thanks!

I expect you forget to push.

Thanks,
Michal

#9 lore raw
Quoted 6 lines · Michal Simek
Quoted 5 lines · Tom Rini
Quoted 3 lines · Michal Simek

There is no reason to have the same Kconfig options for different SoCs separately. The patch is merging them together.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

After doing a little work around the ENV_IS_NOWHERE parts and size-testing, applied to u-boot/master, thanks!

I expect you forget to push.

Sadly the sync out to the public side of git.denx.de is lagging behind again.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180820/75a3448b/attachment.sig>