Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] fis: make fis list more like RedBoot's output
@ 2010-05-12 17:35 H Hartley Sweeten
  2010-05-12 20:32 ` [Buildroot] [PATCH v2] " H Hartley Sweeten
  0 siblings, 1 reply; 3+ messages in thread
From: H Hartley Sweeten @ 2010-05-12 17:35 UTC (permalink / raw)
  To: buildroot

The output of 'fis list' does not fit cleanly on an 80 column
terminal.  This modifies the output to fit and more closely
resemble the output from RedBoot.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>

---

diff --git a/package/fis/fis-003-list_output.patch b/package/fis/fis-003-list_output.patch
new file mode 100644
index 0000000..1d3ea24
--- /dev/null
+++ b/package/fis/fis-003-list_output.patch
@@ -0,0 +1,21 @@
+--- fis.orig/fis.c	2010-05-12 10:22:10.000000000 -0700
++++ fis/fis.c	2010-05-12 10:19:24.000000000 -0700
+@@ -142,8 +142,8 @@
+ 
+ static void dump_desc(FILE* f, const struct fis_image_desc* d)
+ {
+-  fprintf(f,"%16s: flash: 0x%08x mem:0x%08x size:0x%08x checksum:0x%08x\n",
+-             d->name, d->flash_base, d->mem_base, d->size, d->file_cksum);
++  fprintf(f,"%-16s  0x%08x  0x%08x  0x%08x  0x%08x  0x%08x\n",
++             d->name, d->flash_base, d->mem_base, d->size, d->entry_point, d->file_cksum);
+   for (unsigned int i=0; i<(sizeof(d->skips)/4); ++i) {
+     if (d->skips[i]==0x736b6970 || d->skips[i]==0x70696b73) { // "skip"
+       uint32_t offset = d->skips[i+1];
+@@ -400,6 +400,7 @@
+   CHECK(fd=open(device,O_RDONLY),-1);
+   dir_t dir;
+   load_dir(fd,offset,&size,swap_endianness,&dir);
++  fprintf(stdout,"Name              FLASH addr  Mem addr    Length      Entry point Checksum\n");
+   FOR_EACH_DIR_ENTRY(dir,i) {
+     dump_desc(stdout,get(i));
+   }

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

* [Buildroot] [PATCH v2] fis: make fis list more like RedBoot's output
  2010-05-12 17:35 [Buildroot] [PATCH] fis: make fis list more like RedBoot's output H Hartley Sweeten
@ 2010-05-12 20:32 ` H Hartley Sweeten
  2012-02-02 11:44   ` Peter Korsgaard
  0 siblings, 1 reply; 3+ messages in thread
From: H Hartley Sweeten @ 2010-05-12 20:32 UTC (permalink / raw)
  To: buildroot

The output of 'fis list' does not fit cleanly on an 80 column
terminal.  This modifies the output to fit and more closely
resemble the output from RedBoot.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>

---

Sorry, the first patch was based on a change in my tree.  Here is
the patch based on the Buildroot git tree.

diff --git a/package/fis/fis-003-list_output.patch b/package/fis/fis-003-list_output.patch
new file mode 100644
index 0000000..6c1e4eb
--- /dev/null
+++ b/package/fis/fis-003-list_output.patch
@@ -0,0 +1,21 @@
+--- fis.orig/fis.c	2010-05-12 10:22:10.000000000 -0700
++++ fis/fis.c	2010-05-12 10:19:24.000000000 -0700
+@@ -142,8 +142,8 @@
+ 
+ static void dump_desc(FILE* f, const struct fis_image_desc* d)
+ {
+-  fprintf(f,"%16s: flash addr = 0x%08x, mem addr = 0x%08x, size = 0x%08x, checksum = 0x%08x\n",
+-             d->name, d->flash_base, d->mem_base, d->size, d->file_cksum);
++  fprintf(f,"%-16s  0x%08x  0x%08x  0x%08x  0x%08x  0x%08x\n",
++             d->name, d->flash_base, d->mem_base, d->size, d->entry_point, d->file_cksum);
+   for (unsigned int i=0; i<(sizeof(d->skips)/4); ++i) {
+     if (d->skips[i]==0x736b6970 || d->skips[i]==0x70696b73) { // "skip"
+       uint32_t offset = d->skips[i+1];
+@@ -400,6 +400,7 @@
+   CHECK(fd=open(device,O_RDONLY),-1);
+   dir_t dir;
+   load_dir(fd,offset,&size,swap_endianness,&dir);
++  fprintf(stdout,"Name              FLASH addr  Mem addr    Length      Entry point Checksum\n");
+   FOR_EACH_DIR_ENTRY(dir,i) {
+     dump_desc(stdout,get(i));
+   }

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

* [Buildroot] [PATCH v2] fis: make fis list more like RedBoot's output
  2010-05-12 20:32 ` [Buildroot] [PATCH v2] " H Hartley Sweeten
@ 2012-02-02 11:44   ` Peter Korsgaard
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2012-02-02 11:44 UTC (permalink / raw)
  To: buildroot

>>>>> "H" == H Hartley Sweeten <hartleys@visionengravers.com> writes:

 H> The output of 'fis list' does not fit cleanly on an 80 column
 H> terminal.  This modifies the output to fit and more closely
 H> resemble the output from RedBoot.

 H> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>

Sorry for the very slow response - Committed, thanks.


-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2012-02-02 11:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-12 17:35 [Buildroot] [PATCH] fis: make fis list more like RedBoot's output H Hartley Sweeten
2010-05-12 20:32 ` [Buildroot] [PATCH v2] " H Hartley Sweeten
2012-02-02 11:44   ` Peter Korsgaard

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