달력

52024  이전 다음

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31

이런 것에도 관심을 갖고 넓게 봐야 하지 않을까?

시간 내서 한 번쯤 읽어보자.


2017.03.05, Better Software Engineer(?), http://woodz.tistory.com/89

 

'Personal Interest > ETC' 카테고리의 다른 글

syntaxhighlighter  (0) 2017.07.09
Blog Renewal (2017.07.09)  (0) 2017.07.09
체리새우 깡...  (0) 2016.02.17
ubuntu 10.10 netbook version - unity  (0) 2010.11.14
neodelicious git repos  (0) 2010.07.04
Posted by neodelicious
|

BINDER IPC mechanism can be used to send fd to another process for sharing




'Linux Internal > mm' 카테고리의 다른 글

active mm & tlb flush at context_switch  (0) 2022.05.09
mm: vmscan: shrink_zone  (0) 2017.07.22
dma: history  (0) 2017.07.09
PageReserved source  (0) 2012.07.16
Posted by neodelicious
|

Linux memory 재개?

뭔가 많이 찾아봐야 할 것 같고, 정리도 해야 할 것 같다.

일단 blog 를 다시 살려보자.

스킨도 바꿔보고, 기존 글도 좀 정리하는 걸로.


자 이제 시작!

2017.07.09

'Personal Interest > ETC' 카테고리의 다른 글

syntaxhighlighter  (0) 2017.07.09
google-interview-university  (0) 2017.07.09
체리새우 깡...  (0) 2016.02.17
ubuntu 10.10 netbook version - unity  (0) 2010.11.14
neodelicious git repos  (0) 2010.07.04
Posted by neodelicious
|

 Healing... Healing....

 

 

'Personal Interest > ETC' 카테고리의 다른 글

google-interview-university  (0) 2017.07.09
Blog Renewal (2017.07.09)  (0) 2017.07.09
ubuntu 10.10 netbook version - unity  (0) 2010.11.14
neodelicious git repos  (0) 2010.07.04
홈페이지 텍스트큐브로 전환  (0) 2010.03.03
Posted by neodelicious
|

Linux version

Lang, Tool, Env 2016. 2. 15. 03:10

 

 

v4.4 Date: Sun Jan 10 15:01:32 2016 -0800

v4.3 Date: Sun Nov 1 16:05:25 2015 -0800

v4.2 Date: Sun Aug 30 11:34:09 2015 -0700

v4.1 Date: Sun Jun 21 22:05:43 2015 -0700

v4.0 Date: Sun Apr 12 15:12:50 2015 -0700

v3.19 Date: Sun Feb 8 18:54:22 2015 -0800

v3.18 Date: Sun Dec 7 14:21:05 2014 -0800

v3.17 Date: Sun Oct 5 12:23:04 2014 -0700

v3.16 Date: Sun Aug 3 15:25:02 2014 -0700

v3.15 Date: Sun Jun 8 11:19:54 2014 -0700

v3.14 Date: Sun Mar 30 20:40:15 2014 -0700

v3.13 Date: Sun Jan 19 18:40:07 2014 -0800

v3.12 Date: Sun Nov 3 15:41:51 2013 -0800

v3.11 Date: Mon Sep 2 13:46:10 2013 -0700

v3.10 Date: Sun Jun 30 15:13:29 2013 -0700

v3.9 Date: Sun Apr 28 17:36:01 2013 -0700

v3.8 Date: Mon Feb 18 15:58:34 2013 -0800

v3.7 Date: Mon Dec 10 19:30:57 2012 -0800

v3.6 Date: Sun Sep 30 16:47:46 2012 -0700

v3.5 Date: Sat Jul 21 13:58:29 2012 -0700

v3.4 Date: Sun May 20 15:29:13 2012 -0700

v3.3 Date: Sun Mar 18 16:15:34 2012 -0700

v3.2 Date: Wed Jan 4 15:55:44 2012 -0800

v3.1 Date: Mon Oct 24 09:10:05 2011 +0200

v3.0 Date: Thu Jul 21 19:17:23 2011 -0700

v2.6.39 Date: Wed May 18 21:06:34 2011 -0700

v2.6.38 Date: Mon Mar 14 18:20:32 2011 -0700

v2.6.37 Date: Tue Jan 4 16:50:19 2011 -0800

v2.6.36 Date: Wed Oct 20 13:30:22 2010 -0700

v2.6.35 Date: Sun Aug 1 15:11:14 2010 -0700

v2.6.34 Date: Sun May 16 14:17:36 2010 -0700

v2.6.33 Date: Wed Feb 24 10:52:17 2010 -0800

v2.6.32 Date: Wed Dec 2 19:51:21 2009 -0800

v2.6.31 Date: Wed Sep 9 15:13:59 2009 -0700

v2.6.30 Date: Tue Jun 9 20:05:27 2009 -0700

v2.6.29 Date: Mon Mar 23 16:12:14 2009 -0700

v2.6.28 Date: Wed Dec 24 15:26:37 2008 -0800

v2.6.27 Date: Thu Oct 9 15:13:53 2008 -0700

v2.6.26 Date: Sun Jul 13 14:51:29 2008 -0700

v2.6.25 Date: Wed Apr 16 19:49:44 2008 -0700

v2.6.24 Date: Thu Jan 24 14:58:37 2008 -0800

v2.6.23 Date: Tue Oct 9 13:31:38 2007 -0700

v2.6.22 Date: Sun Jul 8 16:32:17 2007 -0700

v2.6.21 Date: Wed Apr 25 20:08:32 2007 -0700

v2.6.20 Date: Sun Feb 4 10:44:54 2007 -0800

v2.6.19 Date: Wed Nov 29 13:57:37 2006 -0800

v2.6.18 Date: Tue Sep 19 20:42:06 2006 -0700

v2.6.17 Date: Sat Jun 17 18:49:35 2006 -0700

v2.6.16 Date: Sun Mar 19 21:53:29 2006 -0800

v2.6.15 Date: Mon Jan 2 19:21:10 2006 -0800

v2.6.14 Date: Thu Oct 27 17:02:08 2005 -0700

v2.6.13 Date: Sun Aug 28 16:41:01 2005 -0700

v2.6.12 Date: Fri Jun 17 12:48:29 2005 -0700

v2.6.11

'Lang, Tool, Env' 카테고리의 다른 글

Ubuntu /home 옮기기  (0) 2012.08.04
struct 내 flag용으로 쓸 1bit 크기 변수 사용하기  (0) 2010.05.09
struct timeval & long long  (0) 2010.03.31
IEEE Floating-Point Format  (1) 2009.09.13
chroot  (0) 2008.04.06
Posted by neodelicious
|

사정상 VBOX 에 Ubuntu 를 설치해서 사용하고 있는데,
기존에 사용하던 /home 이 HDD(SSD) 용량을 거의 다 차지하고 말았다.

Android 같은 대용량 Source 를 받고 Build 하면 금새 몇 십 GB 를 소모하는데

,
그리고 VBOX 초기 설정시 HDD 크기를 너무 작게 설정했기 때문이다.
사실 http://virtualboxes.org/images/ubuntu/ 에서 이미 Ubuntu 를 설치한 VBOX image 를 이용하면 기본 8GB 로 설정되어 있어서 금새 부족해진다.

생각해보면 /home 전용 VBOX image 를 별도로 관리하면, 이후에 VBOX master HDD image 에 문제가 생겨도 손쉽게 복구할 수 있을 것 같아서 HHD 를 추가하고 /home 을 분리하는 방법을 찾아봤다.

이미 같은 필요를 느끼는 사람이 많아서인지 ubuntu help page에 잘 설명되어 있었다.
https://help.ubuntu.com/community/Partitioning/Home/Moving

방법은 우선 VBOX 에서 HDD 를 적당히 크게 하나를 추가하고 Ubuntu 에서 format 한다.
그리고 위 ubuntu help page 처럼 /home 을 복사하고 mount point 를 변경한다.

ubuntu help page 방법의 command 만 복사하면 아래와 같다.

1. 실행후 새 HDD 의 UUID 확인
$ sudo blkid

2. fstab backup 후 fstab 임시 수정 (UUID는 1. 에서 확인한 값으로 변경, option 도 필요하면 수정)
$ sudo cp /etc/fstab /etc/fstab.$(date +%Y-%m-%d)
$ gksu gedit /etc/fstab
UUID=????????   /media/home    ext4          nodev,nosuid       0       2

