mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/4] arm: boards: phytec-som-am335x: Add bootchooser support
@ 2019-01-07  8:17 Teresa Remmet
  2019-01-07  8:17 ` [PATCH 1/4] ARM: configs: omap_defconfig: Add bootchooser Teresa Remmet
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Teresa Remmet @ 2019-01-07  8:17 UTC (permalink / raw)
  To: barebox

Hello,

this patchstack from Daniel adds bootchooser support to phytec am335x boards.
I updated the patchstack to a more recent barebox version and added some small fixes.

Teresa

Daniel Schultz (4):
  ARM: configs: omap_defconfig: Add bootchooser
  ARM: dts: am335x-phytec-state: Reduce partition size
  ARM: dts: am335x-phytec-state: Add state partition for bootchooser
  arm: boards: phytec-som-am335x: Add bootchooser to bootsource

 .../defaultenv-physom-am335x/init/bootsource       |  8 +--
 arch/arm/configs/omap_defconfig                    |  2 +
 arch/arm/dts/am335x-phytec-state.dtsi              | 59 ++++++++++++++++++++--
 3 files changed, 62 insertions(+), 7 deletions(-)

-- 
2.7.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/4] ARM: configs: omap_defconfig: Add bootchooser
  2019-01-07  8:17 [PATCH 0/4] arm: boards: phytec-som-am335x: Add bootchooser support Teresa Remmet
@ 2019-01-07  8:17 ` Teresa Remmet
  2019-01-07  8:17 ` [PATCH 2/4] ARM: dts: am335x-phytec-state: Reduce partition size Teresa Remmet
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Teresa Remmet @ 2019-01-07  8:17 UTC (permalink / raw)
  To: barebox

From: Daniel Schultz <d.schultz@phytec.de>

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
---
 arch/arm/configs/omap_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/configs/omap_defconfig b/arch/arm/configs/omap_defconfig
index e41757b9190b..128027a6406b 100644
--- a/arch/arm/configs/omap_defconfig
+++ b/arch/arm/configs/omap_defconfig
@@ -32,6 +32,7 @@ CONFIG_BLSPEC=y
 CONFIG_CONSOLE_ACTIVATE_NONE=y
 CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y
 CONFIG_STATE=y
+CONFIG_BOOTCHOOSER=y
 CONFIG_RESET_SOURCE=y
 CONFIG_DEBUG_INFO=y
 CONFIG_LONGHELP=y
@@ -92,6 +93,7 @@ CONFIG_CMD_OF_FIXUP_STATUS=y
 CONFIG_CMD_OFTREE=y
 CONFIG_CMD_TIME=y
 CONFIG_CMD_STATE=y
+CONFIG_CMD_BOOTCHOOSER=y
 CONFIG_NET=y
 CONFIG_NET_NFS=y
 CONFIG_NET_NETCONSOLE=y
-- 
2.7.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/4] ARM: dts: am335x-phytec-state: Reduce partition size
  2019-01-07  8:17 [PATCH 0/4] arm: boards: phytec-som-am335x: Add bootchooser support Teresa Remmet
  2019-01-07  8:17 ` [PATCH 1/4] ARM: configs: omap_defconfig: Add bootchooser Teresa Remmet
@ 2019-01-07  8:17 ` Teresa Remmet
  2019-01-07  8:17 ` [PATCH 3/4] ARM: dts: am335x-phytec-state: Add state partition for bootchooser Teresa Remmet
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Teresa Remmet @ 2019-01-07  8:17 UTC (permalink / raw)
  To: barebox

From: Daniel Schultz <d.schultz@phytec.de>

Partition size was not calculated correct. Set the correct size.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
---
 arch/arm/dts/am335x-phytec-state.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/dts/am335x-phytec-state.dtsi b/arch/arm/dts/am335x-phytec-state.dtsi
index 6bca59715901..d332abe4b9b7 100644
--- a/arch/arm/dts/am335x-phytec-state.dtsi
+++ b/arch/arm/dts/am335x-phytec-state.dtsi
@@ -46,7 +46,7 @@
 		#size-cells = <1>;
 		#address-cells = <1>;
 		backend_state_eeprom: state@0 {
-			reg = <0x000 0x120>;
+			reg = <0x000 0x100>;
 			label = "state-eeprom";
 		};
 	};
