Recently, I become very busy due to take over the tasks from other site. The original coding things are still there and so I start looking for outstanding guy to join us. The first month, I try to have some candidates from my colleagues and myself's database but in vain. Now I shift this job to head hunter and start some interview.
I've interviewed lots of people in my first job and second one. It's much more interesting to interview with the guys from head hunter at this moment. Why? Lots of the factor would effect which kind of developer you want.
Take my first job for example, the company do not like to pay a lot for experienced engineer because of the uncertainty and bad history to work with them. So, we preferred to find the fresh man that time. The strategy to find the new blood is simpler. The first, we ask for their academic report to check if they are doing their student job well. The second, we make the aptitude test to know more indicators about the logic, patient...etc. According to the results, we also talk to them for different topics to see their attitude, expression...etc and the most important one is the potential. To sum up all above and we could know if we could give it a try. So, much easy and simpler, right?
Let's go back to my interview experience now. We are looking for very experienced and excellent one. No academic report and aptitude test any more. Instead, we have to judge the work they done during their career. Basically, head hunter should filter out the resume you want, but some head hunter just like the house sales. So we still have to do our best to get the information from different channel to make sure the job applicant is who we want. Besides, I have to setup different kinds of test, like 30 minutes coding, ask the difficult technical question...etc. It become much more complicated to judge if this guy is feasible because we do not have much time to try like before by adopting the rookie. It's challenge and interesting to me. Hope we could find the Rambo soon.
2013/06/12
2013/04/23
[工作點滴] wireless module development newbie
I've started collecting the information around the end of 2010 because the wireless technology advanced to much higher bandwidth for multimedia streaming.
There are two conditions of the development that I thought.
1. To develop the whole wireless part by ourselves.
2. To buy the module directly from the supplier.
But some important factors that make me just 'collect information' at that moment.
For 1, the expense is very horrible.
- We have to pay chip vendor for NRE.
- We are new to be the player and we have no credit to the chip vendor.
- We have no equipment and we have to invest a lot to do it.
- There are lots of tasks need for the regulation.
To sum up, this is a money game for surveillance company and we see no market at that moment.
For 2, we could leverage a lot tasks to supplier but we still have to prepare equipment to verify the whole system and get the experience of the regulation. However, the module cost and performance ratio could not meet our requirement. It is quite challenge for me to persuade my boss to do it.
So what I can do is just keep attention on wireless technology.
Until now, I have the chance to do the development finally.
Although I'm newbie for wireless, it's not too hard to enter this area. The reason is the technology become much mature and we can make it work even we do not know much about wireless. So, let's just do it.
The module I use is based on Atheros AR6103 and AR6003. The driver of these two chips are similar.
The documents I study is are mainly from Atheros. I also reference the IEEE specification and search on Google.
The equipment and wireless module board


There are two conditions of the development that I thought.
1. To develop the whole wireless part by ourselves.
2. To buy the module directly from the supplier.
But some important factors that make me just 'collect information' at that moment.
For 1, the expense is very horrible.
- We have to pay chip vendor for NRE.
- We are new to be the player and we have no credit to the chip vendor.
- We have no equipment and we have to invest a lot to do it.
- There are lots of tasks need for the regulation.
To sum up, this is a money game for surveillance company and we see no market at that moment.
For 2, we could leverage a lot tasks to supplier but we still have to prepare equipment to verify the whole system and get the experience of the regulation. However, the module cost and performance ratio could not meet our requirement. It is quite challenge for me to persuade my boss to do it.
So what I can do is just keep attention on wireless technology.
Until now, I have the chance to do the development finally.
Although I'm newbie for wireless, it's not too hard to enter this area. The reason is the technology become much mature and we can make it work even we do not know much about wireless. So, let's just do it.
The module I use is based on Atheros AR6103 and AR6003. The driver of these two chips are similar.
The documents I study is are mainly from Atheros. I also reference the IEEE specification and search on Google.
The equipment and wireless module board
- Power meter is Agilent E4416A EPM-P single channel power meter.
This equipment can only measure the power from the wireless module from 50MHz~6GHz.
We could not know the power is generated om which frequency.


