title: Yocto using .bbappend file to override writing of default init scripts for initramfs
body: <p>I am trying to write a <code>.bbappend</code> file that will append to the <code>initramfs-live-boot_1.0.bb</code> which has a statement inside the <code>do_install()</code> that writes the contents of <code>init-live.sh</code>, a shell script that manages the boot procedure, to <code>init</code>, an initialisation script that runs upon boot. The purpose of my <code>.bbappend</code> file is to reference a modified version of the startup script to be copied in place of the original without changing the base <code>openembedded-core</code> and/or <code>poky</code> environments. The <code>.bbappend</code> file and my version of the script is therefore placed in my project directory with the rest of my own recipes to be built.</p>
  
  <p>My <code>initramfs-live-boot_1.0.bbappend</code> looks like this:</p>
  
  <pre><code>SUMMARY = "Replacement recipe"
  FILESEXTRAPATH_prepend := "${THISDIR}/files:"
  SRC_URI += "file://init.sh"
  
  do_install_append() {
          install -m 0755 ${WORKDIR}/init.sh ${D}/init
  }
  </code></pre>
  
  <p>I have a folder <code>files</code> in the same directory as the <code>.bbappend</code> file that contains the <code>init.sh</code> script it should be reading from.</p>
  
  <p>The problem is when I try to build the image, it spits out this error:</p>
  
  <pre><code>WARNING: Failed to fetch URL file://init.sh, attempting MIRRORS if available
  </code></pre>
  
  <p>and then attempts to search through the <code>poky</code> directory for the missing files rather than in my project directory.</p>
  
  <p>Have I written my <code>.bbappend</code> file wrong? How would I go about editing the <code>initramfs</code> scripts using the <code>.bbappend</code> file?</p>