Re: [yocto] Multiple partitions in drive image

2012-10-16 Thread Joshua Immanuel
Hello Mark,

On Mon, 2012-10-15 at 14:19 -0500, Mark Hatle wrote:
 Is the code you used for the dynamic fstab, partition map, and
 bootloader setup and image creation available anywhere?
 
 I expect it isn't too difficult to create, but if there is something
 to start with it would be useful.

My layer contains parts which I cannot put on the Internet. Give me a
few days I'll split out those parts, make an usable example and put them
up somewhere. 
-- 
Joshua Immanuel
HiPro IT Solutions Private Limited
http://hipro.co.in


signature.asc
Description: This is a digitally signed message part
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Multiple partitions in drive image

2012-10-15 Thread Joshua Immanuel
Hello Jonathan,

On Fri, 2012-10-12 at 21:42 +, Jonathan Haws wrote:
 What I am trying to do is have Poky build me an image that I can just
 'dd' to a SSD and hook up to the system to boot.  Since that image
 will also only be only ~250MB or so, I would like to have Poky
 generate an image containing multiple partitions - a small one
 containing the boot files, then the rest of the image dedicated to
 storage.  Is that possible?

Yes. It is possible. I have done the following in order to generate
image with multiple partitions. 

 1. I wrote a custom image_types.bbclass in order to generate
multiple partition images (say /, /var etc)
 2. Wrote a bbappend for base-files recipe to generate custom fstab
file with required partition's mount options
 3. Extended grub-native recipe to generate core.img and boot.img
using grub-mkimage for target platform
 4. Wrote a python task to join all these generated images (boot,
core and filesystem images) and embedded the partition table
structure into it.
 5. Added this task to my image recipe after the 'do_rootfs' task

This way we can generate a custom image with the required partitions.
-- 
Joshua Immanuel
HiPro IT Solutions Private Limited
http://hipro.co.in


signature.asc
Description: This is a digitally signed message part
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Multiple partitions in drive image

2012-10-15 Thread Jonathan Haws
On Fri, 2012-10-12 at 21:42 +, Jonathan Haws wrote:
 What I am trying to do is have Poky build me an image that I can just
 'dd' to a SSD and hook up to the system to boot.  Since that image
 will also only be only ~250MB or so, I would like to have Poky
 generate an image containing multiple partitions - a small one
 containing the boot files, then the rest of the image dedicated to
 storage.  Is that possible?

Yes. It is possible. I have done the following in order to generate
image with multiple partitions.

 1. I wrote a custom image_types.bbclass in order to generate
multiple partition images (say /, /var etc)
 2. Wrote a bbappend for base-files recipe to generate custom fstab
file with required partition's mount options
 3. Extended grub-native recipe to generate core.img and boot.img
using grub-mkimage for target platform
 4. Wrote a python task to join all these generated images (boot,
core and filesystem images) and embedded the partition table
structure into it.
 5. Added this task to my image recipe after the 'do_rootfs' task

This way we can generate a custom image with the required partitions.
---

Awesome, I will take a look at this.

Thanks!
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Multiple partitions in drive image

2012-10-15 Thread Mark Hatle

On 10/15/12 1:59 AM, Joshua Immanuel wrote:

Hello Jonathan,

On Fri, 2012-10-12 at 21:42 +, Jonathan Haws wrote:

What I am trying to do is have Poky build me an image that I can just
'dd' to a SSD and hook up to the system to boot.  Since that image
will also only be only ~250MB or so, I would like to have Poky
generate an image containing multiple partitions - a small one
containing the boot files, then the rest of the image dedicated to
storage.  Is that possible?


Yes. It is possible. I have done the following in order to generate
image with multiple partitions.

  1. I wrote a custom image_types.bbclass in order to generate
 multiple partition images (say /, /var etc)
  2. Wrote a bbappend for base-files recipe to generate custom fstab
 file with required partition's mount options
  3. Extended grub-native recipe to generate core.img and boot.img
 using grub-mkimage for target platform
  4. Wrote a python task to join all these generated images (boot,
 core and filesystem images) and embedded the partition table
 structure into it.
  5. Added this task to my image recipe after the 'do_rootfs' task

This way we can generate a custom image with the required partitions.



Recently a we've been talking about how we could do this.  Specifically how to 
construct a disk image that can just be DD'ed including bootloader, partitioning 
and multiple partitions.


