衝著NOKIA N900 Linux base and open platform已經用了五六年的手機終於能退休了.事前其實沒作太多功課,光是看到x-terminal畫面還有busybox banner就已經受不了.期待已久真正功能強大又開放平台的Linux mobile phone終於出現了.對於像我這種天天在Linux programming的人來說真的是美夢成真,外人大概很難理解.網路上也有很多人對NOKIA update & bug fix很不滿.但以這一個月來使用的過程我個人覺得software穩定度已經很好,NOKIA一定也花了很多功夫在收尾.整體流暢度是還比不上IPhone但從Embedded Linux的產品來看真的是一大里程碑.
回到正題,NOKIA N900 Application Software的核心就是Maemo 5,架構可參考http://maemo.org/intro/platform/ 我想做的事就是寫一支可以在N900上跑的程式,用的是最熟悉不過的C Language.在開始之前有幾件事要做
1.在PC Ubuntu安裝Maemo 5 SDK,請參考http://maemo.org/development/
2.N900安裝openssh server & rootfs
開發的流程基本上是在Maemo 5 SDK 上coding and compile 再將binary複製到N900.
雖然說是Hello World但我並不想只是在x-terminal印個Hello World就好,而是能產生Window的程式.
其實到maemo.org就找得到這樣的程式碼.以下就是
/**
* This file is part of maemo-examples package
*
* This maemo code example is licensed under a MIT-style license,
* that can be found in the file called "COPYING" in the same
* directory as this file.
* Copyright (c) 2007-2008 Nokia Corporation. All rights reserved.
*/
/* Includes */
#include
#include
#include
int main(int argc, char *argv[])
{
/* Create needed variables */
HildonProgram *program;
HildonWindow *window;
/* Initialize the GTK. */
gtk_init(&argc, &argv);
/* Create the Hildon program and setup the title */
program = HILDON_PROGRAM(hildon_program_get_instance());
g_set_application_name("App Title");
/* Create HildonWindow and set it to HildonProgram */
window = HILDON_WINDOW(hildon_window_new());
hildon_program_add_window(program, window);
/* Add example label to window */
gtk_container_add(GTK_CONTAINER(window),
GTK_WIDGET(gtk_label_new("HildonProgram Example")));
/* Begin the main application */
gtk_widget_show_all(GTK_WIDGET(window));
/* Connect signal to X in the upper corner */
g_signal_connect(G_OBJECT(window), "delete_event",
G_CALLBACK(gtk_main_quit), NULL);
gtk_main();
/* Exit */
return 0;
}
Maemo 5大量的使用glib & gtk,並在gtk上再建立一套UI library叫做Hildon以方便建立Window及各種control element. 程式碼本身我不再贅述,重點在source code compile & link
gcc -Wall `pkg-config --cflags gtk+-2.0 hildon-1` example_hildonprogram.c -o example_hildonprogram `pkg-config --libs gtk+-2.0 hildon-1`
example_hildonprogram就可以執行了
值得一提的是切換SDK platform再compile就可以產生相對應的binary code
[sbox-FREMANTLE_X86: ~] > sb-conf select FREMANTLE_ARMEL
[sbox-FREMANTLE_ARMEL: ~] > sb-conf select FREMANTLE_X86
2010年7月23日 星期五
2010年6月26日 星期六
NOKIA N900 Setup
1.Add extra reposity
Extras-devel
http://repository.maemo.org/extras-devel/
fremantle
free non-free
Extras-testing
http://repository.maemo.org/extras-testing
fremantle
free non-free
2.X-Treminal 新增 ~ | > 符號
gconftool-2 -s /apps/osso/xterm/key_labels -t list --list-type=string "[Tab,Esc,Up,Dn,~,|,>]"
gconftool-2 -s /apps/osso/xterm/keys -t list --list-type=string "[Tab,Escape,Page_Up,Page_Down,asciitilde,bar,greater]"
3.Keyboard Shortcut
General
Ctrl + Backspace: From within an application this will take you back out to the visual task manager. (Thanks to Chanse for that one.)
Ctrl + C: Copy text
Ctrl + V: Paste text
Ctrl + X: Cut text
Ctrl + A: Select all
Ctrl + O: Open (if available)
Ctrl + N: Create a new item (if available)
Ctrl + S: Save (if available)
Ctrl + Z: Undo (if available)
Ctrl + Y: Redo (if available)
Ctrl + F: Open search bar (if available)
Ctrl + Right arrow: Move the insertion point to the end of the word
Ctrl + Left arrow: Move the insertion point to the beginning of the word
Run root or sudo gainroot

4.Upgrade firmware to PR1.2
https://wiki.maemo.org/Updating_the_tablet_firmware
Download firmware
http://tablets-dev.nokia.com/nokia_N900.php
Usage
http://www.mobile01.com/topicdetail.php?f=122&t=1571608&p=1
http://www.mobile01.com/topicdetail.php?f=122&t=1571904&p=1
http://www.maemoers.com/thread-1176-1-1.html
5.Some screenshots




6.Access built-in camera through gstreamer
http://wiki.maemo.org/Documentation/Maemo_5_Developer_Guide/Using_Multimedia_Components/Camera_API_Usage
Since the maemo platform delegates all multimedia handling to the GStreamer framework, applications that need access to the built-in camera should employ GStreamer for this, instead of directly accessing Video4Linux devices, via the v4l2src GStreamer module.
安裝gstreamer tools
sudo gainroot
http://blog.pclewis.com/2010/02/streaming-nokia-n900-camera-to-vlc/
Extras-devel
http://repository.maemo.org/extras-devel/
fremantle
free non-free
Extras-testing
http://repository.maemo.org/extras-testing
fremantle
free non-free
2.X-Treminal 新增 ~ | > 符號
gconftool-2 -s /apps/osso/xterm/key_labels -t list --list-type=string "[Tab,Esc,Up,Dn,~,|,>]"
gconftool-2 -s /apps/osso/xterm/keys -t list --list-type=string "[Tab,Escape,Page_Up,Page_Down,asciitilde,bar,greater]"
3.Keyboard Shortcut
General
Ctrl + Backspace: From within an application this will take you back out to the visual task manager. (Thanks to Chanse for that one.)
Ctrl + C: Copy text
Ctrl + V: Paste text
Ctrl + X: Cut text
Ctrl + A: Select all
Ctrl + O: Open (if available)
Ctrl + N: Create a new item (if available)
Ctrl + S: Save (if available)
Ctrl + Z: Undo (if available)
Ctrl + Y: Redo (if available)
Ctrl + F: Open search bar (if available)
Ctrl + Right arrow: Move the insertion point to the end of the word
Ctrl + Left arrow: Move the insertion point to the beginning of the word
Web browser
Ctrl + N: Open a new window
Ctrl + R: Reload the current page
Ctrl + B: Open a bookmark
Ctrl + D: Add a bookmark
Email
Ctrl + Enter: Send a message
Ctrl + R: Reply to a message
RSS Reader
Ctrl + R: Refresh the feed
Screenshots
Ctrl + Shift + P: Capture a screenshot.
3.rooting N900
Install rootsh package
Run root or sudo gainroot

4.Upgrade firmware to PR1.2
https://wiki.maemo.org/Updating_the_tablet_firmware
Download firmware
http://tablets-dev.nokia.com/nokia_N900.php
Usage
http://www.mobile01.com/topicdetail.php?f=122&t=1571608&p=1
http://www.mobile01.com/topicdetail.php?f=122&t=1571904&p=1
http://www.maemoers.com/thread-1176-1-1.html
5.Some screenshots




