Skip to contentSkip to conversation

fix for mplayer with armv7 / neon

Buildroot New Bruno Niklaus 4 participants 6 messages Oct 28, 2011 – Nov 3, 2011

lore
Share & tools
lore
#0 lore raw

hi @all

sorry i don't know how to make a patch file or how to send it / git it or how ever to
the buildroot source :)

i tried to build mplayer for a omap4430 / pandaboard, it always failed with error:

*arm/mpegvideo_arm.c:33: error: size of array 'x_H263_AIC' is negative*

after a bit of google search i found this email
http://comments.gmane.org/gmane.comp.video.mplayer.user/64844
and edited the file

*libavcodec/arm/asm-offsets.h*

like this
Line 38:
-- #define H263_AIC 0x2670
++ #define H263_AIC 0x2678.

after that i built without erros!

can you make a patch for this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20111028/22d6ff1b/attachment.html>

#1 lore raw

Hi,

Quoted 9 lines · Bruno Niklaus

hi @all
sorry i don't know how to make a patch file or how to send it / git it or how ever to
the buildroot source :)
i tried to build mplayer for a omap4430 / pandaboard, it always failed with error:
arm/mpegvideo_arm.c:33: error: size of array 'x_H263_AIC' is negative after a bit of google search i found this email
http://comments.gmane.org/gmane.comp.video.mplayer.user/64844

Quoted 8 lines

and edited the file
libavcodec/arm/asm-offsets.h
like this
Line 38:
--??#define H263_AIC ?0x2670
++ #define H263_AIC 0x2678.
after that i built without erros!
can you make a patch for this?

This issue was also reported previously:
https://bugs.busybox.net/show_bug.cgi?id=3535
The bug report refers to patches from chromium, but the following thread indicates that they may not be valid anymore:
http://thread.gmane.org/gmane.comp.video.ffmpeg.trac/677/focus=2097

I'm not sure whether your proposed solution is really the best one. The following irc log mentions that it may compile well, but crash during usage. Did you try running the resulting build?

To be honest, I can't help with finding out whether this patch is the right one.

Anyway, I think it would be great if you learned to use git or another version control system like mercurial. This will help in generating patches more easily.
But even without version control system, it's easy to create a patch:
* unpack the unmodified sources to some directory, e.g. /tmp/mplayer-1.2.3
* copy the directory to /tmp/mplayer-1.2.3.orig
* make your changes in /tmp/mplayer-1.2.3
* then at /tmp, type the following command:
diff -upNr mplayer-1.2.3.orig mplayer-1.2.3 > patchfile

The file 'patchfile' should now contain all the changes that you made. If you put that patch in package/multimedia/mplayer/ with the right name (mplayer-VERSION-DESCRIPTION.patch), then it should get applied after mplayer is extracted by buildroot.

Best regards,
Thomas

Quoted 5 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#2 lore raw

Hi Thomas,

thanks for your reply!

Actually my Pandaboard is still on its way to switzerland...

Okay, until it arrives here and i can test if mplayer really works i will get into the git / diff things,
when the board is here test if this change works or not, and then make a real patch !

Regards,
Bruno

2011/10/28 Thomas De Schampheleire <[email protected]>

Quoted 48 lines

Hi,

Quoted 5 lines · Bruno Niklaus

hi @all
sorry i don't know how to make a patch file or how to send it / git it or how ever to
the buildroot source :)
i tried to build mplayer for a omap4430 / pandaboard, it always failed

with

Quoted 4 lines

error:
arm/mpegvideo_arm.c:33: error: size of array 'x_H263_AIC' is negative after a bit of google search i found this email
http://comments.gmane.org/gmane.comp.video.mplayer.user/64844

Quoted 8 lines

and edited the file
libavcodec/arm/asm-offsets.h
like this
Line 38:
-- #define H263_AIC 0x2670
++ #define H263_AIC 0x2678.
after that i built without erros!
can you make a patch for this?

This issue was also reported previously:
https://bugs.busybox.net/show_bug.cgi?id=3535
The bug report refers to patches from chromium, but the following thread indicates that they may not be valid anymore:
http://thread.gmane.org/gmane.comp.video.ffmpeg.trac/677/focus=2097

