Patchwork [v2,2/7] sunxi-cedarx: bump to newer version, use armel2 binaries, add demo

login
register
mail settings
Submitter Spenser Gilliland
Date Sept. 6, 2013, 4:25 a.m.
Message ID <1378441521-10050-3-git-send-email-spenser@gillilanding.com>
Download mbox | patch
Permalink /patch/273050/
State Superseded
Headers show

Comments

Spenser Gilliland - Sept. 6, 2013, 4:25 a.m.
Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
---
 package/sunxi-cedarx/Config.in       | 10 ++++++++++
 package/sunxi-cedarx/sunxi-cedarx.mk | 26 ++++++++++++++++++++++----
 2 files changed, 32 insertions(+), 4 deletions(-)
Thomas Petazzoni - Sept. 8, 2013, 4:59 p.m.
Dear Spenser Gilliland,

It'd be great if your patches were split in a slightly more
fine-grained fashion. I.e this patch should have been three patches,
for the three different things you mention in the patch title.

On Thu,  5 Sep 2013 23:25:16 -0500, Spenser Gilliland wrote:
>  SUNXI_CEDARX_INSTALL_STAGING = YES
> @@ -14,7 +14,12 @@ SUNXI_CEDARX_CONFIGURE_OPTS = \
>  
>  ifeq ($(BR2_ARM_EABIHF),y)
>  SUNXI_CEDARX_BIN_DIR = $(@D)/libcedarv/linux-armhf
> -# libavheap.so is only available on EABIHF
> +SUNXI_CEDARX_SAMPLE_LOC = $(SUNXI_CEDARX_BIN_DIR)/sample/ve
> +else
> +SUNXI_CEDARX_BIN_DIR = $(@D)/libcedarv/linux-armel2
> +SUNXI_CEDARX_SAMPLE_LOC = $(SUNXI_CEDARX_BIN_DIR)/sample/output/ve
> +endif

I was confused by this for a while, but now I understand: since you've
bumped the version, the libavheap.so library is now available for
non-EABIhf toolchains.

BTW, silly from the cedarx people that the sample binary is not in the
same location between EABIhf and EABI.

Also, what is the difference between the linux-armel2 and linux-armel
directories in the CedarX stuff?

So, essentially, patch looks good to me.

Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Thomas
Spenser Gilliland - Sept. 12, 2013, 4:41 a.m.
Thomas,

On Sun, Sep 8, 2013 at 11:59 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Spenser Gilliland,
>
> It'd be great if your patches were split in a slightly more
> fine-grained fashion. I.e this patch should have been three patches,
> for the three different things you mention in the patch title.
>
> On Thu,  5 Sep 2013 23:25:16 -0500, Spenser Gilliland wrote:
>>  SUNXI_CEDARX_INSTALL_STAGING = YES
>> @@ -14,7 +14,12 @@ SUNXI_CEDARX_CONFIGURE_OPTS = \
>>
>>  ifeq ($(BR2_ARM_EABIHF),y)
>>  SUNXI_CEDARX_BIN_DIR = $(@D)/libcedarv/linux-armhf
>> -# libavheap.so is only available on EABIHF
>> +SUNXI_CEDARX_SAMPLE_LOC = $(SUNXI_CEDARX_BIN_DIR)/sample/ve
>> +else
>> +SUNXI_CEDARX_BIN_DIR = $(@D)/libcedarv/linux-armel2
>> +SUNXI_CEDARX_SAMPLE_LOC = $(SUNXI_CEDARX_BIN_DIR)/sample/output/ve
>> +endif
>
> I was confused by this for a while, but now I understand: since you've
> bumped the version, the libavheap.so library is now available for
> non-EABIhf toolchains.
>
> BTW, silly from the cedarx people that the sample binary is not in the
> same location between EABIhf and EABI.
>
> Also, what is the difference between the linux-armel2 and linux-armel
> directories in the CedarX stuff?

The major difference is the one you described above.  Armel2 has
libavheap while armel does not.

> So, essentially, patch looks good to me.
>
> Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Great.

> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com

