Linux 커널의 경우 램디스크를 여러 종류를 사용하는데 이 중 initramfs/initrd 를 사용하는 경우
CONFIG_BLK_DEV_INITRD 를 설정하고, CONFIG_INITRAMFS_SOURCE 에 root 파일템이 만들어져 있는 디렉토리 경로를 써준다.

Android 빌드 시스템에서는 커널 및 램디스크를 합쳐서 boot.img 를 만들어 사용하는데,
이 때, 사용될 Kernel Command line 을 지정할 수 있다. 이 때 TARGET_NO_KERNEL은 false 여야 한다.

이는 build/core/Makefile 에서 확인할 수 있다. 

BOARD_KERNEL_CMDLINE := $(strip $(BOARD_KERNEL_CMDLINE))
ifdef BOARD_KERNEL_CMDLINE
  INTERNAL_BOOTIMAGE_ARGS += --cmdline "$(BOARD_KERNEL_CMDLINE)"
endif


이 외에도 Kernel Base address, Page Size 등도 지정할 수 있다.

BOARD_KERNEL_BASE := $(strip $(BOARD_KERNEL_BASE))
ifdef BOARD_KERNEL_BASE
  INTERNAL_BOOTIMAGE_ARGS += --base $(BOARD_KERNEL_BASE)
endif

BOARD_KERNEL_PAGESIZE := $(strip $(BOARD_KERNEL_PAGESIZE))
ifdef BOARD_KERNEL_PAGESIZE
  INTERNAL_BOOTIMAGE_ARGS += --pagesize $(BOARD_KERNEL_PAGESIZE)
endif


TARGET_BOOTIMAGE_USE_EXT2 를 true로 하면 ext2 파일시스템의 boot image를 만드는 것 같다.

ifeq ($(TARGET_BOOTIMAGE_USE_EXT2),true)
tmp_dir_for_image := $(call intermediates-dir-for,EXECUTABLES,boot_img)/bootimg
INTERNAL_BOOTIMAGE_ARGS += --tmpdir $(tmp_dir_for_image)
INTERNAL_BOOTIMAGE_ARGS += --genext2fs $(MKEXT2IMG)
$(INSTALLED_BOOTIMAGE_TARGET): $(MKEXT2IMG) $(INTERNAL_BOOTIMAGE_FILES)
    $(call pretty,"Target boot image: $@")
    $(hide) $(MKEXT2BOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) --output $@

else # TARGET_BOOTIMAGE_USE_EXT2 != true

$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES)
    $(call pretty,"Target boot image: $@")
    $(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) --output $@
    $(hide) $(call assert-max-image-size,$@,$(BOARD_BOOTIMAGE_PARTITION_SIZE),raw)
endif # TARGET_BOOTIMAGE_USE_EXT2


예제)

TARGET_NO_KERNEL := false

BOARD_KERNEL_BASE := 0x30000000
BOARD_KERNEL_PAGESIZE := 4096
BOARD_KERNEL_CMDLINE := console=ttyFIQ0 no_console_suspend

lxr 설치하기

from Linux 2011/11/16 16:55
http://lifeseed.tistory.com/tag/glimpse 에 있는대로만 하면 된다. 글쓴이에게 감사를..

정리하자면,
1. glimpse 설치
1.1. wget http://webglimpse.net/trial/glimpse-latest.tar.gz
1.2. tar xvfz glimpse-latest.tar.gz
1.3. ./configure && make && sudo make install

2. lxr 설치
2.1. sudo apt-get install lxr
 기본 설치는 /usr/share/lxr 에 된다.
2.2. sudo vi /etc/apache2/sites-available/default 후 다음 내용 추가

    Alias /lxr "/usr/share/lxr"
    <Directory "/usr/share/lxr">
        Options All
        AllowOverride All
    </Directory>

2.3. sudo cp /usr/share/lxr/blurb.html /usr/share/lxr/index.html

3. lxr 환경 설정
3.1. sudo vi /usr/share/lxr/lxr.conf
3.1.1. 나의 경우 대부분 archtechture로 arm 을 쓰므로 다음처럼 고친다.

# Define typed variable "a".  First value is default.
variable: a, Architecture, (arm, i386, alpha, m68k, mips, ppc, sparc, sparc64)

