Skip to contentSkip to conversation

: Fix sparc64 build...

PATCH In review David Miller 4 participants 14 messages Dec 3, 2009 – Dec 6, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : Fix sparc64 build...

So I finally am about to have enough time to start looking into sparc64 support again.

And, surprise! The trunk doesn't even build. :-)

2009-12-03 David S. Miller <[email protected]>

* conf/sparc64-ieee1275.rmk (grub_mkimage_SOURCES, grub_setup_SOURCES, grub_ofpathname_SOURCES): Add gnulib/progname.c
* util/sparc64/ieee1275/grub-mkimage.c: Include <grub/i18n.h> and "progname.h"
* util/sparc64/ieee1275/grub-ofpathname.c: Likewise.
* util/sparc64/ieee1275/grub-setup.c: Likewise. (usage): Add missing comma in printf.

=== modified file 'conf/sparc64-ieee1275.rmk'

sparc64-ieee1275.rmk +3 -3
@@ -63,7 +63,7 @@
 
 # For grub-mkimage.
 grub_mkimage_SOURCES = util/sparc64/ieee1275/grub-mkimage.c util/misc.c \
-        util/resolve.c
+        util/resolve.c gnulib/progname.c
 
 # For grub-setup.
 util/sparc64/ieee1275/grub-setup.c_DEPENDENCIES = grub_setup_init.h
@@ -82,12 +82,12 @@
 	partmap/sun.c partmap/acorn.c				\
 	\
 	disk/raid.c disk/mdraid_linux.c disk/lvm.c		\
-	util/raid.c util/lvm.c					\
+	util/raid.c util/lvm.c gnulib/progname.c		\
 	grub_setup_init.c
 
 # For grub-ofpathname.
 grub_ofpathname_SOURCES = util/sparc64/ieee1275/grub-ofpathname.c \
-	util/ieee1275/ofpath.c util/misc.c
+	util/ieee1275/ofpath.c util/misc.c gnulib/progname.c
 
 # Scripts.
 sbin_SCRIPTS = grub-install

=== modified file 'util/sparc64/ieee1275/grub-mkimage.c'

sparc64/ieee1275/grub-mkimage.c +3 -0
@@ -21,6 +21,7 @@
 #include <grub/machine/boot.h>
 #include <grub/machine/kernel.h>
 #include <grub/kernel.h>
+#include <grub/i18n.h>
 #include <grub/disk.h>
 #include <grub/util/misc.h>
 #include <grub/util/resolve.h>
@@ -34,6 +35,8 @@
 #define _GNU_SOURCE	1
 #include <getopt.h>
 
+#include "progname.h"
+
 static void
 compress_kernel (char *kernel_img, size_t kernel_size,
 		 char **core_img, size_t *core_size)

=== modified file 'util/sparc64/ieee1275/grub-ofpathname.c'

sparc64/ieee1275/grub-ofpathname.c +4 -0
@@ -20,6 +20,10 @@
 #include <grub/util/misc.h>
 #include <grub/util/ofpath.h>
 
