<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to add a startup script into init.d using Yocto Busybox in Layerscape</title>
    <link>https://community.nxp.com/t5/Layerscape/How-to-add-a-startup-script-into-init-d-using-Yocto-Busybox/m-p/1081661#M6345</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;C is not a scripting language. You cannot run a C code directly from a SysV&lt;BR /&gt;startup script. If you are using Yocto, create a valid recipe to build your&lt;BR /&gt;program and install it, then the binary can be invoked from a startup &lt;BR /&gt;script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Platon&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 May 2020 08:27:56 GMT</pubDate>
    <dc:creator>bpe</dc:creator>
    <dc:date>2020-05-29T08:27:56Z</dc:date>
    <item>
      <title>How to add a startup script into init.d using Yocto Busybox</title>
      <link>https://community.nxp.com/t5/Layerscape/How-to-add-a-startup-script-into-init-d-using-Yocto-Busybox/m-p/1081658#M6342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LS1021A&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to implement a script in the init.d since my distro has a poky-tiny version so there is no systemd, I want to add a script so that my system boots up it will run that script. Where should I save such a script under my build directory?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using busybox, should I add it into inittab please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2020 02:24:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/How-to-add-a-startup-script-into-init-d-using-Yocto-Busybox/m-p/1081658#M6342</guid>
      <dc:creator>jiye</dc:creator>
      <dc:date>2020-05-28T02:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a startup script into init.d using Yocto Busybox</title>
      <link>https://community.nxp.com/t5/Layerscape/How-to-add-a-startup-script-into-init-d-using-Yocto-Busybox/m-p/1081659#M6343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Below is the&amp;nbsp; link to an article that discusses possible ways to run a script&lt;BR /&gt;on each boot:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.linux.com/training-tutorials/managing-linux-daemons-init-scripts/" target="test_blank"&gt;https://www.linux.com/training-tutorials/managing-linux-daemons-init-scripts/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As of the location of the script in your build directory, it can be anywhere,&lt;BR /&gt;important only is where your recipe do_install puts it on the target.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Platon&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt; Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2020 15:49:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/How-to-add-a-startup-script-into-init-d-using-Yocto-Busybox/m-p/1081659#M6343</guid>
      <dc:creator>bpe</dc:creator>
      <dc:date>2020-05-28T15:49:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a startup script into init.d using Yocto Busybox</title>
      <link>https://community.nxp.com/t5/Layerscape/How-to-add-a-startup-script-into-init-d-using-Yocto-Busybox/m-p/1081660#M6344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi bpe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply, what if the file I want to call from init.d is&amp;nbsp;a C file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't just put in the start)&lt;/P&gt;&lt;P&gt;section that&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;start)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; gcc /home/myscrpt.c -o exe&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; /home/exe&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(1)should i still do this in the build ?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(2) also can I do cp myscrpt /usr/bin as well?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2020 15:54:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/How-to-add-a-startup-script-into-init-d-using-Yocto-Busybox/m-p/1081660#M6344</guid>
      <dc:creator>jiye</dc:creator>
      <dc:date>2020-05-28T15:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a startup script into init.d using Yocto Busybox</title>
      <link>https://community.nxp.com/t5/Layerscape/How-to-add-a-startup-script-into-init-d-using-Yocto-Busybox/m-p/1081661#M6345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;C is not a scripting language. You cannot run a C code directly from a SysV&lt;BR /&gt;startup script. If you are using Yocto, create a valid recipe to build your&lt;BR /&gt;program and install it, then the binary can be invoked from a startup &lt;BR /&gt;script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Platon&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2020 08:27:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/How-to-add-a-startup-script-into-init-d-using-Yocto-Busybox/m-p/1081661#M6345</guid>
      <dc:creator>bpe</dc:creator>
      <dc:date>2020-05-29T08:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a startup script into init.d using Yocto Busybox</title>
      <link>https://community.nxp.com/t5/Layerscape/How-to-add-a-startup-script-into-init-d-using-Yocto-Busybox/m-p/1081662#M6346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi bpe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did add&amp;nbsp;&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal; font-size: 14px;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #dcdcaa;"&gt;do_compile&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;()&amp;nbsp;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;${CC}&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;${WORKDIR}&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;/myscript.c -o&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;${WORKDIR}&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;/myscript&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but after I did this and install the myscript to (this is my busybox recipe file name: busybox.bbapend&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal; font-size: 14px;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #dcdcaa;"&gt;do_install_append_mydistro&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;()&amp;nbsp;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV style="background-color: #1e1e1e; font-weight: normal;"&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; install&amp;nbsp;-D&amp;nbsp;-m&amp;nbsp;0755&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;${WORKDIR}&lt;/SPAN&gt;&lt;SPAN&gt;/fstrimsched&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;${D}${localstatedir}&lt;/SPAN&gt;&lt;SPAN&gt;/fstrimsched&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;install&amp;nbsp;-D&amp;nbsp;-m&amp;nbsp;0755&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;${WORKDIR}&lt;/SPAN&gt;&lt;SPAN&gt;/schedfstrim&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;${D}${sysconfdir}&lt;/SPAN&gt;&lt;SPAN&gt;/init.d/schedfstrim&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ln&amp;nbsp;-sf&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;${WORKDIR}&lt;/SPAN&gt;&lt;SPAN&gt;/schedfstrim&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;${D}${bindir}&lt;/SPAN&gt;&lt;SPAN&gt;/schedfstrim&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I got this error :&lt;/DIV&gt;&lt;DIV&gt;| sed: can't read busybox.links*: No such file or directory&lt;BR /&gt;| WARNING: /localdata/mm_beta_exp/broadband-build/build/tmp/work/armv7ahf-neon-vfpv4-picoos-linux-musleabi/busybox/1.30.1-r0/temp/run.do_install.11616:1 exit 2 from 'sed -i "s:^/bin/:BASE_BINDIR/:" busybox.links*'&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;MY QUESTION IS&lt;STRONG&gt; do I need to reconfig the busybox to add those files? i did mentiond those new files in&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV style="background-color: #1e1e1e; font-weight: normal;"&gt;&lt;DIV&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt;SRC_URI_append_wl5e="&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #ce9178;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;file://myscript&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #d7ba7d;"&gt;\&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2020 13:49:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/How-to-add-a-startup-script-into-init-d-using-Yocto-Busybox/m-p/1081662#M6346</guid>
      <dc:creator>jiye</dc:creator>
      <dc:date>2020-05-29T13:49:50Z</dc:date>
    </item>
  </channel>
</rss>

