Tuesday, June 14, 2011
ARM Qemu
Qemu
[ ]# cd /home/qemu/
[ ]# git clone git://git.qemu.org/qemu.git qemu-git
[ ]# cd qemu-git/
[ ]# ./configure --target-list="arm-softmmu"
[ ]# make
[ ]# cp arm-softmmu/qemu-system-arm /usr/bin/
Or
http://download.savannah.gnu.org/releases/qemu/qemu-0.14.1.tar.gz
[ ]# wget http://ftp.denx.de/pub/u-boot/u-boot-2010.03.tar.bz2
[ ]# cd u-boot-2010.03
[ ]# make versatilepb_config ARCH=arm CROSS_COMPILE=arm-linux-
[ ]# make all ARCH=arm CROSS_COMPILE=arm-linux-
[ ]# qemu-system-arm -M versatilepb -m 128M -nographic -kernel u-boot.bin
[ ]# echo "#include" > test.c
[ ]# echo "int main() {" >> test.c
[ ]# echo -e '\tprintf("Hello World!\\n");' >> test.c
[ ]# echo -e "return 0;" >> test.c
[ ]# echo "}" >> test.c
[ ]# arm-linux-gcc -static test.c -o test
[ ]# echo test | cpio -o --format=newc > rootfs
ARM Linux Versatile (ARMv5)
[ ]# cd /home/qemu/
[ ]# wget http://www.kernel.org/pub/linux/kernel/v2.6/longterm/v2.6.35/linux-2.6.35.12.tar.bz2
[ ]# tar jxvf linux-2.6.35.12.tar.bz2
[ ]# cd linux-2.6.35.12
[ ]# make ARCH=arm versatile_defconfig
[ ]# make ARCH=arm menuconfig
Enabling EABI support in the kernel. (CONFIG_AEABI=y, CONFIG_OABI_COMPAT=y)
[ ]# make ARCH=arm CROSS_COMPILE=arm-linux- all
[ ]# qemu-system-arm -M versatilepb -m 128M -kernel arch/arm/boot/zImage -initrd rootfs -serial stdio -append "console=ttyAMA0 root=/dev/ram rdinit=/test"
You can use “-nographic” instead of “-serial stdio” to launch QEMU without opening another window, but then to close it you have to type Ctrl-A and then “x”.
How to install Qemu in Linux for Versatile Express platform
Processor: Cortex A9
COREMU
Qemu
[ ]# mkdir /home/qemu[ ]# cd /home/qemu/
[ ]# git clone git://git.qemu.org/qemu.git qemu-git
[ ]# cd qemu-git/
[ ]# ./configure --target-list="arm-softmmu"
[ ]# make
[ ]# cp arm-softmmu/qemu-system-arm /usr/bin/
Or
http://download.savannah.gnu.org/releases/qemu/qemu-0.14.1.tar.gz
U-boot
[ ]# cd /home/qemu/[ ]# wget http://ftp.denx.de/pub/u-boot/u-boot-2010.03.tar.bz2
[ ]# cd u-boot-2010.03
[ ]# make versatilepb_config ARCH=arm CROSS_COMPILE=arm-linux-
[ ]# make all ARCH=arm CROSS_COMPILE=arm-linux-
[ ]# qemu-system-arm -M versatilepb -m 128M -nographic -kernel u-boot.bin
U-Boot 2010.03 (Jun 15 2011 - 14:38:26)
DRAM: 0 kB
## Unknown FLASH on Bank 1 - Size = 0x00000000 = 0 MB
Flash: 0 kB
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Net: SMC91111-0
VersatilePB # print
bootargs=root=/dev/nfs mem=128M ip=dhcp netdev=25,0,0xf1010000,0xf1010010,eth0
bootdelay=2
baudrate=38400
bootfile="/tftpboot/uImage"
stdin=serial
stdout=serial
stderr=serial
verify=n
ethact=SMC91111-0
Environment size: 202/8188 bytes
VersatilePB #
Simple "Hello World!" Root File System
[ ]# cd /home/qemu/[ ]# echo "#include
[ ]# echo "int main() {" >> test.c
[ ]# echo -e '\tprintf("Hello World!\\n");' >> test.c
[ ]# echo -e "return 0;" >> test.c
[ ]# echo "}" >> test.c
[ ]# arm-linux-gcc -static test.c -o test
[ ]# echo test | cpio -o --format=newc > rootfs
ARM Linux Versatile (ARMv5)
[ ]# cd /home/qemu/
[ ]# wget http://www.kernel.org/pub/linux/kernel/v2.6/longterm/v2.6.35/linux-2.6.35.12.tar.bz2
[ ]# tar jxvf linux-2.6.35.12.tar.bz2
[ ]# cd linux-2.6.35.12
[ ]# make ARCH=arm versatile_defconfig
[ ]# make ARCH=arm menuconfig
Enabling EABI support in the kernel. (CONFIG_AEABI=y, CONFIG_OABI_COMPAT=y)
[ ]# make ARCH=arm CROSS_COMPILE=arm-linux- all
[ ]# qemu-system-arm -M versatilepb -m 128M -kernel arch/arm/boot/zImage -initrd rootfs -serial stdio -append "console=ttyAMA0 root=/dev/ram rdinit=/test"
You can use “-nographic” instead of “-serial stdio” to launch QEMU without opening another window, but then to close it you have to type Ctrl-A and then “x”.
How to install Qemu in Linux for Versatile Express platform
Processor: Cortex A9
COREMU
Sunday, June 12, 2011
Linux Kernel Tracer
# mount -t debugfs nodev /sys/kernel/debug
# cat /sys/kernel/debug/tracing/available_tracers
wakeup preemptirqsoff preemptoff irqsoff function sched_switch nop
# cat /sys/kernel/debug/tracing/current_tracer
nop
# echo sched_switch > /sys/kernel/debug/tracing/current_tracer
# cat /sys/kernel/debug/tracing/current_tracer
sched_switch
# cat /sys/kernel/debug/tracing/trace_options
noprint-parent nosym-offset nosym-addr noverbose
# echo print-parent > /sys/kernel/debug/tracing/trace_options
# echo 1 > /sys/kernel/debug/tracing/tracing_enabled
# cat /sys/kernel/debug/tracing/trace > /tmp/trace.txt
# echo 0 > /sys/kernel/debug/tracing/tracing_enabled
# cat /sys/kernel/debug/tracing/available_tracers
wakeup preemptirqsoff preemptoff irqsoff function sched_switch nop
# cat /sys/kernel/debug/tracing/current_tracer
nop
# echo sched_switch > /sys/kernel/debug/tracing/current_tracer
# cat /sys/kernel/debug/tracing/current_tracer
sched_switch
# cat /sys/kernel/debug/tracing/trace_options
noprint-parent nosym-offset nosym-addr noverbose
# echo print-parent > /sys/kernel/debug/tracing/trace_options
# echo 1 > /sys/kernel/debug/tracing/tracing_enabled
# cat /sys/kernel/debug/tracing/trace > /tmp/trace.txt
# echo 0 > /sys/kernel/debug/tracing/tracing_enabled
Thursday, June 9, 2011
OProfile on ARM Linux
How to compile OProfile
--target=arm-linux \
--host=arm-linux \
--build=i686-pc-linux-gnu \
--enable-shared \
--prefix=/home/oprofile/binutils-stable_bin \
--disable-nls --disable-poison-system-directories
[ ]#make
[ ]#make install
--with-kernel-support \
--disable-optimization \
--disable-werror \
--target=arm-linux \
--host=arm-linux \
--build=i686-pc-linux-gnu \
--enable-static \
--with-binutils=/home/oprofile/binutils-stable_bin \
--prefix=/home/oprofile/oprofile-0.9.6_bin
[ ]#make
How to use OProfile on ARM platform
Default: timer mode, $ modprobe oprofile timer=1
$ opcontrol --reset
$ opcontrol --init
$ opcontrol --start --vmlinux=/tmp/vmlinux --session-dir=/tmp/linux
$ opcontrol --start-daemon
$ opcontrol --dump
$ opcontrol --save=output
$ opreport --session-dir=/tmp/linux session:output -l image:/tmp/vmlinux
Sample Rate = HZ
OProfile with performance counter
$ opcontrol --callgraph=8 --separate=kernel --vmlinux=/boot/vmlinux
$ opcontrol --event=CPU_CYCLES:100000:0:1:1 \
--event=L1D_CACHE:100000:0:1:1 \
--event=L2D_CACHE:10000:0:1:1 \
--event=BUS_ACCESS:100000:0:1:1 \
--event=BUS_CYCLES:100000:0:1:1 \
--event=UNALIGNED_LDST_RETIRED:10000:0:1:1
$ opcontrol --init
$ opcontrol --reset
$ opcontrol --start-daemon
$ opcontrol --status
$ opcontrol --start
$ opcontrol --dump
$ opreport
Sample Rate = (CPU frequency in MHz) / (CPU_CYCLES count) / 64.
The default value of CPU_CYCLES = 100000. The CPU_CYCLES can be changed as following example “--event=CPU_CYCLES:125000".
If CPU is running in 800MHz, the sample rate is 800MHz / 100000 / 64 = 125 samples per second.
Reference:
http://friendalways.blogspot.com/2009/11/oprofile-on-arm-linux.html
binutils
[ ]#./configure \--target=arm-linux \
--host=arm-linux \
--build=i686-pc-linux-gnu \
--enable-shared \
--prefix=/home/oprofile/binutils-stable_bin \
--disable-nls --disable-poison-system-directories
[ ]#make
[ ]#make install
oprofile-0.9.6
[ ]#./configure --with-linux=/home/linux-2.6.35.12-cavm1 \--with-kernel-support \
--disable-optimization \
--disable-werror \
--target=arm-linux \
--host=arm-linux \
--build=i686-pc-linux-gnu \
--enable-static \
--with-binutils=/home/oprofile/binutils-stable_bin \
--prefix=/home/oprofile/oprofile-0.9.6_bin
[ ]#make
How to use OProfile on ARM platform
Default: timer mode, $ modprobe oprofile timer=1
$ opcontrol --reset
$ opcontrol --init
$ opcontrol --start --vmlinux=/tmp/vmlinux --session-dir=/tmp/linux
$ opcontrol --start-daemon
$ opcontrol --dump
$ opcontrol --save=output
$ opreport --session-dir=/tmp/linux session:output -l image:/tmp/vmlinux
Sample Rate = HZ
OProfile with performance counter
$ opcontrol --callgraph=8 --separate=kernel --vmlinux=/boot/vmlinux
$ opcontrol --event=CPU_CYCLES:100000:0:1:1 \
--event=L1D_CACHE:100000:0:1:1 \
--event=L2D_CACHE:10000:0:1:1 \
--event=BUS_ACCESS:100000:0:1:1 \
--event=BUS_CYCLES:100000:0:1:1 \
--event=UNALIGNED_LDST_RETIRED:10000:0:1:1
$ opcontrol --init
$ opcontrol --reset
$ opcontrol --start-daemon
$ opcontrol --status
$ opcontrol --start
$ opcontrol --dump
$ opreport
Sample Rate = (CPU frequency in MHz) / (CPU_CYCLES count) / 64.
The default value of CPU_CYCLES = 100000. The CPU_CYCLES can be changed as following example “--event=CPU_CYCLES:125000".
If CPU is running in 800MHz, the sample rate is 800MHz / 100000 / 64 = 125 samples per second.
Reference:
http://friendalways.blogspot.com/2009/11/oprofile-on-arm-linux.html
Wednesday, June 8, 2011
HD over Wireless
1. WiVu: Cavium
2. WiDi (Wireless Display): Intel
3. WiHD (Wireless HD): Intel, ...
4. WiGig: Wilocity (Atheros)
5. WHDI: AMIMON, Sibeam ()
2. WiDi (Wireless Display): Intel
3. WiHD (Wireless HD): Intel, ...
4. WiGig: Wilocity (Atheros)
5. WHDI: AMIMON, Sibeam ()
Subscribe to:
Posts (Atom)