how to use local/git source with Yocto bb file


1. bb 파일 (Local file)

project name: kkkk

DESCRIPTION = "kkkk application"
SECTION = "applications"
LICENSE = "XXX"

inherit externalsrc cmake_qt5 pkgconfig systemd

#local code position
EXTERNALSRC = "${DIR}/source/apps/kkkk"

DEPENDS = "lib common"

do_install_append() {
mkdir -p ${D}/usr/test

#local source
cp -R ${EXTERNALSRC}/install_data/data/* ${D}/usr/test/data/
cp -R ${EXTERNALSRC}/install_data/start.sh ${D}/usr/test/
}

FILE_${PN} += "\
${sysconfdir} \
${localstatedir} \
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}', '', d)} \
/usr/test/* \
"





2. bb 파일 (Git file)

#git
To use the git source, the following values must be set: yocto_conf_path/local.conf => find "BB_NO_NETWORK" => set value 0


project name: kkkk

DESCRIPTION = "kkkk application"
SECTION = "applications"
LICENSE = "XXX"

inherit externalsrc cmake_qt5 pkgconfig systemd

#git
#To use the git source, the following values must be set: yocto_conf_path/local.conf => find "BB_NO_NETWORK" => set value 0
PV="git_tag"
SRCREV="refs/tags/${PV}"
SRC_URI = "\
    git://git@192.168.0.1:/home/git/repos/kkkk.git;protocol=ssh \
    git://git@IP:/.git_path;protocol=ssh \
"

S = "${WORKDIR}/git/source/kkkk"

DEPENDS = "lib common"

do_install_append() {
mkdir -p ${D}/usr/test

#git
cp -R ${S}/install_data/data/* ${D}/usr/test/data/
}

FILE_${PN} += "\
${sysconfdir} \
${localstatedir} \
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}', '', d)} \
/usr/test/* \
"



#Yocto #Bitbake #Git #Local #SRC_URI #bbfile #BB_NO_NETWORK

No comments:

Post a Comment

알뜰폰 삼성페이 교통카드 '한도 초과' 오류(등록 불가 오류) 해결방법

sk7mobile 알뜰폰 삼성페이 교통카드 등록 시, 한도 초과 문제 해결방법 skt usim 해킹 사건으로 인해 sk7mobile 알뜰폰을 사용하는 저도 usim을 바꾸고 나니 삼성페이 교통카드가 등록이 안되더라구요...  삼성페이 교통카드 기능 은...