Is the code you used for the dynamic fstab, partition map, and bootloader setup 
and image creation available anywhere?


I expect it isn't too difficult to create, but if there is something to start 
with it would be useful.


--Mark



___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto



___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Multiple partitions in drive image

2012-10-15 Thread Gary Thomas

On 2012-10-15 13:19, Mark Hatle wrote:

On 10/15/12 1:59 AM, Joshua Immanuel wrote:

Hello Jonathan,

On Fri, 2012-10-12 at 21:42 +, Jonathan Haws wrote:

What I am trying to do is have Poky build me an image that I can just
'dd' to a SSD and hook up to the system to boot.  Since that image
will also only be only ~250MB or so, I would like to have Poky
generate an image containing multiple partitions - a small one
containing the boot files, then the rest of the image dedicated to
storage.  Is that possible?


Yes. It is possible. I have done the following in order to generate
image with multiple partitions.

  1. I wrote a custom image_types.bbclass in order to generate
 multiple partition images (say /, /var etc)
  2. Wrote a bbappend for base-files recipe to generate custom fstab
 file with required partition's mount options
  3. Extended grub-native recipe to generate core.img and boot.img
 using grub-mkimage for target platform
  4. Wrote a python task to join all these generated images (boot,
 core and filesystem images) and embedded the partition table
 structure into it.
  5. Added this task to my image recipe after the 'do_rootfs' task

This way we can generate a custom image with the required partitions.



Recently a we've been talking about how we could do this.  Specifically how to 
construct a disk image that can just be DD'ed including bootloader, 
partitioning and multiple
partitions.

Is the code you used for the dynamic fstab, partition map, and bootloader setup 
and image creation available anywhere?

I expect it isn't too difficult to create, but if there is something to start 
with it would be useful.


There are a lot of examples for this - try looking at meta-fsl-arm
it supports a 'sdcard' image type which is what you are looking for.

git:://github.com/Freescale/meta-fsl-arm.git

--

Gary Thomas |  Consulting for the
MLB Associates  |Embedded world

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] Multiple partitions in drive image

2012-10-12 Thread Jonathan Haws
What I am trying to do is have Poky build me an image that I can just 'dd' to a 
SSD and hook up to the system to boot.  Since that image will also only be only 
~250MB or so, I would like to have Poky generate an image containing multiple 
partitions - a small one containing the boot files, then the rest of the image 
dedicated to storage.  Is that possible?

Is there a better way to go about this?  Once I have my images built (hddimg, 
ext3, cpio.gz, iso) how are those typically put onto a disk drive for use on 
hardware?  Most BSPs I have looked at use 'dd', but I am guessing there is a 
better way...

Thanks!
Jonathan
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Multiple partitions in drive image

2012-10-12 Thread Rudolf Streif
Jonathan,

For what hardware are you building? It depends on the hardware how you need
to layout the file system on the boot device. YP provides you with a kernel
image and a root file system image and eventually, dependent on the
hardware, with bootloaders in ${TMPDIR}/deploy/images.

Rudi
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Multiple partitions in drive image

2012-10-12 Thread Jonathan Haws
This is for an ADLGS45 board from Advanced Digital Logic.  It has a Core2 Duo 
with an Intel GS45 chipset.  I have the kernel and everything booting just find 
using the hddimg file generated (and found in tmp/deploy/images), however that 
is wasting a lot of space on that drive, since the image is only 250MB (and the 
drive is 120GB).

If I can avoid going through the hassle of installing GRUB and copying over the 
root FS (i.e. wrap it into a single 'dd' command) that would be ideal because 
eventually this will be turned over to a tech who knows nothing about GRUB or 
anything else and just (somewhat) follows a manual.

Thanks,
Jonathan


From: rstr...@linuxfoundation.org [rstr...@linuxfoundation.org] on behalf of 
Rudolf Streif [rudolf.str...@linux.com]
Sent: Friday, October 12, 2012 16:13
To: Jonathan Haws
Cc: yocto@yoctoproject.org
Subject: Re: [yocto] Multiple partitions in drive image

Jonathan,

For what hardware are you building? It depends on the hardware how you need to 
layout the file system on the boot device. YP provides you with a kernel image 
and a root file system image and eventually, dependent on the hardware, with 
bootloaders in ${TMPDIR}/deploy/images.

Rudi
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto