Skip to contentSkip to conversation

Fix build errors when CONFIG_LOGBUFFER and CONFIG_FIT are enabled

PATCH New Marian Balakowicz 2 participants 4 messages May 7, 2008 – May 9, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix build errors when CONFIG_LOGBUFFER and CONFIG_FIT are enabled

Recent modifcations to LOGBUFFER handling code were incorrecly introduced to fit_check_kernel() routine during
"Merge branch 'new-image' of git://www.denx.de/git/u-boot-testing",
commit 27f33e9f45ef7f9685cbdc65066a1828e85dde4f.

This patch cleans up this merge issue.

---

 common/cmd_bootm.c |   11 -----------
 common/image.c     |    4 ----
 2 files changed, 0 insertions(+), 15 deletions(-)
common/cmd_bootm.c +0 -11
index 44f6b9f..0d67132 100644
@@ -433,17 +433,6 @@ static int fit_check_kernel (const void *fit, int os_noffset, int verify)
 	}
 	show_boot_progress (105);
 
-#ifdef CONFIG_LOGBUFFER
-#ifndef CONFIG_ALT_LB_ADDR
-	kbd=gd->bd;
-	/* Prevent initrd from overwriting logbuffer */
-	if (initrd_high < (kbd->bi_memsize-LOGBUFF_LEN-LOGBUFF_OVERHEAD))
-		initrd_high = kbd->bi_memsize-LOGBUFF_LEN-LOGBUFF_OVERHEAD;
-	debug ("## Logbuffer at 0x%08lX ", kbd->bi_memsize-LOGBUFF_LEN);
-#else
-	debug ("## Logbuffer at 0x%08lX ", CONFIG_ALT_LB_ADDR);
-#endif
-#endif
 	if (!fit_image_check_target_arch (fit, os_noffset)) {
 		puts ("Unsupported Architecture\n");
 		show_boot_progress (-105);
common/image.c +0 -4
index 4a024d4..0a78385 100644
@@ -36,10 +36,6 @@
 #include <dataflash.h>
 #endif
 
-#ifdef CONFIG_LOGBUFFER
-#include <logbuff.h>
-#endif
-
 #if defined(CONFIG_TIMESTAMP) || defined(CONFIG_CMD_DATE)
 #include <rtc.h>
 #endif
#1 lore raw

PATCH 1/1 Fix build errors when CONFIG_LOGBUFFER and CONFIG_FIT are enabled

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

Recent modifcations to LOGBUFFER handling code were incorrecly introduced to fit_check_kernel() routine during
"Merge branch 'new-image' of git://www.denx.de/git/u-boot-testing",
commit 27f33e9f45ef7f9685cbdc65066a1828e85dde4f.

This patch cleans up this merge issue.

Ummm... but don't you break logbuffer support that way?

Quoted 17 lines

---

 common/cmd_bootm.c |   11 -----------
 common/image.c     |    4 ----
 2 files changed, 0 insertions(+), 15 deletions(-)
common/cmd_bootm.c +0 -1
index 44f6b9f..0d67132 100644
@@ -433,17 +433,6 @@ static int fit_check_kernel (const void *fit, int os_noffset, int verify)
 	}
 	show_boot_progress (105);
 
-#ifdef CONFIG_LOGBUFFER

common/cmd_bootm.c static int fit_check_kernel (const void *fit, int os_noffset, int verify) · line 446

Quoted 10 lines
common/cmd_bootm.c +0 -10
-#ifndef CONFIG_ALT_LB_ADDR
-	kbd=gd->bd;
-	/* Prevent initrd from overwriting logbuffer */
-	if (initrd_high < (kbd->bi_memsize-LOGBUFF_LEN-LOGBUFF_OVERHEAD))
-		initrd_high = kbd->bi_memsize-LOGBUFF_LEN-LOGBUFF_OVERHEAD;
-	debug ("## Logbuffer at 0x%08lX ", kbd->bi_memsize-LOGBUFF_LEN);
-#else
-	debug ("## Logbuffer at 0x%08lX ", CONFIG_ALT_LB_ADDR);
-#endif
-#endif

