Initramfs with sama5d3-xplained

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

bstein
Posts: 1
Joined: Mon May 18, 2015 9:08 pm

Initramfs with sama5d3-xplained

Tue May 19, 2015 8:20 pm

Hello,

I am trying to use initrd/initramfs with the images generated with yocto (u-boot is loading them), but so far I have no results.
This is what I've done so far:

- Try generating an initramfs image
By setting these variables (and subsets of them) in some .conf file:

INITRAMFS_IMAGE = "core-image-custom"
INITRAMFS_IMAGE_BUNDLE = "1"
IMAGE_FSTYPES = "cpio.gz"
KERNEL_INITRAMFS = "-initramfs"

and adding these kernel configs:

CONFIG_INITRAMFS_SOURCE=""
CONFIG_RD_GZIP=y

However, I always get this error with some of yocto's internals: http://pastebin.com/J5fLms4x

- Try using the rootfs and kernel files generated with initrd
I have tried simply booting the rootfs as if it was a ram image, but with no results. I then tried adding the "initramfs-live-boot" package in my image. Still no results. I was passing these kernel arguments: "root=/dev/ram0 rw initrd=0xADDRESS,SIZE", however when u-boot tried to boot the kernel, nothing would come up.
When I didn't pass the arguments, the kernel would boot, but as expected it couldn't find the rootfs and then would panic.

Is there anything I'm doing wrong when generating a ramfs? Is there any guide for doing this with yocto for sama5d3-xplained? I'd appreciate any kind of help in this matter.

Thanks
blue_z
Location: USA
Posts: 1547
Joined: Thu Apr 19, 2007 10:15 pm

Re: Initramfs with sama5d3-xplained

Wed May 20, 2015 2:57 am

bstein wrote:...but so far I have no results.
Your persistent assertions of "no results" are not helpful nor accurate descriptions.  
bstein wrote:I was passing these kernel arguments: "root=/dev/ram0 rw initrd=0xADDRESS,SIZE", however when u-boot tried to boot the kernel, nothing would come up.
Negative descriptions do not help.  There's an infinite list of things that did not occur, so your report is woefully incomplete.  

An initramfs is not a ramdisk (i.e. /dev/ram0) nor initrd, and (when properly attached to the kernel image) does not require specification in the command line.  In fact the root= kernel parameter is ignored when the initramfs is properly attached and detected.
bstein wrote:Is there anything I'm doing wrong when generating a ramfs?
Can't say as I don't use Yocto.  I do use Buildroot, and it can build & attach the initramfs just fine to the kernel image.

Regards

Return to “Linux”

Who is online

Users browsing this forum: No registered users and 2 guests