From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Petazzoni Date: Sat, 27 Apr 2013 03:17:58 +0200 Subject: [Buildroot] initramfs doesn't get linked into kernel In-Reply-To: References: Message-ID: <20130427031758.363b222f@skate> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net Dear Adam Nielsen, On Sat, 27 Apr 2013 09:37:59 +1000, Adam Nielsen wrote: > I'm trying to figure out how to get the initramfs image linked in to my kernel > zImage. I have selected BR2_TARGET_ROOTFS_INITRAMFS (the only option I can > find in the menuconfig containing 'initramfs') but nothing gets linked in to > my kernel. > > I am using a custom kernel config, and I tried putting the filename of the > buildroot-generated .cpio image in as CONFIG_INITRAMFS_SOURCE which linked in > successfully, but then it won't boot as it appears you are supposed to put an > initramfs configuration filename here instead. > > Is it correct that I have to manually put something into > CONFIG_INITRAMFS_SOURCE? If so, what should I place here to use the rootfs > generated by buildroot? If you let Buildroot build your kernel, it does that automatically (see the code in linux/linux.mk). If you build your kernel outside of Buildroot, you have to set CONFIG_INITRAMFS_SOURCE correctly. If you build your kernel outside of Buildroot, pointing CONFIG_INITRAMFS_SOURCE to the .cpio image works just fine. I'm doing that all the time here. Here's what I have in my kernel configuration: CONFIG_INITRAMFS_SOURCE="../marvell-rootfs/images/rootfs.cpio" Could you attach your Buildroot .config, and your kernel configuration file (output/build/linux-x.y.z/.config if you build your kernel with Buildroot) ? Thanks, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com