3. 새 HDD mount
$ sudo mkdir /media/home
$ sudo mount -a

4. /home 복사 (참고 - .gvfs 를 복사 못 해도 warning message 출력 금지)
$ sudo rsync -aXS --exclude='/*/.gvfs' /home/. /media/home/.
$ sudo diff -r /home /media/home

5. fstab 재 수정(/home 으로 변경), /home 변경 및 재부팅
$ gksu gedit /etc/fstab
UUID=???????? /home ext4 nodev,nosuid 0 2
$ cd / && sudo mv /home /old_home && cd / && sudo mkdir -p /home
$ sudo reboot

6. 이전 /home 삭제
$ sudo rm -r /old_home

'Lang, Tool, Env' 카테고리의 다른 글

Linux version  (0) 2016.02.15
struct 내 flag용으로 쓸 1bit 크기 변수 사용하기  (0) 2010.05.09
struct timeval & long long  (0) 2010.03.31
IEEE Floating-Point Format  (1) 2009.09.13
chroot  (0) 2008.04.06
Posted by neodelicious
|

./arch/arm/mm/init.c 파일을 보다 보니 PageReserved(page) 와 같은 code 가 있어서

PageReserved() 함수를 찾고자 했는데 찾는데 아무리 grep 을 해도 찾을 수 없었다.


그런데 알고 보니 원래 아래와 같은 직관적인 define 이었는데,

#define PageReserved(page)    test_bit(PG_reserved, &(page)->flags)

kernel 2.6.26 에서 (6a1e7f7 pageflags: convert to the use of new macros) 삭제하고,

아래와 같이 다른 define 으로 변경하였다.

PAGEFLAG(Reserved, reserved) __CLEARPAGEFLAG(Reserved, reserved)

define 을 대입해서 풀어보니 아래와 같이 기존과 거의 같았다.

PAGEFLAG(Reserved, reserved) __CLEARPAGEFLAG(Reserved, reserved)
---------------
TESTPAGEFLAG(Reserved, reserved) SETPAGEFLAG(Reserved, reserved) CLEARPAGEFLAG(Reserved, reserved) __CLEARPAGEFLAG(Reserved, reserved)
---------------
static inline int PageReserved(const struct page *page)   
                        { return test_bit(PG_reserved, &page->flags); }

static inline void SetPageReserved(struct page *page)                   \
                        { set_bit(PG_reserved, &page->flags); }                    
static inline void ClearPageReserved(struct page *page)    \
                        { clear_bit(PG_reserved, &page->flags); }
static inline void __ClearPageReserved(struct page *page)               \
                        { __clear_bit(PG_reserved, &page->flags); }          

'Linux Internal > mm' 카테고리의 다른 글

active mm & tlb flush at context_switch  (0) 2022.05.09
mm: vmscan: shrink_zone  (0) 2017.07.22
dma: history  (0) 2017.07.09
staging: ion: history  (0) 2017.07.09
Posted by neodelicious
|


I wanted to know how to set up repo based source tree.

As you know, Repo is just a wrapper of several git repositories.
To manage those repositories, repo uses a configuration file named of default.xml.

To set up repo based source tree, you need to understand the format of default.xml.
I could learn it easily from following URLs

http://repo.or.cz/w/git-repo.git/blob_plain/a949fa5d202f0a1f812d7630f3e5bf0f02ca4e98:/docs/manifest_xml.txt
http://www.omappedia.org/wiki/Android_Miscellaneous

I want to say these.
- Like normal git, default.xml can set up several remote Repo and set one of them as default.
- each git can be retrieved from different remote Repo and either follows a branch or can be stuck on a specific commit.

If you want you can refer to below too.

git://android.git.kernel.org/platform/manifest.git
git://codeaurora.org/platform/manifest.git
http://gitorious.org/android-eeepc/manifest/blobs/master/default.xml
https://github.com/CyanogenMod/android/blob/gingerbread/default.xml

I attached my work to share.
I hope it helps you out.

Posted by neodelicious
|
android source 를 좀 보려고 repo init 을 했는데 아래와 같이 안 되었다.

$ repo init -u git://android.git.kernel.org/platform/manifest.git
Getting repo ...
   from git://android.git.kernel.org/tools/repo.git
fatal: Unable to look up android.git.kernel.org (port 9418) (Name or service not known)