- Attenuator to avoid the large power.

- The AR6003 module board


- To connect the module board to evaluation board and power meter.


- Without power output.


- With power output.




If we want to know the power is contribute from which frequency channel and band. We need Spectrum Analyzer to check further. But for quick check the driver is working or not, this is already enough.
The tools from Atheros 'athtestcmd'.
Atheros test tool 'athtestcmd': We have to insmod the driver with parameter 'testmode=1' or we could not use this command.
'-i device': example, '-i eth1', '-i wlan0'.
'--tx frame': Continuous modulated Tx, AIFS(arbitration interframe space) can be set with the option --aifsn.
'--tx tx99': Continuous modulated Tx, AIFS is fixed to 0.
'--tx tx100': Continuous modulated but unframed Tx.
'--tx off': Disable continuous Tx.
'--tx freq': Channel frequency in MHz, but this frequency does not mean center frequency.
'--txrate <rate index>': Reference as below.
'--txpwr': tx power.
'--txantenna': 1 for antenna 1, 2 for antenna 2, 0 is auto. default is auto.
'--txpktsz': tx packet size.
'--txpattern': Tx frame bits pattern. The pattern of PN7/PN9/PN15 stands for pseudo noise code of length 2^7/2^9/2^15 bits.
Because the length of PN15 is large than max packet size, it's sent by 4 continuous packets.
The '--txpktsz' option is ignored when setting pattern to PN15.
'--ani': Enable ANI. The ANI is disabled if this option is not specified.
'--scrambleroff': When set, the frames cannot be sniffered.
'--aifsn': AIFS slots number. For '--tx frame' mode only.
'--shortguard': Short guard interval 400ns, the guard interval is 800ns if this option is not specified.
'--mode': the --tx
'--setlongpreamble':

.png)
'--numpackets': the total number of the packet.

Please make sure you use the correct board data from the supplier and replace it in the driver.
More task like the porting the driver for specific SoC interface, driver hacking, script setup tool and configuration application like wpa_supplicant...etc, these will be discuss later.

2013/04/01
[工作點滴] rtmps in rtmpdump with hardware engine development
Evostream server's configuration for rtmps test
Add the following content in the acceptors part in config.lua.
This is for Win7 configuration and remember that we have to use double '\' instead of single for path.
The cipherSuite parameter, we could reference http://www.openssl. org/docs/apps/ciphers.html# CIPHER_SUITE_NAMES
RTMP library
The library is main from rtmpdump. The webpage is http://rtmpdump.mplayerhq.hu.
The libssl library - SSLv23 method is used in the RTMPdump.
- SSLv23 method
A TLS/SSL connection established with these methods will understand the SSLv2, SSLv3, and TLSv1 protocol.
A client will send out SSLv2 client hello messages and will indicate that it also understands SSLv3 and TLSv1.
A server will understand SSLv2, SSLv3, and TLSv1 client hello messages.
This is the best choice when compatibility is a concern.
- SSLv23 related files in the openssl/ssl/ folder
* s23_clnt.c
* s23_lib.c
the ssl23_connect() function handle the hello message between client and server.
the client's related method will be created according to the server's hello message.
we can look into the ssl23_get_server_hello() function for more detailed.
we can compare with the network packet by Wireshark. We use the TLSv1_client_method().
* s23_pkt.c
* ssl_locl.h -> the marco and function were defined in this header file.
- According the Wireshark packet, let's dig into TLSv1_client_method() function.
* the TLS method is define in the ssl_locl.h file.
- TLSv1_enc_data(), this is a SSL3_ENC_METHOD structure define in ssl_locl.h and instantiate in t1_lib.c.
- ENGINE_setup_bsd_cryptodev(), this should be called to enable the 'cryptodev' engine support.
- ENGINE_load_builtin_engines is related to OPENSSL_NO_HW and it is define in crypto/opensslconf.h.
However, this is not called to load the cryptodev by default.
- we have to add the ENGINE_setup_bsd_cryptodev() in rtmp library.
cryptodev-linux package http://cryptodev- linux.org/index.html
- cryptodev, call iotcl() in cryptodev-linux/ioctl.c to access the crypto hardware engine.
* CIOCGSESSION: to do crypto_create_session()-> crypto_cipher_init()->crypto_ alloc_ablkcipher().
* CIOCCRYPT: the crypto_run() is in the cryptodev-linux/main.c.
* crypto_run()->__crypto_run_zc( ) or __crypto_run_std()->hash_n_ crypt(), this function would call directly to kernel crypto driver.
* cryptodev_cipher_encrypt() is in the cryptlib.c. The function ablkcipher_request_set_crypt()
and crypto_ablkcipher_encrypt( ) are in kernel.
Kernel crypto driver support
- crypto algorithm structure
- Asynchronous block cipher algorithm structue.
- Synchronous block cipher.
- crypto TFM(transform) structure
- The cryptodev-linux is using the asynchronous block cipher method. We can create a kernel driver.
There are example in the linux/drivers/crypto/ folder.
I assume that the kernel driver we create is abc_crypto.ko. We can insmod both the abc_crypto.ko and cryptodev.ko. Then the rtmp library support the rtmps through OpenSSL with hardware crypto engine.
2013/03/19
[工作點滴] process to generate makefile by autotools with Makefile.am
I've search on internet and get quick steps for whole process to generate Makefile by Autotools.
# autoscan . // scan the folder
# cp configure.scan configure.ac // copy the configure.scan to configure.ac
# vi configure.ac // edit the configure.ac
// add AM_INIT_AUTOMAKE(hello,1.0) in configure.ac
# cp configure.scan configure.ac // copy the configure.scan to configure.ac
# vi configure.ac // edit the configure.ac
// add AM_INIT_AUTOMAKE(hello,1.0) in configure.ac
// this is required marco for automake
# aclocal // execute aclocal to generate aclocal.m4
# autoconf // execute autoconf to generate configure
# autoheader
# automake --add-missing // run automake
# touch NEWS; touch README; touch AUTHORS; touch ChangeLog // create related documents
# aclocal // execute aclocal to generate aclocal.m4
# autoconf // execute autoconf to generate configure
# autoheader
# automake --add-missing // run automake
# touch NEWS; touch README; touch AUTHORS; touch ChangeLog // create related documents
# automake --add-missing // run automake again
# ./configure // execute the configure to generate Makefile
# make // execute make
# ./configure // execute the configure to generate Makefile
# make // execute make
According to the steps, I get more hint to modify the related files for my target.
2013/03/18
[工作點滴] gstreamer from 0.10.x to 1.0.x in openwrt
I start to move the gstreamer version from 0.10.x to 1.0.x in openwrt. Two purpose, one is to get much more familiar with the gstreamer applications and plugins development, another one is to assist my colleagues for next schedule. Just make a quick note here.
Official gstreamer packages version I use is 1.0.5:
Official gstreamer packages version I use is 1.0.5:
- gstreamer core -> Modify Makefile and patch, compile ok.
- gst-plugins-base -> Modify Makefile and patch, compile ok.
- gst-plugins-good -> Modify Makefile and patch, compile ok.
- gst-plugins-ugly -> To be check if required.
- gst-plugins-bad -> Modify Makefile and patch, compile ok.
- gst-libav -> To be check if required.
Proprietary plugins
- package folder -> Modify the Makefile.
- gst-plugin foler -> Modify the configure.ac
- gst-plugin/src folder -> Modify the Makefile.am
- plugin source
* GST_BOILERPLATE_FULL is gone, replace by G_DEFINE_TYPE_WITH_CODE
* add the parent_class definition.
#if 0
GST_BOILERPLATE_FULL (GstA5sSrc, gst_a5s_src, GstBaseSrc, GST_TYPE_BASE_SRC, gst_a5s_src_init_interfaces);
#else
#define gst_a5s_src_parent_iclass parent_class
G_DEFINE_TYPE_WITH_CODE (GstA5sSrc, gst_a5s_src, GST_TYPE_BASE_SRC, gst_a5s_src_init_interfaces);
#define gst_a5s_src_parent_iclass parent_class
G_DEFINE_TYPE_WITH_CODE (GstA5sSrc, gst_a5s_src, GST_TYPE_BASE_SRC, gst_a5s_src_init_interfaces);
#endif
* init funtion parameters is change.
#if 0
static void gst_a5s_src_init (GstA5sSrc * a5ssrc, GstA5sSrcClass * a5ssrc_class)
#else
static void gst_a5s_src_init (GstA5sSrc * a5ssrc)
#endif
static void gst_a5s_src_init (GstA5sSrc * a5ssrc, GstA5sSrcClass * a5ssrc_class)
#else
static void gst_a5s_src_init (GstA5sSrc * a5ssrc)
#endif
* remove the gone already functions.
* audio: Need lots of works to do.
* buffer size: replace the GST_BUFFER_SIZE() to gst_buffer_get_size().
* buffer data: replace the GST_BUFFER_DATA() by using the gst_buffer_map to access the data.
Audio plugins:
- GstRingBufferSpec -> GstAudioRingBufferSpec
- The GstAudioRingBufferSpec has big changes. Lots parameters are re-factored in the GstAudioInfo.
- The GstAudioInfo structure is as follow. The format part is in GstAudioFormatInfo.
/**
* GstAudioInfo:
* @finfo: the format info of the audio
* @flags: additional audio flags
* @layout: audio layout
* @rate: the audio sample rate
* @channels: the number of channels
* @bpf: the number of bytes for one frame, this is the size of one
* sample * @channels
* @position: the positions for each channel
*
* Information describing audio properties. This information can be filled
* in from GstCaps with gst_audio_info_from_caps().
*
* Use the provided macros to access the info in this structure.
*/
struct _GstAudioInfo {
const GstAudioFormatInfo *finfo;
GstAudioFlags flags;
GstAudioLayout layout;
gint rate;
gint channels;
gint bpf;
GstAudioChannelPosition position[64];
/*< private >*/
gpointer _gst_reserved[GST_PADDING];
};
* GstAudioInfo:
* @finfo: the format info of the audio
* @flags: additional audio flags
* @layout: audio layout
* @rate: the audio sample rate
* @channels: the number of channels
* @bpf: the number of bytes for one frame, this is the size of one
* sample * @channels
* @position: the positions for each channel
*
* Information describing audio properties. This information can be filled
* in from GstCaps with gst_audio_info_from_caps().
*
* Use the provided macros to access the info in this structure.
*/
struct _GstAudioInfo {
const GstAudioFormatInfo *finfo;
GstAudioFlags flags;
GstAudioLayout layout;
gint rate;
gint channels;
gint bpf;
GstAudioChannelPosition position[64];
/*< private >*/
gpointer _gst_reserved[GST_PADDING];
};
- GstAudioFormatInfo
/**
* GstAudioFormatInfo:
* @format: #GstAudioFormat
* @name: string representation of the format
* @description: user readable description of the format
* @flags: #GstAudioFormatFlags
* @endianness: the endianness
* @width: amount of bits used for one sample
* @depth: amount of valid bits in @width
* @silence: @width/8 bytes with 1 silent sample
* @unpack_format: the format of the unpacked samples
* @unpack_func: function to unpack samples
* @pack_func: function to pack samples
*
* Information for an audio format.
*/
struct _GstAudioFormatInfo {
GstAudioFormat format;
const gchar *name;
const gchar *description;
GstAudioFormatFlags flags;
gint endianness;
gint width;
gint depth;
guint8 silence[8];
GstAudioFormat unpack_format;
GstAudioFormatUnpack unpack_func;
GstAudioFormatPack pack_func;
/*< private >*/
gpointer _gst_reserved[GST_PADDING];
};
* GstAudioFormatInfo:
* @format: #GstAudioFormat
* @name: string representation of the format
* @description: user readable description of the format
* @flags: #GstAudioFormatFlags
* @endianness: the endianness
* @width: amount of bits used for one sample
* @depth: amount of valid bits in @width
* @silence: @width/8 bytes with 1 silent sample
* @unpack_format: the format of the unpacked samples
* @unpack_func: function to unpack samples
* @pack_func: function to pack samples
*
* Information for an audio format.
*/
struct _GstAudioFormatInfo {
GstAudioFormat format;
const gchar *name;
const gchar *description;
GstAudioFormatFlags flags;
gint endianness;
gint width;
gint depth;
guint8 silence[8];
GstAudioFormat unpack_format;
GstAudioFormatUnpack unpack_func;
GstAudioFormatPack pack_func;
/*< private >*/
gpointer _gst_reserved[GST_PADDING];
};
- Change the audio/x-raw-int to audio/x-raw for pad template.
- To do list:
* Check the timestamps mechanism in new alsa plugin example.
* Check the audio GstAudioRingBufferSpec parameters.
Applications
- gst-rtsp-server
* execute the autogen.sh and install the required tool to generate necessary files.
* add the AC_PROG_CXX in configure.ac because our example is cpp based.
* create patch to make gst-libs/gst/rtsp in gst-plugins-base to be the latest master version.
* after above patch, the gst-rtsp-server's gst/rtsp-server library could be successfully built.
* gst_debug_add_log_function() function parameters change from 2 to 3.
gst_debug_add_log_function(gst_log_function_syslog, NULL, NULL);
* buffer size: replace the GST_BUFFER_SIZE() to gst_buffer_get_size().
* buffer data: replace the GST_BUFFER_DATA() by using the gst_buffer_map to access the data.
GstBuffer *buffer = gst_app_sink_pull_preroll(sink);
GstMapInfo mapinfo = {0, };
gst_buffer_map(buffer, &mapinfo, GST_MAP_READ);
/* access the buffer by mapinfo.data and mapinfo.size */
gst_buffer_unmap(buffer, &mapinfo);
* g_thread_create remove, use g_thread_new -> check further.
* gst_app_sink_set_callbacks() -> callbacks structure is change.
* ways change to handle sink callback functions.
#if 0
GstBuffer *buffer = gst_app_sink_pull_preroll(sink);
#else
GstSample *sample = gst_app_sink_pull_preroll(sink);
GstBuffer *buffer = gst_sampe_get_buffer(sample);
#endif
#if 0
GstBuffer *buffer = gst_app_sink_pull_buffer(sink);
#else
GstSample *sample = gst_app_sink_pull_sample(sink);
GstBuffer *buffer = gst_sampe_get_buffer(sample);
#endif
* The GstRTSPMediaMapping rename to be GstRTSPMountPoints, we can compare by the examples.
* gst_rtsp_server_get_media_mapping() become gst_rtsp_server_get_mount_points()
* gst_rtsp_media_mapping_add_factory() become gst_rtsp_mount_points_add_factory()
* In configure.ac, remove the WARNING_CFLAGS because some warnings would cause errors.
#GST_OPTION_CFLAGS="\$(WARNING_CFLAGS) \$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
GST_OPTION_CFLAGS="\$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
GST_OPTION_CFLAGS="\$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
2013/03/13
[工作點滴] SIP test of Freeswitch by FSClient
In previous articles, I tried to build the pjsip package, but it's hard for me to make sure the package is work correctly because of my lacking knowledge of sip. Then I try to be more familiar with how the sip works. First, prepare a PC and install the switch on it. We have two popular choices, one is Asterisk and another one is Freeswitch. I choose the Freeswitch because there is a precompiled binaries for win7 already.
After installation, remember to allow the application to pass firewall. Because it is just for testing, I execute the Freeswitch with default configuration.
When the switch is done, we could choose the softphones to test. Here are the information of the softphones.
I choose the FSClient on windows 7.
Set the device configuration.
Add the test account and register to Freeswitch.Then we can use the FSClient to do the test. More information in the getting started guide.
http://wiki.freeswitch.org/wiki/Getting_Started_Guide
There are some common extensions for testing
1000, 1001, ..., 1019 - Generic SIP extensions5000 - demo IVR (requires sounds and music files to be installed)
9195 - five second delay echo test
9196 - standard echo test
9197 - milliwatt extension
9198 - tetris extension for demo TGML generation
9664 - music on hold (requires music files to be installed)
It's easy, just dial it.
2013/03/12
[工作點滴] pjsip on ubuntu
Before trying to make the pjsip work on my embedded device, I build the related libraries on PC as the reference. My environment is based Ubuntu 10.04. See the following guide.
The notes of packages building:
- ALSA and OpenSSL libraries are optional and I do not install for first.
- SDL, I download the version 2.0 and do "./configure", "make; make install" to install the package to system. If we encounter privilege problem, please add sudo.
- FFMPEG, please reference the document on FFMPEG official site. The link is as following. https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide
There are links for different version of the Ubuntu. We could follow the guide to build yasm, x264 and ffmpeg. The ffmpeg version(0.10.6) and building process is following pjsip guide.
- PJSIP, I follow the guide to add the "#define PJMEDIA_HAS_VIDEO 1" in config_site.h and do the "./configure". The weird thing is that the package still can be built whatever the definition is exist or not. Then "make dep", "make" and "make install"(optional).
It's not hard to build the packages but there are some uncertainty to me. Now let's quickly build an application with GNU tools.
The guide I follow is http://trac.pjsip.org/repos/wiki/Getting_Started_Using.
There is an error occur when make.
cc -o myapp myapp.cpp `pkg-config --cflags --libs libpjproject`
/tmp/cczRrbTp.o:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
make: *** [myapp] Error 1
There are two ways to solve this. One is change the myapp.cpp to be myapp.c and another way is to add -lstdc++ in the Makefile.
# Makefile
myapp: myapp.cpp
$(CC) -o $@ $< `pkg-config --cflags --libs libpjproject` -lstdc++
clean:
rm -f myapp.o myapp
The myapp.cpp code.
/* pjsip applicaiton */
#include <pjlib.h>
#include <pjlib-util.h>
#include <pjmedia.h>
#include <pjmedia-codec.h>
#include <pjsip.h>
#include <pjsip_simple.h>
#include <pjsip_ua.h>
#include <pjsua-lib/pjsua.h>
int main()
{
printf("hello pjsip\n");
return 0;
}
Okay, that's all and we could start our application.
[工作點滴] pjsip package build in openwrt
There is a default pjsip package in the openwrt but it link to the extension package of ltq-tapi and oss. But what I need first is the package without extra packages. So I try to create the libraries by using the latest version 2.1 for the experiment.
First, the Makefile of the package as following.
# Makefile of the package.
include $(TOPDIR)/rules.mkPKG_NAME:=pjsip2
PKG_VERSION:=2.1
PKG_RELEASE:=0
PKG_SOURCE:=pjproject-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.pjsip.org/release/$(PKG_VERSION)/
PKG_MD5SUM:=310eb63638dac93095f6a1fc8ee1f578
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/pjproject-$(PKG_VERSION).$(PKG_RELEASE)
include $(INCLUDE_DIR)/package.mk
define Package/pjsip2
SECTION:=lib
CATEGORY:=Libraries
URL:=http://www.pjsip.org/
MAINTAINER:=John Crispin <blogic@openwrt.org>
TITLE:=pjsip2
DEPENDS:=+libuuid
endef
CONFIGURE_ARGS += \
--disable-floating-point \
--disable-g711-codec \
--disable-l16-codec \
--disable-g722-codec \
--disable-g7221-codec \
--disable-gsm-codec \
--disable-ilbc-coder \
--disable-libsamplerate \
--disable-ipp \
--disable-ssl \
--disable-oss \
--disable-sound
define Build/Configure
(cd $(PKG_BUILD_DIR); autoconf aconfigure.ac > aconfigure)
$(call Build/Configure/Default)
endef
define Build/Compile
CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS) -lc $(LIBGCC_S) -lm" \
$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/pjsip2
$(CP) $(PKG_INSTALL_DIR)/usr $(1)/usr/pjsip2
endef
$(eval $(call BuildPackage,pjsip2))
Here we will encounter the problem as follow.
--target=BFDNAME - specify the target object format as BFDNAMEemulation options:
arm-openwrt-linux-uclibcgnueabi-ar: supported targets: elf32-littlearm elf32-bigarm elf32-little elf32-big srec symbolsrec verilog tekhex binary ihex
make[5]: *** [../lib/libpj-arm-openwrt-linux-gnu.a] Error 1
make[5]: Leaving directory `/home/ubnt/aircam_temp/openwrt/build_dir/target-arm_v6k_uClibc-0.9.33.2_eabi/pjproject-2.1.0/pjlib/build'
make[4]: *** [pjlib] Error 2
make[4]: Leaving directory `/home/ubnt/aircam_temp/openwrt/build_dir/target-arm_v6k_uClibc-0.9.33.2_eabi/pjproject-2.1.0/pjlib/build'
make[3]: *** [all] Error 1
Then we need to patch the aconfigure.ac as follow, this is reference to original content in pjsip patches.
--- pjproject-2.1.0.orig/aconfigure.ac 2013-01-23 14:18:18.000000000 +0800
+++ pjproject-2.1.0/aconfigure.ac 2013-03-11 18:26:43.705804028 +0800@@ -48,9 +48,8 @@
CROSS_COMPILE=`echo ${CC} | sed 's/gcc//'`
fi
-if test "$AR" = ""; then AR="${CROSS_COMPILE}ar rv"; fi
+AR="${AR} rv"
AC_SUBST(AR)
-if test "$LD" = ""; then LD="$CC"; fi
AC_SUBST(LD)
if test "$LDOUT" = ""; then LDOUT="-o "; fi
AC_SUBST(LDOUT)
New error occur that cannot find libgcc.a. This is quite weird.
arm-openwrt-linux-uclibcgnueabi-ld: cannot find libgcc.a
make[5]: *** [../bin/pjlib-test-arm-openwrt-linux-gnu] Error 1make[5]: Leaving directory `/home/ubnt/aircam_temp/openwrt/build_dir/target-arm_v6k_uClibc-0.9.33.2_eabi/pjproject-2.1.0/pjlib/build'
make[4]: *** [pjlib-test] Error 2
make[4]: Leaving directory `/home/ubnt/aircam_temp/openwrt/build_dir/target-arm_v6k_uClibc-0.9.33.2_eabi/pjproject-2.1.0/pjlib/build'
make[3]: *** [all] Error 1
I check the toolchain build_dir in openwrt and copy the libgcc.a in staging_dir toolchain/lib. The error solved and the package could successfully be built.
There are tasks to be done if we want to integrate with private audio and video modules.
2013/02/27
[工作點滴] Liberated networking technology
Our company update the home page to a brand new picture. There is a name 'Liberated' to describe the new networking technology we implemented.
According to the dictionary, I'm most likely the description "free from traditional social restraints" because we are trying to make the fundamental change in different area that we enter. It's an interesting journey to me.
Although it's not 100% correct, I still want to record what I saw here. I plot the company's product map simply by personal thinking as follow from the webpage.
It looks quite simple and most of the items are not new concept here. If we can do well in every point that describe here, we have big chance to success. So we have to be more hard working to liberated them all.
訂閱:
文章 (Atom)