+#include <grub/i18n.h>
+
+#include "progname.h"
+
 int main(int argc, char **argv)
 {
   char *of_path;

=== modified file 'util/sparc64/ieee1275/grub-setup.c'

sparc64/ieee1275/grub-setup.c +4 -1
@@ -21,6 +21,7 @@
 #include <grub/types.h>
 #include <grub/util/misc.h>
 #include <grub/device.h>
+#include <grub/i18n.h>
 #include <grub/disk.h>
 #include <grub/file.h>
 #include <grub/fs.h>
@@ -49,6 +50,8 @@
 #define _GNU_SOURCE	1
 #include <getopt.h>
 
+#include "progname.h"
+
 /* This program fills in various fields inside of the 'boot' and 'core'
  * image files.
  *
@@ -419,7 +422,7 @@
   -v, --verbose           print verbose messages\n\
 \n\
 Report bugs to <%s>.\n\
-", program_name
+", program_name,
 	    DEFAULT_BOOT_FILE, DEFAULT_CORE_FILE, DEFAULT_DIRECTORY,
 	    DEFAULT_DEVICE_MAP, PACKAGE_BUGREPORT);
 
#1 lore raw

Hello, nice to see you again.

Quoted 7 lines · David Miller

So I finally am about to have enough time to start looking into sparc64 support again.

And, surprise! The trunk doesn't even build. :-)

Committed. BTW in experimental we merged sparc64's and i386's grub-install. Do you think it would make sense to merge some other tools as well?

Quoted 112 lines

2009-12-03 David S. Miller <[email protected]>

* conf/sparc64-ieee1275.rmk (grub_mkimage_SOURCES, grub_setup_SOURCES, grub_ofpathname_SOURCES): Add gnulib/progname.c
* util/sparc64/ieee1275/grub-mkimage.c: Include <grub/i18n.h> and "progname.h"
* util/sparc64/ieee1275/grub-ofpathname.c: Likewise.
* util/sparc64/ieee1275/grub-setup.c: Likewise. (usage): Add missing comma in printf.

=== modified file 'conf/sparc64-ieee1275.rmk'

sparc64-ieee1275.rmk +3 -3
@@ -63,7 +63,7 @@
 
 # For grub-mkimage.
 grub_mkimage_SOURCES = util/sparc64/ieee1275/grub-mkimage.c util/misc.c \
-        util/resolve.c
+        util/resolve.c gnulib/progname.c
 
 # For grub-setup.
 util/sparc64/ieee1275/grub-setup.c_DEPENDENCIES = grub_setup_init.h
@@ -82,12 +82,12 @@
 	partmap/sun.c partmap/acorn.c				\
 	\
 	disk/raid.c disk/mdraid_linux.c disk/lvm.c		\
-	util/raid.c util/lvm.c					\
+	util/raid.c util/lvm.c gnulib/progname.c		\
 	grub_setup_init.c
 
 # For grub-ofpathname.
 grub_ofpathname_SOURCES = util/sparc64/ieee1275/grub-ofpathname.c \
-	util/ieee1275/ofpath.c util/misc.c
+	util/ieee1275/ofpath.c util/misc.c gnulib/progname.c
 
 # Scripts.
 sbin_SCRIPTS = grub-install

=== modified file 'util/sparc64/ieee1275/grub-mkimage.c'

sparc64/ieee1275/grub-mkimage.c +3 -0
@@ -21,6 +21,7 @@
 #include <grub/machine/boot.h>
 #include <grub/machine/kernel.h>
 #include <grub/kernel.h>
+#include <grub/i18n.h>
 #include <grub/disk.h>
 #include <grub/util/misc.h>
 #include <grub/util/resolve.h>
@@ -34,6 +35,8 @@
 #define _GNU_SOURCE	1
 #include <getopt.h>
 
+#include "progname.h"
+
 static void
 compress_kernel (char *kernel_img, size_t kernel_size,
 		 char **core_img, size_t *core_size)

=== modified file 'util/sparc64/ieee1275/grub-ofpathname.c'

sparc64/ieee1275/grub-ofpathname.c +4 -0
@@ -20,6 +20,10 @@
 #include <grub/util/misc.h>
 #include <grub/util/ofpath.h>
 
+#include <grub/i18n.h>
+
+#include "progname.h"
+
 int main(int argc, char **argv)
 {
   char *of_path;

=== modified file 'util/sparc64/ieee1275/grub-setup.c'

sparc64/ieee1275/grub-setup.c +4 -1
@@ -21,6 +21,7 @@
 #include <grub/types.h>
 #include <grub/util/misc.h>
 #include <grub/device.h>
+#include <grub/i18n.h>
 #include <grub/disk.h>
 #include <grub/file.h>
 #include <grub/fs.h>
@@ -49,6 +50,8 @@
 #define _GNU_SOURCE	1
 #include <getopt.h>
 
+#include "progname.h"
+
 /* This program fills in various fields inside of the 'boot' and 'core'
  * image files.
  *
@@ -419,7 +422,7 @@
   -v, --verbose           print verbose messages\n\
 \n\
 Report bugs to <%s>.\n\
-", program_name
+", program_name,
 	    DEFAULT_BOOT_FILE, DEFAULT_CORE_FILE, DEFAULT_DIRECTORY,
 	    DEFAULT_DEVICE_MAP, PACKAGE_BUGREPORT);
 

_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel

Signature · 2 lines
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
#2 lore raw

From: Vladimir '$B&U(B-coder/phcoder' Serbinenko <[email protected]>
Date: Thu, 03 Dec 2009 12:26:05 +0100

Quoted 10 lines

Hello, nice to see you again.

Quoted 7 lines · David Miller

So I finally am about to have enough time to start looking into sparc64 support again.

And, surprise! The trunk doesn't even build. :-)

Committed.

Thanks.

Quoted 2 lines

BTW in experimental we merged sparc64's and i386's grub-install. Do you think it would make sense to merge some other tools as well?

Maybe. I made a lot of changes when I cribbed the i386 versions, and made some cleanups as well, but some portions should be sharable.

#3 lore raw
Quoted 6 lines · David Miller
Quoted 2 lines

Committed.

Thanks.

You can commit to bzr yourself actually. And unless Robert objects I guess your permission to tangle with sparc parts as you see fit is still valid

Quoted 8 lines
Quoted 3 lines

BTW in experimental we merged sparc64's and i386's grub-install. Do you think it would make sense to merge some other tools as well?

Maybe. I made a lot of changes when I cribbed the i386 versions, and made some cleanups as well, but some portions should be sharable.

For me the main reason for or against it is break probability. Merging will avoid stupid breakages like ones you fixed but may introduce more subtle ones

Signature · 2 lines
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
#4 lore raw

From: Vladimir '$B&U(B-coder/phcoder' Serbinenko <[email protected]>
Date: Thu, 03 Dec 2009 21:22:27 +0100

Quoted 3 lines

For me the main reason for or against it is break probability. Merging will avoid stupid breakages like ones you fixed but may introduce more subtle ones

You lack a cross-build environment?

I test build the Linux kernel for about 4 or 5 platforms, all on the same computer.

And also as we've seen, keeping the build working doesn't keep bugs from creeping in. Someone just needs to actively build and install test the tree on the given platform if you really want to avoid problems.

I have about half a year of potential regressions I'm about to discover on sparc64. That's not an acceptable situation, long term.

I might get hit by a bus or whatever, so it would be nice if someone other than me were at least testing the code base out on sparc64.

That way problems get spotted when they get added, or soon afterwards, not 6 months later like some things are about to. :-)

#5 lore raw
Quoted 11 lines · David Miller

From: Vladimir 'φ-coder/phcoder' Serbinenko <[email protected]>
Date: Thu, 03 Dec 2009 21:22:27 +0100

Quoted 4 lines

For me the main reason for or against it is break probability. Merging will avoid stupid breakages like ones you fixed but may introduce more subtle ones

You lack a cross-build environment?

I have only cross-build environment for ppc and mipsel. I installed sparc cross-toolchain from emdebian but apparently it's not enough to build grub-sparc. I was actually thinking that grub2-sparc was uploaded to debian and so at least compile-tested.

Quoted 8 lines

I test build the Linux kernel for about 4 or 5 platforms, all on the same computer.

And also as we've seen, keeping the build working doesn't keep bugs from creeping in. Someone just needs to actively build and install test the tree on the given platform if you really want to avoid problems.

Quoted 10 lines

I have about half a year of potential regressions I'm about to discover on sparc64. That's not an acceptable situation, long term.

I might get hit by a bus or whatever, so it would be nice if someone other than me were at least testing the code base out on sparc64.

That way problems get spotted when they get added, or soon afterwards, not 6 months later like some things are about to. :-)

The problem is that nobody of us has such hardware. I would happily do a sparc boot every 2 weeks but I just don't have a sparc

Signature · 2 lines
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
#6 lore raw

From: Vladimir '$B&U(B-coder/phcoder' Serbinenko <[email protected]>
Date: Thu, 03 Dec 2009 22:56:34 +0100

Quoted 2 lines

The problem is that nobody of us has such hardware. I would happily do a sparc boot every 2 weeks but I just don't have a sparc

You can get an Ultra5 for ~$100.00 USD on EBAY :-)

Anyways, no matter, I'm about to start working to get grub2 functional again at least on a few of my machines.

Thanks!

#7 lore raw
In reply to David Miller
Quoted 9 lines · David Miller

I have about half a year of potential regressions I'm about to discover on sparc64. That's not an acceptable situation, long term.

I might get hit by a bus or whatever, so it would be nice if someone other than me were at least testing the code base out on sparc64.

That way problems get spotted when they get added, or soon afterwards, not 6 months later like some things are about to. :-)

Actually, we have this debian buildd thing regularly testing sparc buildability:

https://buildd.debian.org/build.php?arch=sparc&pkg=grub2

I assure you we'd have noticed in less than 6 months :-)

(though I admit, not as efficiently as you did)

Signature · 5 lines
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."
#8 lore raw
In reply to Vladimir 'φ-coder/phcoder' Serbinenko

From: Vladimir '$B&U(B-coder/phcoder' Serbinenko <[email protected]>
Date: Thu, 03 Dec 2009 21:22:27 +0100

Quoted 10 lines
Quoted 6 lines · David Miller
Quoted 2 lines

Committed.

Thanks.

You can commit to bzr yourself actually. And unless Robert objects I guess your permission to tangle with sparc parts as you see fit is still valid

Thanks, but I don't feel comfortable enough with bzr yet.

I had to struggle just to get things checked out, as the bzr package in Debian stable is too old to use to access to repo.

(For the record I disagree with the source control system choosen,
and the fact that a common current Linux distribution doesn't even provide a version of the tool necessary to access the repo really convinces me further of that.)

#9 lore raw
Quoted 10 lines · David Miller

Thanks, but I don't feel comfortable enough with bzr yet.

I had to struggle just to get things checked out, as the bzr package in Debian stable is too old to use to access to repo.

(For the record I disagree with the source control system choosen,
and the fact that a common current Linux distribution doesn't even provide a version of the tool necessary to access the repo really convinces me further of that.)

For a Lenny system the following should do the trick:

  echo "deb http://backports.org/debian lenny-backports main" | sudo tee -a /etc/apt/sources.list
  gpg --keyserver pgp.mit.edu --recv-keys 16BA136C
  gpg --export -a 16BA136C | sudo apt-key add -
  sudo apt-get update
  sudo apt-get install -t lenny-backports bzr
Signature · 5 lines
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."
#10 lore raw

From: Robert Millan <[email protected]>
Date: Fri, 4 Dec 2009 21:58:25 +0100

Quoted 12 lines · David Miller
Quoted 10 lines

Thanks, but I don't feel comfortable enough with bzr yet.

I had to struggle just to get things checked out, as the bzr package in Debian stable is too old to use to access to repo.

(For the record I disagree with the source control system choosen,
and the fact that a common current Linux distribution doesn't even provide a version of the tool necessary to access the repo really convinces me further of that.)

Quoted 7 lines

For a Lenny system the following should do the trick:

  echo "deb http://backports.org/debian lenny-backports main" | sudo tee -a /etc/apt/sources.list
  gpg --keyserver pgp.mit.edu --recv-keys 16BA136C
  gpg --export -a 16BA136C | sudo apt-key add -
  sudo apt-get update
  sudo apt-get install -t lenny-backports bzr

That's not a straightforward and low barrier of entry for new developers who want to simply check out the grub code and start contributing. That's my point.

Do you want lots of people involved, or do you want people to have to jump through hoops and go out of their way to get at your tree?

Heck, for this reason alone, subversion was a better situation.

Mercurial, GIT, or pretty any other distributed source control system would have worked out of the box with the client versions provided in debian stable and other distributions.

So, I still believe BZR was a bad choice of a source control system.

And how many times have you guys wrecked your repository already? :-)

#11 lore raw

Am Freitag, den 04.12.2009, 13:34 -0800 schrieb David Miller:

Quoted 24 lines

From: Robert Millan <[email protected]>
Date: Fri, 4 Dec 2009 21:58:25 +0100

Quoted 7 lines · David Miller
Quoted 6 lines

Thanks, but I don't feel comfortable enough with bzr yet.

I had to struggle just to get things checked out, as the bzr package in Debian stable is too old to use to access to repo.

Quoted 8 lines
Quoted 4 lines

(For the record I disagree with the source control system choosen,
and the fact that a common current Linux distribution doesn't even provide a version of the tool necessary to access the repo really convinces me further of that.)

For a Lenny system the following should do the trick:

echo "deb http://backports.org/debian lenny-backports main" | sudo

tee -a /etc/apt/sources.list

Quoted 4 lines
  gpg --keyserver pgp.mit.edu --recv-keys 16BA136C
  gpg --export -a 16BA136C | sudo apt-key add -
  sudo apt-get update
  sudo apt-get install -t lenny-backports bzr
Quoted 8 lines

That's not a straightforward and low barrier of entry for new developers who want to simply check out the grub code and start contributing. That's my point.

Do you want lots of people involved, or do you want people to have to jump through hoops and go out of their way to get at your tree?

Heck, for this reason alone, subversion was a better situation.

When squeeze is out we hopefully won't have that problem again that we have to use newer versions then Debian stable.
I hope that the bzr repository formats are now enough stable for our use.

Quoted 8 lines

Mercurial, GIT, or pretty any other distributed source control system would have worked out of the box with the client versions provided in debian stable and other distributions.

So, I still believe BZR was a bad choice of a source control system.

And how many times have you guys wrecked your repository already? :-)

IIRC 3 times, but 2 times was because of the broken bzr-svn used to sync regulary SVN to Bazaar trunk.

Signature · 2 lines
Felix Zielcke
Proud Debian Maintainer and GNU GRUB developer
#12 lore raw
In reply to Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 3 lines · Vladimir 'φ-coder/phcoder' Serbinenko

You can commit to bzr yourself actually. And unless Robert objects I guess your permission to tangle with sparc parts as you see fit is still valid

Of course.

Signature · 5 lines
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."
#13 lore raw
In reply to David Miller
Quoted 5 lines · David Miller

So I finally am about to have enough time to start looking into sparc64 support again.

And, surprise! The trunk doesn't even build. :-)

I guess this one's my fault. Must have left it when adding all those progname.c, progname.h and gettext calls everywhere.

Glad there's someone watching! :-)

Signature · 5 lines
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."