创建bb file:
poky/meta/recipes-devtools/nativesdk-custom-ps1-setting/nativesdk-custom-ps1-setting.bb
$ vi ../../poky/meta/recipes-devtools/nativesdk-custom-ps1-setting/nativesdk-custom-ps1-setting.bb
LICENSE = "CLOSED"
inherit nativesdk
do_generate(){
echo "export PS1=\"(yocto-sdk) \${PS1}\"" > ${B}/custom-ps1-setting.sh
}
do_install(){
install -d ${D}/environment-setup.d/
cp ${B}/custom-ps1-setting.sh ${D}/environment-setup.d/
}
addtask generate
PACKAGES = "${PN}"
FILES_${PN} = "/"
do_generate() 创建文件:build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-custom-ps1-setting/1.0-r0/custom-ps1-setting-1.0/custom-ps1-setting.sh
${D}: tmp/deploy/
生成的rpm在:build/tmp/deploy/rpm/x86_64_nativesdk/nativesdk-custom-ps1-setting-1.0-r0.x86_64_nativesdk.rpm
生成SDK:
将nativesdk-custom-ps