DNS 혹은 Port 문제인가 싶어서 이것 저것 다 확인하고 바꿔봤는데,
결론은 Android repo 의 git server 가 hacking 당해서 동작 안 한다는 것... 덜덜;;

http://php.webtutor.pl/en/2011/09/05/kernel-org-hacked-how-to-get-android-repo/
위 URL 에서 관련 사실을 확인했고 방법도 참고했는데, 9/5 날짜이니 나름 최근인가 보다.

위 URL 에서는 아래와 같이 다른 곳에서 repo 를 받으라고 되어 있다.
curl "http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo" > ~/bin/repo
chmod a+x ~/bin/repo
사족인데 혹시나 해서 받은 repo 를 봤더니 역시 repo 의 default git URL 을 수정해 놓은 repo 였다. 위에서 받은 repo 를 사용하면 되는데, 굳이 이전에 받은 repo 를 사용하고자 한다면  --repo-url 옵션을 통해 repo 에 repo git URL 을 argument 로 전달하면 된다.

그리고 android platform 의 git server 도 hacking 당했는지 안 되는데 위 URL 에서 알려주듯이 아래와 같이 변경해서 받을 수 있다.

repo init -u git://codeaurora.org/platform/manifest.git -b gingerbread

알겠지만 repo init 끝에 -b gingerbread 는 gingerbread branch 를 받는 것으로 원하면 생략하거나 다른 branch 값을 쓰면 된다.

참고적으로 android kernel 을 받으려면 repo project 를 통해서 받을 수도 있지만,
android kernel 의 git server 에서 다음과 같이 바로 git clone 할 수 있다.
$ git clone git://android.git.kernel.org/kernel/common.git kernel

그런데 현재 kernel 또한 server 에 문제가 있어 위의 대체 URL 을 이용해서 받을 수 있다.
$ git clone git://codeaurora.org/kernel/common.git kernel
Posted by neodelicious
|
=========================================================
11.10.02 수정 사항 - git 관련 정리 파일 수정하여 파일 첨부

=========================================================

Android Source 를 받을 때 repo 를 알게 되었고,
Android Source 를 받을 때만 repo 를 써 봤다.
다른 Source 관리에도 repo 를 쓰면 좋을 것 같은데 어떻게 해야 할까?

아직은 잘 모르겠지만 만약 myrepo_remote 라는 directory 에
repo 형식의 repo server 가 설정되어 있을 것이다.

$ mkdir myrepo_remote
$ cd myrepo_remote

그리고 myrepo_local 이라는 directory 를 만든다.

$ mkdir myrepo_local

위 repo server 에서 source 를 download 하려면
우선 repo 설정을 아래와 같이 할 것이다.
아라? 그런데 뭔가 android server 에서 download 한다.

myrepo_local$ repo init -u ../myrepo_remote/
Getting repo ...
   from git://android.git.kernel.org/tools/repo.git
remote: Counting objects: 1309, done.
remote: Compressing objects: 100% (570/570), done.
remote: Total 1309 (delta 843), reused 1148 (delta 716)
Receiving objects: 100% (1309/1309), 357.92 KiB | 141 KiB/s, done.
Resolving deltas: 100% (843/843), done.
From git://android.git.kernel.org/tools/repo
 * [new branch]      maint      -> origin/maint
 * [new branch]      master     -> origin/master
 * [new branch]      stable     -> origin/stable
 * [new tag]         v1.7.5     -> v1.7.5
From git://android.git.kernel.org/tools/repo
 * [new tag]         v1.0       -> v1.0
 * [new tag]         v1.0.1     -> v1.0.1
(생략)
 * [new tag]         v1.7.4.3   -> v1.7.4.3
Getting manifest ...
   from ../myrepo_remote/
fatal: '../myrepo_remote' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
fatal: cannot obtain manifest ../myrepo_remote/

마지막에 myrepo_remote directory 에 repo 설정이 안 되어 있어서 error 가 발생하지만,
.repo directory 가 생성되고, .repo/repo 에도 뭔가 잔뜩 만들어졌다.

myrepo_local$ ls -l .repo/
total 4
drwxr-xr-x 7 jaewon jaewon 4096 2011-08-15 10:51 repo

