Bitbake 설치


git clone git://git.openembedded.org/bitbake

환경변수 설정후  export PATH: XXX :$PATH


http://www.yoctoproject.org/docs/2.0/bitbake-user-manual/bitbake-user-manual.html#hello-world-example

레퍼런스 매뉴얼을 참고했다.

A.4. The Hello World Example

홈디렉토리에 폴더를 생성하고 실행


1.  RunBitbake

li@li:~$ mkdir BB

li@li:~$ cd BB

li@li:~/BB$ ls

li@li:~/BB$ bitbake

The BBPATH variable is not set and bitbake did not find a conf/bblayers.conf file in the expected location.

Maybe you accidentally invoked bitbake from the wrong directory?

DEBUG: Removed the following variables from the environment: LC_NUMERIC, MANDATORY_PATH, XDG_GREETER_DATA_DIR, GNOME_DESKTOP_SESSION_ID, LC_IDENTIFICATION, LESSOPEN, XDG_VTNR, SESSION, WINDOWID, LC_ALL, LC_PAPER, GNOME_KEYRING_CONTROL, DISPLAY, LANG, XDG_SESSION_PATH, XAUTHORITY, LANGUAGE, SESSION_MANAGER, LC_MONETARY, QT_QPA_PLATFORMTHEME, CLUTTER_IM_MODULE, QT4_IM_MODULE, JOB, TEXTDOMAIN, SESSIONTYPE, XMODIFIERS, GPG_AGENT_INFO, SELINUX_INIT, SSH_AUTH_SOCK, XDG_RUNTIME_DIR, INSTANCE, LC_ADDRESS, COMPIZ_CONFIG_PROFILE, COMPIZ_BIN_PATH, VTE_VERSION, GDMSESSION, IM_CONFIG_PHASE, TEXTDOMAINDIR, XDG_DATA_DIRS, XDG_SEAT_PATH, PAth, XDG_CURRENT_DESKTOP, XDG_SESSION_ID, DBUS_SESSION_BUS_ADDRESS, _, DEFAULTS_PATH, GTK_IM_MODULE, DESKTOP_SESSION, UPSTART_SESSION, LESSCLOSE, GNOME_KEYRING_PID, OLDPWD, LS_COLORS, GDM_LANG, LC_TELEPHONE, GTK_MODULES, LC_MEASUREMENT, SHLVL, COLORTERM, LC_NAME, XDG_MENU_PREFIX, LC_TIME, XDG_CONFIG_DIRS, XDG_SEAT


BBPATH 가 설정되어 있지않고 conf/bblayers.conf 파일을 찾을 수 없다고 나온다. 
BitBake 가 실행하게 되면 metadata 파일들을 탐색하게 된다. 여기서 BBPATH 는 BitBake 가 어디에 위치 해 있는지 나타낸다. BBPATH 설정없이는 BitBake 가 환경설정 파일들을 찾지 모한다. (.conf, .bb) bitbake.conf.

 
2. Setting BBPATH 
     $ BBPATH="projectdirectory"  <--- 프로젝트 디렉토리
     $ export BBPATH

다시 bitbake를 실행한다.


로그 ------------------------
li@li:~/BB$ bitbake
ERROR: Traceback (most recent call last):
  File "/opt/bitbake/lib/bb/cookerdata.py", line 178, in wrapped
    return func(fn, *args)
  File "/opt/bitbake/lib/bb/cookerdata.py", line 200, in parse_config_file
    return bb.parse.handle(fn, data, include)
  File "/opt/bitbake/lib/bb/parse/__init__.py", line 113, in handle
    return h['handle'](fn, data, include)
  File "/opt/bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 124, in handle
    abs_fn = resolve_file(fn, data)
  File "/opt/bitbake/lib/bb/parse/__init__.py", line 131, in resolve_file
    raise IOError(errno.ENOENT, "file %s not found in %s" % (fn, bbpath))
IOError: [Errno 2] file conf/bitbake.conf not found in /home/li/BB

ERROR: Unable to parse conf/bitbake.conf: [Errno 2] file conf/bitbake.conf not found in /home/li/BB
-----------------------------------
conf/bitbake 파일은 타겟을 빌드하기위해 첫번쨰로 필요한 파일이다. 

3. Creating conf/bitbake.conf 

파일 생성후 다음과 같이 추가한다.

TMPDIR = "${TOPDIR}/tmp" CACHE = "${TMPDIR}/cache" STAMP = "${TMPDIR}/stamps" T = "${TMPDIR}/work" B = "${TMPDIR}"


----------------Log-----------

li@li:~/BB$ bitbake

ERROR: Unable to parse /opt/bitbake/lib/bb/parse/parse_py/ConfHandler.py

Traceback (most recent call last):

  File "/opt/bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 100, in include(parentfn='configuration INHERITs', fn='classes/base.bbclass', lineno=0, data=<bb.data_smart.DataSmart object at 0x7f1dd1c633d0>, error_out='inherit'):

                 if error_out:

    >                raise ParseError("Could not %s file %s" % (error_out, fn), parentfn, lineno)

                 logger.debug(2, "CONF file '%s' not found", fn)

ParseError: ParseError in configuration INHERITs: Could not inherit file classes/base.bbclass


----------------------------

 classe/base.bbclass 파일이 필요하다고 한다.


4. base.bbclass 파일에 다음 추가 addtask build



The minimal task that BitBake runs is the do_build task. This is all the example needs in order to build the project. Of course, the base.bbclass can have much more depending on which build environments BitBake is supporting. For more information on the base.bbclass file, you can look at http://hambedded.org/blog/2012/11/24/from-bitbake-hello-world-to-an-image/#tasks.


5. Run Bitbake : Log

li@li:~/BB$ bitbake

Nothing to do.  Use 'bitbake world' to build everything, or run 'bitbake --help' for usage information.


----------------------
레시피를 만들고 BitBake 에게 뭔가를 해야한다고 한다.

9. Creating a Layer 

$ cd $HOME $ mkdir mylayer $ cd mylayer $ mkdir conf










If our setup is correct bitbake will report:

 Nothing to do. Use 'bitbake world' to build everything,

or run 'bitbake --help' or usage information.





ERROR: no recipe files to build, check your BBPATH and BBFILES?

Summary: There was 1 ERROR message shown, returning a non-zero exit code.



오류남 다시...

kwangjo@compile:~/hello$ bitbake printhello ERROR: no recipe files to build, check your BBPATH and BBFILES? Summary: There was 1 ERROR message shown, returning a non-zero exit code. kwangjo@compile:~/hello$ pwd /home/kwangjo/hello


소스를 첨부하겠다.

hello.tar.gz

실행법 hello 폴더에서 bitbake -f Test1





다시보기





'Yocto' 카테고리의 다른 글

rpi image  (0) 2015.11.27
EGLFS란  (0) 2015.11.27
The BSP Layer  (0) 2015.11.23
Build 1-1  (0) 2015.11.23
빌드 환경  (0) 2015.11.20

+ Recent posts