I'm not sure whether your proposed solution is really the best one. The following irc log mentions that it may compile well, but crash during usage. Did you try running the resulting build?

To be honest, I can't help with finding out whether this patch is the right one.

Anyway, I think it would be great if you learned to use git or another version control system like mercurial. This will help in generating patches more easily.
But even without version control system, it's easy to create a patch:
* unpack the unmodified sources to some directory, e.g. /tmp/mplayer-1.2.3
* copy the directory to /tmp/mplayer-1.2.3.orig
* make your changes in /tmp/mplayer-1.2.3
* then at /tmp, type the following command:
diff -upNr mplayer-1.2.3.orig mplayer-1.2.3 > patchfile

Quoted 14 lines

The file 'patchfile' should now contain all the changes that you made. If you put that patch in package/multimedia/mplayer/ with the right name (mplayer-VERSION-DESCRIPTION.patch), then it should get applied after mplayer is extracted by buildroot.

Best regards,
Thomas

Quoted 5 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20111028/c5c7a75e/attachment.html>

#3 lore raw

Bruno Niklaus <[email protected]> Friday 28 of October 2011 13:24:52

Quoted 4 lines · wrote:

Okay, until it arrives here and i can test if mplayer really works i will get into the git / diff things,
when the board is here test if this change works or not, and then make a real patch !

Actually I did check this patch before because I have submitted a similiar
one. Mplayer worked quite fine with it. Unfortunately it does not work
anymore after my toolchain change, it segfaults and I do not have time
to debug this at this moment. Anyway, I would say the patch is OK.
Regards,
Damian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20111028/7f711c36/attachment-0001.asc>

#4 lore raw

PATCH 1/1 sudo: optionally add user "default" to sudoers

In reply to Thomas De Schampheleire

Hello all,

I think that using a non privileged user even in embedded systems is a real good concept.

To make things easier I made this little patch that generates a config option to add user "default" to the sudoers list when the package sudo is included in the system.

Kind regards

Stephan

---
 package/sudo/Config.in |    9 +++++++++
 package/sudo/sudo.mk   |    9 +++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)
package/sudo/Config.in +9 -0
index fc0a175..59b6a93 100644
@@ -7,3 +7,12 @@ config BR2_PACKAGE_SUDO
          but still allow people to get their work done.
 
          http://www.sudo.ws/sudo/
+
+if BR2_PACKAGE_SUDO
+
+config BR2_SUDO_ADD_DEFAULT
+       bool "add default user"
+       help
+         Add user "default" to sudoers file
+
+endif
package/sudo/sudo.mk +9 -0
index 9c62c49..adc1c0d 100644
@@ -15,10 +15,19 @@ SUDO_CONF_OPT = \
                --without-interfaces \
                --without-pam
 
+ifeq ($(BR2_SUDO_ADD_DEFAULT),y)
+define SUDO_ADD_DEFAULT
+       mkdir $(TARGET_DIR)/etc/sudoers.d
+       echo "default ALL = ALL" >$(TARGET_DIR)/etc/sudoers.d/default
+       chmod 0440 $(TARGET_DIR)/etc/sudoers.d/default
+endef
+endif
+
 define SUDO_INSTALL_TARGET_CMDS
        install -m 4555 -D $(@D)/sudo $(TARGET_DIR)/usr/bin/sudo
        install -m 0555 -D $(@D)/visudo $(TARGET_DIR)/usr/sbin/visudo
        install -m 0440 -D $(@D)/sudoers $(TARGET_DIR)/etc/sudoers
+       $(SUDO_ADD_DEFAULT)
 endef
 
 $(eval $(call AUTOTARGETS))
Signature · 7 lines
1.7.0.4

-- 
reLinux     -    Stephan Hoffmann
Am Schmidtgrund 124    50765 K?ln
Tel. +49.221.95595-19    Fax: -64
www.reLinux.de     sho at reLinux.de
#5 lore raw

PATCH 1/1 sudo: optionally add user "default" to sudoers

Hello all,