파일 확장자를 보니 파이썬 스크립트이고,
repo  관련 명령어를 처리해 주는 기능을 하는 것 같다.
그런데 .git directory 가 있는 것을 보니 Git 로 관리하는 것 같다.

myrepo_local$ ls -al .repo/repo/
total 380
drwxr-xr-x 7 jaewon jaewon  4096 2011-08-15 10:51 .
drwxr-xr-x 3 jaewon jaewon  4096 2011-08-15 10:51 ..
-rw-r--r-- 1 jaewon jaewon  3602 2011-08-15 10:51 color.py
-rw-r--r-- 1 jaewon jaewon  5239 2011-08-15 10:51 color.pyc
-rw-r--r-- 1 jaewon jaewon  3426 2011-08-15 10:51 command.py
-rw-r--r-- 1 jaewon jaewon  4625 2011-08-15 10:51 command.pyc
(생략)
drwxr-xr-x 8 jaewon jaewon  4096 2011-08-15 10:51 .git
(생략)

Git 안을 좀 들여다 보자.
local 에 remote/origin/stable 을 upstream 으로 하는 default branch 가 있다.

myrepo_local$ cd .repo/repo/
myrepo_local/.repo/repo$ git branch -avv
* default               30d4529 [origin/stable] Add a --depth option to repo init.
  remotes/origin/maint  08c880d Smart tag support
  remotes/origin/master e7a3bcb Merge branch 'stable'
  remotes/origin/stable 30d4529 Add a --depth option to repo init.

myrepo_local/.repo/repo$ cat .git/config
[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[remote "origin"]
    url = git://android.git.kernel.org/tools/repo.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "default"]
    remote = origin
    merge = refs/heads/stable

그럼 이런 Git 로 관리하는 repo 관련 파일들을
/usr/bin/repo 실행 한 번으로 모두 받은 것이다.
이쯤에서 궁금해진다.
repo 안에 Git 관련 설정은 어떻게 되어 있을까?

결론부터 얘기해서,
repo script 를 분석해서 Git 관련 부분만 모아보면 아래와 같았다.
참고적으로 mimic_repo_init.sh 라는 파일로 만들어서 테스트할 수 있다.

mkdir -p .repo_test/repo
cd .repo_test/repo

echo 'Getting repo ...'
echo '   from git://android.git.kernel.org/tools/repo.git'

git init --quiet
git config remote.origin.url git://android.git.kernel.org/tools/repo.git
git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
git fetch origin
git fetch --tags origin
cur=`git describe origin/stable`
#git tag -v $cur
rev="$cur^0"
# current rev is v1.7.5^0
git update-ref refs/heads/default $rev
git config branch.default.remote origin
git config branch.default.merge refs/heads/stable
git symbolic-ref HEAD refs/heads/default
git read-tree --reset -u HEAD

위 과정을 진행하고,
repo init 한 것과 비교해 봤는데
repo init 에서 파이썬 스크립트가 더 있기는 했지만
Git 관련 파일은 거의 같다고 할 수 있었다.

myrepo_local$ repo init -u ../myrepo_remote
myrepo_local$ ./mimic_repo_init.sh
myrepo_local$ diff -qr .repo .repo_testOnly in .repo/repo: color.pyc
Only in .repo/repo: command.pyc
Only in .repo/repo: editor.pyc
Only in .repo/repo: error.pyc
Files .repo/repo/.git/index and .repo_test/repo/.git/index differ
Files .repo/repo/.git/logs/refs/heads/default and .repo_test/repo/.git/logs/refs/heads/default differ
Files .repo/repo/.git/logs/refs/remotes/origin/maint and .repo_test/repo/.git/logs/refs/remotes/origin/maint differ
Files .repo/repo/.git/logs/refs/remotes/origin/master and .repo_test/repo/.git/logs/refs/remotes/origin/master differ
Files .repo/repo/.git/logs/refs/remotes/origin/stable and .repo_test/repo/.git/logs/refs/remotes/origin/stable differ
Only in .repo/repo: git_command.pyc
Only in .repo/repo: git_config.pyc
Only in .repo/repo: git_refs.pyc
(생략)

끝으로 repo 를 다 분석하지는 못 했는데,
위 Git command 를 알아내는데 확인했던 부분 코드를 분석 없이 덧붙인다.


Posted by neodelicious
|