Well, it's easy to remove the code here, but if serves a purpose, so it cannot be simply removed without adding it somewhere else. Or am I missing something?

Best regards,

Wolfgang Denk

Signature · 4 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
If ignorance is bliss, why aren't there more happy people?
#2 lore raw

PATCH 1/1 Fix build errors when CONFIG_LOGBUFFER and CONFIG_FIT are enabled

Quoted 26 lines · Wolfgang Denk
Quoted 6 lines · In message <[email protected]> you wrote:

Recent modifcations to LOGBUFFER handling code were incorrecly introduced to fit_check_kernel() routine during
"Merge branch 'new-image' of git://www.denx.de/git/u-boot-testing",
commit 27f33e9f45ef7f9685cbdc65066a1828e85dde4f.

This patch cleans up this merge issue.

Ummm... but don't you break logbuffer support that way?

Quoted 16 lines

---

 common/cmd_bootm.c |   11 -----------
 common/image.c     |    4 ----
 2 files changed, 0 insertions(+), 15 deletions(-)
common/cmd_bootm.c +0 -0
index 44f6b9f..0d67132 100644
@@ -433,17 +433,6 @@ static int fit_check_kernel (const void *fit, int os_noffset, int verify)
 	}
 	show_boot_progress (105);
 
Quoted 15 lines

common/cmd_bootm.c static int fit_check_kernel (const void *fit, int os_noffset, int verify) · line 446

Quoted 11 lines
common/cmd_bootm.c +0 -11
-#ifdef CONFIG_LOGBUFFER
-#ifndef CONFIG_ALT_LB_ADDR
-	kbd=gd->bd;
-	/* Prevent initrd from overwriting logbuffer */
-	if (initrd_high < (kbd->bi_memsize-LOGBUFF_LEN-LOGBUFF_OVERHEAD))
-		initrd_high = kbd->bi_memsize-LOGBUFF_LEN-LOGBUFF_OVERHEAD;
-	debug ("## Logbuffer at 0x%08lX ", kbd->bi_memsize-LOGBUFF_LEN);
-#else
-	debug ("## Logbuffer at 0x%08lX ", CONFIG_ALT_LB_ADDR);
-#endif
-#endif

Well, it's easy to remove the code here, but if serves a purpose, so it cannot be simply removed without adding it somewhere else. Or am I missing something?

This piece of the code was removed earlier with one of the Kumar's patches that added LMB support for booting allocations.

Then it got incorrectly merged back in a wrong place, which this patch intends to fix.

As to the check itself:
- it seem bogus, it does not properly check for initrd and logbuffer areas overlaps
- it does not take into account the recent "effective" memory size limitation introduced for ppc

I'll post a separate, preliminary patch that will attempt to implement the check in a proper way.

Cheers,
Marian

#3 lore raw

PATCH 1/1 Fix build errors when CONFIG_LOGBUFFER and CONFIG_FIT are enabled

In reply to Marian Balakowicz
Quoted 5 lines · In message <[email protected]> you wrote:

Recent modifcations to LOGBUFFER handling code were incorrecly introduced to fit_check_kernel() routine during
"Merge branch 'new-image' of git://www.denx.de/git/u-boot-testing",
commit 27f33e9f45ef7f9685cbdc65066a1828e85dde4f.

Quoted 8 lines

This patch cleans up this merge issue.

---

 common/cmd_bootm.c |   11 -----------
 common/image.c     |    4 ----
 2 files changed, 0 insertions(+), 15 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 8 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 see that Microsoft's campaign  to  destroy  all  knowledge  of  any
operating   environment   but  its  own  environment-of-the-year  has
succeeded in creating a generation of users who don't understand  the
concept of a shell...
            -- L. Peter Deutsch in <[email protected]>