Skip to contentSkip to conversation

spl: MMC U-Boot image load from raw partition

PATCH New Paul Kocialkowski 3 participants 16 messages Nov 8, 2014 – Dec 8, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover spl: MMC U-Boot image load from raw partition

This is a first attempt at adding support for U-Boot image load from raw partitions. It does not support OS boot as I cannot test it on my current setup.

This is going to be useful for the Optimus Black port (please do not consider this as dead code because no board is using it right now, there will be one soon)! On the Optimus Black, the second stage bootloader (U-Boot in our case) is stored on the second partition of the internal EMMC. This patch allows reading from that partition without the need of providing the U-Boot config with a sector address, but with the partition address.

It makes sense as there is already code to read partition tables, so it would be a shame to hardcode the sector address while it can be obtained dynamically.

#1 lore raw

PATCH 1/2 MMC SD fs boot partition config coding style and proper description

CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION ought to be called CONFIG_SYS_MMCSD_FS_BOOT_PARTITION to keep it consistent with other config options such as: CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR.

In addition, it is not related to raw mode booting but to fs mode instead.

---
 README                                 |    7 +++++--
 common/spl/spl_mmc.c                   |    8 ++++----
 include/configs/am3517_crane.h         |    2 +-
 include/configs/am3517_evm.h           |    2 +-
 include/configs/cm_t35.h               |    2 +-
 include/configs/devkit8000.h           |    2 +-
 include/configs/imx6_spl.h             |    2 +-
 include/configs/mcx.h                  |    2 +-
 include/configs/omap3_evm.h            |    2 +-
 include/configs/omap3_evm_quick_mmc.h  |    2 +-
 include/configs/sama5d3_xplained.h     |    2 +-
 include/configs/sama5d3xek.h           |    2 +-
 include/configs/siemens-am33x-common.h |    2 +-
 include/configs/tao3530.h              |    2 +-
 include/configs/ti814x_evm.h           |    2 +-
 include/configs/ti816x_evm.h           |    2 +-
 include/configs/ti_armv7_common.h      |    2 +-
 include/configs/tricorder.h            |    2 +-
 include/configs/zynq-common.h          |    2 +-
 19 files changed, 26 insertions(+), 23 deletions(-)
README +5 -2
index 7b5538e..0b5fad9 100644
@@ -3547,8 +3547,7 @@ FIT uImage format:
 
 		CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR,
 		CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS,
-		CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION
-		Address, size and partition on the MMC to load U-Boot from
+		Address and partition on the MMC to load U-Boot from
 		when the MMC is being used in raw mode.
 
 		CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR
@@ -3561,6 +3560,10 @@ FIT uImage format:
 		parameters from when MMC is being used in raw mode
 		(for falcon mode)
 
+		CONFIG_SYS_MMCSD_FS_BOOT_PARTITION
+		Partition on the MMC to load U-Boot from when the MMC is being
+		used in fs mode
+
 		CONFIG_SPL_FAT_SUPPORT
 		Support for fs/fat/libfat.o in SPL binary
 
common/spl/spl_mmc.c +4 -4
index ee71f79..f9c3851 100644
@@ -106,10 +106,10 @@ void spl_mmc_load_image(void)
 #ifdef CONFIG_SPL_FAT_SUPPORT
 #ifdef CONFIG_SPL_OS_BOOT
 		if (spl_start_uboot() || spl_load_image_fat_os(&mmc->block_dev,
-								CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION))
+								CONFIG_SYS_MMCSD_FS_BOOT_PARTITION))
 #endif
 		err = spl_load_image_fat(&mmc->block_dev,
-					CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION,
+					CONFIG_SYS_MMCSD_FS_BOOT_PARTITION,
 					CONFIG_SPL_FS_LOAD_PAYLOAD_NAME);
 		if(err)
 #endif /* CONFIG_SPL_FAT_SUPPORT */
