title: Yocto mounting initramfs / initrd image to Raspberry Pi
body: <p>Using Yocto-based tools, I'm able to generate several files for deployment. These involve:</p>
  
  <ul>
  <li><code>sdimg</code> file for writing to the SD card</li>
  <li>A <code>cpio.gz</code> archive (Initramfs)</li>
  <li><code>Image-initramfs.bin</code> (Initramfs)</li>
  </ul>
  
  <p>I would like to activate plymouth in my Embedded board (Raspberry Pi) with a Yocto-based Linux distribution. However I am not sure how to mount the <code>cpio.gz</code> archive or <code>Image-initramfs.bin</code>. I've read online that vanilla Raspbian has an entry in <code>/config.txt</code> in boot partition i.e. <code>initramfs &lt;file.gz&gt; &lt;start_address&gt;</code> and also a kernel command line option in <code>/cmdline.txt</code> in boot partition i.e. <code>initrd=&lt;file.gz&gt;</code>.</p>
  
  <p>What I've tried so far involves both of these approaches. I copy the <code>cpio.gz</code> file to the <code>/boot</code> in root filesystem partition and configure the aforementioned files, which did not work. To break it down, here is how it looks:</p>
  
  <pre><code> + Boot Partition
   + ---- overlays/
   + ---- config.txt
   + ---- cmdline.txt
   + ---- kernel.img
  
   + 1.2GB Volume (rootfs)
   + ---- bin/
   + ---- boot/
          +--- &lt;file&gt;.cpio.gz
   + ---- var/
   + ---- usr/
          ....
  </code></pre>
  
  <p>Now, in <code>config.txt</code>, I have something like (tried many variations):</p>
  
  <pre><code>initramfs &lt;file&gt;.cpio.gz 0x00a00000
  ramfsfile="&lt;file&gt;.cpio.gz"
  ramfsaddr=0x00a00000
  </code></pre>
  
  <p>In <code>cmdline.txt</code>, I have:</p>
  
  <pre><code>initrd=&lt;file&gt;.cpio.gz dwc_otg.lpm_enable=0 console=serial0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait    
  </code></pre>
  
  <p>However, nothing is enough for the kernel to even give an error. That means, system boots up as normal, and there is no sign of initramfs usage.</p>
  
  <p>Kernel that I compile with yocto is the following:</p>
  
  <pre><code>#&gt; uname -a 
  #&gt; Linux raspberrypi0-wifi 4.9.77-rt61 #11 PREEMPT RT Tue May 22 01:14:26 +03 2018 armv6l armv6l armv6l GNU/Linux
  </code></pre>
  
  <p>Following kernel config parameters are enabled:</p>
  
  <pre><code>#&gt; modprobe configs
  #&gt; cat /proc/config.gz | gunzip &gt; kernelconf.txt
  ...
  CONFIG_BLK_DEV_INITRD=y
  CONFIG_INITRAMFS_SOURCE=""
  CONFIG_RD_GZIP=y
  </code></pre>
  
  <p>I don't know what I'm missing here. Anything that catches your attention, please let me know. Any guidance is well appreciated.</p>