Skip to contentSkip to conversation

spl: arm: Make sure to include u_boot_list_*_part_disk_*

PATCH Superseded Tom Rini 2 participants 3 messages Mar 16, 2016

Subsystems (4)
lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH v3 1/1 spl: arm: Make sure to include u_boot_list_*_part_disk_*

Starting with 96e5b03 we use a linker list for partition table information. However since we use this in SPL we need to make sure that the SPL linker scripts include these as well. While doing this, it's best to simply include all linker lists to future proof ourselves.

---
Changes in v3:
- Rework things again, after some testing we don't need to worry about including empty lists, the linker doesn't waste binary space. Also update the at91 linker lists and build time confirm that they were also broken by the opening commit.
Changes in v2:
- Drop the CONFIG_SPL_DM tests for zynq as DM is the only case for zynq and while in here drop a now useless line.

---
 arch/arm/cpu/armv7/omap-common/u-boot-spl.lds |    2 +-
 arch/arm/cpu/u-boot-spl.lds                   |    9 +--------
 arch/arm/mach-at91/arm926ejs/u-boot-spl.lds   |    3 +++
 arch/arm/mach-at91/armv7/u-boot-spl.lds       |    3 +++
 arch/arm/mach-zynq/u-boot-spl.lds             |    7 +------
 5 files changed, 9 insertions(+), 15 deletions(-)
arch/arm/cpu/armv7/omap-common/u-boot-spl.lds +1 -1
index ccd0c83..8fec715 100644
@@ -35,7 +35,7 @@ SECTIONS
 
 	. = ALIGN(4);
 	.u_boot_list : {
-		KEEP(*(SORT(.u_boot_list*_i2c_*)));
+		KEEP(*(SORT(.u_boot_list*)));
 	} >.sram
 
 	. = ALIGN(4);
arch/arm/cpu/u-boot-spl.lds +1 -8
index c5b4f7c..068163b 100644
@@ -32,15 +32,8 @@ SECTIONS
 	}
 
 	. = ALIGN(4);
-#ifdef CONFIG_SPL_DM
 	.u_boot_list : {
-		KEEP(*(SORT(.u_boot_list_*_driver_*)));
-		KEEP(*(SORT(.u_boot_list_*_uclass_*)));
-	}
-#endif
-	. = .;
-	.u_boot_list : {
-		KEEP(*(SORT(.u_boot_list*_i2c_*)));
+		KEEP(*(SORT(.u_boot_list*)));
 	}
 
 	. = ALIGN(4);
arch/arm/mach-at91/arm926ejs/u-boot-spl.lds +3 -0
index acadd1d..1b04206 100644
@@ -30,6 +30,9 @@ SECTIONS
 	.data : { *(SORT_BY_ALIGNMENT(.data*)) } >.sram
 
 	. = ALIGN(4);
+	.u_boot_list : { KEEP(*(SORT(.u_boot_list*))) } > .sram
+
+	. = ALIGN(4);
 	__image_copy_end = .;
 
 	.end :
arch/arm/mach-at91/armv7/u-boot-spl.lds +3 -0
index eccca43..c667c55 100644
@@ -37,6 +37,9 @@ SECTIONS
 	.data : { *(SORT_BY_ALIGNMENT(.data*)) } >.sram
 
 	. = ALIGN(4);
+	.u_boot_list : { KEEP(*(SORT(.u_boot_list*))) } > .sram
+
+	. = ALIGN(4);
 	__image_copy_end = .;
 
 	.end :
arch/arm/mach-zynq/u-boot-spl.lds +1 -6
index ecdf6a0..9a59164 100644
@@ -38,16 +38,11 @@ SECTIONS
 	} > .sram
 
 	. = ALIGN(4);
-#ifdef CONFIG_SPL_DM
 	.u_boot_list : {
-		KEEP(*(SORT(.u_boot_list_*_driver_*)));
-		KEEP(*(SORT(.u_boot_list_*_uclass_*)));
+		KEEP(*(SORT(.u_boot_list*)));
 	} > .sram
 
 	. = ALIGN(4);
-#endif
-
-	. = .;
 
 	_image_binary_end = .;
 
Signature · 1 line
1.7.9.5
author
#1 lore raw

PATCH v3 1/1 spl: arm: Make sure to include u_boot_list_*_part_disk_*

Quoted 4 lines · Tom Rini

Starting with 96e5b03 we use a linker list for partition table information. However since we use this in SPL we need to make sure that the SPL linker scripts include these as well. While doing this, it's best to simply include all linker lists to future proof ourselves.