@@ -117,10 +117,10 @@ void spl_mmc_load_image(void)
 #ifdef CONFIG_SPL_EXT_SUPPORT
 #ifdef CONFIG_SPL_OS_BOOT
 		if (spl_start_uboot() || spl_load_image_ext_os(&mmc->block_dev,
-								CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION))
+								CONFIG_SYS_MMCSD_FS_BOOT_PARTITION))
 #endif
 		err = spl_load_image_ext(&mmc->block_dev,
-					CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION,
+					CONFIG_SYS_MMCSD_FS_BOOT_PARTITION,
 					CONFIG_SPL_FS_LOAD_PAYLOAD_NAME);
 #endif /* CONFIG_SPL_EXT_SUPPORT */
 		}
include/configs/am3517_crane.h +1 -1
index 0fbfa3f..09ee10c 100644
@@ -304,7 +304,7 @@
 
 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR	0x300 /* address 0x60000 */
 #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS	0x200 /* 256 KB */
-#define CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION	1
+#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION	1
 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME	"u-boot.img"
 
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
include/configs/am3517_evm.h +1 -1
index 8719f76..190ef0e 100644
@@ -313,7 +313,7 @@
 
 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR	0x300 /* address 0x60000 */
 #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS	0x200 /* 256 KB */
-#define CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION	1
+#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION	1
 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME	"u-boot.img"
 
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
include/configs/cm_t35.h +1 -1
index 1919cde..ccd9b88 100644
@@ -321,7 +321,7 @@
 
 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR	0x300 /* address 0x60000 */
 #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS	0x200 /* 256 KB */
-#define CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION	1
+#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION	1
 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME	"u-boot.img"
 
 #define CONFIG_SPL_BOARD_INIT
include/configs/devkit8000.h +1 -1
index ca62461..930b08e 100644
@@ -299,7 +299,7 @@
 #define CONFIG_SPL_FAT_SUPPORT
 #define CONFIG_SPL_LDSCRIPT		"$(CPUDIR)/omap-common/u-boot-spl.lds"
 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME        "u-boot.img"
-#define CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION    1
+#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION     1
 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */
 
 #define CONFIG_SPL_TEXT_BASE		0x40200000 /*CONFIG_SYS_SRAM_START*/
include/configs/imx6_spl.h +1 -1
index 308e520..8c3eff1 100644
@@ -46,7 +46,7 @@
 #if defined(CONFIG_SPL_MMC_SUPPORT)
 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR	138 /* offset 69KB */
 #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS	800 /* 400 KB */
-#define CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION	1
+#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION	1
 #define CONFIG_SYS_MONITOR_LEN  (CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS/2*1024)
 #endif
 
include/configs/mcx.h +1 -1
index b775ebd..26eb220 100644
@@ -369,7 +369,7 @@
 #define CONFIG_SPL_BSS_MAX_SIZE		0x80000
 
 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR	0x300 /* address 0x60000 */
-#define CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION	1
+#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION	1
 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME	"u-boot.img"
 
 /* NAND boot config */
include/configs/omap3_evm.h +1 -1
index 27bf89c..8bdc08f 100644
@@ -75,7 +75,7 @@
 #define CONFIG_SPL_FAT_SUPPORT
 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR	0x300 /* address 0x60000 */
 #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS	0x200 /* 256 KB */
-#define CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION	1
+#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION	1
 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME	"u-boot.img"
 
 /* Partition tables */
include/configs/omap3_evm_quick_mmc.h +1 -1
index 2daf13c..1185f42 100644
@@ -87,7 +87,7 @@
 #define CONFIG_SPL_FAT_SUPPORT
 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR	0x300 /* address 0x60000 */
 #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS	0x200 /* 256 KB */
-#define CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION	1
+#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION	1
 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME	"u-boot.img"
 
 #endif /* __OMAP3_EVM_QUICK_MMC_H */
include/configs/sama5d3_xplained.h +1 -1
index 5b77db2..d5588b1 100644
@@ -230,7 +230,7 @@
 #define CONFIG_SPL_MMC_SUPPORT
 #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS	0x400
 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x200
-#define CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION	1
+#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION	1
 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME	"u-boot.img"
 #define CONFIG_SPL_FAT_SUPPORT
 #define CONFIG_SPL_LIBDISK_SUPPORT
include/configs/sama5d3xek.h +1 -1
index dfbf3cb..f2849d7 100644
@@ -276,7 +276,7 @@
 #define CONFIG_SPL_MMC_SUPPORT
 #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS	0x400
 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x200
