Tuesday, January 24, 2012

Android - Hotplug Off (Multi-Core enable)

If your device has root permission

adb shell stop mpdecision
adb shell "echo 1 > /sys/devices/system/cpu/cpu1/online"
or
# stop mpdecision
# echo 1 > /sys/devices/system/cpu/cpu1/online
# ...

xda - developers


update 1/31

Support for hot-pluggable CPUs
CONFIG_HOTPLUG_CPU=y
or # CONFIG_HOTPLUG_CPU is not set

Wednesday, January 4, 2012

Enable bootchart in the Android

In the Android source code

STEP 1. ----------
In the device side
1. enable bootchart flag
$ export INIT_BOOTCHART=true
2. and build the Android source code
3. After flashing binary
$ adb shell
$ mkdir /data/bootchart
$ echo 60 > /data/bootchart-start
(It means that bootchart log will be saved until 60 seconds)
$ exit
(exit adb)
4. reboot device
$ adb reboot
You can find some log files in the /data/bootchart/ directory

Tip.
- You can find "bootchart.c & bootchart.h" under the ../init/ directory.
- In the same directory there is a Android.mk file.
INIT_BOOTCHART is used in this make file.


STEP 2. ----------
In the linux system side
install bootchart
$ sudo apt-get install bootchart


STEP 3. ----------
after getting bootchart log files

1. copy log files from the Android device to Linux system
$ adb push /data/bootchart/.
2. compress the all log files
$ tar -czf bootchart.tgt *
3. run bootchart
$ bootchart bootchart.tgz
$ ls
bootchart.png bootchart.tgz


* If you meet the error message,
" ZeroDivisionError: flat division by zero"
Please refer to below site: Error while extracting bootchart.tgz and patch the script files.

Saturday, December 10, 2011

Kernel: Linux / Windows

- Monolithic Kernel vs Micro Kernel
http://www.vmars.tuwien.ac.at/courses/akti12/journal/04ss/article_04ss_Roch.pdf
http://en.wikipedia.org/wiki/Kernel_(computing)
http://linuxhelp.blogspot.com/2006/05/monolithic-kernel-vs-microkernel-which.html

- Korean
http://blog.naver.com/PostView.nhn?blogId=sdc4697&logNo=140103690630&redirect=Dlog&widgetTypeCall=true
http://recipes.egloos.com/5365126
http://itislord.tistory.com/tag/%EB%AA%A8%EB%86%80%EB%A6%AC%EB%94%95%20%EC%BB%A4%EB%84%90%28Monolithic%29

- Windows
http://www.driveronline.org/bbs/view.asp?tb=systembbs&GotoPage=1&s_bulu=&s_key=&no=24
http://keon.egloos.com/5202360
http://www.osnews.com/story/22501/Microsoft_Kernel_Engineers_Talk_About_Windows_7_s_Kernel

- Kernel comparision Linux vs Windows
http://widefox.pbworks.com/w/page/8042308/Kernel%20Comparison%20Linux%20vs%20Windows
http://widefox.pbworks.com/w/page/8042290/Architecture

http://jnux.tistory.com/entry/%EC%8A%A4%ED%81%AC%EB%9E%A9-%EB%AA%A8%EB%B0%94%EC%9D%BC-%ED%94%8C%EB%9E%AB%ED%8F%BC%EA%B3%BC-%EB%AA%A8%EB%B0%94%EC%9D%BC-OS%EC%9D%98-%EC%B0%A8%EC%9D%B4

http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=%EC%9C%88%EB%8F%84%EC%9A%B0+%EC%BB%A4%EB%84%90%EA%B3%BC+%EB%A6%AC%EB%88%85%EC%8A%A4+%EC%BB%A4%EB%84%90%EC%9D%98+%EC%B0%A8%EC%9D%B4

OneNand, iNand, and MobiNand

Korean
http://search.naver.com/search.naver?where=nexearch&query=%EC%95%84%EC%9D%B4%EB%82%B8%EB%93%9C+%EB%AA%A8%EB%B9%84%EB%82%B8%EB%93%9C&x=0&y=0&sm=top_hty&fbm=0&ie=utf8
http://gall.dcinside.com/list.php?id=smartphone&no=1437467

1. MLC (Multi Level Cell) / SLC (Single Level Cell)
http://www.navinside.com/bbs/zboard.php?id=forum_istation&no=3359
1.1 MLC type: MoviNand and iNand (same type)
1.2 SLC type: OneNand

2.1 Diff. between MoviNand and iNand
http://people.sarang.net/?document_srl=1104294

http://blog.naver.com/PostView.nhn?blogId=mercurian21&logNo=30047740523

자양이네 (ps3, 타블렛, 리눅스, 안드로이드)

갤럭시s의 oneNAND, moviNAND의 포맷및 파티션 변경
http://blog.naver.com/dowkim10?Redirect=Log&logNo=120119813742
갤럭시 s의 파티션 및 파일 시스템 (rfs/ext2/ext3/ext4)
http://blog.naver.com/dowkim10?Redirect=Log&logNo=120119813742
Samsung Galaxy S Series
http://forum.xda-developers.com/wiki/index.php?title=Samsung_Galaxy_S_Series

RFS
http://www.samsung.com/global/business/semiconductor/products/fusionmemory/Products_RFS_Brochure.html
http://movitool.ntd.homelinux.org/trac/movitool/wiki/RFS

http://www.samsungmomentforum.com/samsung-moment-rooting/bml151617-yaffs2!/

In the Linux, build error logging

    3.6.4 Redirecting Standard Output and Standard Error

    This construct allows both the standard output (file descriptor 1) and the standard error output (file descriptor 2) to be redirected to the file whose name is the expansion of word.
    There are two formats for redirecting standard output and standard error:
    &>word
    and
    >&word
    Of the two forms, the first is preferred. This is semantically equivalent to
    >word 2>&1

    case #1
    # make flag 2&> build.log
    case #2
    # make flag > build.log 2>&1

      C language, Tips

      1. Maximal munch rule (최대한 잘라먹기 규칙)
      x+++++y is
      ((x++)++) + y

      2. Floating Point Arithmetic (부동 소수점 연산)
      David Goldberg, "What Every Computer Scientist Should Know About Floating-Point Arithmetic," March 1991, ACM Computing Surveys, Vol. 21, No. 1
      IEEE 754
      IEEE 854

      3. Declaration specifier (선언 지정자)
      선언 지정자에 나열되는 순서는 상관이 없음
      그러나 아래와 같은 방법을 추천함
      기억부류 지정자 형한정어 형지정자
      static const volatile char

      #define MY_DEFINE 0

      void main(void)
      {
      #if defined(MY_DEFINE)
      printf("Yes, defined.\r\n");
      #else
      printf("No, undefined.\r\n");
      #endif // MY_DEFINE
      }

      output> Yes, defined.

      Saturday, August 20, 2011

      Enabling XDMCP in Ubuntu 11.04

      XDMCP is X Display Manager Control Protocol

      1. install xdm
      (If you installed xdm before, pass this step)
      #apt-get install xdm

      2. Edit /etc/gdm/custom.conf as follow: (If custom.conf is not exist, make it)
      #vim /etc/dgm/custom.conf

      [daemon]
      User=gdm
      Group=gdm

      [security]
      DisallowTCP=true

      [xdmcp]
      Enable=true
      DisplaysPerHost=2
      HonorIndirect=false
      MaxPending=4
      MaxSessions=16
      MaxWait=30
      MaxWaitIndirect=30
      PingIntervalSeconds=60
      Port=177

      [greeter]

      [chooser]
      Multicast=false

      [debug]
      Enable=false