Patchwork sparc: fix tftpboot.img build

login
register
mail settings
Submitter Sam Ravnborg
Date June 8, 2009, 7:20 p.m.
Message ID <20090608192043.GA30278@uranus.ravnborg.org>
Download mbox | patch
Permalink /patch/28242/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Sam Ravnborg - June 8, 2009, 7:20 p.m.
Kjetil Oftedal mentioned that piggyback_32 was failing
when building a sparc image.

I tracked this down to the fact that the kernel no longer
provided an absolute symbol named "end".

Commit 86ed40bd6fe511d26bb8f3fa65a84cb65c235366 ("sparc: unify sections.h")
renamed end to _end but failed to update piggyback_32.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Kjetil Oftedal <oftedal@gmail.com>
Cc: Robert Reif <reif@earthlink.net>
---

This is not even build tested - but looks obvious.

	Sam

--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - June 18, 2009, 9:45 a.m.
From: Sam Ravnborg <sam@ravnborg.org>
Date: Mon, 8 Jun 2009 21:20:43 +0200

> Kjetil Oftedal mentioned that piggyback_32 was failing
> when building a sparc image.
> 
> I tracked this down to the fact that the kernel no longer
> provided an absolute symbol named "end".
> 
> Commit 86ed40bd6fe511d26bb8f3fa65a84cb65c235366 ("sparc: unify sections.h")
> renamed end to _end but failed to update piggyback_32.
> 
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> Cc: Kjetil Oftedal <oftedal@gmail.com>
> Cc: Robert Reif <reif@earthlink.net>
> ---
> 
> This is not even build tested - but looks obvious.

I don't even know how to build test this:

davem@sunset:~/src/GIT/sparc-next-2.6$ make ARCH=sparc tftpboot.img
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-sparc
  CALL    scripts/checksyscalls.sh
<stdin>:1519:2: warning: #warning syscall perf_counter_open not implemented
  CHK     include/linux/compile.h
make[1]: *** No rule to make target `arch/sparc/boot/piggyback', needed by `arch/sparc/boot/tftpboot.img'.  Stop.
make: *** [tftpboot.img] Error 2
davem@sunset:~/src/GIT/sparc-next-2.6$ 
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sam Ravnborg - June 18, 2009, 1:51 p.m.
On Thu, Jun 18, 2009 at 02:45:54AM -0700, David Miller wrote:
> From: Sam Ravnborg <sam@ravnborg.org>
> Date: Mon, 8 Jun 2009 21:20:43 +0200
> 
> > Kjetil Oftedal mentioned that piggyback_32 was failing
> > when building a sparc image.
> > 
> > I tracked this down to the fact that the kernel no longer
> > provided an absolute symbol named "end".
> > 
> > Commit 86ed40bd6fe511d26bb8f3fa65a84cb65c235366 ("sparc: unify sections.h")
> > renamed end to _end but failed to update piggyback_32.
> > 
> > Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> > Cc: Kjetil Oftedal <oftedal@gmail.com>
> > Cc: Robert Reif <reif@earthlink.net>
> > ---
> > 
> > This is not even build tested - but looks obvious.
> 
> I don't even know how to build test this:
> 
> davem@sunset:~/src/GIT/sparc-next-2.6$ make ARCH=sparc tftpboot.img
>   CHK     include/linux/version.h
>   CHK     include/linux/utsrelease.h
>   SYMLINK include/asm -> include/asm-sparc
>   CALL    scripts/checksyscalls.sh
> <stdin>:1519:2: warning: #warning syscall perf_counter_open not implemented
>   CHK     include/linux/compile.h
> make[1]: *** No rule to make target `arch/sparc/boot/piggyback', needed by `arch/sparc/boot/tftpboot.img'.  Stop.
> make: *** [tftpboot.img] Error 2
> davem@sunset:~/src/GIT/sparc-next-2.6$ 


Thats a bug from when we unified sparc.
Blame the person that unified boot/Makefile :-(

It looks like a simple piggyback => piggyback_32 in Makefile.

I will repost when I can actually build-test it.
(Which may take a while).


	Sam

--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/arch/sparc/boot/piggyback_32.c b/arch/sparc/boot/piggyback_32.c
index c9f500c..e6070a3 100644
--- a/arch/sparc/boot/piggyback_32.c
+++ b/arch/sparc/boot/piggyback_32.c
@@ -84,7 +84,7 @@  int main(int argc,char **argv)
 	while (fgets (buffer, 1024, map)) {
 		if (!strcmp (buffer + 8, " T start\n") || !strcmp (buffer + 16, " T start\n"))
 			start = strtoul (buffer, NULL, 16);
-		else if (!strcmp (buffer + 8, " A end\n") || !strcmp (buffer + 16, " A end\n"))
+		else if (!strcmp (buffer + 8, " A _end\n") || !strcmp (buffer + 16, " A _end\n"))
 			end = strtoul (buffer, NULL, 16);
 	}
 	fclose (map);