-#define CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION	1
+#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION	1
 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME	"u-boot.img"
 #define CONFIG_SPL_FAT_SUPPORT
 #define CONFIG_SPL_LIBDISK_SUPPORT
include/configs/siemens-am33x-common.h +1 -1
index 0d5dba1..21e13e5 100644
@@ -148,7 +148,7 @@
 #define CONFIG_SPL_BSS_MAX_SIZE		0x80000		/* 512 KB */
 
 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR	0x300 /* address 0x60000 */
-#define CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION	1
+#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION	1
 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME	"u-boot.img"
 #define CONFIG_SPL_MMC_SUPPORT
 #define CONFIG_SPL_FAT_SUPPORT
include/configs/tao3530.h +1 -1
index d687717..139be0b 100644
@@ -305,7 +305,7 @@
 
 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR	0x300 /* address 0x60000 */
 #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS	0x200 /* 256 KB */
-#define CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION	1
+#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION	1
 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME	"u-boot.img"
 
 #define CONFIG_SPL_BOARD_INIT
include/configs/ti814x_evm.h +1 -1
index 2fddef3..deb6bb2 100644
@@ -178,7 +178,7 @@
 
 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */
 #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS      0x200 /* 256 KB */
-#define CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION    1
+#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION     1
 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME        "u-boot.img"
 #define CONFIG_SPL_MMC_SUPPORT
 #define CONFIG_SPL_FAT_SUPPORT
include/configs/ti816x_evm.h +1 -1
index aeabb1b..87a4efc 100644
@@ -144,7 +144,7 @@
 
 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */
 #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS      0x200 /* 256 KB */
-#define CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION    1
+#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION     1
 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME        "u-boot.img"
 #define CONFIG_SPL_MMC_SUPPORT
 #define CONFIG_SPL_FAT_SUPPORT
include/configs/ti_armv7_common.h +1 -1
index a8790c2..bc75172 100644
@@ -233,7 +233,7 @@
 #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS	0x200 /* 256 KB */
 
 /* FAT sd card locations. */
-#define CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION	1
+#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION	1
 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME	"u-boot.img"
 
 #ifdef CONFIG_SPL_OS_BOOT
include/configs/tricorder.h +1 -1
index 6e7a7fb..36621a5 100644
@@ -349,7 +349,7 @@
 #define CONFIG_SPL_FAT_SUPPORT
 #define CONFIG_SPL_LDSCRIPT		"$(CPUDIR)/omap-common/u-boot-spl.lds"
 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME        "u-boot.img"
-#define CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION    1
+#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION     1
 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */
 
 #define CONFIG_SPL_TEXT_BASE		0x40200000 /*CONFIG_SYS_SRAM_START*/
include/configs/zynq-common.h +1 -1
index 2bc1562..b775220 100644
@@ -268,7 +268,7 @@
 #define CONFIG_SPL_MMC_SUPPORT
 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */
 #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS      0x200 /* 256 KB */
-#define CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION    1
+#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION     1
 #define CONFIG_SPL_LIBDISK_SUPPORT
 #define CONFIG_SPL_FAT_SUPPORT
 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME     "u-boot-dtb.img"
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 1/2 MMC SD fs boot partition config coding style and proper description

Quoted 7 lines · Paul Kocialkowski

CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION ought to be called CONFIG_SYS_MMCSD_FS_BOOT_PARTITION to keep it consistent with other config options such as: CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR.

In addition, it is not related to raw mode booting but to fs mode instead.

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/20141110/fa65c008/attachment.pgp>
#3 lore raw

PATCH 1/2 MMC SD fs boot partition config coding style and proper description

In reply to Paul Kocialkowski
Quoted 8 lines · Paul Kocialkowski

CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION ought to be called CONFIG_SYS_MMCSD_FS_BOOT_PARTITION to keep it consistent with other config options such as: CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR.

In addition, it is not related to raw mode booting but to fs mode instead.

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: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141208/dc7903bd/attachment.pgp>
#4 lore raw

PATCH 2/2 spl: MMC U-Boot image load from raw partition

In reply to Paul Kocialkowski

