2010年12月30日 星期四

Ubuntu 10.10

Ubuntu 10.10


the default installed system cannot show Chinese character
Goto [System] -> [Administration] -> [Language Supports] -> [Install/Remove Languages]
Choose required language and install them.



apt-get update;
apt-get install

htop
vim
tree
samba
openssh-server

libncurses5 libncurses5-dev autoconf flex bison m4
virtualbox-ose virtualbox-guest-additions
Network Address Translation (NAT)
http://www.virtualbox.org/manual/ch06.html#network_nat
As more than one card of a virtual machine can be set up to use NAT, the first card is connected to the private network 10.0.2.0, the second card to the network 10.0.3.0 and so on.

git-core gitk
subversion

ctags

gcin
[System] -> [Preference] -> [gcin Setup] -> [對 右上角 的輸入法按右鍵 -> 設定 (輸入法) -> [Default input method and toggle key]
把不用的輸入法都disable掉
[System] -> [Preference] -> [Input Method Switcher] -> (select gcin)
(may need to restart X)

2010年12月28日 星期二

netperf-2.4.5 build failure in FC14

On Fedora Core 14 only. Not seen on Ubuntu 10.4 or 8.04

configure.ac:60: error: possibly undefined macro: AC_CHECK_SA_LEN
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.


Fixed by:
diff --git a/netperf-2.4.5/configure.ac b/netperf-2.4.5/configure.ac
index 63ba3f1..8a38c40 100644
--- a/netperf-2.4.5/configure.ac
+++ b/netperf-2.4.5/configure.ac
@@ -57,7 +57,7 @@ AC_DECL_H_ERRNO
AC_STRUCT_SOCKADDR_STORAGE
AC_HEADER_TIME
AC_HEADER_STDBOOL
-AC_CHECK_SA_LEN(ac_cv_sockaddr_has_sa_len)
+#AC_CHECK_SA_LEN(ac_cv_sockaddr_has_sa_len)

# Checks for library functions.
# AC_FUNC_ERROR_AT_LINE

Using Fedora Core YUM

YUM 常用指令如下:

yum update
更新套件, ex: yum update httpd,如果只有 yum update ,會更新所有已經安裝的套件。

yum search
搜尋套件,ex: yum search httpd*,會搜尋所有跟 httpd 有關的套件。

yum install
安裝套件,這裡的套件安裝,會考慮到相依性的問題。 ex: yum install httpd

yum remove
移除套件,這裡的套件移除,也會考慮到相依性的問題。 ex: yum remove httpd

yum clean
清除安裝時下載的暫存套件原始檔案,位於 /var/cache/yum,因為這裡可以清除的項目很多,我最常用的是 yum clean all ,一次給他清掉 :p

yum list
列出套件名稱,用法常用有分以下幾種:

yum list updates
列出所有可以更新的套件

yum list installed
列出所有已安裝的套件

YUM的使用
http://www.php5.idv.tw/modules.php?mod=books&act=show&shid=2536

2010年11月30日 星期二

ARM VFP

ARM11MPCore/ARMv6/VFPv2
-mfloat-abi=softfp -mfpu=vfp

With buildroot-2010.05 config, there are some confussion regarding softfp. In toolchain/gcc/Makefile.in, parameter is defined by BR2_SOFT_FLOAT and BR2_SOFT_FLOAT_FP. But BR2_SOFT_FLOAT_FP is not found in .config/Config.in, while there is another BR2_VFP_FLOAT, which "depends on !BR2_SOFT_FLOAT"....

BR2_EXTRA_GCC_CONFIG_OPTIONS="--with-float=softfp --with-fpu=vfp"
Note that it is not "--with-float-abi=softfp"

BR2_TARGET_OPTIMIZATION="-O3 -pipe -mfloat-abi=softfp -mfpu=vfp"
1. check libm
2. check default setting (w/o giving -mfloat-abi and -mfpu)


ArmHardFloatPort
http://wiki.debian.org/ArmHardFloatPort
ArmHardFloatPort/VfpComparison
http://wiki.debian.org/ArmHardFloatPort/VfpComparison

3.17.2 ARM Options
http://gcc.gnu.org/onlinedocs/gcc-4.4.5/gcc/ARM-Options.html
-mfloat-abi=name
Specifies which floating-point ABI to use. Permissible values are: `soft', `softfp' and `hard'.

Specifying `soft' causes GCC to generate output containing library calls for floating-point operations. `softfp' allows the generation of code using hardware floating-point instructions, but still uses the soft-float calling conventions. `hard' allows generation of floating-point instructions and uses FPU-specific calling conventions.

Using -mfloat-abi=hard with VFP coprocessors is not supported. Use -mfloat-abi=softfp with the appropriate -mfpu option to allow the compiler to generate code that makes use of the hardware floating-point capabilities for these CPUs.

The default depends on the specific target configuration. Note that the hard-float and soft-float ABIs are not link-compatible; you must compile your entire program with the same ABI, and link with a compatible set of libraries.

(.......................)

-mfpu=name
-mfpe=number
-mfp=number
This specifies what floating point hardware (or hardware emulation) is available on the target. Permissible names are: `fpa', `fpe2', `fpe3', `maverick', `vfp', `vfpv3', `vfpv3-d16' and `neon'. -mfp and -mfpe are synonyms for -mfpu=`fpe'number, for compatibility with older versions of GCC.

If -msoft-float is specified this specifies the format of floating point values.



如何確認 uclibc 是有 VFP 最佳化的?
http://blog.richliu.com/2010/09/01/985/
arm-linux-gcc -mfloat-abi=soft -c -g -Wa,-a,-ad 1.c ; arm-linux-objdump -dS 1.o | less
__eabi_dmul

arm-linux-gcc -mfloat-abi=softfp -c -g -Wa,-a,-ad 1.c ; arm-linux-objdump -dS 1.o | less
fmuld (I see vmul.f64)


Vector Floating-Point (VFP)
http://scottshulinux.blogspot.com/2010/09/vector-floating-point-vfp.html


ARM VFP的一点体会
http://linux.chinaunix.net/bbs/viewthread.php?tid=1125926

VFP11 ™ VectorFloating-point Coprocessor Technical Reference Manual for ARM1136JF-S processorr1p5
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0274h/index.html

Documentation / arm / VFP / release-notes.txt
http://www.mjmwired.net/kernel/Documentation/arm/VFP/release-notes.txt

SoftFloat
http://www.jhauser.us/arithmetic/SoftFloat.html

TestFloat
http://www.jhauser.us/arithmetic/TestFloat.html

ARM11 VFP
http://blog.richliu.com/2010/03/22/890/


Floating point on ARM machines and Octave errors
http://people.bath.ac.uk/enpsgp/floating_point.html

paranoia
http://www.netlib.org/paranoia/

2010年11月29日 星期一

2010年11月16日 星期二

error: conflicting types for getline/parseline

mini_httpd

htpasswd.c:52: error: conflicting types for 'getline'
/buildroot-2010.05/arm-none-linux-gnueabi/libc/usr/include/stdio.h:651: note: previous declaration of 'getline' was here


Compiling Apache from source on Ubuntu 9.10 (Karmic Koala)
http://blog.tty.nl/2009/11/11/compiling-apache-from-source-on-ubuntu-9-10-karmic-koala/

The Perfect Server - Fedora 11 x86_64 [ISPConfig 2] - Page 5: 16 ISPConfig
http://www.howtoforge.com/perfect-server-fedora-11-x86_64-ispconfig-2-p5

Build of Apache 1.3.41 fails on Fedora 12
http://fedoraforum.org/forum/showthread.php?t=238170

Fixed:
1. vi /buildroot-2010.05/arm-none-linux-gnueabi/libc/usr/include/stdio.h
2. goto line 651
3. replace getline to parseline
4. after rebuild, remember change it back, or others may fail
xlib_libX11 1.3.2

imLcPrs.c:413: error: conflicting types for 'parseline'
/buildroot-2010.05/arm-none-linux-gnueabi/libc/usr/include/stdio.h:651: note: previous declaration of 'parseline' was here

basename prototype mis-match between libiberty.h and string.h

oprofile-0.9.4

In file included from ../libutil/op_libiberty.h:27,
from op_spu_bfd.cpp:24:
/buildroot-2010.05/output/toolchain/binutils-2.20.1/include/libiberty.h:106: error: new declaration 'char* basename(const char*)'
/buildroot-2010.05/arm-none-linux-gnueabi/libc/usr/include/string.h:601: error: ambiguates old declaration 'const char* basename(const char*)'
make[4]: *** [op_spu_bfd.o] Error 1
make[4]: Leaving directory `/buildroot-2010.05/output/build/oprofile-0.9.4/libutil++'


basename prototype mis-match between libiberty.h and string.h
https://bugzilla.redhat.com/show_bug.cgi?id=487995

Fixed by:
diff --git a/configure.in b/configure.in
index 7ffd735..09384f9 100644
--- a/configure.in
+++ b/configure.in
@@ -100,6 +100,8 @@ AC_CHECK_LIB(popt, poptGetContext,, AC_MSG_ERROR([popt library not found]))

AX_BINUTILS

+AC_CHECK_DECLS([basename], [], [], [[#include <libgen.h>]])
+
# C++ tests

AC_LANG_CPLUSPLUS
--
1.7.0.4

2010年11月14日 星期日

洗鼻器

有用善鼻洗鼻機媽咪.看一下注意一下.....
http://www.babyhome.com.tw/mboard.php?op=d&sID=1445864&bid=37&r=


認識洗鼻器
http://www.entdoctor.com.tw/nose/nasalirrigator/101.html

脈動式洗鼻器

塑膠瓶重力式洗鼻器

手擠壓式洗鼻器

噴霧式洗鼻器



洗鼻機、洗鼻器 心得
http://blog.yam.com/kiss486/article/23405046

洗鼻器
http://blog.roodo.com/foreverfish/archives/2764629.html

洗鼻器好處知多少
http://hk.epochtimes.com/9/5/6/99497.htm

脈動式洗鼻器--使用心得
http://mypaper.pchome.com.tw/chiapinghsu/post/1306315202

Using gmail to send your patches

Using gmail to send your patches
https://git.wiki.kernel.org/index.php/GitTips#Using_gmail_to_send_your_patches

git send-email
http://elinux.org/Git_usage#send-email

git format-patch -s -n -o XXXX YYY..ZZZ
git send-email --to mkl0301@gmail.com XXXX/


git send-mail shows:
Can't locate Net/SMTP/SSL.pm in @INC (@INC contains: /usr/share/perl/5.8.8 /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /usr/libexec/git-core/git-send-email line 1037, <FIN> line 1.
git-send-email misses dependency to libnet-smtp-ssl-perl
https://bugs.launchpad.net/ubuntu/+source/git-core/+bug/272939
libnet-smtp-ssl-perl

http://lists.zerezo.com/git/msg711675.html
msmtp
My Ubuntu 8.04 have msmtp only.


Unable to initialize SMTP properly. Check config and use --smtp-debug. VALUES: server=msmtp encryption=tls hello=localhost.localdomainport=587 at /usr/libexec/git-core/git-send-email line 1069.

In ~/.gitconfig, use:
smtpserver = /usr/bin/msmtp
instead of
smtpserver = msmtp


msmtp: /home/XXX/.msmtprc: must be owned by you
msmtp: /home/XXX/.msmtprc: must have no more than user read/write permissions

chmod ag-rw ~/.msmtprc
chown XXX .msmtprc
(When I was in "sudo -s", owner must be root, but in user XXX directory.)

2010年11月11日 星期四

Linux defconfig reduction

make savedefconfig; mv defconfig arch/arm/configs/lala_defconfig

2010年11月10日 星期三

mount XFS 64KB block size cause "Function not implemented"

mount xfs with 64kb blocksize...
http://www.groupsrv.com/linux/about161614.html

Re: mount: Function not implemented?
http://oss.sgi.com/archives/xfs/2004-07/msg00524.html

Not on linux, it can only do filesystem blocksize upto pagesize.
So on ia32 it maxes out at 4K.

XFS: A high-performance journaling filesystem
http://oss.sgi.com/projects/xfs/

Filesystem Block Size

The minimum filesystem block size is 512 bytes. The maximum filesystem block size is the page size of the kernel, which is 4K on x86 architecture and is set as a kernel compile option on the IA64 architecture (up to 64 kilobyte pages). So, XFS supports filesystem block sizes up to 64 kilobytes (from 512 bytes, in powers of 2), when the kernel page size allows it.

Sending patch to community

  1. use Linus tree (most prefer)
  2. sparse check
    make C=1 (check compiled files)
    make C=2 (check all files)
  3. git format-patch -s -n --subject-prefix="PATCH v3" -o XXX commitA..commitB
  4. scripts/checkpatch.pl XXX/*
  5. write a brief [PATCH v3 0/X] XX (copy a patch content, and modified it as 0/XX), add result of following command to the end of the file. Add the based linux tree (e.g. linux-2.6.37-rc2)
    git shortlog commitA..commitB
    git diff --stat --summary commitA..commitB
  6. select lists/maintainers to send to.
  7. Send to yourself first. If no problem, send to all then.
    git send-email --to A --to B XXX


arm-linux: Mailing Lists - FAQ
http://www.arm.linux.org.uk/mailinglists/faq.php

Patch State
http://www.arm.linux.org.uk/developer/patches/

Guide to ARMLinux: Making your own patches
http://www.aleph1.co.uk/oldsite/armlinux/book/x1699.html

TI Davinci: Patch upstream sending
http://processors.wiki.ti.com/index.php/Patch_upstream_sending

Re: [GIT PULL] generic arm for MSM
http://www.spinics.net/lists/arm-kernel/msg85062.html
Never base your tree on linux-next. You really should use a stable tree, such as Linus' tree. The linux-next tree is constantly thrown away and rebuilt, and your own tree will keep a reference on that obsoleted linux-next version otherwise.

http://www.spinics.net/lists/arm-kernel/msg85110.html
As people have said you should *never* send any pull requests based on-next, it's a constantly rebasing merge of various development trees ofvarying quality and so will never be merged into mainline. If you aresending stuff based on -next for some reason send it as a patches.


Documentation/sparse.txt
http://www.mjmwired.net/kernel/Documentation/sparse.txt

2010年11月9日 星期二

Error: too many positional arguments

enable DEBUG in head.S cause:

arch/arm/boot/compressed/head.S: Assembler messages:
arch/arm/boot/compressed/head.S:1019: Error: too many positional arguments
arch/arm/boot/compressed/head.S:1036: Error: too many positional arguments

Fixed by:
diff --git a/arch/arm/mach-cns3xxx/include/mach/debug-macro.S b/arch/arm/mach-cns3xxx/include/mach/debug-macro.S
index d16ce7e..263cf6f 100644
--- a/arch/arm/mach-cns3xxx/include/mach/debug-macro.S
+++ b/arch/arm/mach-cns3xxx/include/mach/debug-macro.S
@@ -10,7 +10,7 @@
* published by the Free Software Foundation.
*/

- .macro addruart,rx
+ .macro addruart,rx, rtmp
mrc p15, 0, \rx, c1, c0
tst \rx, #1 @ MMU enabled?
moveq \rx, #0x10000000


ARM: SAMSUNG: Fixup commit 4e6d488af37980d224cbf298224db6173673f362
http://kerneltrap.org/mailarchive/git-commits-head/2010/3/19/30452

2010年11月8日 星期一

screen

screen -ls
screen -r <pid>


screen
http://tavi.debian.org.tw/index.php?page=screen

Linux Screen指令 @ 複雜的人生,複雜的自己。 :: 痞客邦 PIXNET ::
http://lagunawang.pixnet.net/blog/post/2836825-linux-screen%E6%8C%87%E4%BB%A4

C-a c 或 C-a C-c 開啟新的視窗,並同時切換到這個新的視窗
C-a n 或 C-a C-n 或 C-a (space) 切換到下一個視窗(0->1 1->2 ...)


Booting CNS3420 EVB

linux-2.6.36(use ARM's instead of vanilla kernel, or you see SD card issue described bellow)
cns3420vb_defconfig
use CodeSourcery's Sourcery G++ Lite 2009q1-203 for ARM GNU/Linux
http://www.codesourcery.com/sgpp/lite/arm/portal/release858

Re: Booting CNS3420 EVB v 1.3 failed with 2.6.36 (and 2.6.35)
http://permalink.gmane.org/gmane.linux.ports.arm.kernel/94998

So, you need to build the kernel with the following command:
make LOADADDR=0x200000 uImage
And boot with these commands:
setenv machid ad8
setenv bootargs console=ttyS0,38400 ip=on
tftp 100000 uImage
bootm 100000


Only uImage can boot, bootpImage won't.Both uImage and bootpImage can boot. It works too with "ubootpImage" (uImage form of bootpImage).
(2011.03.20: bootpImage do boot in 2.6.38!!. I did nothing, not even the CONFIG_CMDLINE, which have root=/dev/mmcblk0p1, while no SD inserted.)

u-boot "go" command doesn't pass machid on r1, so "go" won't work.

Default config uses /dev/mmcblk0p1 as rootfs.


With Cavium SDK's kernel, only bootpImage can boot, while uImage cannot, no matter with machid or not.(ok after v1.1)

parameter given by bootargs in u-boot doesn't take effect in kernel.
  1. kernel config CONFIG_CMDLINE_FORCE is not set,
  2. u-boot config CONFIG_CMDLINE_TAG, CONFIG_SETUP_MEMORY_TAGS, CONFIG_MISC_INIT_R is enabled
  3. in kernel mach code, MACHINE_START section do contain BOOT_PARAMS, and correct.

從 u-boot傳bootargs給kernel
http://mkl-note.blogspot.com/2008/06/u-bootbootargskernel.html

It seems the CNS3XXX MMC driver(CONFIG_MMC_SDHCI_CNS3XXX) is not enabled by default. Even if it is enabled, using MMC as rootfs would cause crash:
mice: PS/2 mouse device common for all mice
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
mmc0: SDHCI controller on platform [platform] using PIO
Waiting for root device /dev/mmcblk0p2...
mmc0: Minimum clock frequency too high for identification mode
mmc0: new high speed SDHC card at address d629
mmcblk0: mmc0:d629 SD08G 7.40 GiB
mmcblk0: p1 p2
VFS: Mounted root (ext2 filesystem) readonly on device 179:2.
Freeing init memory: 96K
Kernel panic - not syncing: Attempted to kill init!
Backtrace:
[<c0024860>] (dump_backtrace+0x0/0x114) from [<c016cc70>] (dump_stack+0x18/0x1c)
r7:c7815bc0 r6:c7815bc0 r5:c7819ee0 r4:c01f6510
[<c016cc58>] (dump_stack+0x0/0x1c) from [<c016ccd4>] (panic+0x60/0x17c)
[<c016cc74>] (panic+0x0/0x17c) from [<c0032ba4>] (do_exit+0x7c/0x5b4)
r3:c01ec260 r2:c7819e40 r1:c7815cbc r0:c01bd3af
[<c0032b28>] (do_exit+0x0/0x5b4) from [<c0033160>] (do_group_exit+0x84/0xb8)
[<c00330dc>] (do_group_exit+0x0/0xb8) from [<c003dcdc>] (get_signal_to_deliver+0x2b8/0x2e8)
r5:c7819ee0 r4:0000000b
[<c003da24>] (get_signal_to_deliver+0x0/0x2e8) from [<c0023804>] (do_notify_resume+0x64/0x628)
[<c00237a0>] (do_notify_resume+0x0/0x628) from [<c0020e98>] (work_pending+0x24/0x28)
I disabled L1 cache, and everything works fine. It seems there is cache cocherency issue on SD driver for 2.6.36 vanilla kernel.

This is fixed by Catalin's cache maintenance changes:
Catalin Marinas (5):
ARM: Allow lazy cache flushing via PG_arch_1 for highmem pages
ARM: Assume new page cache pages have dirty D-cache
ARM: Introduce __sync_icache_dcache() for VIPT caches
ARM: Use lazy cache flushing on ARMv7 SMP systems
ARM: Remove superfluous flush_kernel_dcache_page()
in ARM's tree git://linux-arm.org/linux-2.6.git

2010年11月6日 星期六

u-boot/Linux booting machid

(u-boot)/include/asm-arm/mach-types.h

#define MACH_TYPE_IMX27IPCAM 1871
#define MACH_TYPE_NEMOC 1872
#define MACH_TYPE_GENEVA 1873
#define MACH_TYPE_VEGA 2776


(u-boot)/lib_arm/bootm.c: do_bootm_linux

linux内核启动过程——基于S3C2410(1)zImage自解压
http://os.it168.com/a2009/0610/993/000000993984.shtml

[原创] linux启动流程分析(1)---bootloader启动内核过程
http://www.eetop.cn/blog/html/45/11145-560.html

[原创] linux启动流程分析(2)---内核启动地址的确定
http://www.eetop.cn/blog/html/45/11145-562.html

ARM Linux Kernel Boot Requirements
http://www.arm.linux.org.uk/developer/booting.php

(linux)/arch/arm/tools/mach-types
ttc_vision2 MACH_TTC_VISION2 TTC_VISION2 2775
cns3420vb MACH_CNS3420VB CNS3420VB 2776
lpc2 MACH_LPC2 LPC2 2777


(linux)/arch/arm/kernel/head-common.S: lookup_machine_type

linux内核启动之lookup_machine_type
http://blog.chinaunix.net/u2/73067/showart_2229056.html
例子分享:
我现在移植的一个板子,是不带mmu的,刚开始怎么都启动不起来,打印出“done, booting the kernel",然后就无声无息了。后来在Kernel startup entry point开始处的ENTRY(stext)下添加了句代码:”ldr r1, =machine_arch_type“就很顺利得起来了.后来分析知道,添加这句代码后就不会进行平台的匹配了!但是启动以后也是正常的!不知道此处平台匹配的真正意义是什么,还需要与有经验的朋友共同探讨。


linux板级设备的初始化过程
http://hi.baidu.com/rwen2012/blog/item/4163bb033273b88bd43f7cbc.html

第9章 内核调试技术
http://mcuol.com/download/upfile/armLinuxEMB09.pdf

2010年11月4日 星期四

Debugging Linux before start_kernel

Kernel Debugging Tips
http://elinux.org/Kernel_Debugging_Tips
Kernel Debugging Tips: Accessing the printk buffer after a silent hang on boot
http://elinux.org/Kernel_Debugging_Tips#Accessing_the_printk_buffer_after_a_silent_hang_on_boot
Kernel Debugging Tips: Compilation tricks for the kernel
http://elinux.org/Kernel_Debugging_Tips#Compilation_tricks_for_the_kernel

Linux startup process
http://en.wikipedia.org/wiki/Linux_startup_process#Kernel_phase

1.3 linux/arch/arm/boot/compressed/head.S
http://amitshah.bizhat.com/arm/arm_linux_boot-1.html#ss1.3

Booting the Kernel
http://www.linux.it/~rubini/docs/boot/boot.html

The Linux BootPrompt-HowTo
http://tldp.org/HOWTO/BootPrompt-HOWTO.html#toc3


FreeBSD Developers' Handbook: Chapter 10 Kernel Debugging
http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug.html

[ETRADE] Stress Test Event Descriptions

Stress Test Event Descriptions
https://etrade.wb.riskmetrics.com/apollo/Command/EventDescriptions?event=sep11

Stress Test Event Descriptions

September 11th
September 11, 2001 Two hijacked passenger jets crash into the twin towers of the World Trade Center in New York. The impact of the crashes triggers the collapse of both towers. A third hijacked plane crashes into the Pentagon in Washington, and a fourth possibly heading for the White House, is diverted by passengers and crashes 20 miles south of Pittsburgh.
September 11, 2001 The world watches the horrific sequence of events. Within hours, President George Bush places all United States armed forces on worldwide alert after a shell-shocked nation sustained its worst attack since Pearl Harbor.
September 11, 2001 Financial markets plunge in Europe and Latin America before trading is halted. American markets do not open and will remain closed until Sept 17th; it will be first time the New York Stock Exchange remained closed for two full days since the Great Depression. Stocks fall 4.6 percent in Spain and 8.5 percent in Germany; price of Brent crude oil for November delivery jumps to $28.87 per barrel, up $1.50; price of gold at afternoon fixing in London rises $15.50, to $287 per ounce; US dollar is weak against major currency, falling to 119.20 yen from 121.04; euro rises to 91.5 cents from 89.8 cents, and strengthens against Latin American currencies.
September 12, 2001 Economists fear the economic paralysis caused by the terrorist attacks on New York and Washington could tip the vulnerable US economy into recession over the next six months and drag the rest of the world down with it. Stock markets in Europe and Latin America continue to fall sharply after attacks; dollar falls against yen and euro; oil and gold prices continue to surge. Tokyo's Benchmark Stock Average plunged 6.63% to 9610.10, which was the lowest since December 1983, and the eighth largest percentage decline ever. In Taiwan stocks, the Benchmark Weighted Index opened down 274 pts (-6.56%) after a one-day suspension.
September 17, 2001 In one of the most anticipated trading days in stock market history the US markets reopen. The US Federal Reserve and the European Central Bank both cut interest rates by 0.5% to head off recession. Large financial institutions become sellers and the Dow plunges 7.1% (684 pts) to 8920.70. The S&P 500 had its worst finish since October 1998, down 53.81 pts (4.9%). The New York Stock Exchange records its busiest day ever with over 2.3 billion shares traded.
September 17, 2001 Asian markets closed with heavy losses amid fears of military conflict as the US readies for an attack on Afghanistan and worries of global recession. Japan's Nikkei fell 5.04% to its lowest level since December 1983. Korea's KOSPI index dropped 2.8%. Airline and insurance stocks led the retreat. Even Chinese investors, who normally ignore outside events were gripped by uncertainty after the attacks on the US. The Shanghai B share index tumbled over 6%.
September 18, 2001 The Bank of England and Japan's central bank cut rates as part of a coordinated campaign to boost confidence, following similar moves by the US Federal Reserve and the European Central Bank. But with fears of a global recession growing, investors remain despondent. European markets all head lower, with the FTSE falling almost 100 points to 4,800. Paris was down 2.09%, while Frankfurt was off 1.48%.
September 18, 2001 After an initial bounce, US markets quickly lose ground falling 43 points. This slip, combined with the previous day's 600-point plunge and the Dow officially enters a bear market, defined as a 20% fall from market highs.

Tech-Wreck
March 2000 The NASDAQ Composite reaches an all-time intra-day high of 5,132. The Composite is up a whopping 78% from November 1999, all in the midst of a higher interest rate environment.
March 21 The NASDAQ 100 tracking stock, QQQ, is the third most heavily traded stock in the US with 33 million shares changing hands. This marks the first time in history that a stock linked to the performance of an index trades this actively, a prime indication of the prevalent steroid enhanced demand for technology stocks. The Fed tightens by another 25bps, which represents the fifth move in less than a year.
April 3 Judge Thomas Jackson delivers his much-anticipated ruling in the Microsoft anti-trust case. Although no one is certain what the implications or ramifications the ruling might bring, everyone knows that it's very important. The NASDAQ falls.
April 4 Both the Dow and the NASDAQ drop roughly 500 points in intra-day trading but rebound to finish the day with only modest losses. However, this will mark the beginning of a very volatile 2-month period, with the suffering the brunt of selling. The NASDAQ will be down 39% from its peak at one point.
April 2000 Headline CPI for March registers at 0.8% following February's 0.6%. This is higher than anticipated and fuels inflationary concerns. The high use of margin is cited as a factor for the swift and steep decline in equity prices.
May - June 2000 Equity markets begin to claw back as economic reports show signs of slowing and inflation indicators come back in line with consensus. The markets begin to increasingly sense that the Fed may be through raising rates.

Russian Crisis & Long-Term Capital
June 1998 IMF Director, Mchel Camdessus assures the world's financial markets that there is no reason to panic about Russia. 'Contrary to what markets and commentators are imagining,' Camdessus insists, ' this not a crisis.'
June 1998 Russian credit spreads widen further, yielding more than comparable Nigerian bonds. Russians express concern that reserves may fall below $12 billion, less than half a year ago, if a meaningful credit facility is not extended.
Mid-July 1998 the IMF announces a $17 billion bailout fund, to be distributed over 18 months. Officials hope that the package will buy the Russians time.
August 17 Russia announces a wider trading band on the rouble and a moratorium on GKOs (Russian treasury bills), effectively devaluing and defaulting simultaneously. Russia indicates that it plans to devalue by 30%.
August 26 Stanley Druckenmiller of Soros' Quantum Fund admits to losses of about $2 billion as a result of the Russian devaluation. Credit Suisse First Boston states that profits have shrunk by $250 million in 2 months.
August 27 The rouble trades at R13/$ in the offshore market, representing a 50% devaluation. The government fixes the official rate at R7.86/$. Reserves have reportedly dipped below $13 billion.
September 1998 International capital markets are in a state of panic. Equities plunge, at one point, the S&P 500 is down by 21% and the NASDAQ by 25% from its peak in July. US Treasuries rally. The 30-year bond yield falls to almost 4.5%. Credit spreads, including swap spreads, blow out causing widespread losses in the financial markets. Fearing global repercussions of a Long-term Capital Management (a large hedge fund speculating in highly leveraged transactions) collapse, a consortium of banks infuse the troubled hedge fund with a $3.5 billion rescue package. Other firms are reportedly in similar trouble.
September 1998 The Fed cuts rates 3 times in the fall to inject liquidity into the financial markets. Equity markets remarkably bounce back by year's end.

Asian Currency Crisis
January 1997 Hanbo Steel, a Korean conglomerate, collapses under $6 billion in debt the first sign of increasing economic difficulties that will engulf the region in the months ahead.
March 10 Thai authorities commit to purchasing $3.9 billion in bad property loans from financial institutions but fail to follow through with promises. IMF Director Michel Camdessus suggests that this crisis has no reason to develop further.
May 26 Local conditions deteriorate in Thailand and equity prices continue to slide as the central bank fails to cut interest rates as planned. The baht is hit by massive speculation. Speculation spills over to the Philippines, forcing the central bank to raise overnight rates to 13%.
June 1997 Thai PM Chavalit Yongchaiyudh states, "We will never devalue the baht", even as stocks slide to an 8-year low. The central bank announces its intent to tighten currency controls, restricting the flow of funds. Finance minister Amnuay Viravan resigns.
July 2 Thai authorities announce a managed float of the baht, equities surge in local market terms. The baht weakens by 20%, beginning a contagion effect. The Philippine central bank steps in the markets to defend the peso.
July 11 The baht touches record lows against the US dollar. The Philippine peso is freed to float in a wider band.
July 1997 The Malaysian ringgit begins to collapse, prompting the government to raise interest rates further. Ultimately, authorities abandon its defense of the ringgit, and the currency sinks to a 38-month low.
August 14 Indonesia also gives up its defense of the rupiah. The currency sinks 20%.
August 15-21 Hong Kong rates soar to above 9% causing property share prices to crash.
August 1997 The Malaysian government, in an attempt to discourage short selling, restricts trading in all 100 stocks that comprise the Kuala Lumpur Composite. PM Mohammed blames the crisis on George Soros, calling him a moron.
August 1997 The IMF approves another $3.9 billion credit facility for Thailand, bringing total commitments to $16.7 billion.
September 1997 Korean automaker, the KIA Group, halts debt payments putting in jeopardy $10 billion worth of loans. KIA requests the courts to mediate in order to seek protection from creditors. Meanwhile, in Indonesia, authorities decide to halt projects totaling R39 trillion in order to stem the budget shortfall.
October 1997 Hong Kong Chief Executive Tung Chee-hwa promises to keep the Hong Kong dollar pegged to the US dollar. Moody's cuts Thailand's sovereign credit rating for the third time in 1997. Malaysian PM Mohammed imposes a total ban on F/X trading. The ringgit falls 4%.
October 31 The IMF extends Indonesia a $23 billion support package.
November 1997 The Korean won comes under increasing pressure as the Japanese yen weakens vis-à-vis the US dollar. Korean equities slide and international reserves dwindle.
November 17 Korea halts intervention in the currency market, sending the won through the psychological threshold of W1,000/US$.
December 1997 As regional currencies are pushed to recent lows against the US dollar, a record IMF-led bailout package of $57 billion for Korea is announced. This stems the tide temporarily but currencies soon resume a downward spiral. Usable reserves in Korea have reportedly dwindled to $6 billion. Three Asian countries see their sovereign debt rating fall to junk status. Liquidity in the markets remains thin.
December 26 The Korean won rallies from W1,836 to W1,400 as the first installment of a $60 billion multilateral credit facility is distributed. The worst is considered to be over.

The Tequila Crisis
November 1994 Mexico makes final preparations for presidential elections. International reserves presumably stand at $17 billion but the growing current account deficit looms.
December 1 Ernesto Zedillo Ponce de Leon is sworn in as Mexico's new president. Reserves are reported at $14 billion.
December 9 Mexican Finance Minister Jaime Serra Puche publicly announces that the Mexican currency will not be devalued amid growing concern of the current account deficit.
December 19 Finance Minister Serra informs President Zedillo that jittery Mexicans are moving money out of the country at an increasingly alarming rate. Capital flight is characterized by "hot money". In fact, Mexico sees more than $1 billion leave the country in a single day. International reserves are significantly below earlier estimates, now at only $6.5 billion. The bolsa plummets.
December 20 Mexican authorities unexpectedly widen the peso trading band to 15%. The peso drops immediately. Renewed uprisings in Chiapas are blamed.
December 21 All limits on the peso are removed, effectively "free floating" the currency. The peso loses over 40% from pre-devaluation levels.
December 24 The markets begin to focus on $58 billion in interest payments coming due in 1995, of which $20 billion will come due in the first 3 months.
December 29 Finance Minister Jaime Serra Puche submits his resignation. Guillermo Ortiz will replace Serra. The bolsa and peso recover on confirmation that the US will package together a rescue fund.
January 3 President Zedillo announces on national television his acceptance of the $18 billion international rescue package, funded largely by the US. The markets are unconvinced that this will be enough. The peso continues to stumble despite higher short-term rates.
January 30 President Clinton confirms a global financial support package totaling $48 billion despite the lack of consensus in Congress. The final package will be closer to $53 billion. The markets react favorably.
March 1995 After a month of respite, new worries mount throughout Latin America. The Mexican peso resumes its fall. Concerns over the banking sector as well the currency peg in Argentina grow. Argentine Finance Minister Domingo Cavallo insists that Argentina's peso will not be devalued.
March 1995 Confidence in the region is slowly restored as banking reforms are announced and global market conditions improve.

Euro Crisis
October 3, 1990 Germany is reunified. Although the German Government resists raising interest rates, the resulting debt burden is so large that an upward movement in interest rates becomes highly likely.
September 1990 The UK joins the Exchange Rate Mechanism (ERM). The driving motivation for the UK's participation is the attractiveness of low interest rates. The low cost of financing is an integral component to stimulate Britain's sluggish economic growth.
February 1992 The Maastricht Treaty is signed, but remains to be ratified. This document sets forth the timetable and conditions for the 12 member nations to converge to a single currency. Unfortunately, Europe's economic activity is far from converging. The UK and several other European states are faced with a deep economic slowdown. Germany, on the other hand, trying to stem inflationary pressures due to a relaxed monetary policy to facilitate reunification, has inched up rates recently. Friction begins to mount.
June 2 The Danes reject the Treaty and tension rises. The French also decide to hold a referendum, scheduled for late September.
July 1992 The Bundesbank raises the discount rate to 8.75%. The French clamor of a possible "no" vote.
August 1992 Sweden decides to enter the European Community. To do so, lending rates are hiked 300bps to 16%.
September 1992 With reserves almost depleted after trying to defend its currency, Finland opts to let the markka float. The currency depreciates 12%. Sweden, a rival exporter, is next targeted. Swedish authorities raise short-term, to 75% on one day, to defend the krona. The Italian lira and British pound are next in line.
September 13 After failing to support the lira, the lira drops by 7% and the Bundesbank announces it will cut the Lombard rate. However, rates are eased less than expected.
September 16 Even after raising interest rates to overnight rate to 12% from 10%, the pound succumbs to selling pressure. The UK and Italy are forced from the ERM.
September 19-20 Group of Seven discussions end with no meaningful resolution on German interest rates. The British make it clear that they will not re-enter the ERM unless the Germans moderate their stance. Meanwhile, the French narrowly agree to the Maastricht Treaty. A single European currency is announced until 1999.

Gulf War Crisis
May 1990 Saddam Hussein labels overproduction of oil by Kuwait and the United Arab Emirates as economic warfare against Iraq.
July 15-17 Iraq accuses Kuwait of stealing oil from the Rumaylah oil field on the Kuwaiti-Iraqi border and warns of military reciprocity.
August 2 Iraqi troops invade Kuwait and seize Kuwaiti oil fields.
August 9 US authorities react quickly, sending troops to Saudi Arabia. The UN declares the Iraqi annexation of Kuwait null and void.
August 12 International forces instigate a naval blockade of Iraq. All shipments of Iraqi oil are halted.
September 1 Airfares predicted to rise as much as 30% due to higher fuel prices as a result of the Gulf War.
The UN sets January 15, 1991 as the deadline for an Iraqi withdrawal from Kuwait. Hussein adamantly rejects all UN resolutions.
January 9 Negotiations between US Secretary of State James Baker and Iraqi Foreign Minister Aziz end in stalemate.
January 12 Congress grants President Bush authority to wage war upon Iraq.
January 17 Operation Desert Storm begins.
January 24 Allied ground campaign begins.
January 25 Iraq begins an environmental war, pumping millions of gallons of crude oil into the Gulf.
February 26 A month's worth of bombings batter Hussein's resolve. Hussein announces Iraq's withdrawal from Kuwait. The Iraqi exodus from Kuwait City results in the Highway of Death.
February 27 Coalition forces enter Kuwait City. President Bush declares Kuwait liberated.

Black Monday
February 1987 The Securities and Exchange Commission (SEC) announces that it is significantly expanding its initial investigation of Ivan Boesky and Drexel Burnham Lambert.
February 13 Prominent investment banker Martin Siegel pleads guilty to a number of tax and securities charges. Siegel pays $9 million in fines and faces up to 10 years in prison.
April 27 The SEC investigation into the practices of Drexel Burnham Lambert now focuses on the West Coast operations of Michael Milken.
April 29 Both the US dollar and Treasuries plummet after the House of Representatives passes an amendment that will attempt to reduce the trade surpluses of many Asian nations. The markets fear that this move will prompt Asian investors to reduce their exposure to US investments.
October 16 Iranian missiles hit a US-flagged tanker off the coast of Kuwait. The yield on the 30-year bond increases to 10.12%, a return on par with average historical returns in the stock market. Treasury Secretary James Baker expresses his concern about the recent dramatic increase in volatility of the stock market.
October 17-18 Nervous investors fret all weekend over deteriorating economic conditions and increasing tensions in the Middle East. With long-term bond yields almost on par with long-term returns in the stock market, stocks look increasingly unattractive.
October 19 At first light, two US warships shell an Iranian oil platform in the Persian Gulf. This is the last straw. The Dow Jones Industrial Average plunges an unprecedented 508 points, wiping 22.6% off the value of the stock market - the worst one-day decline since the start of World War I. On the trading floor, chaos reigns as many traders are flooded with sell orders. Many simply give up trying to sell. Program selling exacerbates depressed conditions. The volume of shares traded hits 604 million, almost twice the prior record of 339 million.
October 19 The Fed injects $2.2 billion of liquidity through open market operations by November 4. Fed Chairman Alan Greenspan reassures the public that the Fed will continue to be a source of liquidity. Fed fund rates are driven down 179bps by month's end.

貨幣ETF, 匯率風險

ETF的貨幣應用(Currency ETFs and FOREX-related ETFs)
http://greenhornfinancefootnote.blogspot.com/2010/03/etfcurrency-etfs-and-forex-related-etfs.html

ETF的貨幣應用續(Currency ETFs and FOREX-related ETFs)
http://greenhornfinancefootnote.blogspot.com/2010/03/etfcurrency-etfs-and-forex-related-etfs_18.html

什麼是利差交易(What is Carry Trade?)
http://greenhornfinancefootnote.blogspot.com/2009/12/what-is-carry-trade.html

資產配置初步—配置中的匯率風險(Asset Allocation in Essence—Exchange Rate Risk of International Asset Allocation)
http://greenhornfinancefootnote.blogspot.com/2008/08/asset-allocation-in-essenceexchange.html

基金的計價幣別
http://greenhornfinancefootnote.blogspot.com/2007/05/blog-post_4090.html

新發的貨幣型ETF (Ticker: DBV), A Currency ETF for the Long/Short Trade: The PowerShares DB G10 Curren
http://www.moneyq.org/forum/index.php?showtopic=11106

外匯投資不再麻煩 貨幣ETF可分散風險 投資簡單
http://bar.cnyes.com/html/100102-1/8CC065E83103AEE.shtml

美元愈來愈弱,怎麼辦?
http://greenhornfinancefootnote.blogspot.com/2007/05/blog-post_9880.html

弱勢美元,誰受損,誰受益? (Winners and Losers with a Weaker US Dollar)
http://greenhornfinancefootnote.blogspot.com/2007/10/winners-and-losers-with-weaker-us.html

外匯避險
http://greenhornfinancefootnote.blogspot.com/2007/05/blog-post_264.html

2010年11月2日 星期二

投資全球的策略

投資全球的策略(一)已開發國家
http://buffettism.blogspot.com/2009/06/blog-post_2008.html

投資全球的策略(二)開發中國家
http://buffettism.blogspot.com/2009/06/blog-post_16.html

投資全球的策略(三)VT or VTI+VGK+VPL+VWO?
http://buffettism.blogspot.com/2009/06/vt-or-vtivgkvplvwo.html

投資全球的策略(四)美、歐、亞、新興在多空市場的走勢
http://buffettism.blogspot.com/2009/07/blog-post_02.html

投資全球的策略(五)怎麼決定投資比例?
http://buffettism.blogspot.com/2009/08/blog-post_621.html

投資全球的策略(六)資產配置的驗證
http://buffettism.blogspot.com/2009/08/blog-post_05.html

投資全球的策略(七)資產配置的驗證-續
http://buffettism.blogspot.com/2009/08/blog-post_12.html

效率前緣使用的注意事項
http://buffettism.blogspot.com/2009/08/blog-post_03.html

債券

債券相關ETF總整理
http://buffettism.blogspot.com/2009/09/etf.html

債券存續期間的重要性
http://buffettism.blogspot.com/2010/04/blog-post_06.html

注意!買美政府債也會慘賠
http://buffettism.blogspot.com/2010/09/blog-post_15.html

投資人是否應該因為預期升息而從債券市場撤退?
http://buffettism.blogspot.com/2010/08/blog-post_24.html

運用ETFs來建構自己的債券投資組合
http://buffettism.blogspot.com/2010/08/etfs.html

貨幣讓資產配置更多元化
http://buffettism.blogspot.com/2010/10/blog-post_3986.html

債券泡沫:小投資者在冒大險?
http://buffettism.blogspot.com/2010/10/blog-post_17.html

2010年10月28日 星期四

綠角 基金成本 相關的 手續費、經理費....與成本的危害

如何查詢基金的總開銷數字(How to Find the Expense Ratio of Mutual Funds)
http://greenhornfinancefootnote.blogspot.com/2010/11/how-to-find-expense-ratio-of-mutual.html

基金成本大解剖(Detailed Analysis of Fund Expenses)
http://greenhornfinancefootnote.blogspot.com/2007/08/detailed-analysis-of-fund-expenses.html

手續費與佣金只是總成本之一(Fees and Commissions Are Only Part of Total Costs)
http://greenhornfinancefootnote.blogspot.com/2010/05/fees-and-commissions-are-only-part-of.html

經理費不等於總開銷
http://greenhornfinancefootnote.blogspot.com/2007/08/blog-post.html

如何將別人的資產轉到自己名下(License to Steal)
http://greenhornfinancefootnote.blogspot.com/2007/11/license-to-steal.html

常見的投資謬思---賺小錢才要注重成本(For Every Investor, Cost Matters.)
http://greenhornfinancefootnote.blogspot.com/2008/08/for-every-investor-cost-matters.html

常見的投資謬思---長期與短期投資的分別(Holding Period vs Investment Time Horizon)
http://greenhornfinancefootnote.blogspot.com/2008/07/holding-period-vs-investment-time.html

付出愈少,拿得愈多(付出愈多,拿得愈少)(The More You Pay, The Less You Get)
http://greenhornfinancefootnote.blogspot.com/2008/07/more-you-pay-less-you-get.html

常見的投資謬思總目錄
http://greenhornfinancefootnote.blogspot.com/2008/08/blog-post.html

資產配置初步(Asset Allocation in Essence)總目錄
http://greenhornfinancefootnote.blogspot.com/2008/07/asset-allocation-in-essence.html

2010年10月21日 星期四

Find ioremapped virtual addr by /proc/vmallocinfo

Documentation/filesystems/proc.txt

vmallocinfo:

Provides information about vmalloced/vmaped areas. One line per area, containing the virtual address range of the area, size in bytes, caller information of the creator, and optional information depending on the kind of area :

pages=nr number of pages
phys=addr if a physical address was specified
ioremap I/O mapping (ioremap() and friends)
vmalloc vmalloc() area
vmap vmap()ed pages
user VM_USERMAP area
vpages buffer for pages pointers was vmalloced (huge area)
N=nr (Only on NUMA kernels)
Number of pages allocated on memory node

> cat /proc/vmallocinfo
0xffffc20000000000-0xffffc20000201000 2101248 alloc_large_system_hash+0x204 ...
/0x2c0 pages=512 vmalloc N0=128 N1=128 N2=128 N3=128
0xffffc20000201000-0xffffc20000302000 1052672 alloc_large_system_hash+0x204 ...
/0x2c0 pages=256 vmalloc N0=64 N1=64 N2=64 N3=64
0xffffc20000302000-0xffffc20000304000 8192 acpi_tb_verify_table+0x21/0x4f...
phys=7fee8000 ioremap
0xffffc20000304000-0xffffc20000307000 12288 acpi_tb_verify_table+0x21/0x4f...
phys=7fee7000 ioremap
0xffffc2000031d000-0xffffc2000031f000 8192 init_vdso_vars+0x112/0x210
0xffffc2000031f000-0xffffc2000032b000 49152 cramfs_uncompress_init+0x2e ...
/0x80 pages=11 vmalloc N0=3 N1=3 N2=2 N3=3
0xffffc2000033a000-0xffffc2000033d000 12288 sys_swapon+0x640/0xac0 ...
pages=2 vmalloc N1=2
0xffffc20000347000-0xffffc2000034c000 20480 xt_alloc_table_info+0xfe ...
/0x130 [x_tables] pages=4 vmalloc N0=4
0xffffffffa0000000-0xffffffffa000f000 61440 sys_init_module+0xc27/0x1d00 ...
pages=14 vmalloc N2=14
0xffffffffa000f000-0xffffffffa0014000 20480 sys_init_module+0xc27/0x1d00 ...
pages=4 vmalloc N1=4
0xffffffffa0014000-0xffffffffa0017000 12288 sys_init_module+0xc27/0x1d00 ...
pages=2 vmalloc N1=2
0xffffffffa0017000-0xffffffffa0022000 45056 sys_init_module+0xc27/0x1d00 ...
pages=10 vmalloc N0=10


0xbf000000-0xbf002000 8192 load_module+0x518/0x123c pages=1 vmalloc
0xbf006000-0xbf00b000 20480 load_module+0x518/0x123c pages=4 vmalloc
0xbf00f000-0xbf012000 12288 load_module+0x518/0x123c pages=2 vmalloc
0xbf016000-0xbf01b000 20480 load_module+0x518/0x123c pages=4 vmalloc
0xbf01f000-0xbf021000 8192 load_module+0x518/0x123c pages=1 vmalloc
0xd080b000-0xd0817000 49152 cramfs_uncompress_init+0x2c/0x6c pages=11 vmalloc
0xd0818000-0xd085b000 274432 jffs2_zlib_init+0xc/0xa8 pages=66 vmalloc
0xd085c000-0xd0868000 49152 jffs2_zlib_init+0x38/0xa8 pages=11 vmalloc
0xd087a000-0xd087c000 8192 __arm_ioremap_pfn+0x5c/0x160 ioremap
0xd0888000-0xd088a000 8192 __arm_ioremap_pfn+0x5c/0x160 ioremap
0xd1000000-0xd9001000 134221824 __arm_ioremap_pfn+0x5c/0x160 ioremap

2010年10月20日 星期三

git log --stat --oneline --no-merges

http://lkml.org/lkml/2010/10/6/406


Git hint of the day: do
git log --stat --oneline --no-merges v2.6.36-rc6..v2.6.36-rc7
to get a dense view of the commits and visually pick out the ones
that aren't trivial one-liners

2010年10月19日 星期二

2010年10月18日 星期一

Android Development

Android 淺探 (一), 2010
http://mmdays.com/2010/08/27/android-1/

DiveIntoAndroid
深入淺出 Android -- Google 手持設備應用程式設計入門
http://code.google.com/p/androidbmi/wiki/DiveIntoAndroid



Ubuntu 8.04, eclipse 3.2.2

apt-get install eclipse openjdk-6-jdk

Download the ADT Zip File
http://developer.android.com/sdk/adt_download.html

[Help] -> [Software Updates] -> [Find and Install] -> [Search for new features to install]
  1. use already downloaded ADT: [New Local Site] -> (selet the path of the file)
  2. download the file online: [New Remote Site] -> (Name: ADT; Location: http://dl-ssl.google.com/android/eclipse/site.xml)
(select ADT, and the other two (Callisto Discovery Site, The Eclipse Project Updates)) -> [Finish] -> [Update Site Mirrors: chosse a site] -> [OK]
(Select ADT, if dependency error exist, select [Select Required])

[Window] -> [Preferences] -> [Android] -> (provide the path of the Android SDK) -> [Apply]
(error: An internal error occurred during: "Android SDK Content Loader")

[Window] -> [Android SDK and AVD Manager]

Andriod 筆記(Run Application, build Image)
http://blog.richliu.com/2009/01/09/681/

Android & Eclipse 開發環境 - 第一次安裝筆記
http://changyy.pixnet.net/blog/post/24081323

Android 開發環境安裝、設置 與 開發
http://plog.longwin.com.tw/my_note/2010/10/01/android-devel-env-install-2010

Android - A beginner's guide
http://www.codeproject.com/KB/android/AndroidGuide.aspx

Introduction to Android Development
http://mobile.tutsplus.com/tutorials/android/introduction-to-android-development/


Python for Android (ASE: Android Scripting)
http://plog.longwin.com.tw/news-technology/2010/07/19/python-for-android-ase-script-2010

2010年10月16日 星期六

Google DevFest 2010

Google DevFest 2010
https://sites.google.com/site/devfestapac/taipei/sessions

Introduction to Google Maps API *

Speaker: Bill Luan
This is a session to introduce Google Maps API technologies. Topics covered in this session include the history and vision of Google Maps and Maps API, Google Maps API technologies fundamentals, application development using Google Maps API with JavaScript, as well as geo-doing, LBC, advertisement opportunities using Google Maps, and showcases of some featured web sites around the world using Google Maps API for business innovations. A brief introduction of migrating to Maps API 3 will also be covered.


* Session will be given in Mandarin.

Lab Sessions

All attendees are expected to have their own laptop computers and power supplies to participate in the lab sessions. For all lab sessions, check pre-requisites. Lab sessions will take place in the classrooms outside the auditorium. Note that the Android lab sessions also include some lecture material that goes deeper into a specific topic. All seating is first come, first served and availability is not guaranteed.

For help with Android pre-requisites, see below:



  • Google_Maps_API_Intro_English_TW_DevFest_BillLuan.pdf - on Oct 12, 2010 8:33 AM by Stephanie Liu (version 1)
    2542k View Download

2010年10月9日 星期六

Android Basics and Image Updating

黑客前的必備知識
http://wiki.cheyingwu.tw/Android/Hack-area/Introduction-hacking

工程模式
http://wiki.cheyingwu.tw/Android/Hack-area/Engineering-Bootloader-and-fastboot

各機種進入 Recovery 模式及 Fastboot 模式的方法
http://wiki.cheyingwu.tw/Android/Hack-area/Devices-into-Fastboot-and-Recovery-model

HTC
Dream/T-Mobile G1/Android Dev Phone 1 (ADP1)
* Revocery Model
o Home + Power
* Fastboot
o Camera + Power


Recovery-utility (以「recovery utility」的方法更新系統。)
http://wiki.cheyingwu.tw/Android/Hack-area/Recovery-utility

擷取 Android 手機畫面 - 下載並安裝 Android SDK
http://wiki.cheyingwu.tw/Android/Get-screenshot-on-andrioid
Download the Android SDK
http://developer.android.com/sdk/index.html

ADP1-to-Android-1.1
http://wiki.cheyingwu.tw/Android/Archive/ADP1-to-Android-1.1
Flashing your Android Dev Phone with a Factory System Image
http://developer.htc.com/adp.html



[wiki] Android - Update history
http://en.wikipedia.org/wiki/Android_%28operating_system%29#Update_history


Setting up a Device for Development
http://developer.android.com/guide/developing/device.html#setting-up
If you're developing on Ubuntu Linux, you need to add a rules file that contains a USB configuration for each type of device you want to use for development. Each device manufacturer uses a different vendor ID. The example rules files below show how to add an entry for a single vendor ID (the HTC vendor ID). In order to support more devices, you will need additional lines of the same format that provide a different value for the SYSFS{idVendor} property. For other IDs, see the table of USB Vendor IDs, below.
  1. Log in as root and create this file: /etc/udev/rules.d/51-android.rules.

    For Gusty/Hardy, edit the file to read:
    SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"

    For Dapper, edit the file to read:
    SUBSYSTEM=="usb_device", SYSFS{idVendor}=="0bb4", MODE="0666"

  2. Now execute:
    chmod a+r /etc/udev/rules.d/51-android.rules



[wiki] CyanogenMod
http://en.wikipedia.org/wiki/CyanogenMod

CyanogenMod Wiki
http://wiki.cyanogenmod.com/index.php?title=Main_Page

The Rom Bible
http://forum.xda-developers.com/showthread.php?t=668090

[Recovery] [15-May-2010] RA-dream-v1.7.0 (also for the Rogers Dream)
http://forum.xda-developers.com/showthread.php?t=566669


SPL
http://code.google.com/p/android-roms/wiki/SPL

[HOW-TO] Haykuro SPL, Danger SPL, Death SPL FOR DREAM/G1
http://forum.xda-developers.com/showthread.php?t=625886

android-roms: label:SPL
http://code.google.com/p/android-roms/downloads/list?q=label:SPL


[Radio] Radio Image update 2.22.23.02
http://forum.xda-developers.com/showthread.php?t=640535



sapphire-port-dream
This page is for Haykuro's custom ROMS for the G1.
http://code.google.com/p/sapphire-port-dream/

2010年9月3日 星期五

大盤會卡鍊條



每次卡鍊都卡在白色標記處




這裡鍊條沒卡好,不知道有沒有關係


2010年9月2日 星期四

Terminator

http://go-linux.blogspot.com/2010/09/terminator_01.html

Ctrl-Shift-E: 新增terminal並垂直切割
Ctrl-Shift-O: 新增terminal並水平切割
Ctrl-Shift-P: 回到上一個terminal
Ctrl-Shift-N: 至下一個terminal
Ctrl-Shift-W: 關閉目前的terminal
Ctrl-Shift-Q: 結束terminator
F11: 全螢幕顯示

Ubuntu 8.04上的是0.8.1-1, 只要新增terminal就會爛掉, 一整個無言
不過到了10.04上的是0.93-0ubuntu1, function 都正常, 還不錯用

2010年9月1日 星期三

git difftool: use meld to view diff

git config diff.tool meld
git difftool path/to/the/file

2010年8月30日 星期一

git bisect

git bisect start

# Mark current commit as bad
git bisect bad

git bisect good some-commit-here

git bisect good / bad

git bisect reset

Git bisect – the awesome way to find the Mr. Bug commit
http://ivanz.com/2009/03/27/git-bisect-the-awesome-way-to-find-the-mr-bug-commit/

2010年8月18日 星期三

Cutting git history

Re: Cutting history
http://www.spinics.net/lists/git/msg134997.html

Thiago Macieira on #git provided the answer. You can do that with
grafts and git filter-branch. E.g. rewriting the history so that you
only have the 7 latest commits:

git rev-list HEAD | sed '7q;d' > .git/info/grafts &&
test -s .git/info/grafts &&
git filter-branch -f HEAD

2010年8月10日 星期二

undefined reference to `pcap_parse'

Re: [Wireshark-users] Compilation problems with CVS libpcap
http://www.mail-archive.com/wireshark-users@wireshark.org/msg04062.html

nm -po /usr/local/lib/libpcap.a | egrep pcap_parse


http://www.mail-archive.com/wireshark-users@wireshark.org/msg04063.html
nm prints:

/usr/local/lib/libpcap.a:gencode.o: U pcap_parse

http://www.mail-archive.com/wireshark-users@wireshark.org/msg04064.html
It means that the symbol is undefined, and there's a reference to it
from the file "grammar.o" in the library.

nm -po /usr/local/lib/libpcap.a | egrep grammar.o

http://www.mail-archive.com/wireshark-users@wireshark.org/msg04054.html
/usr/local/lib/libpcap.a:grammar.o: U pcap_strcasecmp
/usr/local/lib/libpcap.a:grammar.o:000000a0 T yyparse
/usr/local/lib/libpcap.a:grammar.o:00000004 C yynerrs
/usr/local/lib/libpcap.a:grammar.o:00000004 C yychar

http://www.mail-archive.com/wireshark-users@wireshark.org/msg04065.html
> /usr/local/lib/libpcap.a:grammar.o:000000a0 T yyparse

Well, *that's* annoying. That's supposed to be pcap_parse.

egrep YACC Makefile
which yacc
which bison
which lex
which flex

http://www.mail-archive.com/wireshark-users@wireshark.org/msg04053.html
egrep YACC Makefile:

YACC = bison -y -p pcap_
$(YACC) -d $<

which yacc:
/usr/bin/yacc

which bison:
/usr/bin/bison

which lex:
/usr/bin/lex

which flex:
/usr/bin/flex

http://www.mail-archive.com/wireshark-users@wireshark.org/msg04035.html
> YACC = bison -y -p pcap_

Well, that's what it's supposed to be, and that's supposed to cause the
generated grammar.c to define its functions with names beginning with
pcap_, not yy.

What happens if you go to the source directory for libpcap, do "make
clean", do "make", and then do "nm -po libpcap.a | egrep parse"?

Then it got fixed....

2010年8月5日 星期四

hidden symbol `XXX' in YYY is referenced by DSO; Nonrepresentable section on output

buildroot-2010.05 on FC9 (no issue alike with Ubuntu 8.04/10.4)

configure:3939: checking for initscr in -lncurses
configure:3974: arm-unknown-linux-uclibcgnueabi-gcc -O3 -pipe -Os -mtune=arm1136jf-s -march=armv6j -mabi=aapcs-linux -mfpu=vfp -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/arm-linux-le-uclibc-gcc-4.3.3-2010.05/usr/include -I/arm-linux-le-uclibc-gcc-4.3.3-2010.05/include --sysroot=/arm-linux-le-uclibc-gcc-4.3.3-2010.05/ -isysroot /arm-linux-le-uclibc-gcc-4.3.3-2010.05 -o conftest -O3 -pipe -Os -mtune=arm1136jf-s -march=armv6j -mabi=aapcs-linux -mfpu=vfp -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/arm-linux-le-uclibc-gcc-4.3.3-2010.05/usr/include -I/arm-linux-le-uclibc-gcc-4.3.3-2010.05/include --sysroot=/arm-linux-le-uclibc-gcc-4.3.3-2010.05/ -isysroot /arm-linux-le-uclibc-gcc-4.3.3-2010.05 -L/arm-linux-le-uclibc-gcc-4.3.3-2010.05/lib -L/arm-linux-le-uclibc-gcc-4.3.3-2010.05/usr/lib --sysroot=/arm-linux-le-uclibc-gcc-4.3.3-2010.05/ conftest.c -lncurses >&5
/arm-unknown-linux-uclibcgnueabi/bin/ld: conftest: hidden symbol `__aeabi_ddiv' in /arm-linux-le-uclibc-gcc-4.3.3-2010.05/usr/lib/gcc/arm-unknown-linux-uclibcgnueabi/4.3.3/libgcc.a(_muldivdf3.o) is referenced by DSO
/arm-unknown-linux-uclibcgnueabi/bin/ld: final link failed: Nonrepresentable section on output


how to compile these code(simple share library)
http://topic.csdn.net/u/20070112/14/7c180efb-91f3-44ec-a19f-e8334e7ae73a.html
-shared
-lshare


[linux-karma-devel] Nonrepresentable section on output - Suggestoin
http://www.mail-archive.com/linux-karma-devel@lists.sourceforge.net/msg00389.html
The answer in my case and likely in yours, is that you have invoked the "ld" loader explicitly instead of frontending it with gcc. If you replace ld with gcc -shared in the make where you build your shared library, then links against that library will not get the "Nonrepresentable section on output " as a result of including modules from non-shared libraries (.a archives).


hidden symbol `__aeabi_uidiv' in xxxx is referenced by DSO
http://tw.myblog.yahoo.com/stevegigijoe/article?mid=-2&next=145&l=a&fid=9
-lgcc_s


Surfing and cross-compiling glib for RunningBear
http://people.defora.org/~khorben/200903.html
In this case, the problem is usually solved by adding either "-l gcc" or "`gcc -print-libgcc-file-name`" to the linking flags (LDFLAGS). However, unlike my other regular platforms (i386, amd64, sparc64) here it wasn't enough. After a lot of head-banging (to be fair, it also comes from the music) I realized that this flag is necessary both when linking the libc *and* the final executable file.


[Linux] Ubuntu 底下編譯 ebtables 失敗
http://antontw.blogspot.com/2008/11/linux-ubuntu-ebtables.html