All of lore.kernel.org
 help / color / mirror / Atom feed
* Partitioned Image Creation and Initramfs Problem for ALIX3D3
@ 2013-08-29 16:20 Eren Türkay
  2013-09-02 10:11 ` [FIXED] " Eren Türkay
  0 siblings, 1 reply; 2+ messages in thread
From: Eren Türkay @ 2013-08-29 16:20 UTC (permalink / raw)
  To: openembedded-devel; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 2072 bytes --]

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

[-- Attachment #2: Type: application/pgp-signature, Size: 850 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [FIXED] Partitioned Image Creation and Initramfs Problem for ALIX3D3
  2013-08-29 16:20 Partitioned Image Creation and Initramfs Problem for ALIX3D3 Eren Türkay
@ 2013-09-02 10:11 ` Eren Türkay
  0 siblings, 0 replies; 2+ messages in thread
From: Eren Türkay @ 2013-09-02 10:11 UTC (permalink / raw)
  To: openembedded-devel; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 1663 bytes --]

On Thu, Aug 29, 2013 at 06:20:14PM +0200, Eren Türkay wrote:
> Hello all,

Hi again,

> 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 applied the solution here and the generated image works as expected. I
needed to create seperate initramfs image for the board, and have a
bbclass file for image creation (IMAGE_CMD_alix-hddimage). This bbclass
for image creation is the mix of boot-directdisk.bbclass and
sdimage_rpi.

https://github.com/eren/meta-alix3d3

Initramfs image is in "recipes-core/images", and the bbclass file is in
"classes" directory. For those who are interested, taking a look at
"conf/machine/alix3d3.conf" would be helpful as well.

Cheers,
Eren

-- 
    . 73! DE TA1AET
      http://linkedin.com/in/erenturkay

[-- Attachment #2: Type: application/pgp-signature, Size: 850 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-09-02 10:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-29 16:20 Partitioned Image Creation and Initramfs Problem for ALIX3D3 Eren Türkay
2013-09-02 10:11 ` [FIXED] " Eren Türkay

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.