Raw images of U-Boot can be stored inside MMC partitions, so it makes sense to read the partition table, looking for a partition number instead of using a fixed sector address.

---
 README               |    4 ++++
 common/spl/spl_mmc.c |   26 +++++++++++++++++++++++---
 2 files changed, 27 insertions(+), 3 deletions(-)
README +4 -0
index 0b5fad9..5444b2e 100644
@@ -3550,6 +3550,10 @@ FIT uImage format:
 		Address and partition on the MMC to load U-Boot from
 		when the MMC is being used in raw mode.
 
+		CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION
+		Partition on the MMC to load U-Boot from when the MMC is being
+		used in raw mode
+
 		CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR
 		Sector to load kernel uImage from when MMC is being
 		used in raw mode (for Falcon mode)
common/spl/spl_mmc.c +23 -3
index f9c3851..31ddcdc 100644
@@ -15,7 +15,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-static int mmc_load_image_raw(struct mmc *mmc, unsigned long sector)
+static int mmc_load_image_raw_sector(struct mmc *mmc, unsigned long sector)
 {
 	unsigned long err;
 	u32 image_size_sectors;
@@ -51,6 +51,20 @@ end:
 	return (err == 0);
 }
 
+static int mmc_load_image_raw_partition(struct mmc *mmc, int partition)
+{
+	disk_partition_t info;
+
+	if (get_partition_info(&mmc->block_dev, partition, &info)) {
+#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
+		printf("spl: partition error\n");
+#endif
+		return -1;
+	}
+
+	return mmc_load_image_raw_sector(mmc, info.start);
+}
+
 #ifdef CONFIG_SPL_OS_BOOT
 static int mmc_load_image_raw_os(struct mmc *mmc)
 {
@@ -64,7 +78,8 @@ static int mmc_load_image_raw_os(struct mmc *mmc)
 		return -1;
 	}
 
-	return mmc_load_image_raw(mmc, CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR);
+	return mmc_load_image_raw_sector(mmc,
+						CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR);
 }
 #endif
 
@@ -98,8 +113,13 @@ void spl_mmc_load_image(void)
 #ifdef CONFIG_SPL_OS_BOOT
 		if (spl_start_uboot() || mmc_load_image_raw_os(mmc))
 #endif
