


meta-mylayermeta-mylayer/recipes-example/myhello)meta-mylayer/recipes-example/myhello/myhello_0.1.bb)meta-mylayer/recipes-example/myhello/files/userprog.c)
myhello_0.1.bb
SRC_URI = "file://userprog.c"${S}= ${WORKDIR}files/userprog.c
초간단 소스코드$ bitbake 'component'
$ bitbake <Component Name>
e.g.,
$ bitbake myhello


component/files의 파일 들
Makefile, userprog.c
SRC_RUI = Makefile 위치do_compile() task에는 Makefile 명령어
주의!! 이렇게 직접 make 명령어를 내리는 것은 좋지 않다!!
OE환경에서는 oe_runmake 대신 make를 직접 call하는 것은 좋지 않음
2-3. 그냥 oe_runmake를 믿기로 하고 do_compile() task를 없애자
do_compile() task 없앰$ bitbake로 빌드


component_directory/files/source를 일일히 수정하는 것으로는 bitbake가 알아먹지 못하기에, component_directory/files/source를 수정 후, local commit.$ git format-patch -1 = 0001-My-First-Patch.patch(커밋 메시지로 이름 지어지음)0001-My-First-Patch.patch => component_directory/files로 MVSRC_URI = file://0001-My-First-Patch.patch 추가굉장히 짜증나는 일이니까, source는 따로 git으로 관리해 아래처럼, remote git repository를 활용하자.

$ bitbake myhello

do_rootfs는 위 과정에서 만들어진 패키지들을 설치한 Image의 rootfs를 생성한다.IMAGE_INSTALL: 우리가 만든 Package 모음(Package Feeds area)에서 이미지에 포함시킬 패키지를 리스트업한다.PACKAGE_EXCLUDE: 설치되지 말아야할 것들을 리스트업 한다.PACKAGE_CLASSES: 사용할 패키지들의 종류(rpm, deb, ipk)를 선택한다.PACKAGE_INSTALL: 이미지에 설치할 최종 패키지 리스do_imagedo_image_*를 통해 Filesystem마다 다른식으로 이미지를 만들 수 있도록 한다. python, qt)..openembedded-core/meta/recipes-devtools/python을 예로 든다.
내부에 python-*_'각version'.bb 파일들이 엄청 많다.$ bitbake python3 -> work/<arch>/python3$ bitbake python3-pip -> work/<arch>/python3-pip.inc 파일을 만들고, 각 레시피에서 require 하자.# <layer>/recipes-A/A/A-component.bb
require <recipes-A>/A/A.inc
# Insert Command