Thanks,
Spenser
Peter Korsgaard - Sept. 20, 2013, 1:54 p.m.
>>>>> "Spenser" == Spenser Gilliland <spenser@gillilanding.com> writes:

 Spenser> Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
 Spenser> ---
 Spenser>  package/sunxi-cedarx/Config.in       | 10 ++++++++++
 Spenser>  package/sunxi-cedarx/sunxi-cedarx.mk | 26 ++++++++++++++++++++++----
 Spenser>  2 files changed, 32 insertions(+), 4 deletions(-)

 Spenser> diff --git a/package/sunxi-cedarx/Config.in b/package/sunxi-cedarx/Config.in
 Spenser> index b280db0..aa520b5 100644
 Spenser> --- a/package/sunxi-cedarx/Config.in
 Spenser> +++ b/package/sunxi-cedarx/Config.in
 Spenser> @@ -10,5 +10,15 @@ config BR2_PACKAGE_SUNXI_CEDARX
 Spenser>  	  http://github.com/linux-sunxi/cedarx-libs
 Spenser>  	  http://linux-sunxi.org/CedarX
 
 Spenser> +if BR2_PACKAGE_SUNXI_CEDARX
 Spenser> +
 Spenser> +config BR2_PACKAGE_SUNXI_CEDARX_DEMO
 Spenser> +	bool "install enc_dec_test demo"
 Spenser> +	help
 Spenser> +	  Install a test program which verifies the functionality of the CedarX
 Spenser> +	  libraries
 Spenser> +
 Spenser> +endif

Thanks, but it doesn't seem to build here:

