【问题标题】:At which point during the first boot are tasks in pkg_postinst_ontarget performed?在第一次引导期间的哪个时间点执行 pkg_postinst_ontarget 中的任务?
【发布时间】:2021-06-27 17:36:53
【问题描述】:

我正在设计一个需要在首次启动时执行许多设置活动的设备,我正在尝试找出最好的方法。我可以使用的工具之一似乎是fantastically incompletely documentedpkg_postinst_ontarget

我需要执行的一项活动取决于成功安装 SD 卡。 pkg_postinst_ontarget 会在所有 fstab 挂载活动完成后执行吗?

【问题讨论】:

    标签: yocto boot bitbake


    【解决方案1】:

    如果您使用的是 ipk 包,yocto 构建会将安装后脚本放在 /etc/ipk-postinsts 中。然后,这些脚本通常由 systemd 在目标上运行:run-postinsts.service 单元运行/usr/sbin/run-postinsts,它运行并删除存储在/etc/ipk-postinsts 中的所有脚本。因此,脚本在第一次启动时运行一次,但在执行后消失。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-03-18
      • 2018-11-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-07-08
      • 1970-01-01
      相关资源
      最近更新 更多