-- 
2.7.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 3/4] ARM: dts: am335x-phytec-state: Add state partition for bootchooser
  2019-01-07  8:17 [PATCH 0/4] arm: boards: phytec-som-am335x: Add bootchooser support Teresa Remmet
  2019-01-07  8:17 ` [PATCH 1/4] ARM: configs: omap_defconfig: Add bootchooser Teresa Remmet
  2019-01-07  8:17 ` [PATCH 2/4] ARM: dts: am335x-phytec-state: Reduce partition size Teresa Remmet
@ 2019-01-07  8:17 ` Teresa Remmet
  2019-01-07  8:17 ` [PATCH 4/4] arm: boards: phytec-som-am335x: Add bootchooser to bootsource Teresa Remmet
  2019-01-08  7:37 ` [PATCH 0/4] arm: boards: phytec-som-am335x: Add bootchooser support Sascha Hauer
  4 siblings, 0 replies; 6+ messages in thread
From: Teresa Remmet @ 2019-01-07  8:17 UTC (permalink / raw)
  To: barebox

From: Daniel Schultz <d.schultz@phytec.de>

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
---
 arch/arm/dts/am335x-phytec-state.dtsi | 57 +++++++++++++++++++++++++++++++++--
 1 file changed, 55 insertions(+), 2 deletions(-)

diff --git a/arch/arm/dts/am335x-phytec-state.dtsi b/arch/arm/dts/am335x-phytec-state.dtsi
index d332abe4b9b7..1f61cf5a2e6c 100644
--- a/arch/arm/dts/am335x-phytec-state.dtsi
+++ b/arch/arm/dts/am335x-phytec-state.dtsi
@@ -15,13 +15,14 @@
 / {
 	aliases {
 		am335x_phytec_mac_state = &am335x_phytec_mac_state;
+		state = &am335x_phytec_boot_state;
 	};
 
 	am335x_phytec_mac_state: am335x_phytec_mac_state {
 		magic = <0x3f45620e>;
 		compatible = "barebox,state";
 		backend-type = "raw";
-		backend = <&backend_state_eeprom>;
+		backend = <&backend_state_mac_eeprom>;
 		backend-stridesize = <40>;
 		keep-previous-content;
 
@@ -37,6 +38,54 @@
 		};
 
 	};
+
+	am335x_phytec_boot_state: am335x_phytec_boot_state {
+		magic = <0x883b86a6>;
+		compatible = "barebox,state";
+		backend-type = "raw";
+		backend = <&backend_state_update_eeprom>;
+		backend-stridesize = <54>;
+		keep-previous-content;
+
+		#address-cells = <1>;
+		#size-cells = <1>;
+		bootstate {
+			#address-cells = <1>;
+			#size-cells = <1>;
+			last_chosen {
+				reg = <0x0 0x4>;
+				type = "uint32";
+			};
+			system0 {
+				#address-cells = <1>;
+				#size-cells = <1>;
+				remaining_attempts {
+					reg = <0x4 0x4>;
+					type = "uint32";
+					default = <3>;
+				};
+				priority {
+					reg = <0x8 0x4>;
+					type = "uint32";
+					default = <21>;
+				};
+			};
+			system1 {
+				#address-cells = <1>;
+				#size-cells = <1>;
+				remaining_attempts {
+					reg = <0x10 0x4>;
+					type = "uint32";
+					default = <3>;
+				};
+				priority {
+					reg = <0x14 0x4>;
+					type = "uint32";
+					default = <20>;
+				};
+			};
+		};
+	};
 };
 
 &eeprom {
@@ -45,9 +94,13 @@
 		compatible = "fixed-partitions";
 		#size-cells = <1>;
 		#address-cells = <1>;
-		backend_state_eeprom: state@0 {
+		backend_state_mac_eeprom: state@0 {
 			reg = <0x000 0x100>;
 			label = "state-eeprom";
 		};
+		backend_state_update_eeprom: state@100 {
+			reg = <0x100 0x150>;
+			label = "update-eeprom";
+		};
 	};
 };
-- 
2.7.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 4/4] arm: boards: phytec-som-am335x: Add bootchooser to bootsource
  2019-01-07  8:17 [PATCH 0/4] arm: boards: phytec-som-am335x: Add bootchooser support Teresa Remmet
                   ` (2 preceding siblings ...)
  2019-01-07  8:17 ` [PATCH 3/4] ARM: dts: am335x-phytec-state: Add state partition for bootchooser Teresa Remmet
@ 2019-01-07  8:17 ` Teresa Remmet
  2019-01-08  7:37 ` [PATCH 0/4] arm: boards: phytec-som-am335x: Add bootchooser support Sascha Hauer
  4 siblings, 0 replies; 6+ messages in thread
From: Teresa Remmet @ 2019-01-07  8:17 UTC (permalink / raw)
  To: barebox

From: Daniel Schultz <d.schultz@phytec.de>

Add bootchooser as primary boot source for NAND and eMMC.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
---
 .../phytec-som-am335x/defaultenv-physom-am335x/init/bootsource    | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/init/bootsource b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/init/bootsource
index 61a0879bfb7f..75b5619218c5 100644
--- a/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/init/bootsource
+++ b/arch/arm/boards/phytec-som-am335x/defaultenv-physom-am335x/init/bootsource
@@ -11,13 +11,13 @@ else
 fi
 
 if [ $bootsource = mmc -a $bootsource_instance = 1 ]; then
-	global.boot.default="emmc mmc spi net"
+	global.boot.default="bootchooser emmc mmc spi net"
 elif [ $bootsource = mmc -a $bootsource_instance = 0 ]; then
 	global.boot.default="mmc $nvmem spi net"
 elif [ $bootsource = nand ]; then
-	global.boot.default="nand spi mmc net"
+	global.boot.default="bootchooser nand spi mmc net"
 elif [ $bootsource = spi ]; then
-	global.boot.default="spi $nvmem mmc net"
+	global.boot.default="spi bootchooser $nvmem mmc net"
 elif [ $bootsource = net ]; then
-	global.boot.default="net $nvmem spi mmc"
+	global.boot.default="net bootchooser $nvmem spi mmc"
 fi
-- 
2.7.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/4] arm: boards: phytec-som-am335x: Add bootchooser support
  2019-01-07  8:17 [PATCH 0/4] arm: boards: phytec-som-am335x: Add bootchooser support Teresa Remmet
                   ` (3 preceding siblings ...)
  2019-01-07  8:17 ` [PATCH 4/4] arm: boards: phytec-som-am335x: Add bootchooser to bootsource Teresa Remmet
@ 2019-01-08  7:37 ` Sascha Hauer
  4 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2019-01-08  7:37 UTC (permalink / raw)
  To: Teresa Remmet; +Cc: barebox