... and yes, I need to update the commit subject, oops.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160315/5394a5cf/attachment.sig>
#2 lore raw

PATCH v3 1/1 spl: arm: Make sure to include u_boot_list_*_part_disk_*

In reply to Tom Rini
Quoted 103 lines · Tom Rini

Starting with 96e5b03 we use a linker list for partition table information. However since we use this in SPL we need to make sure that the SPL linker scripts include these as well. While doing this, it's best to simply include all linker lists to future proof ourselves.

---
Changes in v3:
- Rework things again, after some testing we don't need to worry about including empty lists, the linker doesn't waste binary space. Also update the at91 linker lists and build time confirm that they were also broken by the opening commit.
Changes in v2:
- Drop the CONFIG_SPL_DM tests for zynq as DM is the only case for zynq and while in here drop a now useless line.

---
 arch/arm/cpu/armv7/omap-common/u-boot-spl.lds |    2 +-
 arch/arm/cpu/u-boot-spl.lds                   |    9 +--------
 arch/arm/mach-at91/arm926ejs/u-boot-spl.lds   |    3 +++
 arch/arm/mach-at91/armv7/u-boot-spl.lds       |    3 +++
 arch/arm/mach-zynq/u-boot-spl.lds             |    7 +------
 5 files changed, 9 insertions(+), 15 deletions(-)
arch/arm/cpu/armv7/omap-common/u-boot-spl.lds +1 -1
index ccd0c83..8fec715 100644
@@ -35,7 +35,7 @@ SECTIONS
 
 	. = ALIGN(4);
 	.u_boot_list : {
-		KEEP(*(SORT(.u_boot_list*_i2c_*)));
+		KEEP(*(SORT(.u_boot_list*)));
 	} >.sram
 
 	. = ALIGN(4);
arch/arm/cpu/u-boot-spl.lds +1 -8
index c5b4f7c..068163b 100644
@@ -32,15 +32,8 @@ SECTIONS
 	}
 
 	. = ALIGN(4);
-#ifdef CONFIG_SPL_DM
 	.u_boot_list : {
-		KEEP(*(SORT(.u_boot_list_*_driver_*)));
-		KEEP(*(SORT(.u_boot_list_*_uclass_*)));
-	}
-#endif
-	. = .;
-	.u_boot_list : {
-		KEEP(*(SORT(.u_boot_list*_i2c_*)));
+		KEEP(*(SORT(.u_boot_list*)));
 	}
 
 	. = ALIGN(4);
arch/arm/mach-at91/arm926ejs/u-boot-spl.lds +3 -0
index acadd1d..1b04206 100644
@@ -30,6 +30,9 @@ SECTIONS
 	.data : { *(SORT_BY_ALIGNMENT(.data*)) } >.sram
 
 	. = ALIGN(4);
+	.u_boot_list : { KEEP(*(SORT(.u_boot_list*))) } > .sram
+
+	. = ALIGN(4);
 	__image_copy_end = .;
 
 	.end :
arch/arm/mach-at91/armv7/u-boot-spl.lds +3 -0
index eccca43..c667c55 100644
@@ -37,6 +37,9 @@ SECTIONS
 	.data : { *(SORT_BY_ALIGNMENT(.data*)) } >.sram
 
 	. = ALIGN(4);
+	.u_boot_list : { KEEP(*(SORT(.u_boot_list*))) } > .sram
+
+	. = ALIGN(4);
 	__image_copy_end = .;
 
 	.end :
arch/arm/mach-zynq/u-boot-spl.lds +0 -3
index ecdf6a0..9a59164 100644
@@ -38,16 +38,11 @@ SECTIONS
 	} > .sram
 
 	. = ALIGN(4);
-#ifdef CONFIG_SPL_DM
 	.u_boot_list : {
-		KEEP(*(SORT(.u_boot_list_*_driver_*)));
-		KEEP(*(SORT(.u_boot_list_*_uclass_*)));

arch/arm/mach-zynq/u-boot-spl.lds SECTIONS · line 48

Quoted 10 lines
arch/arm/mach-zynq/u-boot-spl.lds +1 -3
+		KEEP(*(SORT(.u_boot_list*)));
 	} > .sram
 
 	. = ALIGN(4);
-#endif
-
-	. = .;
 
 	_image_binary_end = .;
 

For Zynq size didn't change which is good sign. When you change that commit message feel free to add my

Thanks,
Michal