我有一个bitbake配方,其来源是已经构建的debian包。配方基本上是:
int main() {
int* head = malloc(sizeof int); // silly to malloc a single int, but this is for illustration purposes
if (head != NULL)
{
// space for an int was returned to us from the heap
*head = 2; // now the unnamed int that head points to is 2
printf("%d\n", *head); // prints out 2
// don't forget to clean up
free(head);
}
else
{
// handle error, print error message, etc
}
return 0;
}
我想使用SRC_URI = "file:///some/path/some_file.deb"
S = "${WORKDIR}/some_file"
inherit bin_package
中已有的现有postinst
,preinst
和prerm
。我只使用上面的配方构建了ipk,这些文件不在生成的ipk中的some_file.deb
内。
我也可以手动解压缩debian并将脚本粘贴到control.tar.gz
等等,但我认为除了自动与上游脚本保持同步之外,可能还有更标准的bitbake方法来完成它。 / p>