[yocto] Booting live images (core-image-minimal-initramfs) on ARM

Paul Knopf pknopf at medxchange.com
Mon May 2 10:24:31 PDT 2016


Great, I built my cpio.gz root fs. I made the following changes to
init-live.sh
<https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-core/initrdscripts/files/init-live.sh>
to support this file system.

@@ -158,7 +157,7 @@ mount_and_boot() {
     mkdir $ROOT_MOUNT
     mknod /dev/loop0 b 7 0 2>/dev/null

-    if ! mount -o rw,loop,noatime,nodiratime
/run/media/$ROOT_DISK/$ISOLINUX/$ROOT_IMAGE $ROOT_MOUNT ; then
+    if ! mount *-t sysfs *-o rw,loop,noatime,nodiratime
/run/media/$ROOT_DISK/$ISOLINUX/$ROOT_IMAGE $ROOT_MOUNT ; then
        fatal "Could not mount rootfs image"
     fi

However, when I plug in a block device with a rootfs.img (my cpio.gz) at
the root, nothing happens. Do I need to pass any kernel parameters in? I
notice there is some parsing of the /proc/cmdline.

The only options I am passing to the kernel is this: console=ttymxc1,115200
video=mxcfb0:dev=hdmi,1920x1080M at 60

Here is my entire dmesg. I booted without a USB present, and then plugged
one in.
https://gist.github.com/pauldotknopf/ce8f3d0dee0b53cef9a7dccebccc0c1c

What is the best way to debug debug this init-live.sh script?

I wish there was some documentation on this ;)

On Mon, May 2, 2016 at 11:12 AM Jeyachandran, Yukatharsani (Contractor) <
Yukatharsani_Jeyachandran at comcast.com> wrote:

>
> Hi,
>
> Edit IMAGE_FSTYPES variable:-
>
> Add this line IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}" in machine configuration file or conf/local.conf file.
>
> By default, INITRAMFS_FSTYPES set to "cpio-gz" in meta/conf/bitbake.conf file.
>
>
> Thanks and Regards,
> Yukatharsani J.
>
>
>
> ------------------------------
> *From:* yocto-bounces at yoctoproject.org <yocto-bounces at yoctoproject.org>
> on behalf of Paul Knopf <pknopf at medxchange.com>
> *Sent:* Monday, May 2, 2016 10:43 AM
> *To:* yocto at yoctoproject.org
> *Subject:* [yocto] Booting live images (core-image-minimal-initramfs) on
> ARM
>
> I have created kernel with an initramfs bundled that uses
> "initramfs-live-boot" to search for a "root.img" file on any mounted media
> devices (/media/*/root.img). I have added some rules to udev to automount a
> block device correctly.
>
> However, when I attempt to create the live image, it depends on syslinux,
> which isn't available for ARM.
>
> ERROR: Nothing PROVIDES 'syslinux'
> ERROR: syslinux was skipped: incompatible with host arm-poky-linux-gnueabi
> (not in COMPATIBLE_HOST)
>
> I have the following in my image.
>
> IMAGE_FSTYPES = "live"
>
> Why do we need the syslinux dependency? I have already booted my kernel
> via u-boot, so it seems unnecessary. Is there another IMAGE_FSTYPE that is
> compatible with the "initramfs-live-boot" package? cramfs? If so, do I need
> to change the "init-live.sh" script in "initramfs-live-boot" to support
> this new file type?
>
> Thanks,
> Paul Knopf
> Software Engineer
> Med X Change, Inc
> pknopf at medxchange.com
>
-- 

Thanks,
Paul Knopf
Software Engineer
Med X Change, Inc
pknopf at medxchange.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20160502/f3ecc2a6/attachment.html>


More information about the yocto mailing list