6.Access built-in camera through gstreamer
http://wiki.maemo.org/Documentation/Maemo_5_Developer_Guide/Using_Multimedia_Components/Camera_API_Usage
Since the maemo platform delegates all multimedia handling to the GStreamer framework, applications that need access to the built-in camera should employ GStreamer for this, instead of directly accessing Video4Linux devices, via the v4l2src GStreamer module.
安裝gstreamer tools
sudo gainroot
apt-get install gstreamer-tools
http://blog.pclewis.com/2010/02/streaming-nokia-n900-camera-to-vlc/
2010年6月10日 星期四
Rowboat Android Compile for BeagleBoard
Attention !!! The article is no longer useful due to rowboat updated ...
1.Get source
repo init -u git://gitorious.org/rowboat/manifest.git -m rowboat-eclair-dsp.xml
2.Build
cd kernel
git checkout -b rowboat-eclair-2.6.32 rowboat/rowboat-eclair-2.6.32
cd ..
make TARGET_PRODUCT=beagleboard BUILD_WITH_GST=true dvsdk
3.Problems & Solutions
4.IO_ADDRESS undefine
Edit external/ti-dsp/dvsdk_3_00_02_44/dsplink_1_61_03/packages/dsplink/gpp/src/arch/OMAP3530/shmem/Linux/omap3530_phy_shmem.c
#if 0
halObject->generalCtrlBase = (Uint32)IO_ADDRESS(GENERAL_CONTROL_BASE) ;
halObject->iva2CmBase = (Uint32)IO_ADDRESS(IVA2_CM_BASE) ;
halObject->coreCmBase = (Uint32)IO_ADDRESS(CORE_CM_BASE) ;
halObject->perCmBase = (Uint32)IO_ADDRESS(PER_CM_BASE) ;
halObject->iva2PrmBase = (Uint32)IO_ADDRESS(IVA2_PRM_BASE) ;
halObject->mailboxBase = (Uint32)IO_ADDRESS(MAILBOX_BASE) ;
#endif
halObject->generalCtrlBase = (Uint32)ioremap(GENERAL_CONTROL_BASE, 4096) ;
halObject->iva2CmBase = (Uint32)ioremap(IVA2_CM_BASE, 8192) ;
halObject->coreCmBase = (Uint32)ioremap(CORE_CM_BASE, 8192) ;
halObject->perCmBase = (Uint32)ioremap(PER_CM_BASE, 8192) ;
halObject->iva2PrmBase = (Uint32)ioremap(IVA2_PRM_BASE, 8192) ;
halObject->mailboxBase = (Uint32)ioremap(MAILBOX_BASE, 4096) ;
5.
CC [M] /home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.o
/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c:53:2: warning: #warning *** not a warning *** Note: LINUX_VERSION_CODE >= 2.6.26
/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c: In function 'set_cached':
/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c:1086: error: 'L_PTE_CACHEABLE' undeclared (first use in this function)
/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c:1086: error: (Each undeclared identifier is reported only once
/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c:1086: error: for each function it appears in.)
/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c:1086: error: 'L_PTE_BUFFERABLE' undeclared (first use in this function)
make[6]: *** [/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.o] Error 1
make[5]: *** [_module_/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/cmem/src/module] Error 2
make[5]: Leaving directory `/home/gigijoe/rowboat-android/kernel'
gmake[4]: *** [release] Error 2
gmake[4]: Leaving directory `/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/cmem/src/module'
gmake[3]: *** [module] Error 2
gmake[3]: Leaving directory `/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/cmem/src'
gmake[2]: *** [src] Error 2
gmake[2]: Leaving directory `/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/cmem'
make[1]: *** [cmem_build] Error 2
make[1]: Leaving directory `/home/gigijoe/rowboat-android/external/ti-dsp'
make: *** [dvsdk] Error 2
Edit external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
- vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) |
- (L_PTE_CACHEABLE | L_PTE_BUFFERABLE)
- );
+ vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot) |
+ (L_PTE_MT_WRITETHROUGH | L_PTE_MT_BUFFERABLE)
+ );
Reference
http://www.mail-archive.com/davinci-linux-open-source@linux.davincidsp.com/msg15716.html
6.
CC [M] /home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.o
/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c:45:22: error: mach/dma.h: No such file or directory
/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c:46:21: error: mach/tc.h: No such file or directory
/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c:61:2: warning: #warning *** not a warning *** Note: LINUX_VERSION_CODE >= 2.6.26
/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c: In function 'dma_ioctl':
/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c:150: error: implicit declaration of function 'omap_request_dma'
/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c:150: error: 'OMAP_DMA_NO_DEVICE' undeclared (first use in this function)
/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c:150: error: (Each undeclared identifier is reported only once
/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c:150: error: for each function it appears in.)
/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c:184: error: implicit declaration of function 'omap_free_dma'
make[6]: *** [/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.o] Error 1
make[5]: *** [_module_/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/sdma/src/module] Error 2
make[5]: Leaving directory `/home/gigijoe/rowboat-android/kernel'
gmake[4]: *** [release] Error 2
gmake[4]: Leaving directory `/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/sdma/src/module'
gmake[3]: *** [module] Error 2
gmake[3]: Leaving directory `/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/sdma/src'
gmake[2]: *** [src] Error 2
gmake[2]: Leaving directory `/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/sdma'
make[1]: *** [sdma_build] Error 2
make[1]: Leaving directory `/home/gigijoe/rowboat-android/external/ti-dsp'
make: *** [dvsdk] Error 2
Edit external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c
-#include mach/dma.h
-#include mach/tc.h
+#include plat/dma.h
+#include plat/tc.h
7.Unable to compile mp3codec. Disable it
======== .interfaces [packages/ti/sdo/codecs/mp3dec] ========
package.mak:17: *** target pattern contains no `%'. Stop.
gmake: *** [packages/ti/sdo/codecs/mp3dec,.interfaces] Error 2
gmake[2]: *** [.all-packages] Error 2
gmake[2]: Leaving directory `/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/cs1omap3530_1_00_01'
make[1]: *** [cs_build] Error 2
make[1]: Leaving directory `/home/gigijoe/rowboat-android/external/ti-dsp'
make: *** [dvsdk] Error 2
Edit external/ti-dsp/dvsdk_3_00_02_44/cs1omap3530_1_00_01/packages/ti/sdo/server/cs/codec.cfg
- var MP3DEC = xdc.useModule('ti.sdo.codecs.mp3dec.ce.MP3DEC');
-// MP3DEC.alg.watermark = true; /*if it is evaluation version */
- MP3DEC.alg.watermark = false; /*if it is production version.*/
- MP3DEC.alg.codeSection = "DDR2";
- MP3DEC.alg.dataSection = "DDR2";
- MP3DEC.alg.udataSection = "DDR2";
...
- {name: "mp3dec", mod: MP3DEC,threadAttrs: {
- stackMemId: 0, priority: Server.MINPRI + 2}, groupId : 1,
- },
...
Edit external/ti-dsp/dvsdk_3_00_02_44/cs1omap3530_1_00_01/packages/ti/sdo/server/cs/package.xs
- validate_one_codec( "ti.sdo.codecs.mp3dec", "MP3DEC" );
rm -rf external/ti-dsp/dvsdk_3_00_02_44/cs1omap3530_1_00_01/packages/ti/sdo/codecs/mp3dec
8.
linux/Display_fbdev.c:45:29: error: mach/omapfb.h: No such file or directory
linux/Display_fbdev.c: In function 'Display_fbdev_create':
linux/Display_fbdev.c:260: error: 'OMAPFB_COLOR_YUV422' undeclared (first use in this function)
linux/Display_fbdev.c:260: error: (Each undeclared identifier is reported only once
linux/Display_fbdev.c:260: error: for each function it appears in.)
linux/Display_fbdev.c:279: warning: comparison between signed and unsigned integer expressions
linux/Display_fbdev.c:279: warning: comparison between signed and unsigned integer expressions
linux/Display_fbdev.c:280: warning: comparison between signed and unsigned integer expressions
gmake[3]: *** [obj/linux/Display_fbdev.omap3530.o470MV] Error 1
gmake[3]: Leaving directory `/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/dmai_2_00_01_04/packages/ti/sdo/dmai'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/dmai_2_00_01_04'
make[1]: *** [dmai_build] Error 2
make[1]: Leaving directory `/home/gigijoe/rowboat-android/external/ti-dsp'
make: *** [dvsdk] Error 2
Edit external/ti-dsp/dvsdk_3_00_02_44/dmai_2_00_01_04/packages/ti/sdo/dmai/linux/Display_fbdev.c
#ifdef Dmai_Device_omap3530
- #include mach/omapfb.h
+ #include linux/omapfb.h
#else
// #include video/davincifb.h
#endif
9.
/home/gigijoe/rowboat-android/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-gcc -I/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/xdctools_3_15_01_59/packages -I../../../../packages -I/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/packages -I/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages -I/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/xdais_6_24/packages -DDmai_Device_omap3530 -I/home/gigijoe/rowboat-android/kernel/include -I/home/gigijoe/rowboat-android/kernel/arch/arm/plat-omap/include -include /home/gigijoe/rowboat-android/kernel/include/linux/autoconf.h -I/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages -I/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/dsplink_1_61_03/packages -DDmai_BuildOs_linux -Dxdc_target_types__=gnu/targets/std.h -I/home/gigijoe/dvsdk_3_00_00_32/linuxlibs/include -Dxdc_target_name__=arm/GCArmv7A -g -Wall -I/home/gigijoe/rowboat-android/bionic/libc/arch-arm/include -I/home/gigijoe/rowboat-android/bionic/libc/include -I/home/gigijoe/rowboat-android/bionic/libstdc++/include -I/home/gigijoe/rowboat-android/bionic/libc/kernel/common -I/home/gigijoe/rowboat-android/bionic/libc/kernel/arch-arm -I/home/gigijoe/rowboat-android/bionic/libm/include -I/home/gigijoe/rowboat-android/bionic/libm/arch/arm/include -I/home/gigijoe/rowboat-android/bionic/libthread_db/include -DHAVE_ARM_TLS_REGISTER -DANDROID -D_ANDROID_ -DSK_RELEASE -DNDEBUG -UDEBUG -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -finline-functions -fno-inline-functions-called-once -fgcse-after-reload -frerun-cse-after-loop -frename-registers -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -fno-exceptions -fmessage-length=0 -march=armv7-a -mfloat-abi=softfp -msoft-float -mfpu=neon -mthumb -mthumb-interwork -W -Wall -Wno-unused -Winit-self -Wpointer-arith -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wstrict-aliasing=2 -Wno-multichar -Wno-missing-field-initializers -Os -g -I/home/gigijoe/rowboat-android/external/alsa-lib/include -I/home/gigijoe/rowboat-android/frameworks/base/include -c -o obj/linux/Fifo.omap3530.o470MV linux/Fifo.c
In file included from /home/gigijoe/rowboat-android/bionic/libc/kernel/arch-arm/asm/signal.h:82,
from /home/gigijoe/rowboat-android/bionic/libc/include/signal.h:35,
from /home/gigijoe/rowboat-android/bionic/libc/include/pthread.h:32,
from linux/Fifo.c:35:
/home/gigijoe/rowboat-android/kernel/include/asm-generic/signal.h:94: error: '__BITS_PER_LONG' undeclared here (not in a function)
/home/gigijoe/rowboat-android/kernel/include/asm-generic/signal.h:95: error: conflicting types for 'sigset_t'
/home/gigijoe/rowboat-android/bionic/libc/kernel/arch-arm/asm/signal.h:20: note: previous declaration of 'sigset_t' was here
In file included from /home/gigijoe/rowboat-android/bionic/libc/include/signal.h:35,
from /home/gigijoe/rowboat-android/bionic/libc/include/pthread.h:32,
from linux/Fifo.c:35:
/home/gigijoe/rowboat-android/bionic/libc/kernel/arch-arm/asm/signal.h:84: error: redefinition of 'struct sigaction'
/home/gigijoe/rowboat-android/bionic/libc/kernel/arch-arm/asm/signal.h:97: error: redefinition of 'struct sigaltstack'
/home/gigijoe/rowboat-android/bionic/libc/kernel/arch-arm/asm/signal.h:101: error: conflicting types for 'stack_t'
/home/gigijoe/rowboat-android/kernel/include/asm-generic/signal.h:119: note: previous declaration of 'stack_t' was here
gmake[3]: *** [obj/linux/Fifo.omap3530.o470MV] Error 1
gmake[3]: Leaving directory `/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/dmai_2_00_01_04/packages/ti/sdo/dmai'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/dmai_2_00_01_04'
make[1]: *** [dmai_build] Error 2
make[1]: Leaving directory `/home/gigijoe/rowboat-android/external/ti-dsp'
make: *** [dvsdk] Error 2
Edit external/ti-dsp/dvsdk_3_00_02_44/dmai_2_00_01_04/packages/ti/sdo/dmai/Makefile
-GCC_CPP_FLAGS += $(CPP_FLAGS) -I$(LINUXKERNEL_INSTALL_DIR)/include -I$(LINUXKERNEL_INSTALL_DIR)/arch/arm/$(PLATFORM_ARCH)/include $(HAVE_AUTOCONFIG) -I$(CMEM_INSTALL_DIR)/packages -I$(LINK_INSTALL_DIR)/packages -DDmai_BuildOs_linux -Dxdc_target_types__=gnu/targets/std.h -I$(LINUXLIBS_INSTALL_DIR)/include -Dxdc_target_name__=arm/GCArmv7A
+GCC_CPP_FLAGS += $(CPP_FLAGS) -I$(LINUXKERNEL_INSTALL_DIR)/arch/arm/$(PLATFORM_ARCH)/include $(HAVE_AUTOCONFIG) -I$(CMEM_INSTALL_DIR)/packages -I$(LINK_INSTALL_DIR)/packages -DDmai_BuildOs_linux -Dxdc_target_types__=gnu/targets/std.h -I$(LINUXLIBS_INSTALL_DIR)/include -Dxdc_target_name__=arm/GCArmv7A
10.
/home/gigijoe/rowboat-android/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-gcc -I/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/xdctools_3_15_01_59/packages -I../../../../packages -I/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/packages -I/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages -I/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/xdais_6_24/packages -DDmai_Device_omap3530 -I/home/gigijoe/rowboat-android/kernel/arch/arm/plat-omap/include -include /home/gigijoe/rowboat-android/kernel/include/linux/autoconf.h -I/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages -I/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/dsplink_1_61_03/packages -DDmai_BuildOs_linux -Dxdc_target_types__=gnu/targets/std.h -I/home/gigijoe/dvsdk_3_00_00_32/linuxlibs/include -Dxdc_target_name__=arm/GCArmv7A -g -Wall -I/home/gigijoe/rowboat-android/bionic/libc/arch-arm/include -I/home/gigijoe/rowboat-android/bionic/libc/include -I/home/gigijoe/rowboat-android/bionic/libstdc++/include -I/home/gigijoe/rowboat-android/bionic/libc/kernel/common -I/home/gigijoe/rowboat-android/bionic/libc/kernel/arch-arm -I/home/gigijoe/rowboat-android/bionic/libm/include -I/home/gigijoe/rowboat-android/bionic/libm/arch/arm/include -I/home/gigijoe/rowboat-android/bionic/libthread_db/include -DHAVE_ARM_TLS_REGISTER -DANDROID -D_ANDROID_ -DSK_RELEASE -DNDEBUG -UDEBUG -fpic -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -finline-functions -fno-inline-functions-called-once -fgcse-after-reload -frerun-cse-after-loop -frename-registers -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -fno-exceptions -fmessage-length=0 -march=armv7-a -mfloat-abi=softfp -msoft-float -mfpu=neon -mthumb -mthumb-interwork -W -Wall -Wno-unused -Winit-self -Wpointer-arith -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wstrict-aliasing=2 -Wno-multichar -Wno-missing-field-initializers -Os -g -I/home/gigijoe/rowboat-android/external/alsa-lib/include -I/home/gigijoe/rowboat-android/frameworks/base/include -c -o obj/linux/omap3530/Framecopy_accel.omap3530.o470MV linux/omap3530/Framecopy_accel.c
linux/omap3530/Framecopy_accel.c:51:32: error: linux/omap_resizer.h: No such file or directory
linux/omap3530/Framecopy_accel.c: In function 'Framecopy_accel_config':
linux/omap3530/Framecopy_accel.c:78: error: variable 'params' has initializer but incomplete type
linux/omap3530/Framecopy_accel.c:79: warning: excess elements in struct initializer
linux/omap3530/Framecopy_accel.c:79: warning: (near initialization for 'params')
linux/omap3530/Framecopy_accel.c:80: warning: excess elements in struct initializer
linux/omap3530/Framecopy_accel.c:80: warning: (near initialization for 'params')
linux/omap3530/Framecopy_accel.c:81: warning: excess elements in struct initializer
linux/omap3530/Framecopy_accel.c:81: warning: (near initialization for 'params')
linux/omap3530/Framecopy_accel.c:82: error: 'RSZ_INTYPE_YCBCR422_16BIT' undeclared (first use in this function)
linux/omap3530/Framecopy_accel.c:82: error: (Each undeclared identifier is reported only once
linux/omap3530/Framecopy_accel.c:82: error: for each function it appears in.)
linux/omap3530/Framecopy_accel.c:82: warning: excess elements in struct initializer
linux/omap3530/Framecopy_accel.c:82: warning: (near initialization for 'params')
linux/omap3530/Framecopy_accel.c:83: warning: excess elements in struct initializer
linux/omap3530/Framecopy_accel.c:83: warning: (near initialization for 'params')
linux/omap3530/Framecopy_accel.c:84: warning: excess elements in struct initializer
linux/omap3530/Framecopy_accel.c:84: warning: (near initialization for 'params')
linux/omap3530/Framecopy_accel.c:85: warning: excess elements in struct initializer
linux/omap3530/Framecopy_accel.c:85: warning: (near initialization for 'params')
linux/omap3530/Framecopy_accel.c:86: error: 'RSZ_PIX_FMT_UYVY' undeclared (first use in this function)
linux/omap3530/Framecopy_accel.c:86: warning: excess elements in struct initializer
linux/omap3530/Framecopy_accel.c:86: warning: (near initialization for 'params')
linux/omap3530/Framecopy_accel.c:87: warning: excess elements in struct initializer
linux/omap3530/Framecopy_accel.c:87: warning: (near initialization for 'params')
linux/omap3530/Framecopy_accel.c:88: warning: excess elements in struct initializer
linux/omap3530/Framecopy_accel.c:88: warning: (near initialization for 'params')
linux/omap3530/Framecopy_accel.c:89: warning: excess elements in struct initializer
linux/omap3530/Framecopy_accel.c:89: warning: (near initialization for 'params')
linux/omap3530/Framecopy_accel.c:90: warning: excess elements in struct initializer
linux/omap3530/Framecopy_accel.c:90: warning: (near initialization for 'params')
linux/omap3530/Framecopy_accel.c:91: warning: excess elements in struct initializer
linux/omap3530/Framecopy_accel.c:91: warning: (near initialization for 'params')
linux/omap3530/Framecopy_accel.c:92: error: extra brace group at end of initializer
linux/omap3530/Framecopy_accel.c:92: error: (near initialization for 'params')
linux/omap3530/Framecopy_accel.c:97: warning: excess elements in struct initializer
linux/omap3530/Framecopy_accel.c:97: warning: (near initialization for 'params')
linux/omap3530/Framecopy_accel.c:98: error: extra brace group at end of initializer
linux/omap3530/Framecopy_accel.c:98: error: (near initialization for 'params')
linux/omap3530/Framecopy_accel.c:103: warning: excess elements in struct initializer
linux/omap3530/Framecopy_accel.c:103: warning: (near initialization for 'params')
linux/omap3530/Framecopy_accel.c:104: error: extra brace group at end of initializer
linux/omap3530/Framecopy_accel.c:104: error: (near initialization for 'params')
linux/omap3530/Framecopy_accel.c:109: warning: excess elements in struct initializer
linux/omap3530/Framecopy_accel.c:109: warning: (near initialization for 'params')
linux/omap3530/Framecopy_accel.c:78: error: storage size of 'params' isn't known
linux/omap3530/Framecopy_accel.c:140: error: 'RSZ_S_PARAM' undeclared (first use in this function)
linux/omap3530/Framecopy_accel.c:147: error: 'RSZ_S_EXP' undeclared (first use in this function)
linux/omap3530/Framecopy_accel.c:155: error: 'RSZ_REQBUF' undeclared (first use in this function)
linux/omap3530/Framecopy_accel.c: In function 'Framecopy_accel_execute':
linux/omap3530/Framecopy_accel.c:221: error: 'RSZ_QUERYBUF' undeclared (first use in this function)
linux/omap3530/Framecopy_accel.c:235: error: 'RSZ_QUEUEBUF' undeclared (first use in this function)
linux/omap3530/Framecopy_accel.c:241: error: 'RSZ_RESIZE' undeclared (first use in this function)
gmake[3]: *** [obj/linux/omap3530/Framecopy_accel.omap3530.o470MV] Error 1
gmake[3]: Leaving directory `/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/dmai_2_00_01_04/packages/ti/sdo/dmai'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/home/gigijoe/rowboat-android/external/ti-dsp/dvsdk_3_00_02_44/dmai_2_00_01_04'
make[1]: *** [dmai_build] Error 2
make[1]: Leaving directory `/home/gigijoe/rowboat-android/external/ti-dsp'
make: *** [dvsdk] Error 2
Edit external/ti-dsp/dvsdk_3_00_02_44/dmai_2_00_01_04/packages/ti/sdo/dmai/Makefile
+GCC_CPP_FLAGS += $(CPP_FLAGS) -I$(LINUXKERNEL_INSTALL_DIR)/include -I$(LINUXKERNEL_INSTALL_DIR)/arch/arm/$(PLATFORM_ARCH)/include $(HAVE_AUTOCONFIG) -I$(CMEM_INSTALL_DIR)/packages -I$(LINK_INSTALL_DIR)/packages -DDmai_BuildOs_linux -Dxdc_target_types__=gnu/targets/std.h -I$(LINUXLIBS_INSTALL_DIR)/include -Dxdc_target_name__=arm/GCArmv7A
-GCC_CPP_FLAGS += $(CPP_FLAGS) -I$(LINUXKERNEL_INSTALL_DIR)/arch/arm/$(PLATFORM_ARCH)/include $(HAVE_AUTOCONFIG) -I$(CMEM_INSTALL_DIR)/packages -I$(LINK_INSTALL_DIR)/packages -DDmai_BuildOs_linux -Dxdc_target_types__=gnu/targets/std.h -I$(LINUXLIBS_INSTALL_DIR)/include -Dxdc_target_name__=arm/GCArmv7A
11.cmemk: Unknown symbol init_mm
Edit kernel/.config
CONFIG_UNUSED_SYMBOLS=y
vi ./external/ti-dsp/dvsdk_3_00_02_44/codec_engine_2_24_01/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
/*
* This is useful to dump out the page tables associated with
* 'addr' in mm 'mm'.
*/
void show_pte(struct mm_struct *mm, unsigned long addr)
{
pgd_t *pgd;
#if 0
if (!mm)
mm = &init_mm;
#endif
vi ./external/ti-dsp/dvsdk_3_00_02_44/linuxutils_2_24_02/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
/*
* This is useful to dump out the page tables associated with
* 'addr' in mm 'mm'.
*/
void show_pte(struct mm_struct *mm, unsigned long addr)
{
pgd_t *pgd;
#if 0
if (!mm)
mm = &init_mm;
#endif
Reference
http://groups.google.gp/group/linux.kernel/browse_thread/thread/66877343361ce881
12.Disable trace of dsplink
Edit external/ti-dsp/Makefile
-DSPLINK_CONFIG := --platform=OMAP3530 --nodsp=1 --dspcfg_0=OMAP3530SHMEM --dspos_0=DSPBIOS5XX --gppos=OMAPLSP --comps=ponslrmc --trace=1
+DSPLINK_CONFIG := --platform=OMAP3530 --nodsp=1 --dspcfg_0=OMAP3530SHMEM --dspos_0=DSPBIOS5XX --gppos=OMAPLSP --comps=ponslrmc
13.TI DMAI issue
The Dmai not work due to incompatable DSS sysfs interface
export CE_DEBUG=1
export DMAI_DEBUG=3
@0,629,974us: [+6 T:0xafe44a98] CE - Engine_init> CE debugging on (CE_DEBUG=1; allowed CE_DEBUG levels: 1=min, 2=good, 3=max)
@0,430,175us: [+6 T:0xafe44a98] CE - Engine_init> CE debugging on (CE_DEBUG=1; allowed CE_DEBUG levels: 1=min, 2=good, 3=max)
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
@0,590,759us: [+7 T:0x0010dfa8] ti.sdo.dmai - [Dmai] Failed to open /sys/devices/platform/omapfb/overlays for writing
@0,590,850us: [+7 T:0x0010dfa8] ti.sdo.dmai - [Display] Failed to write gfx e:0 on /sys/devices/platform/omapfb/overlays
@0,590,881us: [+7 T:0x0010dfa8] ti.sdo.dmai - Caught SIGSEGV accessing address 0x1
init: untracked pid 1047 exited
For now I just disable sysfs support to get DMAI works with default DSS setup.
Edit external/ti-dsp/dvsdk_3_00_02_44/dmai_2_00_01_04/packages/ti/sdo/dmai/linux/Display.c
/******************************************************************************
* _Display_sysfsChange (INTERNAL)
******************************************************************************/
Int _Display_sysfsChange(Display_Output displayOutput,
Char* displayDevice, VideoStd_Type *videoType,
Int *rotation)
{
+#if 0
-#ifdef Dmai_Device_omap3530
Testing
gst-launch-0.10 videotestsrc num-buffers=1000 ! TIDmaiVideoSink accelFrameCopy=false
gst-launch-0.10 filesrc location=/sdcard/video.mp4 ! typefind ! qtdemux name=demux demux.video_00 ! queue ! TIViddec2 ! TIDmaiVideoSink accelFrameCopy=false
2010年6月1日 星期二
Gstreamer V4L2 input & H.264 RTP
Reference
http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines
http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/gst/rtp/README
1.Camera preview
gst-launch-0.10 v4l2src ! video/x-raw-yuv,width=320,height=240 ! ffmpegcolorspace ! ximagesink
2.Video Source (192.168.168.90)
gst-launch -v v4l2src ! video/x-raw-yuv,width=640,height=480,framerate=30/1 ! x264enc ! rtph264pay pt=96 ! multiudpsink clients="192.168.168.75:1234"
另外一種方式
http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/tests/examples/rtp/server-v4l2-H264-alsasrc-PCMA.sh
3.Video Sink (192.168.168.75)
gst-launch udpsrc port=1234 caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264" ! gstrtpjitterbuffer latency=100 ! rtph264depay ! ffdec_h264 ! xvimagesink
另外一種方式
http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/tests/examples/rtp/client-H264.sh
http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/tests/examples/rtp/client-H264-PCMA.sh
4.轉載一篇很詳細的文章
http://www.twm-kd.com/computers/software/webcam-and-linux-gstreamer-tutorial/
http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines
http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/gst/rtp/README
1.Camera preview
gst-launch-0.10 v4l2src ! video/x-raw-yuv,width=320,height=240 ! ffmpegcolorspace ! ximagesink
2.Video Source (192.168.168.90)
gst-launch -v v4l2src ! video/x-raw-yuv,width=640,height=480,framerate=30/1 ! x264enc ! rtph264pay pt=96 ! multiudpsink clients="192.168.168.75:1234"
另外一種方式
http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/tests/examples/rtp/server-v4l2-H264-alsasrc-PCMA.sh
3.Video Sink (192.168.168.75)
gst-launch udpsrc port=1234 caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264" ! gstrtpjitterbuffer latency=100 ! rtph264depay ! ffdec_h264 ! xvimagesink
另外一種方式
http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/tests/examples/rtp/client-H264.sh
http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/tests/examples/rtp/client-H264-PCMA.sh
4.轉載一篇很詳細的文章
http://www.twm-kd.com/computers/software/webcam-and-linux-gstreamer-tutorial/
2010年5月31日 星期一
Broadcom Crystal HD for Linux
1.Compile procdure
unzip crystalhd_linux_20091229.zip
cd crystalhd
cd driver/linux
fromdos ./*
autoconf
$ ./configure
checking for ld... ld
configure: creating ./config.status
config.status: creating ./Makefile
$ make
make -C /lib/modules/2.6.32-22-generic/build SUBDIRS=/home/steve/crystalhd/driver/linux modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-22-generic'
CC [M] /home/steve/crystalhd/driver/linux/crystalhd_lnx.o
CC [M] /home/steve/crystalhd/driver/linux/crystalhd_misc.o
CC [M] /home/steve/crystalhd/driver/linux/crystalhd_cmds.o
CC [M] /home/steve/crystalhd/driver/linux/crystalhd_hw.o
LD [M] /home/steve/crystalhd/driver/linux/crystalhd.o
Building modules, stage 2.
MODPOST 1 modules
CC /home/steve/crystalhd/driver/linux/crystalhd.mod.o
LD [M] /home/steve/crystalhd/driver/linux/crystalhd.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-22-generic'
$chmod 755 bcm_70012_dev.sh bcm_70012_run.sh
$ sudo make install
[sudo] password for steve:
install -d /lib/modules/2.6.32-22-generic/kernel/drivers/video/broadcom
install -m 0644 crystalhd.ko /lib/modules/2.6.32-22-generic/kernel/drivers/video/broadcom
/sbin/depmod -a
cd ../../linux_lib/libcrystalhd
fromdos ./*
$ make
OBJFILES = libcrystalhd_if.o libcrystalhd_int_if.o libcrystalhd_fwcmds.o libcrystalhd_priv.o libcrystalhd_fwdiag_if.o
SRCFILES = libcrystalhd_if.cpp libcrystalhd_int_if.cpp libcrystalhd_fwcmds.cpp libcrystalhd_priv.cpp libcrystalhd_fwdiag_if.cpp
LNM = libcrystalhd.so.1.0 libcrystalhd.so.1
g++ -D__LINUX_USER__ -I./ -I/usr/include -I../../include -I../../include/link -g -Wall -fPIC -shared -c -o libcrystalhd_if.o libcrystalhd_if.cpp
libcrystalhd_if.cpp: In function ‘BC_STATUS DtsProcInput(void*, uint8_t*, uint32_t, uint64_t, BOOL)’:
libcrystalhd_if.cpp:1340: warning: format not a string literal and no format arguments
libcrystalhd_if.cpp:1346: warning: format not a string literal and no format arguments
libcrystalhd_if.cpp:1366: warning: format not a string literal and no format arguments
g++ -D__LINUX_USER__ -I./ -I/usr/include -I../../include -I../../include/link -g -Wall -fPIC -shared -c -o libcrystalhd_int_if.o libcrystalhd_int_if.cpp
g++ -D__LINUX_USER__ -I./ -I/usr/include -I../../include -I../../include/link -g -Wall -fPIC -shared -c -o libcrystalhd_fwcmds.o libcrystalhd_fwcmds.cpp
g++ -D__LINUX_USER__ -I./ -I/usr/include -I../../include -I../../include/link -g -Wall -fPIC -shared -c -o libcrystalhd_priv.o libcrystalhd_priv.cpp
libcrystalhd_priv.cpp: In function ‘BC_STATUS DtsDeleteMdataPool(DTS_LIB_CONTEXT*)’:
libcrystalhd_priv.cpp:579: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 2 has type ‘uintptr_t’
g++ -D__LINUX_USER__ -I./ -I/usr/include -I../../include -I../../include/link -g -Wall -fPIC -shared -c -o libcrystalhd_fwdiag_if.o libcrystalhd_fwdiag_if.cpp
g++ -D__LINUX_USER__ -I./ -I/usr/include -I../../include -I../../include/link -g -Wall -fPIC -shared -Wl,-soname,libcrystalhd.so.1 -o libcrystalhd.so.1.0 libcrystalhd_if.o libcrystalhd_int_if.o libcrystalhd_fwcmds.o libcrystalhd_priv.o libcrystalhd_fwdiag_if.o
ln -sf libcrystalhd.so.1.0 libcrystalhd.so
ln -sf libcrystalhd.so.1.0 libcrystalhd.so.1
$ chmod 755 ln-libcrystalhd.sh
$ sudo make install
install -m 755 libcrystalhd.so.1.0 /usr/lib
(cd /usr/lib; ln -sf libcrystalhd.so.1.0 libcrystalhd.so)
(cd /usr/lib; ln -sf libcrystalhd.so.1.0 libcrystalhd.so.1)
cd ../../filters/gst/gst-plugin
fromdos ./*
chmod 755 autogen.sh autoregen.sh gst-autogen.sh
Fix src/Makefile.am
Change this line
INCLUDES += -I$(ROOTDIR)/linux_lib/ldil
to
INCLUDES += -I$(ROOTDIR)/linux_lib/libcrystalhd
Change this line
BCMDEC_LDFLAGS = -L$(ROOTDIR)/linux_lib/ldil -lcrystalhd
to
BCMDEC_LDFLAGS = -L$(ROOTDIR)/linux_lib/libcrystalhd -lcrystalhd
Modify src/decif.h
Change this line
#include "bc_ldil_if.h"
to
#include "libcrystalhd_if.h"
$ ./autogen.sh
+ check for build tools
checking for autoconf >= 2.52 ... found 2.65, ok.
checking for automake >= 1.7 ... found 1.11.1, ok.
checking for libtoolize >= 1.5.0 ... found 2.2.6b, ok.
checking for pkg-config >= 0.8.0 ... found 0.22, ok.
+ checking for autogen.sh options
This autogen script will automatically run ./configure as:
./configure --enable-maintainer-mode --enable-debug
To pass any additional options, please specify them on the ./autogen.sh
command line.
+ running aclocal -I m4/ ...
+ running libtoolize --copy --force...
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
+ running autoheader ...
+ running autoconf ...
+ running automake -a -c...
+ running configure ...
./configure default flags: --enable-maintainer-mode --enable-debug
...
...
$make
$sudo make install
2.Run test program
$ cd crystalhd/driver/linux
$ sudo ./bcm_70012_run.sh
[sudo] password for steve:
Stopping Broadcom Crystal HD (BCM70012) Module
Broadcom Crystal HD (BCM70012) Module loaded
$ cd ../../examples
$ ./hellobcm
starting up
Running DIL (0.9.25) Version
Mdata Pool Created...
DtsSetupHardware: DtsPushAuthFwToLink
DtsGetFirmwareFiles:Ctx->FwBinFile is /lib/firmware/bcmFilePlayFw.bin
DtsSetupHardware: Success
ADD buffs
ADD buffs
ADD buffs
ADD buffs
ADD buffs
ADD buffs
ADD buffs
ADD buffs
DbgOptions=b0000025
try calls done
file opened successfully
Input Buffer: 0x9339b20
Aligned Input Buffer: 0x9339b20, Offset = 0
Y Buffer: 0xb532f008
FormatCh: Width: 1920 Height: 1080 Res:e
Dtsprocout:update stats
Format Change Detected. Flags: 0x00030004
New Format
----------------------------------
TimeStamp: 0
Picture Number: 0
Width: 1920
Height: 1080
Chroma: 0x420
Pulldown: 9
Flags: 0x00000000
Frame Rate/Res: 14
Aspect Ratio: 1
Color Primaries: 2
MetaData: 0
Session Number: 0
TimeStamp: 0
Custom Aspect: 0
Frames to Drop: 0
H264 Valid Fields: 0x00000000
DtsProcOutput: Failed to copy out buffs.. f
I/O Transfer Error.
Invalid PIB received. Skipping picture. Flags: 0x00000004
Received Output. Bytes In: 262144, Y: 1038720, UV: 0, Number: 3, H: 1080, W: 1920, Flags: 0x00020004
Received Output. Bytes In: 327680, Y: 1038720, UV: 0, Number: 4, H: 1080, W: 1920, Flags: 0x00020004
Received Output. Bytes In: 393216, Y: 1038720, UV: 0, Number: 5, H: 1080, W: 1920, Flags: 0x00020004
...
...
...
3.XBMC support
Download XBMC source code and enable CrystalHD support then build.
It works great ...
PS : Do not get xbmc form apt...
4.Gstreamer plug-in
The Crystal HD gstreamer plug-in is bcmdec
In fact, it's not work ...
$ gst-launch playbin2 uri=file:///home/steve/video.mp4
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Running DIL (0.9.25) Version
Mdata Pool Created...
DtsSetupHardware: DtsPushAuthFwToLink
DtsGetFirmwareFiles:Ctx->FwBinFile is /lib/firmware/bcmFilePlayFw.bin
DtsSetupHardware: Success
OPEN success
Then nothing happen ...
依據以下的link做修改, Crystal HD gstreamer plug-in works
http://git.wilsonet.com/crystalhd.git/?a=blobdiff;f=filters/gst/gst-plugin/src/gstbcmdec.c;h=c321e27bba831bf99197f75454e7dde8ec36d78a;hp=1fd2eccc23d753d047b20bc076377ebcb57c4838;hb=1f293c968e5ab8dad3ad0c3ceefa91cbb1bcce63;hpb=a8e27b2203eb2c1f0266176f5c70d8c5b6102c76
totem 播放mp4 h.264 with Crystal HD works
unzip crystalhd_linux_20091229.zip
cd crystalhd
cd driver/linux
fromdos ./*
autoconf
$ ./configure
checking for ld... ld
configure: creating ./config.status
config.status: creating ./Makefile
$ make
make -C /lib/modules/2.6.32-22-generic/build SUBDIRS=/home/steve/crystalhd/driver/linux modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-22-generic'
CC [M] /home/steve/crystalhd/driver/linux/crystalhd_lnx.o
CC [M] /home/steve/crystalhd/driver/linux/crystalhd_misc.o
CC [M] /home/steve/crystalhd/driver/linux/crystalhd_cmds.o
CC [M] /home/steve/crystalhd/driver/linux/crystalhd_hw.o
LD [M] /home/steve/crystalhd/driver/linux/crystalhd.o
Building modules, stage 2.
MODPOST 1 modules
CC /home/steve/crystalhd/driver/linux/crystalhd.mod.o
LD [M] /home/steve/crystalhd/driver/linux/crystalhd.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-22-generic'
$chmod 755 bcm_70012_dev.sh bcm_70012_run.sh
$ sudo make install
[sudo] password for steve:
install -d /lib/modules/2.6.32-22-generic/kernel/drivers/video/broadcom
install -m 0644 crystalhd.ko /lib/modules/2.6.32-22-generic/kernel/drivers/video/broadcom
/sbin/depmod -a
cd ../../linux_lib/libcrystalhd
fromdos ./*
$ make
OBJFILES = libcrystalhd_if.o libcrystalhd_int_if.o libcrystalhd_fwcmds.o libcrystalhd_priv.o libcrystalhd_fwdiag_if.o
SRCFILES = libcrystalhd_if.cpp libcrystalhd_int_if.cpp libcrystalhd_fwcmds.cpp libcrystalhd_priv.cpp libcrystalhd_fwdiag_if.cpp
LNM = libcrystalhd.so.1.0 libcrystalhd.so.1
g++ -D__LINUX_USER__ -I./ -I/usr/include -I../../include -I../../include/link -g -Wall -fPIC -shared -c -o libcrystalhd_if.o libcrystalhd_if.cpp
libcrystalhd_if.cpp: In function ‘BC_STATUS DtsProcInput(void*, uint8_t*, uint32_t, uint64_t, BOOL)’:
libcrystalhd_if.cpp:1340: warning: format not a string literal and no format arguments
libcrystalhd_if.cpp:1346: warning: format not a string literal and no format arguments
libcrystalhd_if.cpp:1366: warning: format not a string literal and no format arguments
g++ -D__LINUX_USER__ -I./ -I/usr/include -I../../include -I../../include/link -g -Wall -fPIC -shared -c -o libcrystalhd_int_if.o libcrystalhd_int_if.cpp
g++ -D__LINUX_USER__ -I./ -I/usr/include -I../../include -I../../include/link -g -Wall -fPIC -shared -c -o libcrystalhd_fwcmds.o libcrystalhd_fwcmds.cpp
g++ -D__LINUX_USER__ -I./ -I/usr/include -I../../include -I../../include/link -g -Wall -fPIC -shared -c -o libcrystalhd_priv.o libcrystalhd_priv.cpp
libcrystalhd_priv.cpp: In function ‘BC_STATUS DtsDeleteMdataPool(DTS_LIB_CONTEXT*)’:
libcrystalhd_priv.cpp:579: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 2 has type ‘uintptr_t’
g++ -D__LINUX_USER__ -I./ -I/usr/include -I../../include -I../../include/link -g -Wall -fPIC -shared -c -o libcrystalhd_fwdiag_if.o libcrystalhd_fwdiag_if.cpp
g++ -D__LINUX_USER__ -I./ -I/usr/include -I../../include -I../../include/link -g -Wall -fPIC -shared -Wl,-soname,libcrystalhd.so.1 -o libcrystalhd.so.1.0 libcrystalhd_if.o libcrystalhd_int_if.o libcrystalhd_fwcmds.o libcrystalhd_priv.o libcrystalhd_fwdiag_if.o
ln -sf libcrystalhd.so.1.0 libcrystalhd.so
ln -sf libcrystalhd.so.1.0 libcrystalhd.so.1
$ chmod 755 ln-libcrystalhd.sh
$ sudo make install
install -m 755 libcrystalhd.so.1.0 /usr/lib
(cd /usr/lib; ln -sf libcrystalhd.so.1.0 libcrystalhd.so)
(cd /usr/lib; ln -sf libcrystalhd.so.1.0 libcrystalhd.so.1)
cd ../../filters/gst/gst-plugin
fromdos ./*
chmod 755 autogen.sh autoregen.sh gst-autogen.sh
Fix src/Makefile.am
Change this line
INCLUDES += -I$(ROOTDIR)/linux_lib/ldil
to
INCLUDES += -I$(ROOTDIR)/linux_lib/libcrystalhd
Change this line
BCMDEC_LDFLAGS = -L$(ROOTDIR)/linux_lib/ldil -lcrystalhd
to
BCMDEC_LDFLAGS = -L$(ROOTDIR)/linux_lib/libcrystalhd -lcrystalhd
Modify src/decif.h
Change this line
#include "bc_ldil_if.h"
to
#include "libcrystalhd_if.h"
$ ./autogen.sh
+ check for build tools
checking for autoconf >= 2.52 ... found 2.65, ok.
checking for automake >= 1.7 ... found 1.11.1, ok.
checking for libtoolize >= 1.5.0 ... found 2.2.6b, ok.
checking for pkg-config >= 0.8.0 ... found 0.22, ok.
+ checking for autogen.sh options
This autogen script will automatically run ./configure as:
./configure --enable-maintainer-mode --enable-debug
To pass any additional options, please specify them on the ./autogen.sh
command line.
+ running aclocal -I m4/ ...
+ running libtoolize --copy --force...
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
+ running autoheader ...
+ running autoconf ...
+ running automake -a -c...
+ running configure ...
./configure default flags: --enable-maintainer-mode --enable-debug
...
...
$make
$sudo make install
2.Run test program
$ cd crystalhd/driver/linux
$ sudo ./bcm_70012_run.sh
[sudo] password for steve:
Stopping Broadcom Crystal HD (BCM70012) Module
Broadcom Crystal HD (BCM70012) Module loaded
$ cd ../../examples
$ ./hellobcm
starting up
Running DIL (0.9.25) Version
Mdata Pool Created...
DtsSetupHardware: DtsPushAuthFwToLink
DtsGetFirmwareFiles:Ctx->FwBinFile is /lib/firmware/bcmFilePlayFw.bin
DtsSetupHardware: Success
ADD buffs
ADD buffs
ADD buffs
ADD buffs
ADD buffs
ADD buffs
ADD buffs
ADD buffs
DbgOptions=b0000025
try calls done
file opened successfully
Input Buffer: 0x9339b20
Aligned Input Buffer: 0x9339b20, Offset = 0
Y Buffer: 0xb532f008
FormatCh: Width: 1920 Height: 1080 Res:e
Dtsprocout:update stats
Format Change Detected. Flags: 0x00030004
New Format
----------------------------------
TimeStamp: 0
Picture Number: 0
Width: 1920
Height: 1080
Chroma: 0x420
Pulldown: 9
Flags: 0x00000000
Frame Rate/Res: 14
Aspect Ratio: 1
Color Primaries: 2
MetaData: 0
Session Number: 0
TimeStamp: 0
Custom Aspect: 0
Frames to Drop: 0
H264 Valid Fields: 0x00000000
DtsProcOutput: Failed to copy out buffs.. f
I/O Transfer Error.
Invalid PIB received. Skipping picture. Flags: 0x00000004
Received Output. Bytes In: 262144, Y: 1038720, UV: 0, Number: 3, H: 1080, W: 1920, Flags: 0x00020004
Received Output. Bytes In: 327680, Y: 1038720, UV: 0, Number: 4, H: 1080, W: 1920, Flags: 0x00020004
Received Output. Bytes In: 393216, Y: 1038720, UV: 0, Number: 5, H: 1080, W: 1920, Flags: 0x00020004
...
...
...
3.XBMC support
Download XBMC source code and enable CrystalHD support then build.
It works great ...
PS : Do not get xbmc form apt...
4.Gstreamer plug-in
The Crystal HD gstreamer plug-in is bcmdec
In fact, it's not work ...
$ gst-launch playbin2 uri=file:///home/steve/video.mp4
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Running DIL (0.9.25) Version
Mdata Pool Created...
DtsSetupHardware: DtsPushAuthFwToLink
DtsGetFirmwareFiles:Ctx->FwBinFile is /lib/firmware/bcmFilePlayFw.bin
DtsSetupHardware: Success
OPEN success
Then nothing happen ...
依據以下的link做修改, Crystal HD gstreamer plug-in works
http://git.wilsonet.com/crystalhd.git/?a=blobdiff;f=filters/gst/gst-plugin/src/gstbcmdec.c;h=c321e27bba831bf99197f75454e7dde8ec36d78a;hp=1fd2eccc23d753d047b20bc076377ebcb57c4838;hb=1f293c968e5ab8dad3ad0c3ceefa91cbb1bcce63;hpb=a8e27b2203eb2c1f0266176f5c70d8c5b6102c76
totem 播放mp4 h.264 with Crystal HD works
2010年5月21日 星期五
GIT 雜七雜八的問題及解決
1.其他人push過後就不能push了
gigijoe@gigijoe-desktop:~/DSPG8181$ git push
To git@localhost:DSPG8181.git
! [rejected] HEAD -> master (non-fast forward)
error: failed to push some refs to 'git@localhost:DSPG8181.git'
也不能pull了
gigijoe@gigijoe-desktop:~/DSPG8181$ git pull
You asked me to pull without telling me which branch you
want to merge with, and 'branch.master.merge' in
your configuration file does not tell me either. Please
specify which branch you want to merge on the command line and
try again (e.g. 'git pull ').
See git-pull(1) for details.
If you often merge with the same branch, you may want to
configure the following variables in your configuration
file:
branch.master.remote =
branch.master.merge =
remote. .url =
remote. .fetch =
See git-config(1) for details.
gigijoe@gigijoe-desktop:~/DSPG8181$ git push
To git@localhost:DSPG8181.git
! [rejected] HEAD -> master (non-fast forward)
error: failed to push some refs to 'git@localhost:DSPG8181.git'
也不能pull了
gigijoe@gigijoe-desktop:~/DSPG8181$ git pull
You asked me to pull without telling me which branch you
want to merge with, and 'branch.master.merge' in
your configuration file does not tell me either. Please
specify which branch you want to merge on the command line and
try again (e.g. 'git pull ').
See git-pull(1) for details.
If you often merge with the same branch, you may want to
configure the following variables in your configuration
file:
branch.master.remote =
branch.master.merge =
remote. .url =
remote. .fetch =
See git-config(1) for details.
git config branch.master.remote origin
git config branch.master.merge refs/heads/mastergit checkout master
git reflog
git pull
git push
另一個解法(沒試過)git pull origin master
2.沒事整理一下
git fsck --full
3.維護資料庫 (會跑一陣子,用很多記憶體)
git gc
2010年5月5日 星期三
GIT Server 架設 (使用gitosis)
參考資料
http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way
http://ao2.it/wiki/How_to_setup_a_GIT_server_with_gitosis_and_gitweb
http://blog.agdunn.net/?p=277
以參考資料其實很容易就能把git server搞定.
這邊就只紀錄一下流程
< Server Side >
git clone git://eagain.net/gitosis.git
cd gitosis/
sudo apt-get install python-setuptools
sudo python setup.py install
sudo adduser --system --shell /bin/sh --gecos 'git version control' --group --disabled-password --home /home/git git
請由 Local Side 產生KEY id_rsa.pub 並存放到 Server Side
ssh-keygen -t rsa
會在$HOME/.ssh/ 產生 id_rsa id_rsa.pub
複製到Server Side /tmp
sudo -H -u git gitosis-init < /tmp/id_rsa.pub
sudo chmod 755 /home/git/repositories/gitosis-admin.git/hooks/post-update
< Local Side >
gitosis運用相當巧妙的方式管理git server.
gitosis 本身就是git server中的project.所以必須先從local side取出gitosis的副本.
透過編輯這個副本並上傳來管理所有的user & project.
git clone git@192.168.168.70:gitosis-admin.git
cd gitosis-admin
編輯gitosis.conf
增加一個新的Repository,格式如下
[group $REPOSITORY]
writable = $PROJECT
將希望的目錄加入
git add android_kernel_smdk6410
git commit
實際將資料上傳
git push origin master:refs/heads/master
會看到以下的message
gigijoe@gigijoe-laptop:~/S3C6410$ git push origin master:refs/heads/master
Counting objects: 22134, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (21762/21762), done.
Writing objects: 100% (22134/22134), 233.26 MiB | 2374 KiB/s, done.
Total 22134 (delta 2456), reused 0 (delta 0)
To git@192.168.168.70:s3c6410.git
* [new branch] master -> master
gigijoe@gigijoe-laptop:~/S3C6410$
< Local Side >
新增user 的方式
進入gitosis-admin目錄中編輯gitosis.conf.加入$USER1
[group $REPOSITORY]
writable = $PROJECT
接著由user產生key並將id_rsa.pub並重新命名擺放到
keydir/$USER1.pub
把檔案加入gitosis
git add keydir/$USER1.pub
更新並上傳
git commit
git push
之後就可以用 git clone 的方式取得 project
< Log >
gigijoe@gigijoe-laptop:~/gitosis-admin$ ls keydir/
gigijoe@gigijoe-desktop.pub gigijoe@gigijoe-laptop.pub
gigijoe@gigijoe-laptop:~/gitosis-admin$ git add keydir/gigijoe@gigijoe-desktop.pub
gigijoe@gigijoe-laptop:~/gitosis-admin$ git commit
[master 82a65c0] Add gigijoe@gigijoe-desktop
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 keydir/gigijoe@gigijoe-desktop.pub
gigijoe@gigijoe-laptop:~/gitosis-admin$ git push
Counting objects: 6, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 711 bytes, done.
Total 4 (delta 0), reused 0 (delta 0)
To git@192.168.168.70:gitosis-admin.git
d45919f..82a65c0 HEAD -> master
http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way
http://ao2.it/wiki/How_to_setup_a_GIT_server_with_gitosis_and_gitweb
http://blog.agdunn.net/?p=277
以參考資料其實很容易就能把git server搞定.
這邊就只紀錄一下流程
< Server Side >
git clone git://eagain.net/gitosis.git
cd gitosis/
sudo apt-get install python-setuptools
sudo python setup.py install
sudo adduser --system --shell /bin/sh --gecos 'git version control' --group --disabled-password --home /home/git git
請由 Local Side 產生KEY id_rsa.pub 並存放到 Server Side
ssh-keygen -t rsa
會在$HOME/.ssh/ 產生 id_rsa id_rsa.pub
複製到Server Side /tmp
sudo -H -u git gitosis-init < /tmp/id_rsa.pub
sudo chmod 755 /home/git/repositories/gitosis-admin.git/hooks/post-update
< Local Side >
gitosis運用相當巧妙的方式管理git server.
gitosis 本身就是git server中的project.所以必須先從local side取出gitosis的副本.
透過編輯這個副本並上傳來管理所有的user & project.
git clone git@192.168.168.70:gitosis-admin.git
cd gitosis-admin
編輯gitosis.conf
增加一個新的Repository,格式如下
[group $REPOSITORY]
writable = $PROJECT
members = $USER
Commit new repository
git commit -a -m "New Repository"
git push
結果有Warning如下
warning: You did not specify any refspecs to push, and the current remote
warning: has not configured any push refspecs. The default action in this
warning: case is to push all matching refspecs, that is, all branches
warning: that exist both locally and remotely will be updated. This may
warning: not necessarily be what you want to happen.
warning:
warning: You can specify what action you want to take in this case, and
warning: avoid seeing this message again, by configuring 'push.default' to:
warning: 'nothing' : Do not push anything
warning: 'matching' : Push all matching branches (default)
warning: 'tracking' : Push the current branch to whatever it is tracking
warning: 'current' : Push the current branch
Counting objects: 5, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 386 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
To git@192.168.168.70:gitosis-admin.git
1cfd916..4f2becf master -> master
我找到的解決方式是
git config --add push.default current
到這邊基礎的設定已經完成,接著要實際將project同步到git server
首先到project source code目錄下
cd S3C6410
git init
git remote add origin git@192.168.168.70:s3c6410.git將希望的目錄加入
git add android_kernel_smdk6410
git commit
實際將資料上傳
git push origin master:refs/heads/master
會看到以下的message
gigijoe@gigijoe-laptop:~/S3C6410$ git push origin master:refs/heads/master
Counting objects: 22134, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (21762/21762), done.
Writing objects: 100% (22134/22134), 233.26 MiB | 2374 KiB/s, done.
Total 22134 (delta 2456), reused 0 (delta 0)
To git@192.168.168.70:s3c6410.git
* [new branch] master -> master
gigijoe@gigijoe-laptop:~/S3C6410$
< Local Side >
新增user 的方式
進入gitosis-admin目錄中編輯gitosis.conf.加入$USER1
[group $REPOSITORY]
writable = $PROJECT
members = $USER $OTHER_USER
接著由user產生key並將id_rsa.pub並重新命名擺放到
keydir/$USER1.pub
把檔案加入gitosis
git add keydir/$USER1.pub
更新並上傳
git commit
git push
之後就可以用 git clone 的方式取得 project
< Log >
gigijoe@gigijoe-laptop:~/gitosis-admin$ ls keydir/
gigijoe@gigijoe-desktop.pub gigijoe@gigijoe-laptop.pub
gigijoe@gigijoe-laptop:~/gitosis-admin$ git add keydir/gigijoe@gigijoe-desktop.pub
gigijoe@gigijoe-laptop:~/gitosis-admin$ git commit
[master 82a65c0] Add gigijoe@gigijoe-desktop
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 keydir/gigijoe@gigijoe-desktop.pub
gigijoe@gigijoe-laptop:~/gitosis-admin$ git push
Counting objects: 6, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 711 bytes, done.
Total 4 (delta 0), reused 0 (delta 0)
To git@192.168.168.70:gitosis-admin.git
d45919f..82a65c0 HEAD -> master
訂閱:
文章 (Atom)