Quando você quer buildar uma aplicação no MADDE usando alguma lib externa você provavelmente terá problemas durante a linkedição, provavelmente porque o compilador não acha o caminho da lib externa dentro do sysroot-dir do MADDE.
Então você terá duas possíveis soluções.
1. Copiar a lib para o mesmo caminho de diretórios dentro do sysroot-dir do MADDE.
2. A outra que eu uso é montar o mesmo caminho de diertórios da lib dentro so sysroot-dir do MADDE:
Supondo que a sua lib se encontre no caminho /opt/workspace/mylib/foo.so no seu desktop. Tudo o que você precisa fazer é montar o seu workspace, com o mesmo caminho, dentro do sysroot-dir do MADDE.
Crie o mount point:
$ mkdir -p $(mad query sysroot-dir)/opt/workspace
Mounte o caminho no MADDE:
$ mount --bind /opt/workspace $(mad query sysroot-dir)/opt/workspace
Agora é só buildar o código.
Ragner Magalhaes
Tudo o que tenho e sou é fruto da Graça de Deus para com a minha vida, a Ele toda honra e toda glória.
Monday, November 8, 2010
Friday, October 29, 2010
Compilando com MADDE + icecream
Dependências
Você precisa ter as seguintes dependências em seu desktop:
- icecc instalado e configurado.
- Nokia Qt SDK instalado.
- Script madde-icecc-create-env baseado no /usr/lib/icecc/icecc-create-env modificado por mim.
- Script madde-icecc-export-var para exportar as variáveis de ambiente.
Salve, com permissão de execução, os scripts madde-icecc-create-env e madde-icecc-export-var em algum lugar de sua preferência. Por exemplo no /opt/icecc .
No meu desktop o NokiaQtSDK está instalado no /opt/NokiaQtSDKv101 .
Criando icecc tarball para compilação com MADDE
Exporte o caminho para o script do MADDE na variável de ambiente PATH:
$ export PATH=/caminho_do_NokiaQtSDK/Maemo/version/bin:$PATH
no meu desktop:
$ export PATH=/opt/NokiaQtSDKv101/Maemo/4.6.2/bin:$PATH
Teste se o comando mad está no PATH:
$ mad query install-dir
/opt/NokiaQtSDKv101/Maemo/4.6.2
Agoro você pode criar o arquivo tarball para a variável de ambiente ICECC_VERSION.
Descubra qual é a toolchain usada pelo MADDE:
$ mad list toolchains
arm-2007q3-51sb6-gdb71-arm-none-linux-gnueabi_linux
Agora execute o script madde-icecc-create-env passando como parâmetro o caminho para os compiladores gcc e g++ da toolchain do MADDE:
$ /opt/icecc/madde-icecc-create-env caminho_toolchain_gcc caminho_toolchain_g++
no meu desktop:
$ /opt/icecc/madde-icecc-create-env /opt/NokiaQtSDKv101/Maemo/4.6.2/toolchains/arm-2007q3-51sb6-gdb71-arm-none-linux-gnueabi_linux/bin/arm-none-linux-gnueabi-gcc /opt/NokiaQtSDKv101/Maemo/4.6.2/toolchains/arm-2007q3-51sb6-gdb71-arm-none-linux-gnueabi_linux/bin/arm-none-linux-gnueabi-g++
Se tudo ocorrer bem, você deverá ver um log parecido com:
adding file /usr/bin/gcc=/tmp/gccBIHd
adding file /lib/libc.so.6
adding file /lib/ld-linux.so.2
adding file /usr/bin/g++=/tmp/gxxVcgP
adding file /etc/specs=/opt/NokiaQtSDKv101/Maemo/4.6.2/targets/fremantle-pr13/specs
adding file /usr/bin/arm-gcc=/opt/NokiaQtSDKv101/Maemo...arm-none-linux-gnueabi-gcc
adding file /usr/bin/arm-g++=/opt/NokiaQtSDKv101/Maemo...arm-none-linux-gnueabi-g++
adding file /usr/bin/as=/opt/NokiaQtSDKv101/Maemo.../arm-none-linux-gnueabi/bin/as
adding file /usr/bin/cc1=/opt/NokiaQtSDKv101/Maemo...arm-none-linux-gnueabi/4.2.1/cc1
adding file /usr/bin/cc1plus=/opt/NokiaQtSDKv101/Maemo...ne-linux-gnueabi/4.2.1/cc1plus
adding file /etc/ld.so.conf=/tmp/icecc_ld_so_confNcr3bu
creating 8e05a9e0a927618bb98a19dd6bbb272b.tar.gz
Agora você precisa salvar o tarball gerado em algum lugar de sua preferêcia. Por exeplo no /opt/icecc/8e05a9e0a927618bb98a19dd6bbb272b.tar.gz
Ajustando script export-var
Agora você precisa ajustar o script madde-icecc-export-var para o seu ambiente.
Altere a variável ICECC_VERSION para o caminho do tarball gerado pelo script madde-icecc-create-env acima. Depois delete a linha "echo TODO: Change ICECC_VERSION var first so delete this line!" && return 1"
Descubra o install dir do madde:
$ mad query install-dir
/opt/NokiaQtSDKv101/Maemo/4.6.2
altere a variável MADDE_INSTALL_DIR para o caminho retornado pelo comando acima. Depois delete a linha "echo TODO: Change MADDE_INSTALL_DIR var first so delete this line! && return 1"
Compilando com MADDE + icecc
Com os ajustes feitos, abra um novo terminal e execute o script madde-icecc-export-var:
$ . /path/madde-icecc-export-var
no meu desktop:
$ . /opt/icecc/madde-icecc-export-var
Não esqueça do ponto antes do script para que as variáveis sejam exportadas para o terminal.
Testando:
$ cd /opt/NokiaQtSDKv101/Examples/4.6/graphicsview/elasticnodes/
$ qmake && make -j4
$ file elasticnodes
elasticnodes: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked ...
Se tudo ocorrer bem você terá um abiente MADDE + icecc funcionando perfeitamente.
Referências:
Saturday, April 19, 2008
http://ragner.org
Hi all,
Now I have my own domain
so this is my last post here ...
My new blog/domain is http://ragner.org
Thanks and
God bless you ... :P
Now I have my own domain
so this is my last post here ...
My new blog/domain is http://ragner.org
Thanks and
God bless you ... :P
Marcadores:
domain
Friday, March 28, 2008
Installing the Maemo in MMC card
Installing the rootfs in MMC card
Booting your Nokia tablet from the MMC card
= Becoming root =
Install the following packages:
* becomeroot
* osso-xterm
After installed these packages, start the Xterm and run the following command line:
$ sudo gainroot
= Creating the MMC big partition =
# sfdisk /dev/mmcblk0 <<> ;
> EOF
# sfdisk -l /dev/mmcblk0
Disk /dev/mmcblk0: 61440 cylinders, 4 heads, 16 sectors/track
Units = cylinders of 32768 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/mmcblk0p1 0+ 61439 61440- 1966079+ 83 Linux
/dev/mmcblk0p2 0 - 0 0 0 Empty
/dev/mmcblk0p3 0 - 0 0 0 Empty
/dev/mmcblk0p4 0 - 0 0 0 Empty
= Formating the MMC partition =
# mke2fs /dev/mmcblk0p1
= Cloning the whole original system =
== Modules dependences ==
# insmod /mnt/initfs/lib/modules/2.6.21-omap1/mbcache.ko
# insmod /mnt/initfs/lib/modules/2.6.21-omap1/ext2.ko
== Mounting the MMC card ==
# mount -t ext2 /dev/mmcblk0p1 /media/mmc1
== Mounting the flash ==
# mount -t jffs2 -o ro /dev/mtdblock4 /floppy
== Cloning from flash to MMC ==
Before continuing it is better to close internet connection...
# tar cf - -C /floppy . | tar xvf - -C /media/mmc1
== Setting the new rootfs ==
# chroot /mnt/initfs cal-tool --set-root-device mmc
# shutdown -r now
References:
http://maemo.org/community/wiki/HowTo_EASILY_BecomeRoot
http://maemo.org/community/wiki/HowTo_EASILY_Partition_your_MMC_card
http://www.math.ias.edu/doc/util-linux-2.12a/sfdisk.examples
Thanks,
Ragner Magalhães
Booting your Nokia tablet from the MMC card
= Becoming root =
Install the following packages:
* becomeroot
* osso-xterm
After installed these packages, start the Xterm and run the following command line:
$ sudo gainroot
= Creating the MMC big partition =
# sfdisk /dev/mmcblk0 <<> ;
> EOF
# sfdisk -l /dev/mmcblk0
Disk /dev/mmcblk0: 61440 cylinders, 4 heads, 16 sectors/track
Units = cylinders of 32768 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/mmcblk0p1 0+ 61439 61440- 1966079+ 83 Linux
/dev/mmcblk0p2 0 - 0 0 0 Empty
/dev/mmcblk0p3 0 - 0 0 0 Empty
/dev/mmcblk0p4 0 - 0 0 0 Empty
= Formating the MMC partition =
# mke2fs /dev/mmcblk0p1
= Cloning the whole original system =
== Modules dependences ==
# insmod /mnt/initfs/lib/modules/2.6.21-omap1/mbcache.ko
# insmod /mnt/initfs/lib/modules/2.6.21-omap1/ext2.ko
== Mounting the MMC card ==
# mount -t ext2 /dev/mmcblk0p1 /media/mmc1
== Mounting the flash ==
# mount -t jffs2 -o ro /dev/mtdblock4 /floppy
== Cloning from flash to MMC ==
Before continuing it is better to close internet connection...
# tar cf - -C /floppy . | tar xvf - -C /media/mmc1
== Setting the new rootfs ==
# chroot /mnt/initfs cal-tool --set-root-device mmc
# shutdown -r now
References:
http://maemo.org/community/wiki/HowTo_EASILY_BecomeRoot
http://maemo.org/community/wiki/HowTo_EASILY_Partition_your_MMC_card
http://www.math.ias.edu/doc/util-linux-2.12a/sfdisk.examples
Thanks,
Ragner Magalhães
Marcadores:
dicas
Tuesday, March 25, 2008
Using mencoder to save your webcam stream
this is to save your webcam stream:
mencoder tv:// -tv driver=v4l2:width=60:height=40:fps=60:device=/dev/video0 -nosound -ovc
lavc -lavcopts vcodec=mjpeg -o test.avi
You just need mplayer with v4l2 support compiled in.
mencoder tv:// -tv driver=v4l2:width=60:height=40
lavc -lavcopts vcodec=mjpeg -o test.avi
You just need mplayer with v4l2 support compiled in.
Marcadores:
dicas
Using mplayer to watch your webcam
This is to watch your webcam in the mplayer:
mplayer tv:// -tv driver=v4l2:width=60:height=40:fps=90:device=/dev/video0 -nosound
You just need mplayer with v4l2 support compiled in.
mplayer tv:// -tv driver=v4l2:width=60:height=40
You just need mplayer with v4l2 support compiled in.
Marcadores:
dicas
Wednesday, January 9, 2008
Debian nVidia Dual Head
Linux + Debian + nVidia + Dual Head + VGA + DVI
Olá Pessoal,
Hoje vou mostrar como usar dois monitores(Dual Head) no Debian com nVidia.
~$ cat /etc/X11/xorg.conf
...
Section "Module"
Load "bitmap"
Load "dbe"
# Sem "dri"
Load "ddc"
Load "extmod"
Load "freetype"
Load "glx"
Load "int10"
Load "v4l"
Load "vbe"
EndSection
...
Section "Device"
Identifier "nVidia Corporation NV34GL [Quadro FX 500/600 PCI]"
Driver "nvidia"
BusID "PCI:1:0:0"
# Dual Head
Option "TwinView" "True"
EndSection
Section "Monitor"
Identifier "DELL 1908FP"
Option "DPMS"
HorizSync 30-65
VertRefresh 50-75
EndSection
Section "Screen"
Identifier "Default Screen"
Device "nVidia Corporation NV34GL [Quadro FX 500/600 PCI]"
Monitor "DELL 1908FP"
DefaultDepth 16
Option "DPMS"
# Dual Head
Option "TwinView" "true"
# Sync/Refresh de cada monitor
Option "HorizSync" "DFP-0: 30-65; DFP-1: 30-65"
Option "VertRefresh" "DFP-0: 50-75; DFP-1: 50-75"
# Segundo monitor do lado direito do primeiro.
Option "TwinViewOrientation" "DFP-1 RightOf DFP-0"
# Resolução de cada monitor
Option "MetaModes" "DFP-0: 1280×1024, DFP-1: 1280×1024"
# Dois monitores LCD(pode ser crt)
Option "ConnectedMonitor" "lcd,lcd"
SubSection "Display"
Depth 16
Modes "1280x1024" "1152x864" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 24
Modes "1280x1024" "1152x864" "1024x768" "800x600" "640x480"
EndSubSection
EndSection
Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
EndSection
---
Referência
http://umgeher.wordpress.com/2006/09/01/dual-head-usando-nvidia
Olá Pessoal,
Hoje vou mostrar como usar dois monitores(Dual Head) no Debian com nVidia.
~$ cat /etc/X11/xorg.conf
...
Section "Module"
Load "bitmap"
Load "dbe"
# Sem "dri"
Load "ddc"
Load "extmod"
Load "freetype"
Load "glx"
Load "int10"
Load "v4l"
Load "vbe"
EndSection
...
Section "Device"
Identifier "nVidia Corporation NV34GL [Quadro FX 500/600 PCI]"
Driver "nvidia"
BusID "PCI:1:0:0"
# Dual Head
Option "TwinView" "True"
EndSection
Section "Monitor"
Identifier "DELL 1908FP"
Option "DPMS"
HorizSync 30-65
VertRefresh 50-75
EndSection
Section "Screen"
Identifier "Default Screen"
Device "nVidia Corporation NV34GL [Quadro FX 500/600 PCI]"
Monitor "DELL 1908FP"
DefaultDepth 16
Option "DPMS"
# Dual Head
Option "TwinView" "true"
# Sync/Refresh de cada monitor
Option "HorizSync" "DFP-0: 30-65; DFP-1: 30-65"
Option "VertRefresh" "DFP-0: 50-75; DFP-1: 50-75"
# Segundo monitor do lado direito do primeiro.
Option "TwinViewOrientation" "DFP-1 RightOf DFP-0"
# Resolução de cada monitor
Option "MetaModes" "DFP-0: 1280×1024, DFP-1: 1280×1024"
# Dois monitores LCD(pode ser crt)
Option "ConnectedMonitor" "lcd,lcd"
SubSection "Display"
Depth 16
Modes "1280x1024" "1152x864" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 24
Modes "1280x1024" "1152x864" "1024x768" "800x600" "640x480"
EndSubSection
EndSection
Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
EndSection
---
Referência
http://umgeher.wordpress.com/2006/09/01/dual-head-usando-nvidia
Marcadores:
dicas
Wednesday, January 2, 2008
Converting Youtube Video to the Creative Zen Vision:M
Hi all,
today I will teacher you how to convert youtube's videos
.flv format to Creative Zen Vision:M's videos .avi format
using the mencoder Linux/Debian command.
# mencoder file1.flv -o test1.avi -vf scale=320:240 -oac mp3lame -ovc xvid -xvidencopts bitrate=800
If you get any error message from codec xvid, you need compile the MPlayer with xvid codec support.
Get the Mplayer source code and the "Binary Codec Packages"
from http://www.mplayerhq.hu/design7/dload.html
Extract the "Codecs" and put it in the directory /usr/lib/win32
Extract the MPlayer source code in some directory.
Install the libxvidcore-dev Package From
#mirros multimidia
deb http://debian-multimedia.org/ etch main
deb http://ftp.debian-unofficial.org/debian etch main contrib non-free
# apt-get update
# apt-get install libxvidcore-dev
Compile the Mplayer
Into the MPlayer source directory run:
../MPlayer-1.0rc1$ ./configure --prefix=/usr/local --enable-gui --enable-xvid --enable-largefiles --enable-menu --enable-gif --enable-png --enable-jpeg --with-win32libdir=/usr/lib/win32
../MPlayer-1.0rc1$ make
And as root run:
../MPlayer-1.0rc1# make install
Try again:
# mencoder file1.flv -o test1.avi -vf scale=320:240 -oac mp3lame -ovc xvid -xvidencopts bitrate=800
Thanks,
God bless you ... :D
today I will teacher you how to convert youtube's videos
.flv format to Creative Zen Vision:M's videos .avi format
using the mencoder Linux/Debian command.
# mencoder file1.flv -o test1.avi -vf scale=320:240 -oac mp3lame -ovc xvid -xvidencopts bitrate=800
If you get any error message from codec xvid, you need compile the MPlayer with xvid codec support.
Get the Mplayer source code and the "Binary Codec Packages"
from http://www.mplayerhq.hu/design7/dload.html
Extract the "Codecs" and put it in the directory /usr/lib/win32
Extract the MPlayer source code in some directory.
Install the libxvidcore-dev Package From
#mirros multimidia
deb http://debian-multimedia.org/ etch main
deb http://ftp.debian-unofficial.org/debian etch main contrib non-free
# apt-get update
# apt-get install libxvidcore-dev
Compile the Mplayer
Into the MPlayer source directory run:
../MPlayer-1.0rc1$ ./configure --prefix=/usr/local --enable-gui --enable-xvid --enable-largefiles --enable-menu --enable-gif --enable-png --enable-jpeg --with-win32libdir=/usr/lib/win32
../MPlayer-1.0rc1$ make
And as root run:
../MPlayer-1.0rc1# make install
Try again:
# mencoder file1.flv -o test1.avi -vf scale=320:240 -oac mp3lame -ovc xvid -xvidencopts bitrate=800
Thanks,
God bless you ... :D
Marcadores:
dicas
Saturday, December 29, 2007
Convertendo Vídeos Youtube para o Creative Zen Vision:M
Olá pessoal,
hoje vou ensinar como converter vídeos do youtube .flv
para serem tocados no Creative Zen Vision:M
usando o mencoder do Linux/Debian.
# mencoder file1.flv -o test1.avi -vf scale=320:240 -oac mp3lame -ovc xvid -xvidencopts bitrate=800
Caso você tenha algum problema com o codec xvid, você deve recompicar
o mplayer com suporte a xvid.
Baixe o código fonte do Mplayer e baixe também os
"Binary Codec Packages" nesse mesmo link abaixo::
http://www.mplayerhq.hu/design7/dload.html
Extraia e coloque os Codecs no diretório /usr/lib/win32
Extraia o código fonte do Mplayer no diretório de
sua preferência.
Instale o pacote libxvidcore-dev
Caso você não tenha esse pacote na sua lista de pacotes
adicione os mirrors
#mirros multimidia
deb http://debian-multimedia.org/ etch main
deb http://ftp.debian-unofficial.org/debian etch main contrib non-free
no seu /etc/apt/sources.list
# apt-get update
# apt-get install libxvidcore-dev
Compile o Mplayer
Dentro do diretório Maplyer execute:
../MPlayer-1.0rc1$ ./configure --prefix=/usr/local --enable-gui --enable-xvid --enable-largefiles --enable-menu --enable-gif --enable-png --enable-jpeg --with-win32libdir=/usr/lib/win32
../MPlayer-1.0rc1$ make
e como usuário root execute:
../MPlayer-1.0rc1# make install
Tente novamente:
# mencoder file1.flv -o test1.avi -vf scale=320:240 -oac mp3lame -ovc xvid -xvidencopts bitrate=800
Falow Pessoal,
Feliz Ano Novo ...
E Deus te abençôe ... :D
hoje vou ensinar como converter vídeos do youtube .flv
para serem tocados no Creative Zen Vision:M
usando o mencoder do Linux/Debian.
# mencoder file1.flv -o test1.avi -vf scale=320:240 -oac mp3lame -ovc xvid -xvidencopts bitrate=800
Caso você tenha algum problema com o codec xvid, você deve recompicar
o mplayer com suporte a xvid.
Baixe o código fonte do Mplayer e baixe também os
"Binary Codec Packages" nesse mesmo link abaixo::
http://www.mplayerhq.hu/design7/dload.html
Extraia e coloque os Codecs no diretório /usr/lib/win32
Extraia o código fonte do Mplayer no diretório de
sua preferência.
Instale o pacote libxvidcore-dev
Caso você não tenha esse pacote na sua lista de pacotes
adicione os mirrors
#mirros multimidia
deb http://debian-multimedia.org/ etch main
deb http://ftp.debian-unofficial.org/debian etch main contrib non-free
no seu /etc/apt/sources.list
# apt-get update
# apt-get install libxvidcore-dev
Compile o Mplayer
Dentro do diretório Maplyer execute:
../MPlayer-1.0rc1$ ./configure --prefix=/usr/local --enable-gui --enable-xvid --enable-largefiles --enable-menu --enable-gif --enable-png --enable-jpeg --with-win32libdir=/usr/lib/win32
../MPlayer-1.0rc1$ make
e como usuário root execute:
../MPlayer-1.0rc1# make install
Tente novamente:
# mencoder file1.flv -o test1.avi -vf scale=320:240 -oac mp3lame -ovc xvid -xvidencopts bitrate=800
Falow Pessoal,
Feliz Ano Novo ...
E Deus te abençôe ... :D
Marcadores:
dicas
Saturday, December 15, 2007
Linux command to set the screen size
Hi all,
today I will teacher how to set the screen size using xrandr Linux command.
To find out what sizes are available, run:
$ xrandr -q
SZ: Pixels Physical Refresh
*0 1024 x 768 ( 271mm x 203mm ) *75 70 60
1 800 x 600 ( 271mm x 203mm ) 75 72 60 56
To set the screen size to an available size, run:
$ xrandr -s 800x600
Thanks,
God bless you ... [:P]
today I will teacher how to set the screen size using xrandr Linux command.
To find out what sizes are available, run:
$ xrandr -q
SZ: Pixels Physical Refresh
*0 1024 x 768 ( 271mm x 203mm ) *75 70 60
1 800 x 600 ( 271mm x 203mm ) 75 72 60 56
To set the screen size to an available size, run:
$ xrandr -s 800x600
Thanks,
God bless you ... [:P]
Marcadores:
dicas
Subscribe to:
Posts (Atom)