On Mon, Jan 07, 2019 at 09:17:05AM +0100, Teresa Remmet wrote:
> Hello,
> 
> this patchstack from Daniel adds bootchooser support to phytec am335x boards.
> I updated the patchstack to a more recent barebox version and added some small fixes.
> 
> Teresa
> 
> Daniel Schultz (4):
>   ARM: configs: omap_defconfig: Add bootchooser
>   ARM: dts: am335x-phytec-state: Reduce partition size
>   ARM: dts: am335x-phytec-state: Add state partition for bootchooser
>   arm: boards: phytec-som-am335x: Add bootchooser to bootsource

Applied, thanks

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-01-08  7:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-07  8:17 [PATCH 0/4] arm: boards: phytec-som-am335x: Add bootchooser support Teresa Remmet
2019-01-07  8:17 ` [PATCH 1/4] ARM: configs: omap_defconfig: Add bootchooser Teresa Remmet
2019-01-07  8:17 ` [PATCH 2/4] ARM: dts: am335x-phytec-state: Reduce partition size Teresa Remmet
2019-01-07  8:17 ` [PATCH 3/4] ARM: dts: am335x-phytec-state: Add state partition for bootchooser Teresa Remmet
2019-01-07  8:17 ` [PATCH 4/4] arm: boards: phytec-som-am335x: Add bootchooser to bootsource Teresa Remmet
2019-01-08  7:37 ` [PATCH 0/4] arm: boards: phytec-som-am335x: Add bootchooser support Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox