Tuesday, July 1, 2008

IPTV - Video

1. The Technology of Video and Audio Streaming Second Edition (PDF)

2. Digital Video and HDTV Algorithms and Interfaces (PDF)

3. IPTV Basics, Technology, Operation and Services (PDF)

4. IP Multicast with Applications to IPTV and Mobile DVB-H (PDF)

5. IPTV Security : Protecting High-Value Digital Contents (PDF)

Monday, June 30, 2008

Choose a "Good" MAC address

Please choose a “good” MAC address for your testing if you want to change it. In Linux 2.6.24.4, do not use “X1:XX:XX:XX:XX:XX” as your MAC address. It’s not allowed.

The following snippet code is copy from kernel. It explains everything

#include <stdio.h>
#include <stdlib.h>

/* Linux Kernel */
static inline int is_zero_ether_addr(const u_char *addr)
{
   return !(addr[0] | addr[1] | addr[2] | addr[3] | addr[4] | addr[5]);
}

static inline int is_multicast_ether_addr(const u_char *addr)
{
   return (0x01 & addr[0]);
}

static inline int is_valid_ether_addr(const u_char *addr)
{
   return !is_multicast_ether_addr(addr) && !is_zero_ether_addr(addr);
}

int main (int argc, char **argv) {
   int ret;

   ret = is_valid_ether_addr("11:22:33:44:55:66");
   printf("ret = %d\n", ret);; ret = 0, Not a valid MAC address

   ret = is_valid_ether_addr("01:22:33:44:55:66");
   printf("ret = %d\n", ret);; ret = 0, Not a valid MAC address

   ret = is_valid_ether_addr("00:1B:21:11:22:33");
   printf("ret = %d\n", ret);; ret = 1, This is a valid MAC address

   return;
}

How to prevent to set up the invalud MAC address? Please call "is_valid_ether_addr" in network device driver.

Tuesday, June 24, 2008

eCos Software Diagram



Compare with Linux

Thursday, June 12, 2008

IPTV Week

I plan to study IPTV this week (Night Life)
  1. IPTV and Internet Video - Focal Press
  2. Understanding IPTV - Auerbach Publications
  3. Next Generation IPTV Services and Technologies - Wiley
Book (1) and (2) are more generic discussion about IPTV, book (3) contains more deeply technical material.

Wednesday, June 11, 2008

802.1X Port-Based Authentication

Scott's slide (Update!)

Radiator Server v4.0 Installation Guide (2008.09.26 Upload)
Case Study: EAP-Fast

USB Mass Storage Device Descriptor

USB Gadget Drivers




Tuesday, June 10, 2008

How to build eCos 2.x toolchain for ARM platform

In Fedora Core 8, Fedora Core 9

* binutils-2.15
* gcc-3.4.3
* newlib-1.12.0
* insight-6.6

1. Pre-Configuration
BASE_DIR=`pwd`
TARGET=arm-elf

2. Download source code
[ ]# wget -P $BASE_DIR/src http://www.gnuarm.com/binutils-2.15.tar.bz2
[ ]# wget -P $BASE_DIR/src http://www.gnuarm.com/gcc-3.4.3.tar.bz2
[ ]# wget -P $BASE_DIR/src http://www.gnuarm.com/newlib-1.12.0.tar.gz
[ ]# wget -P $BASE_DIR/src ftp://sourceware.org/pub/insight/releases/insight-6.6.tar.bz2

3. Pre-Build
[ ]# mkdir -p /opt/gnutools
[ ]# bunzip2 < $BASE_DIR/src/binutils-2.15.tar.bz2 | tar xvf -
[ ]# bunzip2 < $BASE_DIR/src/gcc-3.4.3.tar.bz2 | tar xvf -
[ ]# gunzip < $BASE_DIR/src/newlib-1.12.0.tar.gz | tar xvf -
[ ]# bunzip2 < $BASE_DIR/src/insight-6.6.tar.bz2 | tar xvf -
[ ]# cp -rf newlib-1.12.0/newlib gcc-3.4.3/
[ ]# cp -rf newlib-1.12.0/libgloss gcc-3.4.3/

4. Binutils
[ ]# mkdir -p /tmp/build/binutils
[ ]# cd /tmp/build/binutils
[ ]# $BASE_DIR/binutils-2.15/configure --target=$TARGET --prefix=/opt/gnutools \
-v 2>&1 | tee configure.out
[ ]# make -w all install 2>&1 | tee make.out

5. GCC
[ ]# PATH=/opt/gnutools/bin:$PATH ; export PATH
[ ]# mkdir -p /tmp/build/gcc
[ ]# cd /tmp/build/gcc
[ ]# $BASE_DIR/gcc-3.4.3/configure --target=$TARGET --prefix=/opt/gnutools \
--enable-languages=c,c++ --with-gnu-as --with-gnu-ld --with-newlib \
--with-gxx-include-dir=/opt/gnutools/$TARGET/include \
-v 2>&1 | tee configure.out
[ ]# make -w all install 2>&1 | tee make.out

6. GDB
[ ]# mkdir -p /tmp/build/gdb
[ ]# cd /tmp/build/gdb
[ ]# $BASE_DIR/insight-6.6/configure --target=$TARGET --prefix=/opt/gnutools \
-v 2>&1 | tee configure.out
[ ]# make -w all install 2>&1 | tee make.out

7. Post-Build
* Clean
[ ]# rm -rf /tmp/build/

* Change PATH environment variable (Edit /root/.bash_profile file)
PATH=$PATH:$HOME/bin
# Toolchain for ARM-eCos platform
PATH=/opt/gnutools/bin:$PATH
export PATH

* Effect the change

That's all. Here is the script file. Enjoy!
You can also download the complete source tarball (84MB).