3.1.2. base url 도 localhost 대신 ip 를 사용하자.

# Define the base url for the LXR files.
baseurl: http://<IP ADDRESS>/lxr/http/

3.1.3. version 명으로 된 디렉토리 아래 바로 소스를 둘 것이므로 다음처럼 고친다.

# The source is here.
sourceroot: /usr/share/lxr/source/$v/
srcrootname: Linux

3.1.4. glimpse 를 위처럼 설치했다면 경로가 다르므로 이것도 고치자.

# Glimpse can be found here.
glimpsebin: /usr/local/bin/glimpse
 
4. 소스 코드 복사 및 DB 구축
4.1. sudo mkdir /usr/share/lxr/source/<VERSION>
4.2. sudo cp 소스 /usr/share/lxr/source/<VERSION>
4.3. cd  /usr/share/lxr/source
4.4. sudo echo '<VERSION>' >> ./versions
4.5. sudo echo '<VERSION>' >> ./defversion
4.6. cd <VERSION>
4.7. sudo genxref ./
4.8. sudo glimpseindex -H ./ fileidx xref
4.9. sudo chmod 644 .glimpse_*
4.10. sudo chmod 644 fileidx
4.11 sudo chmod 644 xref

5. http://<IP ADDRESS>/lxr/http 접속.
 
Tag // glimpse, LXR, 설치
git과 gerrit 을 사용할 때 최소한 알아야 하는 것을 정리한 것으로 회사 내의 git 교육 담당자에게 교육 시 필요한 내용을 정리해서 보낸 내용이다. 이거 다 알면 git 잘 쓴다^^
이것을 차례로 삼아 세부 내용을 하나씩 문서로 만들어 정리하자.

추가1: 이미 http://namhyung.springnote.com/pages/3132772 에 git 사용자 설명서가 있다. 저 namhyung님이 내가 아는 우분투 쪽 김남형 님일까 ㅎㅎ

* git
1. Git의 Repository 개념과 clone 의 개념, clone
2. Git의 remote branch와 local branch 간 차이, fetch
3. Remote 브랜치로부터 local branch 를 최신으로 업데이트 하는 방법, pull/rebase의 이해
4. 수정 반영 방법, Git의 Staging area 개념과 작업 방법, add/commit 의 이해, commit -s 옵션
5. Commit 을 수정하는 방법, commit --amend 의 이해
6. Push 방법 – Gerrit의 refs/for/* 개념 이해, push의 이해, push 시의 refs spec 이해
7. Log를 확인하는 방법, log
8. Commit 간 차이(diff)를 확인하는 방법, diff
9. 특정 시점의 소스로 돌아가는 방법, reset
10. 특정 소스 파일을 특정 시점으로 되돌리는 방법, checkout
11. Backout 방법, revert
12. local 브랜치를 만드는 방법, branch
13. remote 브랜치나 local 브랜치로 local 소스를 만드는 방법, checkout
14. cherry-pick 의 이해, cherry-pick
15. patch 파일 만들기와 패치 적용 방법, , format-patch/am
16. merge 방법 및 merge commit이 무엇인지, merge
17. rebase 나 merge 시의 conflict 해결 방법

* gerrit
1. 그룹의 정의 및 권한 이해
2. Verify 방법 – Verify 의 의미 이해
3. Review 방법 – Inline comments 작성 및 cover message 작성(+ 한글 작성 가능 알림)
4. Gerrit 에서 cherry-pick 하기
5. Gerrit 에서 checkout 하기
6. Gerrit 에서 같은 Change의 Patch set 업데이트 하기
7. Submit 시의 동작 이해

0. crontab 허용 사용자 추가
$ sudo vi /etc/cron.allow
사용자 이름 적고 저장 후 crontab 서비스 재시작 - sudo service crontab restart


1. crontab 사용자 파일 수정
$ crontab -e

*/10 * * * * /home/dasomoli/update.sh 식으로 적고 저장

hex 방식으로 출력 - od

from Linux 2011/11/03 17:07
od 를 써서 hex 방식으로 출력하자. 메모리 등을 볼 때 라던가..

echo "Jeong-Seok Yang" | od -Ax -t x1
Tag // dump, HEX, OD