-		err = mmc_load_image_raw(mmc,
+#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION
+		err = mmc_load_image_raw_partition(mmc,
+			CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION);
+#else
+		err = mmc_load_image_raw_sector(mmc,
 			CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR);
+#endif
 #if defined(CONFIG_SPL_FAT_SUPPORT) || defined(CONFIG_SPL_EXT_SUPPORT)
 	} else if (boot_mode == MMCSD_MODE_FS) {
 		debug("boot mode - FS\n");
Signature · 1 line
1.7.9.5
#5 lore raw

PATCH 2/2 spl: MMC U-Boot image load from raw partition

Quoted 5 lines · Paul Kocialkowski

Raw images of U-Boot can be stored inside MMC partitions, so it makes sense to read the partition table, looking for a partition number instead of using a fixed sector address.

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/20141110/6aa74c9b/attachment.pgp>
#6 lore raw

PATCH 2/2 spl: MMC U-Boot image load from raw partition

In reply to Paul Kocialkowski
Quoted 6 lines · Paul Kocialkowski

Raw images of U-Boot can be stored inside MMC partitions, so it makes sense to read the partition table, looking for a partition number instead of using a fixed sector address.

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: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141208/c1274c4d/attachment.pgp>
#7 lore raw

cover spl: MMC U-Boot image load from raw partition

In reply to Paul Kocialkowski

Hello Paul,

Quoted 7 lines · Paul Kocialkowski

This is a first attempt at adding support for U-Boot image load from raw partitions. It does not support OS boot as I cannot test it on my current setup.

This is going to be useful for the Optimus Black port (please do not consider this as dead code because no board is using it right now, there will be one soon)!

Well... Why don't you just post these two patches a little later, as part of the upcoming series which will add support for the Optimus Black?

Quoted 5 lines

On the Optimus Black, the second stage bootloader (U-Boot in our case) is stored on the second partition of the internal EMMC. This patch allows reading from that partition without the need of providing the U-Boot config with a sector address, but with the partition address.

Quoted 7 lines

It makes sense as there is already code to read partition tables, so it would be a shame to hardcode the sector address while it can be obtained dynamically.

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Amicalement,

Signature · 1 line
Albert.
#8 lore raw

cover spl: MMC U-Boot image load from raw partition

Le samedi 08 novembre 2014 ? 23:19 +0100, Albert ARIBAUD a ?crit :

Quoted 8 lines

Hello Paul,

Quoted 4 lines · Paul Kocialkowski

This is a first attempt at adding support for U-Boot image load from raw partitions. It does not support OS boot as I cannot test it on my current setup.

Quoted 7 lines
Quoted 3 lines

This is going to be useful for the Optimus Black port (please do not consider this as dead code because no board is using it right now, there will be one soon)!

Well... Why don't you just post these two patches a little later, as part of the upcoming series which will add support for the Optimus Black?

The honest answer here is that I don't think I'll have time to handle having the patches reviewed all at once and that I prefer to do things step by step, week after week (work on the next thing when the previous piece is ready or nearly so). Things are independent enough for this to work.

Quoted 8 lines
Quoted 8 lines

On the Optimus Black, the second stage bootloader (U-Boot in our case) is stored on the second partition of the internal EMMC. This patch allows reading from that partition without the need of providing the U-Boot config with a sector address, but with the partition address.

It makes sense as there is already code to read partition tables, so it would be a shame to hardcode the sector address while it can be obtained dynamically.

Quoted 8 lines
Quoted 4 lines

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Amicalement,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141108/1acbb108/attachment.pgp>

#9 lore raw

cover spl: MMC U-Boot image load from raw partition

Hello Paul,

Quoted 17 lines · Paul Kocialkowski

Le samedi 08 novembre 2014 ? 23:19 +0100, Albert ARIBAUD a ?crit :

Quoted 8 lines

Hello Paul,

Quoted 4 lines · Paul Kocialkowski

This is a first attempt at adding support for U-Boot image load from raw partitions. It does not support OS boot as I cannot test it on my current setup.

Quoted 7 lines
Quoted 3 lines

This is going to be useful for the Optimus Black port (please do not consider this as dead code because no board is using it right now, there will be one soon)!

Well... Why don't you just post these two patches a little later, as part of the upcoming series which will add support for the Optimus Black?

Quoted 5 lines

The honest answer here is that I don't think I'll have time to handle having the patches reviewed all at once and that I prefer to do things step by step, week after week (work on the next thing when the previous piece is ready or nearly so). Things are independent enough for this to work.

My own honest answer in turn is that potential reviewers of your code may not think they'll have time to look at code which they cannot assess because they don't know how it is (going to be) called.

If you feel you cannot handle reviews of the whole set all at once, then it seems to me the problem is yours to solve: post the whole series, let the whole review happen, and then just look at the comments for each patch in turn at your own pace.

This way you avoid posting dead code *and* you get to handle patch reviews piecewise as you would like.

Amicalement,

Signature · 1 line
Albert.
#10 lore raw

cover spl: MMC U-Boot image load from raw partition

In reply to Albert ARIBAUD
Quoted 8 lines · Albert ARIBAUD

Hello Paul,

Quoted 4 lines · Paul Kocialkowski

This is a first attempt at adding support for U-Boot image load from raw partitions. It does not support OS boot as I cannot test it on my current setup.

Quoted 7 lines
Quoted 3 lines

This is going to be useful for the Optimus Black port (please do not consider this as dead code because no board is using it right now, there will be one soon)!

Well... Why don't you just post these two patches a little later, as part of the upcoming series which will add support for the Optimus Black?

So to me the "dead code" thing is starting to get a lot more ambiguous since with Kconfig we'll need need every single possible choice enabled in some defconfig, just some way to turn it on, on a possibly relevant board. In this case, any OMAP3+ board would be a fine place to try this out, IFF it's done as a Kconfig choice.

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/20141110/cfa23725/attachment.pgp>
#11 lore raw

cover spl: MMC U-Boot image load from raw partition

Hello Tom,

Quoted 17 lines · Tom Rini
Quoted 8 lines · Albert ARIBAUD

Hello Paul,

Quoted 4 lines · Paul Kocialkowski

This is a first attempt at adding support for U-Boot image load from raw partitions. It does not support OS boot as I cannot test it on my current setup.

Quoted 7 lines
Quoted 3 lines

This is going to be useful for the Optimus Black port (please do not consider this as dead code because no board is using it right now, there will be one soon)!

Well... Why don't you just post these two patches a little later, as part of the upcoming series which will add support for the Optimus Black?

Quoted 5 lines

So to me the "dead code" thing is starting to get a lot more ambiguous since with Kconfig we'll need need every single possible choice enabled in some defconfig, just some way to turn it on, on a possibly relevant board. In this case, any OMAP3+ board would be a fine place to try this out, IFF it's done as a Kconfig choice.

Not sure I'm understanding you right, but it seems to me we're in sync:
as long as the code is enabled somewhere on some target, it is not dead code. I'm precisely asking that the code here be submitted along with the target that uses it. Or did I miss something?

Quoted 1 line

Tom

Amicalement,

Signature · 1 line
Albert.
#12 lore raw

cover spl: MMC U-Boot image load from raw partition

Le jeudi 13 novembre 2014 ? 12:16 +0100, Albert ARIBAUD a ?crit :

Quoted 26 lines

Hello Tom,

Quoted 17 lines · Tom Rini
Quoted 8 lines · Albert ARIBAUD

Hello Paul,

Quoted 4 lines · Paul Kocialkowski

This is a first attempt at adding support for U-Boot image load from raw partitions. It does not support OS boot as I cannot test it on my current setup.

Quoted 7 lines
Quoted 3 lines

This is going to be useful for the Optimus Black port (please do not consider this as dead code because no board is using it right now, there will be one soon)!

Well... Why don't you just post these two patches a little later, as part of the upcoming series which will add support for the Optimus Black?

Quoted 5 lines

So to me the "dead code" thing is starting to get a lot more ambiguous since with Kconfig we'll need need every single possible choice enabled in some defconfig, just some way to turn it on, on a possibly relevant board. In this case, any OMAP3+ board would be a fine place to try this out, IFF it's done as a Kconfig choice.

Quoted 4 lines

Not sure I'm understanding you right, but it seems to me we're in sync:
as long as the code is enabled somewhere on some target, it is not dead code. I'm precisely asking that the code here be submitted along with the target that uses it. Or did I miss something?

Well I think it makes sense to not call this dead code as long as it *can be* enabled and used on another supported board (for that matter, any OMAP3+ board will indeed do).

This is very different from e.g. the regulator code that I submitted, which is only relevant for devices with that particular piece of hardware (so far, none supported by U-Boot). So it makes sense to submit that regulator patch only along with support for a board that uses it.

Signature · 16 lines
Paul Kocialkowski, Replicant developer

Replicant is a fully free Android distribution

Website: http://www.replicant.us/
Blog: http://blog.replicant.us/
Wiki/tracker/forums: http://redmine.replicant.us/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141113/f8b2014c/attachment.pgp>
#13 lore raw

cover spl: MMC U-Boot image load from raw partition

Hello Paul,

Quoted 27 lines · Paul Kocialkowski

Le jeudi 13 novembre 2014 ? 12:16 +0100, Albert ARIBAUD a ?crit :

Quoted 26 lines

Hello Tom,

Quoted 22 lines · Tom Rini
Quoted 8 lines · Albert ARIBAUD

Hello Paul,

Quoted 4 lines · Paul Kocialkowski

This is a first attempt at adding support for U-Boot image load from raw partitions. It does not support OS boot as I cannot test it on my current setup.

Quoted 7 lines
Quoted 3 lines

This is going to be useful for the Optimus Black port (please do not consider this as dead code because no board is using it right now, there will be one soon)!

Well... Why don't you just post these two patches a little later, as part of the upcoming series which will add support for the Optimus Black?

So to me the "dead code" thing is starting to get a lot more ambiguous since with Kconfig we'll need need every single possible choice enabled in some defconfig, just some way to turn it on, on a possibly relevant board. In this case, any OMAP3+ board would be a fine place to try this out, IFF it's done as a Kconfig choice.

Quoted 8 lines
Quoted 4 lines

Not sure I'm understanding you right, but it seems to me we're in sync:
as long as the code is enabled somewhere on some target, it is not dead code. I'm precisely asking that the code here be submitted along with the target that uses it. Or did I miss something?

Well I think it makes sense to not call this dead code as long as it *can be* enabled and used on another supported board (for that matter, any OMAP3+ board will indeed do).

If no board is calling this code right now, that is because none needs it. If none needs it, then it has no reason to be added. The day some board needs this code, the patch to add this code can be submitted along with the patch that calls this code.

Quoted 4 lines

This is very different from e.g. the regulator code that I submitted, which is only relevant for devices with that particular piece of hardware (so far, none supported by U-Boot). So it makes sense to submit that regulator patch only along with support for a board that uses it.

I don't see the difference.

Quoted 7 lines

Paul Kocialkowski, Replicant developer

Replicant is a fully free Android distribution

Website: http://www.replicant.us/
Blog: http://blog.replicant.us/
Wiki/tracker/forums: http://redmine.replicant.us/

Amicalement,

Signature · 1 line
Albert.
#14 lore raw

cover spl: MMC U-Boot image load from raw partition

Quoted 4 lines · Albert ARIBAUD

Hello Paul,

On Thu, 13 Nov 2014 23:16:09 +0100, Paul Kocialkowski <[email protected]> wrote:

[snip]

Quoted 9 lines
Quoted 3 lines

Well I think it makes sense to not call this dead code as long as it *can be* enabled and used on another supported board (for that matter, any OMAP3+ board will indeed do).

If no board is calling this code right now, that is because none needs it. If none needs it, then it has no reason to be added. The day some board needs this code, the patch to add this code can be submitted along with the patch that calls this code.

Quoted 6 lines
Quoted 4 lines

This is very different from e.g. the regulator code that I submitted, which is only relevant for devices with that particular piece of hardware (so far, none supported by U-Boot). So it makes sense to submit that regulator patch only along with support for a board that uses it.

I don't see the difference.

But this is where I see a difference, "tomorrow". Setting this, or not setting this new behavior is a Kconfig "choice" (in Kconfig-speak). We do not need a defconfig in-tree for every single possible choice since at some point we'll do like other Kconfig-based projects and have randconfig builds possible to cover "odd" choices, along with allyesconfig and allnoconfig to cover the things which people clearly need _somewhere_ (and feel the (good!) need to post them in public to help others) but may not be able to post the whole board port (not the case here per-se but see the various RTC drivers that get posted from time to time).

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/20141118/2085f454/attachment.pgp>
#15 lore raw

cover spl: MMC U-Boot image load from raw partition

Hello Tom,

Quoted 22 lines · Tom Rini
Quoted 4 lines · Albert ARIBAUD

Hello Paul,

On Thu, 13 Nov 2014 23:16:09 +0100, Paul Kocialkowski <[email protected]> wrote:

[snip]

Quoted 9 lines
Quoted 3 lines

Well I think it makes sense to not call this dead code as long as it *can be* enabled and used on another supported board (for that matter, any OMAP3+ board will indeed do).

If no board is calling this code right now, that is because none needs it. If none needs it, then it has no reason to be added. The day some board needs this code, the patch to add this code can be submitted along with the patch that calls this code.

Quoted 6 lines
Quoted 4 lines

This is very different from e.g. the regulator code that I submitted, which is only relevant for devices with that particular piece of hardware (so far, none supported by U-Boot). So it makes sense to submit that regulator patch only along with support for a board that uses it.

I don't see the difference.

Quoted 10 lines

But this is where I see a difference, "tomorrow". Setting this, or not setting this new behavior is a Kconfig "choice" (in Kconfig-speak). We do not need a defconfig in-tree for every single possible choice since at some point we'll do like other Kconfig-based projects and have randconfig builds possible to cover "odd" choices, along with allyesconfig and allnoconfig to cover the things which people clearly need _somewhere_ (and feel the (good!) need to post them in public to help others) but may not be able to post the whole board port (not the case here per-se but see the various RTC drivers that get posted from time to time).

I still don't agree, as a Kconfig option is no different from any other addition, so I consider that we should only introduce a Kconfig choice because/when it is needed, not just because it could be needed; but you're the boss.

Quoted 2 lines
Signature · 1 line
Tom

Amicalement,

Signature · 1 line
Albert.