make[1]: Entering directory `/home/peko/source/buildroot/output/build/sunxi-cedarx-74c3e9052/libcedarv/linux-armel2/sample'
arm-none-linux-gnueabi-gcc -Wall -O0 -g -I. -I./render -I./vdecoder/fbm -I./vdecoder/vbv -I./vdecoder/libvecore -I./vdecoder/libcedarv -I./vdecoder/adapter -I./vdecoder/adapter/cdxalloc -I./file_parser/pmp -I./include -I./file_parser/mov/inc -DFILE_PARSER -o main.o -c main.c
arm-none-linux-gnueabi-gcc -Wall -O0 -g -I. -I./render -I./vdecoder/fbm -I./vdecoder/vbv -I./vdecoder/libvecore -I./vdecoder/libcedarv -I./vdecoder/adapter -I./vdecoder/adapter/cdxalloc -I./file_parser/pmp -I./include -I./file_parser/mov/inc -DFILE_PARSER -o render/render.o -c render/render.c
arm-none-linux-gnueabi-gcc -Wall -O0 -g -I. -I./render -I./vdecoder/fbm -I./vdecoder/vbv -I./vdecoder/libvecore -I./vdecoder/libcedarv -I./vdecoder/adapter -I./vdecoder/adapter/cdxalloc -I./file_parser/pmp -I./include -I./file_parser/mov/inc -DFILE_PARSER -o file_parser/pmp/pmp.o -c file_parser/pmp/pmp.c
arm-none-linux-gnueabi-gcc -Wall -O0 -g -I. -I./render -I./vdecoder/fbm -I./vdecoder/vbv -I./vdecoder/libvecore -I./vdecoder/libcedarv -I./vdecoder/adapter -I./vdecoder/adapter/cdxalloc -I./file_parser/pmp -I./include -I./file_parser/mov/inc -DFILE_PARSER -o file_parser/pmp/pmp_ctrl.o -c file_parser/pmp/pmp_ctrl.c
In file included from file_parser/pmp/pmp.c:30:0:
file_parser/pmp/pmp.h:33:23: fatal error: libcedarv.h: No such file or directory
compilation terminated.
make[1]: *** [file_parser/pmp/pmp.o] Error 1
make[1]: *** Waiting for unfinished jobs....
main.c:5:46: fatal error: libcedarv.h: No such file or directory
compilation terminated.

Patch

diff --git a/package/sunxi-cedarx/Config.in b/package/sunxi-cedarx/Config.in
index b280db0..aa520b5 100644
--- a/package/sunxi-cedarx/Config.in
+++ b/package/sunxi-cedarx/Config.in
@@ -10,5 +10,15 @@  config BR2_PACKAGE_SUNXI_CEDARX
 	  http://github.com/linux-sunxi/cedarx-libs
 	  http://linux-sunxi.org/CedarX
 
+if BR2_PACKAGE_SUNXI_CEDARX
+
+config BR2_PACKAGE_SUNXI_CEDARX_DEMO
+	bool "install enc_dec_test demo"
+	help
+	  Install a test program which verifies the functionality of the CedarX
+	  libraries
+
+endif
+
 comment "sunxi-cedarx requires an eglibc/glibc based toolchain"
 	depends on !BR2_TOOLCHAIN_USES_GLIBC && BR2_arm
diff --git a/package/sunxi-cedarx/sunxi-cedarx.mk b/package/sunxi-cedarx/sunxi-cedarx.mk
index 07c85d4..bc8ee32 100644
--- a/package/sunxi-cedarx/sunxi-cedarx.mk
+++ b/package/sunxi-cedarx/sunxi-cedarx.mk
@@ -4,7 +4,7 @@ 
 #
 ################################################################################
 
-SUNXI_CEDARX_VERSION = 74923e55fc
+SUNXI_CEDARX_VERSION = 74c3e9052
 SUNXI_CEDARX_SITE = http://github.com/linux-sunxi/cedarx-libs/tarball/$(SUNXI_CEDARX_VERSION)
 
 SUNXI_CEDARX_INSTALL_STAGING = YES
@@ -14,7 +14,12 @@  SUNXI_CEDARX_CONFIGURE_OPTS = \
 
 ifeq ($(BR2_ARM_EABIHF),y)
 SUNXI_CEDARX_BIN_DIR = $(@D)/libcedarv/linux-armhf
-# libavheap.so is only available on EABIHF
+SUNXI_CEDARX_SAMPLE_LOC = $(SUNXI_CEDARX_BIN_DIR)/sample/ve
+else
+SUNXI_CEDARX_BIN_DIR = $(@D)/libcedarv/linux-armel2
+SUNXI_CEDARX_SAMPLE_LOC = $(SUNXI_CEDARX_BIN_DIR)/sample/output/ve
+endif
+
 define SUNXI_CEDARX_BUILD_AVHEAP
 	$(TARGET_CC) $(TARGET_CFLAGS) \
 		-c $(SUNXI_CEDARX_BIN_DIR)/adapter/avheap/avheap.c \
@@ -25,18 +30,30 @@  define SUNXI_CEDARX_BUILD_AVHEAP
 		-o $(SUNXI_CEDARX_BIN_DIR)/adapter/avheap/libavheap.so \
 		$(SUNXI_CEDARX_BIN_DIR)/adapter/avheap/avheap.o
 endef
+
 define SUNXI_CEDARX_INSTALL_AVHEAP
 	$(INSTALL) -D -m 755 $(SUNXI_CEDARX_BIN_DIR)/adapter/avheap/libavheap.so \
 		$(1)/usr/lib/libavheap.so
 endef
-else
-SUNXI_CEDARX_BIN_DIR = $(@D)/libcedarv/linux-armel
+
+ifeq ($(BR2_PACKAGE_SUNXI_CEDARX_DEMO),y)
+
+define SUNXI_CEDARX_BUILD_DEMO
+	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(SUNXI_CEDARX_BIN_DIR)/sample
+endef
+
+define SUNXI_CEDARX_INSTALL_DEMO
+	$(INSTALL) -D -m 755 $(SUNXI_CEDARX_SAMPLE_LOC) \
+		$(TARGET_DIR)/usr/bin/ve
+endef
+
 endif
 
 define SUNXI_CEDARX_BUILD_CMDS
 	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(SUNXI_CEDARX_BIN_DIR) \
 		$(SUNXI_CEDARX_CONFIGURE_OPTS)
 	$(SUNXI_CEDARX_BUILD_AVHEAP)
+	$(SUNXI_CEDARX_BUILD_DEMO)
 endef
 
 define SUNXI_CEDARX_INSTALL_STAGING_CMDS
@@ -54,6 +71,7 @@  define SUNXI_CEDARX_INSTALL_TARGET_CMDS
 	$(INSTALL) -D -m 755 $(SUNXI_CEDARX_BIN_DIR)/libvecore/libvecore.so \
 		$(TARGET_DIR)/usr/lib/libvecore.so
 	$(call SUNXI_CEDARX_INSTALL_AVHEAP, $(TARGET_DIR))
+	$(SUNXI_CEDARX_INSTALL_DEMO)
 endef
 
 $(eval $(generic-package))