[yocto] per-image ROOTFS sizes
Robert P. J. Day
rpjday at crashcourse.ca
Wed Dec 12 12:46:31 PST 2012
On Wed, 12 Dec 2012, Trevor Woerner wrote:
> Hi Darren,
>
> On Wed, Dec 12, 2012 at 2:59 PM, Darren Hart <dvhart at linux.intel.com> wrote:
> > On 12/11/2012 01:05 PM, Trevor Woerner wrote:
> >> Are per-image ROOTFS sizes (i.e. IMAGE_ROOTFS_SIZE_<image>) still
> >> supported?
> > Interesting, I haven't tried myself. Have you tried and run into an issue?
>
>
> Yes. I had been trying to figure out why my:
>
> IMAGE_ROOTFS_SIZE_vmdk = "500000"
>
> line in my config file wasn't working when I found the link I provided
> earlier. Right now all I can say is that it doesn't work for _vmdk
> specifically.
since i was going to play with vmdk soon, i took a look at this and
from a position of extreme ignorance, i can see image-vmdk.bbclass
(which i'm going to assume is the class being used) which contains:
#inherit image-live
inherit boot-directdisk
create_vmdk_image () {
qemu-img convert -O vmdk ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hdddirect ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.vmdk
ln -s ${IMAGE_NAME}.vmdk ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.vmdk
}
so my *guess* is that any sort of rootfs size calculation has to come
from boot-directdisk.bbclass, but if you look there, there's no
apparent reference to IMAGE_ROOTFS_SIZE. what you see are numerous
references to BLOCKS and ROOTFSBLOCKS and BOOTDD_EXTRA_SPACE and so
on, with:
ROOTFSBLOCKS=`du -Lbks ${ROOTFS} | cut -f 1`
TOTALSIZE=`expr $BLOCKS + $ROOTFSBLOCKS`
END1=`expr $BLOCKS \* 1024`
END2=`expr $END1 + 512`
END3=`expr \( $ROOTFSBLOCKS \* 1024 \) + $END1`
echo $ROOTFSBLOCKS $TOTALSIZE $END1 $END2 $END3
rm -rf $IMAGE
dd if=/dev/zero of=$IMAGE bs=1024 seek=$TOTALSIZE count=1
parted $IMAGE mklabel msdos
parted $IMAGE mkpart primary fat16 0 ${END1}B
parted $IMAGE unit B mkpart primary ext2 ${END2}B ${END3}B
so what happens if you try to set the appropriate variables above?
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
More information about the yocto
mailing list