Skip to contentSkip to conversation

ide: Add printf format string for CONFIG_SYS_64BIT_LBA option

PATCH New Simon Glass 6 participants 31 messages Oct 13, 2012 – Nov 7, 2012

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

PATCH 1/7 ide: Add printf format string for CONFIG_SYS_64BIT_LBA option

From: Gabe Black <[email protected]>

The size of an LBA type changes depending on this option. We need to use a different printf() string in each case, so create a define for this.

---
 include/ide.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
include/ide.h +2 -0
index 385e909..18d63b2 100644
@@ -42,8 +42,10 @@
 
 #ifdef CONFIG_SYS_64BIT_LBA
 typedef uint64_t lbaint_t;
+#define LBAF "%llx"
 #else
 typedef ulong lbaint_t;
+#define LBAF "%lx"
 #endif
 
 /*
Signature · 1 line
1.7.7.3
#1 lore raw

PATCH 2/7 usb: Support the CONFIG_SYS_64BIT_LBA option

From: Gabe Black <[email protected]>

usb_storage wouldn't compile when the CONFIG_SYS_64BIT_LBA option is turned on because the used fixed size data types in their exported functions when they should have used lbaint_t for the block count parameter. That meant that when the sizes happened to be the same, when using a 28 bit LBA, the driver would build, but when it wasn't, a 48 bit LBA, things broke.

This change adjusts the signatures to use the right type and makes small adjustments in the affected functions.

---
 common/usb_storage.c |   24 ++++++++++++++----------
 1 files changed, 14 insertions(+), 10 deletions(-)
common/usb_storage.c +14 -10
index 950451e..0c2a4c7 100644
@@ -179,9 +179,9 @@ int usb_stor_get_info(struct usb_device *dev, struct us_data *us,
 int usb_storage_probe(struct usb_device *dev, unsigned int ifnum,
 		      struct us_data *ss);
 unsigned long usb_stor_read(int device, unsigned long blknr,
-			    unsigned long blkcnt, void *buffer);
+			    lbaint_t blkcnt, void *buffer);
 unsigned long usb_stor_write(int device, unsigned long blknr,
-			     unsigned long blkcnt, const void *buffer);
+			     lbaint_t blkcnt, const void *buffer);
 struct usb_device * usb_get_dev_index(int index);
 void uhci_show_temp_int_td(void);
 
@@ -1053,9 +1053,10 @@ static void usb_bin_fixup(struct usb_device_descriptor descriptor,
 #endif /* CONFIG_USB_BIN_FIXUP */
 
 unsigned long usb_stor_read(int device, unsigned long blknr,
-			    unsigned long blkcnt, void *buffer)
+			    lbaint_t blkcnt, void *buffer)
 {
-	unsigned long start, blks, buf_addr;
+	lbaint_t start, blks;
+	uintptr_t buf_addr;
 	unsigned short smallblks;
 	struct usb_device *dev;
 	struct us_data *ss;
@@ -1084,7 +1085,7 @@ unsigned long usb_stor_read(int device, unsigned long blknr,
 	start = blknr;
 	blks = blkcnt;
 
-	USB_STOR_PRINTF("\nusb_read: dev %d startblk %lx, blccnt %lx"
+	USB_STOR_PRINTF("\nusb_read: dev %d startblk " LBAF ", blccnt " LBAF
 			" buffer %lx\n", device, start, blks, buf_addr);
 
 	do {
@@ -1114,7 +1115,8 @@ retry_it:
 	} while (blks != 0);
 	ss->flags &= ~USB_READY;
 
-	USB_STOR_PRINTF("usb_read: end startblk %lx, blccnt %x buffer %lx\n",
+	USB_STOR_PRINTF("usb_read: end startblk " LBAF
+			", blccnt %x buffer %lx\n",
 			start, smallblks, buf_addr);
 
 	usb_disable_asynch(0); /* asynch transfer allowed */
@@ -1124,9 +1126,10 @@ retry_it:
 }
 
 unsigned long usb_stor_write(int device, unsigned long blknr,
-				unsigned long blkcnt, const void *buffer)
+				lbaint_t blkcnt, const void *buffer)
 {
-	unsigned long start, blks, buf_addr;
+	lbaint_t start, blks;
+	uintptr_t buf_addr;
 	unsigned short smallblks;
 	struct usb_device *dev;
 	struct us_data *ss;
@@ -1156,7 +1159,7 @@ unsigned long usb_stor_write(int device, unsigned long blknr,
 	start = blknr;
 	blks = blkcnt;
 
-	USB_STOR_PRINTF("\nusb_write: dev %d startblk %lx, blccnt %lx"
+	USB_STOR_PRINTF("\nusb_write: dev %d startblk " LBAF ", blccnt " LBAF
 			" buffer %lx\n", device, start, blks, buf_addr);
 
 	do {
@@ -1188,7 +1191,8 @@ retry_it:
 	} while (blks != 0);
 	ss->flags &= ~USB_READY;
 
-	USB_STOR_PRINTF("usb_write: end startblk %lx, blccnt %x buffer %lx\n",
+	USB_STOR_PRINTF("usb_write: end startblk " LBAF
+			", blccnt %x buffer %lx\n",
 			start, smallblks, buf_addr);
 
 	usb_disable_asynch(0); /* asynch transfer allowed */
Signature · 1 line
1.7.7.3
#2 lore raw

PATCH 2/7 usb: Support the CONFIG_SYS_64BIT_LBA option

Dear Simon Glass,

Quoted 8 lines

From: Gabe Black <[email protected]>

usb_storage wouldn't compile when the CONFIG_SYS_64BIT_LBA option is turned on because the used fixed size data types in their exported functions when they should have used lbaint_t for the block count parameter. That meant that when the sizes happened to be the same, when using a 28 bit LBA, the driver would build, but when it wasn't, a 48 bit LBA, things broke.

Quoted 89 lines

This change adjusts the signatures to use the right type and makes small adjustments in the affected functions.

---
 common/usb_storage.c |   24 ++++++++++++++----------
 1 files changed, 14 insertions(+), 10 deletions(-)
common/usb_storage.c +0 -0
index 950451e..0c2a4c7 100644
@@ -179,9 +179,9 @@ int usb_stor_get_info(struct usb_device *dev, struct

us_data *us, int usb_storage_probe(struct usb_device *dev, unsigned int ifnum, struct us_data *ss);
unsigned long usb_stor_read(int device, unsigned long blknr,

common/usb_storage.c +2 -2
-			    unsigned long blkcnt, void *buffer);
+			    lbaint_t blkcnt, void *buffer);
 unsigned long usb_stor_write(int device, unsigned long blknr,
-			     unsigned long blkcnt, const void *buffer);
+			     lbaint_t blkcnt, const void *buffer);
 struct usb_device * usb_get_dev_index(int index);
 void uhci_show_temp_int_td(void);
@@ -1053,9 +1053,10 @@ static void usb_bin_fixup(struct

usb_device_descriptor descriptor, #endif /* CONFIG_USB_BIN_FIXUP */

unsigned long usb_stor_read(int device, unsigned long blknr,

common/usb_storage.c +12 -8
-			    unsigned long blkcnt, void *buffer)
+			    lbaint_t blkcnt, void *buffer)
 {
-	unsigned long start, blks, buf_addr;
+	lbaint_t start, blks;
+	uintptr_t buf_addr;
 	unsigned short smallblks;
 	struct usb_device *dev;
 	struct us_data *ss;
@@ -1084,7 +1085,7 @@ unsigned long usb_stor_read(int device, unsigned long
 blknr, start = blknr;
 	blks = blkcnt;
 
-	USB_STOR_PRINTF("\nusb_read: dev %d startblk %lx, blccnt %lx"
+	USB_STOR_PRINTF("\nusb_read: dev %d startblk " LBAF ", blccnt " LBAF
 			" buffer %lx\n", device, start, blks, buf_addr);
 
 	do {
@@ -1114,7 +1115,8 @@ retry_it:
 	} while (blks != 0);
 	ss->flags &= ~USB_READY;
 
-	USB_STOR_PRINTF("usb_read: end startblk %lx, blccnt %x buffer %lx\n",
+	USB_STOR_PRINTF("usb_read: end startblk " LBAF
+			", blccnt %x buffer %lx\n",
 			start, smallblks, buf_addr);
 
 	usb_disable_asynch(0); /* asynch transfer allowed */
@@ -1124,9 +1126,10 @@ retry_it:
 }
 
 unsigned long usb_stor_write(int device, unsigned long blknr,
-				unsigned long blkcnt, const void *buffer)
+				lbaint_t blkcnt, const void *buffer)
 {
-	unsigned long start, blks, buf_addr;
+	lbaint_t start, blks;
+	uintptr_t buf_addr;
 	unsigned short smallblks;
 	struct usb_device *dev;
 	struct us_data *ss;
@@ -1156,7 +1159,7 @@ unsigned long usb_stor_write(int device, unsigned
 long blknr, start = blknr;
 	blks = blkcnt;
 
-	USB_STOR_PRINTF("\nusb_write: dev %d startblk %lx, blccnt %lx"
+	USB_STOR_PRINTF("\nusb_write: dev %d startblk " LBAF ", blccnt " LBAF
 			" buffer %lx\n", device, start, blks, buf_addr);
 
 	do {
@@ -1188,7 +1191,8 @@ retry_it:
 	} while (blks != 0);
 	ss->flags &= ~USB_READY;
 
-	USB_STOR_PRINTF("usb_write: end startblk %lx, blccnt %x buffer %lx\n",
+	USB_STOR_PRINTF("usb_write: end startblk " LBAF
+			", blccnt %x buffer %lx\n",
 			start, smallblks, buf_addr);
 
 	usb_disable_asynch(0); /* asynch transfer allowed */
#3 lore raw

PATCH 3/7 disk: Make the disk partition code work with no specific partition types

In reply to Simon Glass

From: Gabe Black <[email protected]>

Currently, if the disk partition code is compiled with all of the parition types compiled out, it hits an #error which stops the build. This change adjusts that file so that those functions will fall through to their defaults in those cases instead of breaking the build. These functions are needed because other code calls them, and that code is needed because other config options are overly broad and bring in support we don't need along with support we do.

Also reduce repetition of the 6-term #ifdef throughout the file.

---
 disk/part.c |   50 +++++++++++++++++---------------------------------
 1 files changed, 17 insertions(+), 33 deletions(-)
disk/part.c +17 -33
index 3022969..ec50516 100644
@@ -35,12 +35,15 @@
 #define PRINTF(fmt,args...)
 #endif
 
+/* Rather than repeat this expression each time, add a define for it */
 #if (defined(CONFIG_CMD_IDE) || \
      defined(CONFIG_CMD_SATA) || \
      defined(CONFIG_CMD_SCSI) || \
      defined(CONFIG_CMD_USB) || \
      defined(CONFIG_MMC) || \
      defined(CONFIG_SYSTEMACE) )
+#define HAVE_BLOCK_DEVICE
+#endif
 
 struct block_drvr {
 	char *name;
@@ -71,6 +74,7 @@ static const struct block_drvr block_drvr[] = {
 
 DECLARE_GLOBAL_DATA_PTR;
 
+#ifdef HAVE_BLOCK_DEVICE
 block_dev_desc_t *get_dev(const char *ifname, int dev)
 {
 	const struct block_drvr *drvr = block_drvr;
@@ -104,12 +108,7 @@ block_dev_desc_t *get_dev(const char *ifname, int dev)
 }
 #endif
 
-#if (defined(CONFIG_CMD_IDE) || \
-     defined(CONFIG_CMD_SATA) || \
-     defined(CONFIG_CMD_SCSI) || \
-     defined(CONFIG_CMD_USB) || \
-     defined(CONFIG_MMC) || \
-     defined(CONFIG_SYSTEMACE) )
+#ifdef HAVE_BLOCK_DEVICE
 
 /* ------------------------------------------------------------------------- */
 /*
@@ -239,18 +238,7 @@ void dev_print (block_dev_desc_t *dev_desc)
 }
 #endif
 
-#if (defined(CONFIG_CMD_IDE) || \
-     defined(CONFIG_CMD_SATA) || \
-     defined(CONFIG_CMD_SCSI) || \
-     defined(CONFIG_CMD_USB) || \
-     defined(CONFIG_MMC)		|| \
-     defined(CONFIG_SYSTEMACE) )
-
-#if defined(CONFIG_MAC_PARTITION) || \
-    defined(CONFIG_DOS_PARTITION) || \
-    defined(CONFIG_ISO_PARTITION) || \
-    defined(CONFIG_AMIGA_PARTITION) || \
-    defined(CONFIG_EFI_PARTITION)
+#ifdef HAVE_BLOCK_DEVICE
 
 void init_part (block_dev_desc_t * dev_desc)
 {
@@ -293,6 +281,12 @@ void init_part (block_dev_desc_t * dev_desc)
 }
 
 
+#if defined(CONFIG_MAC_PARTITION) || \
+	defined(CONFIG_DOS_PARTITION) || \
+	defined(CONFIG_ISO_PARTITION) || \
+	defined(CONFIG_AMIGA_PARTITION) || \
+	defined(CONFIG_EFI_PARTITION)
+
 static void print_part_header (const char *type, block_dev_desc_t * dev_desc)
 {
 	puts ("\nPartition Map for ");
@@ -326,6 +320,8 @@ static void print_part_header (const char *type, block_dev_desc_t * dev_desc)
 			dev_desc->dev, type);
 }
 
+#endif /* any CONFIG_..._PARTITION */
+
 void print_part (block_dev_desc_t * dev_desc)
 {
 
@@ -372,24 +368,12 @@ void print_part (block_dev_desc_t * dev_desc)
 	puts ("## Unknown partition table\n");
 }
 
-
-#else	/* neither MAC nor DOS nor ISO nor AMIGA nor EFI partition configured */
-# error neither CONFIG_MAC_PARTITION nor CONFIG_DOS_PARTITION
-# error nor CONFIG_ISO_PARTITION nor CONFIG_AMIGA_PARTITION
-# error nor CONFIG_EFI_PARTITION configured!
-#endif
-
-#endif
+#endif /* HAVE_BLOCK_DEVICE */
 
 int get_partition_info(block_dev_desc_t *dev_desc, int part
 					, disk_partition_t *info)
 {
-#if defined(CONFIG_CMD_IDE) || \
-	defined(CONFIG_CMD_SATA) || \
-	defined(CONFIG_CMD_SCSI) || \
-	defined(CONFIG_CMD_USB) || \
-	defined(CONFIG_MMC) || \
-	defined(CONFIG_SYSTEMACE)
+#ifdef HAVE_BLOCK_DEVICE
 
 #ifdef CONFIG_PARTITION_UUIDS
 	/* The common case is no UUID support */
@@ -444,7 +428,7 @@ int get_partition_info(block_dev_desc_t *dev_desc, int part
 	default:
 		break;
 	}
-#endif
+#endif /* HAVE_BLOCK_DEVICE */
 
 	return -1;
 }
Signature · 1 line
1.7.7.3
#4 lore raw

PATCH 4/7 disk: Address cast and format errors

In reply to Simon Glass

From: Taylor Hutt <[email protected]>

This change addresses a few printf-formatting errors, and a typecast error.

---
 disk/part_efi.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
disk/part_efi.c +4 -3
index 264ea9c..22a1dad 100644
@@ -405,7 +405,7 @@ static gpt_entry *alloc_read_gpt_entries(block_dev_desc_t * dev_desc,
 	count = le32_to_int(pgpt_head->num_partition_entries) *
 		le32_to_int(pgpt_head->sizeof_partition_entry);
 
-	debug("%s: count = %lu * %lu = %u\n", __func__,
+	debug("%s: count = %lu * %lu = %zu\n", __func__,
 		le32_to_int(pgpt_head->num_partition_entries),
 		le32_to_int(pgpt_head->sizeof_partition_entry), count);
 
@@ -415,7 +415,8 @@ static gpt_entry *alloc_read_gpt_entries(block_dev_desc_t * dev_desc,
 	}
 
 	if (count == 0 || pte == NULL) {
-		printf("%s: ERROR: Can't allocate 0x%X bytes for GPT Entries\n",
+		printf("%s: ERROR: Can't allocate 0x%zX "
+		       "bytes for GPT Entries\n",
 			__func__, count);
 		return NULL;
 	}
@@ -457,7 +458,7 @@ static int is_pte_valid(gpt_entry * pte)
 		sizeof(unused_guid.b)) == 0) {
 
 		debug("%s: Found an unused PTE GUID at 0x%08X\n", __func__,
-		(unsigned int)pte);
+		      (unsigned int)(uintptr_t)pte);
 
 		return 0;
 	} else {
Signature · 1 line
1.7.7.3
#5 lore raw

PATCH 5/7 disk: Allow alternate EFI partition signature

In reply to Simon Glass

From: Stefan Reinauer <[email protected]>

ChromeOS uses a GPT partition table to partition the disk. However, Windows will refuse to install on a GPT partitioned disk if there is no EFI available (Even if there is an MBR, too) To hide the GPT partition table from Windows, we need to write it with a header magic other than "EFI PART". To support old and new systems, Check for the magic string "CHROMEOS" too.

---
 disk/part_efi.c |    3 ++-
 disk/part_efi.h |    4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)
disk/part_efi.c +2 -1
index 22a1dad..f2a2445 100644
@@ -307,7 +307,8 @@ static int is_gpt_valid(block_dev_desc_t * dev_desc, unsigned long long lba,
 	}
 
 	/* Check the GPT header signature */
-	if (le64_to_int(pgpt_head->signature) != GPT_HEADER_SIGNATURE) {
+	if ((le64_to_int(pgpt_head->signature) != GPT_HEADER_SIGNATURE) &&
+	    (le64_to_int(pgpt_head->signature) != GPT_HEADER_SIGNATURE2)) {
 		printf("GUID Partition Table Header signature is wrong:"
 			"0x%llX != 0x%llX\n",
 			(unsigned long long)le64_to_int(pgpt_head->signature),
disk/part_efi.h +3 -1
index 5903e7c..07e590d 100644
@@ -37,7 +37,9 @@
 #define EFI_PMBR_OSTYPE_EFI_GPT 0xEE
 
 #define GPT_BLOCK_SIZE 512
-#define GPT_HEADER_SIGNATURE 0x5452415020494645ULL
+#define GPT_HEADER_SIGNATURE  0x5452415020494645ULL
+#define GPT_HEADER_SIGNATURE2 0x534f454d4f524843ULL
+
 #define GPT_HEADER_REVISION_V1 0x00010000
 #define GPT_PRIMARY_PARTITION_TABLE_LBA 1ULL
 #define GPT_ENTRY_NAME "gpt"
Signature · 1 line
1.7.7.3
#6 lore raw

PATCH 5/7 disk: Allow alternate EFI partition signature

Quoted 8 lines · Simon Glass

From: Stefan Reinauer <[email protected]>

ChromeOS uses a GPT partition table to partition the disk. However, Windows will refuse to install on a GPT partitioned disk if there is no EFI available (Even if there is an MBR, too) To hide the GPT partition table from Windows, we need to write it with a header magic other than "EFI PART". To support old and new systems, Check for the magic string "CHROMEOS" too.

Surely if you wanted to install Windows on a disk containing ChromeOS, you would just wipe the disk and re-partition it? I suppose perhaps you're talking about dual-boot though?

Either way, it doesn't see like a good idea to be using non-standard EFI signatures - especially if the idea is to hide the GPT from Windows, and presumably then have Windows use the MBR partitions, since that will end up with a decidedly non-standard partition setup; some partitions will only be represented in the MBR (those Windows creates) and some in GPT (presumably whatever ChromeOS created before).

#7 lore raw

PATCH 5/7 disk: Allow alternate EFI partition signature

Quoted 10 lines · Stephen Warren
Quoted 8 lines · Simon Glass

From: Stefan Reinauer <[email protected]>

ChromeOS uses a GPT partition table to partition the disk. However, Windows will refuse to install on a GPT partitioned disk if there is no EFI available (Even if there is an MBR, too) To hide the GPT partition table from Windows, we need to write it with a header magic other than "EFI PART". To support old and new systems, Check for the magic string "CHROMEOS" too.

Quoted 4 lines

Surely if you wanted to install Windows on a disk containing ChromeOS, you would just wipe the disk and re-partition it? I suppose perhaps you're talking about dual-boot though?

Yes, this is only required if we're dual-booting on Windows and ChromeOS on the same disk.

Either way, it doesn't see like a good idea to be using non-standard EFI

Quoted 6 lines

signatures - especially if the idea is to hide the GPT from Windows, and presumably then have Windows use the MBR partitions, since that will end up with a decidedly non-standard partition setup; some partitions will only be represented in the MBR (those Windows creates) and some in GPT (presumably whatever ChromeOS created before).

Yes, you will have to create a hybrid partition setup to make this work. It is unfortunate that Windows enforces this and there is no real way around it.
This is a workaround specific to ChromeOS machines, and should be fixed differently in the long run (e.g. by using Tiano Core as a payload instead of SeaBIOS for booting Windows)

Stefan

#8 lore raw

PATCH 5/7 disk: Allow alternate EFI partition signature

Quoted 30 lines · Stefan Reinauer

On Mon, Oct 15, 2012 at 8:19 AM, Stephen Warren <[email protected] <mailto:[email protected]>> wrote:

On 10/12/2012 06:26 PM, Simon Glass wrote:
> From: Stefan Reinauer <[email protected] <mailto:[email protected]>>
>
> ChromeOS uses a GPT partition table to partition the disk. > However, Windows will refuse to install on a GPT partitioned > disk if there is no EFI available (Even if there is an MBR, too) > To hide the GPT partition table from Windows, we need to write > it with a header magic other than "EFI PART". To support old > and new systems, Check for the magic string "CHROMEOS" too.

Surely if you wanted to install Windows on a disk containing ChromeOS, you would just wipe the disk and re-partition it? I suppose perhaps you're talking about dual-boot though?

Yes, this is only required if we're dual-booting on Windows and ChromeOS on the same disk.

Either way, it doesn't see like a good idea to be using non-standard EFI signatures - especially if the idea is to hide the GPT from Windows, and presumably then have Windows use the MBR partitions, since that will end up with a decidedly non-standard partition setup; some partitions will only be represented in the MBR (those Windows creates) and some in GPT (presumably whatever ChromeOS created before).

Quoted 3 lines

Yes, you will have to create a hybrid partition setup to make this work. It is unfortunate that Windows enforces this and there is no real way around it.

Is this something common that someone using upstream U-Boot would care about, or is it something specific that should be contained in a ChromeOS U-Boot tree? I'm worried that applying this patch will just (a) support a situation that'll be very confusing to the user and (b) slightly de-stabilizes the U-Boot code in other situations by allowing non-standard (perhaps considered corrupt even) EFI partition tables.

Still, I suppose I won't be impacted by case (a) so I probably shouldn't care much about it, and case (b) hopefully won't cause practical problems (famous last words), so I'm not opposed to this patch, it just feels slightly risky to me.

#9 lore raw

PATCH 5/7 disk: Allow alternate EFI partition signature

In reply to Simon Glass
Quoted 9 lines · Simon Glass

From: Stefan Reinauer <[email protected]>

ChromeOS uses a GPT partition table to partition the disk. However, Windows will refuse to install on a GPT partitioned disk if there is no EFI available (Even if there is an MBR, too) To hide the GPT partition table from Windows, we need to write it with a header magic other than "EFI PART". To support old and new systems, Check for the magic string "CHROMEOS" too.

Quoted 3 lines

Stephen brings up a good point in that this is a ChromeOS specific work-around for a real issue. With my TI hat on, we've been pushing the idea that our releases will be mainline + patches, and those patches will be things that are either backports, works in progress or simply not mainlineable patches (enforce a CONFIG_BOOTDELAY of 3 for all boards, add mojo to just load uImages to their XIP address, etc). In my mind, this patch falls into the last grouping and I hope you're OK with just holding onto this as a not appropriate for mainline change.

The rest of the series looks fine and no need to respin, I'll just skip this patch when I pick it up, assuming no further changes are needed elsewhere.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121017/ac6d2dd2/attachment.pgp>
#10 lore raw

PATCH 5/7 disk: Allow alternate EFI partition signature

Quoted 9 lines · Tom Rini

Stephen brings up a good point in that this is a ChromeOS specific work-around for a real issue. With my TI hat on, we've been pushing the idea that our releases will be mainline + patches, and those patches will be things that are either backports, works in progress or simply not mainlineable patches (enforce a CONFIG_BOOTDELAY of 3 for all boards, add mojo to just load uImages to their XIP address, etc). In my mind, this patch falls into the last grouping and I hope you're OK with just holding onto this as a not appropriate for mainline change.

Yes, it's exactly that kind of change.

Quoted 4 lines

The rest of the series looks fine and no need to respin, I'll just skip this patch when I pick it up, assuming no further changes are needed elsewhere.

Great! Thanks a lot

Stefan

#11 lore raw

PATCH 5/7 disk: Allow alternate EFI partition signature

Hi Tom,

Quoted 15 lines · Stefan Reinauer
Quoted 9 lines · Tom Rini

Stephen brings up a good point in that this is a ChromeOS specific work-around for a real issue. With my TI hat on, we've been pushing the idea that our releases will be mainline + patches, and those patches will be things that are either backports, works in progress or simply not mainlineable patches (enforce a CONFIG_BOOTDELAY of 3 for all boards, add mojo to just load uImages to their XIP address, etc). In my mind, this patch falls into the last grouping and I hope you're OK with just holding onto this as a not appropriate for mainline change.

Yes, it's exactly that kind of change.

Quoted 1 line
Quoted 6 lines
Quoted 3 lines

The rest of the series looks fine and no need to respin, I'll just skip this patch when I pick it up, assuming no further changes are needed elsewhere.

Great! Thanks a lot

Good with me too, thanks Tom.

Quoted 3 lines

Stefan

Regards,
Simon

#12 lore raw

PATCH 6/7 fs: Add a Coreboot Filesystem (CBFS) driver and commands

In reply to Simon Glass

From: Gabe Black <[email protected]>

This change adds CBFS support and some commands to use it to u-boot. These commands are:

cbfsinit - Initialize CBFS support and pull all metadata into RAM. The end of the ROM is an optional parameter which defaults to the standard 0xffffffff and can be used to support multiple CBFSes in a system. The last one set up with cbfsinit is the one that will be used.

cbfsinfo - Print information from the CBFS header.

cbfsls - Print out the size, type, and name of all the files in the current CBFS. Recognized types are translated into symbolic names.

cbfsload - Load a file from CBFS into memory. Like the similar command for fat filesystems, you can optionally provide a maximum size.

Support for CBFS is compiled in when the CONFIG_CMD_CBFS option is specified.

The CBFS driver can also be used programmatically from within u-boot.

If u-boot needs something out of CBFS very early before the heap is configured, it won't be able to use the normal CBFS support which caches some information in memory it allocates from the heap. The cbfs_file_find_uncached function searches a CBFS instance without touching the heap.

---
 Makefile          |    3 +-
 README            |    7 +
 common/Makefile   |    1 +
 common/cmd_cbfs.c |  214 +++++++++++++++++++++++++++++++++
 fs/Makefile       |    1 +
 fs/cbfs/Makefile  |   43 +++++++
 fs/cbfs/cbfs.c    |  339 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 include/cbfs.h    |  181 ++++++++++++++++++++++++++++
 8 files changed, 788 insertions(+), 1 deletions(-)
 create mode 100644 common/cmd_cbfs.c
 create mode 100644 fs/cbfs/Makefile
 create mode 100644 fs/cbfs/cbfs.c
 create mode 100644 include/cbfs.h
Makefile +2 -1
index 90e99af..d2cfac0 100644
@@ -242,7 +242,8 @@ LIBS-y += drivers/net/npe/libnpe.o
 endif
 LIBS-$(CONFIG_OF_EMBED) += dts/libdts.o
 LIBS-y += arch/$(ARCH)/lib/lib$(ARCH).o
-LIBS-y += fs/cramfs/libcramfs.o \
+LIBS-y += fs/cbfs/libcbfs.o \
+	fs/cramfs/libcramfs.o \
 	fs/ext4/libext4fs.o \
 	fs/fat/libfat.o \
 	fs/fdos/libfdos.o \
README +7 -0
index 9804cea..f5adcc0 100644
@@ -1316,6 +1316,13 @@ The following options need to be configured:
 		This will also enable the command "fatwrite" enabling the
 		user to write files to FAT.
 
+CBFS (Coreboot Filesystem) support
+		CONFIG_CMD_CBFS
+
+		Define this to enable support for reading from a Coreboot
+		filesystem. Available commands are cbfsinit, cbfsinfo, cbfsls
+		and cbfsload.
+
 - Keyboard Support:
 		CONFIG_ISA_KEYBOARD
 
common/Makefile +1 -0
index a4eb477..7cb0e88 100644
@@ -69,6 +69,7 @@ COBJS-$(CONFIG_CMD_BEDBUG) += bedbug.o cmd_bedbug.o
 COBJS-$(CONFIG_CMD_BMP) += cmd_bmp.o
 COBJS-$(CONFIG_CMD_BOOTLDR) += cmd_bootldr.o
 COBJS-$(CONFIG_CMD_CACHE) += cmd_cache.o
+COBJS-$(CONFIG_CMD_CBFS) += cmd_cbfs.o
 COBJS-$(CONFIG_CMD_CONSOLE) += cmd_console.o
 COBJS-$(CONFIG_CMD_CPLBINFO) += cmd_cplbinfo.o
 COBJS-$(CONFIG_DATAFLASH_MMC_SELECT) += cmd_dataflash_mmc_mux.o
common/cmd_cbfs.c new file +214 -0

214 lines not on this page · raw message

fs/Makefile +1 -0
index 901e189..b4db606 100644
@@ -22,6 +22,7 @@
 #
 #
 
+subdirs-$(CONFIG_CMD_CBFS) += cbfs
 subdirs-$(CONFIG_CMD_CRAMFS) := cramfs
 subdirs-$(CONFIG_CMD_EXT4) += ext4
 ifndef CONFIG_CMD_EXT4
fs/cbfs/Makefile new file +43 -0

43 lines not on this page · raw message

fs/cbfs/cbfs.c new file +339 -0

339 lines not on this page · raw message

include/cbfs.h new file +181 -0

181 lines not on this page · raw message

Signature · 1 line
1.7.7.3
#13 lore raw

PATCH 6/7 fs: Add a Coreboot Filesystem (CBFS) driver and commands

Quoted 28 lines · Simon Glass

From: Gabe Black <[email protected]>

This change adds CBFS support and some commands to use it to u-boot. These commands are:

cbfsinit - Initialize CBFS support and pull all metadata into RAM. The end of the ROM is an optional parameter which defaults to the standard 0xffffffff and can be used to support multiple CBFSes in a system. The last one set up with cbfsinit is the one that will be used.

cbfsinfo - Print information from the CBFS header.

cbfsls - Print out the size, type, and name of all the files in the current CBFS. Recognized types are translated into symbolic names.

cbfsload - Load a file from CBFS into memory. Like the similar command for fat filesystems, you can optionally provide a maximum size.

Support for CBFS is compiled in when the CONFIG_CMD_CBFS option is specified.

The CBFS driver can also be used programmatically from within u-boot.

If u-boot needs something out of CBFS very early before the heap is configured, it won't be able to use the normal CBFS support which caches some information in memory it allocates from the heap. The cbfs_file_find_uncached function searches a CBFS instance without touching the heap.

Quoted 3 lines

I would like to see a follow-up enhancement adding a DocBook tmpl file for cbfs now that we have DocBook support, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121022/a7903c48/attachment.pgp>
#14 lore raw

PATCH 6/7 fs: Add a Coreboot Filesystem (CBFS) driver and commands

Hi Tom,

Quoted 30 lines · Tom Rini
Quoted 28 lines · Simon Glass

From: Gabe Black <[email protected]>

This change adds CBFS support and some commands to use it to u-boot. These commands are:

cbfsinit - Initialize CBFS support and pull all metadata into RAM. The end of the ROM is an optional parameter which defaults to the standard 0xffffffff and can be used to support multiple CBFSes in a system. The last one set up with cbfsinit is the one that will be used.

cbfsinfo - Print information from the CBFS header.

cbfsls - Print out the size, type, and name of all the files in the current CBFS. Recognized types are translated into symbolic names.

cbfsload - Load a file from CBFS into memory. Like the similar command for fat filesystems, you can optionally provide a maximum size.

Support for CBFS is compiled in when the CONFIG_CMD_CBFS option is specified.

The CBFS driver can also be used programmatically from within u-boot.

If u-boot needs something out of CBFS very early before the heap is configured, it won't be able to use the normal CBFS support which caches some information in memory it allocates from the heap. The cbfs_file_find_uncached function searches a CBFS instance without touching the heap.

Quoted 6 lines
Quoted 3 lines

I would like to see a follow-up enhancement adding a DocBook tmpl file for cbfs now that we have DocBook support, thanks!

OK I have sent a patch, although I have a few questions...

Regards,
Simon

Quoted 3 lines

--
Tom

#15 lore raw

PATCH 6/7 fs: Add a Coreboot Filesystem (CBFS) driver and commands

In reply to Simon Glass

Dear Simon Glass,

Quoted 4 lines · In message <[email protected]> you wrote:

From: Gabe Black <[email protected]>

This change adds CBFS support and some commands to use it to u-boot. These commands are:

...

common/cmd_cbfs.c line 5

Quoted 8 lines
common/cmd_cbfs.c new file +5 -0
@@ -0,0 +1,214 @@
+/*
+ * Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.

file CREDITS ? Please fix globally...

Is any of this code taken from any other project? If yes, then please attribute properly...

Best regards,

Wolfgang Denk

Signature · 6 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
I've got to get something inside me. Some coffee  or  something.  And
then the world will somehow be better.
                                     - Terry Pratchett, _Men at Arms_
#16 lore raw

PATCH 6/7 fs: Add a Coreboot Filesystem (CBFS) driver and commands

Quoted 20 lines · Wolfgang Denk

Dear Simon Glass,

Quoted 4 lines · In message <[email protected]> you wrote:

From: Gabe Black <[email protected]>

This change adds CBFS support and some commands to use it to u-boot. These commands are:

...

common/cmd_cbfs.c line 5

Quoted 8 lines
common/cmd_cbfs.c new file +5 -0
@@ -0,0 +1,214 @@
+/*
+ * Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.

file CREDITS ? Please fix globally...

Quoted 2 lines

Is any of this code taken from any other project? If yes, then please attribute properly...

Sorry? U-Boot has a CREDITS file but only ~10% of the files reference it.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121031/58f52340/attachment.pgp>
#17 lore raw

PATCH 6/7 fs: Add a Coreboot Filesystem (CBFS) driver and commands

Hi,

Quoted 21 lines · Tom Rini
Quoted 20 lines · Wolfgang Denk

Dear Simon Glass,

Quoted 4 lines · In message <[email protected]> you wrote:

From: Gabe Black <[email protected]>

This change adds CBFS support and some commands to use it to u-boot. These commands are:

...

common/cmd_cbfs.c line 5

Quoted 8 lines
common/cmd_cbfs.c new file +5 -0
@@ -0,0 +1,214 @@
+/*
+ * Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.

file CREDITS ? Please fix globally...

Quoted 5 lines
Quoted 2 lines

Is any of this code taken from any other project? If yes, then please attribute properly...

Sorry? U-Boot has a CREDITS file but only ~10% of the files reference it.

Tom or Wolfgang, can you please explain what I should do here? I don't know what to do about the CREDITS line.

Regards,
Simon

Quoted 3 lines

--
Tom

#18 lore raw

PATCH 6/7 fs: Add a Coreboot Filesystem (CBFS) driver and commands

Dear Simon Glass,

Quoted 13 lines · In message <CAPnjgZ2hD4ZgzM=0RpPSGr0-iOJTV+q40E3gYExEqXndkoPPxQ@mail.gmail.com>…
Quoted 13 lines
Quoted 13 lines

common/cmd_cbfs.c line 5

Quoted 9 lines
common/cmd_cbfs.c new file +5 -0
@@ -0,0 +1,214 @@
+/*
+ * Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.

file CREDITS ? Please fix globally...

Quoted 5 lines
Quoted 5 lines
Quoted 2 lines

Is any of this code taken from any other project? If yes, then please attribute properly...

Sorry? U-Boot has a CREDITS file but only ~10% of the files reference it.

Yes, U-Boot has such a file, and I wonder if we should remove it. After all, all the credits are maintained in the git history of changes.

Quoted 2 lines

Tom or Wolfgang, can you please explain what I should do here? I don't know what to do about the CREDITS line.

To me the reference to a CREDITS file is reason to suspect that this code has not been written from scratch, but copied from some other project, which eventually had it's own CREDITS file.

I'm missing a reference to the origin of the code.

If this was indeed written from scratch, with no code borrowed from elsewhere, then please just drop these lines.

Best regards,

Wolfgang Denk

Signature · 6 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
"Text processing has made it possible to right-justify any idea, even
one which cannot be justified on any other grounds."
                                                 -- J. Finnegan, USC.
#19 lore raw

PATCH 6/7 fs: Add a Coreboot Filesystem (CBFS) driver and commands

Hi Wolfgang,

Quoted 26 lines · Wolfgang Denk

Dear Simon Glass,

Quoted 13 lines · In message <CAPnjgZ2hD4ZgzM=0RpPSGr0-iOJTV+q40E3gYExEqXndkoPPxQ@mail.gmail.com>…
Quoted 13 lines
Quoted 13 lines

common/cmd_cbfs.c line 5

Quoted 9 lines
common/cmd_cbfs.c new file +5 -0
@@ -0,0 +1,214 @@
+/*
+ * Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.

file CREDITS ? Please fix globally...

Quoted 5 lines
Quoted 5 lines
Quoted 2 lines

Is any of this code taken from any other project? If yes, then please attribute properly...

Sorry? U-Boot has a CREDITS file but only ~10% of the files reference it.

Yes, U-Boot has such a file, and I wonder if we should remove it. After all, all the credits are maintained in the git history of changes.

Quoted 6 lines
Quoted 2 lines

Tom or Wolfgang, can you please explain what I should do here? I don't know what to do about the CREDITS line.

To me the reference to a CREDITS file is reason to suspect that this code has not been written from scratch, but copied from some other project, which eventually had it's own CREDITS file.

Yes, quite likely the boilerplate came from another U-Boot file.

Quoted 2 lines

I'm missing a reference to the origin of the code.

It was written from scratch by Gabe - it did not come from coreboot if that is what you as asking. I confirmed with him again yesterday.

Quoted 3 lines

If this was indeed written from scratch, with no code borrowed from elsewhere, then please just drop these lines.

OK, I will do this in my follow-up patch to add DocBook support. I did find a shorter message which some U-Boot files use at one point. I will try to find that again, and use it.

Regards,
Simon

Quoted 12 lines

Best regards,

Wolfgang Denk

--
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 "Text processing has made it possible to right-justify any idea, even one which cannot be justified on any other grounds."
-- J. Finnegan, USC.

#20 lore raw

PATCH 6/7 fs: Add a Coreboot Filesystem (CBFS) driver and commands

Hi,

Quoted 45 lines · Simon Glass

Hi Wolfgang,

Quoted 26 lines · Wolfgang Denk

Dear Simon Glass,

Quoted 13 lines · In message <CAPnjgZ2hD4ZgzM=0RpPSGr0-iOJTV+q40E3gYExEqXndkoPPxQ@mail.gmail.com>…
Quoted 13 lines
Quoted 13 lines

common/cmd_cbfs.c line 5

Quoted 9 lines
common/cmd_cbfs.c new file +5 -0
@@ -0,0 +1,214 @@
+/*
+ * Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.

file CREDITS ? Please fix globally...

Quoted 5 lines
Quoted 5 lines
Quoted 2 lines

Is any of this code taken from any other project? If yes, then please attribute properly...

Sorry? U-Boot has a CREDITS file but only ~10% of the files reference it.

Yes, U-Boot has such a file, and I wonder if we should remove it. After all, all the credits are maintained in the git history of changes.

Quoted 6 lines
Quoted 2 lines

Tom or Wolfgang, can you please explain what I should do here? I don't know what to do about the CREDITS line.

To me the reference to a CREDITS file is reason to suspect that this code has not been written from scratch, but copied from some other project, which eventually had it's own CREDITS file.

Yes, quite likely the boilerplate came from another U-Boot file.

Quoted 2 lines

I'm missing a reference to the origin of the code.

It was written from scratch by Gabe - it did not come from coreboot if that is what you as asking. I confirmed with him again yesterday.

Quoted 1 line
Quoted 6 lines
Quoted 2 lines

If this was indeed written from scratch, with no code borrowed from elsewhere, then please just drop these lines.

OK, I will do this in my follow-up patch to add DocBook support. I did find a shorter message which some U-Boot files use at one point. I will try to find that again, and use it.

Well I found a very short version:

* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.

but it is inaccurate. We could perhaps change it to:

* Use of this source code is governed by a BSD-style license that can be
* found in the COPYING file.

or something similar? But so much of U-Boot already has the full version that I'm not sure this is a good idea. Here is the one I am using>

# This program is free software; you can redistribute it and/or

# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA

So for now I have sent a new patch that just takes out the CREDITS but leaves the rest of the text in. Please advise if something else is needed/preferable.

Regards,
Simon

Quoted 12 lines
Quoted 12 lines

Best regards,

Wolfgang Denk

--
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 "Text processing has made it possible to right-justify any idea, even one which cannot be justified on any other grounds."
-- J. Finnegan, USC.

#21 lore raw

PATCH 6/7 fs: Add a Coreboot Filesystem (CBFS) driver and commands

Dear Simon Glass,

Quoted 11 lines · In message <CAPnjgZ0STfp2UcFN4tMDPg_X-4VDW7gxOdsSCGsBq6sUM0oe7Q@mail.gmail.com>…

Well I found a very short version:

* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.

but it is inaccurate. We could perhaps change it to:

* Use of this source code is governed by a BSD-style license that can be
* found in the COPYING file.

Quoted 8 lines

or something similar? But so much of U-Boot already has the full version that I'm not sure this is a good idea. Here is the one I am using>

# This program is free software; you can redistribute it and/or

# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.

Note that this is the GPL, and _not_ any BSD-style license !

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
Children begin by loving their parents. After a time they judge them.
Rarely, if ever, do they forgive them.                  - Oscar Wilde
#22 lore raw

PATCH 6/7 fs: Add a Coreboot Filesystem (CBFS) driver and commands

Hi Wolfgang,

Quoted 18 lines · Wolfgang Denk

Dear Simon Glass,

Quoted 15 lines · In message <CAPnjgZ0STfp2UcFN4tMDPg_X-4VDW7gxOdsSCGsBq6sUM0oe7Q@mail.gmail.com>…

Well I found a very short version:

* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.

but it is inaccurate. We could perhaps change it to:

* Use of this source code is governed by a BSD-style license that can be
* found in the COPYING file.

or something similar? But so much of U-Boot already has the full version that I'm not sure this is a good idea. Here is the one I am using>

Quoted 6 lines
Quoted 4 lines

# This program is free software; you can redistribute it and/or

# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.

Note that this is the GPL, and _not_ any BSD-style license !

Yes. I've gone with the longer one, just removing the CREDITS. That seems to be the most common message in U-Boot.

Regards,
Simon

Quoted 11 lines

Best regards,

Wolfgang Denk

--
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 Children begin by loving their parents. After a time they judge them.
Rarely, if ever, do they forgive them. - Oscar Wilde

#23 lore raw

PATCH 6/7 fs: Add a Coreboot Filesystem (CBFS) driver and commands

Dear Simon Glass,

Quoted 20 lines · In message <CAPnjgZ1DbXwS=bgzLecoLM-V0785Zi6bytKTM=RP2EcnSkt4eA@mail.gmail.com>…
Quoted 20 lines
Quoted 19 lines

Well I found a very short version:

* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.

but it is inaccurate. We could perhaps change it to:

* Use of this source code is governed by a BSD-style license that can be
* found in the COPYING file.

or something similar? But so much of U-Boot already has the full version that I'm not sure this is a good idea. Here is the one I am using>

# This program is free software; you can redistribute it and/or

# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.
Quoted 4 lines
Quoted 1 line

Note that this is the GPL, and _not_ any BSD-style license !

Yes. I've gone with the longer one, just removing the CREDITS. That seems to be the most common message in U-Boot.

You appear to miss the point. You switched the licensing model from BSD to GPL - not that I would complain about such a move, on contrary, but I wonder if this is intentional and agreed by the authors of the code?

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
The sight of death frightens them [Earthers].
	-- Kras the Klingon, "Friday's Child", stardate 3497.2
#24 lore raw

PATCH 6/7 fs: Add a Coreboot Filesystem (CBFS) driver and commands

Hi Wolfgang,

Quoted 25 lines · Wolfgang Denk

Dear Simon Glass,

Quoted 22 lines · In message <CAPnjgZ1DbXwS=bgzLecoLM-V0785Zi6bytKTM=RP2EcnSkt4eA@mail.gmail.com>…
Quoted 21 lines
Quoted 11 lines

Well I found a very short version:

* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.

but it is inaccurate. We could perhaps change it to:

* Use of this source code is governed by a BSD-style license that can be
* found in the COPYING file.

Quoted 8 lines

or something similar? But so much of U-Boot already has the full version that I'm not sure this is a good idea. Here is the one I am using>

# This program is free software; you can redistribute it and/or

# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.

Note that this is the GPL, and _not_ any BSD-style license !

Quoted 8 lines
Quoted 2 lines

Yes. I've gone with the longer one, just removing the CREDITS. That seems to be the most common message in U-Boot.

You appear to miss the point. You switched the licensing model from BSD to GPL - not that I would complain about such a move, on contrary, but I wonder if this is intentional and agreed by the authors of the code?

Yes I am now completely lost :-)

Where have I changed the licensing model?

Your original request was to remove the CREDITS line I think. I have done that in this patch:

http://patchwork.ozlabs.org/patch/197314/

The above discussion about copyright message is separate to that. I was looking around the code base for a possible replacement (shorter) message because I thought that was what you were looking for. I found the BSD one, but have not changed any code to use it.

So yes, please can you explain what I am missing here?

Regards,
Simon

Quoted 11 lines

Best regards,

Wolfgang Denk

--
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 The sight of death frightens them [Earthers].
-- Kras the Klingon, "Friday's Child", stardate 3497.2

#25 lore raw

PATCH 6/7 fs: Add a Coreboot Filesystem (CBFS) driver and commands

Dear Simon,

Quoted 2 lines · In message <CAPnjgZ0k58-JG+MxvKp=6JxThMPb8pzHp+xFpDnB8JCtamtGJQ@mail.gmail.com>…

Yes I am now completely lost :-)

Me too.

Quoted 8 lines

Where have I changed the licensing model?

Your original request was to remove the CREDITS line I think. I have done that in this patch:

http://patchwork.ozlabs.org/patch/197314/

The above discussion about copyright message is separate to that. I

Ah... I understood it was part of your intended changes.

Quoted 5 lines

was looking around the code base for a possible replacement (shorter) message because I thought that was what you were looking for. I found the BSD one, but have not changed any code to use it.

So yes, please can you explain what I am missing here?

Maybe everything is clear to you, And I just did not understand. I just wanted to point out thatt he misc postings to this topic contained references to different licenses - starting from code under GPLv2+ metioning some BSD license to GPL again. If all this doesn't change the code, I suggest we ignore it all.

Best regards,

Wolfgang Denk

Signature · 6 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
As far as the laws of mathematics refer  to  reality,  they  are  not
certain;  and  as  far  as  they  are  certain,  they do not refer to
reality.                                           -- Albert Einstein
#26 lore raw

PATCH 6/7 fs: Add a Coreboot Filesystem (CBFS) driver and commands

Hi Wolfgang,

Quoted 23 lines · Wolfgang Denk

Dear Simon,

Quoted 2 lines · In message <CAPnjgZ0k58-JG+MxvKp=6JxThMPb8pzHp+xFpDnB8JCtamtGJQ@mail.gmail.com>…

Yes I am now completely lost :-)

Me too.

Quoted 8 lines

Where have I changed the licensing model?

Your original request was to remove the CREDITS line I think. I have done that in this patch:

http://patchwork.ozlabs.org/patch/197314/

The above discussion about copyright message is separate to that. I

Ah... I understood it was part of your intended changes.

Quoted 4 lines

was looking around the code base for a possible replacement (shorter) message because I thought that was what you were looking for. I found the BSD one, but have not changed any code to use it.

Quoted 7 lines
Quoted 1 line

So yes, please can you explain what I am missing here?

Maybe everything is clear to you, And I just did not understand. I just wanted to point out thatt he misc postings to this topic contained references to different licenses - starting from code under GPLv2+ metioning some BSD license to GPL again. If all this doesn't change the code, I suggest we ignore it all.

Sounds good. From my side it was just a discussion on the best license text to use.

Regards,
Simon

Quoted 12 lines

Best regards,

Wolfgang Denk

--
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 As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to
reality. -- Albert Einstein

#27 lore raw

PATCH 7/7 config: Enable CBFS, ext4 for coreboot

In reply to Simon Glass

Enable Coreboot and EXT4 Filesystems on the coreboot board.

---
 include/configs/coreboot.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
include/configs/coreboot.h +3 -0
index 0e89242..3df085b 100644
@@ -92,6 +92,9 @@
 #define CONFIG_MAC_PARTITION
 #define CONFIG_ISO_PARTITION		/* Experimental */
 
+#define CONFIG_CMD_CBFS
+#define CONFIG_CMD_EXT4
+#define CONFIG_CMD_EXT4_WRITE
 
 /*-----------------------------------------------------------------------
  * Video Configuration
Signature · 1 line
1.7.7.3
#28 lore raw

PATCH 7/7 config: Enable CBFS, ext4 for coreboot

Quoted 3 lines · Simon Glass

Enable Coreboot and EXT4 Filesystems on the coreboot board.

cmd_ext4.c: In function 'do_ext4_write':
cmd_ext4.c:110:3: error: format '%lu' expects type 'long unsigned int', but argument 4 has type 'int'

Is what I see with my toolchain.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121022/3333e3f0/attachment.pgp>
#29 lore raw

PATCH 7/7 config: Enable CBFS, ext4 for coreboot

Hi Tom,

Quoted 11 lines · Tom Rini
Quoted 3 lines · Simon Glass

Enable Coreboot and EXT4 Filesystems on the coreboot board.

cmd_ext4.c: In function 'do_ext4_write':
cmd_ext4.c:110:3: error: format '%lu' expects type 'long unsigned int', but argument 4 has type 'int'

Is what I see with my toolchain.

Hmm I thought I fixed the ext4 x86 warnings with my previous patch, but clearly not. I will take another look and perhaps come up with another patch.

Regards,
Simon

Quoted 3 lines

--
Tom

#30 lore raw

PATCH 1/7 ide: Add printf format string for CONFIG_SYS_64BIT_LBA option

In reply to Simon Glass
Quoted 8 lines · Simon Glass

From: Gabe Black <[email protected]>

The size of an LBA type changes depending on this option. We need to use a different printf() string in each case, so create a define for this.

Except for part 5 of 7, this series is applied to u-boot/master, but please address the problem I reported on part 7.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121022/63d83a93/attachment.pgp>