显示标签为“android”的博文。显示所有博文
显示标签为“android”的博文。显示所有博文

2010年12月28日星期二

android gstreamer debug information can not work

在android上面做一些gstreamer的工作
尝试显示出gstreamer自己的调试信息
在android模拟器上面运行:

gst-launch-0.10 --gst-debug-level=1 audiotestsrc ! audioflingersink

结果显示:

Could not open converter from 'ASCII' to 'UTF-8'

调试发现:libiconv在android上面已经移除了

在gconvert.c g_convert()中添加了以上代码自己转换,将ASCII 转换成 UTF-8,debug 消息就可以打印出来了

//--> allen add for testing
printf("allen in gconvert.c g_convert() %s %d\n", str, len);
gsize retval;
gchar *utf;
gsize utfmax;
if (len < 0)
{
 len = strlen (str);
}
utfmax = 2 * (len + 1);
printf("utfmax: %d\n", utfmax);
utf = g_malloc (utfmax);
for (retval = 0; *str && utfmax > 1; utfmax -= 2, retval += 2)
{
 *(utf + retval/2) = *(str + retval/2);
 *(utf + retval/2 + 1) = 0;
}
if (utfmax > 0)
{
 *utf = *str;
 ++retval;
}
if (bytes_read)
 *bytes_read = len + 1;
if (bytes_written)
 *bytes_written = retval;
 printf("allen in gconvert.c g_convert() %s %d\n", utf, utfmax);
 return utf;
 //<--end

devkit8000,android,NFS boot

NFS boot

  • Follow the steps to boot the board using NFS
  1. Setup host machine as NFS server (optional)
    • If you want to setup a new NFS server, do this step

    • Add one line in /etc/exports:
      /nfsroot  *(rw,no_root_squash,sync)
      
    • Then restart NFS server
      $ sudo /etc/init.d/nfs-kernel-server restart
  2. Build Kernel for NFS boot
    • make sure your kernel enable these options for NFS boot:
      [*] Networking support  --->
            Networking options  --->
            [*]   IP: kernel level autoconfiguration
            [*]   IP: DHCP support
        
            File systems  --->
            [*] Network File Systems  --->
               <*>   NFS client support
                  [*]     NFS client support for NFS version 3
                  [*]     NFS client support for the NFSv3 ACL protocol extension
                  [*]     NFS client support for NFS version 4 (EXPERIMENTAL)
                  [*]     Root file system on NFS
      
    • Build kernel:
  3. Copy kernel to the TFTP server's root
    • We also have a TFTP server on the test machine, the TFTP server's root path is: /mydroid/tftpboot
    • Put kernel file to the TFTP server's root path
    • uImage is the name of the kernel file you just built out
      
      
  4. Prepare the rootfs
    • Put the files to the NFS root path
    • Use android for example, we build the file system first, then do the commands:
  5. Set the boot parameters to kernel for the frist time, before it run 'autoboot'
    • serverip is the IP address of your NFS server
    • for example, our NFS server ip here is 10.126.34.43
  6. Boot
    • Just restart the board
    • The same as normal boot, Enjoy!