2012년 9월 18일 화요일

u-boot: 환경 변수 분석

http://blog.naver.com/PostView.nhn?blogId=tazamara&logNo=130000358972&redirect=Dlog&widgetTypeCall=true

http://www.denx.de/wiki/view/DULG/Manual

2012년 9월 11일 화요일

make: phony target

Phony Targets


"make의 타겟과 동일한 이름을 가진 파일과 충돌을 피하고, 퍼포먼스 개선을 하기 위해서 사용한다. " 라고 하는데 말이 어렵다. 하나 하나 뜯어 보자

make에서 타겟이란?
make를 구성하는 기본적인 형태는 다음과 같다.

target: prerequisite1 prerequisite2 ...
        command


make는 target을 생성하기 위해 prerequisite들이 update되었는지를 확인한 후 command를 사용하여 target파일을 update한다. 실제 예를 들어 설명해보겠다.

test: test.c
      cc -o test test.c

위의 예제에서 target은 test가 되고 prerequisite는 test.c가 된다. 그리고 command는 cc -o test test.c가 된다.  make는 test.c가 변했는지를 확인한 후 test.c에 변경된 내용이 있다면 cc -o test test.c를 사용하여 test라는 파일을 새롭게 작성할 것이다.

타겟과 동일한 이름을 가진 파일과 충돌을 피하고?

clean:
      rm *.o

위의 예제에서는 target과 command는 있지만 prerequisite가 존제하지 않는다. 이럴 경우 만약 clean이라는 파일이 있다면 prerequisite가 존제하지 않기 때문에(prerequisite가 변경되었는지 판단을 할 수 없기 때문에) make는 update된 내용이 없다고 판단하고 command를 수행하지 않는다. 어려운 말로 묵시적 규칙(Using Implicit Rules)이라고 한다.

그래서 다음과 같이 clean이 가짜 목적물(target 파일이 생성되지 않는 목적물)이라는  규칙을 사용하여야 된다 .

.PHONY: clean
clean:
      rm *.o

퍼포먼스 개선은?

실제 파일의 존재 여부를 신경쓰지 않고 command를 수행하기 때문에 실제 파일이 존재 하는지 않하는지 검사하는 루틴이 make에서 제거된다. 따라서  성능적 효과를 볼 수 있다는 이야기...

2012년 9월 9일 일요일

yum: repositore 추가 하기


Webtatic Yum Repository

The Webtatic Yum repository is a CentOS/RHEL repository containing updated web-related packages. Its main goals are:
  • to provide CentOS/RHEL administrators with the latest stable minor releases of web development/hosting software, which are not provided in CentOS/RHEL distribution minor releases.
  • to serve as an additional installation option for some of Webtatic’s projects.
All packages are signed using GnuPG, and are verified using the Webtatic GPG key:
Installation

To set up the repository, install the webtatic-release RPM:

CentOS/RHEL 6:




rpm -Uvh http://repo.webtatic.com/yum/el6/latest.rpm

CentOS/RHEL 5:
rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm

Additional information
The RPMs are built from the also provided SRPMs. The Mock build system is used to build both i386 and x86_64 RPMs which satisfy the base, updates and extra repositories of CentOS, which are set up in the base installation of CentOS.

CentOS/RHEL 6 usage
As of el6, Webtatic avoids using the same package names as the base repositories that CentOS/RHEL 6 uses, so that packages are not implicitly automatically upgraded without consent. This also means that the repository can be run enabled=1.

To install packages you just need to use the correct package name as described in the packages wiki:




yum install package-name

CentOS/RHEL 5 usage
It is recommended to use the “enabled=0″ parameter in the webtatic.repo file (which is provided in this state wherever it can be downloaded/installed on this site). This can be used to limit which packages you would like to update, as you may prefer to keep some packages at their CentOS-provided versions.

Packages can then be installed using the flag –enablerepo=webtatic to explicitly enable the repository for only that command, e.g.:









yum install --enablerepo=webtatic package-name








  
http://www.webtatic.com/projects/yum-repository/