[oe] Partitioned Image Creation and Initramfs Problem for ALIX3D3

Eren Türkay eren at hambedded.org
Thu Aug 29 16:20:14 UTC 2013


Hello all,

As you may already know, I have been working on a BSP for ALIX3D3[0]. I
enabled specific kernel configurations and reached to the point of
booting the board with its features enabled. I can boot the board with
"live" image type. However, what I want to have is a direct partitioned
hdd image which we can dd it into CF Card. So, /dev/sda1 will contain
kernel and initrd, /dev/sda2 will contain extracted rootfs. I expect /
to be mounted to /dev/sda2.  Currently, live image extracts the rootfs
to /dev/ram0 and the configuration is gone after reboot.

I looked at the existing solutions and found out that
"boot-directdisk.bbclass", which is inherited by image-vmdk, does a
similar job.  However, it does not include initramfs image and it looks
like it was specifically written to enable vmdk image, not for this
purpose.

The possible solution that came to my mind is to get
"boot-directdisk.bbclass", add initramfs installation, put the code
in a seperate bbclass, rename the function as IMAGE_CMD_alix-hddimage,
and add "alix-hddimage" to IMAGE_FSTYPES. The same technique is used by
meta-raspberrypi layer [1]

However, the problem with this is that "core-image-minimal-initramfs"
includes "initramfs-live-boot" by default. This script tries to find
rootfs.img and if it cannot find, it fails to boot the board. In this
case, we will have extracted rootfs in /dev/sda2, so rootfs.img will not
be there.

I looked at "initramfs-framework" recipe and it seems to fit for it. For
initramfs problem, should I create "alix3d3-minimal-initramfs" recipe,
add "initramfs-framework-base initramfs-module-udev" to IMAGE_INSTALL
and make "IMAGE_CMD_alix-hddimage" depend on
"alix3d3-minimal-initramfs"? Would it be a proper solution?

I am stuck here. Any help is appreciated especially on partitioning the
image and copying.

My best regards,
Eren

[0] https://github.com/eren/meta-alix3d3
[1] http://git.yoctoproject.org/cgit/cgit.cgi/meta-raspberrypi

-- 
    . 73! DE TA1AET
      http://linkedin.com/in/erenturkay
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20130829/212afb89/attachment.sig>


More information about the Openembedded-devel mailing list