2023年12月26日星期二

Yocto 修改 recipe (bb檔),遇到 QA Issue,編譯失敗 (以NXP9098為例)

今天我想要新增幾個檔案,到root-filesystem當中

於是我在recipe (xxx.bb)的 do_install 裡面加了以下幾行 (綠色字體)

詳細說明:
我想把兩個檔案,regulatory.db 與 regulatory.db.p7s 放到 rootfs 裡面的 /llib/firmware/ 底下
於是我就增加三行

install -d ${D}/lib/firmware

install -m 0644 ${B}/regulatory.db ${D}/lib/firmware/regulatory.db
install -m 0644 ${B}/regulatory.db.p7s ${D}/lib/firmware/regulatory.db.p7s










然後進行編譯,結果出現以下的錯誤訊息(QA Issue)

ERROR: nxp9098-fw-1.0-r0 do_package: QA Issue: nxp9098-fw: Files/directories were installed but not shipped in any package: /lib/firmware/regulatory.db.p7s /lib/firmware/regulatory.dbPlease set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install. nxp9098-fw: 2 installed and not shipped files. [installed-vs-shipped]

如下圖:





這種錯誤是因為,你install了這些檔案,到root-filesystem,但是你沒把這些檔案一起包到他的package裡面造成的,所以解決方法是,在把這幾個檔案加到FILES_${PN},就可以順利編譯成功了!

因此你需要再加入這兩行到 FILES_${PN},如下圖:
















如果遇到的錯誤訊息為:
File 'xxx.bin' was already stripped, this will prevent future debugging! [already-stripped]
ERROR: xxx do_package: QA Issue: xxx: Files/directories were installed but not shipped in any package:

Solution:
加入下面這一行,可以解決
INSANE_SKIP_${PN} += "already-stripped"

沒有留言:

發佈留言

使用 lsblk 印出 emmc 每個 partition的"名字"與"size"

使用以下的command可以印出 eMMC的 partition資訊 lsblk --bytes --output name,partlabel,size   參數說明 --bytes: partition的大小,以byte的方式輸出 --output: 後面可以指定要輸出的內容...