Skip to contentSkip to conversation

(no subject)

Buildroot Superseded Stefan Fröberg 5 participants 28 messages Dec 29, 2012

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

Hello all

Finally after dosens of reruns got damn Mesa 8.0.5 to compile. The biggest obstacle was src/glsl/builtin_compiler but after searching Net for how others had done it I finally got it.

mesa3d-uclibc-locale.patch did not apply cleanly anymore to this version.
So I had to fetch new one from openembedded repo.
Did take also few other patches from there
and fixed execinfo.h stuff.

Regards:
Stefan

#1 lore raw

PATCH 1/5 mesa3d: bumped to 8.0.5

---
 package/x11r7/mesa3d/mesa3d-uclibc-locale.patch |   56 -----------------------
 package/x11r7/mesa3d/mesa3d.mk                  |   34 +++++++++++---
 2 files changed, 28 insertions(+), 62 deletions(-)
 delete mode 100644 package/x11r7/mesa3d/mesa3d-uclibc-locale.patch
package/x11r7/mesa3d/mesa3d-uclibc-locale.patch deleted +0 -56
deleted file mode 100644
index 99afe8d..0000000
@@ -1,56 +0,0 @@
-[PATCH] Fix compilation on uClibc without locale support
-
-Based on similar patch from OE:
-
-http://git.openembedded.org/openembedded-core/commit/meta/recipes-graphics/mesa/mesa/0001-Compile-with-uclibc.patch?id=e4039eb74b20e96d4b8837cd58cf2d13d091e1ad
-
-Signed-off-by: Peter Korsgaard <[email protected]>
----
- configure.ac            |    3 +++
- src/glsl/strtod.c       |    2 +-
- src/mesa/main/imports.c |    2 +-
- 3 files changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index fbaa376..454dad2 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -450,6 +450,9 @@ AC_SUBST([DLOPEN_LIBS])
- dnl See if posix_memalign is available
- AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"])
- 
-+dnl See if newlocale is available
-+AC_CHECK_FUNCS_ONCE(newlocale)
-+
- dnl SELinux awareness.
- AC_ARG_ENABLE([selinux],
-     [AS_HELP_STRING([--enable-selinux],
-diff --git a/src/glsl/strtod.c b/src/glsl/strtod.c
-index a876e13..9fce7e9 100644
---- a/src/glsl/strtod.c
-+++ b/src/glsl/strtod.c
-@@ -44,7 +44,7 @@ double
- double
- glsl_strtod(const char *s, char **end)
- {
--#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__)
-+#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && defined(HAVE_NEWLOCALE)
-    static locale_t loc = NULL;
-    if (!loc) {
-       loc = newlocale(LC_CTYPE_MASK, "C", NULL);
-diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
-index d3727ef..363bf32 100644
---- a/src/mesa/main/imports.c
-+++ b/src/mesa/main/imports.c
-@@ -757,7 +757,7 @@ float
- float
- _mesa_strtof( const char *s, char **end )
- {
--#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__)
-+#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && defined(HAVE_NEWLOCALE)
-    static locale_t loc = NULL;
-    if (!loc) {
-       loc = newlocale(LC_CTYPE_MASK, "C", NULL);
--- 
-1.7.10.4
-
package/x11r7/mesa3d/mesa3d.mk +28 -6
index b16d5e6..d676409 100644
@@ -4,8 +4,8 @@
 #
 #############################################################
 
-MESA3D_VERSION = 7.10.1
-MESA3D_SOURCE = MesaLib-$(MESA3D_VERSION).tar.gz
+MESA3D_VERSION = 8.0.5
+MESA3D_SOURCE = MesaLib-$(MESA3D_VERSION).tar.bz2
 MESA3D_SITE = ftp://ftp.freedesktop.org/pub/mesa/$(MESA3D_VERSION)
 MESA3D_AUTORECONF = YES
 MESA3D_INSTALL_STAGING = YES
@@ -13,12 +13,14 @@ MESA3D_INSTALL_STAGING = YES
 MESA3D_CONF_OPT = \
 	--disable-egl \
 	--disable-glu \
-	--disable-glw \
-	--disable-glut \
-	--disable-gallium \
+	--disable-selinux \
+	--disable-gallium-llvm \
+	--disable-gallium-egl \
+	--disable-gallium-gbm \
 	--with-driver=dri \
 	--with-dri-drivers=swrast \
-	--disable-static
+	--disable-static \
+	--with-gallium-drivers=swrast
 
 MESA3D_DEPENDENCIES = \
 	xproto_glproto \
@@ -32,4 +34,24 @@ MESA3D_DEPENDENCIES = \
 	host-libxml2 \
 	host-python
 
+# Build host "builtin_compiler" that is needed by
+# build process, install it and then do cleanup before
+# starting the actual building.
+# Additionally, we will make certain that the 
+# $(HOST_DIR)/usr/bin/builtin_compiler will be used
+# in actual building process.
+
+define	MESA3D_POST_CONFIGURE_CMDS
+	$(MAKE) CC="$(HOSTCC)" CXX="$(HOSTCXX)" CFLAGS="$(HOST_CFLAGS)" CXXFLAGS="$(HOST_CXXFLAGS)" LDFLAGS="$(HOST_LDFLAGS)"  -C $(@D)/src/glsl builtin_compiler
+	$(INSTALL) $(@D)/src/glsl/builtin_compiler  -m 755 $(HOST_DIR)/usr/bin
+	$(MAKE) -C $(@D) clean
+	sed -e "s#\.\/builtin_compiler#$(HOST_DIR)/usr/bin/builtin_compiler#g" -i $(@D)/src/glsl/Makefile
+endef
+
+MESA3D_POST_CONFIGURE_HOOKS += MESA3D_POST_CONFIGURE_CMDS
+
+define	MESA3D_BUILD_CMDS
+	$(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
+endef
+
 $(eval $(autotools-package))
Signature · 1 line
1.7.7.6
#2 lore raw

PATCH 1/5 mesa3d: bumped to 8.0.5

Dear Stefan Fr?berg,

package/x11r7/mesa3d/mesa3d.mk line 9

Quoted 9 lines · Stefan Fr?berg
package/x11r7/mesa3d/mesa3d.mk +2 -2
@@ -4,8 +4,8 @@
 #
 #############################################################
 
-MESA3D_VERSION = 7.10.1
-MESA3D_SOURCE = MesaLib-$(MESA3D_VERSION).tar.gz
+MESA3D_VERSION = 8.0.5
+MESA3D_SOURCE = MesaLib-$(MESA3D_VERSION).tar.bz2
 MESA3D_SITE = ftp://ftp.freedesktop.org/pub/mesa/$(MESA3D_VERSION)

You could probably add MESA3D_LICENSE and MESA3D_LICENSE_FILES in the process.

Quoted 24 lines
package/x11r7/mesa3d/mesa3d.mk +6 -4
 MESA3D_AUTORECONF = YES
 MESA3D_INSTALL_STAGING = YES
@@ -13,12 +13,14 @@ MESA3D_INSTALL_STAGING = YES
 MESA3D_CONF_OPT = \
 	--disable-egl \
 	--disable-glu \
-	--disable-glw \
-	--disable-glut \
-	--disable-gallium \
+	--disable-selinux \
+	--disable-gallium-llvm \
+	--disable-gallium-egl \
+	--disable-gallium-gbm \
 	--with-driver=dri \
 	--with-dri-drivers=swrast \
-	--disable-static
+	--disable-static \
+	--with-gallium-drivers=swrast
 
 MESA3D_DEPENDENCIES = \
 	xproto_glproto \
@@ -32,4 +34,24 @@ MESA3D_DEPENDENCIES = \
 	host-libxml2 \
 	host-python

package/x11r7/mesa3d/mesa3d.mk MESA3D_DEPENDENCIES = \ · line 45

Quoted 10 lines
package/x11r7/mesa3d/mesa3d.mk +9 -0
 
+# Build host "builtin_compiler" that is needed by
+# build process, install it and then do cleanup before
+# starting the actual building.
+# Additionally, we will make certain that the 
+# $(HOST_DIR)/usr/bin/builtin_compiler will be used
+# in actual building process.
+
+define	MESA3D_POST_CONFIGURE_CMDS
+	$(MAKE) CC="$(HOSTCC)" CXX="$(HOSTCXX)" CFLAGS="$(HOST_CFLAGS)" CXXFLAGS="$(HOST_CXXFLAGS)" LDFLAGS="$(HOST_LDFLAGS)"  -C $(@D)/src/glsl builtin_compiler

Can you replace that with:

	$(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D)/src/glsl builtin_compiler

package/x11r7/mesa3d/mesa3d.mk MESA3D_DEPENDENCIES = \ · line 48

Quoted 3 lines
package/x11r7/mesa3d/mesa3d.mk +3 -0
+	$(INSTALL) $(@D)/src/glsl/builtin_compiler  -m 755 $(HOST_DIR)/usr/bin
+	$(MAKE) -C $(@D) clean
+	sed -e "s#\.\/builtin_compiler#$(HOST_DIR)/usr/bin/builtin_compiler#g" -i $(@D)/src/glsl/Makefile

Hum, it is not really nice to have a target package that installs something in $(HOST_DIR) (even though it's true quite a few packages are already doing this). An alternative solution would be to have a host-mesa3d package, that builds and installs only the glsl compiler.

Something along the lines of:

MESA3D_DEPENDENCIES += host-mesa3d HOST_MESA3D_CONF_OPT = --disable-as-many-things-as-possible

# We only want to build the glsl compiler
define HOST_MESA3D_BUILD_CMDS

	$(MAKE) -C $(@D)/src/glsl builtin_compiler

endef

# We only install the glsl compiler
define HOST_MESA3D_INSTALL_CMDS

	$(INSTALL) -D $(@D)/src/glsl/builtin_compiler  -m 755 $(HOST_DIR)/usr/bin/glsl-builtin_compiler

endef

And then do a patch to mesa3d configure.ac so that we can pass an explicit path to the glsl compiler and do at configure time:
--with-glsl-compiler=$(HOST_DIR)/usr/bin/glsl-builtin_compiler.

package/x11r7/mesa3d/mesa3d.mk MESA3D_DEPENDENCIES = \ · line 55

Quoted 3 lines
package/x11r7/mesa3d/mesa3d.mk +3 -0
+define	MESA3D_BUILD_CMDS
+	$(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
+endef

Why do you need to override the build step here? It seems similar to the default one.

Thanks!

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#3 lore raw

PATCH 1/5 mesa3d: bumped to 8.0.5

Good morning Thomas

29.12.2012 10:06, Thomas Petazzoni kirjoitti:

Quoted 7 lines

Dear Stefan Fr?berg,

Quoted 4 lines · Stefan Fr?berg
package/x11r7/mesa3d/mesa3d.mk +0 -0
@@ -4,8 +4,8 @@
 #
 #############################################################
 
Quoted 7 lines

package/x11r7/mesa3d/mesa3d.mk line 9

Quoted 5 lines
package/x11r7/mesa3d/mesa3d.mk +2 -2
-MESA3D_VERSION = 7.10.1
-MESA3D_SOURCE = MesaLib-$(MESA3D_VERSION).tar.gz
+MESA3D_VERSION = 8.0.5
+MESA3D_SOURCE = MesaLib-$(MESA3D_VERSION).tar.bz2
 MESA3D_SITE = ftp://ftp.freedesktop.org/pub/mesa/$(MESA3D_VERSION)

You could probably add MESA3D_LICENSE and MESA3D_LICENSE_FILES in the process.

Ok

Quoted 36 lines
Quoted 24 lines
package/x11r7/mesa3d/mesa3d.mk +6 -4
 MESA3D_AUTORECONF = YES
 MESA3D_INSTALL_STAGING = YES
@@ -13,12 +13,14 @@ MESA3D_INSTALL_STAGING = YES
 MESA3D_CONF_OPT = \
 	--disable-egl \
 	--disable-glu \
-	--disable-glw \
-	--disable-glut \
-	--disable-gallium \
+	--disable-selinux \
+	--disable-gallium-llvm \
+	--disable-gallium-egl \
+	--disable-gallium-gbm \
 	--with-driver=dri \
 	--with-dri-drivers=swrast \
-	--disable-static
+	--disable-static \
+	--with-gallium-drivers=swrast
 
 MESA3D_DEPENDENCIES = \
 	xproto_glproto \
@@ -32,4 +34,24 @@ MESA3D_DEPENDENCIES = \
 	host-libxml2 \
 	host-python

package/x11r7/mesa3d/mesa3d.mk MESA3D_DEPENDENCIES = \ · line 45

Quoted 10 lines
package/x11r7/mesa3d/mesa3d.mk +9 -0
 
+# Build host "builtin_compiler" that is needed by
+# build process, install it and then do cleanup before
+# starting the actual building.
+# Additionally, we will make certain that the 
+# $(HOST_DIR)/usr/bin/builtin_compiler will be used
+# in actual building process.
+
+define	MESA3D_POST_CONFIGURE_CMDS
+	$(MAKE) CC="$(HOSTCC)" CXX="$(HOSTCXX)" CFLAGS="$(HOST_CFLAGS)" CXXFLAGS="$(HOST_CXXFLAGS)" LDFLAGS="$(HOST_LDFLAGS)"  -C $(@D)/src/glsl builtin_compiler

Can you replace that with:

Quoted 1 line
	$(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D)/src/glsl builtin_compiler

Sure

Quoted 18 lines

package/x11r7/mesa3d/mesa3d.mk MESA3D_DEPENDENCIES = \ · line 48

Quoted 3 lines
package/x11r7/mesa3d/mesa3d.mk +3 -0
+	$(INSTALL) $(@D)/src/glsl/builtin_compiler  -m 755 $(HOST_DIR)/usr/bin
+	$(MAKE) -C $(@D) clean
+	sed -e "s#\.\/builtin_compiler#$(HOST_DIR)/usr/bin/builtin_compiler#g" -i $(@D)/src/glsl/Makefile

Hum, it is not really nice to have a target package that installs something in $(HOST_DIR) (even though it's true quite a few packages are already doing this). An alternative solution would be to have a host-mesa3d package, that builds and installs only the glsl compiler.

Something along the lines of:

MESA3D_DEPENDENCIES += host-mesa3d HOST_MESA3D_CONF_OPT = --disable-as-many-things-as-possible

# We only want to build the glsl compiler
define HOST_MESA3D_BUILD_CMDS

	$(MAKE) -C $(@D)/src/glsl builtin_compiler

endef

Quoted 8 lines

# We only install the glsl compiler
define HOST_MESA3D_INSTALL_CMDS

	$(INSTALL) -D $(@D)/src/glsl/builtin_compiler  -m 755 $(HOST_DIR)/usr/bin/glsl-builtin_compiler

endef

And then do a patch to mesa3d configure.ac so that we can pass an explicit path to the glsl compiler and do at configure time:
--with-glsl-compiler=$(HOST_DIR)/usr/bin/glsl-builtin_compiler.

I tried doing host-mesa3d build first, where it would build only builtin_compiler binary but
then it started to complain about missing this and that Xorg host-package. After 7th needed host-package It started to get really tedious and would rather not go that
route anymore....
Also, Im not that canny with gnu autoconf to know where and how to put that new
--with-glsl-compiler switch in configure.ac.

So I will keep it as it is.

Quoted 5 lines

package/x11r7/mesa3d/mesa3d.mk MESA3D_DEPENDENCIES = \ · line 55

Quoted 3 lines
package/x11r7/mesa3d/mesa3d.mk +3 -0
+define	MESA3D_BUILD_CMDS
+	$(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
+endef

Why do you need to override the build step here? It seems similar to the default one.

I tought so too but apparently it's not. I got some very cryptic error about missing
src/glsl/libglsl.a and "../../bin/mklib -ru: command not found"
when removing those
lines and using default one.

Maybe it's one of those openembedded patches that I used, mesa3d-0002-cross-compile.patch or mesa3d-0003-fix-for-x32.patch, that is somehow conflicting.

Now some coffee...

Thanks!

Stefan

Quoted 3 lines

Thanks!

Thomas

#4 lore raw

PATCH 2/5 mesa3d: bumped to 8.0.5

In reply to Stefan Fröberg

Updated and renamed version of mesa3d-uclibc-locale.patch for Mesa 8.0.5
URL: http://git.openembedded.org/openembedded-core/plain/meta/recipes-graphics/mesa/mesa/0001-Compile-with-uclibc.patch

---
 .../mesa3d/mesa3d-0001-Compile-with-uclibc.patch   |   52 ++++++++++++++++++++
 1 files changed, 52 insertions(+), 0 deletions(-)
 create mode 100644 package/x11r7/mesa3d/mesa3d-0001-Compile-with-uclibc.patch
package/x11r7/mesa3d/mesa3d-0001-Compile-with-uclibc.patch new file +52 -0
new file mode 100644
index 0000000..d39270a
@@ -0,0 +1,52 @@
+Compile with uclibc
+
+Upstream-Status: Pending
+---
+ configure.ac            |    3 +++
+ src/glsl/strtod.c       |    2 +-
+ src/mesa/main/imports.c |    2 +-
+ 3 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index fbaa376..454dad2 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -543,6 +543,9 @@ AC_SUBST([DLOPEN_LIBS])
+ dnl See if posix_memalign is available
+ AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"])
+ 
++dnl See if newlocale is available
++AC_CHECK_FUNCS_ONCE(newlocale)
++
+ dnl SELinux awareness.
+ AC_ARG_ENABLE([selinux],
+     [AS_HELP_STRING([--enable-selinux],
+diff --git a/src/glsl/strtod.c b/src/glsl/strtod.c
+index a876e13..9fce7e9 100644
+--- a/src/glsl/strtod.c
++++ b/src/glsl/strtod.c
+@@ -45,7 +45,7 @@ double
+ glsl_strtod(const char *s, char **end)
+ {
+ #if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && \
+-   !defined(__HAIKU__)
++   !defined(__HAIKU__) && defined (HAVE_NEWLOCALE)
+    static locale_t loc = NULL;
+    if (!loc) {
+       loc = newlocale(LC_CTYPE_MASK, "C", NULL);
+diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
+index d3727ef..363bf32 100644
+--- a/src/mesa/main/imports.c
++++ b/src/mesa/main/imports.c
+@@ -767,7 +767,7 @@ float
+ _mesa_strtof( const char *s, char **end )
+ {
+ #if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && \
+-   !defined(ANDROID) && !defined(__HAIKU__)
++   !defined(ANDROID) && !defined(__HAIKU__) && defined (HAVE_NEWLOCALE)
+    static locale_t loc = NULL;
+    if (!loc) {
+       loc = newlocale(LC_CTYPE_MASK, "C", NULL);
+-- 
+1.7.10.4
+
Signature · 1 line
1.7.7.6
#5 lore raw

PATCH 2/5 mesa3d: bumped to 8.0.5

Dear Stefan Fr?berg,

Quoted 2 lines · Stefan Fr?berg

Updated and renamed version of mesa3d-uclibc-locale.patch for Mesa 8.0.5
URL: http://git.openembedded.org/openembedded-core/plain/meta/recipes-graphics/mesa/mesa/0001-Compile-with-uclibc.patch

Please also put this link...

Quoted 13 lines
---
 .../mesa3d/mesa3d-0001-Compile-with-uclibc.patch   |   52 ++++++++++++++++++++
 1 files changed, 52 insertions(+), 0 deletions(-)
 create mode 100644 package/x11r7/mesa3d/mesa3d-0001-Compile-with-uclibc.patch
package/x11r7/mesa3d/mesa3d-0001-Compile-with-uclibc.patch new file +0 -0
new file mode 100644
index 0000000..d39270a

package/x11r7/mesa3d/mesa3d-0001-Compile-with-uclibc.patch line 3

Quoted 3 lines
package/x11r7/mesa3d/mesa3d-0001-Compile-with-uclibc.patch new file +3 -0
@@ -0,0 +1,52 @@
+Compile with uclibc
+
+Upstream-Status: Pending

...here.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#6 lore raw

PATCH 3/5 mesa3d: bumped to 8.0.5

In reply to Stefan Fröberg

Cross-compile patch
URL: http://git.openembedded.org/openembedded-core/plain/meta/recipes-graphics/mesa/mesa/0002-cross-compile.patch

---
 .../x11r7/mesa3d/mesa3d-0002-cross-compile.patch   |   94 ++++++++++++++++++++
 1 files changed, 94 insertions(+), 0 deletions(-)
 create mode 100644 package/x11r7/mesa3d/mesa3d-0002-cross-compile.patch
package/x11r7/mesa3d/mesa3d-0002-cross-compile.patch new file +94 -0
new file mode 100644
index 0000000..dc8e994
@@ -0,0 +1,94 @@
+cross compile
+
+This patch is ported from WindRiver linux and to fix cross compile
+failure.
+
+And original commits are:
+commit 8d5ccc8113e1b51b0529a00c18a4aba956247e1b
+commit 5c4212084b871a0c0fb7d174280ec9a634637deb
+
+Upstream-Status: Pending
+
+Signed-off-by: Kang Kai <[email protected]>
+---
+ bin/mklib |   24 ++++++++++++------------
+ 1 file changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/bin/mklib b/bin/mklib
+index 9bac29e..b33aa90 100755
+--- a/bin/mklib
++++ b/bin/mklib
+@@ -49,8 +49,8 @@ expand_archives() {
+                     /*) ;;
+                     *)  FILE="$ORIG_DIR/$FILE" ;;
+                 esac
+-                MEMBERS=`ar t $FILE`
+-                ar x $FILE
++                MEMBERS=`${AR} t $FILE`
++                ${AR} x $FILE
+                 for MEMBER in $MEMBERS ; do
+                     NEWFILES="$NEWFILES $DIR/$MEMBER"
+                 done
+@@ -77,7 +77,7 @@ expand_archives() {
+ make_ar_static_lib() {
+     OPTS=$1
+     shift;
+-    RANLIB=$1
++    USE_RANLIB=$1
+     shift;
+     LIBNAME=$1
+     shift;
+@@ -87,11 +87,11 @@ make_ar_static_lib() {
+     rm -f ${LIBNAME}
+ 
+     # make static lib
+-    ar ${OPTS} ${LIBNAME} ${OBJECTS}
++    ${AR} ${OPTS} ${LIBNAME} ${OBJECTS}
+ 
+     # run ranlib
+-    if [ ${RANLIB} = 1 ] ; then
+-        ranlib ${LIBNAME}
++    if [ ${USE_RANLIB} = 1 ] ; then
++        ${RANLIB} ${LIBNAME}
+     fi
+ 
+     echo ${LIBNAME}
+@@ -313,9 +313,9 @@ case $ARCH in
+ 	if [ "x$LINK" = "x" ] ; then
+ 	    # -linker was not specified so set default link command now
+             if [ $CPLUSPLUS = 1 ] ; then
+-                LINK=g++
++                LINK=$CXX
+             else
+-                LINK=gcc
++                LINK=$CC
+             fi
+ 	fi
+ 
+@@ -535,9 +535,9 @@ case $ARCH in
+ 	if [ "x$LINK" = "x" ] ; then
+ 	    # -linker was not specified so set default link command now
+             if [ $CPLUSPLUS = 1 ] ; then
+-                LINK=g++
++                LINK=$CXX
+             else
+-                LINK=gcc
++                LINK=$CC
+             fi
+ 	fi
+ 
+@@ -903,9 +903,9 @@ case $ARCH in
+ 	if [ "x$LINK" = "x" ] ; then
+ 	    # -linker was not specified so set default link command now
+             if [ $CPLUSPLUS = 1 ] ; then
+-                LINK=g++
++                LINK=${CXX}
+             else
+-                LINK=gcc
++                LINK=${CC}
+             fi
+ 	fi
+ 
+-- 
+1.7.10.4
+
Signature · 1 line
1.7.7.6
#7 lore raw

PATCH 3/5 mesa3d: bumped to 8.0.5

Dear Stefan Fr?berg,

Quoted 2 lines · Stefan Fr?berg

Cross-compile patch
URL: http://git.openembedded.org/openembedded-core/plain/meta/recipes-graphics/mesa/mesa/0002-cross-compile.patch

Please also put the link in the patch description below.

Quoted 12 lines
---
 .../x11r7/mesa3d/mesa3d-0002-cross-compile.patch   |   94 ++++++++++++++++++++
 1 files changed, 94 insertions(+), 0 deletions(-)
 create mode 100644 package/x11r7/mesa3d/mesa3d-0002-cross-compile.patch
package/x11r7/mesa3d/mesa3d-0002-cross-compile.patch new file +0 -0
new file mode 100644
index 0000000..dc8e994

package/x11r7/mesa3d/mesa3d-0002-cross-compile.patch line 10

Quoted 10 lines
package/x11r7/mesa3d/mesa3d-0002-cross-compile.patch new file +10 -0
@@ -0,0 +1,94 @@
+cross compile
+
+This patch is ported from WindRiver linux and to fix cross compile
+failure.
+
+And original commits are:
+commit 8d5ccc8113e1b51b0529a00c18a4aba956247e1b
+commit 5c4212084b871a0c0fb7d174280ec9a634637deb
+
+Upstream-Status: Pending

here.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#8 lore raw

PATCH 4/5 mesa3d: bumped to 8.0.5

In reply to Stefan Fröberg

Additional cross-compiling fixes
URL: http://git.openembedded.org/openembedded-core/plain/meta/recipes-graphics/mesa/mesa/0003-fix-for-x32.patch

---
 package/x11r7/mesa3d/mesa3d-0003-fix-for-x32.patch |   50 ++++++++++++++++++++
 1 files changed, 50 insertions(+), 0 deletions(-)
 create mode 100644 package/x11r7/mesa3d/mesa3d-0003-fix-for-x32.patch
package/x11r7/mesa3d/mesa3d-0003-fix-for-x32.patch new file +50 -0
new file mode 100644
index 0000000..2d6a150
@@ -0,0 +1,50 @@
+Upstream-Status: Pending
+
+Using uname like this when cross compiling is a really bad idea. We
+provide the correct linker flags, lets just assume we can get this
+right ourselves.
+
+RP 2012/04/26
+---
+ bin/mklib |   16 ----------------
+ 1 file changed, 16 deletions(-)
+
+diff --git a/bin/mklib b/bin/mklib
+index b33aa90..16cb017 100755
+--- a/bin/mklib
++++ b/bin/mklib
+@@ -330,15 +330,7 @@ case $ARCH in
+ 	    ;;
+ 	    esac
+ 
+-	    # Check if objects are 32-bit and we're running in 64-bit
+-	    # environment.  If so, pass -m32 flag to linker.
+ 	    set ${OBJECTS}
+-	    ABI32=`file $1 | grep 32-bit`
+-	    ARM=`file $1 | grep ARM`
+-	    # Do not add "-m32" option for arm.
+-            if [ -z "$ARM" -a "${ABI32}" -a `uname -m` = "x86_64" ] ; then
+-		OPTS="-m32 ${OPTS}"
+-	    fi
+ 
+             if [ "${ALTOPTS}" ] ; then
+                 OPTS=${ALTOPTS}
+@@ -389,15 +381,7 @@ case $ARCH in
+ 		# exptmp is removed below
+ 	    fi
+ 
+-	    # Check if objects are 32-bit and we're running in 64-bit
+-	    # environment.  If so, pass -m32 flag to linker.
+ 	    set ${OBJECTS}
+-	    ABI32=`file $1 | grep 32-bit`
+-            ARM=`file $1 | grep ARM`
+-	    # Do not add "-m32" option for arm.
+-            if [ -z "$ARM" -a "${ABI32}" -a `uname -m` = "x86_64" ] ; then
+-		OPTS="-m32 ${OPTS}"
+-	    fi
+             if [ "${ALTOPTS}" ] ; then
+                 OPTS=${ALTOPTS}
+             fi
+-- 
+1.7.10.4
+
Signature · 1 line
1.7.7.6
#9 lore raw

PATCH 5/5 mesa3d: bumped to 8.0.5

In reply to Stefan Fröberg

uClibc does not have execinfo.h

---
 package/x11r7/mesa3d/mesa3d-execinfo.patch |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
 create mode 100644 package/x11r7/mesa3d/mesa3d-execinfo.patch
package/x11r7/mesa3d/mesa3d-execinfo.patch new file +21 -0
new file mode 100644
index 0000000..8baba63
@@ -0,0 +1,21 @@
+diff -Naur mesa3d-8.0.5.org/src/gallium/auxiliary/util/u_debug_symbol.c mesa3d-8.0.5/src/gallium/auxiliary/util/u_debug_symbol.c
+--- mesa3d-8.0.5.org/src/gallium/auxiliary/util/u_debug_symbol.c	2012-12-29 00:23:42.597893058 +0200
++++ mesa3d-8.0.5/src/gallium/auxiliary/util/u_debug_symbol.c	2012-12-29 00:26:08.639454184 +0200
+@@ -151,7 +151,7 @@
+ }
+ #endif
+ 
+-#ifdef __GLIBC__
++#if defined(__GLIBC__) && !defined(__UCLIBC__)
+ #include <execinfo.h>
+ 
+ /* This can only provide dynamic symbols, or binary offsets into a file.
+@@ -177,7 +177,7 @@
+       return;
+ #endif
+ 
+-#ifdef __GLIBC__
++#if defined(__GLIBC__) && !defined(__UCLIBC__)
+    debug_symbol_name_glibc(addr, buf, size);
+    if(buf[0])
+       return;
Signature · 1 line
1.7.7.6
#10 lore raw

PATCH 5/5 mesa3d: bumped to 8.0.5

Dear Stefan Fr?berg,

package/x11r7/mesa3d/mesa3d-execinfo.patch

Quoted 14 lines · Stefan Fr?berg

uClibc does not have execinfo.h

---
 package/x11r7/mesa3d/mesa3d-execinfo.patch |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
 create mode 100644 package/x11r7/mesa3d/mesa3d-execinfo.patch
package/x11r7/mesa3d/mesa3d-execinfo.patch new file +0 -0
new file mode 100644
index 0000000..8baba63
@@ -0,0 +1,21 @@

Missing patch description.

Thanks!

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#11 lore raw
In reply to Stefan Fröberg

Dear Stefan Fr?berg,

Quoted 9 lines · Stefan Fr?berg

Finally after dosens of reruns got damn Mesa 8.0.5 to compile. The biggest obstacle was src/glsl/builtin_compiler but after searching Net for how others had done it I finally got it.

mesa3d-uclibc-locale.patch did not apply cleanly anymore to this version.
So I had to fetch new one from openembedded repo.
Did take also few other patches from there
and fixed execinfo.h stuff.

Thanks. Having five patches with the same title is not correct. And since it seems your five patches are all together needed to get Mesa 8.0.5 to build, then you should simply merge your five patches into just one.

I'm adding specific comments on each patch.

Thanks!

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#12 lore raw

29.12.2012 9:59, Thomas Petazzoni kirjoitti:

Quoted 18 lines

Dear Stefan Fr?berg,

Quoted 9 lines · Stefan Fr?berg

Finally after dosens of reruns got damn Mesa 8.0.5 to compile. The biggest obstacle was src/glsl/builtin_compiler but after searching Net for how others had done it I finally got it.

mesa3d-uclibc-locale.patch did not apply cleanly anymore to this version.
So I had to fetch new one from openembedded repo.
Did take also few other patches from there
and fixed execinfo.h stuff.

Thanks. Having five patches with the same title is not correct. And since it seems your five patches are all together needed to get Mesa 8.0.5 to build, then you should simply merge your five patches into just one.

Quoted 5 lines

I'm adding specific comments on each patch.

Thanks!

Thomas

Thomas, can you tell a git newbie like me how to make single patch but still keeping that Signed-off line in
each logical file in that single one patch ?

I mean like this:

Signef-off: Stefan

Some stuff....

Signef-off: Stefan

Some more stuff ....

etc.....

So far I have done the following:

create branch

make some changes
git add those_changes
git commit -s -m "description"

repeat the previous three if necessary

git format-patch -M master

git send-email .......

#13 lore raw

Dear Stefan Fr?berg,

Quoted 3 lines · Stefan Fr?berg

Thomas, can you tell a git newbie like me how to make single patch but still keeping that Signed-off line in
each logical file in that single one patch ?

I am not sure to understand your question. I think you're confusing the SoB line in the Buildroot patch with the SoB line in the patches that apply on mesa3d, aren't you?

So basically, your final patch should look like this:

=======================================================================
mesa3d: bump to version 8.0.5

Here you explain that you're bumping to 8.0.5, and that it requires new patches, for this reason and that reason, and blablabla.

Signed-off-by Stefan Fr?berg <...>

---
Here git will generate the diff-stat of your overall patch

package/x11r7/mesa3d/mesa3d.mk +0 -0
index ...

... here your changes to mesa3d.mk

package/x11r7/mesa3d/mesa3d-01-something.patch new file +0 -0
index ...

+ mesa3d: fix something
+
+ This is the description of the mesa3d-01-something.patch. You explain
+ what you are doing here.
+
+ Signed-off-by: Stefan Fr?berg <...>
+
+ ... here your mesa3d-01-something.patch ...

package/x11r7/mesa3d/mesa3d-02-something-else.patch new file +0 -0
index ...

+ mesa3d: fix something else
+
+ This is the description of the mesa3d-02-something-else.patch. You explain
+ what you are doing here.
+
+ Signed-off-by: Stefan Fr?berg <...>
+
+ ... here your mesa3d-02-something-else.patch ...
=======================================================================

And that's it. See the recently posted "[Buildroot] [PATCH 20/20]
enlightenment: new package" e-mail. It adds enlightenment.mk and contains a patch to it.

Basically you need *one* Signed-off-by in the commit log of the Git patch that applies to Buildroot. And then one Signed-off-by per patch that you're applying to mesa3d, but those Signed-off-by are *inside* the patch applied to mesa3d, not in the commit log of the Git patch applied to Buildroot.

Quoted 8 lines

So far I have done the following:

create branch

make some changes
git add those_changes
git commit -s -m "description"

Quoted 5 lines

repeat the previous three if necessary

git format-patch -M master

git send-email .......

Yes, that's correct, except that your patches should not be separated, because they are altogether needed to make mesa3d build correctly. You have correctly understood the rule that patches should be split as much as possible in little pieces to ease the review. But you forgot the rule that the build process should not be broken between patches, even patches of the same set.

So basically, now you have a branch with 5 commits. So, what you are going to do is:

1) Got into this branch

git checkout yourbranch

2) Do an interactive rebase of your branch

git rebase -i master

3) A text editor will open, with 5 lines, corresponding to your five commits. Each line will start with the word "pick". Keep this "pick" action for the first line, but for the four next lines, change "pick" to "squash", and exit your text editor.

4) Git will merge your four patches into the first one, leaving at the end only one patch. In the process, it will open a text editor to allow you to edit the commit message of the first patch.

And that's it.

Best regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#14 lore raw

29.12.2012 16:32, Thomas Petazzoni kirjoitti:

Quoted 60 lines

Dear Stefan Fr?berg,

Quoted 3 lines · Stefan Fr?berg

Thomas, can you tell a git newbie like me how to make single patch but still keeping that Signed-off line in
each logical file in that single one patch ?

I am not sure to understand your question. I think you're confusing the SoB line in the Buildroot patch with the SoB line in the patches that apply on mesa3d, aren't you?

So basically, your final patch should look like this:

=======================================================================
mesa3d: bump to version 8.0.5

Here you explain that you're bumping to 8.0.5, and that it requires new patches, for this reason and that reason, and blablabla.

Signed-off-by Stefan Fr?berg <...>

---
Here git will generate the diff-stat of your overall patch

package/x11r7/mesa3d/mesa3d.mk +0 -0
index ...

... here your changes to mesa3d.mk

package/x11r7/mesa3d/mesa3d-01-something.patch new file +8 -0
index ...
+ mesa3d: fix something
+
+ This is the description of the mesa3d-01-something.patch. You explain
+ what you are doing here.
+
+ Signed-off-by: Stefan Fr?berg <...>
+
+ ... here your mesa3d-01-something.patch ...
package/x11r7/mesa3d/mesa3d-02-something-else.patch new file +8 -0
index ...
+ mesa3d: fix something else
+
+ This is the description of the mesa3d-02-something-else.patch. You explain
+ what you are doing here.
+
+ Signed-off-by: Stefan Fr?berg <...>
+
+ ... here your mesa3d-02-something-else.patch ...

=======================================================================

And that's it. See the recently posted "[Buildroot] [PATCH 20/20]
enlightenment: new package" e-mail. It adds enlightenment.mk and contains a patch to it.

Quoted 5 lines

Basically you need *one* Signed-off-by in the commit log of the Git patch that applies to Buildroot. And then one Signed-off-by per patch that you're applying to mesa3d, but those Signed-off-by are *inside* the patch applied to mesa3d, not in the commit log of the Git patch applied to Buildroot.

That's what I meant. Those *inside* Signed-off tags.
How should I add those inside Signed-off tags to individual patches (either my own make or 3rd party)
applied to mesa3d ?

Does git diff command do that ? It does not have -s switch like commit does.

Regards
Stefan

#15 lore raw

[Buildroot] (no subject) git format-patch

Hello Stefan,

Am 29.12.2012 15:56, schrieb Stefan Fr?berg:

Quoted 6 lines

That's what I meant. Those *inside* Signed-off tags.
How should I add those inside Signed-off tags to individual patches (either my own make or 3rd party)
applied to mesa3d ?

Does git diff command do that ? It does not have -s switch like commit does.

I do my signed off while using 'git format-patch'

git format-patch -s [against_some_branch]

Of course *after* the steps Thomas talked about. ;)

Regards
Carsten

#16 lore raw

[Buildroot] (no subject) git format-patch

Hi Carsten

29.12.2012 17:23, Carsten Schoenert kirjoitti:

Quoted 10 lines

Hello Stefan,

Am 29.12.2012 15:56, schrieb Stefan Fr?berg:

Quoted 6 lines

That's what I meant. Those *inside* Signed-off tags.
How should I add those inside Signed-off tags to individual patches (either my own make or 3rd party)
applied to mesa3d ?

Does git diff command do that ? It does not have -s switch like commit does.

Quoted 9 lines

I do my signed off while using 'git format-patch'

git format-patch -s [against_some_branch]

Of course *after* the steps Thomas talked about. ;)

Regards
Carsten

Oh, Ok.
Can you still please show in simple
line by line example (like I did in question to Thomas) your work process with git when
you add new package.

So that there is no misunderstanding.
My brain is especially slow today :-)

Regards
Stefan

#17 lore raw

[Buildroot] Generating patches against packages source code

In reply to Stefan Fröberg

Dear Stefan Fr?berg,

Quoted 6 lines · Stefan Fr?berg

That's what I meant. Those *inside* Signed-off tags.
How should I add those inside Signed-off tags to individual patches (either my own make or 3rd party)
applied to mesa3d ?

Does git diff command do that ? It does not have -s switch like commit does.

Ah, ok, I know understand your problem better. You're wondering how to nicely generate patches against the package you're working on.

However, one thing you don't seem to realize is that the Signed-off-by line is just pure text. There's nothing special about this line, so if you have a patch sitting here in your directory, just open your favorite text editor, and add the Signed-off-by line, that's it. You don't need the '-s' option of Git to add the Signed-off-by line.

So basically, you have three choices (ordered below from the poorest to the nicest, in my opinion).

1. Use the raw diff tool

We will use the raw diff tool only. So first, extract one copy of mesa3d source code (outside of Buildroot), and rename the directory:

	tar xf mesa3d-8.0.5.tar.bz2
	mv mesa3d-8.0.5 mesa3d-8.0.5.orig

Extract another copy:

	tar xf mesa3d-8.0.5.tar.bz2

Then, do your modifications in the mesa3d-8.0.5/ directory. The mesa3d-8.0.5.orig/ must be kept unchanged. Once you're done doing your modifications, do:

	diff -ruN mesa3d-8.0.5.orig/ mesa3d-8.0.5/ > mesa3d-01-something.patch

And then, edit mesa3d-01-something.patch with your text editor to add the patch description and the Signed-off-by line.

This method is really poor mainly because it is hard to handle multiple patches with it. I do not recommend it.

2. Use quilt

quilt is a tool that allows to generate a stack of patches. I typically use quilt as follows in the context of Buildroot. I start building a package, and realize it doesn't work. So the package source code has already been extracted in output/build/mesa3d-8.0.5/.

What I do is:

cd output/build/mesa3d-8.0.5/
mkdir patches
quilt new mesa3d-01-something.patch
quilt edit configure.ac
# Do my changes in configure.ac

Then, I can test to build the package against (of course, don't do a make clean, or remove the package directory, or you would loose your patches). You can continue editing more files using "quilt edit <filename>".

You can also add more patches:

quilt new mesa3d-02-something-else.patch
quilt edit ...

At any point, to refresh (i.e generate) the current patch in the patches/ directory, run "quilt refresh". You can move forward and backward through your patches using quilt pop and quilt push.

When you're on a particular patch, you can edit its description using 'quilt header -e'. There, write your patch description and Signed-off-by line.

Once you're happy with your patches, make sure to refresh them all, and then do:

	cp patches/*.patch ${your_buildroot_src}/package/mesa3d/

And that's its.

That's typically the method I use when I have only a few minor modification to make to a package. It is practical because it can be done directly within the build directory of a package.

3. Use Git

To use Git, the easiest way is to fetch the original source code of the package by cloning the official repository of the project, and do the modification here. So, something like:

git clone git://somewhere.org/mesa3d.git
cd mesa3d/
# identify the tag that corresponds to the official release # you're working on, i.e 8.0.5. I'll assume it's called v8.0.5 git branch buildroot-work v8.0.5
git checkout buildroot-work

# Do your work as usual with Git.

# Then, to generate your patches:
git format-patch master

# All patches are named 000x-<something>.patch, so you'll have
# to rename them. Typically, I do:
for i in *.patch; do cp $i ${buildroot_src_dir}/package/mesa3d/mesa3d-$i ; done

Hope this helps,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#18 lore raw

[Buildroot] Generating patches against packages source code

Hi Thomas

29.12.2012 18:15, Thomas Petazzoni kirjoitti:

Quoted 10 lines

Dear Stefan Fr?berg,

Quoted 6 lines · Stefan Fr?berg

That's what I meant. Those *inside* Signed-off tags.
How should I add those inside Signed-off tags to individual patches (either my own make or 3rd party)
applied to mesa3d ?

Does git diff command do that ? It does not have -s switch like commit does.

Quoted 8 lines

Ah, ok, I know understand your problem better. You're wondering how to nicely generate patches against the package you're working on.

However, one thing you don't seem to realize is that the Signed-off-by line is just pure text. There's nothing special about this line, so if you have a patch sitting here in your directory, just open your favorite text editor, and add the Signed-off-by line, that's it. You don't need the '-s' option of Git to add the Signed-off-by line.

Ah, I was hoping (because Im lazy ;-) ) that I don't need to add manually all those
Signed-off lines.

Quoted 89 lines

So basically, you have three choices (ordered below from the poorest to the nicest, in my opinion).

1. Use the raw diff tool

We will use the raw diff tool only. So first, extract one copy of mesa3d source code (outside of Buildroot), and rename the directory:

	tar xf mesa3d-8.0.5.tar.bz2
	mv mesa3d-8.0.5 mesa3d-8.0.5.orig

Extract another copy:

	tar xf mesa3d-8.0.5.tar.bz2

Then, do your modifications in the mesa3d-8.0.5/ directory. The mesa3d-8.0.5.orig/ must be kept unchanged. Once you're done doing your modifications, do:

	diff -ruN mesa3d-8.0.5.orig/ mesa3d-8.0.5/ > mesa3d-01-something.patch

And then, edit mesa3d-01-something.patch with your text editor to add the patch description and the Signed-off-by line.

This method is really poor mainly because it is hard to handle multiple patches with it. I do not recommend it.

2. Use quilt

quilt is a tool that allows to generate a stack of patches. I typically use quilt as follows in the context of Buildroot. I start building a package, and realize it doesn't work. So the package source code has already been extracted in output/build/mesa3d-8.0.5/.

What I do is:

cd output/build/mesa3d-8.0.5/
mkdir patches
quilt new mesa3d-01-something.patch
quilt edit configure.ac
# Do my changes in configure.ac

Then, I can test to build the package against (of course, don't do a make clean, or remove the package directory, or you would loose your patches). You can continue editing more files using "quilt edit <filename>".

You can also add more patches:

quilt new mesa3d-02-something-else.patch
quilt edit ...

At any point, to refresh (i.e generate) the current patch in the patches/ directory, run "quilt refresh". You can move forward and backward through your patches using quilt pop and quilt push.

When you're on a particular patch, you can edit its description using 'quilt header -e'. There, write your patch description and Signed-off-by line.

Once you're happy with your patches, make sure to refresh them all, and then do:

	cp patches/*.patch ${your_buildroot_src}/package/mesa3d/

And that's its.

That's typically the method I use when I have only a few minor modification to make to a package. It is practical because it can be done directly within the build directory of a package.

3. Use Git

To use Git, the easiest way is to fetch the original source code of the package by cloning the official repository of the project, and do the modification here. So, something like:

git clone git://somewhere.org/mesa3d.git
cd mesa3d/
# identify the tag that corresponds to the official release # you're working on, i.e 8.0.5. I'll assume it's called v8.0.5 git branch buildroot-work v8.0.5
git checkout buildroot-work

# Do your work as usual with Git.

# Then, to generate your patches:
git format-patch master

Quoted 7 lines

# All patches are named 000x-<something>.patch, so you'll have
# to rename them. Typically, I do:
for i in *.patch; do cp $i ${buildroot_src_dir}/package/mesa3d/mesa3d-$i ; done

Hope this helps,

Thomas

This was really helpfull!

I was always wondering how other people add all those several inside Signed-off lines when submitting one big patch to this list.

Thanks a million!

Stefan

#19 lore raw

[Buildroot] Generating patches against packages source code

Quoted 3 lines · Stefan Fr?berg

Ah, I was hoping (because Im lazy ;-) ) that I don't need to add manually all those
Signed-off lines.

You don't.

Quoted 2 lines

I was always wondering how other people add all those several inside Signed-off lines when submitting one big patch to this list.

See git help format-patch. This command has an option -s (--signoff) to automatically produce the signed-off lines.

Signature · 1 line
Richard Braun
#20 lore raw

[Buildroot] Generating patches against packages source code

Dear Richard Braun,

Quoted 5 lines · Richard Braun
Quoted 3 lines · Stefan Fr?berg

Ah, I was hoping (because Im lazy ;-) ) that I don't need to add manually all those
Signed-off lines.

Quoted 7 lines

You don't.

Quoted 2 lines

I was always wondering how other people add all those several inside Signed-off lines when submitting one big patch to this list.

See git help format-patch. This command has an option -s (--signoff) to automatically produce the signed-off lines.

Please read the discussion before saying things that are out of topic.

Stefan is *NOT* talking about adding Signed-off-by lines to Buildroot patches, but Signed-off-by lines to patches against packages in Buildroot, i.e the patches that go in package/<pkg>/<pkg>-something.patch.

And those patches are not necessarily generated with Git. They can be manually generated with diff, generated with quilt, etc.

So, no, the story is not as simple as adding the -s option to git commit or git format-patch, because Stefan is maybe not using git to generate patches for the packages.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#21 lore raw

[Buildroot] Generating patches against packages source code

Quoted 7 lines · Thomas Petazzoni

Please read the discussion before saying things that are out of topic.

Stefan is *NOT* talking about adding Signed-off-by lines to Buildroot patches, but Signed-off-by lines to patches against packages in Buildroot, i.e the patches that go in package/<pkg>/<pkg>-something.patch.

Quoted 6 lines

And those patches are not necessarily generated with Git. They can be manually generated with diff, generated with quilt, etc.

So, no, the story is not as simple as adding the -s option to git commit or git format-patch, because Stefan is maybe not using git to generate patches for the packages.

Well I understand that, which is why I've replied only after your answer which mentions git to create the package patches. I didn't think it would be out of topic then.

Signature · 1 line
Richard Braun
#22 lore raw

[Buildroot] Generating patches against packages source code

In reply to Thomas Petazzoni

Stefan, Thomas, All,

Quoted 5 lines · On Saturday 29 December 2012 Thomas Petazzoni wrote:
Quoted 4 lines · Stefan Fr?berg

That's what I meant. Those *inside* Signed-off tags.
How should I add those inside Signed-off tags to individual patches (either my own make or 3rd party)
applied to mesa3d ?

[--SNIP--]

Quoted 4 lines

So basically, you have three choices (ordered below from the poorest to the nicest, in my opinion).

1. Use the raw diff tool

[--SNIP--]

Quoted 2 lines

And then, edit mesa3d-01-something.patch with your text editor to add the patch description and the Signed-off-by line.

I am using vim as editor, and I use the snippet 'plugin'. To add any SoB-like line, I just have to type:

    sob<TAB>me<TAB>
and I get:
    Signed-off-by: "Yann E. MORIN" <[email protected]>

Similarly, I have snippets configured for:
Reported-by:
Reviewed-by:
Acked-by:
Tested-by:
CC: (although that one is a bit overkill ;-) )

Snippets available, anyone wants them.

Quoted 1 line

2. Use quilt

I've found using quilt to be troublesome. For example, you absolutely have to tell quilt what files you are *going* to edit, otherwise, quilt will miss your changes. And this situation happens more often than not; in my experience, it happened quite often that I edited a file because I _knew_ where the failure was, to later find I forgot to tell quilt about that file, and was missing that change in the patch series.

So, I would recommend against using quilt; rather use the package's upstream repository, or at worse, create a temporary git tree just in the package's extracted directory: it's much more convenient and powerfull than using quilt.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#23 lore raw

[Buildroot] Generating patches against packages source code

Dear Yann E. MORIN,

Quoted 8 lines · Yann E. MORIN

I've found using quilt to be troublesome. For example, you absolutely have to tell quilt what files you are *going* to edit, otherwise, quilt will miss your changes. And this situation happens more often than not; in my experience, it happened quite often that I edited a file because I _knew_ where the failure was, to later find I forgot to tell quilt about that file, and was missing that change in the patch series.

Quoted 4 lines

So, I would recommend against using quilt; rather use the package's upstream repository, or at worse, create a temporary git tree just in the package's extracted directory: it's much more convenient and powerfull than using quilt.

<troll severity="strong">

That's because you're using a prehistoric, basic, limited and feature-less text editor named vim.

Under the modern, wonderful, feature-rich text editor named Emacs, there is something called "quilt-mode". Once you're in quilt mode, Emacs turns all buffers of a quilt-managed project read-only, unless that particular buffer edits a file that has been quilt-added into the current patch.

Therefore, with quilt-mode in place, there is zero chance to incorrectly edit a file you forgot to quilt add.

That said, even though I'm an heavy Emacs user, I'm not using quilt-mode at the moment. I have been hit often enough with this quilt "issue" that I no longer forget to do the quilt add. Or in fact, I always use "quilt edit", which makes sure the file is "quilt added" before starting up my favorite text editor.

</troll>

:-)

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#24 lore raw

[Buildroot] Generating patches against packages source code

29.12.2012 20:39, Thomas Petazzoni kirjoitti:

Quoted 36 lines

Dear Yann E. MORIN,

Quoted 8 lines · Yann E. MORIN

I've found using quilt to be troublesome. For example, you absolutely have to tell quilt what files you are *going* to edit, otherwise, quilt will miss your changes. And this situation happens more often than not; in my experience, it happened quite often that I edited a file because I _knew_ where the failure was, to later find I forgot to tell quilt about that file, and was missing that change in the patch series.

Quoted 4 lines

So, I would recommend against using quilt; rather use the package's upstream repository, or at worse, create a temporary git tree just in the package's extracted directory: it's much more convenient and powerfull than using quilt.

<troll severity="strong">

That's because you're using a prehistoric, basic, limited and feature-less text editor named vim.

Under the modern, wonderful, feature-rich text editor named Emacs, there is something called "quilt-mode". Once you're in quilt mode, Emacs turns all buffers of a quilt-managed project read-only, unless that particular buffer edits a file that has been quilt-added into the current patch.

Therefore, with quilt-mode in place, there is zero chance to incorrectly edit a file you forgot to quilt add.

That said, even though I'm an heavy Emacs user, I'm not using quilt-mode at the moment. I have been hit often enough with this quilt "issue" that I no longer forget to do the quilt add. Or in fact, I always use "quilt edit", which makes sure the file is "quilt added" before starting up my favorite text editor.

Quoted 5 lines

</troll>

:-)

Thomas

Hope this is not escalating into Vim vs. Emacs flamewar :-)

We "real" programmers just use nano as editor and raw diff as our patch generating tool.
;-)

From Dilbert comic strip/:

//*Old Guy*:/ When I started out we didn't have those sissy windows and icons. All we had were zeros and ones./*
Wally:*/ We didn't have ones. I once wrote an entire program with just zeros./*
Dilbert:*/ You had zeros? We had to use the letter "o".

Stefan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20121229/82c88164/attachment.html>

#25 lore raw

[Buildroot] Generating patches against packages source code

Stefan, All,

Quoted 3 lines · On Saturday 29 December 2012 Stefan Fr?berg wrote:

We "real" programmers just use nano as editor and raw diff as our patch generating tool.
;-)

Real Programmers use butterflies:

    https://xkcd.com/378/

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#26 lore raw

[Buildroot] Generating patches against packages source code

29.12.2012 21:56, Yann E. MORIN kirjoitti:

Quoted 8 lines

Stefan, All,

Quoted 3 lines · On Saturday 29 December 2012 Stefan Fr?berg wrote:

We "real" programmers just use nano as editor and raw diff as our patch generating tool.
;-)

Real Programmers use butterflies:

    https://xkcd.com/378/

ROLF!
:D

Quoted 3 lines

Regards,
Yann E. MORIN.

#27 lore raw

[Buildroot] Generating patches against packages source code

In reply to Thomas Petazzoni

Thomas, All,

Quoted 10 lines · On Saturday 29 December 2012 Thomas Petazzoni wrote:
Quoted 4 lines · Yann E. MORIN

So, I would recommend against using quilt; rather use the package's upstream repository, or at worse, create a temporary git tree just in the package's extracted directory: it's much more convenient and powerfull than using quilt.

<troll severity="strong">

That's because you're using a prehistoric, basic, limited and feature-less text editor named vim.

<troll mode="answer" next="no-more-please!">

OK, I've been stung to the quick! ;-)

    http://www.vim.org/scripts/script.php?script_id=1656

Whatever emacs can do, vim does it better! ;-)
Cheers!

</troll>

Regards,
Yann E. MORIN, hiding...

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'