my previously sent patch to add user "default" to sudoers fails when /etc/sudoers.d/default already exists. Please find the corrected patch below.

With kind regards

Stephan

---
 package/sudo/Config.in |    9 +++++++++
 package/sudo/sudo.mk   |    9 +++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)
package/sudo/Config.in +9 -0
index fc0a175..59b6a93 100644
@@ -7,3 +7,12 @@ config BR2_PACKAGE_SUDO
          but still allow people to get their work done.
 
          http://www.sudo.ws/sudo/
+
+if BR2_PACKAGE_SUDO
+
+config BR2_SUDO_ADD_DEFAULT
+       bool "add default user"
+       help
+         Add user "default" to sudoers file
+
+endif
package/sudo/sudo.mk +10 -0
index 9c62c49..adc1c0d 100644
@@ -15,10 +15,19 @@ SUDO_CONF_OPT = \
                --without-interfaces \
                --without-pam
 
+ifeq ($(BR2_SUDO_ADD_DEFAULT),y)
+define SUDO_ADD_DEFAULT
+       test -d $(TARGET_DIR)/etc/sudoers.d || mkdir $(TARGET_DIR)/etc/sudoers.d
+       test -f $(TARGET_DIR)/etc/sudoers.d/default || \
+               echo "default ALL = ALL" >$(TARGET_DIR)/etc/sudoers.d/default; \
+               chmod 0440 $(TARGET_DIR)/etc/sudoers.d/default
+endef
+endif
+
 define SUDO_INSTALL_TARGET_CMDS
        install -m 4555 -D $(@D)/sudo $(TARGET_DIR)/usr/bin/sudo
        install -m 0555 -D $(@D)/visudo $(TARGET_DIR)/usr/sbin/visudo
        install -m 0440 -D $(@D)/sudoers $(TARGET_DIR)/etc/sudoers
+       $(SUDO_ADD_DEFAULT)
 endef
 

$(eval $(call AUTOTARGETS))
-- 1.7.0.4

Am 01.11.2011 15:26, schrieb Stephan Hoffmann:

Quoted 62 lines

Hello all,

I think that using a non privileged user even in embedded systems is a real good concept.

To make things easier I made this little patch that generates a config option to add user "default" to the sudoers list when the package sudo is included in the system.

Kind regards

Stephan

---
 package/sudo/Config.in |    9 +++++++++
 package/sudo/sudo.mk   |    9 +++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)
package/sudo/Config.in +9 -0
index fc0a175..59b6a93 100644
@@ -7,3 +7,12 @@ config BR2_PACKAGE_SUDO
          but still allow people to get their work done.
 
          http://www.sudo.ws/sudo/
+
+if BR2_PACKAGE_SUDO
+
+config BR2_SUDO_ADD_DEFAULT
+       bool "add default user"
+       help
+         Add user "default" to sudoers file
+
+endif
package/sudo/sudo.mk +9 -0
index 9c62c49..adc1c0d 100644
@@ -15,10 +15,19 @@ SUDO_CONF_OPT = \
                --without-interfaces \
                --without-pam
 
+ifeq ($(BR2_SUDO_ADD_DEFAULT),y)
+define SUDO_ADD_DEFAULT
+       mkdir $(TARGET_DIR)/etc/sudoers.d
+       echo "default ALL = ALL" >$(TARGET_DIR)/etc/sudoers.d/default
+       chmod 0440 $(TARGET_DIR)/etc/sudoers.d/default
+endef
+endif
+
 define SUDO_INSTALL_TARGET_CMDS
        install -m 4555 -D $(@D)/sudo $(TARGET_DIR)/usr/bin/sudo
        install -m 0555 -D $(@D)/visudo $(TARGET_DIR)/usr/sbin/visudo
        install -m 0440 -D $(@D)/sudoers $(TARGET_DIR)/etc/sudoers
+       $(SUDO_ADD_DEFAULT)
 endef
 
 $(eval $(call AUTOTARGETS))
Signature · 4 lines
reLinux     -    Stephan Hoffmann
Am Schmidtgrund 124    50765 K?ln
Tel. +49.221.95595-19    Fax: -64
www.reLinux.de     sho at reLinux.de